niklas153021
Chieftain
My overall idea is that a player gets a modifier applied for every city state he is the suzerain of when suzerain of a certain city state. Basically like Pericles' LA, but instead of a simple yield bonus with e.g. a combat modifier.
So, my problem is that I need to identify if a Player is suzeraining a specific city state. I know that you can check whether a player is a city state's suzerain when the city state is the owner of the modifier using the PLAYER_IS_SUZERAIN modifier, but there doesn't seem to be a requirement to do the same thing the other way around.
The next step was that I tried to 'mark' the player using a dummy luxury resource with 0 amenities, but the only way to check whether a player has a resource is the REQUIREMENT_PLAYER_HAS_RESOURCE_OWNED, for which you have to own the resource 'physically' i.e. you have to be accessing the resource by having an apropriate improvement on a plot in your empire with that resource. Also, I stumbled across REQUIREMENT_PLAYER_HAS_DESIRED_LUXURY, but was unsure what exactly it does. It doesn't seem like it can be used with specific arguments and is only used for AI purposes in Montezuma's Agenda/AI.
My next idea was to maybe make the player and city state allies once the player becomes suzerain of the city state and un-ally them once the suzerainity expires. Thus, I'd be able to check for an allied city state from the perspective of the player, using something like REQUIREMENT_ALLY. So this is my first question: Is there a way to make two civs allies using modifiers or lua and if yes, how?
I know that making them both allies would have the downside of having the player automatically declare war on everyone attacking the city state. So my second question is: Is there any way to determine if a player has some modifier applied to himself? Is there any way to 'mark' the player as the suzerain? I also had the idea of using PseudoYields by giving he player a certain amount of the yield when being the suzerain of the city state and resetting it to 0 otherwise, but I'm unsure whether things like REQUIREMENT_YIELD_LEAD (or what it was called) work with PseudoYields as opposed to regular yields.
I hope that this is understandable enough, if you have questions, I'll try to explain my issue further.
So, my problem is that I need to identify if a Player is suzeraining a specific city state. I know that you can check whether a player is a city state's suzerain when the city state is the owner of the modifier using the PLAYER_IS_SUZERAIN modifier, but there doesn't seem to be a requirement to do the same thing the other way around.
The next step was that I tried to 'mark' the player using a dummy luxury resource with 0 amenities, but the only way to check whether a player has a resource is the REQUIREMENT_PLAYER_HAS_RESOURCE_OWNED, for which you have to own the resource 'physically' i.e. you have to be accessing the resource by having an apropriate improvement on a plot in your empire with that resource. Also, I stumbled across REQUIREMENT_PLAYER_HAS_DESIRED_LUXURY, but was unsure what exactly it does. It doesn't seem like it can be used with specific arguments and is only used for AI purposes in Montezuma's Agenda/AI.
My next idea was to maybe make the player and city state allies once the player becomes suzerain of the city state and un-ally them once the suzerainity expires. Thus, I'd be able to check for an allied city state from the perspective of the player, using something like REQUIREMENT_ALLY. So this is my first question: Is there a way to make two civs allies using modifiers or lua and if yes, how?
I know that making them both allies would have the downside of having the player automatically declare war on everyone attacking the city state. So my second question is: Is there any way to determine if a player has some modifier applied to himself? Is there any way to 'mark' the player as the suzerain? I also had the idea of using PseudoYields by giving he player a certain amount of the yield when being the suzerain of the city state and resetting it to 0 otherwise, but I'm unsure whether things like REQUIREMENT_YIELD_LEAD (or what it was called) work with PseudoYields as opposed to regular yields.
I hope that this is understandable enough, if you have questions, I'll try to explain my issue further.