Load from anywhere

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Nemoricus
---- E L I T E ----
---- E L I T E ----
Posts: 388
Joined: Mon May 18, 2009 8:51 pm

Load from anywhere

Post by Nemoricus »

Many, many times I've wanted to reload an old save in mid-flight, but have found myself unable to do so. While I know that closing out Oolite will let you get to the load screen, it takes time for Oolite to start up again.
Dream as if you'll live forever
Live as if you'll die tomorrow
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

It is a bit complicated loading a game mid-flight. However, from the next version onwards you will be able to restart a game mid-flight, so it will be possible to load your game as soon as you reappear at Lave.
User avatar
Nemoricus
---- E L I T E ----
---- E L I T E ----
Posts: 388
Joined: Mon May 18, 2009 8:51 pm

Post by Nemoricus »

Ah, thank you. This was just something that was annoying me.

Glad to know it's already being worked on.
Dream as if you'll live forever
Live as if you'll die tomorrow
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

another_commander wrote:
It is a bit complicated loading a game mid-flight. However, from the next version onwards you will be able to restart a game mid-flight, so it will be possible to load your game as soon as you reappear at Lave.
Great. The fasted solution I sometime use is just kill myself by flying into a heavy object.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Personally I find player.ship.explode() or player.ship.remove() on the JS console is quite quick and effective, if not quite so satisfying.

And yes, I have been occasionally known to type one or other by accident by omitting a strategic .target from the middle of them ;)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
And yes, I have been occasionally known to type one or other by accident by omitting a strategic .target from the middle of them ;)
:lol:
Thargoid, a hint. Define a macro in your console by typing:

Code: Select all

:setM kill = player.ship.target.explode()
After that you only need to type:

Code: Select all

:kill
and the macro will be executed. No risk of fatal typos.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

My system never seems to save such macros from session to session. How should you get them to be saved, and where are they recorded?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
My system never seems to save such macros from session to session. How should you get them to be saved, and where are they recorded?
Hmm, maybe it is a mac-only feature. On mac they are stored in the personal library area.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

In the Debug.oxp/Config folder, open in an editor the file debugConfig.plist. Inside the section named macros add this

Code: Select all

"killTarget"	= "player.ship.target.explode()";
Save, start debug console, start Oolite with Shift, select target and type

Code: Select all

:killTarget
in the console.

Boom.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Thanks. It's the one thing I'd never figured out with the console, how to save the macros when defined.

Would it be possible for the next version to either have defined macros saved automatically, or to have a command to do so in the JS console?

Just for those who are maybe less adept at config hacking. Plus I guess this info (with perhaps a different example macro) might be worth adding into the wiki somewhere?
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Isnt it better to have the macros defined in a file which you control, rather than to have the console decide what to save?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Cmdr James wrote:
better would be to have a file with them defined in, then you can decide what macros you want, and work on them easily
Which is pretty much what debugConfig.plist does, right? Or are you referring to something more dedicated to the task?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I was meaning to have a debug console command to save macros that are currently created. At the moment it's less than obvious that you need to edit the file to "save" your commands permanently, and whilst you can create macros on the fly in the console when you close down they are lost. That for me wouldn't be expected behaviour, I would expect either the console to automatically update the plist to reflect what has been created, or for there to be a "save macro" command to trigger such an update perhaps.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
I was meaning to have a debug console command to save macros that are currently created. At the moment it's less than obvious that you need to edit the file to "save" your commands permanently.....
It was probably intended to save them as on the mac I just define them and they are available on the next startup. Probably implementation on the windows side is more problematic or just overlooked as the first console release was mac only.

EDIT:
With me on the mac it is written out into oolites cache file, were also all other oolite stuff is automatically cached on quitting. Data Cache.plist--> Root --> caches --> dictionaries --> 51 --> key: Config/debugConfig.plist merge:basic
Post Reply