Page 2 of 2

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 1:31 pm
by Eric Walch
Commander McLane wrote:
I took it for granted that the device's TL would stay at 99, and I only needed to change it on docking.
When i learned one thing, than it is to never take something from granted in programming. Always double-check as things might change in the future. :wink:

And in this case, there was already a comment in the very first edition of the JS version from nov 2007:

Code: Select all

			// Should we make it possible to buy a replacement?
			// missionVariables.TL_FOR_EQ_CLOAKING_DEVICE = 14
So, the hint to change it has always been there. It was just that nobody wanted to make a decision for a change.

And I also agree with the opinion I read before that, when it was intended that the player could not repair it at all, the equipment should not stay damaged, but should be fully removed from the inventory.

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 2:02 pm
by Switeck
Eric Walch wrote:
And I also agree with the opinion I read before that, when it was intended that the player could not repair it at all, the equipment should not stay damaged, but should be fully removed from the inventory.
After a damaging fight, a player may fail to notice their cloaking device has been removed...permanently.

Repair at a TL15 system, despite their rarity, is preferable to realizing you don't have a cloaking device anymore and you don't know how long ago you lost it. :cry:

The code's already there to make cloaking devices repairable. If it was enabled, players unlucky enough to get their cloaking device damaged either have to go on a "quest" to find a TL15 system to get it repaired (the 6th core mission? :lol: )...or if that's not possible/allowed, they'll probably just be reloading from a previous save game. Better for there to be choices and consequences than cheats.

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 2:07 pm
by Commander McLane
Hm. I just discovered that my cloaking device, if broken, gets auto-repaired free of charge as soon as I dock. Even when I'm docked, change its status to "EQUIPMENT_DAMAGED", and press F5, it appears yellow again.

Some taking-out-OXPs reveals that this seems to be caused by Assassins.oxp. Which means that whoever has Assassins installed doesn't need to worry about a damaged cloaking device.

Without having examined it I think the culprit is that Assassins removes the cloaking device while doing its missions and re-awards it when docked, probably not distinguishing between a removed and a damaged cloaking device.

EDIT: Now I have examined it. Yes, it's indeed a clear Assassins bug. The cloaking device gets removed and awarded regardless of its status. It would have been possible even with legacy scripting to keep it as it is if damaged, so I guess that's an oversight on LittleBear's part. When I made my initial tests for the Anarchies repair mechanism I didn't notice, because I didn't have Assassins installed at the time.

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 2:46 pm
by Smivs
This was a known bug, although I do not know if it has ever been addressed.

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 3:25 pm
by Eric Walch
Smivs wrote:
This was a known bug, although I do not know if it has ever been addressed.
I even remember putting this bug under the atention of little bear, back in 2007. His opinion was to leave it that way just as a litle gift of assassains.

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 3:32 pm
by Smivs
As a stop-gap measure, to help out those with broken cloaks, I have just released CloakRepair OXP :)

Re: Problems with 'effectiveTechLevel'

Posted: Sat Feb 25, 2012 4:28 pm
by fronclynne
Commander McLane wrote:
Hm. I just discovered that my cloaking device, if broken, gets auto-repaired free of charge as soon as I dock. Even when I'm docked, change its status to "EQUIPMENT_DAMAGED", and press F5, it appears yellow again.

Some taking-out-OXPs reveals that this seems to be caused by Assassins.oxp. Which means that whoever has Assassins installed doesn't need to worry about a damaged cloaking device.

Without having examined it I think the culprit is that Assassins removes the cloaking device while doing its missions and re-awards it when docked, probably not distinguishing between a removed and a damaged cloaking device.

EDIT: Now I have examined it. Yes, it's indeed a clear Assassins bug. The cloaking device gets removed and awarded regardless of its status. It would have been possible even with legacy scripting to keep it as it is if damaged, so I guess that's an oversight on LittleBear's part. When I made my initial tests for the Anarchies repair mechanism I didn't notice, because I didn't have Assassins installed at the time.
Looks to my inept eye like The Feudal States does the same thing in feudal_challenge.js, NTTAWWT.

Re: Problems with 'effectiveTechLevel'

