Changing a cities growth rate

Mikhaelstan

Chieftain
Joined
Dec 10, 2016
Messages
18
I'm looking to create an ability where a cities growth rate is increased when it has an outgoing trade route to another civilization. My hang up is that I can't find a <SubjectRequirementSetId> that deals with trade routes. Does such a <SubjectRequirementSetId> exist and if not what can I do?
 
I've had a crack at your suggestion Sailor Cat however it hasen't worked, ditto with an alternative method I tried by attaching a growth modifier to Commerical Hubs. The database logs say that there is something wrong with my requirement tags. I'll post my database logs and the code I'm using in the hope some kind person will run their eye over what I've done and make suggestions.
 

Attachments

You cannot state the same thing for ModifierId in table Modifiers more than once, hence you get this Unique Constraint error
Code:
[2120692.572] [Gameplay] ERROR: UNIQUE constraint failed: Modifiers.ModifierId
[2120692.572] [Gameplay]: While executing - 'insert into Modifiers('ModifierId', 'ModifierType', 'SubjectRequirementSetId') values (?, ?, ?);'
[2120692.573] [Gameplay]: In XMLSerializer while inserting row into table insert into Modifiers('ModifierId', 'ModifierType', 'SubjectRequirementSetId') with  values (TRAIT_OUTGOING_TRADER_GROWTH, MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER, UNIT_IS_TRADER, ).
[2120692.573] [Gameplay]: In XMLSerializer while updating table Modifiers from file NewLeader_Felines.xml.
[2120692.573] [Gameplay] ERROR: UNIQUE constraint failed: Modifiers.ModifierId
This is a fatal level error for the file and the game will cease to read anything further from within the file when it encounters such an error.

A more fundamental problem with what you want to accomplish is that UNIT_TRADER is not the same thing as a trade route. A UNIT_TRADER is used to create a trade route, but the trade route is a seperate thing from the unit itself.
 
Back
Top Bottom