.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #1  
Old March 12th, 2010, 05:52 AM
Burnsaber's Avatar

Burnsaber Burnsaber is offline
Colonel
 
Join Date: Jun 2007
Location: Finland
Posts: 1,617
Thanks: 179
Thanked 304 Times in 123 Posts
Burnsaber is on a distinguished road
Default Re: Out of memory: too many Mymallocs

Quote:
Originally Posted by Corporal Kindel View Post

################################################## ##############################
## Mod Overview and Description
################################################## ##############################
#modname "MoreNames Dom 3"
#version 3.06
#domversion 3.23b
#icon "diversity/CplK_name_m.tga"


################################################## ##############################
## Names, Names, Names, and more Names !
################################################## ##############################

--------------------------------------------------------------------------------

################################################## ##############################
## Whole slew of new custom names so no-one will ever get duplicated!!!
################################################## ##############################
I'm not sure, but I think that filling the .dm file with "#" sings could mess up it, because it might try to look for a command after each one.

Perhaps replace those signs with "/" or "-" characters?

Also, nice mod idea!
Reply With Quote
  #2  
Old March 12th, 2010, 11:27 AM
Corporal Kindel's Avatar

Corporal Kindel Corporal Kindel is offline
Private
 
Join Date: Jul 2009
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
Corporal Kindel is on a distinguished road
Default Re: Out of memory: too many Mymallocs

Quote:
Originally Posted by kennydicke View Post
Not sure. I don't remember why I got the error or how I fixed it. I would suggest downloading a third mod, and trying to load it without alteration. If it works, then you at least know the problem is within the two you already have. I know the late-game diversity mod works fine on my machine.

Another method would be to split your mod into several smaller mods, this helps in locating exactly where the error is. At least, that's how I was taught to find errors in programming.

I don't know that there is a limit to the number of mods you can have, but it does stand to reason. The same goes with text entries in a mod.

I don't see anything in your header that would cause a problem, but I'm relatively inexperienced. Try examining a popular mod for ideas.

You have the format down - is your intention to add names, or replace them?


Thanks for the reply. I did try to download a third mod. I downloaded the insectoid mod in addition to the diversity mod. I went back and played a few turns of a test game using these two mods and they seemed to work ok, all the new spells were present for the diversity mod .. which makes me think the problem is with my mod.

That's a good ides to split my mod. I noticed that the file size of the diversity mod and insectoid mod are each in the 42kb range, but my name-adding mod is 320 kb at this point. Hence, my mod is roughly 8 times the size of each of the other mods, even though it uses no image (.tga) files other than the one intro.

My intent is just to add names. I typically play using large maps and in my average game I have 10 guys named "Taximalgus" for example using Maverni. Just about every leader I have gets duplicated many times over, and I hate that. It's too much of a pain to rename every leader when I get to the point where I'm recruiting several of them every turn, so I figured the best thing is to add 400 to 500 leader-names per nation.

I think what I'll try and do is divide my name-generating mod by specific nations or nameType; this should reduce each nation to under 30kb in size. I did see a reference in one of the other posts that only 4 mods could be active at any time, so logically, if the mods average size is 42kb, then that would put a cap of around 168kb on functional mod-usage file size in Dominions.




Quote:
Originally Posted by Burnsaber View Post
Quote:
Originally Posted by Corporal Kindel View Post

################################################## ##############################
## Mod Overview and Description
################################################## ##############################
#modname "MoreNames Dom 3"
#version 3.06
#domversion 3.23b
#icon "diversity/CplK_name_m.tga"


################################################## ##############################
## Names, Names, Names, and more Names !
################################################## ##############################

--------------------------------------------------------------------------------

################################################## ##############################
## Whole slew of new custom names so no-one will ever get duplicated!!!
################################################## ##############################
I'm not sure, but I think that filling the .dm file with "#" sings could mess up it, because it might try to look for a command after each one.

Perhaps replace those signs with "/" or "-" characters?

Also, nice mod idea!

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 really understand the relationship to comments, space (as in dominions mod length/size), and functionality (not exceeding memory size or "mymallocs") in Dominions game-modding. Basically, it might be worthwhile to eliminate or greatly reduce comments altogether in dominions mods in the light of what I'm seeing here.

Anyway, what I'll try next is to try a reduced mod (test file) that has just one nationality, like the other guy suggested. This should reduce my file size considerably, perhaps under 30k for just Maverni, and I'll see how that works. If it works, I'll have my answer and what I'll do is break my one large name-generating-mod into 50 smaller ones (one for each of the 50 nameType categories).

Anyway thanks for the replies, I'll let everyone know how the next round of testing goes, and once I get it to work I'll create a name-generating-bundle like I mentioned above and players can just use the one name file from the bundle based on their country or nameType category. If I get it to work, I'll have to test each of the 50 files individually to be sure each works, so I still have a month or more of testing type work ahead of me once I get it to function properly.
Reply With Quote
  #3  
Old March 12th, 2010, 11:50 AM
Corporal Kindel's Avatar

Corporal Kindel Corporal Kindel is offline
Private
 
Join Date: Jul 2009
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
Corporal Kindel is on a distinguished road
Default Re: Out of memory: too many Mymallocs

By the way, does anyone have any idea which nameType category is associated with independents?

I'm thinking it's the generic male [100] but I don't know for sure.
Reply With Quote
  #4  
Old March 12th, 2010, 12:00 PM
Stavis_L's Avatar

Stavis_L Stavis_L is offline
Second Lieutenant
 
Join Date: Sep 2008
Posts: 466
Thanks: 35
Thanked 95 Times in 60 Posts
Stavis_L is on a distinguished road
Default Re: Out of memory: too many Mymallocs

Quote:
Originally Posted by Corporal Kindel View Post
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.
__________________
A nation mod I created:
Mistica: A Magocratic Police State
Micro-mods by me you might find useful:
Brainless Soulless - a fix for Life after Death/Ankh "exploit", Bogarus Scout Fix
Reply With Quote
  #5  
Old March 12th, 2010, 08:05 PM
Corporal Kindel's Avatar

Corporal Kindel Corporal Kindel is offline
Private
 
Join Date: Jul 2009
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
Corporal Kindel is on a distinguished road
Default Re: Out of memory: too many Mymallocs

Quote:
Originally Posted by Stavis_L View Post
Quote:
Originally Posted by Corporal Kindel View Post
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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:08 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.