So ok, just ask me the next XML tags you want to know. :thumbsup:
(Will try to explain only a little about the feature for better understanding.)

MIN_CIV_STARTING_DISTANCE
At least this distance (in plots) needs for:
colonial powers first ship on (random ? (just random?)) map

FREE_CITY_ADJACENT_CULTURE
no clue at all

SCORE_FATHER_FACTOR
just leader board (score) after all acquired FF?

CITY_YIELD_DECAY_PERCENT

MIN_CITY_YIELD_DECAY
 
While it can sometimes make sense to use the same setting for multiple features, ...
Yes, but in such cases it normally only makes sense because the features themselves are also already connected. (e.g. same Unit, Same Profession, ...) :thumbsup:

a one setting->one feature approach is more stable regarding future stability when the code is being modded.
Exactly. :thumbsup:

----

Well, I guess we should not hijack this thread with "how to design XML config dependencies for features". :mischief:
It may have helped to clarify some things and to avoid future wrong or misleading assumptions. :thumbsup:
 
MIN_CIV_STARTING_DISTANCE
Yes, that basically only affects the minimal distance between the Startign Plots of European Nations it tries to achieve for "random games".
(For Scenario Maps where players are already placed on map it does not matter of course.)

There is however no real point of messing with it. :dunno:
Because it is just the "minimal distance" and depending on the MapSize the actual distance between players calculated by the Placement Logic is normally much higher.
 
FREE_CITY_ADJACENT_CULTURE
When you found a City the plots around that City get "Player Culture".
That is the amount of Player Cutlture these plots directly get "for free" when you found the City.

When 2 Nations are close to each other the highest "Player Culture" determines the Owner.
(In first Plot circle around the City a European however always overrules a Native Player.)

For more details I would need to give you more detailed explanations about Culture mechanics in Civ4Col or Civ4BTS.
(Most likely not necessary though.)
 
SCORE_FATHER_FACTOR
This is the Score you get added for "Victory Points" for each Founding Father you acquire.
Quite simple actually. Has no real ingame effect. Just nice statistics.
 
CITY_YIELD_DECAY_PERCENT
CITY_YIELD_DECAY_PERCENT
Used do balance Yield Overflow of Storage in Warehouses.

One is a percentage value normally used for large numbers of Overflow. (Depending on how much you are above storage limit.)
The other one is the minmial absolute number that you will lose goods. (Once you are above storage limit no matter what or how much you are above storage limit.)

The higher the values the more Yields are lost each turn once your storage is full.
(Of course before you have a Custom House.)

To explain how "Overflow works" I would need to explain first other features of WTP like "Storage Capacity Rebuild" and they are complex ...
(Storage in Vanilla worked totally different than in WTP.)

Rather not mess with it, it is balaneced quite nicely.
Thos are used in an algorithm / mathematic formula to calcuate Overflow (once you store more than your storage limit).
 
Last edited:
FREE_CITY_ADJACENT_CULTURE

So if it put to 1, instead of 2 that makes field plots unaccessable (around city) before culture advances. While 3 grants instant access to the two plot radius.
Does it affects the maximal range of culture/ border (OR just the starting)?
 
So if it put to 1, instead of 2 that makes field plots unaccessable (around city) before culture advances. While 3 grants instant access to the two plot radius.
Does it affects the maximal range of culture/ border (OR just the starting)?
No, you completely misunderstand what I am trying to explain. :nope:

This is just the "Culture value" stored in the Plot (in directly adjacent Plots around the City) to determin the Owner of the Plot.
It is not directly the City Radius. The "City Radius" however gets calculated by "Total Culture of the City".

And yes, all Plots you own within City Radius become available for Plot Workers in City. (Dependign if you play 1-Plot or 2-Plot City Radius.)
But this algorithm is really much more complicated than you may expect.

Do not try to abuse this to change "City Radius", that is not what it is meant for.
This is a value meant for programmers to balance an algorithm in the DLL for Culture mechanics.

"2" is already enough so a Plot currently not owned gets declared "Yours" because you have the highest Culture value.
(If there is no other Player around the Plot other Culture values are normally 0, so your 2 is bigger.)

