TreeSuccession

TreeSuccession 44

I think after updating VP to the newest version, forests stopped to spawn. There are 2 Shrublands in my cities, but they're not progressing. Any way I can unstuck them?
 
I think after updating VP to the newest version, forests stopped to spawn. There are 2 Shrublands in my cities, but they're not progressing. Any way I can unstuck them?
you can try pasting in the following line to the sql file of v43 (as the last line, or anywhere really) -- no guarantee it doesn't throw off the db but its just a boolean change, might be okay
Code:
UPDATE CustomModOptions    SET Value = 1 WHERE Name = 'IMPROVEMENTS_EXTENSIONS';

edit: the only remaining component that I am unsure of is whether the fire spawns when the city event is triggered, for those playing with events enabled... please report any observations

One parallel request I need some help with here -- we are game-ifying some pretty tragic events in this mod; we all understand that we are not celebrating these calamities, but nonetheless, its worth a thought to those affected by such things as we find recreational enjoyment from their abstraction. I have pasted some links to relief agencies in the OP; if you are aware of any credible wildfire relief agencies you would like to see added, please share links here in the thread
 
Last edited:
I think they can't. Long long time no spawn on them, and once I removed bunch of roads, they started to grow.

Also, probably being an ally of CS that give you ability to create unique improvements (Unique City States mod) stops growing too. I tested it multiple times, whenever I lost the ally status, trees started to grow again.
 
I think they can't. Long long time no spawn on them, and once I removed bunch of roads, they started to grow.
you're probably right -- if I wrote the code I'd probably have let them, but much of that growth stuff is still the original TG code, perhaps they disabled growth on roads or i just don't remember making this decision. In any case I'll probably convert this into a useroption and default it to allowed.

Also, probably being an ally of CS that give you ability to create unique improvements (Unique City States mod) stops growing too. I tested it multiple times, whenever I lost the ally status, trees started to grow again.
Interesting... i'll need more info -- my 1st take here is its something to do with lua overrides, likely on the UCS side -- I have never looked under the hood in that mod, but speculate that it must do its own overrides to control the gating mechanism via CS allies. Have you raised this concern with that mod? any feedback/speculation? pls @ tag me if you post(ed) about it in their thread

@adan_eslavo any thoughts? UCS is rather voluminous, and the growth function involved here is not so simple -- i'm not sure how to approach debugging this conflict. Hoping you might have some guesses about what's going on....

the most likely suspect on this side is the plot eligibility check for growth, but nothing jumps out to me as conflicting with some kind of CS special ability, unless there's some nuance on UCS side that I'm not anticipating:
Spoiler :

Code:
function IsValidForestTile(plot)
    local plotType = plot:GetPlotType();
    local terrainType = plot:GetTerrainType();
    local featureType = plot:GetFeatureType();
    local improvementType = plot:GetImprovementType();
    local resourceType = plot:GetResourceType(-1);
    local bPillagedImprovement = plot:IsImprovementPillaged();
   
    if (plotType == PlotTypes.PLOT_MOUNTAIN) then
        return false;
    elseif (plotType == PlotTypes.PLOT_OCEAN) then
        return false;
    elseif plot:IsCity() then
        return false;
    elseif plot:IsBeingWorked() and not bTreeGrowthInWorkedPlots then
        return false;
    elseif (improvementType ~= -1) and not (bTreeGrowthOnPillagedWorkerImprovements and bPillagedImprovement and isWorkerImprovement(improvementType)) then
        return false;
    elseif (featureType ~= FeatureTypes.NO_FEATURE) and (featureType ~= FeatureTypes.FEATURE_RIVER) then
        return false;
    elseif (resourceType == -1) or bTreeGrowthOnResources then
        for i = 0, plot:GetNumUnits() - 1 do
            local uUnit = plot:GetUnit(i);
            if (uUnit:GetUnitClassType() == GameInfo.UnitClasses.UNITCLASS_WORKER.ID) then
                local tBuild = uUnit:GetBuildType();
                if not ((tBuild == nil) or (tBuild == -1)) then
                    return false;
                end
            end
        end
        if (terrainType == TerrainTypes.TERRAIN_GRASS) or (terrainType == TerrainTypes.TERRAIN_PLAINS) or (terrainType == TerrainTypes.TERRAIN_TUNDRA) then
            return true;
        end
    end

    return false;
end
 
