Cloaking Device

General discussion for players of Oolite.

Moderators: winston, another_commander

Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: Cloaking Device

Post 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.
Flying Python Class Cruiser, Chapter & Verse IV
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: Cloaking Device

Post 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 :)
Flying Python Class Cruiser, Chapter & Verse IV
User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Re: Cloaking Device

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

Re: Cloaking Device

Post by another_commander »

Have you restarted the game with Shift held down after applying cim's change?
User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Re: Cloaking Device

Post 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?
Layne
---- E L I T E ----
---- E L I T E ----
Posts: 355
Joined: Sat Mar 28, 2015 11:14 pm

Re: Cloaking Device

Post 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?
Reports of my death have been greatly underestimated.
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: Cloaking Device

Post 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.
Flying Python Class Cruiser, Chapter & Verse IV
User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Re: Cloaking Device

Post 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,
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Cloaking Device

Post 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?
User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Re: Cloaking Device

Post by davcefai »

The cloaking device moves with you. Try it. (You can always revert to the saved game).
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Cloaking Device

Post by phkb »

Wha...?! D'oh! I should've looked first! :oops: Thanks for the heads up! I can continue my sleath-mode tactics in my new Python Class Cruiser!
User avatar
Princess_Zenda
Average
Average
Posts: 8
Joined: Tue Mar 01, 2016 10:58 am

Re: Cloaking Device

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

Re: Cloaking Device

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Cloaking Device

Post by Cody »

Welcome aboard, Commander!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Princess_Zenda
Average
Average
Posts: 8
Joined: Tue Mar 01, 2016 10:58 am

Re: Cloaking Device

Post 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?
Post Reply