-
Notifications
You must be signed in to change notification settings - Fork 37
Background Type
The game has a built-in enum called BackgroundType
, which sits in the CraftData
class. The possible values for this enum are listed below.
public enum BackgroundType
{
Normal,
Blueprint,
PlantWater,
PlantWaterSeed,
PlantAir,
PlantAirSeed,
ExosuitArm
}
To edit an item's background type, you need to call the CraftDataHandler.SetBackgroundType()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetBackgroundType([TechType] techType, [CraftData.BackgroundType] backgroundColor);
-
[TechType] techType
is the item that you want to modify the background color for. This can be both an existing and a custom item.
Example: TechType.Titanium
-
[CraftData.BackgroundType] backgroundColor
is the background color to set for the item.
Example: CraftData.BackgroundType.PlantAirSeed
Using this knowledge, if we wanted to make the background color for titanium green, we could do this:
CraftDataHandler.SetBackgroundType(TechType.Titanium, CraftData.BackgroundType.PlantAirSeed);
Congratulations! Now you can easily spot titanium in your inventory!
If there is something missing or ambiguous, please create an issue or contact us on the Subnautica Modding Discord using our tags:
- PrimeSonic:
@PrimeSonic#0667
- Metious:
@Metious#3682
Please note that some pages are under construction and the links to them will be enabled as they are completed
[Adding]
- Items/GameObjects using Asset Classes
- Asynchronous loading for ModPrefab
- [Custom Scanner Unlocks]
- Items/GameObjects to the Spawning System
- [Recipes to uncraftable items]
- [Custom Mouse Click Actions]
[Editing]
- Background Type
- Crafting Time
- Equipment Type
- Quick Slot Type
- Size in Inventory
- [Recipes for craftable items]
- Harvest Settings
- BioReactor Fuel Values
- [Scanning Count/Time]
- [Spawning (Where/How often/How many)]
[General Utilities]
- In-Game Options Menu
- Adding crafting recipes for other mods items
- Using items from other mods
- Texture/Sprite Utilities
- [Adding/Playing Audio]
- Config Files using Abstract Json Config class
- Custom Console Commands
- [Registering OnSave/OnQuit Actions]
[Language]