The MemorySecret class#
Related module: pyzora.memory_secret
- class pyzora.memory_secret.MemorySecret(*args, **kwargs)#
Bases:
BaseSecretA memory secret to transfer between two NPCS in Holodrum and Labrynna.
- property memory#
The event tied to this secret. See MemoryEnum for more details.
- Type:
- property target_game#
The secret’s target game. See GameSecret.target_game for more details.
- Type:
- property is_return_secret#
Set this if this secret should be returned to the non-completed file.
- Type:
bool
- classmethod load(secret: bytearray | bytes | str, region: GameRegion) MemorySecret#
Load a memory secret from bytes or a string.
- Parameters:
secret (str or bytearray) – The secret string/byte array to decode (if secret is an instance of str, then it will be parsed prior to loading).
region (GameRegion) – The region to use when loading the secret.
- Raises:
SecretError – if the given data is not 20 bytes long (only if used with bytes or bytearray, since strings will be parsed and reduced to 20 bytes).
NotAMemoryCodeError – if the given data is not for a game secret.
ChecksumError – if the given data’s checksum doesn’t match the expected one.
- Returns:
A secret based on the data contained in secret.
- Return type: