Questions Specific to Final Frontier Modding

renegadechicken

Warlord
Joined
Aug 12, 2007
Messages
227
Location
Civ II Verne Scenario
I'm creating events for Final Frontier, and I've run into a few snags (besides not being able to read Python at ALL! :) ). Here are a few questions I have that I'd really appreciate some help with!

How can I update the yields of a specific planet in a solar system based on a player's choice during an event? For example, if they choose A) their gas-giant ("YELLOW_PLANET") will receive +2:commerce: or if they choose B) their gas-giant will receive +1:food:. Is this possible?

Is there a way to trigger events when a star system is first colonized? For example, you move your Colony Ship onto a new star system and press , and an event is triggered (i.e., your colonists discover the ruins of an ancient civ, or your colonists are all wiped out and you lose the colony, etc.). If this is not possible, is there a way to trigger events only for a size 1 city?

There is (thankfully) a simple way of creating temporary happiness in a single city (or all cities) for X amount of turns in an event choice. However, I would like to create temporary unhealthiness :)yuck:) for X amount of turns. An example would be a disease that is spreading in the system. Is this possible?

Thanks for your help in advance! :)
 
I know. :( It's a bit frustrating that no one can even point me in the right direction, but I suppose I have to remember that this isn't a "everyone help Renegadechicken" forum.

If anyone even has an inkling, please, give me a hint on any of the above questions! :) I will forever be in your debt!
 
Sorry for digging up an old thread, but I managed to do this if anyone's interested.

First, create an python file called colonizeExtras.py. In the file, put: pColonizedCity = -1. Import colonizeExtras in both the event manager and the random event interface.

In the event manager onCityBuilt function, add:

aColonizationEvents = [gc.getInfoTypeForString("EVENTTRIGGER_COLONIZE_EVENT1"), ...]
colonizeExtras.pColonizedCity = pCity
colonizeExtras.bColonizationEventTriggered = False

pPlayer.trigger(random.choice(aColonizationEvents))

Now, in the random event interface file, add:
isColonizedCity(argsList):
ePlayer = argsList[1]
iCity = argsList[2]
pPlayer = gc.getPlayer(ePlayer)
pCity = pPlayer.getCity(iCity)
return colonizeExtras.pColonizedCity.getID() == pCity.getID()

Finally, for every colonization event trigger, add isColonizedCity to PythonCanDoCity.

You should now get a colonization event every time you build a city for the built city. Just keep in mind that any event triggered using python will ignore most conditions set in the xml, so you'll probably need to create custom PythonCanDo functions to do the checks.
 
Top Bottom