[GS] Help with custom resource and improvement.

ChrisWJN

Chieftain
Joined
Mar 12, 2019
Messages
43
Location
Canada
My custom resource doesn't actually spawn in the world, but rather can only be gained by my civ placing their unique improvement over stone. Currently I have this set up by using an entry in the ImprovementModifiers table, but it doesn't seem to be working. (The type table definitions are in another file.)

This is the code for the improvement modifier:
Code:
insert into ImprovementModifiers (ImprovementType, ModifierId)
values  ('CWJN_IMPROVEMENT_REFINERY', 'REFINERY_GRANT_MOONSTONE');

insert into Modifiers (ModifierId, ModifierType)
values  ('REFINERY_GRANT_MOONSTONE', 'MODIFIER_PLAYER_ADJUST_RESOURCE_ACCUMULATION_MODIFIER');

insert into ModifierArguments (ModifierId, Name, Value)
values  ('REFINERY_GRANT_MOONSTONE', 'Amount', '5'),
        ('REFINERY_GRANT_MOONSTONE', 'ResourceType', 'CWJN_RESOURCE_MOONSTONE');

This is the code for the resource:
Code:
insert into Resources (ResourceType, Name, ResourceClassType, Frequency)
values  ('CWJN_RESOURCE_MOONSTONE', 'LOC_CWJN_RESOURCE_MOONSTONE_NAME', 'RESOURCECLASS_STRATEGIC', '0');

insert into Resource_Consumption (ResourceType, Accumulate, BaseExtractionRate, ImprovedExtractionRate, StockpileCap)
values  ('CWJN_RESOURCE_MOONSTONE', 1, '0', '0', '100');

Doesn't work atm. Anyone have any ideas?
 
Last edited:
Doesn't work, as in nothing happens in the game? Does the resource has any UI-stuff to actually show that a player has the resource?
I can see the resource in the civlopedia, however placing the custom improvement over stone does not have the intended effect of granting +5 per turn.
 
Top Bottom