Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Scripting: Function Request : getHullId()  (Read 2126 times)

DSMK2

  • Commander
  • ***
  • Posts: 101
    • View Profile
Scripting: Function Request : getHullId()
« on: August 03, 2012, 09:07:25 AM »

Could we get a function that returns the ship's hull id i.e. getHullId()? Given that we now have isApplicableToShip(), I would like to limit custom hull mods to certain ships through hull ids.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Scripting: Function Request : getHullId()
« Reply #1 on: August 03, 2012, 09:22:27 AM »

Hmmm... I wonder, could you achieve a similar thing by just having isApplicableToShip() always return false, and then include the mod on the variants for that ship?  Not 100% sure it'd work, and it'd be rather clunky for the player since you'd have to start from a variant instead of hitting "strip" if you wanted that hull mod.

But might be worth a try while waiting to see if Alex will implement your request.
Logged
Wyvern is 100% correct about the math.

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7209
  • Harpoon Affectionado
    • View Profile
Re: Scripting: Function Request : getHullId()
« Reply #2 on: August 03, 2012, 10:13:18 AM »

Isn't this what getSpecId() does in the FleetMemberAPI? I haven't tested it yet but thats what I'd assume.

CargoAPI --> FleetDataAPI --> (a list of) FleetMemberAPI
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Scripting: Function Request : getHullId()
« Reply #3 on: August 03, 2012, 11:25:32 AM »

Added getHullId() to ShipHullSpecAPI.
Logged

DSMK2

  • Commander
  • ***
  • Posts: 101
    • View Profile
Re: Scripting: Function Request : getHullId()
« Reply #4 on: August 03, 2012, 12:31:36 PM »

Thanks! Now to wait  :)
Logged

hadesian

  • Admiral
  • *****
  • Posts: 2058
  • It's been one of those days...
    • View Profile
Re: Scripting: Function Request : getHullId()
« Reply #5 on: August 03, 2012, 12:40:24 PM »

Are we potentially going to see a 0.53.1a?
Logged
Changes as of May 24, 2013
  • Reinvented Starsector.
  • That is all.