Savefile cleanup (and ship_name missing?)

General discussion for players of Oolite.

Moderators: winston, another_commander

Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Savefile cleanup (and ship_name missing?)

Post by Zireael »

My commander dates all the way back to the 1.65 version of Oolite, though I'm now playing 1.75 trunk. (Copying it along with OXPs :D and changing OXPs if I have to)... When I tried to find ship_name, I did not find it. Additionally, I found some lines that refer to things I no longer have, like localhero (I don't think I even had it...). Can I somehow clean it up?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Commander McLane »

It's an important point that save-files are fully upwards-compatible.

You can safely delete most of the mission variables of missions you finished. A well-scripted mission will do that all by itself.

In many cases you will find one mission variable with a value of MISSION_COMPLETE or something like this. This one you should never delete, because it helps other missions to determine if you have already played the mission in question. It also helps that you're not offered the mission again, should you re-install it.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Savefile cleanup (and ship_name missing?)

Post by Zireael »

And the ship_name? Should it be there? If yes, why is it not there?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Commander McLane »

I guess you're confusing something. There is no ship_name, and never was.

There is ship_desc, which contains the internal identifier for your ship, and player_name, which contains your commander's name.

The name of the ship is available through the display_name property of the ship specified with ship_desc.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Savefile cleanup (and ship_name missing?)

Post by Zireael »

So what was the trick for naming your ship? Somebody mentioned ship_name just recently...
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Commander McLane »

Commander McLane wrote:
The name of the ship is available through the display_name property of the ship specified with ship_desc.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by JensAyton »

Commander McLane wrote:
I guess you're confusing something. There is no ship_name, and never was.
McLane, your absolute certainty in all things is a never-ending source of amusement. :-)

ship_name was added in 1.74, I believe. It’s used only to display the name of the ship type on the loading screen when the relevant OXP is not installed (and in Mac builds, it’s indexed by the Spotlight indexer). It isn’t used when actually loading a game.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Savefile cleanup (and ship_name missing?)

Post by Zireael »

Well, I have no ship_name in my save...
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Commander McLane »

Ahruman wrote:
ship_name was added in 1.74, I believe. It’s used only to display the name of the ship type on the loading screen when the relevant OXP is not installed (and in Mac builds, it’s indexed by the Spotlight indexer). It isn’t used when actually loading a game.
I stand corrected. :)

Code: Select all

	...
	<key>ship_desc</key>
	<string>impcourier-player</string>
	<key>ship_kills</key>
	<integer>14477</integer>
	<key>ship_name</key>
	<string>Imperial Courier</string>
	<key>ship_trade_in_factor</key>
	<integer>87</integer>
	...
Seems I should've looked into my 1.74.2 save file, not only in one from 1.65.

Still, if you want to give your ship a unique name, you have to use the name or display_name key in its shipdata.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Savefile cleanup (and ship_name missing?)

Post by Zireael »

So why not put (after MSNR) something in the savefile that allows you to name your ship without editing its shipdata? I know it's not in the original Elite, but then, buying ships was not either :D
User avatar
Alex
---- E L I T E ----
---- E L I T E ----
Posts: 770
Joined: Mon Oct 06, 2008 10:49 pm
Location: Oz. The land of some gold but mostly rust

Re: Savefile cleanup (and ship_name missing?)

Post by Alex »

I stand corrected.

Code:
...
<key>ship_desc</key>
<string>impcourier-player</string>
<key>ship_kills</key>
<integer>14477</integer>
<key>ship_name</key>
<string>Imperial Courier</string>
<key>ship_trade_in_factor</key>
<integer>87</integer>
...

Seems I should've looked into my 1.74.2 save file, not only in one from 1.65.

Still, if you want to give your ship a unique name, you have to use the name or display_name key in its shipdata.
I'm using 1.74.2 on XP.

I've been trying to do the same for my ship. It just doesn't seem work in the saved file under "ship_name".
There is a 'No Found' message using notepad++ for "display_name" in the saved game file?

Is the ship data in the add on file for the type of ship?
My ship is an oxp (caddy omeg, what a ship!).
LOOK OUT!!!
OOPS..
"Press Space" Commander
If you do not see "Press Space" more often than you want.. Your not trying!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Cody »

Alex... can you post the section from your save file that corresponds to the section above?
From ship clock.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Alex
---- E L I T E ----
---- E L I T E ----
Posts: 770
Joined: Mon Oct 06, 2008 10:49 pm
Location: Oz. The land of some gold but mostly rust

Re: Savefile cleanup (and ship_name missing?)

Post by Alex »

This is from 'saved file';

<key>ship_desc</key>
<string>caduceus-omega-player</string>
<key>ship_kills</key>
<integer>12786</integer>
<key>ship_name</key>
<string>Gertrude Oblitz</string>
<key>ship_trade_in_factor</key>
<integer>97</integer>

But on load of saved file it doesn't show as named? It doesn't show as a saved file either, not that I expected that.
Ship name still shows as caduceus omega.
The <string>Gertrude Oblitz</string>
Is the edited and saved version, alas, it doesn'r show on re-starting the game.
LOOK OUT!!!
OOPS..
"Press Space" Commander
If you do not see "Press Space" more often than you want.. Your not trying!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Savefile cleanup (and ship_name missing?)

Post by Cody »

Alex... change the name in the shipdata.plist of your player ship as well... that should do it.
Line 21 in my one.

Code: Select all

max_missiles = 4;	
	name = "Rolling Thunder";	
	missile_launch_position = "0.0 -13.7 21.06";
In fact, you don't need to change the save file at all... it picks it up when you save, after changing the shipdata.plist of your player ship.
Don't forget to restart holding shift down etc.

(Damn... I should've known that straight-off... my brain's slow this morning).
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Alex
---- E L I T E ----
---- E L I T E ----
Posts: 770
Joined: Mon Oct 06, 2008 10:49 pm
Location: Oz. The land of some gold but mostly rust

Re: Savefile cleanup (and ship_name missing?)

Post by Alex »

Ta heaps El V. Worked a treat
LOOK OUT!!!
OOPS..
"Press Space" Commander
If you do not see "Press Space" more often than you want.. Your not trying!
Post Reply