Framework Setup

Setting up the inital framework

Short description

This page describes how to set up the framework and lists out all the conditions in the framework. Any other conditions in folders are not listed down here.

Setting up the framework

Calling the framework

local f = require(game.ServerStorage.ClassesFramework)
local Framework = f()

Class initialisation

This example is taken from Assailant.

local Defs = require(game.ServerStorage.ClassesFramework.Defs)
local UniversalMovesFunctions = Defs(Framework)
Framework.Setup()
Framework.Hitboxes = Hitboxes
Framework.Weapon = Weapon
Framework.MovesTable = MovesTable
Framework.Character = Character
Framework.Conditions.ClassBeingUsed.Value = Weapon
Framework.Animation.Source = Resources.Animations
Framework.HitboxesModel = Character.Hitboxes
Framework.Signals = Signals
Framework.Animation.DisableRobloxAnimations()
-- See function UpdateStats
Framework.UpdateStats(100, 80, 120, 81.25)
-- See function UpdateCondition
Framework.UpdateCondition("ClassCanSprint",true)

Framework modules

Module
Description
Default value

Animation

Used for controlling animations

<requires a module>

Library

A number of functions. See VFX for some usage.

<requires a module>

ProjApi

Raycasting module

<requires a module>

Region3

Another raycasting module

<requires a module>

EventAPI

Events manager

<requires a module>

EasingStyles

Easing functions

<requires a module>

Services

Module
Description
Default value

YieldService

Gets heartbeat

game["Run Service"].Heartbeat

Values/Settings

Value
Description
Default value

Character

Gets the player's character

game["Run Service"].Heartbeat

Conditions

A table of condition values in the Conditions folder of each player

nil

LocalConditions

A table of local condition values in the LocalConditions folder of each player

nil

ComboStats

A table of combo stats values in the ComboStats folder of each player

nil

Stats

A table of stat values in the Stats folder of each player

nil

Bindables

A table of objects (BindableFunction, BindableEvent) in the Bindables folder of each player

nil

Remotes

A table of remotes in the Remotes folder of each player

nil

Debuffs

A table of debuff values in the Debuffs folder of each player

nil

Hitboxes

Table of hitboxes

nil

AttackDebounces

Table of attack debounces

nil

HitboxesDe

bounces

Table of hitbox debounces

nil

ComboEnded Functions

Table of functions running after a combo ends

nil

LastBuffer

tick()

LastGuardRise

tick()

LastGuardDown

tick()

LastGuard

tick()

CanRegenGuard

false

GuardBrokenTick

tick()

GuardBrokenCD

6

HoldingGuard Button

false

AirAC

1

LightAC

1

HeavyAC

1

UsedLAC

false

UsedHAC

false

UsedAAC

false

UsedAirX

false

UsedLC

false

UsedAirdash

false

AirdashOnCd

false

BackdashOnCd

false

ComboStartTime

nil

Code for reference

local An = require(game.ReplicatedStorage.Modules.AnimationModule)
local Lib = require(game.ReplicatedStorage.Modules.LibraryModule)

-- Initialize modules and properties
Framework.Animation = An()
Framework.Animation.Master = Framework
Framework.Library = Lib()
Framework.Library.Master = Framework
Framework.ProjApi = require(game.ReplicatedStorage.Modules.ProjectileModule)
Framework.Region3 = require(game.ReplicatedStorage.Modules.RotatedRegion3)
Framework.DefaultFPS = 60
Framework.RenderEffects = game.ReplicatedStorage.Remotes.RenderEffects
Framework.RbxAsset = "http://www.roblox.com/asset/?id="
Framework.EventAPI = require(game.ReplicatedStorage.Modules:WaitForChild("Event"))
Framework.EasingStyles = require(game.ReplicatedStorage.Modules:WaitForChild("_EASING"))
Framework.Caller = game["Run Service"]:IsClient() and "Client" or "Server"

-- Initialise base character reference
Framework.Character = Framework.Caller == "Client" and game.Players.LocalPlayer.Character or nil
Framework.Conditions, Framework.LocalConditions, Framework.ComboStats, Framework.Stats, Framework.Bindables, Framework.Remotes, Framework.Debuffs = nil

-- YieldService from Heartbeat
Framework.YieldService = game["Run Service"].Heartbeat

-- Default values and tables for tracking state
Framework.Hitboxes = {}
Framework.AttackDebounces = {}
Framework.HitboxesDebounces = {}
Framework.ComboEndedFunctions = {}
Framework.LastBuffer = tick()
Framework.LastGuardRise = tick()
Framework.LastGuardDown = tick()
Framework.LastGuard = tick()
Framework.CanRegenGuard = true
Framework.GuardBrokenTick = tick()
Framework.GuardBrokenCD = 6
Framework.HoldingGuardButton = false
Framework.AirAC = 1
Framework.LightAC = 1
Framework.HeavyAC = 1
Framework.UsedLAC = false
Framework.UsedHAC = false
Framework.UsedAAC = false
Framework.UsedAirX = false
Framework.UsedLC = false
Framework.UsedAirdash = false
Framework.AirdashOnCd = false
Framework.BackdashOnCd = false

-- New combo start time value
Framework.ComboStartTime = nil

Last updated

Was this helpful?