[RELEASE] Towbar OXP v1.0

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

Moderators: another_commander, winston

dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

[RELEASE] Towbar OXP v0.107

Post by dybal »

Version 0.107 is available on the Expansion Manager and here.

Changes:
  • Fixes bug that halted salvaging processing.
  • Fixes bug that prevented Appearance parameter saved value from taking effect after loading from save file.
  • More messages re-written to better English (thanks to Nite Owl).
This is a maintenance release, there is no new functionality.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

[RELEASE] Towbar OXP v0.108

Post by dybal »

[EliteWiki] Towbar 0.108 is available on the Expansion Manager and here.

Changes:
  • Deals with carried ships when salvaging a Carrier.

The fact that Towbar ignored the Carrier main payload when salvaging it has bothered me for a while... last week I did something about it: if the player has Hyperspace Hangar installed, the carried ships will be stored there when the carrier is salvaged, otherwise they will be salvaged too.
Last edited by dybal on Thu Sep 24, 2020 12:47 am, edited 1 time in total.
Godev1
Poor
Poor
Posts: 5
Joined: Wed Sep 23, 2020 4:33 pm

Re: [RELEASE] Towbar OXP v0.108

Post by Godev1 »

Is it intended that the Witchdrive Fuel Injectors always get damaged as soon as I tow a ship?

I tried it multiple times. WHen I start a new game, and then get the class 2 witchdrive injector, it works fine. I buy the towbar and get the first assignment (the ship behind the station). WHen I leave the station to get there the injectors still work. But everytime when I tow that ship I get a notification that my injectors are damaged. Ok, I tow that ship back to the station and check my injectors - broken. Then I store them and get class 1 injectors instead, because I cannot repair the broken one at the current station (tech level too low). But even the class 1 injector doesn't work now, and I don't know why. I'm quite new to Oolite (but not to Elite). I'm using some OXPs, but I always kepp track of potential incompatibilites between them, before I install one. And I'm pretty sure there's no mod conflict responsible. However, I might be wrong. But maybe you have an idea what's going on?

Btw, I'm using Ship Configuration OXP. But I tripple-checked that I'm not out of equipment space or exceeding allowed total weight, etc. I really have no idea why fuel injectors don't work anymore. But since it starts to happen only after towing the ship, I suppose it might be related to towbar, somhow..

Edit: The only way to avoid the damage for now is to store the fuel injectors before using the towbar. Well, another idea came to my mind. Maybe I was approaching the derelict ship from a bad angle?

Thank you.
Last edited by Godev1 on Wed Sep 23, 2020 4:53 pm, edited 1 time in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4643
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [RELEASE] Towbar OXP v0.108

Post by phkb »

Godev1 wrote: Wed Sep 23, 2020 4:35 pm
Is it intended that the Witchdrive Fuel Injectors always get damaged as soon as I tow a ship?
Yes. Standard fuel injectors, including all the ones available in ShipConfig, will break by default when towing. This is because you need to purchase the "Towbar Compatible Injectors" for 20K from a TL11 system.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

I will have to check the code, but if memory serves the injectors are damaged while your are towing, but they should become functional again when you release the towed ship (or after docking).

If that isn't happening, let me know and I will deal with it.
Godev1
Poor
Poor
Posts: 5
Joined: Wed Sep 23, 2020 4:33 pm

Re: [RELEASE] Towbar OXP v0.108

Post by Godev1 »

Yeah, that's exactly what's happening. Injectors remain unfunctional after towed a ship, even when I remove them and buy new ones afterwards. The only way to get around this, is to remove the injectors before using towbar. The compatible injectors are quite expensive for now. I will have to earn some credits first. But I guess it's a bug with the default injectors.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

I just looked at the code:
  • When locking to a ship with Towbar (that is, attaching to it for towing), if the player's ship doesn't have the Towbar Compatible Injectors, its injectors (if any) are disabled.
  • When docking, if injectors were disabled by Towbar, it enables them again, so the injectors should appear as undamaged on Status Screen (F5).
  • When hitching a ride, i.e., using somebody else's wormhole, it releases the towed ship, if any, but doesn't verify if the injectors were disabled and and so doesn't enable them again - fix added to next version.
  • When the towed ship is released (by priming and activating Towbar while attached to a ship, or by starting a jump countdown), if the injectors were disabled by Towbar, they are enabled again.
  • If the Towbar dice roll makes the towed ship explode while towing and the player's ship injectors were disabled by Towbar, they are enabled again.
  • If the towed ship is destroyed by third parties while being towed and the player's ship injectors were disabled by Towbar, they are enabled again.
  • If the Towbar itself is damaged while towing a ship and the player's ship injectors were disabled by Towbar, they are enabled again.
