Page 1 of 1
Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 3:48 am
by ZaneWuzHere
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?
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 3:58 am
by phkb
ZaneWuzHere wrote:Anyone know where I went wrong?
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?
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 4:21 am
by ZaneWuzHere
phkb wrote: ↑Wed Sep 06, 2017 3:58 am
ZaneWuzHere wrote:Anyone know where I went wrong?
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++
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 4:39 am
by ZaneWuzHere
phkb wrote: ↑Wed Sep 06, 2017 3:58 am
ZaneWuzHere wrote:Anyone know where I went wrong?
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?
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 5:15 am
by phkb
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?
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 5:23 am
by phkb
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.
Re: Curious situation after I modified the Pulse Laser?
Posted: Wed Sep 06, 2017 6:13 am
by Norby
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.