energy unit

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
FSOneblin
---- E L I T E ----
---- E L I T E ----
Posts: 460
Joined: Tue Oct 30, 2007 12:15 am
Location: Yes, That is True

energy unit

Post by FSOneblin »

Well, I got chopped up in some system, and now my energy unit is busted. So I went to A tl 11 system, but nope, none in stock. So I went to a space bar, no censored luck. I Checked the wiki and they Should be avable at any tl [<] 8. But there is none to be found. Is this some kind of bug?


Don't panic : FSOneblin[/u]
Don't panic

Now an "adult!"
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Do you happen to have both normal and naval energy units? If somehow you have acquired both of them and one gets damaged, the repair option does not appear on the equip ship screen.

In normal conditions, one energy unit should exclude the other. Did you edit your savefiles manually at any point? Are you using savefiles created during the days of v1.70?
User avatar
FSOneblin
---- E L I T E ----
---- E L I T E ----
Posts: 460
Joined: Tue Oct 30, 2007 12:15 am
Location: Yes, That is True

Post by FSOneblin »

another_commander wrote:
Do you happen to have both normal and naval energy units? If somehow you have acquired both of them and one gets damaged, the repair option does not appear on the equip ship screen.

In normal conditions, one energy unit should exclude the other. Did you edit your savefiles manually at any point? Are you using savefiles created during the days of v1.70?
1: Yes
2: no
3: no

The save file is my good one. It was made in 6.5. So is this a bug? And If so, when will it be fixed? Thanks for your reply.


Don't Panic: FSOneblin
Don't panic

Now an "adult!"
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

What is a 6.5? Do you mean Oolite v1.65?
User avatar
FSOneblin
---- E L I T E ----
---- E L I T E ----
Posts: 460
Joined: Tue Oct 30, 2007 12:15 am
Location: Yes, That is True

Post by FSOneblin »

another_commander wrote:
What is a 6.5? Do you mean Oolite v1.65?


Yes! thank you for the correction now I'm really close to getting my time traveling license taken away by the government... for the 40th time...
Don't panic

Now an "adult!"
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Hmm. In the oolite-thargoid-plans-mission.js script, when the Naval Energy Unit is awarded, the old energy unit is not touched. The same happens with the legacy 1.65 scipt equivalent of the mission. I am not sure if this is intended or not, but I think the script should remove the previous unit (if it exists) first, then award the naval one. This may explain how one could end up with both energy units present.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

another_commander wrote:
Hmm. In the oolite-thargoid-plans-mission.js script, when the Naval Energy Unit is awarded, the old energy unit is not touched. The same happens with the legacy 1.65 scipt equivalent of the mission. I am not sure if this is intended or not, but I think the script should remove the previous unit (if it exists) first, then award the naval one. This may explain how one could end up with both energy units present.
yeah, you could have both units... in 1.65 at least, and i´m pretty sure you could also in 1.67~
Bounty Scanner
Number 935
User avatar
FSOneblin
---- E L I T E ----
---- E L I T E ----
Posts: 460
Joined: Tue Oct 30, 2007 12:15 am
Location: Yes, That is True

Post by FSOneblin »

I got the navel energy unit in aruond 1.70 or 1.69.1

Don't panic: FSOneblin
Don't panic

Now an "adult!"
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:

Post by Commander McLane »

You could not have both energy units in 1.65. This was a bug in 1.70(?), which would accidentally allow you to buy the normal energy unit, if you had the naval unit installed, and vice versa, without removing (and refunding you for) the installed one. (It was the same version that made stupid things with your money when you bought a laser, I think it was 1.70.) The bug has been fixed since, so in 1.71.n the problem is no longer there.

But if you at some time in 1.70 discovered the normal energy unit for sale and bought it, you are in trouble now.

However, you can easily get rid of it by editing your save-file. Find the lines

Code: Select all

		<key>EQ_ENERGY_UNIT</key>
		<true/>
or

Code: Select all

		<key>EQ_ENERGY_UNIT_DAMAGED</key>
		<true/>
(depending on whether it has been damaged or not) and just delete them. Then save again and restart Oolite.

