Page 1 of 1

Changing current system via script?

Posted: Sat Mar 19, 2011 9:16 am
by Capt. Murphy
Hi,

Can any of the scripting guru's or developers advise if it's possible to change the current system via script - i.e. by changing the planet_number or similar.

Warning - I'm very much a newbie to scripting.

I'm trying to make a small OXP that when loaded will make a new 'Jameson' spawn in a different system (and possibly not in the main station) and with a different ship,equipment,credits (and backstory but that's something else). I can do the 2nd bit, but am stuck on the first.

Eventual aim would be to have a set of OXP's for various new Jameson scenarios for peeps to choose from (e.g. rogue cop - starts as a fugitive in a stolen viper , trader - inherits the family python from dad, escaped slave - starts in a rockhermit in a stolen sidewinder etc etc....)

I've tried this little code snippet as a script.plist which doesn't work (I didn't expect it to work to be honest cos I don't think set: planet_number is valid).........

Code: Select all

{
alt_start_up = (
	{
	conditions = (
	"gui_screen_string equal GUI_SCREEN_INTRO2"
	);
	do = ( 
	"set: planet_number 8"
	);
	}
	)
}

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 9:23 am
by another_commander
I don't think you need a script, all of what you are asking can be done by using edited savefiles, except spawining the player on non-main stations.

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 9:28 am
by Capt. Murphy
Thanks another_commander,

I can work with the edited game method, just thought a scripted method if possible would be a little more elegant.

Edit to add:

Have the developers ever considered making the settings for the starting commander as a .plist to allow easy modification?

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 11:15 am
by JensAyton
Capt. Murphy wrote:
Have the developers ever considered making the settings for the starting commander as a .plist to allow easy modification?
They are. It’s called a saved game. :-)

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 9:43 pm
by Commander McLane
Ahruman wrote:
Capt. Murphy wrote:
Have the developers ever considered making the settings for the starting commander as a .plist to allow easy modification?
They are. It’s called a saved game. :-)
However, as we are throwing around ideas for Oolite 2 anyway, allowing a new game to start from other systems than Lave would be a suggestion as well. It could even be randomized.

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 9:48 pm
by JensAyton
Commander McLane wrote:
However, as we are throwing around ideas for Oolite 2 anyway, allowing a new game to start from other systems than Lave would be a suggestion as well. It could even be randomized.
I was thinking more along the lines of explicit support for saved game templates, but allowing them to be bundled with a script that could set up starting parameters (including system) would be an idea. Very low priority, though.

Re: Changing current system via script?

Posted: Sat Mar 19, 2011 10:11 pm
by Commander McLane
Ahruman wrote:
Commander McLane wrote:
However, as we are throwing around ideas for Oolite 2 anyway, allowing a new game to start from other systems than Lave would be a suggestion as well. It could even be randomized.
I was thinking more along the lines of explicit support for saved game templates,
That would be a good idea, too.

Some OXPs have come with save games in the past, for instance Tianve.oxp. But of course that would also give you the ship with which the save game was created, and everything else as well.

Having some sort of save-game-overrides (analogous to the other overrides files) which would allow an OXP to ship only certain aspects of a saved game, while leaving the other parts of the player's current save-game intact, would be very nice.