Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Tartiflette on November 25, 2018, 01:30:48 PM

Title: Issue with proc_gen system names collision
Post by: Tartiflette 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)
Title: Re: Issue with proc_gen system names collision
Post by: Alex 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.
Title: Re: Issue with proc_gen system names collision
Post by: Alex 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...