• Civilization 7 has been announced. For more info please check the forum here .

Where is the code that effects barbarian spawns?

Azga

Chieftain
Joined
Jun 19, 2010
Messages
15
Loving the mod but the dragons and OOS issues in game are causing me issues. I have been looking through the XML files and I can't really find code that I think is determining the barbarian spawn rate or the dragon spawn rate. Could anyone confirm which files (I am assuming its part of a SDK file perhaps?) where the code that effects this function.
 
the actual code is in CvGame::createBarbarianUnits(), but you can fully mod the spawning in XML via the tags <iAppearanceProb> and <AppearanceTechs>. If you want to disable a Unit from Spawning, just set the AppeareanceProb to -1000. There are examples like Lion Pride in Assets\Modules\Normalmodules\Animals\animal_Civ4unitinfos.xml
 
Thanks Sephi for pointing me in the right direction. I will have a go and see how it works.
 
Could we have the "ALL OUT TO GET ME" where barbs and animals are allied and don't attack each other and after so many turns (+200 to +400 random) They all rush the empires.
 
Glad to see someone is looking at this. I'm a fairly experienced player that just started with Wildmana and my biggest struggle at the start has been with those nasty little goblins. Early on, when one of those little warrior/warrior/archer stacks parks itself next to my city, I'm looking at a major production crisis as I will need to throw multiple units at them. And later it does not seem to do much good to clear the forts, since they rebuild almost immediately.

I don't have Barbarian World or Raging Barbarians turned on, so I'm guessing this is normal. In the GlobalDefineAlt file I see a series of settings that pertain to the spawn rate that are set to 100. I'm assuming I can just edit those down, but it's not clear just what I'm doing. Some say SPAWN and some SPAWNFREQ.

I see there are some values in the Handicaps file that pertain to the radius separating spawning sites and the turns when spawning occurs. I wonder whether Wildmana is using these or something else. Seems like I get about 20 turns before the map starts to fill up with goblins and animals.
 
I changed the SPAWN and SPAWNFREQ values to 50 and things are OK now. I still wonder what the difference is.
 
SPAWN is maximum barbarians density, SPAWNFREQ is how fast barbarians respawn. 50/50 is equal to tamed wilderness gameoption.
 
Top Bottom