Please login or register.

Login with username, password and session length
Advanced search  

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.

Event Branching Tutorial  (Read 449 times)
Pages: [1]
French Maid
Xifanie (Webmistress) [Posts: 4357]
  • View Profile
  • Final Fantasy Hacktics
  • http://steamcommunity.com/id/Xifanie
  • share
  • [May 10, 2017, 07:06:01 PM]
Event Branching Tutorial
« on: May 10, 2017, 07:06:01 PM »
Today we'll tackle branches and jumps, but we will not really use those names as while they correctly describe what the instructions do, we'll look at each individual instruction one by one.

All of these instructions have one single parameter, which is a ForwardTarget ID or a BackTarget ID.
Jumping Forward
JumpForwardIfNot(xJF)
Jumps to ForwardTarget if Variable 0x0000 is equal to 0. Otherwise simply keeps advancing.
Must be placed before ForwardTarget!
JumpForward(xJF)
Jumps to ForwardTarget.
Must be placed before ForwardTarget!
ForwardTarget(xJF)
Target Destination of JumpForwardIfNot/JumpForward.
Must be placed after JumpForwardIfNot/JumpForward!
Jumping Backward
JumpBack(xJB)
Jumps back to BackTarget.
Must be placed after BackTarget!
BackTarget(xJB)
Target Destination of JumpBack.
Must be placed before JumpBack!

Targets
Forward Targets and Back Targets are essentially the same thing, but they are limited to their current subset of event instructions. Thus ForwardTarget 0x00 and BackTarget 0x00 use different memory allocations and are separate. Only a Forward Instruction can use a Forward Target, and only a Back Instruction can use a Back Target
  • A ForwardTarget may only be placed after a Forward Instruction, and can be reused. This means that you may use ForwardTarget 0x00 as often as you want with simple instructions.
  • A BackTarget may only be placed before a Back Instruction and cannot be reused.

Conditions
EQ() Equal
Variable 0x0000 = If ( Variable 0x0000 == Variable 0x0001 )
NEQ() Not Equal
Variable 0x0000 = If ( Variable 0x0000 != Variable 0x0001 )
LT() Less Than
Variable 0x0000 = If ( Variable 0x0000 < Variable 0x0001 )
GT() Greater Than
Variable 0x0000 = If ( Variable 0x0000 > Variable 0x0001 )
LTE() Less Than or Equal
Variable 0x0000 = If ( Variable 0x0000 <= Variable 0x0001 )
GTE() Greater Than or Equal
Variable 0x0000 = If ( Variable 0x0000 >= Variable 0x0001 )

Examples:
Note that in each of these examples, I used Target 0xFF to make it easier to remember where the end of the conditions section is.
Player has at least 1 gold. (Aeris Flower Event)

Dialogue Selection (3 options)

Page Selection (8 options)

Loop a Yes/No option dialogue 5 times
« Last Edit: May 10, 2017, 08:42:26 PM by Xifanie »
    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    Pages: [1]