TreeSuccession

TreeSuccession 44

iirc (haven't looked at the code here in a while) the current (intended) malus is as follows:

Wildfire:
plot yield: -1 production
Unit in plot: -10% CS, healing blocked, vision reduced to 1

Smoke:
Behaves identical to forest for blocking vision to other plots
Unit in plot: vision reduced to 1

Note: wildfire is an improvement only, vs smoke is improvement/feature combined. The improvement adds a promotion to any unit standing on it. These are the mechanisms via which all characteristics are achieved in game.

On paper, so to speak, these strike me as relatively small -- however this under the assumption that fires are only lasting a few turns. All fire should only last a fixed number of turns -- if it's accumulating and not going away, this needs to be investigated, and I need more detail -- for now treating as isolated report from one user, cannot reproduce (I'm still finishing a game on VP 3.7.x; if something has broken in 4.x+, I have yet to detect/observe).

Anyway both happiness and food malus can likely be easily achieved if desired. I think it was more the on unit effects that there was some complaint. I could remove vision effect from the fire itself, that way smoke is the only one that does this, and users can turn off smoke if they don't like it. I am inclined to leave the rest as is, but remain open to other suggestions. For the sake of discussion, being specific is good (ie saying something should have +1 food is preferable to just saying it should generally buff food, etc.)

As I've reflected here, I think we might actually get the AI to pay attention to fires (in their owned territory only) via always having some better improvement available to them. So current implementation with fire having -1 production, if there were an invisible improvement that returned plot to 0 production, in theory they could identify to build this on top of fire. Once built it can be easily removed. Will explore this as well for next version
 
Last edited:
What if the malus was detrimental to happiness, or perhaps a negative towards to growth for the city?
Wouldn't it solve the problem? If fire added -1 to happiness? I mean this is kinda realistic, people don't want raging fires near places they are living :)
But honestly im not sure we want this to turn out to be just another "bad eventd" system :)
but every fire i've ever paid attention to has burnt out eventually
I'm playing new game, so i kinda started to more pay attention to what happens to fires and for how long, and to this point seems like every actually burn out also.
Strange, maybe actually, there is some rare issue, that sometimes causes them to stay, similarly like this "Obstructed vision" that once or twice didn't wanted to go away :)
 
Wouldn't it solve the problem? If fire added -1 to happiness? I mean this is kinda realistic, people don't want raging fires near places they are living :)
But honestly im not sure we want this to turn out to be just another "bad eventd" system :)
I don't mind it being "a little bad". I think -1 happiness is more impactful than the current -1 production? or am I wrong? i guess it depends if player is overall happy or not. Anyway this is fine -- are we suggesting no unit malus at all then?

I am now somewhat curious about how I might coax the AI to replace the "fire", having thought further of how this might be done. If they can remove it at least ~part of the time, then we will be more free to apply a greater malus.

I'm playing new game, so i kinda started to more pay attention to what happens to fires and for how long, and to this point seems like every actually burn out also.
Strange, maybe actually, there is some rare issue, that sometimes causes them to stay, similarly like this "Obstructed vision" that once or twice didn't wanted to go away :)
Yeah i'm curious if there are possibly situations that might cause it to glitch out -- I've tried to design a system that really should be fool-proof -- essentially the mod tracks the locations of all fires and checks them every turn. Existing features in VP allow mod to check the "age" of an improvement, and the code should delete any that are older than the limit. So even if this function somehow missed a turn, it should catch the fires on the next turn, unless their age is somehow being reset. On game reload, the mod will check all plots once to re-create its tracking tables.

There is a possible explanation: if mod loader order changed between save/re-load, that could cause fires to stick around like you possibly observed that one game. If that happened, you'd probably have some fires sticking around, and some functioning properly. Thats my guess for now. Just make sure you don't mess with load order between save/reloads: general advice for all modmods. When VP releases an update that is "save-game compatible" -- this statement is made under the assumption that VP is your only mod. If it isn't, you also have to make sure all mods get loaded exactly in the same order, and sometimes civ 5 will just decide to load them differently even if you click them all in the same way. Best practice is to wait for "stable" VP version before starting a long game, and just stick with that one & only update VP version between games.
 
