City buildings or technologies as conditions for a modifier
Posted: Fri Jan 30, 2015 7:05 pm
Hello there! New modder here.
I'm trying to modify the fort bonus so it scales up with the defense buildings in the city so, the better the city bunker, the better the fort bonus will be. But i'm not sure how to approach it.
First I thought adding a modifier conditioned by city buildings, but I didn't find any example of it and my tries had been...unsuccesful.
I'm not quite sure how to build the condition so it checks if the city it belongs to has defense0 building. The closest thig i found was under watercraft unit:
<cityConditions>
<coast/>
</cityConditions>
but i don't know how it works because is not listed below any <conditions> and if theres other conditions to check besides coast. Would be awesome if it could check for population or morale...
But then i had another idea. Not ideal, but close enough: Using a technology (defense0) as the condition. But then again, I coudn't find a single example and any tries i did went horribly wrong.
My last resort is to create an advancement that bumps up power values when defending in a fort. I think this one is the easiest, but it would be applied even in forts on enemy territories, which is less than ideal, but I guess it will do.
So if you have any idea how to make any of the three work, I'd appreciate the input
PD: My english is mostly self taught, so if i'm not being clear enough, tell me and i'll try harder.
I'm trying to modify the fort bonus so it scales up with the defense buildings in the city so, the better the city bunker, the better the fort bonus will be. But i'm not sure how to approach it.
First I thought adding a modifier conditioned by city buildings, but I didn't find any example of it and my tries had been...unsuccesful.
I'm not quite sure how to build the condition so it checks if the city it belongs to has defense0 building. The closest thig i found was under watercraft unit:
<cityConditions>
<coast/>
</cityConditions>
but i don't know how it works because is not listed below any <conditions> and if theres other conditions to check besides coast. Would be awesome if it could check for population or morale...
But then i had another idea. Not ideal, but close enough: Using a technology (defense0) as the condition. But then again, I coudn't find a single example and any tries i did went horribly wrong.
My last resort is to create an advancement that bumps up power values when defending in a fort. I think this one is the easiest, but it would be applied even in forts on enemy territories, which is less than ideal, but I guess it will do.
So if you have any idea how to make any of the three work, I'd appreciate the input
PD: My english is mostly self taught, so if i'm not being clear enough, tell me and i'll try harder.