Problems with 'effectiveTechLevel'

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

Moderators: another_commander, winston

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Problems with 'effectiveTechLevel'

Post 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.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: Problems with 'effectiveTechLevel'

Post 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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Problems with 'effectiveTechLevel'

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Problems with 'effectiveTechLevel'

Post by Smivs »

This was a known bug, although I do not know if it has ever been addressed.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Problems with 'effectiveTechLevel'

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Problems with 'effectiveTechLevel'

Post by Smivs »

As a stop-gap measure, to help out those with broken cloaks, I have just released CloakRepair OXP :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
fronclynne
Deadly
Deadly
Posts: 149
Joined: Sun Mar 01, 2009 5:36 am
Location: ::1

Re: Problems with 'effectiveTechLevel'

Post 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.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Problems with 'effectiveTechLevel'

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

Re: Problems with 'effectiveTechLevel'

Post 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!
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
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Problems with 'effectiveTechLevel'

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

Re: Problems with 'effectiveTechLevel'

Post 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!
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
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Problems with 'effectiveTechLevel'

Post 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.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

Re: Problems with 'effectiveTechLevel'

Post 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.
Last edited by SandJ on Mon Mar 12, 2012 11:25 am, edited 1 time in total.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Post Reply