Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Harpuea on April 02, 2021, 10:37:53 PM

Title: [0.95a] Combat Docking Module 005
Post by: Harpuea on April 02, 2021, 10:37:53 PM
A module that allows certain player ships to land and repair on a nearby carrier. Currently refit time takes 20 seconds, repair full HP/Armor, refill all ammo, and restores Combat Readiness 20%. Featuring auto landing auto pilot if hull HP falls below 80%, CR falls below 40%, or ammo reaches 0. Controls will be locked during the final landing phase. If the carrier dies when the landed ship is inside, it too will die. A side effect and requirement is that the ship will have fighter class collision in order to actually land on the carrier.

(https://i.imgur.com/tQa46G5.gif)

 WEBM Example  (https://i.imgur.com/sX3vdi7.mp4)

Purpose: I like playing small speedy ships in the early game. And by late game, they are made unviable. Now, there is a fighting chance if they are able to repair and re-arm. I have been play testing for a few months now, it is quite balanced and isn't over powered. You still need capital ships for serious fights like besieging a battle station.

How to use for player ship: Install the hullmod onto your ship and go into combat. If "Systems Critical"/""NO MUNITIONS"" status appears on the left hand side, then your ship is able to land if you turn on Auto Pilot* (Default Key: U). Be advised that the Landing Auto Pilot AI does not have threat evasion and will take the shortest path. Auto pilot works normally if the player ship status is normal.

How it works on allied ships: The AI behave normally until their HP, CR, and Ammo falls into the critical level and they will seek to land. If the AI is too far away from a carrier, you will need to spend Command Points and ask them to escort the carrier for the Landing Auto Pilot to activate.

Applicable to ship types: White list is available for any ship you want. Defaults are Shuttle, Courier, Drone, Scout, Corvette, Light Rig, and Pinnace.

Known Issues:
-Drift if the landing happens too fast.
-Fighter Collision class break some weapons that does not target fighters.
-Refit time is very short if HP is full. (Feature?)
-Unknown result if the carrier retreats with the ship landed inside. Coded for, but untested edge case.
-AI pilot doesn't initialize if carrier doesn't have an LPC equipped. 06/18/2021

Special Thanks: Sundog, Ed (Repair Drones examples), and Dark.Revenant for all the utility codes.

Change Log
001 Initial release
002 Prevent Landing on Frigate and Fighters
003 Added whitelist, Einhander removed from applicable ship.
004 Reduce Supply and Fuel use by 90% since technically the craft is inside the carrier during transit.
005 Fixed Null Pointer Crash if fleet has no carrier on game load.
[close]

Requirement: LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0)

Download Combat Docking Module version 005 : https://www.dropbox.com/s/eghytfdiszc73xm/Combat%20Docking%20Module%20005.rar?dl=0
Title: Re: [0.95a] Combat Docking Module 001
Post by: Tartiflette on April 03, 2021, 12:09:56 AM
Nice, I like that idea.

Possible suggestion (maybe you considered this)
Since it is for late game, how about instead of allowing some frigates with a specific hullmod to land on any carrier, even a frigate sized carrier should a mod add that, do the opposite and allow every frigate to land on a capital carrier with a specific hullmod only applicable on that size of ships.

The way I see it, that carrier hullmod would prevent to mount any wing, converting it into a dedicated "frigate" carrier.

Now I don't know which one would be more balanced. And to be fair, the later would probably break on so many modded ships!
Title: Re: [0.95a] Combat Docking Module 001
Post by: IonDragonX on April 03, 2021, 06:39:49 AM
Can I get a variation where you can't refit inside a Destroyer? It would make more sense to me to require a Cruiser carrier or larger. (I consider Cathedral larger than Capital)
Title: Re: [0.95a] Combat Docking Module 001
Post by: Harpuea on April 03, 2021, 01:02:20 PM

Nice, I like that idea.

Possible suggestion (maybe you considered this)
Since it is for late game, how about instead of allowing some frigates with a specific hullmod to land on any carrier, even a frigate sized carrier should a mod add that, do the opposite and allow every frigate to land on a capital carrier with a specific hullmod only applicable on that size of ships.

The way I see it, that carrier hullmod would prevent to mount any wing, converting it into a dedicated "frigate" carrier.

Now I don't know which one would be more balanced. And to be fair, the later would probably break on so many modded ships!

It would be nice to have a Mother Wolf to tend to Wolf frigates, but Tempests, Hyperions, and Omens are going to be a nightmare if they can rearm. Those phase frigates too. That's why I didn't take that broad stroke route. It's kind of pick and choose right now.

Can I get a variation where you can't refit inside a Destroyer? It would make more sense to me to require a Cruiser carrier or larger. (I consider Cathedral larger than Capital)

I see no purpose locking the player out of this play style until they buys a cruiser or bigger, which defeats the quest of extending your early game ship's life and place in the fleet. If you can afford cruisers and capitals, you are probably not going appreciate the lackluster firepower this brings. And it cost a lot to deploy a cruiser or bigger if you just want to rearm a few shuttle with torpedos in smaller fights. A light carrier is more cost effective. Plus, most of the ship types that can use combat dock are currently supposed to be smaller and less combat effective than normal frigates so in my head canon they can land on most standard LPCs carrier bay.
Title: Re: [0.95a] Combat Docking Module 001
Post by: Helldiver on April 04, 2021, 04:19:43 PM
This has a lot of potential for frigate tender ships.
Title: Re: [0.95a] Combat Docking Module 001
Post by: Atmos on June 07, 2021, 12:17:45 AM
This should have been in game wth! How is this not in the actual game? Does it apply to frigates from mods?
Title: Re: [0.95a] Combat Docking Module 001
Post by: Harpuea on June 07, 2021, 01:47:31 AM
This should have been in game wth! How is this not in the actual game? Does it apply to frigates from mods?

Doesn't apply to most frigates. I already made a version with a whitelist. I guess I'll update it now. Whatever float your boat, you add it to the whitelist.
Title: Re: [0.95a] Combat Docking Module 004
Post by: BLASTERMK on June 16, 2021, 09:44:36 AM
(https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0 (https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
The landing autopilot didn't work for me. I tested it on a Kite with 20%hull, turned on autopilot and it just stoped moving.
It did not move, turn, turn on shiled or shot. That Kite just stoped like there is no ai applied on it.
On the left screen there were two infos "land autopilot installed" and "system cricital warning".

 Do you know how to fix it?

ps. The carrier I used is an Astral class. Game verison is 0.95a. Lazylab 2.6 is installed.
Title: Re: [0.95a] Combat Docking Module 004
Post by: Harpuea on June 18, 2021, 06:34:04 AM
(https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0 (https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
The landing autopilot didn't work for me. I tested it on a Kite with 20%hull, turned on autopilot and it just stoped moving.
It did not move, turn, turn on shiled or shot. That Kite just stoped like there is no ai applied on it.
On the left screen there were two infos "land autopilot installed" and "system cricital warning".

 Do you know how to fix it?

ps. The carrier I used is an Astral class. Game verison is 0.95a. Lazylab 2.6 is installed.

I figured it out. Your astral is completely empty. The astral need to have at least 1 fighter LPC equipped for the combat docking module to work. I'll fix that when I am able to.
Title: Re: [0.95a] Combat Docking Module 004
Post by: BLASTERMK on June 18, 2021, 02:27:27 PM
(https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0 (https://www.dropbox.com/s/nr5cgmtzmlg773d/123.png?dl=0)
The landing autopilot didn't work for me. I tested it on a Kite with 20%hull, turned on autopilot and it just stoped moving.
It did not move, turn, turn on shiled or shot. That Kite just stoped like there is no ai applied on it.
On the left screen there were two infos "land autopilot installed" and "system cricital warning".

 Do you know how to fix it?

ps. The carrier I used is an Astral class. Game verison is 0.95a. Lazylab 2.6 is installed.

I figured it out. Your astral is completely empty. The astral need to have at least 1 fighter LPC equipped for the combat docking module to work. I'll fix that when I am able to.


Well, glad you found it. By the way, I have tested this mod in game version 0.91 with lazylab2.5. It could also function well. I think you can label this mod like [0.91/0.95] so more people will try it, since 0.91 is a stable version for the last few years.

You made a great mod. It is a revolution to the game play. With respect, I spent several hours read throw the script trying to find out the logic behind it. I could understand functions but failed removing the restrict of hullmod installation because I dont know how to modify .class file. You see, there are too many faction mods I'm using. It will be eazier to change the code rather than add all the ship id to a white list. I just want to return "ture" to the function "boolean isApplicableToShip". Could you please make a replaceable jar file just like what you did to CDM001-004. Or make a config file if you would like to. Thanks for your remarkable work. :)
Title: Re: [0.95a] Combat Docking Module 004
Post by: AdmiralRem on June 24, 2021, 01:37:06 PM
Fantastic concept! I dont have the ability of course but making a dedicated support ship for this would be amazing. Like the salvage gantry of the salvage ship could support, fix and restore CR to all size ships. Would add an interesting level of gameplay. Keep the logi safe! Although it also might tip the game too far into "always kill the logi first" I duno just fun to think about!
Title: Re: [0.95a] Combat Docking Module 004
Post by: BLASTERMK on June 25, 2021, 10:45:42 AM
https://www.dropbox.com/s/vppjmzyxnzozqqc/1234.PNG?dl=0 (https://www.dropbox.com/s/vppjmzyxnzozqqc/1234.PNG?dl=0)
Hi, I found out if there is one ship installed this hullmod, the save will be broken. It is a serious bug so this mod cannot work at all.When you are trying to load that broken save, a message will shows "error loading saved game" with some debuging information following. It happend on both 0.91 and 0.95. I will post it in both versions so you may find out what's wrong.

(tested in 0.91a, lazylab 2.5)
---- Debugging information ----
message             : Failed calling method
cause-exception     : java.lang.NullPointerException
cause-message       : null
method              : com.fs.starfarer.campaign.fleet.FleetMember.readResolve()
class               : com.fs.starfarer.campaign.fleet.FleetMember
required-type       : com.fs.starfarer.campaign.fleet.FleetMember
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 9509
class[1]            : java.util.ArrayList
converter-type[1]   : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2]            : com.fs.starfarer.campaign.fleet.FleetData
class[3]            : com.fs.starfarer.campaign.fleet.CampaignFleet
class[4]            : com.fs.util.container.repo.ObjectRepository
class[5]            : com.fs.starfarer.campaign.StarSystem
class[6]            : com.fs.starfarer.campaign.CampaignPlanet
class[7]            : com.fs.starfarer.campaign.CircularOrbit
class[8]            : com.fs.starfarer.campaign.econ.Market
class[9]            : com.fs.starfarer.campaign.econ.reach.ReachEconomy
class[10]           : com.fs.starfarer.campaign.econ.reach.ReachEconomyStepper
class[11]           : com.fs.starfarer.campaign.econ.Economy
class[12]           : com.fs.starfarer.campaign.CustomCampaignEntity
class[13]           : com.fs.starfarer.campaign.StarSystem$UpdateFromHyperspaceLocation
class[14]           : com.fs.starfarer.campaign.BaseLocation$LocationToken
class[15]           : com.fs.starfarer.campaign.Hyperspace
class[16]           : com.fs.starfarer.campaign.CampaignEngine
converter-type[2]   : com.fs.starfarer.campaign.save.I
version             : not available



(tested in 0.95, lazylab 2.6)
com.thoughtworks.xstream.converters.ConversionException: Failed calling method
---- Debugging information ----
message             : Failed calling method
cause-exception     : java.lang.NullPointerException
cause-message       : null
method              : com.fs.starfarer.campaign.fleet.FleetMember.readResolve()
class               : com.fs.starfarer.campaign.fleet.FleetMember
required-type       : com.fs.starfarer.campaign.fleet.FleetMember
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
line number         : 134974
class[1]            : java.util.ArrayList
converter-type[1]   : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2]            : com.fs.starfarer.campaign.fleet.FleetData
class[3]            : com.fs.starfarer.campaign.fleet.CampaignFleet
class[4]            : com.fs.starfarer.campaign.ai.NavigationModule$AvoidData
class[5]            : com.fs.starfarer.api.util.TimeoutTracker$ItemData
class[6]            : com.fs.starfarer.api.util.TimeoutTracker
class[7]            : com.fs.starfarer.campaign.ai.NavigationModule
class[8]            : com.fs.starfarer.campaign.ai.ModularFleetAI
class[9]            : com.fs.util.container.repo.ObjectRepository
class[10]           : com.fs.starfarer.campaign.StarSystem
class[11]           : com.fs.starfarer.campaign.CampaignPlanet
class[12]           : com.fs.starfarer.campaign.CircularOrbit
class[13]           : com.fs.starfarer.campaign.econ.Market
class[14]           : com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteData
class[15]           : com.fs.starfarer.api.impl.campaign.fleets.RouteManager
class[16]           : com.fs.starfarer.campaign.econ.reach.ReachEconomy
class[17]           : com.fs.starfarer.campaign.econ.reach.ReachEconomyStepper
class[18]           : com.fs.starfarer.campaign.econ.Economy
class[19]           : com.fs.starfarer.campaign.StarSystem$UpdateFromHyperspaceLocation
class[20]           : com.fs.starfarer.campaign.BaseLocation$LocationToken
class[21]           : com.fs.starfarer.campaign.Hyperspace
class[22]           : com.fs.starfarer.campaign.CampaignEngine
converter-type[2]   : com.fs.starfarer.campaign.save.I
version             : not available

Complete starsector.log is here https://www.dropbox.com/s/6mrqjcjih2sy6kq/starsector.log?dl=0 (https://www.dropbox.com/s/6mrqjcjih2sy6kq/starsector.log?dl=0)
Title: Re: [0.95a] Combat Docking Module 004
Post by: Deshara on June 25, 2021, 11:49:22 PM
... I was just thinking abt how cruiser & capital carriers should be able to install frigate LPC's, and lo & behold some brilliant modder has basically done that already.
Title: Re: [0.95a] Combat Docking Module 004
Post by: Harpuea on June 26, 2021, 02:34:01 AM
Quote
Hi, I found out if there is one ship installed this hullmod, the save will be broken. It is a serious bug so this mod cannot work at all.When you are trying to load that broken save, a message will shows "error loading saved game" with some debuging information following. It happend on both 0.91 and 0.95. I will post it in both versions so you may find out what's wrong.

I was able to reproduce this problem. Sorry for the trouble. Updated to 005
Title: Re: [0.95a] Combat Docking Module 005
Post by: Kalaam on June 24, 2022, 09:14:32 AM
I am not sure how to use this mod. The module is to be placed on the small ships right ?
I haven't found any corvette yet and I am not certain shuttles are useful in combat (I am still beginning >.>) am I doing something wrong ?
Title: Re: [0.95a] Combat Docking Module 005
Post by: IGdood on June 24, 2022, 09:58:06 AM
I guess this post got necro'd and we're seeing some aspects of it in Arma Armatura.

This makes frigates more viable lategame if I understand it correctly. 
Title: Re: [0.95a] Combat Docking Module 005
Post by: Kalaam on June 24, 2022, 11:35:47 AM
Wait really ? I thought this mod was up to date.
I just really like the idea to repair frigate mid-battle but I think I do that wrong >.> What's that mod you talked about ?
Title: Re: [0.95a] Combat Docking Module 005
Post by: IGdood on June 24, 2022, 06:13:10 PM
Wait really ? I thought this mod was up to date.
I just really like the idea to repair frigate mid-battle but I think I do that wrong >.> What's that mod you talked about ?

Sorry I was writing while half asleep

I think this mod is up to date.  I'm not entirely sure what it seems to do other than give a hullmod that can be installed that allows certain ships to dock and repair like a fighter?

Arma Armatura has special ships that can do that but not as a hullmod sorry I'm not sure how to explain. 
Title: Re: [0.95a] Combat Docking Module 005
Post by: IGdood on June 26, 2022, 08:35:51 PM
Is there a way to edit the code or mod to have this hullmod be applicable to the frigate class in general? 
Having to white list every hull has become repetitive for me.