Any small changes from 2 to 5 or such should not matter much.
But there is really no point in messing with it.
 
Last edited:
Ok, so FREE_CITY_ADJACENT_CULTURE
adds 2 "culture points" (% ownership) to the initial 9 plots, which sorrunds the city.

It does not affect the range of borders beyond that (even if 2 plot radius used).
Except: :groucho:
If changes are no small, and it reach the threshold in culture expansion, when borders are enlarged.
But yes that would be a complete mess up. :evil:
 
The following ones mainly as is it correct or not.

MAX_TAX_RATE:
The flat % of the king`s tax rate on max difficulty.
Must be the same which is determined in handicapinfo.xml for hardest difficulty.

MIN_TAX_RATE
The flat % of the king`s tax rate on easiest difficulty.
Must be the same which is determined in handicapinfo.xml for easiest difficulty.

INCREASE_MAX_TAX_RATE
Increase of the max tax rate (which can be reached on that difficulty) – if player makes the king angry/ disappointed.
This is not the actual! That can be lesser, but king will never increase the actual tax over: MAX_TAX_RATE or MIN_TAX_RATE + INCREASE_MAX_TAX_RATE

DECREASE_MAX_TAX_RATE
If the king likes your certain actions (diplomacy with him) then probably decrease the possible flat value of your maximal tax rate (but not the actual!) on that difficulty (handicap) level.
 
MAX_TAX_RATE:

That is the absolute "maximum tax rate threshold" can become possible.
(It is currently configured as 60% of every gold amount from Sales transaction.)

This is an internal value of the "Tax Algorithm from TAC" you do not necessary see.
It is threshold that blocks the algorithm logic to increase tax rate threshold further.

Must be the same which is determined in handicapinfo.xml for hardest difficulty.
No it is not. :nono:
(The Handicap Infos are still the old Vanilla System - not really used anymore.)

The game will normally use an initial "Tax Threshold" of e.g. 40%.
So when you would already have 39% Current Tax the King could only further increase tax rate by only 1%.

However, there are certain game actions that allow the King to further raise that "Tax Threshold".
Then he could later (in endgame) also raise the Current Tax Rate higher.

MIN_TAX_RATE

Similar to above there is also absolute "minimum tax rate threshold"
It is threshold that blocks the algorithm logic to decrease tax rate threshold further. (Than original threshold.)

There are certain game actions that convoince the King to further decrease that "Tax Threshold".
Then he could later (in endgame) also not raise the Current Tax Rate higher. (Than curent threshold.)

----

Summary:

They are pretty much unrelated to what you find in Handicaps. (The original Tax System of Vanilla.)
In TAC we more or less fully replaced that original Vanilla System with a new TAC Tax Rate Sytem (and algorithm.)

----

Those values can be used to configure the (endgame) Threshold of Tax Rates that your game actions (mostly related to Diplomacy with the King) can create.

----

It would still be possible to reactive "Vanilla System" but the "TAC System" is much better.
(It considers your game actions .)
 
Those here are also used for the "tax rate threshold algorithm" I tried to explain above.

INCREASE_MAX_TAX_RATE
This is the "Max Tax increase" a single "bad" diplomacy action with the King.
The algorithm runs a random on it and will thus dermine the actual "Max Tax increase"

DECREASE_MAX_TAX_RATE
This is the "Max Tax decrease" a single "good" diplomacy action with the King.
The algorithm runs a random on it and will thus dermine the actual "Max Tax decrease"

Summary:
We are talking here about "configuration modifiers" of mathematic algorithms.
These configuration values were not really intended to be changed by players but by programmers configuring / balancing the algorithm during testphases or when other balancing changes.
It is pretty hard to "correctly guess the details" what they do, without knowing the mathematic algorithms and features using it.
 
Last edited:
Then most parts were correcty guessed overall.

There were a connection for sure, make meaningless to use different values in handicap, and now the answer is in here:
In TAC we more or less fully replaced that original Vanilla System with a new TAC Tax Rate Sytem (and algorithm.)

This feature definitelly the "Would you like to know more?" (join the army) category for that algorithm. :)
Well in a different topic in the future.
 