Last edited:
On paper, so to speak, these strike me as relatively small -- however this under the assumption that fires are only lasting a few turns
Hej, i was wondering, would it be possible, to add some counter to those improvements? That would say who many turns it will stay there, or how many turns before turn into forest/jungle?
I have some tiles that have some shrublands, which i have strange feeling they are there for like 200 turns..
Normally i don't play attention, but obviously if city is near water and have barely no land, additional forest/jungle make a difference, so i didn't improve the tile, but i was waiting..
But it doesn't seems like it will change.
Like counter would kinda help in detecting anything that is not suppose to happen, like the counter stop, or go beyond zero etc..
It would also help, to manage, and plan improvements.

Hmm, just had an idea.. just wonder.. why worker cant plant those shrublands :)?
Spending some time for improvement, and waiting another 10-15 turns for turn it into forest/jungle would be a long term investment, but i guess it could be some alternative
before fertilizer.
 
There is another mod for planting trees with workers ("reforestation"), it works quite well. I'm leaning away from overlapping with that project -- this mod is intended to just be about natural lifecycle of forests. The original version of that mod (the non-vp version) used the shrubland (same graphic, different name) to indicate where a planted forest was in progress. I think the VP version may have removed that intermediate part, not sure. I am not altogether against the idea of making some worker planting alternative that respects the function of reforestation, but I'll have to review the parameters there first, and I have a few priorities above this concern... Will revisit the thought in the future, it's not a bad idea, but I'm not sure yet if it will fit here

I think the trouble you're having with these plots sticking around, if that's actually happening, is either to do with mod load order or corrupt civ files: as discussed above, if you change anything about your mod list between save/reload, you WILL break any already-existing plots with these fires or smoke or shrublands -- the fix is just don't mess with your mod list between save/reload. Alternatively, your civ install may be corrupt, and may need full check of file integrity.

As mentioned previously, you'll need to provide some kind of confirmation that plots aren't transitioning as expected, not just guesswork and hunches. The turn duration are clearly defined in the user options, you can go look there to know for sure how long any specific element should last for (smoke should be the only part that is not a fixed duration). You could then take a screenshot each turn with it still there, and once you have more screenshots than the number defined in user options, we'll have some kind of confirmation to begin to investigate -- I can't do anything with your report that you "feel like" something may be happening, that nobody else seems to experience. Even if confirmed though, it's most likely mod load order or corrupt install
 
I can't do anything with your report that you "feel like" something may be happening, that nobody else seems to experience
I must admit, that wasn't a solid investigation :D I'l behave next time :)
Thou, in my defence, i was planning to do some load/save "fun" later, but im already kinda sick every time i need to load game, since it just takes too long..
Honestly, i usually get bored around modern era, just because how long turns get..
Like you need wait 3 turns for let say military academy to finish, but it seems like forever :)

Thou, regarding mod order, i never do click anything when i already started game. The only changes im making if i finish/abandon last game, before i start new one.
 
Okay, good to know that mod load order is not the issue... My slow play through on 3.7.12 is finally approaching modern era, I will keep an eye out for any unintended behaviors like you've reported.

A UI counter, though possible, is non-trivial both to code, and possibly on its system resource impact... We'll keep this idea in our back pocket til we can confirm a case of the issue with certainty

The only other thing I can think of, is somehow the tracking tables lose track of where these plots are, or for some reason skip some plots when performing the check if they're still there, how old they are etc. I can't imagine any normal scenario that would cause this, however... if you spawn in any of this mod's features outside of the mod mechanisms (firetuner, IGE) then the mod won't know they're there until next reload, but I assume this is not what you're doing. Maybe some other mod, or obscure VP feature could somehow be spawning them? Last, maybe I overlooked something in the code the that deletes entries from the tracking table and shifts their table index values, mid-loop. I'm pretty careful usually to code around this possibility, as it was a common error I made many years ago when first learning Lua.

