gsheet (Python)¶
For more information about Grezzo datasheets, refer to the wiki article.
-
class
oead.gsheet.
Struct
¶ Grezzo datasheet struct. In this API, a Struct is represented as a dict-like object, with the field names as keys.
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: oead.gsheet.Struct) -> None
__init__(self: oead.gsheet.Struct, iterator: iterator) -> None
__init__(self: oead.gsheet.Struct, dictionary: dict) -> None
-
clear
(self: oead.gsheet.Struct) → None¶
-
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]]¶
-
items
(self: oead.gsheet.Struct) → iterator¶
-
keys
(self: oead.gsheet.Struct) → iterator¶
-
Lists¶
These classes work like Python lists, but they can only store elements of a single type, i.e. all elements must be booleans, or all strings, etc.
-
class
oead.gsheet.
StructArray
¶
-
oead.gsheet.
BoolArray
¶ alias of
oead.BufferBool
-
oead.gsheet.
IntArray
¶ alias of
oead.BufferInt
-
oead.gsheet.
FloatArray
¶ alias of
oead.BufferF32
-
oead.gsheet.
StringArray
¶ alias of
oead.BufferString
Read-write API¶
This API is used to read, modify and write binary datasheets. Datasheets can also be constructed from scratch.
-
class
oead.gsheet.
Field
¶ Grezzo datasheet field.
-
class
Flag
¶ Members:
IsNullable
IsArray
IsKey
Unknown3
IsEnum
Unknown5
-
IsArray
= Flag.IsArray¶
-
IsEnum
= Flag.IsEnum¶
-
IsKey
= Flag.IsKey¶
-
IsNullable
= Flag.IsNullable¶
-
Unknown3
= Flag.Unknown3¶
-
Unknown5
= Flag.Unknown5¶
-
__init__
(self: oead.gsheet.Field.Flag, arg0: int) → None¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
class
Type
¶ Members:
Struct : C/C++ style structure.
Bool : Boolean.
Int : Signed 32-bit integer.
Float : Single-precision floating point number (binary32)..
String : Null-terminated string.
-
Bool
= Type.Bool¶
-
Float
= Type.Float¶
-
Int
= Type.Int¶
-
String
= Type.String¶
-
Struct
= Type.Struct¶
-
__init__
(self: oead.gsheet.Field.Type, arg0: int) → None¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
__init__
(self: oead.gsheet.Field) → None¶
-
property
data_size
¶ Size of the field data. For strings and inline types (inline structs, ints, floats, bools,), this is the same as the inline size.
-
property
fields
¶ [For structs] Fields
-
property
flags
¶ Flags.
-
property
inline_size
¶ Size of this field in the value structure. For strings and arrays, this is always 0x10.
-
property
name
¶ Name (must not be empty).
-
property
offset_in_value
¶ Offset of this field in the value structure.
-
property
type
¶ Field type.
-
property
type_name
¶ Type name.
-
property
x11
¶ Unknown; depth level?
-
class
-
class
oead.gsheet.
Sheet
¶ Grezzo datasheet.
-
__init__
(self: oead.gsheet.Sheet) → None¶
-
property
alignment
¶
-
property
hash
¶
-
property
name
¶
-
property
root_fields
¶
-
to_binary
(self: oead.gsheet.Sheet) → oead.Bytes¶ Convert the sheet to a binary datasheet.
-
property
values
¶
-
-
oead.gsheet.
parse
(data: oead.Bytes) → oead.gsheet.Sheet¶ Parse a binary datasheet.