Skip to content

LMS_FieldMap

Abdyy edited this page Aug 15, 2025 · 3 revisions

LMS_FieldMap is an immutable class that wraps a basic dictionary in python. Fields can be edited, but no fields can be added or deleted. Intended for more controlled access for Tag and Attribute values. It stores field names mapped to their LMS_Field objects. There must be a tag config or attribute config used when reading the msbt in order to create a field map.

Usage

LMS_FieldMap objects can be accessed and values can be set like a dictionary.

map = LMS_FieldMap({
    'r': LMS_Field(value=255, type=UINT8), 
    'g': LMS_Field(value=23, type=UINT8), 
    'b': LMS_Field(value=255, type=UINT8), 
    'a': LMS_Field(value=43, type=UINT8)
}

map["r"] # -> 255
map["g"] # -> 23
map["a"] = 34

Values are verified when they are set to ensure they follow the datatype.

Wiki Home

Home

File Formats

LMS Objects & Enums

TitleConfig

Clone this wiki locally