Caduceus Repairs

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

@Zbond-Zbond:
What McLane said. Those same instructions work for any ship bearing flak batteries. Also, look for the target autolock.oxp. :)

@Allonnissos
Only one thing I can think of ATM. When you updated the oxp, did you restart Oolite with a shift key held down?
Restarting the game with the shift key flushes the cashe, and tends to fix compatibility errors. It's usually the recommended procedure when updating oxps.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
Allonnissos
Average
Average
Posts: 13
Joined: Sat Oct 31, 2009 11:58 am

Post by Allonnissos »

Curiouser and Curiouser.........

I am not happy with editing the Save file (it just seems too much like cheating) :( - but now I have noticed a couple of other "features":

1. No planet has any ships for sale - None at all - been to TL 15 down to TL 1 - no-one has a single ship for sale - not even a bog-standard Adder!

2. My Cash is now going backwards! - The need to perform Maintenance is now occurring after just 20 flights (average over last 60 flights). 54 of the flights were 1.7LY or less! - Given the small Cargo allowance for the caddy I had "earned" an average of 16,420 CR each time the Maintenance (which costs 17,000) "fell due".

Luckily i have over 600,000 Cr - so the losses will take a LONG while before I go bankrupt. I am just puzzled - what actually triggers the need for the maintenance?
Allonnissos
Average
Average
Posts: 13
Joined: Sat Oct 31, 2009 11:58 am

Post by Allonnissos »

Thanks Cmdr Wyvern - I will give that a try.
User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2514
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Post by ClymAngus »

Allonnissos wrote:
Curiouser and Curiouser.........

1. No planet has any ships for sale - None at all - been to TL 15 down to TL 1 - no-one has a single ship for sale - not even a bog-standard Adder!

2. My Cash is now going backwards! - The need to perform Maintenance is now occurring after just 20 flights (average over last 60 flights). 54 of the flights were 1.7LY or less! - Given the small Cargo allowance for the caddy I had "earned" an average of 16,420 CR each time the Maintenance (which costs 17,000) "fell due".
I'm not taking responsibility for those..... :D
That sounds like a deeper level of screw, rather than just my oxp.
Allonnissos wrote:
Luckily i have over 600,000 Cr - so the losses will take a LONG while before I go bankrupt. I am just puzzled - what actually triggers the need for the maintenance?
too many witchjumps. Leave it results in an increase drisk of a misjump = Tharg-orama
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 »

Just a thought: Does the DCN self-repair script use a mission variable to store its repair status? If not, the self-repair could get derailed when quitting Oolite and reloading later. Because all information not in the save-game would be lost...
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

No mission variable(s) used. It uses a list of repairable kit, and timers and percentage checks to do the fixing.

I'm agreeing with Clym, that Allonnissos' game somehow got borked. It happens sometimes you know.
Hopefully it'll straighten itself out when Allonnissos tries the shift key reset.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
Allonnissos
Average
Average
Posts: 13
Joined: Sat Oct 31, 2009 11:58 am

Post by Allonnissos »

Nah - Shift-Key "fix" didn't solve issue.

It isn't anything to worry about. So it costs me a bit more cash to manually fix broken items - but hey - if I was still piloting a BCC or Cobra I would have to pay that anyway......

The advantages of a Caddy (even with a broken DCN) outweigh the alternatives soooooo much I will just live with it - maybe one day i will find a planet selling another Caddy - and hopefully I will have enough cash left to be able to buy it. Until then I will just concentrate on getting the 3852 kills I still need for "Elite" status.

Thanks for all the help/suggestions.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

@Allonnissos,
I'm at a loss. I tried to reproduce this issue on my own Linux machine, but no joy. A glitch that isn't easily reproducible isn't easy to nail down.

But, all is not lost. Head on over to the Oolite-linux section. Getafix hangs out there, and he's a sharp cookie where it comes to Oolite on Linux. If Getafix can't help you out, then it's probably panic button time.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
Alex
---- E L I T E ----
---- E L I T E ----
Posts: 770
Joined: Mon Oct 06, 2008 10:49 pm
Location: Oz. The land of some gold but mostly rust

Post by Alex »

Hi again,
I updated my neocaddy and reloaded with 'shift', checked the ship.plist before to make sure DCN was there before reload. No worries there.
Still no DCN on my caddy though.
Was wondering, do I have to go looking to buy a new ship?
Would have thought it would have updated on reload as it is standard gear on the ship??

Edit..
Ah.. Just noticed, is it not standard equipment and has to be bought??
LOOK OUT!!!
OOPS..
"Press Space" Commander
If you do not see "Press Space" more often than you want.. Your not trying!
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

Alex wrote:
Hi again,
...
Was wondering, do I have to go looking to buy a new ship?
Would have thought it would have updated on reload as it is standard gear on the ship??

Edit..
Ah.. Just noticed, is it not standard equipment and has to be bought??
<fiction mode>
The DCN is highly exotic biotech, very highly advanced. As a result, the DCN can't be bought anywhere, nor can it be removed from the ship, being a part of the ship. This happened after the Tibecia Invasion*, when a mass evolution swept through the Caduceus fleet, beginning with the heavily wounded Hammer of Sorrow.
The ships stripped down and sold beforehand didn't get a chance to grow a DCN at that time, but the Shulth family speculate this will happen eventually.

</fiction mode>

*see the novella "Rise of the Kirin"

So yeah, buy a new Caddy and you should be good to go. :) If you do an overhaul before "upgrading", your credit loss should be minimal. Then comes the PITA of kitting up again...sorry about that.

