Table of Contents

Class PDAHandler

Namespace
Nautilus.Handlers
Assembly
Nautilus.dll
A handler class for various PDA-related purposes:
  • Registering log entries.
  • Registering encyclopedia (databank) entries.
  • Defining data for scanning fragments and other items.
public static class PDAHandler
Inheritance
PDAHandler
Inherited Members

Properties

UnlockBasic

Sound asset used for unlocking most PDA entries, which is a short but pleasant sound. Path is 'event:/tools/scanner/new_encyclopediea'.
public static FMODAsset UnlockBasic { get; }

Property Value

FMODAsset

UnlockImportant

Subnautica:
Sound asset for unlocking important PDA entries, where PDA says "Integrating new PDA data." Path is 'event:/loot/new_PDA_data'.

Below Zero:
Sound asset for unlocking more important (generally story related) PDA entries. Path is 'event:/bz/ui/story_unlocked'.

public static FMODAsset UnlockImportant { get; }

Property Value

FMODAsset

Methods

AddCustomScannerEntry(EntryData)

Adds in a custom PDAScanner.EntryData. ***Cannot be used to Change the values of a techtype that has data already!***
public static void AddCustomScannerEntry(PDAScanner.EntryData entryData)

Parameters

entryData PDAScanner.EntryData
The PDAScanner.EntryData of the entry. Must be populated when passed in.

AddCustomScannerEntry(TechType, float, bool, string)

Registers a custom PDAScanner.EntryData. This simplified overload is for prefabs that do not have fragments.
public static void AddCustomScannerEntry(TechType key, float scanTime = 2, bool destroyAfterScan = false, string encyclopediaKey = null)

Parameters

key TechType
The scanned object's TechType. In the case of fragments, the fragment TechType is the key.
scanTime float
The amount of time in seconds it takes to scan this object.
destroyAfterScan bool
Whether the object should be destroyed after the scan is finished.
encyclopediaKey string
The key of the encyclopedia entry that is unlocked when key is scanned.

AddCustomScannerEntry(TechType, TechType, bool, int, float, bool, string)

Registers a custom PDAScanner.EntryData.
public static void AddCustomScannerEntry(TechType key, TechType blueprint, bool isFragment, int totalFragmentsRequired, float scanTime = 2, bool destroyAfterScan = true, string encyclopediaKey = null)

Parameters

key TechType
The scanned object's TechType. In the case of fragments, the fragment TechType is the key.
blueprint TechType
The blueprint that is unlocked when key is scanned. In case of fragments, this is the actual TechType that unlocks when all fragments are scanned. Can be TechType.None.
isFragment bool
Whether the key is a fragment or not.
totalFragmentsRequired int
The total amount of objects of key that need to be scanned to unlock the blueprint and encyclopediaKey.
scanTime float
The amount of time in seconds it takes to scan this object.
destroyAfterScan bool
Whether the object should be destroyed after the scan is finished.
encyclopediaKey string
The key of the encyclopedia entry that is unlocked when all the fragments are scanned.

AddEncyclopediaEntry(EntryData)

Adds custom entry.
public static void AddEncyclopediaEntry(PDAEncyclopedia.EntryData entry)

Parameters

entry PDAEncyclopedia.EntryData
The PDAEncyclopedia.EntryData entry.

AddEncyclopediaEntry(string, string, string, string, Texture2D, Sprite, FMODAsset, FMODAsset)

Registers a single encyclopedia entry into the game.
public static void AddEncyclopediaEntry(string key, string path, string title, string desc, Texture2D image = null, Sprite popupImage = null, FMODAsset unlockSound = null, FMODAsset voiceLog = null)

Parameters

key string
Key (internal ID) of this PDA entry, primarily used for the language system.
path string

Path to this entry in the databank.

To find examples of this string, open "Subnautica_Data\StreamingAssets\SNUnmanagedData\LanguageFiles\English.json" and search for "EncyPath". Remember to omit the "EncyPath_" prefix from these language keys. An example of a proper value is: "Lifeforms/Fauna/Leviathans".

A list of all Databank paths can also be found in this section of Nautilus's documentation.

