As of the Perception Update, forms and stances can be made as you choose with any animations! The Calm of Fate update has since refined this concept, making it extremely easy to make your own forms.
You should create a form file in the lua/wos/advswl/forms
folder.
Example file path would be
addons/ADDON_FOLDER_NAME/lua/wos/advswl/forms/EXAMPLE_FORM.lua
The template file for form creation is as follows:
local FORM = {}
FORM.Name = "EXAMPLE FORM"
--Who does this form belong to? Options: FORM_SINGLE, FORM_DUAL, FORM_BOTH
--These are enumerations for their respective area.
--FORM_SINGLE can only be used by single wielded sabers
--FORM_DUAL can only be used by dual wielded sabers ( one in each hand )
--FORM_BOTH can be used by either wielding technique
FORM.Type = FORM_SINGLE
--What user groups are able to use this form? And which stances?
--FORMAT:
--["USERGROUP NAME"] = { STANCE1, STANCE2, STANCE3, ... ),
--DO NOT FORGET COMMAS AFTER EACH USERGROUP ENTRY!
--DO NOT CREATE FORMS THAT
FORM.UserGroups = {
["superadmin"] = { 1, 2, 3 },
}
FORM.Stances = {}
FORM.Stances[1] = {
[ "run" ] = "",
[ "idle" ] = "",
[ "light_left" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "light_right" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "light_forward" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "air_left" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "air_right" ] = {
Sequence = "",
Time =nil,
Rate = nil,
},
[ "air_forward" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "heavy" ] = {
Sequence = "",
Time = nil,
Rate = nil,
},
[ "heavy_charge" ] = "",
}
wOS:RegisterNewForm( FORM )
The stance formatting in detail can be described with the following:
Entry: FORM.Name = "STRING"
Description: This is the name of the form and will appear in the Form Selection menu as well as be used as an identifier. DO NOT USE THE SAME FORM NAME FOR ANY OTHER FORMS!
Example: If we want the form to be called Example Form, we would set
FORM.Name = "Example Form"
Entry: FORM.Type = FORM_SINGLE || FORM_DUAL || FORM_BOTH
Description: This is the type of wielding technique that can use this form. Their enums are fairly straight forward, but SINGLE is for a single saber, DUAL is for dual wielding ( one in each hand ) and BOTH uses each one.
Example: If we want the form to be available to both types of users, we would set
FORM.Type = FORM_BOTH
Entry: FORM.UserGroups = {
[ "STRING USERGROUP 1" ] = { NUMBER_STANCE1, NUMBER_STANCE2, ... },
[ "STRING USERGROUP 2" ] = { NUMBER_STANCE1, NUMBER_STANCE2, ... },
...
}
Description: This is how you restrict the form and it's stances to particular user groups. User groups are case sensative so be careful who it's inputted. Also, only include stances that you have made for the form, or you will experience errors.
Example 1: If we want to set the "superadmin" user group to have the stance 2 and 3 we set the entry as follows:
FORM.UserGroups = {
["superadmin"] = { 2, 3 },
}
Example 2: If we want to set the "VIP" and "owner" user group to have the stance 1-3 we set the entry as follows:
FORM.UserGroups = {
["VIP"] = { 1, 2, 3 },
["owner"] = { 1, 2, 3 },
}
Entry: FORM.Stances[ NUMBER_STANCE ] = { TABLE DATA }
Description: This is how you will create stances for the form. You should be copying the template stance and changing the number stance based on what stance you want that data for. Increment the number up every time you add a new one, and never go below 1. The general format you will be seeing within is
[ "TYPE OF ATTACK" ] = {
Sequence = "SEQUENCE STRING",
Time = TIME THE ANIMATION WILL PLAY,
Rate = HOW FAST THE ANIMATION WILL PLAY,
},
Sequences should be obtained from the wiltOS Viewer widget that comes with the wiltOS Animation Base The Time should be an integer value in SECONDS. nil = Use default sequence time The Rate should be a decimal value. 0.5 = Half Rate, 2 = Double Rate, nil = Use default sequence rate
You should not be adding new types of attacks, instead use the pre formatted entries from the example or you will see errors!
Here I will reference the AGGRESSIVE stance so it's clear to see how it works:
local FORM = {}
--The name of this form. Do not repeat names of forms!
FORM.Name = "Aggressive"
--Who does this form belong to? Options: FORM_SINGLE, FORM_DUAL, FORM_BOTH
FORM.Type = FORM_SINGLE
--What user groups are able to use this form? And which stances?
FORM.UserGroups = {
["user"] = { 1 },
["jedi"] = { 1, 2, 3 },
}
FORM.Stances = {}
FORM.Stances[1] = {
[ "run" ] = "phalanx_r_run",
[ "idle" ] = "phalanx_r_idle",
[ "light_left" ] = {
Sequence = "phalanx_r_left_t3",
Time = 0.5,
Rate = nil,
},
[ "light_right" ] = {
Sequence = "phalanx_r_right_t3",
Time = 0.7,
Rate = nil,
},
[ "light_forward" ] = {
Sequence = "phalanx_r_s1_t2",
Time = nil,
Rate = nil,
},
[ "air_left" ] = {
Sequence = "phalanx_a_left_t1",
Time = 0.6,
Rate = 1.6,
},
[ "air_right" ] = {
Sequence = "phalanx_a_right_t1",
Time = 0.6,
Rate = 1.7,
},
[ "air_forward" ] = {
Sequence = "phalanx_a_s1_t1",
Time = 0.6,
Rate = 1.2,
},
[ "heavy" ] = {
Sequence = "phalanx_b_s1_t1",
Time = 2.0,
Rate = 0.5,
},
[ "heavy_charge" ] = "phalanx_b_s4_charge",
}
FORM.Stances[2] = {
[ "run" ] = "phalanx_b_run",
[ "idle" ] = "phalanx_b_idle",
[ "light_left" ] = {
Sequence = "phalanx_b_left_t3",
Time = 1.0,
Rate = nil,
},
[ "light_right" ] = {
Sequence = "phalanx_b_right_t2",
Time = 0.7,
Rate = nil,
},
[ "light_forward" ] = {
Sequence = "phalanx_b_s2_t3",
Time = 0.8,
Rate = nil,
},
[ "air_left" ] = {
Sequence = "phalanx_a_left_t1",
Time = 0.6,
Rate = 1.6,
},
[ "air_right" ] = {
Sequence = "phalanx_a_right_t1",
Time = 0.6,
Rate = 1.7,
},
[ "air_forward" ] = {
Sequence = "phalanx_a_s1_t1",
Time = 0.6,
Rate = 1.2,
},
[ "heavy" ] = {
Sequence = "phalanx_b_s1_t1",
Time = 2.0,
Rate = 0.5,
},
[ "heavy_charge" ] = "phalanx_b_s4_charge",
}
FORM.Stances[3] = {
[ "run" ] = "phalanx_h_run",
[ "idle" ] = "phalanx_h_idle",
[ "light_left" ] = {
Sequence = "phalanx_b_s2_t1",
Time = nil,
Rate = nil,
},
[ "light_right" ] = {
Sequence = "phalanx_h_right_t1",
Time = nil,
Rate = nil,
},
[ "light_forward" ] = {
Sequence = "phalanx_h_s1_t1",
Time = 1.2,
Rate = nil,
},
[ "air_left" ] = {
Sequence = "phalanx_a_left_t1",
Time = 0.6,
Rate = 1.6,
},
[ "air_right" ] = {
Sequence = "phalanx_a_right_t1",
Time = 0.6,
Rate = 1.7,
},
[ "air_forward" ] = {
Sequence = "phalanx_a_s1_t1",
Time = 0.6,
Rate = 1.2,
},
[ "heavy" ] = {
Sequence = "phalanx_b_s1_t1",
Time = 2.0,
Rate = 0.5,
},
[ "heavy_charge" ] = "phalanx_b_s4_charge",
}
wOS:RegisterNewForm( FORM )