City buildings or technologies as conditions for a modifier

Moderators: Pandora Moderators, Slitherine Core

Post Reply
kliyo
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 3
Joined: Fri Jan 30, 2015 6:35 pm

City buildings or technologies as conditions for a modifier

Post by kliyo »

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.
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: City buildings or technologies as conditions for a modif

Post by Xilmi »

I'd go with the advancement.
Mainly because I think both other options won't work.

It does not neceassarily have to work with forts in the enemy-territory.
Check the advancement that gives +25% power in the own territory for an example of how the condition has to look like.
kliyo
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 3
Joined: Fri Jan 30, 2015 6:35 pm

Re: City buildings or technologies as conditions for a modif

Post by kliyo »

That was a great idea, thanks! It works perfectly. Well, it applies to all forts, instead of only those in a territory controlled by a city with the defense buildings, but its way better than nothing.
Post Reply

Return to “Pandora : Modders Corner”