title string
Displayed title of the PDA entry in English. If set to null, you must implement your own translations. Language key is 'Ency_{key}'.
desc string
Displayed description of the PDA entry in English. If set to null, you must implement your own translations. Language key is 'EncyDesc_{key}'.
image Texture2D
Databank entry image. Can be null.
popupImage Sprite
Small popup image in the notification. Can be null.
unlockSound FMODAsset
Sound on unlock. Typical values are UnlockBasic and UnlockImportant. If unassigned, will have a default value of UnlockBasic.
voiceLog FMODAsset
Audio player that will be displayed inside this PDA entry, typically used for voice logs. Can be null.

AddLogEntry(string, string, Sound, Sprite)

Adds a custom PDA log entry message. Can be played by the Story Goal system (see StoryGoalHandler) or manually through Add(string, bool).
public static void AddLogEntry(string key, string languageKey, Sound sound, Sprite icon = null)

Parameters

key string
The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKey string
The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
sound Sound
The sound that will be played once this log entry is unlocked or played through the PDA's Log tab.
icon Sprite
The icon that will be used in the Log tab for this entry. if unassigned, it will use the default log entry icon.

AddLogEntry(string, string, FMODAsset, Sprite)

Adds a custom PDA log entry message. Can be played by the Story Goal system (see StoryGoalHandler) or manually through Add(string, bool).
public static void AddLogEntry(string key, string languageKey, FMODAsset sound, Sprite icon = null)

Parameters

key string
The key (unique identifier) for this entry.
languageKey string
The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
sound FMODAsset

The sound that will be played once this log entry is unlocked or played through the PDA's Log tab.

Note that the SoundQueue system (which plays the PDA sounds) accesses the FMODAsset's "id" field rather than the path, so make sure it is assigned properly.

icon Sprite
The icon that will be used in the Log tab for this entry. if unassigned, it will use the default log entry icon.

AddLogEntry(string, string, IFModSound, Sprite)

Adds a custom PDA log entry message. Can be played by the Story Goal system (see StoryGoalHandler) or manually through Add(string, bool).
public static void AddLogEntry(string key, string languageKey, IFModSound fmodSound, Sprite icon = null)

Parameters

key string
The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKey string
The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
fmodSound IFModSound
The IFModSound instance that is used to create a custom sound. IFModSound instances have custom logic for playing sounds. that is accessed when this log entry is played.
icon Sprite
The icon that will be used in the Log tab for this entry. if unassigned, it will use the default log entry icon.

AddLogEntry(string, string, string, Sprite)

Adds a custom PDA log entry message. Can be played by the Story Goal system (see StoryGoalHandler) or manually through Add(string, bool).
public static void AddLogEntry(string key, string languageKey, string soundFilePath, Sprite icon = null)

Parameters

key string
The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKey string
The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
soundFilePath string
The file path on the disk to the sound that will be played once this log entry is unlocked or played through the PDA's Log tab.
icon Sprite
The icon that will be used in the Log tab for this entry. if unassigned, it will use the default log entry icon.

AddLogEntry(string, string, AudioClip, Sprite)

Adds a custom PDA log entry message. Can be played by the Story Goal system (see StoryGoalHandler) or manually through Add(string, bool).
public static void AddLogEntry(string key, string languageKey, AudioClip audioClip, Sprite icon = null)

Parameters

key string
The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKey string
The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
audioClip AudioClip
The sound that will be played once this log entry is unlocked or played through the PDA's Log tab. This is automatically converted to an FMOD sound.
icon Sprite
The icon that will be used in the Log tab for this entry. if unassigned, it will use the default log entry icon.

EditFragmentScanTime(TechType, float)

Edits the time it takes to finish scanning a fragment.
public static void EditFragmentScanTime(TechType techType, float scanTime)

Parameters

techType TechType
Can be either techtype of the fragment or the crafted item.
scanTime float
The relative time spent on scanning. Default value is 1.

EditFragmentsToScan(TechType, int)

Edits how many fragments must be scanned before unlocking the techtype's blueprint.
public static void EditFragmentsToScan(TechType techType, int fragmentCount)

Parameters

techType TechType
Can be either techtype of the fragment or the crafted item.
fragmentCount int
The number of fragments to scan.