[GS] How would I create a modifier that do something similar to Menelik II, but instead of cities receiving yield based on faith, its based on gold?

vibach

Chieftain
Joined
May 18, 2023
Messages
6
As stated in the title, rather than having the city receiving science and culture equal to 15% of the faith output like Menelik, I would like to be able to do that with gold, so something similar to what ADJUST_CITY_YIELD_MODIFIER_FROM_FAITH do. Unfortunately that one only works with faith alone, I have attempted work around with GRANT_YIELD_BASED_ON_CURRENT_YIELD_RATE (using a one-time project similar to moon landing), but unfortunately I cant figure out how to get it to constantly trigger every turn (unless I complete the project repeatedly, in which case, is there anyway to limit it so only one city can do it at a time, not just 1 time but multiple time but only in 1 city). Thank you in advance if anyone have any idea how to implement this.
 
Last edited:
I do hate it when devs harcode such simple things. Like it wouldn't be much more difficult to add a param to say which yield to convert from. Same code. Eh...
You could write a Lua script, but again - only on a Player level, there is no method on the city level.

However, if Player level is ok then using MODIFIER_PLAYER_GRANT_YIELD_BASED_ON_CURRENT_YIELD_RATE should suffice.
Just don't set RunOnce and Permanent, leave them false. Then it should work every turn (I think).
 
Last edited:
I do hate it when when harcode such simple things. Like it wouldn't be much more difficult to add a param to say which yield to convert from. Same code. Eh...
You could write a Lua script, but again - only on a Player level, there is no method on the city level.

However, if Player level is ok then using MODIFIER_PLAYER_GRANT_YIELD_BASED_ON_CURRENT_YIELD_RATE should suffice.
Just don't set RunOnce and Permanent, leave them false. Then it should work every turn (I think).
Yeah I will take the player level one, I did leave them both at false but then that comes down to how do I limit it so only one city can spam the project and not me overlapping the effect from multiple cities. Do I just gatekeep it behind something that I can only build once (like a government plaza or something)?

Edit: Gatekeep it behind a one time district/building work without appearing for other civ as well so long as the project is set up similar to Yongle’s lijia

Also attempted to use requirement set whilst leaving those 2 off, I thought that as long as I had the tech, it will keep granting it every turn, unfortunately it only trigger when I got the tech, so if anyone knows of one that check every turn, that would be really helpful.
 
Last edited:
Top Bottom