NoMansSky:Reference Guides/GcPlanetData-RE

From Step Mods | Change The Game

Template:TOC right

GcPlanetData-RE[edit | edit source]

The GcPlanetData struct is written to memory mainly by a single function that is nested within a function that generates the solar system data. A few locations that are useful to look at (all de-based 1.38 GOG exe): 0x140F07460 - This function contains quite a few functions that write terrain data, minable materials, weather and various other properties. A few of it's arguments are:

  • a2: The location in memory where the GcPlanetData struct will be written
  • a3: The section of memory after the GcPlanetData struct (ie. a2 +0x34F0)
  • a4: The 0x60 bytes of data before the GcPlanetData struct

Details on the planetdata struct can be found here.

By observing what reads and writes various values in the GcPlanetData struct we can find the functions used to generate these properties, which often leads back to finding globals as well as naming many variables within the exe.

As the GcPlanetData struct is mapped out for MBINCompiler, we will list the contents (if known) of both the pre and post-GcPlanetData sections.

Pre-GcPlanetData (0x60):

  • +0x58 - Index of planet in the system

Post-GcPlanetData(0x??):

  • +0x00 - Planet and voxelGen Seed
  • +0x10 - GalaxyStarType
  • +0x14 - PlanetClass

Template:NMSPageClose