Quote:
Originally Posted by Stavis_L
Quote:
Originally Posted by Corporal Kindel
That's a good point, I went back and commented-out the extraneous symbols with the comment function --, but I still have the same error.
My thinking at this point is that it simply has to do with the .DM (mod) file size. I know in Java or other computing languages that comments are just ignored in compiling, but with the DM files (a text file) the comments just increase the overall size of the mod file regardless, so maybe in that sense they're just adding useless & unnecessary baggage?
|
I don't think the parser understands comments per se, and the "--" string isn't documented as a comment indicator (although it's widely used in the mods posted here.) Basically, every instance of a "#" symbol tells the parser that a command follows, and lines without "#" in them are ignored. So something like "--#mycommand" would still be interpreted as a command (although it doesn't always execute correctly, so it probably assumes the command starts a line.)
I would strongly recommend removing the extraneous "#" symbols altogether.
Also, you could try (for testing purposes) eliminating all but say the first dozen or so names from each namelist to see if the mod runs properly then. That should tell you whether it's a syntax/structure issue or a data issue.
|
Great news, Success!!
I just tested a small subset the name generating mod with just Maverni (has about 450 new names) and deleted the rest, although saved in another file.
The problem definitely has to do with size. After reducing to just Maverni names the filesize was 9kb, a significant reduction from the original 320 kb for the whole-enchilada of 50 nameTypes.
I agree with your comment. I'm going to go back and cut the extraneous comments. I think what I'll do is just have a thick "read me" type text doc, and keep the "description" comments in each of the nameType files to just the bare-bones necessary, maybe one sentence at most.
Feels pretty to good to actually create a mod & see it work. It's kind of like seeing your first "Hello World" project work
By the way, I tested the file on a small map and ran 20 turns, enough to generate 20 leaders, at least one of each leader type available to Maverni. These were the results:
3 original names generated
17 new names generated over the following letters:
A .. 1
D .. 1
F .. 1
G .. 3
H .. 1
K .. 2
L .. 1
M .. 1
O .. 2
P .. 1
T .. 1
Y .. 2
A fairly good distribution over 12 of the 26 alphabet letters.
There's definitely an upper limit to text file size needed for DM-mods to function. I just don't know exactly what this cap is. I think it's around 168kb by prior reasoning. I'm thinking that comments add unnecessarily to this size, but I don't know exactly what the relationship is between filesize, comments, & memory.
Take it easy
rk