LBD_BASE_CHANCE_EXPERT
Is 30 = 30%
Just that value - background clear. ;)

LBD_KI_MOD_EXPERT
no clue

From the other LBD values (basically the feature is clear): actually all which LBD_MOD -> what they mod (base number)/ why also MOD values there?
Looks like again an algorithm -> so just hope it can be explained in simple way. :rolleyes:

LBD_CHANCE_MOD_FREE_CRIMINAL
and
LBD_CHANCE_MOD_FREE_SERVANT

LBD_CHANCE_MOD_REVOLT_CRIMINAL
and
LBD_CHANCE_MOD_REVOLT_SLAVE

--
LBD_MIN_EXPERIENCE_FREE_BY_COMBAT
To became free colonist, if had a military profession, and acquired this much XP?

This is a guess fully. :crazyeye:
 
"Learning by doing" is one of the mathematically most complex random based algorithms in the game. :)
(Actually "LbD" is not even one feature - it is 4 features in a small framework: LbD become Expert, LbD become Free, LbB Escape, LbD Revolt)

To extremely simplify the mathematic curves it uses (over time) for randoms that are then again used in the algorithm:
(Because there are lots of other features e.g. by Happiness and other features that each change the curve.)

The feature logic itself is simple, but the balancing of the random algorithm is not.
(The only real thing to know: The longer your worker works the higher the chance to trigger the event.)

And again, this is just the "core random chance":
(That is then later influence by the other features like Happiness.)
 

Attachments

  • Simplified Algorithm Graph.png
    Simplified Algorithm Graph.png
    9.5 KB · Views: 225
LBD_BASE_CHANCE_EXPERT
LBD_CHANCE_INCREASE_EXPERT
LBD_PRE_ROUNDS_EXPERT
...

So all MOD values (in LBD) are
Exactly. :thumbsup:
All the LbD variables are used for the random based algorithm. :)

But if you understand the algorithm you can:

1. Create lots of different random based curves as I did above
2. Create a pure deterministic "after X tunrs become expert" (no random)
3. Create a pure linear random curve

---> So the modifiers allow to completely change the algorithm from "threshold random" to "linear random" to "deterministic" behaviour.
--> If you mess enough with the balancing modifiers other features have on LbD (e.g. Happiness) you could even almost make it become "exponential" as well.
(It is basically just understanding mathematic curves ...)

And by the way:

The feature has now gotten even more complex. :) (It was requested here and easy to do.)
Just commited the enhancement to our development branch a few min ago.

It now also considers Teachers (experts for the Profession) as influence to the random curves.
And I liked that idea to also speed up "Learning by Doing" when learning from "Experts". :)
 
Last edited:
What iPriceChangeThreshold and iPriceCorrectionPercent do?
I thought of adjusting my XML, so that raw materials market should be quite viotile... or more sustainable
(I don't know yet :dunno: but having bigger understanding would help me see what can/can't be done).


Also what iEuropeVolumeAttrition means?


related : https://forums.civfanatics.com/threads/wtp-quick-questions.654780/page-3#post-15699381

There's no mention of iPriceChangeThreshold, but I think it's base value for how much goods must be sold before price changes, and it is based on price*volume not on volume alone, right? It cares how much gold was spent, not how much resources came?

Then, VolumeAttrition changes how well good can be exported/imported... But in what way? Is it that europe has 0 goods at start, and then if it has -goods, it "gains" 0(+/- VolumeAttrition)% of that negative amount? That would cause if I buy item that is meant to be sold, it's price will rise and rise, so it must not be like that. Maybe there's some base Attrition - pointed towards 0. Is it 10? 1? 100?
For example I BOUGHT 200 tabaco, europe has -200 tabaco, due to attrition (and due to it encouraging selling tabaco), europe after 1 turn has -200+(+10BASE%-7BUY%=+3%)=-194 tabaco?
On other example I SELL 200 tabaco, europe has 200 tabaco, due to attrition (and due to it encouraging selling tabaco), europe after 1 turn has 200+(-10BASE%-7SEL%=-17%)=166 tabaco?
Whale oil has -15, but in my assumption on how it works - it would just mean - it will never fall in price, if you buy it in europe..
I would "guess" this is how ~ it works, but I don't know.

