Need some help with Natural wonders

Arilian

King
Joined
Jan 18, 2008
Messages
665
Location
Hungary
Hi,

I have tried to change the number of natural wonders in the created map.
I changed things in the base xml files before and they worked.

But if i change the number of natural wonders on a duel map from 2 to 6 it still just place 2.

Anyone have any idea why?

Unfortunately i am at work and do not have the xml file, but the name of the natural wonder tag is quite easy to find, so i do not think that i have chnaged the wrong values.

Thank you for your help.
 
The number of natural wonders to be placed is hard-coded inside AssignStartingPlots.lua, specifically the "PlaceNaturalWonders" subroutine. There's this block of code:
Code:
	local worldsizes = {
		[GameInfo.Worlds.WORLDSIZE_DUEL.ID] = 2,
		[GameInfo.Worlds.WORLDSIZE_TINY.ID] = 3,
		[GameInfo.Worlds.WORLDSIZE_SMALL.ID] = 4,
		[GameInfo.Worlds.WORLDSIZE_STANDARD.ID] = 5,
		[GameInfo.Worlds.WORLDSIZE_LARGE.ID] = 6,
		[GameInfo.Worlds.WORLDSIZE_HUGE.ID] = 7
		}

that sets this. The XML is completely ignored.

To change this in a mod, you'd have to replace AssignStartingPlots in its entirety. And that's generally a BAD idea; it's a huge routine, and changes in every patch, so you'll spend a lot of time trying to keep it up-to-date if you start modifying bits of it.

However, you CAN change this in a map script without replacing the entire AssignStartingPlots, since maps can override on a routine-by-routine basis.
 
Back
Top Bottom