jkp1187
Unindicted Co-Conspirator
Hello, all. Looks like my ban on coding for the month of December is about to end 10 days early. 
I need help to set up another random event. This one would have, as one of the possible player choices, the option to grant independence to qualifying overseas cities as a Colony. I'm hoping to keep this entirely in Python, without resort to the SDK, primarily because I'm afraid of messing with that for now.
From my research into this, I noticed two commands in the API that are in the right ballpark:
The problem is, of course, that they're both BOOLs. I was hoping, perhaps, that the first one was actually supposed to be a VOID, since I can't imagine what it's trying to discover -- seems to me that if you want to know if you can Split an Empire, you should use canSplitEmpire, right?
Anyway, assuming that my above hope is completely wrong, is there a way, using currently-exposed Python commands, that I can force colony creation? Like using a combination of:
Or am I asking for too much here?
As always, thanks in advance....

I need help to set up another random event. This one would have, as one of the possible player choices, the option to grant independence to qualifying overseas cities as a Colony. I'm hoping to keep this entirely in Python, without resort to the SDK, primarily because I'm afraid of messing with that for now.

From my research into this, I noticed two commands in the API that are in the right ballpark:
Code:
bool[B] splitEmpire([/B]int iAreaId[B])
[/B]bool [B]canSplitEmpire()[/B]
The problem is, of course, that they're both BOOLs. I was hoping, perhaps, that the first one was actually supposed to be a VOID, since I can't imagine what it's trying to discover -- seems to me that if you want to know if you can Split an Empire, you should use canSplitEmpire, right?
Anyway, assuming that my above hope is completely wrong, is there a way, using currently-exposed Python commands, that I can force colony creation? Like using a combination of:
Code:
[B]addPlayer[/B][B]([/B]int eNewPlayer, int eNewTeam, int eLeader, int eCiv[B])
acquireCity([/B]CyCity pCity, bool bConquest, bool bTrade[B])[/B]
[B]findNewCapital()
[/B]
As always, thanks in advance....