Or maybe I guess improperly how attrition works? Maybe it just adds flat value of resources to trade balance, but then... It wouldn't really be scallable.. Once I exceed that flat value on regular basis, price will drop/rise indefinitely, meanwhile IRL that rise in price should increase need for good. I mean - if cotton suddenly costed 20, Europeans would start to plant it! No matter if their yields would be 70% worse than in new world.
For example I sold 200 tabaco, europe has 200 tabaco, due to attrition, it has 200+((-10-7)*someValue) tabaco next turn? For someValue = 20, it has 0 goods next turn.
For other example I boutght 200 tabaco, europe has -200 tabaco, due to attrition, it has -200+((10-7)*someValue) tabaco next turn? For someValue = 20, it has -140 goods next turn.
 
Last edited:
iPriceChangeThreshold
Correct, it is the threshold for goods traded before a price change occurs.
The amounts of every single trade are stored and compared vs. the threshold.
(Bought Yields and Sold Yields equalize each other though.)
  • Lots of goods sold --> price decreases
  • Lots of goods bought --> price increases
iPriceCorrectionPercent
This is the chance in % that the current price of the good will change in the direction of its original price again.

e.g.
  • Original Price: 10
  • Current Price: 8
With "iPriceCorrectionPercent" being 1, there is a 1% chance per turn, that the price will correct itself and become 9 (closer to original) that turn.
The higher that value is, the faster the Current Price will correct itself back to the Original Price.

iEuropeVolumeAttrition
The amounts of Goods traded are stored as data and used for caclulation towards "iPriceChangeThreshold".

e.g.
  • You traded 500 goods and threshold is 1000 --> 500 is stored as "traded amount" for that yield, still 500 until threshold is reached
  • if I Europe Volume Attrition is 2 --> 500 is reduced by 2 --> only 498 is stored as "traded amount" for that yield
  • If next tur you trade again 500 --> You have traded in total only 998, still 2 until threshold is reached

Both, negative and positive values are possible.
It depends if the good is supposed to be sold or bought by balancing.
--> Just check the XML it should become obvious.
-----------

Summary:
The trade algorithms are best understood in the source code.
(It is pretty complex to explain an algorithm just as text.)

-----------

If you want to have lots of price fluctuation:

1. Set iPriceChangeThreshold low, e.g. half of the current value
2. Set iPriceCorrectionPercent high, e.g. double of the current value
3. Set iEuropeVolumeAttrition high, e.g. double of the current value

-----------

There is also this here that connects trades in one European Harbour to others:
(It is in GlobalDefinesAlt.xml)

EUROPE_MARKET_CORRELATION_PERCENT

The higher you set it, the more the markets influence each other.


-----------

Try changing the values until you are happy.
Careful though that you do not use non-sense values.
 
Last edited:
Oh, so this is how it works. So attition is flat applier, not percentage multiplier. This is explaining a lot. I was wondering in my last game why prices tanked down and never gone decent again.
I think I need to double attrition values, because I just had 2/3 colonies exporting goods. Maybe on small map it is ok, but not on huge map! Maybe I will then also make King's forces bigger ... I want more everything! Country should be pretty big before it can declare independence and Europe should accept pretty big amount of resources! I will try out new values :)

If I understand well, if I want Europe to be "bigger", to support bigger economies - I could :
double iPriceChangeThreshold
double .. or even tripple iEuropeVolumeAttrition (I really hope it's not % multiplier, then)
leave iPriceCorrectionPercent ?
( I know, I initially asked for lot of fluctuation pattern, but I didn't knew what I wanted back than :D )

Summary:
The trade algorithms are best understood in the source code.
(It is pretty complex to explain an algorithm just as text.)
I don't know what file to look in :/ I did ctrl+f looked for Europe, Trade, I have no idea how that file can be named. Ah, it's not going to be related to Europe. Economy is not "in europe", it just is.

Oh, i'm on good path CvPlayer.cpp is correct file to look arround for values mentioned before.
 
Last edited:
Top Bottom