Curious situation after I modified the Pulse Laser?

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

Moderators: winston, another_commander

Post Reply
ZaneWuzHere
Average
Average
Posts: 15
Joined: Wed Jun 24, 2015 11:03 pm

Curious situation after I modified the Pulse Laser?

Post by ZaneWuzHere » Wed Sep 06, 2017 3:48 am

So, I'm playing around with lasers, attempting to create four classes of each type of laser. I changed the default pulse laser's name to "Class One Pulse" and recharge rate to 0.8 in Microsoft Notepad, and saved it. No other modification than changing the name and recharge.

Starter Cobras are no longer equipped with lasers, nor are any available for purchase. Anyone know where I went wrong?

User avatar
phkb
Commodore
Commodore
Posts: 2317
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Curious situation after I modified the Pulse Laser?

Post by phkb » Wed Sep 06, 2017 3:58 am

ZaneWuzHere wrote:Anyone know where I went wrong?
ZaneWuzHere wrote:Microsoft Notepad
Well, there's some question over whether Notepad mangles files (I'm not sure, as I don't use it much myself), Notepad++ is usually touted as a free, much more compatible replacement.
ZaneWuzHere wrote: I changed the default pulse laser's name to "Class One Pulse" and recharge rate to 0.8
Can you post the full definition for the pulse laser as you currently have it?

ZaneWuzHere
Average
Average
Posts: 15
Joined: Wed Jun 24, 2015 11:03 pm

Re: Curious situation after I modified the Pulse Laser?

Post by ZaneWuzHere » Wed Sep 06, 2017 4:21 am

phkb wrote:
Wed Sep 06, 2017 3:58 am
ZaneWuzHere wrote:Anyone know where I went wrong?
ZaneWuzHere wrote:Microsoft Notepad
Well, there's some question over whether Notepad mangles files (I'm not sure, as I don't use it much myself), Notepad++ is usually touted as a free, much more compatible replacement.
ZaneWuzHere wrote: I changed the default pulse laser's name to "Class One Pulse" and recharge rate to 0.8
Can you post the full definition for the pulse laser as you currently have it?
1, 4000, "Class 1 Pulse",
"EQ_WEAPON_PULSE_LASER",
"Standard defense pulse energy weapon.",
{
condition_script = "oolite-conditions.js";
available_to_all = true;
weapon_info = {
range = 12500;
energy = 0.8;
damage = 15.0;
recharge_rate = 0.8;
shot_temperature = 7.0;
color = "redColor";
threat_assessment = 0.0;
};
}

I'm going to reinstall Oolite (no important saves at the moment) then try to edit through Notepad++

ZaneWuzHere
Average
Average
Posts: 15
Joined: Wed Jun 24, 2015 11:03 pm

Re: Curious situation after I modified the Pulse Laser?

Post by ZaneWuzHere » Wed Sep 06, 2017 4:39 am

phkb wrote:
Wed Sep 06, 2017 3:58 am
ZaneWuzHere wrote:Anyone know where I went wrong?
ZaneWuzHere wrote:Microsoft Notepad
Well, there's some question over whether Notepad mangles files (I'm not sure, as I don't use it much myself), Notepad++ is usually touted as a free, much more compatible replacement.
ZaneWuzHere wrote: I changed the default pulse laser's name to "Class One Pulse" and recharge rate to 0.8
Can you post the full definition for the pulse laser as you currently have it?
I reinstalled and tried to edit via Notepad++

Now my edits aren't even acknowledged. The laser is still the base pulse laser even though I've edited the equipment.plist

Do you have any ideas on this?

User avatar
phkb
Commodore
Commodore
Posts: 2317
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Curious situation after I modified the Pulse Laser?

Post by phkb » Wed Sep 06, 2017 5:15 am

Couple of things to try:
(1) Are you restarting Oolite while holding the shift key down, until the spinning Cobra appears?
(2) Are you getting any errors/messages in your "latest.log" file that might indicate something has gone wrong?

User avatar
phkb
Commodore
Commodore
Posts: 2317
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Curious situation after I modified the Pulse Laser?

Post by phkb » Wed Sep 06, 2017 5:23 am

Also, while you can edit equipment.plist in the oolite.app\Resources folder, Oolite has been designed to allow you to override the defaults with your own values. Create (if you haven't got one already) an "AddOns" folder inside the "C:\Oolite" folder. In the "AddOns" folder create another folder, this time called "MyOXP.oxp" (feel free to change "MyOXP" to whatever you prefer, but keep the extension). Inside this folder, create a folder called "Config", (yes, there are a lot of folders!) and in this folder create a file called "equipment.plist". Into this file copy the equipment items you want to override from Oolite's equipment.plist. So it looks something like this:

Code: Select all

(
	(
		3, 4000, "Class 1 Pulse Laser",
		"EQ_WEAPON_PULSE_LASER",
		"High powered pulse laser, a basic defense configuration.",
		{
			condition_script = "oolite-conditions.js";
			available_to_all = true;
			weapon_info = {
				range = 12500;
				energy = 0.8;
				damage = 15.0;
				recharge_rate = 0.8;
				shot_temperature = 7.0;
				color = "redColor";
				threat_assessment = 0.0;
			};
		}
	),
)
That should start you on your way, without having to worry about any updates to Oolite blowing all your changes away.

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2542
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Curious situation after I modified the Pulse Laser?

Post by Norby » Wed Sep 06, 2017 6:13 am

Notepad add some extra bytes into the edited text file which break the parser of Oolite. You should remove these bytes with any other editor or start a new file, if you just modify further even with a safe editor then the problem could stay within.

Post Reply