Change player's starting points in scenario/map

lfgr

Emperor
Joined
Feb 6, 2010
Messages
1,105
Is it possible to change the player's starting plot before generating settlers and warriors?
My goal is that you can choose some civs like in a random map game and they all appear at the right place on an earth map.
I know something similiar is done in FFh (The Malakim spawn in the desert etc.), but it seem to work only with random maps... any ideas?
 
Why can't those units already be placed on the map? You simply add those to the map, you can do it in the World Builder or by editing the World Builder Save file that is your map.

Since a WBS isn't a map script there is no real point in coding anything, even if it should be possible to add some lines of Python to the Event Manager module (not the map) that will be executed at startup. Doing this will however make your scenario into a mod, which needs to be loaded before it can be launched.
Spoiler :
CyPlayer.setStartingPlot()
 
I'm sorry, the FFh thing WAS it. In CvGame::setInitialItems() I tried
Code:
CvPlot* pPlot = GC.getMap().plot( 10, 10 );
pPlot->setStartingPlot( true );
GET_PLAYER( (PlayerTypes) 0 ).setStartingPlot( pPlot, true );
and it works

@Baldyr: I tried the Event Manager, but there seem to be no event called exactly between generating map (or loading scenario) and placing units (it would be very useful for my mod).
Thanks for the reply
 
Back
Top Bottom