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: 0.9a RC10 - Transverse Jump tooltip not listing supply cost (just fuel cost)  (Read 742 times)

Baqar79

  • Captain
  • ****
  • Posts: 351
    • View Profile

I noticed this a while ago and I swear that at one stage it did show me the supply cost.

I don't know Java (Only a tiny bit of Python), so I apologize for any offense caused by spouting ignorance; but I was curious and wanted to understand a bit better what was happening so I opened up the FractureJumpAbility.java and had a look. To my eyes, it looks like there is text written specifically for when there is no cost associated with supplies.  What I think is the tool-tip function; createTooltip(TooltipMakerAPI tooltip, boolean expanded) seems to rely on a function computeSupplyCost() for whether it displays the text in the tooltip with fuel and supplies or just fuel only.  Under computeSupplyCost() I found this:

float crCostFleetMult = fleet.getStats().getDynamic().getValue(Stats.EMERGENCY_BURN_CR_MULT); 

I guess (I could be embarrassingly wrong here) but the function that looks to be doing the actual work is applyEffect(float amount, float level), but it seems to have a slightly different version of crCostFleetMult:

float crCostFleetMult = fleet.getStats().getDynamic().getValue(Stats.DIRECT_JUMP_CR_MULT);

I don't know Java syntax, and don't know whether these differences have any bearing on the issue above.  My initial thought was that "Transverse Jump" uses the CR cost of "Emergency Burn" and that "Safety Features Level 3" removes the CR cost; but this is only for the tool-tip...and not the actual jump itself; perhaps why I thought I saw a supply cost earlier was because I hadn't maxed out "Safety Features" when I had "Transverse Jump"....am I way off....?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

Yep, you're right on. Fixed it up, it shouldn't have been applying the bonus from SP level 3.
Logged

Baqar79

  • Captain
  • ****
  • Posts: 351
    • View Profile

Oh, nice!...it's fun to figure something new out even if it is a tiny part of the whole.  I'll have to investigate this starfarer.api.zip further in future (good source of figuring out mechanics if I can at least make sense of the numbers and equations).

Meant to say "Safety Procedures" but you knew what I meant, thanks!  :D
Logged