User Tools

Site Tools


final-fantasy-tactics:event-constants

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

final-fantasy-tactics:event-constants [2022/10/16 21:43] (current)
xifanie created
Line 1: Line 1:
 +There are 3 levels for constants, in order of priority:
 +  - Individual event's constants (defined between #Const Start  and #Const End)
 +  - [[modConstants.json]]
 +  - [[gameConstants.json]]
 +Which means that event constants override anything else
  
 +===== AutoAlloc =====
 +In your event, using the constant ''AutoAlloc: 1'' will make it so that children will be automatically assigned an ID from 0x00 to 0xFF, increasing by 1 every new constant encountered.
 +
 +For example:
 +<code>
 +#Const Start
 + AutoAlloc: 1,
 + SomeOtherVariable: 0x70
 +#Const End
 +
 +SETVar(x0000,SomeOtherVariable)
 +If()
 + GoTo(GoTo.Success)
 +Else()
 + GoTo(GoTo.Fail)
 +EndIf()
 +
 +GoToTarget(GoTo.Success)
 +//Stuff
 +GoToTarget(GoTo.Fail)
 +//Stuff
 +</code>
 +This code would automatically assign a value of 0x00 to GoTo.Success and 0x01 to GoTo.Fail.
 +This is particularly useful to automatically assign values with Subs and GoTos.
final-fantasy-tactics/event-constants.txt ยท Last modified: 2022/10/16 21:43 by xifanie