Again can't imagine how any of these are occurring, but VP is a big project, I don't memorize every policy or religion or ua etc... Same with other mods, if something gave bonus of "free random improvement of any type" it might pick one of these, and then the trackers will have no idea it exists til reload... Not aware of any mod that does anything like this though. So the ideal feedback on this would include some certain confirmation that it is happening, and maybe confirmation as well that you've reviewed the circumstances of the game for any unusual abilities affecting that plot, things that aren't "always on" for the whole map/every player eg tenets/UAs/ideologies/etc., specifically anything that might interact with improvements
 
Last edited:
Again can't imagine how any of these are occurring

Hej, i did check, and it turned out i had right.
Turn 226 and 361 still the same
Normally i don't care that much, but those cities lacked production, so i kinda waited with improvements until forest/jungle spawn..
This is not that crucial, since any forest spawn early game, is kinda "i was lucky event" but i guess, when Shrublands spawn, you kinda eventually have some expectations :)

1701151398909.png


1701151469625.png
 
okay interesting -- @statusquo one thing i wonder, that you probably don't know about for sure: the lower instance of shrubland was outside your borders in the first screenshot, and then inside it in the 2nd -- do you think your borders may have grown on top of these while they were in their normal growth duration? I'm not sure exactly how it might be connected, but possible the change of ownership of the tile is not being treated correctly by my code. Or, have you noticed any stuck tiles like this that for sure did not change ownership at any point in their existance? that might rule out this theory

do you just leave the game running while afk? reloading a save (with same mod load order of course) SHOULD catch all of these again, and get them moving, at least til memory fills up again or w/e else is causing this. If you notice on game reload that the stuck shrublands convert to jungles/forest, then it may just be a memory thing. On the other hand, if the reload doesn't change anything, ie they still just sit there forever, then it might not be memory issue... anyway interested in hearing what happens after reloading this game, the next time you do. If its memory issue, could try lowering growth probabilities & and durations to keep the tables as small as possible, and entries cycling out quickly, but this is not a 100% fix, just will decrease likelihood of it happening. The alternative from code perspective is maybe to loop all plots every turn, abandon the tracking tables, but this will be sloooow I think.

Does anybody know what happens to lua memory space as civ engine uses up all available memory allocation? ie here I have tables stored in memory, holding the locations of all these plots. There shouldn't really be too many entries in each table on default user options, but screenshots above look like a pretty big game with a lot of land plots, making me wonder if maybe memory filled up and just started overwriting lua tables. Or maybe I overlooked something when looping through the tables, though I think more of us would've seen this issue by now if that were the case. Will review table operations regardless, but could use more info, particularly your experience on reloading the game
 
Last edited:
do you just leave the game running while afk?
It might have happen few times. Im learning playing on Diety, so i would lie if i dont save/load from time to time.
Also, some turns near modern era, take me long time, since im kinda planning, thinking ahead where should i expand etc, etc.
I know this, since if the turn takes me unnaturally long i usually save it, and sometimes im saving over already saved file name,
so i know those turns probably took long :)
do you think your borders may have grown on top of these while they were in their normal growth duration?
Not sure what do you mean, you mean in oppose to buying the tile?
I'm not sure what do you mean "normal growth duration"? Natural culture growth and tile purchase are the only options, that i know of :)
Or, have you noticed any stuck tiles like this that for sure did not change ownership at any point in their existance?
Change owner ship do you mean, both inside or both outside while shrubland spawned?
Unfortunately not. Those two i was "actively observing" just because those two cities starved production.
How "actively" you see, by me taking notice after 140 turns :)
Or maybe even more, but i reload game at turn 150 and both shrublands were not present.

I mean i took my idea about "counter" just because when you look at some new shrubland, you cant really say how old it is,
and how long you need to wait. Like when it is on hill, and you need desperately production for your new city, you can wait for forest, or
if it is fresh, you could go with mine. But when you would know it will spawn in two turns, you could just wait and build lumber mill.

Hmm, or maybe, instead tracking and counters, it would be possible, to give some note to it, about turn he spawned?
Would be kinda easy to "do the math" by yourself, and it will be some kind of tool to estimate, when your tile will be ready to improve?

I will try to do some more reloads, to see if the upper shrubland spawn naturally inside my border, or my border grow to it.

