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: StarSystemAPI autogenerateHyperspaceJumpPoints() method not working as expected  (Read 1047 times)

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile

This is probably a question for Alex but...

I think the autogenerateHyperspaceJumpPoints(bool, bool) method has broken since 0.8.
The first argument should be whether to auto-generate jumps at gas-giants or not and the second argument should be whether to generate a fringe jump point.

iirc I tested this in 0.8 and it worked. However, now setting the arguments to autogenerateHyperspaceJumpPoints(false, true) will not result in the fringe jump point being created and as a result the system does not show up on the map. The only acceptable setting seems to be (true, true).

Am I wrong? Is this busted? I wanted to create a test system with a non-gas-giant and a single fringe jump point. Not sure if I can now. I'll have to use a different API to explicitly create a jump point...

Anyway, hope there's a solution or someone can find a mistake in my usage. Or maybe did the parameters' meaning change and I need to update my tutorial??? I'm starting to doubt my sanity...
Logged

Alex

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

Just taking a quick look at the method, nothing looks wrong - the parameters don't seem to be mixed up, and their operation seems to be independent of each other. Possible I'm missing something etc, but just at a glance, it seems like it ought to work. The "false, true" usage, though, I'm not sure it's actually called that way in vanilla so it's possible something more obscure is going wrong there. Haven't had a chance to really dig into that.
Logged

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile

Thanks for the quick reply, Alex.

I haven't found an implementation in vanilla that uses anything but "true, true". So if an example exists, it'll be in a mod (and I don't see the method used in mods at all, though I've only scratched the surface on all the code that's out there).

Anyway, I'll just use the standard jump point creation approach if I ever absolutely want to disable jump points around a gas giant in a custom system. If I have an issue with that, I'll post again.

I think this is a handy method, though. I like using it.
Logged

Alex

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

Had some time to look into it a bit more - and, right, ok. What was happening was that the first parameter also (erroneously) controlled whether the jump-point for the star was created or not. So (false, true) would still generate a fringe jump point, since the fringe point was indeed generated independently.

Fixed this for the next release!
Logged

WadeStar

  • Ensign
  • *
  • Posts: 30
    • View Profile

Thanks for looking into this! I appreciate it!
Logged

Alex

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

No problem, thank you for mentioning it!
Logged