So the planned behaviour is: if you don't have the special towbar compatible injectors, your injectors aren't functional while you are attached to a ship for towing (you don't have to be moving, or trying to inject, for that to happen), but they will be functional again after the towed ship is released.

I will run some tests tonight, but I started a new commander recently and I don't remember losing injectors just because I towed a ship (I think I would have noticed that...), I just couldn't use them while towing.
Godev1
Poor
Poor
Posts: 5
Joined: Wed Sep 23, 2020 4:33 pm

Re: [RELEASE] Towbar OXP v0.108

Post by Godev1 »

Well, I didn't use a wormhole but my injectors are not re-enabled after towing that first ship, right after buying the towbar equipment. I did some more tests, and it happens every time I try it. But I can remember that a few weeks back it used to work just fine. But as I took a break from Oolite for a few weeks, and then just updated several mods, I cannot tell which version actually worked. At least I can say, that some of the last updates might have introduced some changes that might cause this behavior.
the other possibility could be a mog conflict. But I also checked that again, and there's no mod installed that would interfere with towbar or the injectors (except Ship Configuration OXP. But I told you about this one already).
Sorry that I'm not very helpful here. But thank you for the efforts to find the culprit! I hope it's not on my side...
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

Godev1 wrote: Thu Sep 24, 2020 8:38 pm
Well, I didn't use a wormhole but my injectors are not re-enabled after towing that first ship, right after buying the towbar equipment. I did some more tests, and it happens every time I try it. But I can remember that a few weeks back it used to work just fine. But as I took a break from Oolite for a few weeks, and then just updated several mods, I cannot tell which version actually worked. At least I can say, that some of the last updates might have introduced some changes that might cause this behavior.
the other possibility could be a mog conflict. But I also checked that again, and there's no mod installed that would interfere with towbar or the injectors (except Ship Configuration OXP. But I told you about this one already).
Sorry that I'm not very helpful here. But thank you for the efforts to find the culprit! I hope it's not on my side...
And that happens even after you save the game and reload?

If yes, there should be a different state being saved into the savefiles before and after the towing... would you upload savefiles from before and after towing a ship and the injectors refusing to come back? Perhaps I can find something in there to point to the problem.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4643
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [RELEASE] Towbar OXP v0.108

Post by phkb »

With the logic you describe for all the scenarios where the injectors are disabled then re-enabled, does it account for OXP injectors? I'm thinking of ShipConfig in particular here.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

phkb wrote: Thu Sep 24, 2020 9:26 pm
With the logic you describe for all the scenarios where the injectors are disabled then re-enabled, does it account for OXP injectors? I'm thinking of ShipConfig in particular here.
Towbar alters EQ_FUEL_INJECTION status from EQUIPMENT_OK to EQUIPMENT_DAMAGED and vice-versa, it doesn't look at EquipmentInfo.provides... I assume OXP injectors would have different EQ_* strings and use the provides property to tell the core game they are injectors?

I have no idea how OXP injectors would appear to other OXPs... I assume their presence would allow equipment that requires injectors, like the Towbar Compatible Injectors, to appear at Ship Outfitting (F3), but would ship.equipmentStatus("EQ_FUEL_INJECTION") return true? Would ship.setEquipmentStatus("EQ_FUEL_INJECTION", <status>) modify the OXP injector status? If the core game does that mapping, there is no need for changes in Towbar to be compatible with them, otherwise it should look for other EQ_* strings besides EQ_FUEL_INJECTION.

Do you know, or should I investigate?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4643
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [RELEASE] Towbar OXP v0.108

Post by phkb »

ShipConfig tries to handle OXP integration by keeping the standard fuel injection equipment but with "visible=false" set in equipment.plist. Then, whenever a SC fuel injector is installed, it will silently install the standard injectors at the same time. It then monitors the status of the standard injectors, and if they become damaged it passes the damage onto it's own injector equipment. So, theoretially, ship.equipmentStatus("EQ_FUEL_INJECTION") should return true. Other injectors I'm not as sure about.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [RELEASE] Towbar OXP v0.108

Post by Cholmondely »

dybal wrote: Thu Sep 24, 2020 11:30 pm

Towbar alters EQ_FUEL_INJECTION status from EQUIPMENT_OK to EQUIPMENT_DAMAGED and vice-versa ...

I have no idea how OXP injectors would appear to other OXPs ...
I was towing a derelict pirate and my injectors kept on breaking as I had to let go while being attacked by others. This happened 3 times. Each time the self repair system (Repair Bots .oxp) started trying to fix them and it used up 2 charges doing so (the bots were interrupted the third time).

Am I correct in assuming that the game software does not allow the injectors to be classified as disabled but that they can only be re-classified as broken? (With attendant consequences for automated repairs whilst towing...).

If so, should this go on the list of desired changes for version 1.92?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

Cholmondely wrote: Fri Sep 25, 2020 8:10 am
Am I correct in assuming that the game software does not allow the injectors to be classified as disabled but that they can only be re-classified as broken? (With attendant consequences for automated repairs whilst towing...).

If so, should this go on the list of desired changes for version 1.92?
As far as I know, an equipment is functional or damaged, there is no centralized, standard way to say it's disabled (i.e., non-functional but not in need of repair) or with reduced functionality.

A disabled state would be useful for other things too, like when equipment B depends on equipment A to function and A gets damaged... B could be disabled and enabled again when A is repaired, and if A is destroyed B would be disabled until a new A is installed... today, if A is destroyed you lose B as well.

I will think of something to make Repair System ignore the disabled injectors.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [RELEASE] Towbar OXP v0.108

Post by dybal »

Cholmondely wrote: Fri Sep 25, 2020 8:10 am
I was towing a derelict pirate and my injectors kept on breaking as I had to let go while being attacked by others. This happened 3 times. Each time the self repair system (Repair Bots .oxp) started trying to fix them and it used up 2 charges doing so (the bots were interrupted the third time).
I'm not sure I understood the circumstances described: you were attacked while you had a ship in tow and released the ship... were you injecting when you released? If not, do you have the towbar compatible injectors? If you have the compatible injectors, which injector equipment was broken and repaired by Repair System?

You made me realize there is a mismatch between Towbar and Repair Bots: if you don't have the towbar compatible injectors, your injectors will always be set to damaged (to disable them) while towing, and in that case it's a waste of charges for Repair System to fix them - I will solve this.

But I want to verify if that temporary damaged state is what you saw, or if you are saying that nothing was damaged while you were towing (that implies you have the towbar compatible injectors) and after you released the towed ship one of the injectors was broken (which one?), and in that case, does it happen when you release without being attacked (i.e., are you seeing battle damage)?
Post Reply