This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Tobbe's profile picture

External Minecraft LuA Development

Started by Tobbe, 13 November 2014 - 01:16 PM
Tobbe #1
Posted 13 November 2014 - 02:16 PM
Hi,
I am a beginner C# Programmering and looking to start using Minecraft as a playground for coding
and to learn LuA.

Since the ingame editor leaves much to be desired I wonder if there is an External Program similar to Visual Studio for programing LuA suitable to minecraft?

It is preferably free, comes with syntax highlighter, autodebugger that complains when syntax is wrong
and, if possible, even come with autocomplete suggest.

That way I can start coding in a better enviroment then in minecrafts editor. I know I will need to somehow get the code from the program into minecraft but I'll cross that bridge when I get to it as I take this one step at a time.

Thanks for the help guys.

// Tobbe
theoriginalbit #2
Posted 13 November 2014 - 02:41 PM
Sublime Text 2/3 is a good text editor when combined with GravityScore's syntax highlighter, it adds code suggestions. However it is a paid software that has an unlimited trial period (so just the occasional 'buy me' popup), it also doesn't have a compiler to inform you of incorrect syntax and the likes.

Certain IDEs like IntelliJ (and I do believe Visual Studio too) do have Lua plugins, which obviously have a compiler and the likes (I know for a fact the IntelliJ plugin even performs some AST code inspection and gives you warnings), however these are for Lua and don't have specific support for ComputerCraft, meaning you'll definitely not be able to run the scripts from the IDE.

You will have to weighing up whether you want code suggestions, or a compiler more than the other and then make your decision based off that.

In terms of testing your programs outside of Minecraft you can do it, there are a few emulators scattered around these forums, it really depends on what version of ComputerCraft you're using as to which emulator you need to use.

Finally in terms of getting your code into Minecraft, in the saves/[world name]/computer there are folders for each computer, each containing the files that are on the computers, if you point your IDE/Text Editor of choice at this folder you'll be able to modify code and then test it (and no, you won't have to restart Minecraft each time).
Tobbe #3
Posted 13 November 2014 - 03:13 PM
What external program do you recommend that best supports LuA programming for Minecraft?

I don't need to test the code externally and a compiler would be most appreciated. I will also look into LuA plugin for Visual Studio.
Lyqyd #4
Posted 13 November 2014 - 04:08 PM
I use SublimeText myself.
Tobbe #5
Posted 13 November 2014 - 04:31 PM
Ok so I have confirmed where to find the programs externally and also that I can edit externally via text editor.
I also installed Sublime 3 and installed the suggested addons.

How do I configure Sublime 3 to set a new default workfolder path (and set it to the worlds computer folder)?

also thank you so much guys for the help. I'm excited to get started with this now :)/>
KingofGamesYami #6
Posted 13 November 2014 - 04:39 PM
I'll second SublimeText. Although I do a lot of my work on Mimic, which includes an editor similar to SublimeText and is also an emulator.
Lyqyd #7
Posted 13 November 2014 - 05:35 PM
You might try looking through the SublimeText configuration files (which can be opened for editing through the menus), there may be an option in there. It's also usually pretty good about remembering where you last opened a file from, and you can set up "projects" that, when opening the project file, open a new window with a predetermined set of files open in tabs. There are a variety of ways to set it up, some of which will be more useful to you than others.