Altering city yields from a lua script & adding a world fair like object

Skyshayde

Chieftain
Joined
Apr 14, 2016
Messages
6
I've been trying to figure out how to do this for a bit, and I haven't figured it out so far. I'm trying to design "Outpost" cities which have 3 population so you can pick up resources, but other than that do they nothing. My first thought was adding a script that runs on every turn and sets every yield to whatever is necessary to cancel out the negative effects of founding a city (5% science, 10% culture, 6 food, stuff like that). The problem is, I haven't found out how to do this. I used SetFood() which worked fine, but SetProduction() doesn't seem to work at all and I couldn't find any functions to change the other yields.

As for the second, I would like to add something to the production selection screen of the capitol which would funnel all the production to an outpost of your choice. I imagined i'd just set the production to 0 in the capital, and the production to whatever in the outpost but I can't find any way to dynamically add something like that. Is that possible?

Thanks
 
The science, culture, happiness effects on an empire for founding new cities vary with world-size. So not only do you need to figure out how to handle the additions/subtractions, etc., you need to adjust according to the worldsize currently being used. And then you need some way to determine if the city is a 'real' city or an 'outpost' city, and 'mark' it accordingly in some way so that processing is correct for both types of cities. If you allow a human to select whether a city is 'real' or 'outpost' via a pop-up UI when the city is founded (see W.Howard's how-to-make-UI pop-ups tutorials in the Tutorials & References subforum), you then have the fun of the fact that this doesn't accomplish anything for the AI -- they aren't going to 'use' pop-up UI panels.
 
The science, culture, happiness effects on an empire for founding new cities vary with world-size. So not only do you need to figure out how to handle the additions/subtractions, etc., you need to adjust according to the worldsize currently being used. And then you need some way to determine if the city is a 'real' city or an 'outpost' city, and 'mark' it accordingly in some way so that processing is correct for both types of cities. If you allow a human to select whether a city is 'real' or 'outpost' via a pop-up UI when the city is founded (see W.Howard's how-to-make-UI pop-ups tutorials in the Tutorials & References subforum), you then have the fun of the fact that this doesn't accomplish anything for the AI -- they aren't going to 'use' pop-up UI panels.

Luckily for me, I shouldn't have any trouble with determining outpost cities. All non capital cities for the civilization are outposts - I wanted a way to limit the civ to one city while still letting players get strategic resources/build ships.
 
Back
Top Bottom