I just had to write a little sci-fi to explain some things. :)
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
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 »

Cmdr Wyvern wrote:
No mission variable(s) used. It uses a list of repairable kit, and timers and percentage checks to do the fixing.
Then the critical question is (and this is what I wanted to say in my post): All timers are cleared and deleted when you quit Oolite. Is the one responsible for repairing the DCN itself automatically restarted by the script when you re-open your save-game later?

If not, then the DCN will never be repaired.

EDIT: Yes, that's exactly what I see in the script. damageNodeTimer is started when the DCN gets damaged, and will repair it after some time. However, if you quit your current game and reload it again later, the DCN is already damaged while you're loading the game, therefore damageNodeTimer is not started again, and therefore no repairs are done every again from that point onwards. So it's a bug in the script.

The fix is simple: just add the following code to the script:

Code: Select all

this.startUp = this.reset = function()
	{
	if(player.ship.hasEquipment("EQ_DCN_DAMAGED"))
		{
		this.damageControlTimer.stop(); delete this.damageControlTimer;
		this.damageNodeTimer.start()
		this.damageNodeTimer = new Timer(this, this.restoreNode, 0, 60)	
		}
	}
This checks whether you loaded a commander with a broken DCN. If yes, the self-healing starts.

The alternative would be (and that's why I asked for a mission_variable) to set a mission_variable to true while the DCN is still out of work. Then you would have to check for this mission_variable on every restart of the game, and only delete it after the repair is finished. But of course you can just as well check for the presence of the broken DCN right away, like in my code.
User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2514
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Post by ClymAngus »

Ooo yes righty ho I didn't think about that :oops: ok I'll push out a fix late Saturday sometime.
Commander McLane wrote:
Cmdr Wyvern wrote:
No mission variable(s) used. It uses a list of repairable kit, and timers and percentage checks to do the fixing.
Then the critical question is (and this is what I wanted to say in my post): All timers are cleared and deleted when you quit Oolite. Is the one responsible for repairing the DCN itself automatically restarted by the script when you re-open your save-game later?

If not, then the DCN will never be repaired.

EDIT: Yes, that's exactly what I see in the script. damageNodeTimer is started when the DCN gets damaged, and will repair it after some time. However, if you quit your current game and reload it again later, the DCN is already damaged while you're loading the game, therefore damageNodeTimer is not started again, and therefore no repairs are done every again from that point onwards. So it's a bug in the script.

The fix is simple: just add the following code to the script:

Code: Select all

this.startUp = this.reset = function()
	{
	if(player.ship.hasEquipment("EQ_DCN_DAMAGED"))
		{
		this.damageControlTimer.stop(); delete this.damageControlTimer;
		this.damageNodeTimer.start()
		this.damageNodeTimer = new Timer(this, this.restoreNode, 0, 60)	
		}
	}
This checks whether you loaded a commander with a broken DCN. If yes, the self-healing starts.

The alternative would be (and that's why I asked for a mission_variable) to set a mission_variable to true while the DCN is still out of work. Then you would have to check for this mission_variable on every restart of the game, and only delete it after the repair is finished. But of course you can just as well check for the presence of the broken DCN right away, like in my code.
:oops:
Allonnissos
Average
Average
Posts: 13
Joined: Sat Oct 31, 2009 11:58 am

Post by Allonnissos »

Great news guys! I was hoping it wasn't that I was doing something stupid (I already do FAR too many stupid things in other areas of my life!)

I will check for updates after Monday (off hiking in the Highlands this weekend).
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

The news gets better! :D

I had me a saved game with a damaged DCN and some other shot-up kit. So I loaded it from a fresh start of the game, launched the ship, and waited in orbit. Sure enough, the DCN script was as McLane said.

So, I hacked on the script for awhile, and finally got the bug defeated. I beat that particular trumble to death with a sledgehammer, hacking and testing till the problem was no more.

Sorry to say McLane, your patch code didn't work. Though you accurately spotted the bug, well done, Commander. :mrgreen:

Till Clym can wrap up a fixed oxp, I've put together a patch package. Consider your DCN vaccinated, Allonnissos. ;)

EDIT: Delete the script.js file in the neocaduceus.oxp/Config directory before using these patch files, or there could be conflict between the old, buggy script and the new fixed one.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
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 »

Downloading the patch I see that the variable names have completely changed from the script I was working with. That may have been the reason for my snippet not working.

Anyway, glad to be of service. :)
Post Reply