Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Author Topic: Issue with proc_gen system names collision  (Read 466 times)

Tartiflette

  • Admiral
  • *****
  • Posts: 2781
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
Issue with proc_gen system names collision
« on: November 25, 2018, 01:30:48 PM »

So apparently now if a proc_gen system share name with a hand made one, bad stuff happen:

https://i.imgur.com/uwNHrfS.png

The system is actually empty inside, because there is another "Acheron" star created by the Scy Nation right to the bottom left of the image.

So would it be possible to add a check for existing names when generating the proc gen systems? (In the meantime I don't know how to fix that in an elegant manner that doesn't imply changing the entire naming theme of my mod)
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 15343
    • View Profile
Re: Issue with proc_gen system names collision
« Reply #1 on: November 25, 2018, 01:44:26 PM »

Is your mod adding systems before procgen? Does it call ProcgenUsedNames.notifyUsed("Acheron")? I believe that if both are true then this should be resolved.

Edit: double-checked, and the initStar() method is calling ProcgenUsedNames.notifyUsed(starName), so you shouldn't need to do that part. Hmm.
« Last Edit: November 25, 2018, 01:54:39 PM by Alex »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 15343
    • View Profile
Re: Issue with proc_gen system names collision
« Reply #2 on: November 26, 2018, 02:45:11 PM »

Just went through with a debugger; looks like core system names are indeed properly marked as "used" and that should prevent them from being used by procgen systems.

That would most likely indicate that the Scy Acheron is being created after procgen - either that, or somehow procgen is still managing to use it despite it looking like it shouldn't be able to...
Logged