[PYTHON] How to code to collect multiple Tribal Villages?

Chiyo-chan

Chieftain
Joined
Jul 18, 2010
Messages
10
Hi,

Was wondering is it possible to code so with a certain trait (in my case "Explorer") that everytime you collect a tribal village (or "Goody hut" as some know them) you collect two (both roll for a potential different drop though so it just doesn't give the same reward twice).
I added a trait in which I hope that you receive two rewards instead of just one, but sadly I'm not certain how to make this work.

Would anyone know how to make this work please?
Thank you for any help.
 
I did actually try working from this one but it had some strange issues;
The double collection did work but it ignored the trait requirement and just applied it to all teams instead of just the ones with the listed trait. Equally, it added a whole bunch of random effects to the rewards from collecting, it added great people, items and other stuff. I tried making a exception to only gold, maps, exp and tech but it seemingly didn't work. I'm still trying to play with it to see whats what though.
 
UPDATE - i managed to get it working, thank you for the help. I tweeked and played with Platyping's version and realised it was reading from the goodinfo xml which is fine but other items are stored there, so redirected it to store these values elsewhere.
Not to sure why it was letting other teams collect double as well but it seems to work as it should now.

Thanks again.
 
Back
Top Bottom