No Man's Sky Modding Wiki
(Created page with "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...")
 
Tag: Visual edit
 
Line 13: Line 13:
   
 
'''''Pre-GcPlanetData (0x60):'''''
 
'''''Pre-GcPlanetData (0x60):'''''
  +
* +0x58 - Index of planet in the system
 
Will add more to this later...
 
   
 
'''''Post-GcPlanetData(0x??):'''''
 
'''''Post-GcPlanetData(0x??):'''''
 
*+0x00 - Planet and voxelGen Seed
 
*+0x00 - Planet and voxelGen Seed
  +
*+0x10 - GalaxyStarType
  +
*+0x14 - PlanetClass

Latest revision as of 13:29, 27 June 2018

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 writeen
  • 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: https://github.com/monkeyman192/MBINCompiler/blob/development/libMBIN/Source/Models/Structs/GcPlanetData.cs

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