Easier Player Ship Customization
Moderators: winston, another_commander
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
Easier Player Ship Customization
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).
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).
__________
______
Captain Berf
______
Captain Berf
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.
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.
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
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.
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.
__________
______
Captain Berf
______
Captain Berf
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...
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...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Not more complex, but just many more ways to achieve the goal. Yet another method:Kaks wrote:In short, the more I think about it, the more complex that 'simple' thing looks...
Create a file with name: shipdata-overrides.plist
{
Code: Select all
"shipFoo-player" =
{
materials =
{
"shipFoo_Texture.png" = { diffuse_map = "shipFoo_Texture_PLAYER.png"; };
};
};
}
edit: it is shipdata-overrides, not shipdata-override
Last edited by Eric Walch on Fri Dec 11, 2009 10:06 pm, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
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.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 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.
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
- Captain Berf
- Competent
- Posts: 55
- Joined: Mon Nov 09, 2009 1:19 am
- Location: USA, 1.5 Miles Up
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.Captain Berf wrote:STUPID QUESTION ALERT:
Is -player role already defined for every ship a player can fly/buy?
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)
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)
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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:Create a file with name: shipdata-override.plist
{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.Code: Select all
"shipFoo-player" = { materials = { "shipFoo_Texture.png" = { diffuse_map = "shipFoo_Texture_PLAYER.png"; }; }; }; }
Er, why?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.
E-mail: [email protected]
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?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Doh, I was being particularly dense. Please ignore! I just realised that all we need to do is
A no-brainer, really!
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"; };
...
};
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)