### Read a BYML binary file with oead.Byml.from_binary() Source: https://oead.readthedocs.io/en/stable/byml_py.html Reads a BYML binary file using oead.Byml.from_binary() and demonstrates accessing nested data. The result is dict-like and list-like, allowing indexing and key access. The example shows how to retrieve a string value from a nested Hash. ```python import oead with open("ActorInfo.product.byml", "rb") as f: info = oead.Byml.from_binary(f.read()) # info is a dict-like info["Actors"] # Array(...) info["Actors"][0] # Hash({'bugMask': Byml(S32(1)), ..., 'name': Byml('EnemyFortressMgrTag'), ...}) info["Actors"][0]["name"] # 'EnemyFortressMgrTag' ``` -------------------------------- ### Read binary AAMP archive with oead.aamp.ParameterIO.from_binary() Source: https://oead.readthedocs.io/en/stable/aamp_py.html Reads a binary AAMP parameter archive from a file using oead.aamp.ParameterIO.from_binary(). The example opens "Horse.baiprog" in binary mode, parses it, and then shows how to access the archive version, type, and a specific parameter value. The output comments show that version is 0, type is "xml", and the parameter "Demo_Wait" has value 107. ```python import oead with open("Horse.baiprog", "rb") as f: pio = oead.aamp.ParameterIO.from_binary(f.read()) pio.version # 0 pio.type # "xml" pio.objects["DemoAIActionIdx"].params["Demo_Wait"] # Parameter(107) pio.objects["DemoAIActionIdx"].params["Demo_Wait"].v # 107 ``` -------------------------------- ### File Sarc::GetFile(u16 index) const Source: https://oead.readthedocs.io/en/stable/sarc.html Gets a file by index from the archive. Throws if the index is out of bounds. ```APIDOC ## File Sarc::GetFile(u16 index) const ### Description Get a file by index. Throws if index >= m_num_files. ### Method GetFile ### Parameters - **index** (u16) - Required - The index of the file to retrieve. ### Return Value File - The file at the given index. ### Exceptions Throws if index is out of bounds. ``` -------------------------------- ### oead.gsheet.Struct.get Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Gets the value associated with the given key, or the default if not found. ```APIDOC ## oead.gsheet.Struct.get(self: oead.gsheet.Struct, key: str, default: Optional[Union[oead.gsheet.Struct, bool, int, float, str, oead.gsheet.StructArray, oead.BufferBool, oead.BufferInt, oead.BufferF32, oead.BufferString, None]] = None) -> Optional[Union[oead.gsheet.Struct, bool, int, float, str, oead.gsheet.StructArray, oead.BufferBool, oead.BufferInt, oead.BufferF32, oead.BufferString, None]] ### Description Gets the value associated with the given key, or the default if not found. ### Parameters - **self** (oead.gsheet.Struct) - Required - The struct instance. - **key** (str) - Required - The key to look up. - **default** (Optional[Union[...]]) - Optional - The default value to return if the key is not found. ### Returns - **Optional[Union[...]]** - The value associated with the key, or the default. ``` -------------------------------- ### std::optional Sarc::GetFile(std::string_view name) const Source: https://oead.readthedocs.io/en/stable/sarc.html Gets a file by name from the archive. Returns an optional containing the file if found, otherwise nullopt. ```APIDOC ## std::optional Sarc::GetFile(std::string_view name) const ### Description Get a file by name. ### Method GetFile ### Parameters - **name** (std::string_view) - Required - The name of the file to retrieve. ### Return Value std::optional - The file if found, otherwise std::nullopt. ``` -------------------------------- ### oead.byml.get_string Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a string value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_string ### Description Gets a string value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_string(data: handle) -> str` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - str - The string value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.byml.get_uint64 Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a 64-bit unsigned integer value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_uint64 ### Description Gets a 64-bit unsigned integer value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_uint64(data: handle) -> int` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - int - The 64-bit unsigned integer value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.byml.get_int64 Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a 64-bit integer value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_int64 ### Description Gets a 64-bit integer value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_int64(data: handle) -> int` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - int - The 64-bit integer value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.aamp.NameTable.__init__ Source: https://oead.readthedocs.io/en/stable/aamp_py.html Constructs a new NameTable instance. Optionally initializes with Breath of the Wild strings. ```APIDOC ## oead.aamp.NameTable.__init__ ### Description Constructs a new NameTable instance. Optionally initializes with Breath of the Wild strings. ### Method Constructor ### Signature `__init__(self: oead.aamp.NameTable, with_botw_strings: bool) -> None` ### Parameters - **self** (oead.aamp.NameTable) - Required - The instance being constructed. - **with_botw_strings** (bool) - Required - Whether to initialize with Breath of the Wild strings. ### Returns None ``` -------------------------------- ### oead.aamp.ParameterIO.__init__ Source: https://oead.readthedocs.io/en/stable/aamp_py.html Constructs a new ParameterIO instance. This is the constructor for the ParameterIO class. ```APIDOC ## oead.aamp.ParameterIO.__init__ ### Description Constructs a new ParameterIO instance. ### Method Constructor ### Signature `__init__(self: oead.aamp.ParameterIO) -> None` ### Parameters - **self** (oead.aamp.ParameterIO) - Required - The instance being constructed. ### Returns None ``` -------------------------------- ### ParameterIO::FromBinary Source: https://oead.readthedocs.io/en/stable/aamp.html Loads a ParameterIO from a binary parameter archive. ```APIDOC ## ParameterIO::FromBinary ### Description Load a ParameterIO from a binary parameter archive. ### Method FromBinary (static) ### Signature static ParameterIO FromBinary(tcb::span data) ### Parameters - **data** (tcb::span) - Required - The binary parameter archive data. ### Returns ParameterIO - The loaded ParameterIO. ``` -------------------------------- ### oead.byml.get_int Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets an integer value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_int ### Description Gets an integer value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_int(data: handle) -> int` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - int - The integer value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.byml.get_float Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a float value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_float ### Description Gets a float value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_float(data: handle) -> float` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - float - The float value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.byml.get_bool Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a boolean value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_bool ### Description Gets a boolean value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_bool(data: handle) -> bool` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - bool - The boolean value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.BufferU32 Source: https://oead.readthedocs.io/en/stable/types_py.html Documentation for the oead.BufferU32 class, a mutable list-like object for unsigned 32-bit integers. ```APIDOC ## oead.BufferU32 ### Description Mutable list-like object that stores unsigned 32-bit integers. This class is the equivalent to `std::vector`. ### Methods #### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: oead.BufferU32, arg0: buffer) -> None` 2. `__init__(self: oead.BufferU32) -> None` 3. `__init__(self: oead.BufferU32, arg0: oead.BufferU32) -> None` Copy constructor 4. `__init__(self: oead.BufferU32, arg0: iterable) -> None` #### `append(self: oead.BufferU32, x: int) -> None` Add an item to the end of the list. #### `count(self: oead.BufferU32, x: int) -> int` Return the number of times `x` appears in the list. #### `extend(*args, **kwargs)` Overloaded function. 1. `extend(self: oead.BufferU32, L: oead.BufferU32) -> None` Extend the list by appending all the items in the given list. 2. `extend(self: oead.BufferU32, L: iterable) -> None` Extend the list by appending all the items in the given list. #### `insert(self: oead.BufferU32, i: int, x: int) -> None` Insert an item at a given position. #### `pop(*args, **kwargs)` Overloaded function. 1. `pop(self: oead.BufferU32) -> int` Remove and return the last item. 2. `pop(self: oead.BufferU32, i: int) -> int` Remove and return the item at index `i`. #### `remove(self: oead.BufferU32, x: int) -> None` Remove the first item from the list whose value is x. It is an error if there is no such item. ``` -------------------------------- ### oead.byml.get_uint Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets an unsigned integer value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_uint ### Description Gets an unsigned integer value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_uint(data: handle) -> int` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - int - The unsigned integer value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.gsheet.Sheet.__init__ Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Initializes a Sheet object. ```APIDOC ## oead.gsheet.Sheet.__init__(self: oead.gsheet.Sheet) -> None ### Description Initializes a Sheet object. ### Parameters - **self** (oead.gsheet.Sheet) - Required - The sheet instance. ### Returns - **None** ``` -------------------------------- ### oead.gsheet.Field.__init__ Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Initializes a Field object. ```APIDOC ## oead.gsheet.Field.__init__(self: oead.gsheet.Field) -> None ### Description Initializes a Field object. ### Parameters - **self** (oead.gsheet.Field) - Required - The field instance. ### Returns - **None** ``` -------------------------------- ### oead.byml.get_double Source: https://oead.readthedocs.io/en/stable/byml_py.html Gets a double (float) value from BYML data, performing type conversion if needed. ```APIDOC ## oead.byml.get_double ### Description Gets a double (float) value from BYML data, performing type conversion if needed. ### Function `oead.byml.get_double(data: handle) -> float` ### Parameters - **data** (handle) - Required - The BYML data to extract from. ### Returns - float - The double value. ### Exceptions - TypeError - If the value type is incorrect. ``` -------------------------------- ### oead.BufferF32 Source: https://oead.readthedocs.io/en/stable/types_py.html Documentation for the oead.BufferF32 class, a mutable list-like object for 32-bit floating-point numbers. ```APIDOC ## oead.BufferF32 ### Description Mutable list-like object that stores 32-bit floating-point numbers. This class is the equivalent to `std::vector`. ### Methods #### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: oead.BufferF32, arg0: buffer) -> None` 2. `__init__(self: oead.BufferF32) -> None` 3. `__init__(self: oead.BufferF32, arg0: oead.BufferF32) -> None` Copy constructor 4. `__init__(self: oead.BufferF32, arg0: iterable) -> None` #### `append(self: oead.BufferF32, x: float) -> None` Add an item to the end of the list. #### `count(self: oead.BufferF32, x: float) -> int` Return the number of times `x` appears in the list. #### `extend(*args, **kwargs)` Overloaded function. 1. `extend(self: oead.BufferF32, L: oead.BufferF32) -> None` Extend the list by appending all the items in the given list. 2. `extend(self: oead.BufferF32, L: iterable) -> None` Extend the list by appending all the items in the given list. #### `insert(self: oead.BufferF32, i: int, x: float) -> None` Insert an item at a given position. #### `pop(*args, **kwargs)` Overloaded function. 1. `pop(self: oead.BufferF32) -> float` Remove and return the last item. 2. `pop(self: oead.BufferF32, i: int) -> float` Remove and return the item at index `i`. #### `remove(self: oead.BufferF32, x: float) -> None` Remove the first item from the list whose value is x. It is an error if there is no such item. ``` -------------------------------- ### oead.aamp.ParameterIO.from_binary Source: https://oead.readthedocs.io/en/stable/aamp_py.html Static method that creates a ParameterIO instance from binary AAMP data. ```APIDOC ## oead.aamp.ParameterIO.from_binary ### Description Static method that creates a ParameterIO instance from binary AAMP data. ### Method Static Method ### Signature `from_binary(buffer: bytes) -> oead.aamp.ParameterIO` ### Parameters - **buffer** (bytes) - Required - The binary AAMP data to parse. ### Returns - **oead.aamp.ParameterIO** - The parsed ParameterIO instance. ``` -------------------------------- ### ParameterIO::FromText Source: https://oead.readthedocs.io/en/stable/aamp.html Loads a ParameterIO from a YAML representation. ```APIDOC ## ParameterIO::FromText ### Description Load a ParameterIO from a YAML representation. ### Method FromText (static) ### Signature static ParameterIO FromText(std::string_view yml_text) ### Parameters - **yml_text** (std::string_view) - Required - The YAML text to load. ### Returns ParameterIO - The loaded ParameterIO. ``` -------------------------------- ### oead.BufferString Source: https://oead.readthedocs.io/en/stable/types_py.html Documentation for the oead.BufferString class, a mutable list-like object for strings. ```APIDOC ## oead.BufferString ### Description Mutable list-like object that stores strings. This class is the equivalent to `std::vector`. ### Methods #### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: oead.BufferString) -> None` 2. `__init__(self: oead.BufferString, arg0: oead.BufferString) -> None` Copy constructor 3. `__init__(self: oead.BufferString, arg0: iterable) -> None` #### `append(self: oead.BufferString, x: str) -> None` Add an item to the end of the list. #### `count(self: oead.BufferString, x: str) -> int` Return the number of times `x` appears in the list. #### `extend(*args, **kwargs)` Overloaded function. 1. `extend(self: oead.BufferString, L: oead.BufferString) -> None` Extend the list by appending all the items in the given list. 2. `extend(self: oead.BufferString, L: iterable) -> None` Extend the list by appending all the items in the given list. #### `insert(self: oead.BufferString, i: int, x: str) -> None` Insert an item at a given position. #### `pop(*args, **kwargs)` Overloaded function. 1. `pop(self: oead.BufferString) -> str` Remove and return the last item. 2. `pop(self: oead.BufferString, i: int) -> str` Remove and return the item at index `i`. #### `remove(self: oead.BufferString, x: str) -> None` Remove the first item from the list whose value is x. It is an error if there is no such item. ``` -------------------------------- ### ParameterIO::ToBinary Source: https://oead.readthedocs.io/en/stable/aamp.html Serializes the ParameterIO to a binary parameter archive. ```APIDOC ## ParameterIO::ToBinary ### Description Serialize the ParameterIO to a binary parameter archive. ### Method ToBinary ### Signature std::vector ToBinary() const ### Parameters None ### Returns std::vector - The binary parameter archive data. ``` -------------------------------- ### oead.aamp.ParameterIO.to_binary Source: https://oead.readthedocs.io/en/stable/aamp_py.html Serializes the ParameterIO instance to binary AAMP format. ```APIDOC ## oead.aamp.ParameterIO.to_binary ### Description Serializes the ParameterIO instance to binary AAMP format. ### Method Method ### Signature `to_binary(self: oead.aamp.ParameterIO) -> bytes` ### Parameters - **self** (oead.aamp.ParameterIO) - Required - The instance to serialize. ### Returns - **bytes** - The binary AAMP representation. ``` -------------------------------- ### oead.aamp.ParameterIO.from_text Source: https://oead.readthedocs.io/en/stable/aamp_py.html Static method that creates a ParameterIO instance from YAML text. ```APIDOC ## oead.aamp.ParameterIO.from_text ### Description Static method that creates a ParameterIO instance from YAML text. ### Method Static Method ### Signature `from_text(yml_text: str) -> oead.aamp.ParameterIO` ### Parameters - **yml_text** (str) - Required - The YAML text to parse. ### Returns - **oead.aamp.ParameterIO** - The parsed ParameterIO instance. ``` -------------------------------- ### oead.aamp.ParameterIO.version Source: https://oead.readthedocs.io/en/stable/aamp_py.html Property that returns the version of the ParameterIO instance. ```APIDOC ## oead.aamp.ParameterIO.version ### Description Property that returns the version of the ParameterIO instance. ### Method Property ### Signature `version` ### Returns - The version of the ParameterIO instance. ``` -------------------------------- ### oead.aamp.ParameterList Source: https://oead.readthedocs.io/en/stable/aamp_py.html Represents a list of parameters and sub-lists. ```APIDOC ## oead.aamp.ParameterList ### Description Represents a list of parameters and sub-lists. ### Constructor `__init__(self: oead.aamp.ParameterList) -> None` ### Properties - **lists** - The sub-lists. - **objects** - The parameter objects. ``` -------------------------------- ### oead.gsheet.Field.x11 Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Unknown; depth level? ```APIDOC ## oead.gsheet.Field.x11 (property) ### Description Unknown; depth level? ### Returns - **int** - The value. ``` -------------------------------- ### oead.aamp.ParameterMap Source: https://oead.readthedocs.io/en/stable/aamp_py.html Lightweight dict-like object wrapping a oead::aamp::ParameterMap. ```APIDOC ## oead.aamp.ParameterMap ### Description Lightweight dict-like object wrapping a `oead::aamp::ParameterMap`. ### Constructor Overloaded function. 1. `__init__(self: oead.aamp.ParameterMap) -> None` 2. `__init__(self: oead.aamp.ParameterMap, iterator: iterator) -> None` 3. `__init__(self: oead.aamp.ParameterMap, dictionary: dict) -> None` ### Methods - **clear(self: aamp.ParameterMap) -> None** - Clears the map. - **get(self: aamp.ParameterMap, key: oead.aamp.Name, default: Optional[oead.aamp.Parameter] = None) -> Optional[oead.aamp.Parameter]** - Returns the value for the given key, or the default if not found. - **items(self: aamp.ParameterMap) -> iterator** - Returns an iterator over key-value pairs. - **keys(self: aamp.ParameterMap) -> iterator** - Returns an iterator over keys. ``` -------------------------------- ### Byml Class Reference Source: https://oead.readthedocs.io/en/stable/byml.html This section documents the public API of the Byml class, including static factory methods, serialization methods, and typed getters. ```APIDOC ## Byml::FromBinary ### Description Load a BYML document from binary data. This static function parses the given binary span and returns a Byml value. ### Method Static function ### Parameters - **data** (tcb::span) - Required - The binary data to parse. ### Returns - **Byml** - The parsed BYML value. ## Byml::FromText ### Description Load a BYML document from YAML text. This static function parses the given YAML string and returns a Byml value. ### Method Static function ### Parameters - **yml_text** (std::string_view) - Required - The YAML text to parse. ### Returns - **Byml** - The parsed BYML value. ## Byml::ToBinary ### Description Serialize the document to BYML with the specified endianness and version number. This can only be done for Null, Array or Hash nodes. ### Method Member function ### Parameters - **big_endian** (bool) - Required - Whether to use big endian byte order. - **version** (int) - Optional - The BYML version number (default 2). ### Returns - **std::vector** - The serialized BYML binary data. ## Byml::ToText ### Description Serialize the document to YAML. This can only be done for Null, Array or Hash nodes. ### Method Member function ### Returns - **std::string** - The YAML representation of the document. ## Byml::GetType ### Description Get the type of the BYML value. ### Method Member function ### Returns - **Type** - The type of the value (e.g., Null, String, Array, etc.). ## Byml::Get (template) ### Description Get a value from the BYML node. The template parameter specifies the expected type. For map/hash nodes, a key and default value can be provided. ### Method Member function (template) ### Parameters - **key** (std::string_view) - Optional - The key to look up in a hash node. - **default** (T) - Optional - The default value to return if the key is not found. ### Returns - **Reference** - A reference to the value, or the default if not found. ## Byml::GetHash ### Description Get the hash (map) value. Throws if the node is not a hash. ### Method Member function ### Returns - **Hash&** - The hash value. ## Byml::GetArray ### Description Get the array value. Throws if the node is not an array. ### Method Member function ### Returns - **Array&** - The array value. ## Byml::GetString ### Description Get the string value. Throws if the node is not a string. ### Method Member function ### Returns - **String&** - The string value. ## Byml::GetBinary ### Description Get the binary value. Throws if the node is not binary. ### Method Member function ### Returns - **std::vector&** - The binary value. ## Byml::GetBool ### Description Get the boolean value. Throws if the node is not a bool. ### Method Member function ### Returns - **bool** - The boolean value. ## Byml::GetInt ### Description Get the signed 32-bit integer value. Throws if the node is not an int. ### Method Member function ### Returns - **s32** - The integer value. ## Byml::GetUInt ### Description Get the unsigned 32-bit integer value. Throws if the node is not a uint. ### Method Member function ### Returns - **u32** - The unsigned integer value. ## Byml::GetFloat ### Description Get the 32-bit float value. Throws if the node is not a float. ### Method Member function ### Returns - **f32** - The float value. ## Byml::GetInt64 ### Description Get the signed 64-bit integer value. Throws if the node is not an int64. ### Method Member function ### Returns - **s64** - The 64-bit integer value. ## Byml::GetUInt64 ### Description Get the unsigned 64-bit integer value. Throws if the node is not a uint64. ### Method Member function ### Returns - **u64** - The unsigned 64-bit integer value. ## Byml::GetDouble ### Description Get the 64-bit float (double) value. Throws if the node is not a double. ### Method Member function ### Returns - **f64** - The double value. ## Byml::Reference ### Description A reference wrapper used to return values from map/hash lookups. Provides pointer-like access to the referenced value. ### Methods - **operator->** - Returns a pointer to the referenced value. - **operator*** - Returns a reference to the referenced value. ### Constructors - **Reference(T value)** - Constructs a reference from a value. - **Reference(std::reference_wrapper value)** - Constructs a reference from a reference wrapper. ``` -------------------------------- ### oead.aamp.ParameterListMap Source: https://oead.readthedocs.io/en/stable/aamp_py.html Lightweight dict-like object wrapping a oead::aamp::ParameterListMap. ```APIDOC ## oead.aamp.ParameterListMap ### Description Lightweight dict-like object wrapping a `oead::aamp::ParameterListMap`. ### Constructor Overloaded function. 1. `__init__(self: oead.aamp.ParameterListMap) -> None` 2. `__init__(self: oead.aamp.ParameterListMap, iterator: iterator) -> None` 3. `__init__(self: oead.aamp.ParameterListMap, dictionary: dict) -> None` ### Methods - **clear(self: aamp.ParameterListMap) -> None** - Clears the map. - **get(self: aamp.ParameterListMap, key: oead.aamp.Name, default: Optional[oead.aamp.ParameterList] = None) -> Optional[oead.aamp.ParameterList]** - Returns the value for the given key, or the default if not found. - **items(self: aamp.ParameterListMap) -> iterator** - Returns an iterator over key-value pairs. - **keys(self: aamp.ParameterListMap) -> iterator** - Returns an iterator over keys. ``` -------------------------------- ### oead.gsheet.Field.fields Source: https://oead.readthedocs.io/en/stable/gsheet_py.html [For structs] Fields. ```APIDOC ## oead.gsheet.Field.fields (property) ### Description [For structs] Fields. ### Returns - **list** - The fields. ``` -------------------------------- ### oead.byml.to_binary Source: https://oead.readthedocs.io/en/stable/byml_py.html Serializes BYML data to binary format. ```APIDOC ## oead.byml.to_binary ### Description Serializes BYML data to binary format. ### Function `oead.byml.to_binary(data: handle, big_endian: bool, version: int = 2) -> oead.Bytes` ### Parameters - **data** (handle) - Required - The BYML data to serialize. - **big_endian** (bool) - Required - Whether to use big-endian byte order. - **version** (int) - Optional - BYML version, defaults to 2. ### Returns - oead.Bytes - The serialized binary data. ### See Also `oead::Byml::ToBinary` ``` -------------------------------- ### oead.aamp.ParameterIO.to_text Source: https://oead.readthedocs.io/en/stable/aamp_py.html Serializes the ParameterIO instance to YAML text. ```APIDOC ## oead.aamp.ParameterIO.to_text ### Description Serializes the ParameterIO instance to YAML text. ### Method Method ### Signature `to_text(self: oead.aamp.ParameterIO) -> str` ### Parameters - **self** (oead.aamp.ParameterIO) - Required - The instance to serialize. ### Returns - **str** - The YAML text representation. ``` -------------------------------- ### oead.gsheet.Struct.__init__ Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Initializes a Struct object. Overloaded: can be called with no arguments, an iterator, or a dictionary. ```APIDOC ## oead.gsheet.Struct.__init__(*args, **kwargs) ### Description Initializes a Struct object. Overloaded: can be called with no arguments, an iterator, or a dictionary. ### Parameters - **args** - Optional - Either no arguments, an iterator, or a dictionary. - **kwargs** - Optional - Keyword arguments. ``` -------------------------------- ### oead.gsheet.Sheet.to_binary Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Converts the sheet to a binary datasheet. ```APIDOC ## oead.gsheet.Sheet.to_binary(self: oead.gsheet.Sheet) -> oead.Bytes ### Description Converts the sheet to a binary datasheet. ### Parameters - **self** (oead.gsheet.Sheet) - Required - The sheet instance. ### Returns - **oead.Bytes** - The binary representation of the datasheet. ``` -------------------------------- ### ParameterIO::ToText Source: https://oead.readthedocs.io/en/stable/aamp.html Serializes the ParameterIO to a YAML representation. ```APIDOC ## ParameterIO::ToText ### Description Serialize the ParameterIO to a YAML representation. ### Method ToText ### Signature std::string ToText() const ### Parameters None ### Returns std::string - The YAML representation of the ParameterIO. ``` -------------------------------- ### oead.byml.from_binary Source: https://oead.readthedocs.io/en/stable/byml_py.html Reads a BYML binary buffer and returns the parsed data as an Array or Hash. ```APIDOC ## oead.byml.from_binary ### Description Reads a BYML binary buffer and returns the parsed data as an Array or Hash. ### Function `oead.byml.from_binary(buffer: BytesLike) -> Union[None, str, oead.Bytes, Array, Hash, bool, oead.S32, oead.F32, oead.U32, oead.S64, oead.U64, oead.F64]` ### Parameters - **buffer** (BytesLike) - Required - The binary BYML data to parse. ### Returns - An Array or a Hash. ### See Also `oead::Byml::FromBinary` ``` -------------------------------- ### oead::aamp::GetDefaultNameTable Source: https://oead.readthedocs.io/en/stable/aamp.html Returns the default instance of the name table, automatically populated with Breath of the Wild strings. Initialised on first use. ```APIDOC ## oead::aamp::GetDefaultNameTable ### Description Returns the default instance of the name table, which is automatically populated with Breath of the Wild strings. Initialised on first use. ### Method GetDefaultNameTable ### Signature NameTable& GetDefaultNameTable() ### Parameters None ### Returns NameTable& - Reference to the default name table. ``` -------------------------------- ### oead.aamp.ParameterObjectMap Source: https://oead.readthedocs.io/en/stable/aamp_py.html Lightweight dict-like object wrapping a oead::aamp::ParameterObjectMap. ```APIDOC ## oead.aamp.ParameterObjectMap ### Description Lightweight dict-like object wrapping a `oead::aamp::ParameterObjectMap`. ### Constructor Overloaded function. 1. `__init__(self: oead.aamp.ParameterObjectMap) -> None` 2. `__init__(self: oead.aamp.ParameterObjectMap, iterator: iterator) -> None` 3. `__init__(self: oead.aamp.ParameterObjectMap, dictionary: dict) -> None` ### Methods - **clear(self: aamp.ParameterObjectMap) -> None** - Clears the map. - **get(self: aamp.ParameterObjectMap, key: oead.aamp.Name, default: Optional[oead.aamp.ParameterObject] = None) -> Optional[oead.aamp.ParameterObject]** - Returns the value for the given key, or the default if not found. - **items(self: aamp.ParameterObjectMap) -> iterator** - Returns an iterator over key-value pairs. - **keys(self: aamp.ParameterObjectMap) -> iterator** - Returns an iterator over keys. ``` -------------------------------- ### oead.BufferF32 Source: https://oead.readthedocs.io/en/stable/types_py.html Mutable list-like object that stores binary32 floats. Equivalent to std::vector. ```APIDOC ## `oead.BufferF32` ### Description Mutable list-like object that stores binary32 floating point numbers. This class is the equivalent to `std::vector`. ### Methods (Note: The source text does not list explicit methods for BufferF32. The description indicates it is a list-like object storing binary32 floats, but no methods are documented in the provided text.) #### Available methods (based on the pattern of similar buffer classes, but not explicitly documented in source): - `__init__(*args, **kwargs)` - Constructors (overloaded) - `append(self, x: float) -> None` - `count(self, x: float) -> int` - `extend(*args, **kwargs)` - `insert(self, i: int, x: float) -> None` - `pop(*args, **kwargs)` - `remove(self, x: float) -> None` ``` -------------------------------- ### SarcWriter.FileMap Source: https://oead.readthedocs.io/en/stable/sarc_py.html Documentation for the FileMap class, a mapping used by SarcWriter to store file data. ```APIDOC ## SarcWriter.FileMap ### Description A mapping of file names to file data (bytes) used by SarcWriter. ### Constructors - `FileMap() -> None` - `FileMap(iterator: iterator) -> None` - `FileMap(dictionary: dict) -> None` ### Methods - `clear() -> None` - `get(key: str, default: Optional[oead.Bytes] = None) -> Optional[oead.Bytes]` - `items() -> iterator` - `keys() -> iterator` ### Description - `clear`: Removes all entries. - `get`: Returns the value for the given key, or the default if not found. - `items`: Returns an iterator over key-value pairs. - `keys`: Returns an iterator over keys. ``` -------------------------------- ### oead.FixedSafeString64 Source: https://oead.readthedocs.io/en/stable/types_py.html The FixedSafeString64 class represents a fixed-size safe string with a maximum length of 64 characters. It provides constructors to create an empty string or initialize from a Python string. ```APIDOC ## FixedSafeString64 ### Description Represents a fixed-size safe string with a maximum length of 64 characters. See also `oead::FixedSafeString`. ### Constructor - `__init__(self: oead.FixedSafeString64) -> None` - `__init__(self: oead.FixedSafeString64, arg0: str) -> None` ``` -------------------------------- ### u32 Sarc::GetDataOffset() const Source: https://oead.readthedocs.io/en/stable/sarc.html Returns the offset to the beginning of file data in the archive. This method is part of the Sarc class. ```APIDOC ## u32 Sarc::GetDataOffset() const ### Description Get the offset to the beginning of file data. ### Method GetDataOffset ### Return Value u32 - The offset to the beginning of file data. ``` -------------------------------- ### NameTable::AddName (string) Source: https://oead.readthedocs.io/en/stable/aamp.html Adds a known string to the name table. ```APIDOC ## NameTable::AddName (string) ### Description Add a known string to the name table. ### Method AddName ### Signature std::string_view AddName(std::string name) ### Parameters - **name** (std::string) - Required - The string to add. ### Returns std::string_view - A view to the added string. ``` -------------------------------- ### oead.FixedSafeString32 Source: https://oead.readthedocs.io/en/stable/types_py.html The FixedSafeString32 class represents a fixed-size safe string with a maximum length of 32 characters. It provides constructors to create an empty string or initialize from a Python string. ```APIDOC ## FixedSafeString32 ### Description Represents a fixed-size safe string with a maximum length of 32 characters. See also `oead::FixedSafeString`. ### Constructor - `__init__(self: oead.FixedSafeString32) -> None` - `__init__(self: oead.FixedSafeString32, arg0: str) -> None` ``` -------------------------------- ### oead.gsheet.parse Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Parses a binary datasheet and returns a Sheet object. ```APIDOC ## oead.gsheet.parse(data: oead.Bytes) -> oead.gsheet.Sheet ### Description Parses a binary datasheet and returns a Sheet object. ### Parameters - **data** (oead.Bytes) - Required - The binary datasheet data to parse. ### Returns - **oead.gsheet.Sheet** - The parsed datasheet. ``` -------------------------------- ### oead.gsheet.Sheet.root_fields Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Root fields property. ```APIDOC ## oead.gsheet.Sheet.root_fields (property) ### Description Root fields property. ### Returns - **list** - The root fields. ``` -------------------------------- ### oead.aamp.get_default_name_table Source: https://oead.readthedocs.io/en/stable/aamp_py.html Returns the default instance of the name table. This instance is modifiable. ```APIDOC ## oead.aamp.get_default_name_table ### Description Returns the default instance of the name table. This instance is modifiable. ### Method Function ### Signature `get_default_name_table() -> oead.aamp.NameTable` ### Parameters None ### Returns - **oead.aamp.NameTable** - The default name table instance. ``` -------------------------------- ### auto Sarc::GetFiles() const Source: https://oead.readthedocs.io/en/stable/sarc.html Returns an iterator over the contained files. The exact return type is implementation-defined. ```APIDOC ## auto Sarc::GetFiles() const ### Description Returns an iterator over the contained files. ### Method GetFiles ### Return Value auto - An iterator over the contained files. ``` -------------------------------- ### void SarcWriter::SetMinAlignment(size_t alignment) Source: https://oead.readthedocs.io/en/stable/sarc.html Sets the minimum data alignment for the SarcWriter. The alignment must be a power of 2. ```APIDOC ## void SarcWriter::SetMinAlignment(size_t alignment) ### Description Set the minimum data alignment. ### Method SetMinAlignment ### Parameters - **alignment** (size_t) - Required - Data alignment (must be a power of 2). ``` -------------------------------- ### oead.Quatf Source: https://oead.readthedocs.io/en/stable/types_py.html The Quatf class represents a quaternion with a, b, c, and d components. It provides a constructor and properties to access the components. ```APIDOC ## Quatf ### Description Represents a quaternion with a, b, c, and d components. See also `oead::Quatf`. ### Constructor - `__init__(self: oead.Quatf) -> None` ### Properties - **a** (float) - The a component. - **b** (float) - The b component. - **c** (float) - The c component. - **d** (float) - The d component. ``` -------------------------------- ### NameTable::AddName (hash, string) Source: https://oead.readthedocs.io/en/stable/aamp.html Adds a known string to the name table using a precomputed hash to avoid recomputation. ```APIDOC ## NameTable::AddName (hash, string) ### Description Add a known string to the name table. This should be used if the string's hash has already been computed in order to avoid recomputing it. ### Method AddName ### Signature std::string_view AddName(u32 hash, std::string name) ### Parameters - **hash** (u32) - Required - The precomputed hash of the string. - **name** (std::string) - Required - The string to add. ### Returns std::string_view - A view to the added string. ``` -------------------------------- ### oead.FixedSafeString48 Source: https://oead.readthedocs.io/en/stable/types_py.html The FixedSafeString48 class represents a fixed-size safe string with a maximum length of 48 characters. It provides constructors to create an empty string or initialize from a Python string. ```APIDOC ## FixedSafeString48 ### Description Represents a fixed-size safe string with a maximum length of 48 characters. See also `oead::FixedSafeString`. ### Constructor - `__init__(self: oead.FixedSafeString48) -> None` - `__init__(self: oead.FixedSafeString48, arg0: str) -> None` ``` -------------------------------- ### oead.FixedSafeString16 Source: https://oead.readthedocs.io/en/stable/types_py.html The FixedSafeString16 class represents a fixed-size safe string with a maximum length of 16 characters. It provides constructors to create an empty string or initialize from a Python string. ```APIDOC ## FixedSafeString16 ### Description Represents a fixed-size safe string with a maximum length of 16 characters. See also `oead::FixedSafeString`. ### Constructor - `__init__(self: oead.FixedSafeString16) -> None` - `__init__(self: oead.FixedSafeString16, arg0: str) -> None` ``` -------------------------------- ### oead.gsheet.Field.type_name Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Type name. ```APIDOC ## oead.gsheet.Field.type_name (property) ### Description Type name. ### Returns - **str** - The type name. ``` -------------------------------- ### Yaz0 API Source: https://oead.readthedocs.io/en/stable/yaz0.html Functions for Yaz0 decompression and compression. ```APIDOC ## GetHeader ### Description Retrieves the Yaz0 header from the given data. ### Method GetHeader ### Parameters - **data** (tcb::span) - Required - Source data ### Returns std::optional
- The header if present, otherwise std::nullopt. ``` ```APIDOC ## Compress ### Description Compresses the given source data using Yaz0 compression. ### Method Compress ### Parameters - **src** (tcb::span) - Required - Source data - **data_alignment** (u32) - Optional - Required buffer alignment hint for decompression (default: 0) - **level** (int) - Optional - Compression level (6 to 9; 6 is fastest and 9 is slowest) (default: 7) ### Returns std::vector - The compressed data. ``` ```APIDOC ## Decompress (overload 1) ### Description Decompresses the given Yaz0-compressed data and returns the uncompressed data. ### Method Decompress ### Parameters - **src** (tcb::span) - Required - Source data ### Returns std::vector - The decompressed data. ``` ```APIDOC ## Decompress (overload 2) ### Description Decompresses the given Yaz0-compressed data into a pre-allocated destination buffer. The header is assumed to be valid, and the buffer size must be equal to the uncompressed data size. ### Method Decompress ### Parameters - **src** (tcb::span) - Required - Source data - **dst** (tcb::span) - Required - Destination buffer ### Returns void ``` ```APIDOC ## DecompressUnsafe ### Description Decompresses the given Yaz0-compressed data into a pre-allocated destination buffer, assuming the source is well-formed. DO NOT USE THIS FOR UNTRUSTED SOURCES. ### Method DecompressUnsafe ### Parameters - **src** (tcb::span) - Required - Source data - **dst** (tcb::span) - Required - Destination buffer ### Returns void ``` -------------------------------- ### oead.gsheet.Sheet.hash Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Hash property. ```APIDOC ## oead.gsheet.Sheet.hash (property) ### Description Hash property. ### Returns - **int** - The hash value. ``` -------------------------------- ### oead.gsheet.Field.name Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Name (must not be empty). ```APIDOC ## oead.gsheet.Field.name (property) ### Description Name (must not be empty). ### Returns - **str** - The name. ``` -------------------------------- ### oead.gsheet.Field.flags Source: https://oead.readthedocs.io/en/stable/gsheet_py.html Flags. ```APIDOC ## oead.gsheet.Field.flags (property) ### Description Flags. ### Returns - **oead.gsheet.Field.Flag** - The flags. ``` -------------------------------- ### SarcWriter::SarcWriter(util::Endianness endian = util::Endianness::Little, Mode mode = Mode::New) Source: https://oead.readthedocs.io/en/stable/sarc.html Constructs a SarcWriter with the specified endianness and mode. This is the constructor for the SARC archive writer. ```APIDOC ## SarcWriter::SarcWriter(util::Endianness endian = util::Endianness::Little, Mode mode = Mode::New) ### Description Constructs a SarcWriter with the specified endianness and mode. ### Method Constructor ### Parameters - **endian** (util::Endianness) - Optional - The endianness to use. Defaults to Little. - **mode** (Mode) - Optional - The mode to use. Defaults to New. ``` -------------------------------- ### oead.byml.Array Source: https://oead.readthedocs.io/en/stable/byml_py.html Lightweight list-like object representing a BYML array. Can be cast to a list. ```APIDOC ## oead.byml.Array ### Description Lightweight list-like object representing a BYML array. Can be cast to a list. ### Class `oead.byml.Array` ### Usage Can be cast to a list. ```