By the same way you can of course also get rid of the naval energy unit, by deleting the lines

Code: Select all

		<key>EQ_NAVAL_ENERGY_UNIT</key>
		<true/>
or

Code: Select all

		<key>EQ_NAVAL_ENERGY_UNIT_DAMAGED</key>
		<true/>
From there on everything will be back to normal. :)

EDIT: Clarified the second sentence above.
Last edited by Commander McLane on Thu Jun 19, 2008 9:09 am, edited 1 time in total.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

However, you can easily get rid of it by editing your save-file. Find the lines
All true, but when FSOneblin never edit his save file in the first place it also means a lot of other can get this bug. Problem it that this equipment is handled special internally. When you buy the naval thing, the normal one is not shown for display anymore. In the old days (1.65) you still had the normal one when buying the naval one. When the normal one was destroyed it just disappeared from your inventory. And when you look into the equipment.plist of the normal one you see it has a line that makes it incompatible with the naval unit so it never is offered for sale when you have the naval one.

After 1.65 the code was changed in a way damaged equipment was not removed but the name changed. Here the problems probably started because bit of this duality in energy units were spread all over the code. At some places things were probably missed.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

So, I guess it would be an acceptable solution, if we modify the thargoid plans script that awards the naval unit so that it removes the standard one prior to the award?
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:

Post by Commander McLane »

@ Eric: This is not true. In 1.65-1.69.2 You could not have both energy units. If you bought one, the other one was automatically removed and you got the usual refund for selling equipment.

Only 1.70 messed up with this, because the automatical selling didn't work, so you could end up with both units.

@ a_c: Also the exchange-code was working properly in 1.65-1.69.2. I did get my naval energy unit when I was still on 1.65, and the normal energy unit was removed correctly. I never had both items showing up on my F5-screen. After it was clear that in 1.70 something was wrong, I abstained from buying any energy unit, and thereby kept my save-file clean. So it is an issue only for those guys who happened to buy any energy unit in 1.70. If they had the other one prior to that, it wasn't removed.

And it was fixed for 1.71. So before and after 1.70 everything concerning energy units was working properly.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

All true, but when FSOneblin never edit his save file in the first place it also means a lot of other can get this bug.
I too have both, I too never edited my savegame.

Got the Naval Energy Unit awarded in 1.71.1, 95% sure of that. Not completely impossible that it was still 1.70, though.

Perhaps it`s noteworthy that some time ago, I bought a ship that had the naval energy unit pre-installed - sold it again later for a ship that didn`t have it.

Could having owned a ship that had the Naval Energy Unit before it was awarded by the Thargoid mission have to do with the anomaly?

L
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Commander McLane wrote:
And it was fixed for 1.71. So before and after 1.70 everything concerning energy units was working properly.
Actually, this is not the case. I just tested it with 1.71.2 and at the end of Thargoid Plans I had the naval energy unit together with the standard one listed on my F5 screen.

I am still of the opinion that the best and easiest fix is have the Thargoid Plans script remove the standard unit before awarding the naval one. I also consider it much "cleaner" codewise, if the script performs the complete energy unit swap manually, instead of relying upon some obscure core-code mechanics in order to achieve it. There is no reason to assume that the awardEquipment for the naval energy unit would imply a swap, when this is not the case for any other piece of equipment.

If anyone thinks that this is a bad idea, this would be a good time to say so (with justification, of course).
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Commander McLane wrote:
@ Eric: This is not true. In 1.65-1.69.2 You could not have both energy units. If you bought one, the other one was automatically removed and you got the usual refund for selling equipment. Only 1.70 messed up with this...
You are right. i looked in the old equipment.plist's. The extra energy unit never had special features. In 1.70 I see for the first time a restriction of incompatible with naval energy unit. This is the moment handling changed. Before it was accomplished in an other way that the extra energy unit didn't show up when you had the naval one.

@a-c: It is probably the best thing to explicit remove the extra one with the thargoid plan mission. Refunding is no issue here as you get the naval one for free. (Not completely free of cause --> you had to kill some thargoids for it)
Post Reply