Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Modding: Skins: Possible issue with setting number of fighter bays?  (Read 866 times)

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile

Hi!

Just been mucking around with skins a bit to see what can and cannot be done with them.

I was trying to see if I could add/remove fighter bays (among other things) via a skin but couldn't work it out trying obvious things and I couldn't find any doco anywhere about what actually is possible with a skin file. So, I peeked inside starfarer_obf.jar and looked up how the skins are loaded (ShipHullSpecLoader I believe, via 2 methods (as far as I can work out), one which loads the initial hull via hull spec, and then another which applies the skin on a clone of the base hullSpec).

But the interesting thing is that there is actually a check for "fighterBays" but I don't think it is working as intended:
(I believe var1 is the skinSpec, var4 is the cloned hullSpec)
Quote
if (var1.has("fighterBays")) {
    var4.setFleetPoints(var1.getInt("fighterBays"));
}

So, unless I have this wrong, "fighterBays" is actually a valid property of the skin JSON but if it is set it will actually set the fleet points to this value?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Modding: Skins: Possible issue with setting number of fighter bays?
« Reply #1 on: November 13, 2019, 03:11:51 PM »

Yeah, you're super right about that. Fixed - thank you for letting me know!

(Also moved this thread; while it's clearly a vanilla bug, it doesn't show in vanilla since the feature is unused, and therefore belongs in the other subforum.)
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: Modding: Skins: Possible issue with setting number of fighter bays?
« Reply #2 on: November 13, 2019, 03:16:54 PM »

Yeah no worries :) I wasn't quite sure which forum it went in as I was pretty sure no vanilla ships used it!
Logged