Thou yesterday i abandoned game, and did some other testing,
Since my Rome gone out of control, and i realised city states not being able to build city walls is invitation for Rome to snowball even harder :)
So i would guess, some clicking could mess mod load order, but i should be able to find, if this shrubland spawn inside or outside.
catch all of these again, and get them moving, at least til memory fills up again or w/e else is causing this
Im guessing you are saying about how game handles its memory? not some hardware problems? Didnt noticed civ "ate" memory to be even close to my hardware capabilities :)
I have 24gb ram, and as fare i looked civ dont usually use more than 4-6
If you notice on game reload that the stuck shrublands convert to jungles/forest, then it may just be a memory thing.
Hmmm, so if i reload like lets say 30 turns later, it should convert them automatically if this is the issue?
But then again, im pretty sure i loaded game multiple times after turn 226, so if that was the case it would for sure already happened.
but screenshots above look like a pretty big game with a lot of land plots, making me wonder if maybe memory filled up
This is milae pangea map, it is any of concern :)
Standard, no oceans, low water level.
 
Last edited:
do you think your borders may have grown on top of these while they were in their normal growth duration? I'm not sure exactly how it might be connected, but possible the change of ownership of the tile is not being treated correctly by my code
I found interesting thing, upper Shrubland spawn inside the border, so this rule out one scenario
1701175924801.png
 
I'm not sure what do you mean "normal growth duration"?
I just meant during the successional growth period defined in options, like the shrubland spawns, then 2-3 turns later your borders overtake it -- but it looks like thats not the case. wouldn't make sense anyway.

Im guessing you are saying about how game handles its memory? not some hardware problems? Didnt noticed civ "ate" memory to be even close to my hardware capabilities :)
I have 24gb ram, and as fare i looked civ dont usually use more than 4-6
yeah your system is fine, anything above 8gb should be good w/ civ 5 on windows cuz its is 32-bit, and stuck with ~4GB memory allocation. I don't know for sure, but I heard when it hits the limit, it just starts overwriting things saved in memory, so sometimes it crashes if it overwrites something important, but if its not as critical then game might continue, things just might have weird behaviors. That's a distinct possibility here -- however reloading a game should make go away temporarily....

The yield icons across all plots sometimes cause graphics-related issues, not sure if it increases memory usage in a way that infringes on a lua-based mod, but I can confirm I never turn those on, and have yet to identify a stuck shrubland or fire, even on huge map w/ 43-civ. Probably not the problem though, if you're not seeing weird graphical glitches elsewhere. The most common hint is if you go in strategic view, and there are a bunch of strange icons in places they shouldn't be, then there may be some memory-related wonkiness taking place when that occurs.

But then again, im pretty sure i loaded game multiple times after turn 226, so if that was the case it would for sure already happened.
If you reloaded and they didn't go away on next turn, it implies something is going wrong with your game database, rather than memory running out or even my table loop iterations. The most common culprit is mod load order of some kind, if something got clicked off and on again by accident, even just once, that could be enough... or maybe civ 5 cache just corrupted somehow. When you reload a save, the mod will query the game database for the index of the fires/succession plots, and compare to the index of what's in each plot. So if the index changed during mod load vs whats in your savegame, it will not find them, and they'll just sit there forever as you've observed. If you're not changing anything at all ever in mod load screen, not even for a moment, and you're for sure done cache wipe before starting this game (new version of VP install does this) AND steam file integrity check, then unfortunately its just a mystery for now. You could load up firetuner and delete these improvements manually if you want, or convert them to forests, but thats the only immediate workaround. I'll keep it in mind nonetheless, next time I'm working on this one.
 
Last edited:
Tekamthi updated TreeSuccession (VP) with a new update entry:

TESTING VERSION

This version has only seen very basic testing so far (ie the simplest of firetuner scenarios for core features, some extras not yet reviewed; possible oversights both big and small).

I am publishing anyway as it will take me several weeks minimum to really log sufficient playtime on this to evaluate. On the other hand the wishful-thinker in me likes to imagine I got it all right on my first pass here. Pls help confirm everything is functioning as expected if you have time.

New features...

Read the rest of this update entry...
 
