[MODMOD] Builds update not working properly.

Arkatakor

King
Joined
Mar 11, 2006
Messages
619
Location
Stockholm, Sweden
In the Vox Populi modmod that i'm working on, its now been several days that I have tried to solve the following updates to the builds table to no end. :

UPDATE Builds
SET PrereqTech = 'TECH_POTTERY'
WHERE Type = 'BUILD_TRADING_POST' AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_TERRAIN' AND Value= 1 );

UPDATE Builds
SET PrereqTech = 'TECH_MINING'
WHERE Type = 'BUILD_REMOVE_FOREST' AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_TERRAIN' AND Value= 1 );

UPDATE Builds
SET PrereqTech = 'TECH_BRONZE_WORKING'
WHERE Type = 'BUILD_REMOVE_JUNGLE' AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_TERRAIN' AND Value= 1 );


What happens is that:

1) The trading post is buildable with zero tech requirements even though its set to require pottery.
2) The Remove forest icon is visually displayed in the tech tree as to require mining, BUT workers can only chop forests upon researching bronze working (as in the original mod).
3) The Remove jungle icon is visually displayed in the tech tree as to require mining, BUT workers can only chop forests upon researching iron working (as in the original mod).

There are no syntax errors that i'm aware of. The file Units/Updates.SQL where the above SQL commands are residing is the last Action to be called in the mod, and the SQL commands nearly the last in the file. I did this to make sure my updates are not being overridden by something else in the modmod. Any suggestions would be greatly appreciated.
 

Attachments

  • Ancient Techs Rebalanced - Vox Populi (v 1).civ5mod
    1.6 MB · Views: 126
For the last two, you need to update this table as well:
Code:
<BuildFeatures>
        <Row>
            <BuildType>BUILD_FARM</BuildType>
            <FeatureType>FEATURE_JUNGLE</FeatureType>
            <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
            <Time>700</Time>
            <Remove>true</Remove>
        </Row>
       <!--snipped all other entries -->
</BuildFeatures>

No idea of the first issue on a quick glance
 
Thanks for that, Troller0001 - this explains why despite text searching for other references of BUILD_REMOVE_FOREST I came up with nothing. The necessary update was somewhere else. Its weird the thing with the trading post not working; I got the VP's lumber mills to work for my own tech but not the trading post. Must be something that VP has done for that particular improvement that necessitates another update.
 
The more I think about the issue with the trading post the more I believe it has something to do with my decision to delete the trapping tech (which had the trading post associated with it). There must be correlation with trapping and the trading post in VP that makes the deletion of that tech mess with the trading post prereqtech.
 
Unfortunately my theory proved incorrect; what I can confirm is this - if I don't delete trapping, the trading post is tied to trapping (I can't move it to pottery). If I delete trapping the trading post is tied to no tech and always buildable. Being that I want to make the trading post available to pottery; a quickfix would be to swap the text and icons for pottery and trapping just to get it to work. I really dont like this solution though, but for now don't have any other choice.
 
I'm trying to follow this to improve my understanding, but I'm a little confused by the context. As I understand it, there is no trading post in VP - it's replaced by the village, and the improvement associated with trapping is camp. Could you clarify a little please.
 
I'm trying to follow this to improve my understanding, but I'm a little confused by the context. As I understand it, there is no trading post in VP - it's replaced by the village, and the improvement associated with trapping is camp. Could you clarify a little please.
The trading post improvement exists in VP ('BUILD_TRADING_POST' in the Builds table). The issue is that when I change its PrereqTech from VP's 'TECH_CURRENCY' to 'TECH_POTTERY' (see query in the OP), nothing happens. The update does not go through and the trading post is seemingly no longer associated with any tech as its buildable from the getgo (no tech requirements).
 
Here's and interesting update. I went back to my original mod which is independent of any mod and tried to move BUILD_TRADING_POST in the Builds table to pottery and that didn't work either. Looks like there is something specific to that improvement that needs to be accounted for.
 
Last edited:
You really ought to ask for this thread to be moved to VP if possible, since most of us who do not mod VP really do not know how things work in VP, and what is and is not "hard-coded" therein.
 
You really ought to ask for this thread to be moved to VP if possible, since most of us who do not mod VP really do not know how things work in VP, and what is and is not "hard-coded" therein.
The point of my last reply is that the last issue that i'm facing has nothing to do with VP. My original mod is not a modmod. The BUILD_TRADING_POST tile improvement is non movable to other techs in any circumstance. It clearly has an extra dependency which I am not aware of unlike BUILD_LUMBERMILL and other improvements that I was successfully able to relocate.
 
Top Bottom