;==========================================================================
;[Info]
;author = "Inktrebuchet"
;versiondate = 6/11/2018
;goal = do as much as possible with each var
;
;==========================================================================
; Notes
;==========================================================================
;JustNoPoint had an idea, then I tried to make it.
;
;This is a proof of concept. For an actual buffer system check these out:
; http://mugenguild.com/forum/msg.2331601
; http://mugenguild.com/forum/msg.2366951
;
;Each variable uses up to 5 slots and is described in "Helper Var Usage" section.
;Buffer time can be set in the "Config Section" below.
;To set direction and button buffer times separately, search "Config" using ctrl+f.
;
;Base examples of trigger use:
;
;;Command "a" was pressed. Reference "Helper Var Usage" section for more info.
;trigger1 = ((helper(33336666),var(3) - ((helper(33336666),var(3)/100000000) * 100000000))/1000000)
;
;==========================================================================
; Helper Var Usage
;==========================================================================
; numhelper(33336666) Variable usage:
; This is a record of the variables that are used
;
;var(0) :
; Buff.time = (var(0) / 100000000)
; Back = ((var(0) - ((var(0)/100000000) * 100000000))/1000000)
; Down = ((var(0) - ((var(0)/1000000) * 1000000))/10000)
; Fwd = ((var(0) - ((var(0)/10000) * 10000))/100)
; Up = ((var(0) - ((var(0)/100) * 100))/1)
;;var(2) :
; Buff.time = (var(2) / 100000000)
; X = ((var(2) - ((var(2)/100000000) * 100000000))/1000000)
; Y = ((var(2) - ((var(2)/1000000) * 1000000))/10000)
; Z = ((var(2) - ((var(2)/10000) * 10000))/100)
; Start = ((var(2) - ((var(2)/100) * 100))/1)
;;var(3) :
; Buff.time = (var(3) / 100000000)
; A = ((var(3) - ((var(3)/100000000) * 100000000))/1000000)
; B = ((var(3) - ((var(3)/1000000) * 1000000))/10000)
; C = ((var(3) - ((var(3)/10000) * 10000))/100)
;
;==========================================================================
[statedef 33336666]
ctrl = 0
;==========================================================================
; Config Section
;==========================================================================
Anim = 9741 ;Blank anim
[State Config Time]
Type = varset
trigger1 = !time && !var(0)
var(0) = 20 ;Buffer time, this value should be set between 1 and 21
;==========================================================================
[state 33333333, Clipboard]
type = DisplayToClipboard
trigger1 = 1
text = "D.time=%d| %d %d %d %d "
params = (var(0) / 100000000), ((var(0) - ((var(0)/100000000) * 100000000))/1000000), ((var(0) - ((var(0)/1000000) * 1000000))/10000), ((var(0) - ((var(0)/10000) * 10000))/100), ((var(0) - ((var(0)/100) * 100))/1)
[state 33333333, Clipboard]
type = AppendToClipboard
trigger1 = 1
text = "XYZS.time=%d| %d %d %d %d "
params = (var(2) / 100000000), ((var(2) - ((var(2)/100000000) * 100000000))/1000000), ((var(2) - ((var(2)/1000000) * 1000000))/10000), ((var(2) - ((var(2)/10000) * 10000))/100), ((var(2) - ((var(2)/100) * 100))/1)
[state 33333333, Clipboard]
type = AppendToClipboard
trigger1 = 1
text = "ABC.time=%d| %d %d %d\nBy Inktrebuchet"
params = (var(3) / 100000000), ((var(3) - ((var(3)/100000000) * 100000000))/1000000), ((var(3) - ((var(3)/1000000) * 1000000))/10000), ((var(3) - ((var(3)/10000) * 10000))/100)
;==========================================================================
; Buffer Directions
;==========================================================================
[State Timer Set Part 2]
Type = null
trigger1 = var(0) < 100000000
trigger1 = var(0) := var(0) * 100000000
trigger2 = var(0) = 0
trigger2 = var(0) := 100000000
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/100) * 100) = [1, 98]
Trigger1 = var(0) := var(0) - 1
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/10000) * 10000) = [99, 9998]
Trigger1 = var(0) := var(0) - 100
[state count them down]
type = null
Trigger1 = var(0) - ((var(0)/1000000) * 1000000) = [9999, 999998]
Trigger1 = var(0) := var(0) - 10000
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/100000000) * 100000000) = [999999, 99999998]
Trigger1 = var(0) := var(0) - 1000000
;----------------------------------------------------------
[State Up]
Type = null
Trigger1 = command = "holdup"
Trigger1 = var(0) - ((var(0)/100) * 100) <= (1 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((1 * (floor(var(0) / 100000000))) - (var(0) - ((var(0)/100) * 100)))
[State Fwd]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing >= 0 && command = "holdback" || (EnemyNear,Pos X - Pos X) * Facing < 0 && command = "holdfwd"
;Trigger1 = command = "holdfwd"
Trigger1 = var(0) - ((var(0)/10000) * 10000) <= (100 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((100 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/10000) * 10000) + (var(0) - ((var(0)/100) * 100)))))
[State Down]
Type = null
Trigger1 = command = "holddown"
Trigger1 = var(0) - ((var(0)/1000000) * 1000000) <= (10000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((10000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/1000000) * 1000000) + (var(0) - ((var(0)/10000) * 10000)))))
[State Back]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing >= 0 && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing < 0 && command = "holdback"
;Trigger1 = command = "holdback"
Trigger1 = var(0) - ((var(0)/100000000) * 100000000) <= (1000000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((1000000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/100000000) * 100000000) + (var(0) - ((var(0)/1000000) * 1000000)))))
;==========================================================================
; Buffer X Y Z Start
;==========================================================================
[State Timer Set Part 1]
Type = null
trigger1 = time = 0
trigger1 = var(2) = 0
trigger1 = var(2) := var(0) ;Config buffer time for ABCX is the same as directions by default. if changed, this value should be set between 1 and 21
[State Timer Set Part 2]
Type = null
trigger1 = var(2) < 100000000
trigger1 = var(2) := var(2) * 100000000
trigger2 = var(2) = 0
trigger2 = var(2) := 100000000
[State Count Down Start]
type = null
Trigger1 = var(2) - ((var(2)/100) * 100) = [1, 98]
Trigger1 = var(2) := var(2) - 1
[State Count Down Z]
type = null
Trigger1 = var(2) - ((var(2)/10000) * 10000) = [99, 9998]
Trigger1 = var(2) := var(2) - 100
[State Count Down Y]
type = null
Trigger1 = var(2) - ((var(2)/1000000) * 1000000) = [9999, 999998]
Trigger1 = var(2) := var(2) - 10000
[State Count Down X]
type = null
Trigger1 = var(2) - ((var(2)/100000000) * 100000000) = [999999, 99999998]
Trigger1 = var(2) := var(2) - 1000000
;----------------------------------------------------------
[State Start]
Type = null
Trigger1 = command = "start"
Trigger1 = var(2) - ((var(2)/100) * 100) <= (1 * (floor(var(2) / 100000000)))
Trigger1 = var(2) := var(2) + ((1 * (floor(var(2) / 100000000))) - (var(2) - ((var(2)/100) * 100)))
[State Z]
Type = null
Trigger1 = command = "z"
Trigger1 = var(2) - ((var(2)/10000) * 10000) <= (100 * (floor(var(2) / 100000000)))
Trigger1 = var(2) := var(2) + ((100 * (floor(var(2) / 100000000))) - (var(2) - ((floor(var(2)/10000) * 10000) + (var(2) - ((var(2)/100) * 100)))))
[State Y]
Type = null
Trigger1 = command = "y"
Trigger1 = var(2) - ((var(2)/1000000) * 1000000) <= (10000 * (floor(var(2) / 100000000)))
Trigger1 = var(2) := var(2) + ((10000 * (floor(var(2) / 100000000))) - (var(2) - ((floor(var(2)/1000000) * 1000000) + (var(2) - ((var(2)/10000) * 10000)))))
[State X]
Type = null
Trigger1 = command = "x"
Trigger1 = var(2) - ((var(2)/100000000) * 100000000) <= (1000000 * (floor(var(2) / 100000000)))
Trigger1 = var(2) := var(2) + ((1000000 * (floor(var(2) / 100000000))) - (var(2) - ((floor(var(2)/100000000) * 100000000) + (var(2) - ((var(2)/1000000) * 1000000)))))
;==========================================================================
; Buffer A B C
;==========================================================================
[State Timer Set Part 1]
Type = null
trigger1 = time = 0
trigger1 = var(3) = 0
trigger1 = var(3) := var(0) ;Config buffer time for ABCX is the same as directions by default. if changed, this value should be set between 1 and 21
[State Timer Set Part 2]
Type = null
trigger1 = var(3) < 100000000
trigger1 = var(3) := var(3) * 100000000
trigger2 = var(3) = 0
trigger2 = var(3) := 100000000
[State Count Down C]
type = null
Trigger1 = var(3) - ((var(3)/10000) * 10000) = [99, 9998]
Trigger1 = var(3) := var(3) - 100
[State Count Down B]
type = null
Trigger1 = var(3) - ((var(3)/1000000) * 1000000) = [9999, 999998]
Trigger1 = var(3) := var(3) - 10000
[State Count Down A]
type = null
Trigger1 = var(3) - ((var(3)/100000000) * 100000000) = [999999, 99999998]
Trigger1 = var(3) := var(3) - 1000000
;----------------------------------------------------------
[State C]
Type = null
Trigger1 = command = "c"
Trigger1 = var(3) - ((var(3)/10000) * 10000) <= (100 * (floor(var(3) / 100000000)))
Trigger1 = var(3) := var(3) + ((100 * (floor(var(3) / 100000000))) - (var(3) - ((floor(var(3)/10000) * 10000) + (var(3) - ((var(3)/100) * 100)))))
[State B]
Type = null
Trigger1 = command = "b"
Trigger1 = var(3) - ((var(3)/1000000) * 1000000) <= (10000 * (floor(var(3) / 100000000)))
Trigger1 = var(3) := var(3) + ((10000 * (floor(var(3) / 100000000))) - (var(3) - ((floor(var(3)/1000000) * 1000000) + (var(3) - ((var(3)/10000) * 10000)))))
[State A]
Type = null
Trigger1 = command = "a"
Trigger1 = var(3) - ((var(3)/100000000) * 100000000) <= (1000000 * (floor(var(3) / 100000000)))
Trigger1 = var(3) := var(3) + ((1000000 * (floor(var(3) / 100000000))) - (var(3) - ((floor(var(3)/100000000) * 100000000) + (var(3) - ((var(3)/1000000) * 1000000)))))
;----------------------------------------------------------
[State BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,-2
ignorehitpause = 1
;==========================================================================
;==========================================================================
;[Info]
;author = "Inktrebuchet"
;versiondate = 8/3/2018
;goal = do as much as possible with each var
;
;==========================================================================
; Notes
;==========================================================================
;JustNoPoint had an idea, then I tried to make it.
;
;This is a proof of concept. For an actual buffer system check these out:
; http://mugenguild.com/forum/msg.2331601
; http://mugenguild.com/forum/msg.2366951
;For other versions of this concept check here:
;http://mugenguild.com/forum/msg.2443986
;
;Each variable uses up to 9 slots and is described in "Helper Var Usage" section.
;Buffer time can be set in the "Config Section" below.
;To set direction and button buffer times separately, search "Config" using ctrl+f.
;
;Base examples of trigger use:
;
;;Command "down" was pressed. Reference "Helper Var Usage" section for more info.
;trigger1 = ((helper(33336666),var(0) - ((helper(33336666),var(0)/10000000) * 10000000))/1000000)
;
;==========================================================================
; Helper Var Usage
;==========================================================================
; numhelper(33336666) Variable usage:
; This is a record of the variables that are used
;
;var(0) : 012346789
; Buff.time = (var(0) / 100000000)
; DB = ((var(0) - ((var(0)/100000000) * 100000000))/10000000)
; D = ((var(0) - ((var(0)/10000000) * 10000000))/1000000)
; DF = ((var(0) - ((var(0)/1000000) * 1000000))/100000)
; B = ((var(0) - ((var(0)/100000) * 100000))/10000)
; F = ((var(0) - ((var(0)/10000) * 10000))/1000)
; UB = ((var(0) - ((var(0)/1000) * 1000))/100)
; U = ((var(0) - ((var(0)/100) * 100))/10)
; UF = ((var(0) - ((var(0)/10) * 10))/1)
;;var(2) :
;
;;var(3) :
;
;
;==========================================================================
[statedef 33336666]
ctrl = 0
;==========================================================================
; Config Section
;==========================================================================
Anim = 9741 ;Blank anim
[State Config Time]
Type = varset
trigger1 = !time && !var(0)
var(0) = 9 ;Buffer time, this value should be set between 1 and 9
;==========================================================================
[state 33333333, Clipboard]
type = DisplayToClipboard
trigger1 = 1
text = "%d %d %d %d"
params = var(0) , var(5) , var(6) , var(7)
;==========================================================================
; Buffer Directions
;==========================================================================
[State Timer Set Part 2]
Type = null
trigger1 = var(0) < 100000000
trigger1 = var(0) := var(0) * 100000000
trigger2 = var(0) = 0
trigger2 = var(0) := 100000000
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/10) * 10) = [1, 9]
Trigger1 = var(0) := var(0) - 1
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/100) * 100) = [10, 99]
Trigger1 = var(0) := var(0) - 10
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/1000) * 1000) = [100, 999]
Trigger1 = var(0) := var(0) - 100
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/10000) * 10000) = [1000, 9999]
Trigger1 = var(0) := var(0) - 1000
[state count down]
type = null
Trigger1 = var(0) - ((var(0)/100000) * 100000) = [10000, 99999]
Trigger1 = var(0) := var(0) - 10000
[state count down]
type = null
Trigger1 = var(0) - ((var(0)/1000000) * 1000000) = [100000, 999999]
Trigger1 = var(0) := var(0) - 100000
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/10000000) * 10000000) = [1000000, 9999999]
Trigger1 = var(0) := var(0) - 1000000
[State Count Down]
type = null
Trigger1 = var(0) - ((var(0)/100000000) * 100000000) = [10000000, 99999999]
Trigger1 = var(0) := var(0) - 10000000
;----------------------------------------------------------
[State DB]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing >= 0 && command = "holddown" && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing < 0 && command = "holddown" && command = "holdback"
;Trigger1 = command = "holddown" && command = "holdback"
Trigger1 = var(0) - ((var(0)/10) * 10) <= (1 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((1 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/10) * 10) + (var(0) - ((var(0)/1) * 1)))))
[State D]
Type = null
Trigger1 = command = "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
Trigger1 = var(0) - ((var(0)/100) * 100) <= (10 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((10 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/100) * 100) + (var(0) - ((var(0)/10) * 10)))))
[State DF]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing <= 0 && command = "holddown" && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing > 0 && command = "holddown" && command = "holdback"
;Trigger1 = command = "holddown" && command = "holdfwd"
Trigger1 = var(0) - ((var(0)/1000) * 1000) <= (100 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((100 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/1000) * 1000) + (var(0) - ((var(0)/100) * 100)))))
[State B]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing >= 0 && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing && command = "holdback"
;Trigger1 = command = "holdback"
trigger1 = command != "holddown"
trigger1 = command != "holdup"
Trigger1 = var(0) - ((var(0)/10000) * 10000) <= (1000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((1000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/10000) * 10000) + (var(0) - ((var(0)/1000) * 1000)))))
[State F]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing <= 0 && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing > 0 && command = "holdback"
;Trigger1 = command = "holdfwd"
trigger1 = command != "holddown"
trigger1 = command != "holdup"
Trigger1 = var(0) - ((var(0)/100000) * 100000) <= (10000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((10000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/100000) * 100000) + (var(0) - ((var(0)/10000) * 10000)))))
[State UB]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing >= 0 && command = "holdup" && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing < 0 && command = "holdup" && command = "holdback"
;Trigger1 = command = "holdup" && command = "holdback"
Trigger1 = var(0) - ((var(0)/1000000) * 1000000) <= (100000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((100000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/10000000) * 10000000) + (var(0) - ((var(0)/100000) * 100000)))))
[State U]
Type = null
Trigger1 = command = "holdup"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
Trigger1 = var(0) - ((var(0)/10000000) * 10000000) <= (1000000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((1000000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/100000000) * 100000000) + (var(0) - ((var(0)/1000000) * 1000000)))))
[State UF]
Type = null
trigger1 = (EnemyNear,Pos X - Pos X) * Facing <= 0 && command = "holdup" && command = "holdfwd" || (EnemyNear,Pos X - Pos X) * Facing > 0 && command = "holdup" && command = "holdback"
;Trigger1 = command = "holdup" && command = "holdfwd"
Trigger1 = var(0) - ((var(0)/100000000) * 100000000) <= (10000000 * (floor(var(0) / 100000000)))
Trigger1 = Var(0) := var(0) + ((10000000 * (floor(var(0) / 100000000))) - (var(0) - ((floor(var(0)/100000000) * 100000000) + (var(0) - ((var(0)/10000000) * 10000000)))))
;----------------------------------------------------------
[State BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,-2
ignorehitpause = 1
;==========================================================================