PC Mode
Org Mobile Site
Forum > Medieval 2: Total War > Medieval 2: Total War > M2:TW Modification > Mod Chat >
Thread: editing desc_settlement_mechanics.xml
nickman777 11:02 02-12-2007
can someone thoroughly explain the pip_modifier value, pip_min value, and pip_max value ? what is the <factor name="SPF_PLAGUE"> ? it has a pip_modifier value of 0.5, shouldnt it have a negative value instead, so that it decreases the population?

Reply
Foz 18:15 02-13-2007
What I've managed to figure out about the settlement_mechanics file:

1. SPF = Settlement Population Factor. Anything labeled as such is applicable to the population growth or shrinkage.
2. SOF = Settlement Order Factor. These apply to your public order.
3. SIF = Settlement Income Factor. This makes sense, following suit. It applies to income, obviously.

As for the pip stuff, I believe it describes a point system that is used to set percentage bonuses to the different items you see on the settlement details screen. 1 point typically seems to equal 0.5% influence in population, or 5% influence in order. I don't yet know exactly how the income operates. The pip_modifier seems then to be a factor each point is modified by. For example this:
Code:
- <factor name="SPF_BUILDINGS_FUN">
  <pip_modifier value="0.5" /> 
  <pip_min value="0" /> 
  <pip_max value="25" /> 
  </factor>
It's a settlement population factor, as SPF tells us. pip_modified of 0.5 seems to tell us that each point gained should be half as effective as normal, though. This would be why you'll notice that it typically takes 10% happiness (presumably this is 2 points of BUILDINGS_FUN factor) from buildings to cause a single 0.5% population growth: default dictates 1 point would give 0.5% growth, but the pip_modifier makes it take 2. Note that SPF_Farms_Built has a modifier of 1.0, which is why each farm building contributes a whole 0.5% growth bonus instead of requiring 2 points as the "fun" buildings do.

Moving forward with that definition of things, pip_min and pip_max probably just set the min and max points allowed for any given factor. It may in reality not be possible to build up 25 points of fun buildings (if I understand correctly, that'd be 12% growth bonus) but the bounds are there in case you want to place minimum or maximums that wouldn't just be arbitrary.

As for the plague not having negative numbers, this would be dealt with in the hardcode where the actual function of each factor would be defined. None of the negative ones like squalor are negative - the code would simply define them as positively or negatively influencing the total of that city stat. The xml file just exists as an easy way to balance the factors against each other to avoid messing with the hard code that can easily cause errors.

Reply
nickman777 08:23 02-14-2007
thanks for taking the time to write that. i understand it clearly now, this will help the others alike im sure :)

Reply
Up
Single Sign On provided by vBSSO