Cultural Diffusion

Personally, I like how it is at the moment. It is very fluent and the citadels unlike cities can change their owners pretty fast, it's war for the citadels! very nice!
 
that means border citadels would break the rules of diffusion, just pop a general there and you don't have to worry about tiles being flipped...

Sure, but I think that would be a fair deal. There'd still be the military option, and IMHO that should be the only way through citadel-protected lands.
 
New version uploaded on Civfanatics

v.13 (Oct 21, 2012)
- Add penalty values for jungle, hill, forest.
- Scale culture diffusion rate with gamespeed and map size.
- Tweak diffusion rate and culture change on city capture (to prevent plots from switching back immediately).
- Add influence from buildings on foreign culture conversion: Library (0.25%/turn), University (0.5%), Public School (1%)
- Update influence from Policies on foreign culture conversion: Tradition (opener = 0.5%, finisher = 0.5%), Communism (1%)
- Bugfix : some plots were not receiving culture at all if the gained culture value was superior to the max culture calculated for the plots exchange. Now the plots are reaching max value in such cases.


v.12 (Jun 06, 2012)
- Updated : use steam workshop
- Gameplay : Separatist are not created, only converted (in Revolutions mod).
 
This is a must-have mod, thank you for sharing it!

"- Scale culture diffusion rate with gamespeed and map size."
Could you please elaborate? For example, I always play on huge maps, with the slowest speed.
 
It's relative to standard size/speed:
If you play on a larger map or on a smaller timeline, culture diffusion will be faster.
If you play on a smaller map or on a larger timeline, culture diffusion will be slower.
 
Right, but that file is not used anyway, just here for quick reference to the tag names...

Small update, may speed up things in late game:

v.14 (May 12, 2013)
- Turn OFF debug output.
 
After some tests on the Giant Earth, it seems that it's the territory conquest feature of that mod that cause the slowdown in late game, not the Revolution mod.

I'll try to post a fix this WE.
 
And here is the fix for very slow turns in late game when using the conquest tiles option...

Available on CFC Database

v.15 (May 17, 2013)
- Change the save slot for the locked plots table, speed up late game by a factor 4-5 on large maps...


For those interested, here are the AI processing time at turn ~180 on the Giant Earth map with 22 civs & 30 CS, on a i7 860@stock with 8 GB RAM, before and after the change, and also activating/deactivating some function of the Revolution component:

Spoiler :

Code:
--------------------------------------------------------
Previous version
--------------------------------------------------------

[601172.909] HSD_Main: Game year = 1760, Game turn = 177
[601172.909] HSD_Main: AI turn execution time = 423.511

[602107.028] HSD_Main: Game year = 1765, Game turn = 178
[602107.028] HSD_Main: AI turn execution time = 471.452

[602891.182] HSD_Main: Game year = 1770, Game turn = 179
[602891.182] HSD_Main: AI turn execution time = 608.912

[603705.679] HSD_Main: Game year = 1775, Game turn = 180
[603705.679] HSD_Main: AI turn execution time = 453.509

[604610.126] HSD_Main: Game year = 1780, Game turn = 181
[604610.126] HSD_Main: AI turn execution time = 507.048

[605635.115] HSD_Main: Game year = 1785, Game turn = 182
[605635.115] HSD_Main: AI turn execution time = 551.414

[606361.050] HSD_Main: Game year = 1790, Game turn = 183
[606361.050] HSD_Main: AI turn execution time = 515.628


--------------------------------------------------------
Previous version without 
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateSeparatist)
--------------------------------------------------------

[614908.875] HSD_Main: Game year = 1795, Game turn = 184
[614908.891] HSD_Main: AI turn execution time = 502.536


--------------------------------------------------------
Previous version without 
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateSeparatist)
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateCultureRelations)
--------------------------------------------------------

[617948.071] HSD_Main: Game year = 1795, Game turn = 184
[617948.071] HSD_Main: AI turn execution time = 494.543


--------------------------------------------------------
Previous version without 
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateSeparatist)
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateCultureRelations)
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateRebels)
--------------------------------------------------------

[619141.682] HSD_Main: Game year = 1795, Game turn = 184
[619141.682] HSD_Main: AI turn execution time = 490.264


--------------------------------------------------------
Previous version without 
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateSeparatist)
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateCultureRelations)
-- Revolution : GameEvents.PlayerDoTurn.Add(UpdateRebels)
-- Culture Diffusion : GameEvents.UnitSetXY.Add( UnitCaptureTile )
--------------------------------------------------------

[620181.569] HSD_Main: Game year = 1795, Game turn = 184
[620181.569] HSD_Main: AI turn execution time = 108.754


--------------------------------------------------------
Previous version without 
-- Culture Diffusion : SaveLockedMap( lockedMap )
--------------------------------------------------------

[621687.961] HSD_Main: Game year = 1795, Game turn = 184
[621687.961] HSD_Main: AI turn execution time = 134.903


--------------------------------------------------------
New version, changed save slot for locked map
--------------------------------------------------------

[626060.279] HSD_Main: Game year = 1795, Game turn = 184
[626060.279] HSD_Main: AI turn execution time = 130.371

 
Looks like no difference? Perfect, not too much mods are tested this way at all ;)
Now going to try!
 
from ~500 seconds (more than 8 minutes) to ~100 seconds (less than 2 minutes), there is a difference !
 
Er, ment difference current vanilla - current vanilla with current mod, not previous mod - current mod :)
 
ho yes. well there is a difference, 30-40 seconds used by the different mods I'm using on the 2 minutes AI turn, but it could be worse yes, as the mods use pathfinding, but Lua is relatively fast.
 
Ah, after your spoiler update in prevprev message it's easier to get.
Btw, is it G&K? In my test, G&K turn timing looked like a joke in compare to vanilla.
 
Yes, I've edited to make it clearer, and it's G+K.
 
Small update...

v.16 (May 23, 2013)
- Bugfix: Culture Relation table was not shared properly with the Revolution mod
- Balance: Lock tile flipping from culture after conquest for 15 turns (was 5)
 
Was going to test, but get lots of

attempt to call global 'load' (a nil value)
in function 'LoadCultureMap'
local cultureMap = load( pPlayer, "CultureMap" ) or {}

trace from
119: in function <[string "F:\My Documents\My Games\Sid Meier's Civiliza..."]:108>
77: in function 'UpdatePlotHelptext'

ans seems it didn't appeared in non - scenario map

P.S. Is mod at all compartable with scenario maps, which doesn't have start options?
P.P.S. Had mod worked well yersterday, now even on random map same error; maybe last version bug?
 
Can you post the full lua.log from a new game please ?
 
Ahh, sorry! No idea how i missed very first error caused by luajit.

[5264.296] Syntax Error: [string "F:\My Documents\My Games\Sid Meier's Civiliza..."]:528: invalid escape sequence near '"'
It's SaveUtils, which in previous version were replaced by me even before test.

Maybe good moment for two questions:
-Is "cashe not shared" message dangerous? Even when mods SaveUtils are same.
-which replace for r = r:gsub( "{", "\[LCB\]" ); is right:
1) r = r:gsub( "{", "%[LCB%]" );
2) r = r:gsub( "{", "[LCB]" );
I've tested only first and seems ok. But somewhere here on forum saw 2nd variant.
 
Back
Top Bottom