Page 1 of 2

Changing Laser Color

Posted: Wed Jul 27, 2011 3:27 am
by Captain Neebs
Is it possible to change something in shipdata/shipyard to alter the color of your lasers... preferably green. Considering I attack everyone, I felt it was a reasonable color choice.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 3:30 am
by Dragonfire
Laser color is in Shipdata.plist, under laser_color. Keep in mind, however, that changes to shipdata.plist are not generally reflected in the player ship after it has been purchased.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 3:36 am
by Captain Neebs
So I just change it, and repurchase the ship... Well.. off to a tech 15 again. Or I can just upgrade my ship.. a dilemma.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 4:12 am
by Makara
Dragonfire wrote:
Laser color is in Shipdata.plist, under laser_color. Keep in mind, however, that changes to shipdata.plist are not generally reflected in the player ship after it has been purchased.
Erm.. pretty much all changes made to the shipdata.plist are implemented on the current choice of vessel as soon as the cache is rebuilt (by shift-launching Oolite). No need to buy the ship again.
I think it is only changes to the standard equipment fitted that would not show up (fairly sure that only has an effect at purchase). Certainly a laser colour change only needs the cache flushing.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 4:13 am
by greenseng
Captain Neebs wrote:
So I just change it, and repurchase the ship... Well.. off to a tech 15 again. Or I can just upgrade my ship.. a dilemma.


Dragonfire is right here, but...

I think that if you press the shift key as you start Oolite, then the color will change. (If you have changed it in shipdata.plist).
Change it to "laser_color" = "greenColor";
If it is xml then the code looks different but - probably still - greenColor.


Re: Changing Laser Color

Posted: Wed Jul 27, 2011 4:53 am
by Captain Neebs
Hmm.. I'm not finding the laser color for the fer de lance. Should it be located in Neolites.oxp or within the oolite ship data.

edit: I also tried adding the line

laser_color = "greenColor";

to the fer de lance. not happening, also tried holding down shift while start up. Any ideas?

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 6:22 am
by Wildeblood
Captain Neebs wrote:
Hmm.. I'm not finding the laser color for the fer de lance. Should it be located in Neolites.oxp or within the oolite ship data.

edit: I also tried adding the line

laser_color = "greenColor";

to the fer de lance. not happening, also tried holding down shift while start up. Any ideas?
Add it into the Neolites shipdata file, yes. Did you add it under the key "ferdelance-player", or to the NPC ferdelance? It should work.

http://wiki.alioth.net/index.php/Shipda ... aser_color

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 6:27 am
by Kaks
With both xml & openstep it's fairly easy to make nesting mistakes, or you could have put the openstep line in the middle of an xml file.

If you copy and paste the whole modified fer-de-lance section here, we should be able to figure out exactly what happened, so that's the first thing I'd do if I were in you... :)

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 6:39 am
by Captain Neebs
"ferdelance-player" =
{
aft_eject_position = "0.0 3.0 -38.0";
density = 0.5;
energy_recharge_rate = 5.5;
exhaust = ("8.8 -1.4 -12 2.0 2.0 10.0", "-8.8 -1.4 -12 2.0 2.0 10.0");
forward_weapon_type = "WEAPON_BEAM_LASER";
frangible = false;
has_scoop = yes;
hud = "hud.plist";
max_cargo = 12;
laser_color = "greenColor";
max_energy = 250;
max_flight_pitch = 1;
max_flight_roll = 3.6;
max_flight_speed = 400;
max_missiles = 2;
missile_launch_position = "0.0 -10.5 16.5";
missiles = 2;
model = "neofdlmain-smooth.dat";
name = "Fer-de-Lance";
shaders =

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 7:30 am
by Makara
Looks good to me. Did you shift-launch Oolite (i.e. holding shift all the way from clicking to launch Oolite until the spinning Cobra appears) after saving this changed shipdata.plist?

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 7:43 am
by another_commander
Captain Neebs, try this:
1. Remove all OXPs except the one that has your ship with your changes for laser color included.
2. Shift-start Oolite.
3. If the laser color has not changed, exit the game. If it has changed, go to step 5.
4. Post the file Latest.log here. On Windows, it can be found by opening the Logs folder from the Start menu Oolite group.
5. Put back the OXPs you removed from step 1. Check whether the laser color works one last time.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 10:09 am
by Eric Walch
And once you got it working, you are not limited to the pure green color. Instead of the name you can use values for colors as described here

Than the line becomes like

Code: Select all

"laser_color" = (0.2, 1, 0, 0.9);
This is a variation of green with a bit of red blended in.

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 12:23 pm
by Thargoid
Does the alpha value (the last of the 4 figures) make a difference when used for this type of setting?

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 12:45 pm
by Eric Walch
Thargoid wrote:
Does the alpha value (the last of the 4 figures) make a difference when used for this type of setting?
I remember seeing an effect when changing the value. And after just browsing the code I see that values between 0.5 and 1.0 are used unchanged and below 0.5 the whole color is re-calibrated so that it stays visible. But, the best way to know it is just trying it in game. :wink:

Re: Changing Laser Color

Posted: Wed Jul 27, 2011 4:44 pm
by Captain Neebs
Okay, I'm going to try your guys suggestions.