[GS] Attempting to Assign Negative Housing to Buildings

Sytharin

Chieftain
Joined
Mar 28, 2020
Messages
3
Hey all, ran into what looks like a roadblock and am looking for alternates. I found a reference that another modder was having difficulty with this type of thing on improvements over on this thread, but didn't find a wrap up to that discussion.

Attempt: Assign a negative housing value to power plants. XML seemed the most successful, but didn't apply any change (seems like the floor of the function is 0 as per the thread, but haven't confirmed).

Code:
<GameData>
    <Buildings>
        <Update>
            <Where BuildingType="BUILDING_COAL_POWER_PLANT"/>
            <Set Housing="-7"/>
        </Update>
    </Buildings>
</GameData>

This code showed up in the Civpedia and the production menu, but no change in housing was applied (my guess is it went to 0)

Code:
UPDATE Buildings SET   Housing=-7,   WHERE BuildingType='BUILDING_COAL_POWER_PLANT';

No change registered shown in Civpedia or build menu, but no crash

Code:
INSERT OR IGNORE INTO Buildings
       (BuildingType,                           Housing)
VALUES   ('BUILDING_COAL_POWER_PLANT',           -7),

No change registered, no crash, same as above

Since power plants can be upgraded and downgraded, I was hoping to solve this on a building level, but I am open to other ways if anyone knows of any

Thank you for your time and ideas!
 
I can't think of any direct way to assist you, but as a possible alternative: what about a run-once population reduction via EFFECT_ADJUST_CITY_POPULATION? just kill off a portion of the population by 1 or 2, and make the city catch up to where it was.
 
Thank you for confirming and the population idea. I realized I don't need to worry about tallying up the negatives if I put them on both the building and the project to upgrade/downgrade them. Now I'm considering a food % debuff, I'll post findings when I work it out
 
Top Bottom