Last edited:
I didn't touch any existing functions besude UI in UCS afair. Seriously, at first glance I have no idea why it conflicts.

Also, for abilities I use deafault tables and sometimes lua, but this lua is a separate file with its own stuff.

You said alliance is a problem. Maybe it's a hardcoded dll stuff?
 
Maybe it's a hardcoded dll stuff?
maybe, or i suspect somehow the combined use of lua hooks is resulting in unexpected behavior... earlier i had an override in this mod that, to the human eye reading the code, appeared to be pretty simple but unintentionally prevented AI from doing any builds while human could no problem. Fixed it, but maybe having two of the same hook running somehow creates similar effect. Its not a full explanation however, as this mod doesn't use the actual builds themselves for growth

I took a quick look (5-10 mins) at the ucs files but they're too big to find anything at-a-glance. There are also some functions here that take a lot of thought to reason out what they'd do in certain circumstances. Anyway, doesn't make intuitive sense to me that these mods would work fine w/o a CS alliance but not w/ one

We'll park this concern for now -- @Zares if you keep playing w/ this mod combo, pls update the thread with any specifics you observe. If you can help narrow down the specific circumstance (ie is it specific to a certain CS, or improvement, or maybe some other additional factor), it might help pinpoint what or where could be causing this. Right now there's not enough to go on for isolating the cause. Possible this will be one of those obscure things that persists for a while unfortunately...
 
maybe, or i suspect somehow the combined use of lua hooks is resulting in unexpected behavior... earlier i had an override in this mod that, to the human eye reading the code, appeared to be pretty simple but unintentionally prevented AI from doing any builds while human could no problem. Fixed it, but maybe having two of the same hook running somehow creates similar effect. Its not a full explanation however, as this mod doesn't use the actual builds themselves for growth

I took a quick look (5-10 mins) at the ucs files but they're too big to find anything at-a-glance. There are also some functions here that take a lot of thought to reason out what they'd do in certain circumstances. Anyway, doesn't make intuitive sense to me that these mods would work fine w/o a CS alliance but not w/ one

We'll park this concern for now -- @Zares if you keep playing w/ this mod combo, pls update the thread with any specifics you observe. If you can help narrow down the specific circumstance (ie is it specific to a certain CS, or improvement, or maybe some other additional factor), it might help pinpoint what or where could be causing this. Right now there's not enough to go on for isolating the cause. Possible this will be one of those obscure things that persists for a while unfortunately...
One thing that comes to my mind are events. UCS relies on ovents to give an ability to a major player. If Alliance is out there is a few turn delay before you lose the ability. So you can have the ability without an alliance, but for very short time.

Another thing is when you put the Embassy you also get the ability (and the event is on). You can check that first to verify if events are the culprit.
 
Does your version of ucs work with no-eui?
Probably not, but I haven't tested that. I do not play no-EUI. UI files are from EUI.
 
being an ally of CS that give you ability to create unique improvements (Unique City States mod) stops growing too. I tested it multiple times, whenever I lost the ally status, trees started to grow again.
@Zares can you specify the specific behavior you notice when these stop growing -- is there a) no successional growth plots spawning, b) successional growth spawns but does not convert to full forest/jungle.
 
theres a version were it works with gaia mod?
gaia mod should work out of the box i think? the projects are very similar in their dll code, all necessary functions should be available with gaia mods too -- did you try and it failed?

or not with vp?
there are certain hooks and lua functions that aren't available in vanilla that make all the difference here (i dont remember which mind you, just that i once considered if this could be a vanilla mod and ruled it out). Anyone that wants to try to adapt this however, is welcome to do so, I have no plans for it. Maybe someone more clever than I can figure out how to make it work
 
gaia mod should work out of the box i think? the projects are very similar in their dll code, all necessary functions should be available with gaia mods too -- did you try and it failed?


there are certain hooks and lua functions that aren't available in vanilla that make all the difference here (i dont remember which mind you, just that i once considered if this could be a vanilla mod and ruled it out). Anyone that wants to try to adapt this however, is welcome to do so, I have no plans for it. Maybe someone more clever than I can figure out how to make it work
yeah i failed :(
with gaia and sapiens expansion
 
okay there have been some column name changes, idk which but its probably not more than 1 or 2 -- i'll look at what can be done sometime -- for now you might try one of the older versions prior to the 4.17 era of VP, thats when the columns changed

the version on steam used to work with gaia mods, i havent updated it with recent work
 
Back
Top Bottom