Aldollin
Chieftain
- Joined
- Mar 7, 2017
- Messages
- 87
so for a custom civ i made some lua code that gives them a chance to "discover" resources when building a mine on a tile that does not have a resource, 2 problems showed up that i cant figure out:
1. The resources are added to the map(and you can see them just fine) , they affect the tiles yield correctly, but otherwise the game does not seem to recognize them, i.e. you dont get the resources to trade, you dont get the amenities, and strategic resources like iron wont work for units that require them
2. Modifers that affect plot yields and require a resource to be present do only apply to these newly added resources after reloading the game.
i used the vanilla requirementsets
PLOT_HAS_STRATEGIC_MINE_REQUIREMENTS
PLOT_HAS_BONUS_MINE_REQUIREMENTS
PLOT_HAS_LUXURY_MINE_REQUIREMENTS
as well as all possible combinations of
RunOnce and Permanent
and none of them worked
in the lua script i used ResourceBuilder.SetResourceType(pPlot, resource, 1)
is there anything i am missing?
can anyone tell/guess what the problem/mistake could be?(and maybe even how to fix it)
1. The resources are added to the map(and you can see them just fine) , they affect the tiles yield correctly, but otherwise the game does not seem to recognize them, i.e. you dont get the resources to trade, you dont get the amenities, and strategic resources like iron wont work for units that require them
2. Modifers that affect plot yields and require a resource to be present do only apply to these newly added resources after reloading the game.
i used the vanilla requirementsets
PLOT_HAS_STRATEGIC_MINE_REQUIREMENTS
PLOT_HAS_BONUS_MINE_REQUIREMENTS
PLOT_HAS_LUXURY_MINE_REQUIREMENTS
as well as all possible combinations of
RunOnce and Permanent
and none of them worked
in the lua script i used ResourceBuilder.SetResourceType(pPlot, resource, 1)
is there anything i am missing?
can anyone tell/guess what the problem/mistake could be?(and maybe even how to fix it)