summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghoulslash <41651341+ghoulslash@users.noreply.github.com>2021-02-21 08:54:13 -0700
committerghoulslash <41651341+ghoulslash@users.noreply.github.com>2021-02-21 08:54:13 -0700
commit84f4a1d81d32fe1d4c907c0a16fa65c234bada4c (patch)
tree686f8c10adfa759a8c18c8469d1a72ca8a6281fe
parent6afef3ad903270a230a0a1ffc7504e00270b8430 (diff)
Updated Trainer Scripts (markdown)
-rw-r--r--Trainer-Scripts.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/Trainer-Scripts.md b/Trainer-Scripts.md
index 8452c84..d53addb 100644
--- a/Trainer-Scripts.md
+++ b/Trainer-Scripts.md
@@ -217,7 +217,7 @@ Rather than make a new object event template field, we can use the fact that `.t
Here's a brief run-down of the important fields:
* `Script`: the script you want the object to run upon approaching the player.
-* `Trainer Type:` the flag that allows the script to run. This must be >3, although you wouldn't want to use a temporary flag anyway. When the flag in this field is set, the object won't approach you anymore.
+* `Trainer Type:` the flag that allows the script to run. This must be >3. The `ObjectEvent` structure `trainerType` field is only `u8`. You could expand this to `u16`, but that takes up saveblock space (4 more bytes due to alignment per object event, so 64 more saveblock bytes). Alternatively, just use a flag with ID <= 0xFF.
* `Sight Radius:` the same as for regular trainers
**Note:** there are two bytes free at the end of ObjectEventTemplate. You could easily add the trainer script flag here (don't forget to change the porymap json, GetObjectEventTrainerSightFlagByObjectEventId, and global.fieldmap.h!), and keep the trainer type field as intended.