Download
Docs menu+

set_type

Tools / Annotate · writes, dry-run by default

Define a user type and/or apply one: at a data global, type types it (a Player * names the fields read through it, an enum the constants compared with it); at a function, type is its C prototype, or with var (a1, local_58) names/types that variable; type alone defines C structs. Dry-run unless dry_run=false.

Parameters

addressstring

Data global to type, or a function for a prototype or var.

dry_runboolean

Preview only; false applies.

fieldsarray

The struct's fields, each offset:name:type (0x1c:mp:u32).

namestring

Name to define (struct/enum/typedef with fields/values/type), or var's new name.

sizeinteger

Size past the last field, or an enum's width (4 or 8).

typestring

The type to apply, a typedef's target (Player *), a prototype (int f(Player *p)), or alone C declarations (struct/enum/typedef, #pragma pack, // @0x10 offset asserts).

valuesarray

The enum's values, each name:value (Run:1); width 4 by default.

varstring

Variable of the function at address to name/type (a1, local_58).

Call

json
{
  "name": "set_type",
  "arguments": {}
}