Posted: Sun Mar 11, 2012 10:23 am
by Eric Walch
Smivs wrote:
As a stop-gap measure, to help out those with broken cloaks, I have just released CloakRepair OXP :)
In trunk it is now changed that the max_techlevel a script could set is one higher than before, so you can create equipment that is only reparable at level 15 systems. And the cloak is made reparable on scooping.
For the ease of scripting it was decided to only make it reparable on scooping and not add all kind of tests to make it backward compatible with existing save games that already contain the cloak. And there seem to exist oxps that might revert the new cloak settings, like the current anarchie.oxp version. So, above CloakRepair OXP will still be useful for those already having a cloak.

Re: Problems with 'effectiveTechLevel'

Posted: Sun Mar 11, 2012 10:34 am
by Cody
Eric Walch wrote:
For the ease of scripting it was decided to only make it reparable on scooping
So... to have the cloak repairable in-game, I'd have to start a virgin Jameson, yes? Hmm... I don't like that! Hey-ho!

Re: Problems with 'effectiveTechLevel'

Posted: Sun Mar 11, 2012 12:27 pm
by Commander McLane
El Viejo wrote:
Eric Walch wrote:
For the ease of scripting it was decided to only make it reparable on scooping
So... to have the cloak repairable in-game, I'd have to start a virgin Jameson, yes? Hmm... I don't like that! Hey-ho!
Or you could edit your save-game.

Re: Problems with 'effectiveTechLevel'

Posted: Sun Mar 11, 2012 12:41 pm
by Cody
Commander McLane wrote:
Or you could edit your save-game.
Yes, I know I could do that... but I'd prefer not to, and shouldn't have to! It seems daft to me, but I'm only a dumb end-user!

Re: Problems with 'effectiveTechLevel'

Posted: Sun Mar 11, 2012 1:08 pm
by Smivs
It would be easy to produce another little OXP which will reduce the TL for a cloak to 15 on launching provided you have one (OK or damaged) at the time.
It would effectively do the same as the core game will do for 'new' cloaks, and once used could be removed and discarded as it would write this to the save-file. Would this be of interest to anybody?
For what it's worth I'm quite happy to keep the existing repair OXP in AddOns, and I wonder if another variety might just add confusion. Let me know what you think.

Re: Problems with 'effectiveTechLevel'

Posted: Mon Mar 12, 2012 11:05 am
by SandJ
Smivs wrote:
It would be easy to produce another little OXP which will reduce the TL for a cloak to 15 on launching provided you have one (OK or damaged) at the time.
It would effectively do the same as the core game will do for 'new' cloaks, and once used could be removed and discarded as it would write this to the save-file. Would this be of interest to anybody?
For what it's worth I'm quite happy to keep the existing repair OXP in AddOns, and I wonder if another variety might just add confusion. Let me know what you think.
Either:
  • - the upgrade instructions from 1.76 will need to say "edit the saved game file in this way"
or
  • - the upgrade instructions from 1.76 will need to say "run this bit of code to fix the cloak"
or
  • - the upgrade process for the post 1.76 version will need to include the code to modify legacy cloaks
or
  • - the next version will need to have to recognise and convert legacy cloaks
or
  • - an OXP will be needed to be installed and 'executed' after upgrading from v1.76 (i.e. install the OXP, load the saved game, do the magic-cloak-fix-action [e.g. launch and dock, or a 0 credit cloak conversion], then save the game and uninstall the OXP)
or
  • - we'll be stuck with a weird legacy broken cloak.
or
  • - the existing cloak is invalid post v1.76 and the new cloak is a different item. We then just have to re-earn it.
or
  • - the OXP for 'fixing' the cloak is bundled in with the next version of Oolite. It offers an extra purchase / repair option of "Cloak Product Recall and Replacement" for zero credits which replaces the legacy cloak with the new one. Once 'purchased' it never appears again. (If you don't have a legacy cloak you will never see the option.) This has the secondary benefit of providing users with a .OXP directory and example oxp in their structure, making installation of future .OXPs easier for them as they can see what it should look like and where it should go.
For some of us, a psychological barrier gets broken when we are forced to edit the saved game. Once done to fix a problem, the evil knowledge on how to fiddle with other settings is always there and tempting.