Help with getting a mod to work

LDiCesare

Deity
Joined
Dec 22, 2005
Messages
2,612
Location
France
So I'm writing my map script. More or less re writing the civ IV version which was a java thing before that.
I managed to get the lua file to actually work. Tested it in the SDK and reloaded it for a few hours. Got something more or less nice. Then I had it run into a wait loop that was so long that I killed the SDK, relaunched, and now I can't find my map script anywhere anymore.
This may have something to do with the fact I downloaded another map script through the mod browser. Or not. But before I did that, I had no problem re-launching the SDK and map tool and finding my script.

I also tried to create a brand new script just in case mine would be impossible to parse or something, and the new one can't be found in the list either.
Of course, there is no "File Open" menu. It would be USEFUL but no, files are found in hidden ways so I have no idea where it's looking for map scripts and how it doesn't find the one which sits right next to the other scripts. I put my script in the Steam program files data along with the defautl scripts, I put it in the Maps folder of My Documents... Can't find it.
I think of uninstalling Civ V and reinstalling, since at some point it worked.
However, I'd like to understand what the game is trying to do.
Where does it fetch data?
Also, I tried to make a mod using the mod buddy tool and, well, it's not my buddy. Can't understand what it's supposed to build nor where it's supposed to put it. Of course, I am biased, I always hated IDEs with a passion.

I am really pissed off.
Doing the same thing in Civ IV took me half a day and I had a working mod.
I've been at it for one the whole day now, and I never used python before Civ IV whereas I use lua everyday.
I think it's a real pain to get things working for Civ V. I can't even get the "buddy" (they should rename that, I'll now call it the IDE because it's definitely not my friend) to create a file that can be uploaded and managed. Build just doesn't do anything.
I put in the Content section that it was a mapscript, went Build and it still doesn't do anything.
I try to create an action for it, but obviously I can type whatever text I want in the 'Type', there's no help or hint in the browser what I'm supposed to put there.
I try to create a Content entry but...
The File path and name has to be put manually because apparently FILE MENUS are evil. It's probably better to type the file name by hand.

I quit. It's WAY TOO COMPLEX to create a mod in Civ V. Took my twice less time in Civ IV and it worked. This is really bad.
Hopefully I'll manage to calm down sometime in the future and get this to work.
 
Ok. I found the culprit.
This line:
Code:
require "math"
If you put this in a map script it won't appear in the list.
It's a bit like forbidding C code to be used because you've written
Code:
#include <stdio.h>
That is totally stupid and ********.
All the more so because it works just fine if you work your way around it: Load a script, add that line, it runs fine and it works, then quit and relaunch and it won't appear in the list even though it would run fine.
If someone has an explanation, I'd like to hear it.
Now, you can work around this problem by not using the require function but the include function.
Why? I've got no idea. However, for anyone who's been programming in lua, using requireis as natural as breathing and taking it out is REALLY DAMN ANNOYING.
 
Back
Top Bottom