Changing Laser Color

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Captain Neebs
Above Average
Above Average
Posts: 17
Joined: Sat Aug 01, 2009 5:33 am
Location: Navy Secom

Changing Laser Color

Post 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.
Watch out Galactic associates.. Qbomb down the hatch.
Dragonfire
---- E L I T E ----
---- E L I T E ----
Posts: 503
Joined: Sat Jun 11, 2011 7:46 pm

Re: Changing Laser Color

Post 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.
User avatar
Captain Neebs
Above Average
Above Average
Posts: 17
Joined: Sat Aug 01, 2009 5:33 am
Location: Navy Secom

Re: Changing Laser Color

Post 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.
Watch out Galactic associates.. Qbomb down the hatch.
Makara
Dangerous
Dangerous
Posts: 122
Joined: Sat Oct 17, 2009 6:34 pm

Re: Changing Laser Color

Post 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.
User avatar
greenseng
Dangerous
Dangerous
Posts: 125
Joined: Thu May 19, 2011 3:27 am

Re: Changing Laser Color

Post 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.

User avatar
Captain Neebs
Above Average
Above Average
Posts: 17
Joined: Sat Aug 01, 2009 5:33 am
Location: Navy Secom

Re: Changing Laser Color

Post 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?
Watch out Galactic associates.. Qbomb down the hatch.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2409
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Changing Laser Color

Post 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
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Changing Laser Color

Post 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... :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Captain Neebs
Above Average
Above Average
Posts: 17
Joined: Sat Aug 01, 2009 5:33 am
Location: Navy Secom

Re: Changing Laser Color

Post 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 =
Watch out Galactic associates.. Qbomb down the hatch.
Makara
Dangerous
Dangerous
Posts: 122
Joined: Sat Oct 17, 2009 6:34 pm

Re: Changing Laser Color

Post 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?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6646
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Laser Color

Post 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.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Changing Laser Color

Post 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.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Changing Laser Color

Post by Thargoid »

Does the alpha value (the last of the 4 figures) make a difference when used for this type of setting?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Changing Laser Color

Post 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:
User avatar
Captain Neebs
Above Average
Above Average
Posts: 17
Joined: Sat Aug 01, 2009 5:33 am
Location: Navy Secom

Re: Changing Laser Color

Post by Captain Neebs »

Okay, I'm going to try your guys suggestions.
Watch out Galactic associates.. Qbomb down the hatch.
Post Reply