Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Author Topic: removing D-mods from the automated XIV ships  (Read 1260 times)

Philo_sophist

  • Ensign
  • *
  • Posts: 17
    • View Profile
removing D-mods from the automated XIV ships
« on: February 25, 2025, 09:47:41 PM »

The option to restore these hulls at a shipyard is not available, and the hull restoration skill doesn't work on them - Curious as to whether or not this can be done with save file/campaign.xml editing. I've no idea where to start, anyone have any knowledge on this?
Logged

kaoseth

  • Captain
  • ****
  • Posts: 318
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #1 on: February 25, 2025, 09:53:57 PM »

I can't answer your question, but I can tell you that this in vanilla, this is intentional.  There's some lore saying the sector lost the tech needed to repair them back when the first AI war happened.   

Logged

Wyvern

  • Admiral
  • *****
  • Posts: 4083
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #2 on: February 25, 2025, 10:46:14 PM »

If you really want to restore those hulls, you can do so via the console commands mod.

Put the ship you want to be able to repair in the first slot in your fleet, then copy the following command into console commands:
Code
runcode ((FleetMemberAPI)Global.getSector().getPlayerFleet().getFleetData().getMembersListCopy().get(0)).getVariant().removeTag( "unrestorable" )

Once you've done that, you should be able to restore the ship normally. (Note: If you're on the refit screen when you run these commands, you'll probably have to leave and return to it before you can restore the ship.)

This should also be doable via save file editing, too. Do a search for "unrestorable" and that should take you to the tags listing for these hulls, where you can then remove it. (Be careful, and keep a backup copy, though; save file editing - much like runcode commands - is an extremely brittle thing. Misplace a comma, or capitalize something wrong, or add an extra period that wasn't supposed to be there or..., and poof, the whole thing dies.)
Logged
Wyvern is 100% correct about the math.

majk

  • Commander
  • ***
  • Posts: 144
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #3 on: February 25, 2025, 11:41:57 PM »

You could do that, or you could get a few more dmods and field it and 8-10 more onslaughts for 22dp.

It's a logistical nightmare but so much fun to see enemy AI derp out when it sees what it has to deal with.
Logged

Philo_sophist

  • Ensign
  • *
  • Posts: 17
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #4 on: February 27, 2025, 10:27:43 AM »


This should also be doable via save file editing, too. Do a search for "unrestorable" and that should take you to the tags listing for these hulls, where you can then remove it. (Be careful, and keep a backup copy, though; save file editing - much like runcode commands - is an extremely brittle thing. Misplace a comma, or capitalize something wrong, or add an extra period that wasn't supposed to be there or..., and poof, the whole thing dies.)

I tried it both ways, both worked. Thanks for this. While I have you here....is there a similar console command line that would let me get rid of S-mods as well?
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 4083
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #5 on: February 27, 2025, 11:11:16 AM »

Sure. You'll need two commands for that, though.

Let's say, for this example, that you've s-modded in Resistant Flux Conduits, and now want it gone. The first thing we need to know is what that hullmod's ID is.
Code
list hullmods resistant flux conduits
Running that will tell us that the hullmod ID is "fluxbreakers"; armed with that knowledge, we can remove it:
Code
runcode ((FleetMemberAPI)Global.getSector().getPlayerFleet().getFleetData().getMembersListCopy().get(0)).getVariant().removePermaMod( "fluxbreakers" )
As with my previous examples, this bit of runcode will apply to whatever ship is first in your fleet.

(And as a note: the list command doesn't require the full hullmod name. You could just do a "list hullmods flux", for example, and it'll give you every hullmod with 'flux' in its name or ID. Which is a much smaller list than all hullmods, and easy enough to pick out the one you need from it.)


Edit/Addendum:
When you add an s-mod to a ship and then scuttle the ship, you get a 'refund' in the form of bonus XP, equivalent to whatever bonus XP you didn't get on adding the s-mod (i.e., 25% return on scuttling an s-modded frigate since that gave the other 75% when you added the s-mod, 100% return for a capital ship since that gave no bonus XP on adding it). The game tracks this - if you scuttle a ship that has s-mods you didn't add (for example, maybe you found one of the rare s-modded derelicts that are out there), you get no bonus XP from that.

I don't know where these values are stored (haven't felt a need to look it up), and don't know how it will interact with removing s-mods via code. I mean, obviously the code for removing the s-mod won't give you any bonus XP, but if you remove an s-mod and then scuttle the ship, how much bonus XP do you get from it? I don't know.
« Last Edit: February 27, 2025, 11:38:54 AM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Philo_sophist

  • Ensign
  • *
  • Posts: 17
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #6 on: February 27, 2025, 04:22:07 PM »

Sure. You'll need two commands for that, though.

Let's say, for this example, that you've s-modded in Resistant Flux Conduits, and now want it gone. The first thing we need to know is what that hullmod's ID is.
Code
list hullmods resistant flux conduits
Running that will tell us that the hullmod ID is "fluxbreakers"; armed with that knowledge, we can remove it:
Code
runcode ((FleetMemberAPI)Global.getSector().getPlayerFleet().getFleetData().getMembersListCopy().get(0)).getVariant().removePermaMod( "fluxbreakers" )
As with my previous examples, this bit of runcode will apply to whatever ship is first in your fleet.

(And as a note: the list command doesn't require the full hullmod name. You could just do a "list hullmods flux", for example, and it'll give you every hullmod with 'flux' in its name or ID. Which is a much smaller list than all hullmods, and easy enough to pick out the one you need from it.)


That's extremely helpful, thank you. I assume I can just replace "removePermaMod" with "addPermaMod" to add an s-mod onto the hull?
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 4083
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #7 on: February 27, 2025, 04:40:03 PM »

That's extremely helpful, thank you. I assume I can just replace "removePermaMod" with "addPermaMod" to add an s-mod onto the hull?
Close, but nope. You actually need addPermaMod( "modIDGoesHere", true ) to add an s-mod.

Putting false in will add the hullmod as a permanent non-s-mod; for an example, you can re-create the automated XIV ships with addPermaMod( "automated", false ) and addTag( "no_auto_penalty" ). (Well, and addTag( "unrestorable" ) and addPermaMod( "XXX", false ) for the various d-mods, but that seems counter to your interests.)
Logged
Wyvern is 100% correct about the math.

NephilimNexus

  • Commander
  • ***
  • Posts: 167
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #8 on: March 04, 2025, 12:39:49 PM »

There is a skill you can take that gives a chance to free repair one random D-Mod in your fleet per month, and thus far I've yet to find a ship that it excepted from the list.  Vanilla, too, I think.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 4083
    • View Profile
Re: removing D-mods from the automated XIV ships
« Reply #9 on: March 04, 2025, 04:01:23 PM »

There is a skill you can take that gives a chance to free repair one random D-Mod in your fleet per month, and thus far I've yet to find a ship that it excepted from the list.  Vanilla, too, I think.
That skill does not work on these specific ships. It also won't remove d-mods that are 'built in' to the hull, such as Ill-Advised Modifications.
Logged
Wyvern is 100% correct about the math.