NoMansSky:Inventories

From Step Mods | Change The Game
Nomanssky flare.png

No Man's Sky Inventories

Introduction

Inventory management is one of the key aspect in NMS. Whatever you do, you will need to deal with some kind of inventory.
This page will try to cover all the aspects of NMS Inventories for modding purposes.
 

Labels

Inventories labels are stored in LANGUAGE files and mostly in NMS_UPDATE3 .MBIN file.
You can quickly find them all by searching for "_INVENTORY" in the converted language files to get all the related labels. Here is a small excerpt :

SUIT_TECH_INVENTORY_LABEL	{TECHNOLOGY}
SUIT_CARGO_INVENTORY_LABEL	{CARGO}
SUIT_INVENTORY_LABEL	{GENERAL}

 

Inventory sizes

Each inventory have its own starting and max slot number in the game.

Containers

Containers size are defined in METADATA\GAMESTATE\DEFAULTSAVEDATA.MBIN and METADATA\GAMESTATE\DEFAULTSAVEDATACREATIVE.MBIN for creative mode.

   <Property name="Chest1Layout" value="GcInventoryLayout.xml">
     <Property name="Slots" value="20" />
     <Property name="Seed" value="GcSeed.xml">
       <Property name="Seed" value="1" />
       <Property name="UseSeedValue" value="True" />
     </Property>
     <Property name="Level" value="1" />
   </Property>

Containers are referenced by the names Chest1Layout up to Chest10Layout and the size is defined by the Slots value.

Cooking Station

Cooking station size is defined in METADATA\GAMESTATE\DEFAULTSAVEDATA.MBIN and METADATA\GAMESTATE\DEFAULTSAVEDATACREATIVE.MBIN for creative mode.

   <Property name="CookingIngredientsLayout" value="GcInventoryLayout.xml">
     <Property name="Slots" value="25" />
     <Property name="Seed" value="GcSeed.xml">
       <Property name="Seed" value="1" />
       <Property name="UseSeedValue" value="True" />
     </Property>
     <Property name="Level" value="1" />
   </Property>

Exosuit

Exosuit inventories starting sizes are defined in METADATA\REALITY\DEFAULTREALITY.MBIN

 <Property name="SuitStartingSlotLayout" value="GcInventoryLayout.xml">
   <Property name="Slots" value="24" />
 <Property name="SuitTechOnlyStartingSlotLayout" value="GcInventoryLayout.xml">
   <Property name="Slots" value="0" />
 <Property name="SuitCargoStartingSlotLayout" value="GcInventoryLayout.xml">
   <Property name="Slots" value="0" />

Exosuit Cargo and Tech inventory max sizes are defined in METADATA\GAMESTATE\DEFAULTINVENTORYBALANCE.MBIN and DEFAULTINVENTORYBALANCESURVIVAL.MBIN for the survival mode but these settings are not used by the game.

 <Property name="PlayerPersonalInventoryTechWidth" value="7" />
 <Property name="PlayerPersonalInventoryTechHeight" value="2" />
 <Property name="PlayerPersonalInventoryCargoWidth" value="8" />
 <Property name="PlayerPersonalInventoryCargoHeight" value="6" />

Multitools

Multitools inventories are using min and max ranges based on the multitool type.
Exact sizes rules are defined in METADATA\REALITY\TABLES\INVENTORYTABLE.MBIN.

Starter multi-tool size :

   <Property value="GcInventoryTableEntry.xml">
     <Property name="Id" value="WEAPON_SMALL" />
     <Property name="MinSize" value="2" />
     <Property name="MaxSize" value="3" />
     <Property name="LayoutSizeType" value="GcInventoryLayoutSizeType.xml">
       <Property name="SizeType" value="WeaponSmall" />
     </Property>
   </Property>

Ingame procedural multitools sizes

     <Property name="WeaponSmall" value="GcInventoryLayoutGenerationDataEntry.xml">
       <Property name="MinSlots" value="5" />
       <Property name="MaxSlots" value="10" />
       <Property name="MinExtraTech" value="0" />
       <Property name="MaxExtraTech" value="30" />
     </Property>

Multi-tools have a maximum slot capacity set in METADATA\REALITY\TABLES\INVENTORYTABLE.MBIN.

 <Property name="WeaponInventoryMaxUpgradeSize" value="GcWeaponInventoryMaxUpgradeCapacity.xml">
   <Property name="MaxInventoryCapacity">
     <Property name="C" value="12" />
     <Property name="B" value="16" />
     <Property name="A" value="20" />
     <Property name="S" value="24" />
   </Property>
 </Property>

Ships

