Now, whoever was the genius who implemented this, I thank you. It's a really cool feature, and I'm making good use of it. That being said: FOCKKKK YOUUU, THE HORSE YOU RODE IN ON, AND YOUR LOWER-CASE-CONVERTING WAYS.
(note: mod option names are all converted into lower case. This is not obvious to the mod developer)
edit: I actually now have no idea if the above is true or not, the was caused by a completely different mismatch of auto-recasing and case-sensitivity. My bad.
How do mod options work?
Moderator: Moderators
Re: How do mod options work?
Everything is converted to lower-case internally, IIRC.
Re: How do mod options work?
Some aspects are, like tdf and fbi tags (but not their contents), and file names, but generally no.
Re: How do mod options work?
Ok, so the strings referring to, say, CanAttack == canattack, but the string values aren't. Makes sense. Except... when referring to Unit names, you've gotta use lowercase, at least in Lua...
Re: How do mod options work?
The unit filenames are converted to lowercase...
Re: How do mod options work?
In tdf files all the tagnames and categories are all lower case, if not theyre converted to lowercase.
I think this is what is confusing argh. No such case conversion is applied to variables in lua files, and as lurker said, unitnames are lowercase.
I think this is what is confusing argh. No such case conversion is applied to variables in lua files, and as lurker said, unitnames are lowercase.
Re: How do mod options work?
The thing that threw me off unexpectedly (which I have no idea if it was the cause of the problems I was facing) was that this logic apparently also applies to the modoptions names. So my orignalOTABuildLists modoption became originalotabuildlists. This is surprising because modoptions are never converted into TDF files.
Re: How do mod options work?
They're loaded through script.txt which is read by the tdf parser.
Re: How do mod options work?
Well, luadefs do have lowercase conversion performed on them (unless you feel like commenting out that line)