Appearance
Areas
Area altering functions.
ALTER_AREA_REGION_MATCH patch
Alters area regions which match all the match_* variables according to the non-match_ variables.
| INT_VAR | Description | Type | Default |
|---|---|---|---|
| flag_trap_detectable | whether trap is detectable | bool | |
| trap_detect | trap detection difficulty | int | |
| trap_remove | trap removal difficulty | int | |
| trapped | region trapped flag | bool |
| STR_VAR | Description | Type | Default |
|---|---|---|---|
| match_script | only alter if script matches | resref | required |
ALTER_AREA_STRUCTURE_SCRIPT patch
Writes new script to an area structure.
| INT_VAR | Description | Type | Default |
|---|---|---|---|
| index | structure index | int | required |
| STR_VAR | Description | Type | Default |
|---|---|---|---|
| script | new script | resref | required |
| type | container, door or region | string | required |
GET_AREA_STRUCTURE_CENTER_POINT patch
Returns coordinates of an area structure center point by averaging coordinates of all of its vertices.
| INT_VAR | Description | Type | Default |
|---|---|---|---|
| index | structure index | int | required |
| STR_VAR | Description | Type | Default |
|---|---|---|---|
| type | container, door or region | string | required |
| Return | Description | Type |
|---|---|---|
| x | x coordinate | int |
| y | y coordinate | int |
IS_ITEM_IN_AREA action
Returns 1 if item is sold in the store, 0 otherwise.
| STR_VAR | Description | Type | Default |
|---|---|---|---|
| area | area resource | resref | required |
| item | item resource | resref | required |
| Return | Description | Type |
|---|---|---|
| present | is item somewhere in the area? | bool |
REPLACE_AREA_ITEM_MATCH patch
Replaces each occurrence of match_item with new_item. Doesn't change charges, flags, etc. Does nothing if match_item wasn't found.
| STR_VAR | Description | Type | Default |
|---|---|---|---|
| match_item | old item | resref | required |
| new_item | new item | resref | required |