Starter ship main and tech inventory sizes are defined in in METADATA\REALITY\DEFAULTREALITY.MBIN.

 <Property name="ShipStartingLayout" value="GcInventoryLayout.xml">
   <Property name="Slots" value="14" />
 <Property name="ShipTechOnlyStartingLayout" value="GcInventoryLayout.xml">
   <Property name="Slots" value="2" />

Ships inventories are using min and max ranges based on the ship type and class.
All the rules are defined in METADATA\REALITY\TABLES\INVENTORYTABLE.MBIN.

Starter ship inventory sizes are set first :

   <Property value="GcInventoryTableEntry.xml">
     <Property name="Id" value="FIGHTER_SMALL" />
     <Property name="MinSize" value="1" />
     <Property name="MaxSize" value="1" />
     <Property name="LayoutSizeType" value="GcInventoryLayoutSizeType.xml">
       <Property name="SizeType" value="FgtSmall" />
     </Property>
   </Property>

In game ships are set as follows :

   <Property name="GenerationDataPerSizeType">
     <Property name="SciSmall" value="GcInventoryLayoutGenerationDataEntry.xml">
       <Property name="MinSlots" value="15" />
       <Property name="MaxSlots" value="19" />
       <Property name="MinExtraTech" value="3" />
       <Property name="MaxExtraTech" value="5" />
     </Property>

There's also a total maximum for each ship type

   <Property name="Freighter" value="GcShipInventoryMaxUpgradeCapacity.xml">
     <Property name="MaxInventoryCapacity">
       <Property value="24" />
       <Property value="32" />
       <Property value="40" />
       <Property value="48" />
     </Property>

 

Stack sizes

Each slot can contain a certain amount of items.
Slot sizes are all defined in METADATA\GAMESTATE\DEFAULTINVENTORYBALANCE.MBIN and DEFAULTINVENTORYBALANCESURVIVAL.MBIN for the survival mode.

 <Property name="DefaultSubstanceMaxAmount" value="9999" />
 <Property name="DefaultProductMaxAmount" value="1" />
 <Property name="CargoSubstanceStorageMultiplier" value="1" />
 <Property name="CargoProductStorageMultiplier" value="10" />
 <Property name="SubstanceMaxAmountLimit" value="9999" />
 <Property name="ProductMaxAmountLimit" value="9999" />

As you can see, there is a default and max (max) stack limit for substances and one for products, then these limits are extended for some inventories thanks to a simple multiplier.
In the excerp above, we can see that cargo inventories can stack up to 10 times the standard amount but as the ProductMaxAmountLimit is 9999, you will never get more than 9999 items in one slot, even in a cargo slot.

Some substance and products use some custom stack limit instead of the generic ones above.
For such items, the stack size is defined item per item as a multiplier in METADATA\REALITY\TABLES\NMS_REALITY_GCPRODUCTTABLE.MBIN and NMS_REALITY_GCSUBSTANCETABLE.MBIN.

 <Property value="GcProductData.xml">
     <Property name="Id" value="POWERCELL2" />
 ...
     <Property name="StackMultiplier" value="20" />


Slot Effects

Slots have some animation effects when the game wants to point them out.
These animations and sounds are defined in GCUIGLOBALS.GLOBAL.MBIN.

 <Property name="InstallTechSlotAction" value="GcInventorySlotActionData.xml">
   <Property name="Loops" value="False" />
   <Property name="Glows" value="False" />
   <Property name="Scales" value="True" />
   <Property name="Time" value="0.2" />
   <Property name="ScaleAtMin" value="2" />
   <Property name="SclaeAtMax" value="1" />
   <Property name="AnimCurve" value="TkCurveType.xml">
     <Property name="Curve" value="Linear" />
   </Property>
   <Property name="SuitAudio" value="GcAudioWwiseEvents.xml">
     <Property name="AkEvent" value="VO_TECH_INSTALLED" />
   </Property>
   <Property name="ActionAudio" value="GcAudioWwiseEvents.xml">
     <Property name="AkEvent" value="UI_TECH_INSTALLED" />
   </Property>
 </Property>

There are 7 of them : InstallTechSlotAction, BuildProductSlotAction, ChargeSlotAction, RepairSlotAction, NewSlotRevealAction, NewSlotPulseAction, InventoryHintAction.

 

Extension Costs

Exosuit inventories can be increased at the price of some units. These prices are defined in METADATA\REALITY\DEFAULTREALITY.MBIN.

 <Property name="SuitUpgradePrices">
   <Property value="5000" />
   <Property value="10000" />
   <Property value="20000" />
   ...
 <Property name="SuitTechOnlyUpgradePrices">
   <Property value="1000" />
   <Property value="5000" />
   ...
 <Property name="SuitCargoUpgradePrices">
   <Property value="5000" />
   <Property value="500000" />
   <Property value="100000" />
   ...