Class PDAHandler
- 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
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)
public static void AddCustomScannerEntry(PDAScanner.EntryData entryData)
Parameters
entryDataPDAScanner.EntryData- The PDAScanner.EntryData of the entry. Must be populated when passed in.
AddCustomScannerEntry(TechType, float, bool, string)
public static void AddCustomScannerEntry(TechType key, float scanTime = 2, bool destroyAfterScan = false, string encyclopediaKey = null)
Parameters
keyTechType- The scanned object's TechType. In the case of fragments, the fragment TechType is the key.
scanTimefloat- The amount of time in seconds it takes to scan this object.
destroyAfterScanbool- Whether the object should be destroyed after the scan is finished.
encyclopediaKeystring- The key of the encyclopedia entry that is unlocked when
keyis scanned.
AddCustomScannerEntry(TechType, TechType, bool, int, float, bool, string)
public static void AddCustomScannerEntry(TechType key, TechType blueprint, bool isFragment, int totalFragmentsRequired, float scanTime = 2, bool destroyAfterScan = true, string encyclopediaKey = null)
Parameters
keyTechType- The scanned object's TechType. In the case of fragments, the fragment TechType is the key.
blueprintTechType- The
blueprintthat is unlocked whenkeyis scanned. In case of fragments, this is the actual TechType that unlocks when all fragments are scanned. Can be TechType.None. isFragmentbool- Whether the
keyis a fragment or not. totalFragmentsRequiredint- The total amount of objects of
keythat need to be scanned to unlock theblueprintandencyclopediaKey. scanTimefloat- The amount of time in seconds it takes to scan this object.
destroyAfterScanbool- Whether the object should be destroyed after the scan is finished.
encyclopediaKeystring- The key of the encyclopedia entry that is unlocked when all the fragments are scanned.
AddEncyclopediaEntry(EntryData)
public static void AddEncyclopediaEntry(PDAEncyclopedia.EntryData entry)
Parameters
entryPDAEncyclopedia.EntryData- The PDAEncyclopedia.EntryData entry.
AddEncyclopediaEntry(string, string, string, string, Texture2D, Sprite, FMODAsset, FMODAsset)
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
keystring- Key (internal ID) of this PDA entry, primarily used for the language system.
pathstringPath 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.
titlestring- Displayed title of the PDA entry in English. If set to null, you must implement your own translations. Language key is 'Ency_{
key}'. descstring- Displayed description of the PDA entry in English. If set to null, you must implement your own translations. Language key is 'EncyDesc_{
key}'. imageTexture2D- Databank entry image. Can be null.
popupImageSprite- Small popup image in the notification. Can be null.
unlockSoundFMODAsset- Sound on unlock. Typical values are UnlockBasic and UnlockImportant. If unassigned, will have a default value of UnlockBasic.
voiceLogFMODAsset- Audio player that will be displayed inside this PDA entry, typically used for voice logs. Can be null.
AddLogEntry(string, string, Sound, Sprite)
public static void AddLogEntry(string key, string languageKey, Sound sound, Sprite icon = null)
Parameters
keystring- The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKeystring- The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
soundSound- The sound that will be played once this log entry is unlocked or played through the PDA's Log tab.
iconSprite- 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)
public static void AddLogEntry(string key, string languageKey, FMODAsset sound, Sprite icon = null)
Parameters
keystring- The key (unique identifier) for this entry.
languageKeystring- The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
soundFMODAssetThe 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.
iconSprite- 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)
public static void AddLogEntry(string key, string languageKey, IFModSound fmodSound, Sprite icon = null)
Parameters
keystring- The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKeystring- The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
fmodSoundIFModSound- 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.
iconSprite- 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)
public static void AddLogEntry(string key, string languageKey, string soundFilePath, Sprite icon = null)
Parameters
keystring- The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKeystring- The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
soundFilePathstring- 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.
iconSprite- 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)
public static void AddLogEntry(string key, string languageKey, AudioClip audioClip, Sprite icon = null)
Parameters
keystring- The key (unique identifier) for this entry. Also used to create the sound asset, so make sure this string is truly unique!
languageKeystring- The subtitles language key for this entry. Also see: SetLanguageLine(string, string, string).
audioClipAudioClip- 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.
iconSprite- 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)
public static void EditFragmentScanTime(TechType techType, float scanTime)
Parameters
techTypeTechType- Can be either techtype of the fragment or the crafted item.
scanTimefloat- The relative time spent on scanning. Default value is 1.
EditFragmentsToScan(TechType, int)
public static void EditFragmentsToScan(TechType techType, int fragmentCount)
Parameters
techTypeTechType- Can be either techtype of the fragment or the crafted item.
fragmentCountint- The number of fragments to scan.