How do I change a ship color?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

How do I change a ship color?

Post by RyanHoots »

I am working on an OXP for I novel I wrote, so I can fly in the ship from my book. How do you change the color of an already installed ship, in my case making a Krait green? Thanks for your help.
Image
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: How do I change a ship color?

Post by Commander McLane »

You need a different (green) texture. That's basically a picture of the ship's exterior, saved as a PNG.

As a crude approach you could take the original texture and colour it in green.
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: How do I change a ship color?

Post by RyanHoots »

Commander McLane wrote:
You need a different (green) texture. That's basically a picture of the ship's exterior, saved as a PNG.

As a crude approach you could take the original texture and colour it in green.
Thank you, I'll try that.
Image
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: How do I change a ship color?

Post by Staer9 »

Try this one:

Image
Image
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: How do I change a ship color?

Post by RyanHoots »

I need help. Nothing I try works. Here is my code so far, I am sure they are in the right directory:

shipdata.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs PropertyList-1.0.dtd">
<plist version="1.0">


<dict>
<key>anguis</key>
<dict>
<key>like_ship</key>
<string>krait</string>
<key>name</key>
<string>Anguis Primus</string>
</dict>
</dict>

demoships.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>anguis</string>
</array>
</plist>
</plist>
Image
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: How do I change a ship color?

Post by RyanHoots »

Staer9 wrote:
Try this one:

Image
Thanks, as soon as I have my .plist code I'll modify that to look like the one in the book.
Image
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: How do I change a ship color?

Post by Staer9 »

your shipdata should look like this:

Code: Select all

{
"anguis" = 
	{
	like_ship = "krait";
	roles = "anguis";	
	model = "krait_redux.dat"; 
	name = "Anguis Primus";
	materials = 
	{ 
		"krait_redux.png" = 
			{ 
			diffuse_map = "your texture name here"; 
			}; 
		};
	};
}
Image
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: How do I change a ship color?

Post by RyanHoots »

Staer9 wrote:
your shipdata should look like this:

Code: Select all

{
"anguis" = 
	{
	like_ship = "krait";
	roles = "anguis";	
	model = "krait_redux.dat"; 
	name = "Anguis Primus";
	materials = 
	{ 
		"krait_redux.png" = 
			{ 
			diffuse_map = "your texture name here"; 
			}; 
		};
	};
}
Thanks
Image
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: How do I change a ship color?

Post by RyanHoots »

Still having trouble. :( I think I need someone to do the OXPing for me. If you would like to do it, send me PM and I'll reply with the top-secret plans for the ship. :) I'll still be working on it.
Image
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: How do I change a ship color?

Post by Smivs »

Just checking you've constructed the OXP correctly.
The shipdata.plist and demoships.plist should be in the 'Config' folder, and the texture should be in the 'Textures' folder.
Assuming this Krait is going to be an NPC, it will need a role. This could be a custom role as Staer9 suggested, or one of the standard roles. If you use a custom role you will need some way of spawning the ship, such as a short script, otherwise it won't appear.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: How do I change a ship color?

Post by Staer9 »

to get this ship to appear outside a station when you launch use this code and name it "script.js" and place it in the Config folder

Code: Select all

// Configuration -- customize here 
this.role = "anguis"; 
this.count = 1; 

// Standard attributes 
this.name           = "Spawn-" + this.role; 
this.author         = "Staer9"; 
this.copyright      = "This script is hereby placed in the public domain."; 
this.version        = "1.0"; 
this.description    = "Script to make several ships of a given role appear at the witchpoint after every jump." 


this.shipWillLaunchFromStation = function() 
{ 
    system.legacy_addSystemShips(this.role, this.count, 1.0); 
    log("testscript.spawn", "Generated " + this.count + " " + this.role + " for testing purposes."); 
} 

Image
Post Reply