Page 1 of 1

How do I change a ship color?

Posted: Thu May 26, 2011 3:31 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 3:42 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:06 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:11 pm
by Staer9
Try this one:

Image

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:27 pm
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>

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:28 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:41 pm
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"; 
			}; 
		};
	};
}

Re: How do I change a ship color?

Posted: Thu May 26, 2011 4:44 pm
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

Re: How do I change a ship color?

Posted: Thu May 26, 2011 5:01 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 5:11 pm
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.

Re: How do I change a ship color?

Posted: Thu May 26, 2011 5:15 pm
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."); 
}