Last edited:
speculative plans/next steps for this mod (immediate focus in bold):
  1. confirm AI is able to extinguish fire successfully via the new method in v41, if necessary, adjust improvement & build attributes to encourage AI to promptly tend to fires in their territory
  2. complete forest pseudo-lifecycle via a "deadfall" plot which spawns naturally in forest, and a "slash" plot which occurs when forest/jungle is chopped -- most fire will generate off these plots rather than normal forest/jungle. Each can be pre-emptively removed by worker via a repair-like build.
  3. increase default destruction of wildfire to pillage adjacent plots, possibly ignite pillaged improvements themselves so fire poses potential for major disaster if not extinguished promptly
  4. convert worker's fire extinguish build to kill on completion
The theorycrafted objective, using default useroption values, will be a forest management mini-game for workers, where a worker may pre-emptively maintain the forests and minimize fires, or ignore forest maintenance and risk great destruction if/when a fire ignites, requiring sacrifice of the worker unit to extinguish. Sufficient useroptions will be left in-place (or added) however to ensure this can all be scaled-back to a flavor-only effect, if desired.

Feel free to theorycraft further, critique, speculate on implications of this design, etc.
 
Last edited:
maybe mod conflict but I can extinguish fire in places I shouldn't be able to
also I can build fire scar in smoke covered forest
 

Attachments

  • scar.png
    scar.png
    2.5 MB · Views: 149
Tekamthi updated TreeSuccession with a new update entry:

TEST VERSION -- bugfixes, minor adjustments

  • reworked logic for blocking builds -- speculative fix for extinguishing fires in wrong locations
  • fire should no longer spread on same turn it spawns
  • smoke should no longer move on same turn it spawns, or move and despawn
  • extinguish fire reduces worker hp to 1
  • worker must be full hp to extinguish
  • added -1 food to fire malus (-1 food and production total)

Read the rest of this update entry...
 
increase default destruction of wildfire to pillage adjacent plots
i think i will skip straight to this as the next feature addition -- this should complete a v1.0 damage model for the fires, that more or less matches the visual to the effect

question is, should it be default on or off? If on, I'll probably just do a straight rng check on adjacent tiles, so what should the default probability be? maybe 10% per roll? ie a single improvement adjacent to fire, over the fire's full 6 turn default life cycle, will have just under 50% chance to get pillaged. A fire with 6 adjacent improvements will on average pillage one of them in every full burn. AI won't know about this and will only factor extinguish decision on the build value (which I'm still observing, not sure if they're doing it yet) -- cranking this really high will create more human/ai disparity

also speculating on adding a definition for Improvement_AdjacentCityYields -- if i understand this table correctly, we should be able to have a -yield when the fire is directly adjacent to a city. -10 food reasonable?

... only affects the improvement plot -- will use other adjacent tables instead to malus -1 food from grassland/floodplain, -1 prod from plain whenever fire adjacent. Hopefully AI with fire in their territory will get the msg to extinguish
 
Last edited:
  1. When do forests grow in TreeSuccession? Do I need to do anything specific, or they grow randomly? Renaissance era, and not a single growth in any of my cities.
  2. Does this mod change how improvements are recommended and shown in UI by hovering over tiles?
    I noticed I can't see, for example Town for Great Merchant stationed in a city when hovering over tiles. I need to move him to a tile where it can build it, and then I can see it in the UI on different tiles.
    I also noticed that AIs don't improve almost any improvements at all. Nobody has any monopoly, and it's Renaissance era.
 
When do forests grow in TreeSuccession?

they grow semi-randomly adjacent to existing forest... you'll have to clarify your report, but if you've never seen any grow at all then something's gone wrong somehow, try re-downloading. have you seen any of the tile effects at all from this mod? they're somewhat rare but you'd likely encounter at least a few while exploring in most games

I also noticed that AIs don't improve almost any improvements at all.

i have noticed ai's keep workers parked in city when they could be out working -- but in my game they do build some improvements. Can we confirm this is somehow attributable to this mod? if so its gonna be a bit of a mystery given that they sometimes are building properly. I was under the impression it was more a general ai issue in recent version though i havent played enough to say for sure
 
Back
Top Bottom