Page 1 of 2
Easier Player Ship Customization
Posted: Thu Dec 10, 2009 11:13 pm
by Captain Berf
Just an idea.
For any
shipFoo_Texture.png
there could exist
shipFoo_Texture_PLAYER.png
that would be loaded for just the player ship.
It shouldn't break anything currently existing.
This would end the need to modify save files (unless I'm missing some easier way).
Posted: Fri Dec 11, 2009 11:45 am
by Sendraks
I think I see what you're suggesting here, at present the process I have for creating a unique player ship texture.
1- Create new oxp folder with the player ship name e.g. blackdove.oxp
2 - Create relevant sub folders config, textures, models and insert ship files.
1 - Modify existing ship texture/create new texture.
2 - Save that, give it player ship specific name e.g. blackdove.png to the textures folder.
3 - Open the model dat file in your new oxp folder. with a text editor and change the name of the texture file associated with the model to whatever your new texture is called. Save that.
4 -Open the shipdata config file and change the ship names from whatever the stock is i.e. cobramkiii and Cobra MK III to whatever you want your personal vessel to be called, ensuring naming conventions are consistent with all other file names. Save those changes.
5 - Do the same for the shipyard file and change the settings in the shipyard file so that the ship can never be "for sale" anywhere, i.e. set TL to 99.
6 - And any other config files with name data.
7 - Change the current ship in the save game you want to have the new player ship.
8 - Everything should work.
This isn't a short process, although it is probably a bit more specific as it is for creating a player specific ship with a player specific texture and a specific name, rather than just having a Cobra MK III with a texture unique to the player.
Posted: Fri Dec 11, 2009 12:16 pm
by Captain Berf
Wow. Excellent instructions.
But, yeah, that's what I was hoping to be simplified. Also, in cases where a ship is branded: i.e. military or corporate; the player's ship would not have to carry logos or whatnot.
Again, just a suggestion.
And thanks for detailing the process.
Posted: Fri Dec 11, 2009 12:57 pm
by Kaks
Err, if you just want to change textures:
Make a copy of the original .dat file as a backup.
Open the original as a text file (
never with notepad, but you could use notepad++) & replace 'oldtexture.png' with 'newtexture.png'.
save, restart Oolite pressing shift.
This way, the actual texture conversion is really just one step...
I'll see if there's a relatively easy way to override the texture from inside Oolite.
Unfortunately, the .dat file can use any number of textures, not just one, and you can't replace 2 or 3 textures with just one new one.
In short, the more I think about it, the more complex that 'simple' thing looks...
Posted: Fri Dec 11, 2009 1:27 pm
by Eric Walch
Kaks wrote:In short, the more I think about it, the more complex that 'simple' thing looks...
Not more complex, but just many more ways to achieve the goal. Yet another method:
Create a file with name: shipdata-overrides.plist
{
Code: Select all
"shipFoo-player" =
{
materials =
{
"shipFoo_Texture.png" = { diffuse_map = "shipFoo_Texture_PLAYER.png"; };
};
};
}
And put this file in the Config folder of an oxp. Than put the file "shipFoo_Texture_PLAYER.png" in the Texture folder of that oxp. Now the specific texture file for that specific ship is replaced. When the original already has an materials directory, the originel content must be added to the above file.
edit: it is shipdata-override
s, not shipdata-override
Posted: Fri Dec 11, 2009 1:28 pm
by Captain Berf
If you change the .dat it changes the NPC's too, right? I was suggesting a simple (at least for the end user
) way to have player textures be distinct from the NPC's.
NPC=Non-Player Character/Ship
Posted: Fri Dec 11, 2009 2:12 pm
by Sendraks
Captain Berf wrote:If you change the .dat it changes the NPC's too, right? I was suggesting a simple (at least for the end user
) way to have player textures be distinct from the NPC's.
NPC=Non-Player Character/Ship
In this case you'd change the shipdata config file for this unique texture ship, so that there was player ship data only and no npc data. That way npcs could never spawn with this skin.
In so far as I can see, having a seperate oxp with it's own name and config files is the only way to have textures specific to a player only ship and not having an NPC version. However, the ship name could still be whatever the default ship name is, just the texture png, dat png and names in the config files would have unique identifiers.
Posted: Fri Dec 11, 2009 2:12 pm
by Captain Berf
Eric,
That's much easier.
Thanks.
Posted: Fri Dec 11, 2009 2:16 pm
by Captain Berf
STUPID QUESTION ALERT:
Is -player role already defined for every ship a player can fly/buy?
Posted: Fri Dec 11, 2009 2:58 pm
by Sendraks
Captain Berf wrote:STUPID QUESTION ALERT:
Is -player role already defined for every ship a player can fly/buy?
My understanding (and happy to be corrected on this) is that is has to be defined in the shipdata config, otherwise the ship cannot be purchased. There are various ways of doing this, depending on how different you want the player ship to be from the NPC versions.
Posted: Fri Dec 11, 2009 4:31 pm
by Thargoid
Player ships have the role "player" (only) in shipdata.plist. See the trunk shipdata.plist for examples. It's a special role, in the same definition that trader, pirate, police etc are roles.
They must also have an entry in shipyard.plist in order to make them playable (or at least to appear in the ship list, rather than by save-file hacking etc)
Posted: Fri Dec 11, 2009 6:35 pm
by JensAyton
Eric Walch wrote:Create a file with name: shipdata-override.plist
{
Code: Select all
"shipFoo-player" =
{
materials =
{
"shipFoo_Texture.png" = { diffuse_map = "shipFoo_Texture_PLAYER.png"; };
};
};
}
And put this file in the Config folder of an oxp. Than put the file "shipFoo_Texture_PLAYER.png" in the Texture folder of that oxp.
This works, but note that you don’t actually need to put the files in an OXP if you aren’t planning to distribute it. You can just put them loose in the AddOns folder.
Eric Walch wrote:Now the specific texture file for that specific ship is replaced. When the original already has an materials directory, the originel content must be added to the above file.
Er, why?
Posted: Fri Dec 11, 2009 7:00 pm
by Kaks
I'm probably complicating things a bit here, just as they were starting to look simple, but what if the original ship had 2 different texture files?
Posted: Fri Dec 11, 2009 7:42 pm
by JensAyton
What about it?
Posted: Fri Dec 11, 2009 9:07 pm
by Kaks
Doh, I was being particularly dense. Please ignore! I just realised that all we need to do is
Code: Select all
materials =
{
"shipFoo_Texture.png" = { diffuse_map = "shipFoo_Texture_PLAYER.png"; };
"shipFoo_Turret1_Texture.png" = { diffuse_map = "shipFoo_Turret1_Texture_PLAYER.png"; };
"shipFoo_engines_Texture.png" = { diffuse_map = "shipFoo_engines_Texture_PLAYER.png"; };
...
};
A no-brainer, really!