Changing the player ship

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Changing the player ship

Post by dalek501 »

I have done a search for this but can't find if it can be done or not.

I'd like to change my cobra III for the Dark Wheel variety. Can this be done? I am currently using the shady cobra, so I removed that, leaving just the oxp for the DW cobra and it defaulted back to the standard model.

Can it be done or is it something I have to buy?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Normally you have to buy it. But you can edit the OXPs shipdata file to change the Dark Wheel Cobra so that its model replaces the built in one.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Well I don't want to cheat as such, as I assume the ship is the same other than actual look/design?

So how would I go about changing? :)
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Not really a cheat as the stats are the same as the normal version, its only the graphics that are different. In shipdata change:-

Code: Select all

<key>dwcobra3-player</key>
to

Code: Select all

<key>cobra3-player</key>
Also rename the OXP zzzzdwcobra3.oxp. This is so the the Dark Wheel player version isn't overwriten by any other OXPs. Hold down shift the first time you start up Oolite after making the change until you see the Rotating Cobra at the start screen. It should now be the Dark Wheel version.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Thank you! Thats worked a treat! :D
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Just updating this a bit...

I have now upgraded to Supercobra, and I have got a friend to change the texture for me. I have used the above procedure to make this the main ship that I see upon loading.

If I still leave the normal Supercobra 1.4.oxp in the add-ons folder I assume I will still see them flying around?

And to take it to the limit... is there anything I can do to make my "zzzzsupercobra 1.4.oxp" as a ship only available to me? I.E. It doesn't appear in the shipyards list or flown by NPC ships. Maybe it needs a unique name?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

dalek501 wrote:
And to take it to the limit... is there anything I can do to make my "zzzzsupercobra 1.4.oxp" as a ship only available to me? I.E. It doesn't appear in the shipyards list or flown by NPC ships. Maybe it needs a unique name?
The player versions are already distinctive from NPC ships in shipdata.plist. If you provide the player version with a unique player-set of textures, only you will be flying that version as oolite is currently a single-player game ;)

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

Post by Thargoid »

To appear in the shipyard list the OXP also needs a shipyard.plist file in it, in addition to the shipdata.plist. This defines (amongst other things) the ship's tech level, base cost, standard equipment, optional equipment (and therefore by implication forbidden equipment) and chance/weighting that the ship may appear in a shipyard list of a suitable planet.

So if there is no such plist, it will never appear in a shipyard. You will of course then have to hack a save game file to get it yourself though.
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

OK I'm not 100% what to do here. I have removed the shipyard plist from my zzzzsupercobra.... folder, but I dont know what to change in my save game to point to that folder as the ship I want
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

dalek501 wrote:
OK I'm not 100% what to do here. I have removed the shipyard plist from my zzzzsupercobra.... folder, but I dont know what to change in my save game to point to that folder as the ship I want
Not to the folder. In the shipdata.plist of your modified version, there's an entry for "supercobra-player" or such - copy that name over your current ship's entry in the savegame, after you made a backup copy of your savegame, just in case that you accidentally make something wrong.

Screet
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

OK, the name I had in my modified shipdata.plist was "cobra3-player" as thats what I had changed it to - ref. earlier up this thread.

I have done what you said and copied that into my saved file into 2 separate locations I think, where it said "supercobra-player".

My ship is the spinning ship at the start (which is what I wanted), it loads ok as my saved file... but... it is still appearing in the shipyard. So I assume I have done something incorrectly?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

dalek501 wrote:
OK, the name I had in my modified shipdata.plist was "cobra3-player" as thats what I had changed it to - ref. earlier up this thread.

I have done what you said and copied that into my saved file into 2 separate locations I think, where it said "supercobra-player".

My ship is the spinning ship at the start (which is what I wanted), it loads ok as my saved file... but... it is still appearing in the shipyard. So I assume I have done something incorrectly?
Isn't cobra3-player also the identical name from the original CM3 player version? If so, your ship still appears in shipyards because the original oolite provides a shipyard info for it.

If you would change to a name like cm3-private-player this should no longer happen, however then you'd see a different model upon loading oolite.

However, you could copy from oolites original shipyard the cm3-entry for your ship and change it's probability to appear to 0% in your own oxp. That way you won't have to alter oolites original files and still remove the ship from the shipyards. It's this entry which needs to be changed to 0.0:

Code: Select all

		<key>chance</key>
		<real>0.5</real>
NPCs won't fly that ship though, although it does appear in the shipyards, as there you only see the player models which NPCs cannot use.

Screet
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

If you would change to a name like cm3-private-player this should no longer happen, however then you'd see a different model upon loading oolite.
OK, I have stripped all my add-ons back until I only have the original supercobra and my revised version in the add-ons folder. I have done what you said above, and yes the ship on start up returns to a standard cobra. Thats fine. I dont mind that.

Although my ship in still in the shipyard even though I have taken out its shipyard plist.

Maybe to make this clearer I should change the name of my ship temporarily just to see if whats in the shipyard is perhaps just an original supercobra that has somehow got my texture on?

What string would I change to change the ship name? Supercobra is referred to many times in the info.plist and shipdata.plist, but changing any of them doesn't seem to change the name of the ship.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

dalek501 wrote:
Although my ship in still in the shipyard even though I have taken out its shipyard plist.
Hmmm. Since you changed the directory structure by removing other oxps, you should have a rebuild of the cache, thus it appears that your ship needs a shipyard entry with chance 0, although I fail to understand why.
dalek501 wrote:
Maybe to make this clearer I should change the name of my ship temporarily just to see if whats in the shipyard is perhaps just an original supercobra that has somehow got my texture on?
That could happen if your modified version does use the same names for model/textures as the original. Does your modified version use the same entries as the supercobra there? If so, it would override the original. In OSE the supercobra is set up like this:

Code: Select all

               <key>model</key>
                <string>supercobra.dat</string>
The file supercobra.dat then has entries for the textures to use. If those are the same for your modified version and the original, it explains everything. You will have to make a .dat file for your own version which does reference your own pngs, probably best by copying the supercobra.dat and then modifying it and referencing the modified dat model in your shipdata.

Code: Select all

TEXTURES
supercobra_top.png	256 256	0.000000 0.000000	7.936000 70.656000	39.936000 0.256000
That's all I can find from looking at these files. There's a thread about reskinning, however, it's pretty much about really big changes and contains detailed explanations:
https://bb.oolite.space/viewtopic.php?t=6054
dalek501 wrote:
What string would I change to change the ship name? Supercobra is referred to many times in the info.plist and shipdata.plist, but changing any of them doesn't seem to change the name of the ship.
The name format depends upon your plist format. It's something like on of those:

Code: Select all

		name = "Adder";
		<key>name</key>
		<string>Valrisian's Asp</string>
After making such changes, it's always necessary to force a rebuild of the cache to actually see the results.

Screet
User avatar
dalek501
Deadly
Deadly
Posts: 185
Joined: Sat May 17, 2008 10:47 am
Contact:

Post by dalek501 »

Thanks for all the help. It seems to be running OK. My ship is... um... my ship now. And the Supercobras in the shipyard are the standard ones.

Just one further thing... I notice the trade in value of my supercobra is 163078254000661.0 Credits! Is that right?! Or have I accidentally changed something?
Post Reply