Naval energy unit

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Capt. Slog wrote:
Does anyone know what the follwing key does?

mission_TL_FOR_EQ_NAVAL_ENERGY_UNIT

And, to put me out of my misery, does the NEU fit in a supercobra?
I think this is setting the Tech Level post mission success that a NEU can be bought at.

From the SuperCobra shipyard.plist below the NEU is listed as a piece of available equipment...

Code: Select all

<plist version="1.0">
−
	<dict>
<key>supercobra-player</key>
−
	<dict>
<key>chance</key>
<real>0.69999999999999996</real>
<key>optional_equipment</key>
−
	<array>
<string>EQ_CARGO_BAY</string>
<string>EQ_ECM</string>
<string>EQ_FUEL_SCOOPS</string>
<string>EQ_ESCAPE_POD</string>
<string>EQ_ENERGY_BOMB</string>
<string>EQ_ENERGY_UNIT</string>
<string>EQ_NAVAL_ENERGY_UNIT</string>
<string>EQ_DOCK_COMP</string>
<string>EQ_WEAPON_PULSE_LASER</string>
<string>EQ_WEAPON_BEAM_LASER</string>
<string>EQ_WEAPON_MINING_LASER</string>
<string>EQ_WEAPON_MILITARY_LASER</string>
<string>EQ_FUEL_INJECTION</string>
<string>EQ_SCANNER_SHOW_MISSILE_TARGET</string>
<string>EQ_MULTI_TARGET</string>
<string>EQ_GAL_DRIVE</string>
<string>EQ_ADVANCED_COMPASS</string>
<string>EQ_SHIELD_BOOSTER</string>
<string>EQ_NAVAL_SHIELD_BOOSTER</string>
</array>
<key>price</key>
<integer>1622000</integer>
<key>standard_equipment</key>
−
	<dict>
<key>extras</key>
<array/>
<key>forward_weapon_type</key>
<string>EQ_WEAPON_PULSE_LASER</string>
<key>missiles</key>
<integer>3</integer>
</dict>
<key>techlevel</key>
<integer>9</integer>
<key>weapon_facings</key>
<integer>15</integer>
</dict>
</dict>
</plist>
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Davidtq
Deadly
Deadly
Posts: 214
Joined: Tue Jul 15, 2008 10:38 am
Location: Devon, UK

Post by Davidtq »

It seems the option to buy a Naval Energy Unit dissappears once you have a standard energy unit added even if you have completed the right mission and are at the right TL system.

Have to be careful when equipping ships to make sure you dont just go down the option list buying up everything.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Hmmm, if that's the case perhaps somebody more clever than I can identify if that's a "feature" or a proper bug!

Sounds like a bit of hacking of the save file may be required (add the NEU, subtract the correct number of credits, try not to feel guilty) :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The two are mutually incompatible, so that would be what happens. So you need to sell the normal energy unit (via the sell equipment OXP, selling your ship and buying a new one or just get into a lot of firefights and hope it gets destroyed) and then get the NEU rather than the standard one next time ;)

Or just do the quick way and hack like DH says... :twisted:
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6646
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

It's been ages since I last looked at that code, but I am fairly confident that the current behaviour of the Naval / Standard Energy Unit and the way they interact is how it should be. Thargoid is correct, they are mutually incompatible. So, I will call this a feature.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

I knew that! :wink:

What I meant - was remove EU, add NEU and knock off the differential in credits, it's almost but not quite cheating (and before the sell anything oxp came out - the only way to do it - short of surviving a firefight that got the EU destroyed but left you in good enough shape to escape!)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Just remove the EU from the save file, then the NEU should become available again to purchase as you then aren't equipped with any incompatible equipment...
Davidtq
Deadly
Deadly
Posts: 214
Joined: Tue Jul 15, 2008 10:38 am
Location: Devon, UK

Post by Davidtq »

Thargoid wrote:
Just remove the EU from the save file, then the NEU should become available again to purchase as you then aren't equipped with any incompatible equipment...
Ive tried that but with 1.72.2 as soon as I edit the equipment list the save file no longer seems to appear in the load commander menu :cry: So far Ive yet to find any part that I can edit in notepad and still use afterwards...

Must be doing something wrong there, I can add keys such as <testdh> and give them values without them disappearing from the load commander list but I can seem to modify equipment lists without dissappearing from oolite...

EDIT: OK I must have tried that 5 times over the last couple of days and any slight change seemed to stop the file from appearing, just tried it again and I could swap between naval and normal energy unit at will...
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If I had to guess, when you save the file your editor is perhaps appending .txt or something to the back of the filename, giving you Jameson.oolite-save.txt or somesuch?

Oolite will only recognise files ending .oolite-save as proper save game files. This of course combined with Windows propensity for hiding "known" file extensions if you don't tell it to behave properly...
Davidtq
Deadly
Deadly
Posts: 214
Joined: Tue Jul 15, 2008 10:38 am
Location: Devon, UK

Post by Davidtq »

Thargoid wrote:
If I had to guess, when you save the file your editor is perhaps appending .txt or something to the back of the filename, giving you Jameson.oolite-save.txt or somesuch?

Oolite will only recognise files ending .oolite-save as proper save game files. This of course combined with Windows propensity for hiding "known" file extensions if you don't tell it to behave properly...
Ive already told it to behave :D. The extension wasnt changing, wish I had kept a non working file now to see whats different...

and now its working exactly as it should...

I thought it was odd as even commanders whos ship oxps have been removed still show up with just a question mark.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

Davidtq wrote:
So far Ive yet to find any part that I can edit in notepad and still use afterwards...
You could try a real text editor such as TextPad instead of notepad... not free, but the trial version isn't crippled nor time-limited. It has a lot more capabilities and as a bonus, it understands C/C++, HTML and Java too.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

or a free text editor. notepad+ or notepad++ as examples.

I dont think its good to use an unlicensed textpad, but its cheap, so you can buy it easily enough.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

Cmdr James wrote:
or a free text editor. notepad+ or notepad++ as examples.

I dont think its good to use an unlicensed textpad, but its cheap, so you can buy it easily enough.
Which is why I did buy it... was just saying you don't get an arbitrarily set limit on how long you can try it out. 8)
Davidtq
Deadly
Deadly
Posts: 214
Joined: Tue Jul 15, 2008 10:38 am
Location: Devon, UK

Post by Davidtq »

The biggest problem I have with notepad is formatting of p-lists and script files. Most of them come out poorly formatted. When I drop them into Open Office writer the formatting is always correct, but, Im more concerned about a full word processor changing the source file to suit itself when you go to save the file again.

Im assuming that there are other text editors out there that handle the p-list formatting most people use correctly.

My own P-lists and scripts format correctly in notepad, but 90% of others are a nightmare in notepad. I normally open the file in the OO writer and in notepad find what I want in the writer window and then do a text search to find the right place in notepad to edit...
radcapricorn
Competent
Competent
Posts: 58
Joined: Sun May 03, 2009 10:37 pm
Location: Where you wouldn't want to be

Post by radcapricorn »

(Prepares to listen about complexity and learning curve)

Vim? :wink:
Post Reply