[GUIDE] Eclipse + Koneki + Love2d = Mari0 Modding Party

Mods, guides how to use and install mods go right in here.
Post Reply
User avatar
EntranceJew
Posts: 93
Joined: 05 Mar 2012, 05:37

Post » 18 Mar 2012, 22:46

Want to make sweet mods? Want an easier way to modify the files in Mari0? Well this guide is for the second question, but I wouldn't mind helping with the former when I can.
This guide is currently only for Windows Vista and up, I'll expand it with other operating system specific information when I can or whenever someone would be kind enough to translate my scripts for me.

1) Download/Install Eclipse Classic
Head on over to http://www.eclipse.org/downloads/ and snag Eclipse 3.7.2, install it for your appropriate OS, do yourself a favor and start it as well. I suggest getting all available packages from your local package manager if you have an equivalent on linux. If you have an existing eclipse install with Koneki skip ahead to step 3.

2) Eclipse First Steps + Install Koneki
If it's your first time running eclipse, you'll get a window that looks something like this:
Image
If it doesn't look like this, make it look like this except with your windows username instead of "admin" unless you know what you're doing.
After that you'll probably get a Welcome window, tell that to buzz off by going up and clicking the X button as demonstrated here.
You will wind up on the main page of your eclipse menu that looks similar to but not quite like this here and you will need to navigate up to Help > Install New Software....
An install window will show up, you should type in to the Work With field: http://download.eclipse.org/koneki/updates-nightly/ldt and hit enter, it will work a bit and then you'll need to make sure that Lua Development Tools - Koneki (Incubator) has a check next to it, and that all the appropriate boxes are checked as they are in this image.
Hit next, reassure to yourself that the boxes are checked and proceed, agree to the token EULA and proceed.
Right about now you'll probably see:
Image
Just let it run, unless you see:
Image
If you see this then just hit OK and let it proceed until you see:
Image
Restart Now and wait for eclipse to relaunch.

3) Get Equipped
So we're going to break away from Eclipse to set up the Mari0 source programs.
Go over and download my package from mediafire, extract its contents to workspace\mario_prep, this is the same workspace from the first step. It has to be in mario_prep, it needs to be. The script will break if it's not. After you extract the archive, run workspace\mario_prep\mari0_update.bat, it will automatically check for the latest source and do a bunch of magic. This requires at least Windows Vista because the folder it makes, link is supposed to contain junction point links to the directories: latest=workspace\mario_prep\srcs\Maj.Min\ where Maj and Min are the major and minor versions of mari0 respectively and appdata=%appdata%\LOVE\mari0. This enables Eclipse to use dynamic folder sources when we include them later. You will need to run mari0_update.bat whenever you want to download and have eclipse use the latest mari0 source.

4) Make The Project
Go back to Eclipse and run on up to File > New > New Lua Project, if it's not there then something terrible happened.
If it is there and looks like this then you should click it and make a window that looks akin to this pop up.
For the sake of this tutorial, you should name your project mario and it should be in your workspace folder. You should have "use default workspace" enabled by default, don't change that. (I just can't have that because my default folder is different.)
After all that jazz happens, a little folder on the left pane should appear with the name "mario", go over and right click on it and click Import, it will bring up a screen like this here select General > File System and progress to get to a screen like this one here. It is now your job to make it look like this by browsing to your workspace\mario_prep\link\latest folder and clicking all the appropriate checkboxes (don't forget to hit advanced and make it match my settings). After you do that, import again and repeat the process with workspace\mario_prep\link\appdata and this image. After you hit okay it will prompt you to overwrite the maps in your source folder (the ones that come with the game) with the ones generated from edits, you generally don't want to do this. Also beware, the generated .love file will contain all your custom maps. You should disable the mappacks folder from the appdata import if you don't want that to happen.

5) Setting Up External Tool
Oh my goodness, we're almost there.
Head on up to this funky icon and select the down arrow and then External Tool Configuration.
Then you'll open up this menu, you should right click Program and select New and make its contents appropriately similar to that pictured here.
Then you hit apply and run.
After that, any time you click the icon with the toolbox without hitting the down arrow it will run the mari0_make.bat script that automatically builds the source files that eclipse is editing.
That is, whenever you hit that icon, you will be greeted by this beautiful image.

6) Get Cracking
Go ahead and start modding. If you want to include a modding system or other mods, overwrite the contents of workspace\mario_prep\latest with the unpacked love or source for the mod. Be aware that anything in appdata will overwrite the contents of the packaged love, so rename them temporarily if you have to or in step 4 just not include the appdata folder (you will have to modify mari0_make.bat to not include appdata as well). I hope this was somewhat clear or at least usable to some extent as a guide, because I spent a decent chunk of time working on it all. If anything is unclear or if something doesn't work, just ask and I will help to the best of my ability.
Last edited by EntranceJew on 19 Mar 2012, 21:49, edited 2 times in total.

User avatar
EntranceJew
Posts: 93
Joined: 05 Mar 2012, 05:37

Post » 19 Mar 2012, 07:36

Oh my goodness, I made this a tutorial.

User avatar
trosh
Posts: 1594
Joined: 03 Feb 2012, 08:36

Post » 19 Mar 2012, 07:53

you know you could use geany with "love ." as the execute command ... in the extracted directory, not the love of course.

User avatar
EntranceJew
Posts: 93
Joined: 05 Mar 2012, 05:37

Post » 19 Mar 2012, 08:05

trosh wrote:you know you could use geany with "love ." as the execute command ... in the extracted directory, not the love of course.
Possible, but some of the features of the Eclipse heavyweight are desirable when compared to the lighter Geany. A couple of such would be Git access (whenever Maurice gets more into a flow of updating more frequently and making my update script unnecessary) or team interaction. Geany is a step up from Notepad++ and a compile script, at least.

User avatar
trosh
Posts: 1594
Joined: 03 Feb 2012, 08:36

Post » 19 Mar 2012, 08:31

I guess I tend to prefer that - but yes it doesn't bring much in itself and for me geany is the heavyweight compared to vim -_-.

Post Reply