This is the buffer system I've been using for years now, might as well explain how the thing works.
;=================================
Put this in the Statedef -3
[state -3]
type = Helper
trigger1 = numhelper(9000) = 0
name = "Buffer System"
id = 9000
pos = 0,0
postype = p1
stateno = 9000
helpertype = normal
keyctrl = 1
pausemovetime = 9999999
supermovetime = 9999999
The reason keyctrl is there is because this buffer does motions independently of the root.
Now for the buffer system
;---------------------------------------------------------------------------
;BUFFER SYSTEM
[Statedef 9000]
type = A
movetype= I
physics = N
ctrl = 0
anim = 1; <- THIS IS A BLANK ANIMATION
[State 0]; <- MAKES SURE THE BUFFER SYSTEM IS ALWAYS FACING THE OPPONENT
type = turn
trigger1 = p2dist x < 0
[State 0]
type = bindtoroot
trigger1 = 1
pos = 0,0
[State -2]
trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "ID = %d Time = %d rootID = %d"
params = var(1), var(2), root,var(2)
;-------------
[State 0]; <- BUFFER TIME FOR MOVES, THIS VARIABLE SET SAYS HOW LONG A MOVE STAYS IN THE BUFFER
type = varset
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
trigger7 = command = "up"; <- THIS IS FOR BUFFERING JUMPS
trigger8 = command = "upfwd"; <-
trigger9 = command = "upback"; <-
;trigger10 = command = "x+y"
;trigger11 = command = "x+y+z+a"
var(2) = 15: <- THIS TIMING CAN BE CHANGED TO MAKE THINGS MORE LENIENT OR MORE STRICT
[State 0]; <- THE TIMING HERE IS SHORTER BECAUSE THIS IS FOR RUNNING AND BACKDASHING
type = varset
trigger1 = command = "fwd"
trigger2 = command = "back"
trigger3 = command = "down"
var(2) = 5
[State 0]
type = varset
triggerall = root,animelemtime(1) = 0
trigger1 = root,stateno = [130,139]
var(2) = 2
[State 0]; <- THIS MAKES SURE THE THE BUFFER TIMER RUNS DOWN
type = varSet
trigger1 = var(2)>0
var(2) = var(2)-1
[State 0]; <- THIS KILLS THE BUFFER TIME WHEN THE MOVE STARTS
type = varset
trigger1 = root,animelemtime(1) = 0
trigger1 = root,stateno = [200,2999]; <- INCREASE THIS RANGE IF YOUR MOVES USE STATES 3000+
var(2) = 0
;----
[State 0]; <- THIS RESETS THE ID THATS BEING BUFFERED WHEN THE TIMER RUNS OUT
type = varset
trigger1 = var(2) = 0
var(1) = 0
[State 0] ; <- THIS RESETS THE TIMER WHEN NEUTRAL/STARTING TO JUMP/LANDING
type = parentvarset
trigger1 = var(2) = 0
trigger2 = root,stateno != 40
trigger3 = root,stateno != 0
trigger4 = root,stateno != 52
var(2) = 0
;---------------------------
;--------------------
;NORMAL MOVES
;--------------------
[State 0]
type = varset
triggerall = command != "QCF_x"; <- YOU DONT WANT THIS BUFFERED DOING THIS MOTION
trigger1 = command = "x"
var(1) = 1; <- THIS IS THE ID OF THE MOVE BUFFERING
[State 0]
type = varset
triggerall = command != "QCF_y"
trigger1 = command = "y"
var(1) = 2
[State 0]
type = varset
triggerall = command != "QCFQCF_z"
trigger1 = command = "z"
var(1) = 3
;--------------------
;SPECIAL MOVES
;--------------------
[State 0]; <- JUST GIVING MOTIONS IDs
type = varset
trigger1 = command = "QCF_x"
var(1) = 30; <- THIS IS THE ID OF THE MOVE BUFFERING
[State 0]
type = varset
trigger1 = command = "QCF_y"
var(1) = 31
[State 0]; <- THIS IS A SUPER MOTION
type = varset
trigger1 = command = "QCFQCF_z"
var(1) = 32
;--------------------
;SYSTEM
;--------------------
[State 0]; <- BUFFERING JUMPS
type = varset
triggerall = var(1) != [60,62]
triggerall = root,stateno != 40
trigger1 = command = "holdupfwd"
var(1) = 60
[State 0]; <- BUFFERING JUMPS
type = varset
triggerall = var(1) != [60,62]
triggerall = root,stateno != 40
trigger1 = command = "holdupback"
var(1) = 61
[State 0]; <- BUFFERING JUMPS
type = varset
triggerall = var(1) != [60,62]
triggerall = root,stateno != 40
triggerall = command != "holdupfwd"
triggerall = command != "holdupback"
trigger1 = command = "holdup"
var(1) = 62
[State 0]; <- BUFFERING RUN
type = varset
trigger1 = command = "FF"
var(1) = 50
[State 0]; <- BUFFERING BACKDASH
type = varset
trigger1 = command = "BB"
var(1) = 51
;---------------------------
[State 0]; <- IF THERES NOTHING BEING BUFFERED, THE BUFFER TIMER DIES
type = parentvarset
trigger1 = var(1) = 0
var(2) = 0
;---------------------------
;FROM THIS SECTION ONWARDS ALL THIS TELLS THE ROOT WHAT CONDITIONS ARE REQUIRED FOR A MOVE HAPPEN
;---------------------------
;==========================
;NORMALS
;==========================
[State 0]
type = parentvarset
triggerall = var(1) = 1 && var(2) != 0: <- WHEN THIS ID IS ACTIVE, AND TIMER HAS NO RUN OUT YET
triggerall = root,statetype != A && root,command != "holddown"
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1; <- CONDITIONS FOR WHEN ITS OKAY FOR THIS MOVE TO HAPPEN
trigger2 = root,stateno = [100,101]: <-
;----
var(2) = 1
[State 0]
type = parentvarset
triggerall = var(1) = 2 && var(2) != 0
triggerall = root,statetype != A && root,command != "holddown"
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
trigger2 = root,stateno = [100,101]
;----
var(2) = 2
[State 0]
type = parentvarset
triggerall = var(1) = 3 && var(2) != 0
triggerall = root,statetype != A && root,command != "holddown"
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
trigger2 = root,stateno = [100,101]
;----
var(2) = 3
;==========================
;SPECIAL MOVES
;==========================
[State 0, QCF_x]; <- EVERYTHING IS THE PRETTY MUCH THE SAME, JUST ADD WHAT CONDITIONS YOU WANT FOR THE MOVE TO WORK
type = parentvarset
triggerall = var(1) = 30 && var(2) != 0
triggerall = root,statetype != A
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
trigger2 = root,stateno = [100,101]
;----
trigger3 = root,stateno = 200 && root,movecontact && root,numtarget: <- BASIC NORMAL>SPECIAL CANCEL ON CONTACT
trigger4 = root,stateno = 210 && root,movecontact && root,numtarget; <-
trigger5 = root,stateno = 220 && root,movecontact && root,numtarget: <-
;----
var(2) = 30
[State 0, QCF_y]
type = parentvarset
triggerall = var(1) = 31 && var(2) != 0
triggerall = root,statetype != A
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
trigger2 = root,stateno = [100,101]
;----
trigger3 = root,stateno = 200 && root,movecontact && root,numtarget
trigger4 = root,stateno = 210 && root,movecontact && root,numtarget
trigger5 = root,stateno = 220 && root,movecontact && root,numtarget
;----
var(2) = 31
[State 0, QCFQCF_z]
type = parentvarset
triggerall = var(1) = 32 && var(2) != 0
triggerall = power >= 1000; <- POWER REQUIREMENT BECAUSE ITS A SUPER
triggerall = root,statetype != A
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
trigger2 = root,stateno = [100,101]
;----
trigger3 = root,stateno = 200 && root,movecontact && root,numtarget
trigger4 = root,stateno = 210 && root,movecontact && root,numtarget
trigger5 = root,stateno = 220 && root,movecontact && root,numtarget
var(2) = 32
;==========================
;SYSTEM
;==========================
[State 0]; <- JUMP CANCELING (YOU MIGHT WANT TO HAVE A LIMITER FOR THIS)
type = parentvarset
triggerall = var(1) = 60 && var(2) != 0
trigger1 = root,movecontact && root,numtarget
trigger1 = root,stateno = [200,499]
var(2) = 60
[State 0]
type = parentvarset
triggerall = var(1) = 61 && var(2) != 0
trigger1 = root,movecontact && root,numtarget
trigger1 = root,stateno = [200,499]
var(2) = 61
[State 0]
type = parentvarset
triggerall = var(1) = 62 && var(2) != 0
trigger1 = root,movecontact && root,numtarget
trigger1 = root,stateno = [200,499]
var(2) = 62
[State 0]; <- RUN BUFFER
type = parentvarset
triggerall = var(1) = 50 && var(2) != 0
triggerall = root,statetype != A
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
var(2) = 50
[State 0]; <- BACKDASH BUFFER
type = parentvarset
triggerall = var(1) = 51 && var(2) != 0
triggerall = root,statetype != A
trigger1 = (root,stateno = [0,52]) && root,ctrl = 1
var(2) = 51
The buffer system handles all the timing and commands, and when you conditions are met will tell the route what move ID to use.
Add this to the Statedef -2
;================================================================================
; ------- BUFFER SYSTEM--------
;================================================================================
[State -3]: <- IF YOU GET HIT, BUFFER SYSTEM SWITCHES OFF
type = varset
triggerall = var(2) != 60
triggerall = stateno != [120,159]
trigger1 = movetype = H
var(2) = 0
ignorehitpause = 0
;==========================
;NORMALS
;==========================
[State -3]; <- MAKES CHANGE TO THE STATE BASED ON THE BUFFER SYSTEM
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 1
value = 200
ctrl = 0
ignorehitpause = 0
[State -3]
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 2
value = 210
ctrl = 0
ignorehitpause = 0
[State -3]
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 3
value = 220
ctrl = 0
ignorehitpause = 0
;==========================
;SPECIAL MOVES
;==========================
[State -3]
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 30
value = 1000
ctrl = 0
ignorehitpause = 0
[State -3]
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 31
value = 1001
ctrl = 0
ignorehitpause = 0
[State -3]
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 32
value = 1010
ctrl = 0
ignorehitpause = 0
;==========================
;SYSTEM
;==========================
[State -3]; <- JUMP CANCELING
type = changestate
triggerall = movetype != H
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = stateno != 40
trigger1 = var(2) = 60
trigger2 = var(2) = 61
trigger3 = var(2) = 62
value = 40
ctrl = 0
ignorehitpause = 0
[State -3]; <- RUN BUFFER
type = changestate
triggerall = movetype != H
triggerall = roundstate = 2
trigger1 = var(2) = 50
value = 100
ctrl = 0
ignorehitpause = 0
[State -3]; <- BACKDASH BUFFER
type = changestate
triggerall = movetype != H
triggerall = statetype != A
triggerall = roundstate = 2
trigger1 = var(2) = 51
value = 105
ctrl = 0
ignorehitpause = 0
;================================================================================
This section causes to root to change to the correct state based on the ID that was buffered
;=================================================================================
The commands used here look like this:
[Command]
name = "QCF_x"
command = ~D, DF, F, x
[Command]
name = "QCF_y"
command = ~D, DF, F, y
[Command]
name = "QCFQCF_z"
command = ~D, DF, F, D, DF, z
the .cmd times
command.time = 15
command.buffer.time = 1
;===============================================
i know some stuff might not be super clear (never made a tutorial thing before)
If you need any explanations feel free to drop a comment