Bind P 2 D4

Signature

void bindp2_d4(int flags, int modelVariation, int modelColorVariation); //id:0x00d4

Description

Assigns a model to a character (current script).

Arguments

Flags: Model Identifier

If the reference type is 0, it's the identifier of the model that will be assigned.

If the reference type is higher than 0, it's the identifier of the model entry in section 12 of the ebp file.

Flags: Reference Type

If set to anything higher than 0, section 12 of the ebp file will be checked.

If set to 0, the model identifier will be directly used unless it matches with an identifier from the table below in which case it will be converted.

Original IdentifierNew IdentifierName

0

0x00630000

Vaan

1

0x00630000

Vaan

8

0x00630001

Reddas

9

0x00630001

Reddas

12

0x00770002

Tree Branch

13

0x00770002

Tree Branch

Model Variation

The variation of the model.

Model Color Variation

The color variation of the model.

Notes

If the reference type is set to 0, the following conditions apply:

  • If the ebp file has no section 12, the returned model identifier will be the same as the original one.

  • If the model identifier is higher than the amount of entries in section 12 of the ebp file, the returned identifier will be 0.

For a list of model identifiers, you can view this spreadsheet.

Depending on an unknown state of the current script, this function may just return.

Last updated