Page 2 of 3
Re: Cloaking Device
Posted: Tue Jul 07, 2015 6:48 pm
by Duggan
Many thanks cim,
I'll give it a go and let you know how it goes
.....Edit..It works a treat thank you cim, It feels like I got my old cloaking device back.
Re: Cloaking Device
Posted: Fri Jul 10, 2015 12:47 pm
by Duggan
While I edited my above posting , I came to understand that an edited post may not reach it's target audience.
That is to say, those wishing a cloaking device akin to the 1.80 version (more cloakier) will be pleased to note that cim's suggested edit to the cloaking device equipment script above works effectively.
Thanks again to cim for the help
Re: Cloaking Device
Posted: Sat Aug 01, 2015 4:05 pm
by davcefai
I have made cim's suggested modification but it has had a negligible effect on the game. It is better not to activate the cloaking device because all it seems to do is drain energy.
My ship is a DTT War Lance. No amount of twisting and turning will break any ship's lock on me.
Is there another mod I can try before I revert to v1.80?
Thanks in advance.
Re: Cloaking Device
Posted: Sat Aug 01, 2015 4:19 pm
by another_commander
Have you restarted the game with Shift held down after applying cim's change?
Re: Cloaking Device
Posted: Sat Aug 01, 2015 6:31 pm
by davcefai
I must have forgotten to but now things are worse.
Note: I am running the Linux 32 bit version.
Cloaking Device still appears in the equipment list.
The Cloaking Device Entry in the saved game is still there:
Code: Select all
<key>EQ_CLOAKING_DEVICE</key>
<integer>1</integer>
However the Cloaking device:
1. Does not activate when I press "0"
2. Does not come up when I cycle through primable equipment using Shift-n
3. Does not appear in the "Manage Primable Equipment" screen (F4 when docked)
Reverting to the original oolite-cloaking-device-equipment.js file did not restore the previous behaviour.
I looked in keyconfig.plist and found:
Code: Select all
// now primable equipment; old key works for compatibility
//key_cloaking_device = "0";
I uncommented the key but to no avail. (and used shift while loading)
Can anybody help please?
Re: Cloaking Device
Posted: Sat Aug 01, 2015 7:26 pm
by Layne
Does your latest log file show any error messages that indicate the cloaking device script is not loading?
Also after reverting to the original script, did you again hold down the shift key while starting the game to let Oolite know it has to re-cache all your script information?
Re: Cloaking Device
Posted: Sat Aug 01, 2015 9:00 pm
by Duggan
1. Does not activate when I press "0"
2. Does not come up when I cycle through primable equipment using Shift-n
3. Does not appear in the "Manage Primable Equipment" screen (F4 when docked)
I have to wonder whether this is exclusive to the 32 bit Windows version as I have encountered no such problems using the 64 bit windows version.
Re: Cloaking Device
Posted: Sat Aug 01, 2015 9:15 pm
by davcefai
I shot myself in the foot!
I used "#" as a comment symbol instead of "/*"
This caused an "illegal character" error in the javascript.
Fixed it and it seems that the cloaking device is now behaving like v 1.80.
Many thanks for the help,
Re: Cloaking Device
Posted: Tue Aug 11, 2015 6:29 am
by phkb
Seeing as how this is a recent thread relating to the Cloaking device, I thought I'd ask the question here. Once you have the cloaking device, if you purchase a new ship, it is possible to get it again? Or are you basically walking away from the cloaking device when moving ships?
Re: Cloaking Device
Posted: Tue Aug 11, 2015 7:10 am
by davcefai
The cloaking device moves with you. Try it. (You can always revert to the saved game).
Re: Cloaking Device
Posted: Tue Aug 11, 2015 8:55 am
by phkb
Wha...?! D'oh! I should've looked first!
Thanks for the heads up! I can continue my sleath-mode tactics in my new Python Class Cruiser!
Re: Cloaking Device
Posted: Sun Jun 19, 2016 3:23 pm
by Princess_Zenda
Hello all!
I'm still having issues with my cloaking device.
I have changed the file "oolite-cloaking-device-equipment" to the following as suggested above.
/*
oolite-cloaking-device-equipment.js
Equipment script for cloaking device.
Oolite
Copyright © 2004-2013 Giles C Williams and contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
*/
/*jslint white: true, undef: true, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
/*global worldScripts*/
"use strict";
this.name = "Cloaking Device";
this.author = "cim";
this.copyright = "© 2008-2013 the Oolite team.";
this.activated = function()
{
player.ship.isCloaked = !player.ship.isCloaked;
if (player.ship.isCloaked) { // if just activated the cloak
var ships = system.filteredEntities(this, function(s) { return (s.target == player.ship); }, player.ship, 25600); // find nearby ships targeting the player
for (var i=0;i<ships.length;i++) {
ships.target = null; // and clear their targets
}
}
}
I also hold down "shift" while loading as instructed.
The cloak does not activate at all now...can anyone help a gal get her cloaking device working again the same way it was for years?
Would really like to switch to 1.82 but this is a deal breaker for me.
Any help appreciated.
Donna XX
Re: Cloaking Device
Posted: Sun Jun 19, 2016 4:01 pm
by another_commander
Princess_Zenda wrote:Hello all!
I'm still having issues with my cloaking device.
I have changed the file "oolite-cloaking-device-equipment" to the following as suggested above.
[snip]
I also hold down "shift" while loading as instructed.
The cloak does not activate at all now...can anyone help a gal get her cloaking device working again the same way it was for years?
Would really like to switch to 1.82 but this is a deal breaker for me.
Any help appreciated.
Donna XX
The script, as you posted it, works fine for me in the trunk version. Is there anything in the log when you try to activate the device? Also make sure to name the file "oolite-cloaking-device-equipment.js" (with the js extension) and, if on Windows, you are not using Notepad for editing - use Wordpad or Notepad++ or similar instead.
Re: Cloaking Device
Posted: Sun Jun 19, 2016 4:15 pm
by Cody
Welcome aboard, Commander!
Re: Cloaking Device
Posted: Sun Jun 19, 2016 4:16 pm
by Princess_Zenda
Thanks for the reply Another Commander.
I am getting the following message in the log file
17:12:25.425 [shipData.load.begin]: Loading ship data.
17:12:26.310 [script.javaScript.exception.illegalCharacter]: ***** JavaScript exception (oolite-cloaking-device-equipment.js.anon-script): SyntaxError: illegal character
17:12:26.310 [script.javaScript.load.failed]: ***** Error loading JavaScript script Resources/Scripts/oolite-cloaking-device-equipment.js -- compilation failed
I assume I've copied the scrip wrong with the illegal character message?