Wonder effect: +1 Housing/city

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

I'd like to change the effect of the Hanging Gardens so that it gives +1 Housing in all current and future cities.

It doesn't seem to be one of the current modifiers. and since I haven't really got that much experience with Civ6 modifiers I was wondering if anyone could help?

\Skodkim
 
Easiest way would be to use MODIFIER_PLAYER_CITIES_ADJUST_POLICY_HOUSING. It would list the bonus housing as if from a policy effect, but you can still attach the modifier to the Hanging Gardens. Worked for me.
 
Easiest way would be to use MODIFIER_PLAYER_CITIES_ADJUST_POLICY_HOUSING. It would list the bonus housing as if from a policy effect, but you can still attach the modifier to the Hanging Gardens. Worked for me.
Thanks for the reply.

Any chance you could post your code? As said I'm not familiar with the Civ6 modifiers yet - it seems there's so many "steps" you need to make them work.

\Skodkim
 
It's really quite simple.
You can do it in SQL like this:

INSERT INTO BuildingModifiers VALUES ('BUILDING_HANGING_GARDENS', 'HANGING_GARDENS_HOUSING');
INSERT INTO Modifiers(ModifierId, ModifierType) VALUES ('HANGING_GARDENS_HOUSING', 'MODIFIER_PLAYER_CITIES_ADJUST_POLICY_HOUSING');
INSERT INTO ModifierArguments(ModifierId, Name, Value) VALUES ('HANGING_GARDENS_HOUSING', 'Amount', 1);

That's really all you need. Note that this does not override the vanilla effect of the Wonder, but simply adds another effect on top.
 
Fantastic. Thank you very much!

It first seem that hard. I just need to get accustomed to the tables and the variables that are used.

\Skodkim
 
You are welcome!
I find the modifier system quite helpful and relatively easy to understand. You can do much more varied effects in Civ VI with SQL modding than you could do in Civ V, which had very static tables.

If you want to learn to use the modifiers to their full advantage, I recommend getting SQLiteSpy and reading through the Civ VI database. Seeing the modifiers in action is the best way to understand them. :)
 
Just wanted to say thanks for the help again. there was syntax error in the code above but I easily managed to sort them out. The final code, which tested and it works, looks like this:

INSERT INTO BuildingModifiers
(BuildingType, ModifierId)
VALUES ('BUILDING_HANGING_GARDENS', 'HANGING_GARDENS_HOUSING');

INSERT INTO Modifiers
(ModifierId, ModifierType)
VALUES ('HANGING_GARDENS_HOUSING', 'MODIFIER_PLAYER_CITIES_ADJUST_POLICY_HOUSING');

INSERT INTO ModifierArguments
(ModifierId, Name, Value)
VALUES ('HANGING_GARDENS_HOUSING', 'Amount', 1);

\Skodkim
 
I'm not sure it will ever make a difference and clearly it doesn't at the moment, but just in case in a later version they implement strict child-parent relationships you could put the modifiers insert first. Otherwise when they make the change the first one will error.
 
I'm not sure it will ever make a difference and clearly it doesn't at the moment, but just in case in a later version they implement strict child-parent relationships you could put the modifiers insert first. Otherwise when they make the change the first one will error.

You're right. Thanks for the help!

\Skodkim
 
Back
Top Bottom