goatfungus / NMSSaveEditor

No Man's Sky - Save Editor
1.84k stars 238 forks source link

CHANGED TO: Change freighter NPC spawn #80

Closed travisnewman closed 6 years ago

travisnewman commented 6 years ago

~I have a bug on my pre-NEXT save where all my specialists are in the ground to a certain degree. The korvax scientist is all the way under, the Vy'Keen weapon specialist and exocraft tech are about halfway, and the Gek overseer and farmer are just barely sunken.~

~I have a feeling that this is due to the NPC height calculation changing. I've been on a few Korvax freighters, for instance, and they're all normal height but the NPCs on my Korvax freighter are GIANTS.~

~There's a way to change the seed for the specialists, but you can't change the race (for kinda obvious reason). BUT they don't just say Korvax, Gek, Vy'Keen, it's Korvax (old), Gek (old), Vy'Keen (old). Is there any way we can switch between old and new models? Am I even understanding how that works properly?~

And while we're on the topic, doing the same thing for the freighter NPCs would be helpful too. They don't clip into the floor but it would be nice to make them a reasonable height.

goatfungus commented 6 years ago

I could add the ability to switch old specialists into new ones, but only in that direction (old->new). However, since the model is different they won't look the same as they did before, but by the sound of it you probably won't complain as long as it works.

The freighter ones are a little more complicated, as your old freighter will not have a home system seed (where you acquired it way back whenever). There is no other value in the save file which could be copied, as the save pre-NEXT did not have any home system seeds. So in order to make your freighter NPCs work like a new one in NEXT you would have to add a new home system seed in the field on the editor. Format = 0x123456789ABC

You could try pulling the numbers from your Portal Address in the Coordinate Viewer to get the system where you are, but it would be a bit of a trial and error thing, as setting this value will change your freighter colours as well as the NPCs. I am also not sure if you would need to clear the freighter NPC structure in the JSON editor as well, so would be good if someone tested this.

travisnewman commented 6 years ago

Lots of great info there. I'll make a copy of my save and tinker with the freighter stuff later this evening and let you know what I find.

BUT That one is less important/gamebreaking than the specialist issue. And yeah, rolling forward to new and not having them look the same is fine to me, back when I was hiring them I just grabbed the first one anyway. I am curious why that only works one way though (old->new), if you have the time and inclination to explain it.

goatfungus commented 6 years ago

Well, it could work either way to be honest, but the more HG expand this game the more old stuff will be broken, so if I did implement a feature to change the model into the new one it would be best to make it a one-way change only. That way people would only be upgrading their save to the most recent version instead of downgrading to something that may eventually be unsupported. Hope that makes sense.

travisnewman commented 6 years ago

Yep, it makes perfect sense.

travisnewman commented 6 years ago

OK so I tried a few things WRT the freighter:

  1. Changed the home system address. This did nothing by itself.
  2. Cleared everything inside the freighter NPC structure. This led to a save that wouldn't load.
  3. Cleared the surrounding structure as well, (including the comma that I forgot the first time... JSON has burned me so many times when I forget a comma, and yet I still miss them sometimes. ANYWAY...) That worked!

When I look at the JSON now that section didn't get re-generated so I assume the saves just use the home system seed for all of that now?

goatfungus commented 6 years ago

Ok, so the game logic is checking the freighter NPC seed first, and if that's not valid it uses the freighter home seed instead. HG sure picked a strange way of doing things. I'll look at clearing the freighter NPC structure in the editor when someone sets the home seed.

goatfungus commented 6 years ago

I have added an internal function to clear the old NPC structure when you set the home seed on a freighter (version 1.5.17). This should allow you to effectively control the NPCs on pre-NEXT freighters.

travisnewman commented 6 years ago

That’s awesome! But that part was kind of an afterthought. What about the first part, with bumping the specialists to the new race procgen?

travisnewman commented 6 years ago

(Not rushing or pushing just curious)

travisnewman commented 6 years ago

Actually, if it would help, I can make a separate issue for that. I should have done them separately to begin with!