Question regarding setActivePlayer()

ArbitraryGuy

Rusty Shackleford?
Joined
Jul 11, 2003
Messages
1,076
I wanted to run this by all the programmers before I implemented this in the 19th century mod. Sorry if I'm long-winded.

In the mod, two new civilizations (Germany and Italy) may be formed from old civilizations, depending on the contitions. For example, if Prussia fulfills certain conditions for unification, it becomes Germany (with Germany flag, etc). Either Sardinia or Two Sicilies will be able to become Italy. Here's my plan for doing this, using Germany as the example:

- Have Germany (and Italy) waiting as cityless civs "in the wings" upon scenario start.
- Once Prussia fulfills the conditions, use simple python to give all her cities and units to Germany. Thus, Prussia "becomes" Germany. Of course, all old alliances, trades, relations, etc would be broken... but I'm not concerned about this. Also, Prussia would linger at the bottom of the score chart as having lost.
- Here's what I'm unsure about. Of course, if Prussia is the human player, the human player would lose (all of his/her cities now belong to another civ). But, can the setActivePlayer() function change the human player to Germany, thus allowing the human play to continue play uninterupted? Will this work? Does anybody know of any nuances to using this function or any of the other stuff described here?

Thanks for the help.
AG
 
I think the jdog5000 mod already includes player changing capabilites using the SDK that your looking for, it can both create new Civs using empty slots (rather then the waiting in the wings technique you descriped) this has the advantage of being flexible at runtime you can pick the Civ created and keep doing it ad-infinitum. It also converts player Civs as you wish, you would need to fire off an additional Python event to give other cities to the new Civ to reflect a unification of several states into one but this should be trivial. I'm not shure how the score graph is changed in the mod.
 
Impaler[WrG] said:
I think the jdog5000 mod already includes player changing capabilites using the SDK that your looking for, it can both create new Civs using empty slots (rather then the waiting in the wings technique you descriped) this has the advantage of being flexible at runtime you can pick the Civ created and keep doing it ad-infinitum. It also converts player Civs as you wish, you would need to fire off an additional Python event to give other cities to the new Civ to reflect a unification of several states into one but this should be trivial. I'm not shure how the score graph is changed in the mod.

Interesting. It looks like it's still in development, though, with the main issue being changing unit flags. Thanks for the heads up.
 
Top Bottom