.sab: Difference between revisions

From Jedi Knight Wiki | JKHub
No edit summary
(Corrected and completed the documentation for bladeStyle2Start ~ashuradx)
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
A .sab file sets the properties of one or more [[saber]] [[hilt|hilts]] in [[JKA]]. You can put as many different sabers into one file as you wish, and can have more than one hilt per model.
A '''.sab file''' sets the properties of one or more [[saber]] [[hilt|hilts]] in [[JKA]]. You can put as many different sabers into one file as you wish, and can have more than one hilt per model.


A each saber has the following syntax in a .sab file:
A each saber has the following syntax in a .sab file:
{| class="wikitable"
|-
| [Saber_name]


<nowiki>[Saber_name]
{
{
    [Key] [Value]
    [Key] [Value]
}</nowiki>
Where <code>[saber_name]</code> is the name the game refers to the saber by (and the name you can use with the [[Saber (Command)|/saber command]]) and the <code>[key]</code>s are various variables the [[Modder|modder]] can assign <code>[value]</code>s to, to give the hilt properties. A modder can put as many keys between the curly braces as they wish. Any keys that are not present will be given their default values.


[Key] [Value]


[Key] [Value]
==Keys==


}
===Standard Keys===
 
{| class="wikitable"
! name        !! note
|-
| name        || this is the name that will appear in the [[menu]]. you can either type a name inside quote marks (eg "MUG's Saber") or point it to a menu string (as with single_1)
|-
| saberType  || either SABER_SINGLE for a [[Single Saber|normal saber]] or SABER_STAFF for a [[Staff|two-handed Darth Maul style hilt]].
|-
| saberModel  || the [[.glm File|glm file]] that contains the [[model]] for the [[hilt]].
|-
| customSkin  || a .skin file to apply to the saber hilt model, if any (overrides saber hilt model's internal texture mapping), needs file path (ex. models/weapons2/saber_reborn/jedi.skin)
|-
| soundOn    || the [[Sound|sound]] file to play when the saber is activated.
|-
| soundLoop  || the sound file to loop while it is on.
|-
| soundOff    || I think you get the idea now.
|-
| saberLength || This should normally be 40 for a [[single saber]] and 32 for a [[staff]].
|-
| saberColor  || Should always be set to "random". but you can type the name of another colour if you really want.
|}
|}
Where [saber_name] is the name the game refers to the saber by (and the name you can use with the [[Saber (Command)|/saber command]] in [[japlus]]) and the [key]s are various variables the [[Modder|modder]] can assign [value]s to, to give the hilt properties. A modder can put as many keys between the curly braces as they wish. Any keys that are not present will be given their default values.


==Keys==
 
===Standard Keys===
* name - this is the name that will appear in the [[menu]]. you can either type a name inside quote marks (eg "MUG's Saber") or point it to a menu string (as with single_1)
* '''saberType''' - either SABER_SINGLE for a [[Single Saber|normal saber]] or SABER_STAFF for a [[Staff|two-handed Darth Maul style hilt]].
* '''saberModel''' - the [[.glm File|glm file]] that contains the [[model]] for the [[hilt]].
* '''soundOn''' - the [[Sound|sound]] file to play when the saber is activated.
* '''soundLoop''' - the sound file to loop while it is on.
* '''soundOff''' - I think you get the idea now.
* '''saberLength''' - This should normally be 40 for a [[single saber]] and 32 for a [[staff]].
* '''saberColor''' - Should always be set to "random". but you can type the name of another colour if you really want.
===Staff Keys===
===Staff Keys===
* '''numBlades''' - 2 for a [[staff]], you can enter more if the hilt [[model]] allows for it. Maximum is 8.
 
* '''throwable''' - Set to 0 for a staff so that the saber is not [[Saber Throw|throwable]].
{| class="wikitable"
* '''singleBladeStyle''' - the style to use when set to one blade. Should normally be "medium". (fast, medium, strong, desann, tavion)
! name        !! note
* '''singleBladeThrowable''' - set to 1 to make the staff [[Saber Throw|throwable]] when set to one blade. If you set throwable to 1 and this value to 0 for a saber staff, it allows the saber to be thrown with both blades ignited.
|-
* '''brokenSaber1''' and '''brokenSaber2''' - This is unused in [[BaseJKA|base]] multiplayer, but was supposed to be model files to use when your staff gets broken. It does work however in Single Player. It may be used in some mods, so set it to the usual value of "brokenstaff", or whatever broken staff model the mod has.
| numBlades                 || 2 for a [[staff]], you can enter more if the hilt [[model]] allows for it. Maximum is 8.
* '''twoHanded''' - set this to 1 for a staff. According to notes in assets1.pk3 this restricts [[force powers]] but makes the hilt stronger in [[Saber Lock|locks]] and [[Parrying|parries]].
|-
| throwable                 || Set to 0 for a staff so that the saber is not [[Saber Throw|throwable]]. This allows a saber to kick. Set this to 1, and "singleBladeThrowable" to 0 for throwable saber staffs.
|-
| singleBladeStyle           || the style to use when set to one blade. Should normally be "medium". (fast, medium, strong, desann, tavion)
|-
| singleBladeThrowable       || set to 1 to make the staff [[Saber Throw|throwable]] when set to one blade. If you set throwable to 1 and this value to 0 for a saber staff, it allows the saber to be thrown with both blades ignited.
|-
| brokenSaber1, brokenSaber2 || This is unused in [[BaseJKA|base]] multiplayer, but was supposed to be model files to use when your staff gets broken. It does work however in Single Player. It may be used in some mods, so set it to the usual value of "brokenstaff", or whatever broken staff model the mod has.
|-
| twoHanded                 || set this to 1 for a staff. This restricts [[force powers]] if g_saberRestrictForce is set to 1, but makes the hilt stronger in [[Saber Lock|locks]] and [[Parrying|parries]].
|}
 
 
===Sword and Non-lightsaber-blade Weapon Keys===
===Sword and Non-lightsaber-blade Weapon Keys===
* '''noDlight''' - 1 (removes the saber's [[dynamic glow]] [[effect]])
 
* '''noBlade''' - 1 (Removes the [[saber blade]] effect)
{| class="wikitable"
* '''noIdleEffect''' - 1 (prevents the saber from drawing effects or doing [[damage]] when it collides with stuff without you doing an attack.
! name          !! note
* '''noWallMarks''' - 1 Pretty obvious.
|-
* '''trailStyle''' - 0 For no [[Trail Effect|trail]], 1 for a saber trail, 2 for a sword trail.
| noDlight     || 1 (removes the saber's [[dynamic glow]] [[effect]])
* '''idleInBack''' - Does nothing unless you are using [[JA+]]. 1 to make the weapon go in whatever [[holster]] you selected over your back when out of use, 2 to make it go over your back without a holster.
|-
* '''bounceOnWalls''' - Optionally you may want to set this to 1 to make it hit walls. This can be very annoying however, as several attacks always hit the floor.
| noBlade       || 1 (Removes the [[saber blade]] effect)
|-
| noIdleEffect || 1 (prevents the saber from drawing effects or doing [[damage]] when it collides with stuff without you doing an attack.
|-
| noWallMarks   || 1 Pretty obvious.
|-
| trailStyle   || 0 For no [[Trail Effect|trail]], 1 for a saber trail, 2 for a sword trail.
|-
| idleInBack   || Does nothing unless you are using [[JA+]]. 1 to make the weapon go in whatever [[holster]] you selected over your back when out of use, 2 to make it go over your back without a holster.
|-
| bounceOnWalls || Optionally you may want to set this to 1 to make it hit walls. This can be very annoying however, as several attacks always hit the floor.
|}
 
 
===Misc Keys===
===Misc Keys===
* '''saberStyle''' - a single combat style/stance which the saber is locked in.
{| class="wikitable"
* '''lockable''' - 0/1
! name                !! note
* '''disarmable''' - 0/1
|-
* '''blocking''' - 0 to stop the character from trying to auto block projectiles
| notInMP            || set this to one to make the saber nonselectable in MP.
* '''forceRestrict''' - a [[Force|power]] to restrict if twoHanded is set to 1. Enter the key multiple times to block multiple powers:
|-
:* FP_HEAL
| saberStyle         || a single combat style/stance which the saber is locked in. (fast, medium, desann, tavion etc.)
:* FP_LEVITATION
|-
:* FP_SPEED
| saberStyleLearned  || stances that are given to the player upon being given the saber
:* FP_PUSH
|-
:* FP_PULL   
| saberStyleForbidden || which styles can't be used with the saber, doesn't take away the styles from the player but doesn't allow them to be used with the saber
:* FP_TELEPATHY   
|-
:* FP_GRIP   
| lockable           || 0/1 (if it can be in a saber lock)
:* FP_LIGHTNING   
|-
:* FP_SABERTHROW   
| disarmable         || 0/1 (if it can be disarmed)
:* FP_SABER_DEFENSE   
|-
:* FP_SABER_OFFENSE   
| blocking           || 0 to stop the character from trying to auto block projectiles (shots will bounce off however)
:* FP_RAGE   
|-
:* FP_PROTECT   
| forceRestrict       || a [[Force|power]] to restrict if twoHanded is set to 1. The cvar g_saberRestrictForce may have to be set to 1. Enter the key multiple times to block multiple powers:
:* FP_ABSORB   
* FP_HEAL
:* FP_DRAIN   
* FP_LEVITATION
:* FP_SEE
* FP_SPEED
* '''lockBonus''' - a bonus in [[saber lock|saber locks]]
* FP_PUSH
* '''parryBonus''' - a bonus in [[parrying|parries]]
* FP_PULL   
* '''breakParryBonus''' - a bonus to break a parry
* FP_TELEPATHY   
* '''disarmBonus''' - you should get the idea by now...
* FP_GRIP   
* '''returnDamage''' - 1 to make a saber keep spinning and doing damage when returning from a [[Saber Throw|throw]], rather than flying straight back.
* FP_LIGHTNING   
* '''customSkin''' - an alternate [[texture]] to apply to the model.
* FP_SABERTHROW   
* '''onInWater''' - 1 to allow on in [[Water|water]].
* FP_SABER_DEFENSE   
* '''boltToWrist''' - if 1, attaches the [[hilt]] to the wrist rather than the hand, so you can make claws and the likes.
* FP_SABER_OFFENSE   
* '''noDismemberment''' - set to 1 for clubs and blunt weapons.
* FP_RAGE   
* '''alwaysBlock''' - set to 1 for shields etc. This also lets you block when you normally couldn't, such as mid-swing or when knocked over.
* FP_PROTECT   
* '''noManualDeactivate''' - if 1, you cant switch [[dual]] and [[staff]] to single mode. you can still press 1 to deactivate the [[saber]].
* FP_ABSORB   
* '''saberRadius''' - (normally 3) how wide the saber's first blade should be (minimum of 0.25)
* FP_DRAIN   
* '''bladeStyle2Start''' - set this to a blade number. Any keys set after this line in the .sab entry will apply only to blades of the set number or higher, allowing you to give different blades different properties (should allow you to have a weapon with one sword blade and one saber blade and the like). This is unconfirmed, so test thoroughly if you use it. You should even be able to use this line multiple times with different values.
* FP_SEE
|-
| lockBonus           || a bonus in [[saber lock|saber locks]]
|-
| parryBonus         || a bonus in [[parrying|parries]]. In Single Player, to block sabers with a break parry bonus, this must equal that bonus +2 (ex. a saber needs a PB of 3 to block a BPB of 1).
|-
| breakParryBonus     || a bonus to break a parry. In Single Player, values of 1+ makes medium, staff, tavion, and perhaps duals stance swings uninterruptible. At most they can only be blocked partially.
|-
| disarmBonus         || you should get the idea by now...
|-
| returnDamage       || 1 to make a saber keep spinning and doing damage when returning from a [[Saber Throw|throw]], rather than flying straight back.
|-
| customSkin         || an alternate [[texture]] to apply to the model.
|-
| onInWater           || 1 to allow on in [[Water|water]].
|-
| boltToWrist         || if 1, attaches the [[hilt]] to the wrist rather than the hand, so you can make claws and the likes.
|-
| noDismemberment     || set to 1 for clubs and blunt weapons.
|-
| alwaysBlock         || set to 1 for shields etc. This also lets you block when you normally couldn't, such as mid-swing or when knocked over.
|-
| noManualDeactivate || if 1, you cant switch [[dual]] and [[staff]] to single mode. you can still press 1 to deactivate the [[saber]].
|-
| saberRadius         || (normally 3) how wide the saber's first blade should be (minimum of 0.25)
|-
| bladeStyle2Start   || used to define which blades use bladeStyle and which ones sue bladeStyle2, set to the number of last blade you want to use the default style. Example file can be found at the bottom.
|}
 
 
===Crazy Keys===
===Crazy Keys===
* '''moveSpeedScale''' - (decimals allowed) makes the character [[speed]] change. (e.g 0.5 is half speed, 2 is double speed)
 
* '''animSpeedScale''' - (decimals allowed) Attack speed. (e.g 0.5 is half speed, 2 is double speed)
{| class="wikitable"
* '''knockbackScale''' - amount that hit players are knocked back
! name            !! note
* '''damageScale''' - Usually this is only helpful for making over powered sabers, but you can also make low damage training sabers with it.
|-
* '''splashDamage''' - 100% of this value is dealt at point of impact, 0% delt at the splash radius:
| moveSpeedScale || (decimals allowed) makes the character [[speed]] change. (e.g 0.5 is half speed, 2 is double speed)
* '''splashRadius''' - maximum range of splash damage
|-
* '''splashKnockback''' - scales like splashDamage
| animSpeedScale || (decimals allowed) Attack speed. (e.g 0.5 is half speed, 2 is double speed)
|-
| knockbackScale || amount that hit players are knocked back
|-
| damageScale     || Usually this is only helpful for making over powered sabers, but you can also make low damage training sabers with it.
|-
| splashDamage   || 100% of this value is dealt at point of impact, 0% delt at the splash radius:
|-
| splashRadius   || maximum range of splash damage
|-
| splashKnockback || scales like splashDamage
|}
 
 
===Multiple Blade Keys===
===Multiple Blade Keys===
* '''saberLength2'''
* '''saberLength3'''
* etc. (up to 8)


* '''saberColor2'''
* saberLength2, saberLength3 etc. (up to 8)
* etc
* saberColor2 etc.
* saberRadius2 etc.
 


* '''saberRadius2'''
* etc
===Custom Sound Keys===
===Custom Sound Keys===
Set any of the following to a valid [[sound file]]:
Set any of the following to a valid [[sound file]]:
* '''spinsound''' - when the saber is [[Saber Throw|thrown]]. Also used in [[Kata|katas]].
{| class="wikitable"
* '''swingSound1'''
! name        !! note
* '''swingSound2'''
|-
* '''swingSound3'''
| spinsound   || when the saber is [[Saber Throw|thrown]]. Also used in [[Kata|katas]].
* '''fallSound1'''
|-
* '''fallSound2'''
| swingSound1 ||
* '''fallSound3'''
|-
* '''hitSound1'''
| swingSound2 ||
* '''hitSound2'''
|-
* '''hitSound3'''
| swingSound3 ||
* '''blockSound1''' - these are for when your attacks are blocked, not the other way around.
|-
* '''blockSound2'''
| fallSound1   || for when the saber falls to the ground
* '''blockSound3'''
|-
* '''bounceSound1'''
| fallSound2   ||
* '''bounceSound2'''
|-
* '''bounceSound3'''
| fallSound3   ||
|-
| hitSound1   ||
|-
| hitSound2   ||
|-
| hitSound3   ||
|-
| blockSound1 || these are for when your attacks are blocked, not the other way around.
|-
| blockSound2 ||
|-
| blockSound3 ||
|-
| bounceSound1 || these are for your blade/saber bouncing off a wall
|-
| bounceSound2 ||
|-
| bounceSound3 ||
|}
 
 
===Effects===
===Effects===
Set these to  valid [[.efx File|.efx files]]:
Set these to  valid [[.efx File|.efx files]]:
* '''hitPersonEffect''' - impact on players
{| class="wikitable"
* '''g2MarksShader''' - Marks left on players
! name            !! note
* '''hitOtherEffect''' - impact on walls
|-
* '''blockEffect''' - when you [[parrying|parry]] a blow
| hitPersonEffect || impact on players
* [[bladeEffect]] - Use an .efx file instead of a [[lightsaber]] blade. Reports of this causing crashes when the saber is thrown.
|-
| g2MarksShader   || Marks left on players
|-
| hitOtherEffect || impact on walls
|-
| blockEffect     || when you [[parrying|parry]] a blow
|-
| [[bladeEffect]] || Use an .efx file instead of a [[lightsaber]] blade. Reports of this causing crashes when the saber is thrown.
|}
 
 
===Animations===
===Animations===
Set these to a name from [[anims.h]] or [[BehavEd]]. Animations are handled [[server-side]], so you can adjust the animations of [[base]] sabers on your [[server]] and players will see the new [[Animation|animations]]. They will also see animations set in [[custom saber|custom sabers]] that they don't have, so long as those sabers are saved on the server, and the animations are [[base]].
Set these to a name from [[anims.h]] or [[BehavEd]]. Animations are handled [[server-side]], so you can adjust the animations of [[base]] sabers on your [[server]] and players will see the new [[Animation|animations]]. They will also see animations set in [[custom saber|custom sabers]] that they don't have, so long as those sabers are saved on the server, and the animations are [[base]].
* '''readyAnim
 
* readyAnim
* drawAnim
* drawAnim
* putawayAnim
* putawayAnim
Line 128: Line 240:
* meditateAnim
* meditateAnim
* flourishAnim
* flourishAnim
* gloatAnim'''
* gloatAnim
 
 
===Disable Moves===
===Disable Moves===
Set these to 1 to disable each move:
Set these to 1 to disable each move:
'''* noRollStab
 
* noRollStab
* noPullAttack
* noPullAttack
* noBackAttack
* noBackAttack
Line 142: Line 258:
* noCartwheels
* noCartwheels
* noKicks
* noKicks
* noMirrorAttacks''' - The stab left and right at once attack with [[Dual|dual sabers]].
* noMirrorAttacks (the stab left and right at once attack with [[Dual|dual sabers]])
 
 
===Move Replacements===
===Move Replacements===
====Moves to Replace (Keys)====
====Moves to Replace (Keys)====
* '''kataMove''' - [[kata]]
 
* '''lungeAtkMove''' - [[lunge]]
{| class="wikitable"
* '''jumptAtkUpMove''' - jump + attack
! name              !! note
* '''jumpAtkFwdMove''' - [[dfa]]
|-
* '''jumpAtkBackMove''' - (like staff reverse dfa flip)
| kataMove         || [[kata]]
* '''jumptAtkRightMove''' - (like [[butterfly]])
|-
* '''jumpAtkLeftMove''' - (like [[butterfly]])
| lungeAtkMove     || [[lunge]]
|-
| jumptAtkUpMove   || jump + attack
|-
| jumpAtkFwdMove   || [[dfa]]
|-
| jumpAtkBackMove   || (like staff reverse dfa flip)
|-
| jumptAtkRightMove || (like [[butterfly]])
|-
| jumpAtkLeftMove   || (like [[butterfly]])
|}
 
====Moves to Set (Values)====
====Moves to Set (Values)====
* '''LS_NONE''' - Do a regular attack
 
'''* LS_A_TL2BR
* LS_NONE (regular attack)
* LS_A_TL2BR
* LS_A_L2R
* LS_A_L2R
* LS_A_BL2TR
* LS_A_BL2TR
Line 211: Line 343:
* LS_DUAL_FB
* LS_DUAL_FB
* LS_DUAL_LR
* LS_DUAL_LR
* LS_HILT_BASH'''
* LS_HILT_BASH
 


==Example Custom .SAB==
==Example Custom .SAB==
===Spoon Hilt===
===Spoon Hilt===
{| class="wikitable"
|-
| spoon


<nowiki>spoon
{
{
    name          "Spoon of Death"
    saberType    SABER_SINGLE
    saberModel    "models/weapons2/spoon/spoon.glm"
    saberLength  10
    noWallMarks  1
    throwable    1
    notInMP      0
    noDlight      1
    noBlade      1
    trailStyle    1
    noIdleEffect  1
    onInWater    1
    norollStab    0
    bounceOnWalls 1
    idleinback    2
    soundOn      "sound/weapons/spoonofdeath/on.mp3"
    soundOff      "sound/weapons/spoonofdeath/off.mp3"
    soundLoop    "sound/effects/null.wav"
    swingSound1  "sound/weapons/spoonofdeath/swing1.mp3"
    swingSound2  "sound/weapons/spoonofdeath/swing2.mp3"
    swingSound3  "sound/weapons/spoonofdeath/swing3.mp3"
    spinSound    "sound/weapons/spoonofdeath/on.mp3"
    fallSound1    "sound/weapons/spoonofdeath/fall1.mp3"
    fallSound2    "sound/weapons/spoonofdeath/fall2.mp3"
    fallSound3    "sound/weapons/spoonofdeath/fall3.mp3"
    fallSound4    "sound/weapons/spoonofdeath/fall4.mp3"
    hitSound1    "sound/weapons/spoonofdeath/hit1.mp3"
    hitSound2    "sound/weapons/spoonofdeath/hit2.mp3"
    hitSound3    "sound/weapons/spoonofdeath/hit3.mp3"
    blockSound1  "sound/weapons/spoonofdeath/fall1.mp3"
    blockSound2  "sound/weapons/spoonofdeath/fall2.mp3"
    blockSound3  "sound/weapons/spoonofdeath/fall3.mp3"
}</nowiki>


name "Spoon of Death"
===BladeStyle2Start example===


saberType SABER_SINGLE
<nowiki>dual_test
 
{
saberModel "models/weapons2/spoon/spoon.glm"
name "Test"
 
saberType SABER_STAFF
saberLength 10
saberModel "models/weapons2/saber_dual_1/saber_dual_1.glm"
 
soundOn "sound/weapons/saber/saberon.wav"
noWallMarks 1
soundLoop "sound/weapons/saber/saberhum4.wav"
 
soundOff "sound/weapons/saber/saberoff.wav"
throwable 1
saberColor red
 
saberColor2 blue
notInMP 0
numBlades 2
 
saberLength 32
noDlight 1
saberStyle staff
 
throwable 0
noBlade 1
singleBladeStyle medium
 
singleBladeThrowable 1
trailStyle 1
brokenSaber1 brokenstaff
 
brokenSaber2 brokenstaff
noIdleEffect 1
twoHanded 1
 
onInWater 1
//define Bladestyle 1, you can have a maximum of 2 bladestyles per saber
 
noblade 0
norollStab 0
trailstyle 0
 
noDlight 0
bounceOnWalls 1
 
//define Bladestyle2
idleinback 2
noblade2 1
 
trailstyle2 1
soundOn "sound/weapons/spoonofdeath/on.mp3"
noDlight2 1


soundOff "sound/weapons/spoonofdeath/off.mp3"
//Tell the game to use bladestyle2 for all blades after Blade 1
 
BladeStyle2Start 1
soundLoop "sound/effects/null.wav"
}</nowiki>
 
swingSound1 "sound/weapons/spoonofdeath/swing1.mp3"
 
swingSound2 "sound/weapons/spoonofdeath/swing2.mp3"
 
swingSound3 "sound/weapons/spoonofdeath/swing3.mp3"
 
spinSound "sound/weapons/spoonofdeath/on.mp3"
 
fallSound1 "sound/weapons/spoonofdeath/fall1.mp3"
 
fallSound2 "sound/weapons/spoonofdeath/fall2.mp3"
 
fallSound3 "sound/weapons/spoonofdeath/fall3.mp3"
 
fallSound4 "sound/weapons/spoonofdeath/fall4.mp3"
 
hitSound1 "sound/weapons/spoonofdeath/hit1.mp3"
 
hitSound2 "sound/weapons/spoonofdeath/hit2.mp3"
 
hitSound3 "sound/weapons/spoonofdeath/hit3.mp3"
 
blockSound1 "sound/weapons/spoonofdeath/fall1.mp3"
 
blockSound2 "sound/weapons/spoonofdeath/fall2.mp3"
 
blockSound3 "sound/weapons/spoonofdeath/fall3.mp3"
 
}
|}


[[Category:File Types]]
[[Category:File Types]]

Revision as of 08:53, 13 June 2020

A .sab file sets the properties of one or more saber hilts in JKA. You can put as many different sabers into one file as you wish, and can have more than one hilt per model.

A each saber has the following syntax in a .sab file:

[Saber_name]
{
    [Key] [Value]
    [Key] [Value]
}

Where [saber_name] is the name the game refers to the saber by (and the name you can use with the /saber command) and the [key]s are various variables the modder can assign [value]s to, to give the hilt properties. A modder can put as many keys between the curly braces as they wish. Any keys that are not present will be given their default values.


Keys

Standard Keys

name note
name this is the name that will appear in the menu. you can either type a name inside quote marks (eg "MUG's Saber") or point it to a menu string (as with single_1)
saberType either SABER_SINGLE for a normal saber or SABER_STAFF for a two-handed Darth Maul style hilt.
saberModel the glm file that contains the model for the hilt.
customSkin a .skin file to apply to the saber hilt model, if any (overrides saber hilt model's internal texture mapping), needs file path (ex. models/weapons2/saber_reborn/jedi.skin)
soundOn the sound file to play when the saber is activated.
soundLoop the sound file to loop while it is on.
soundOff I think you get the idea now.
saberLength This should normally be 40 for a single saber and 32 for a staff.
saberColor Should always be set to "random". but you can type the name of another colour if you really want.


Staff Keys

name note
numBlades 2 for a staff, you can enter more if the hilt model allows for it. Maximum is 8.
throwable Set to 0 for a staff so that the saber is not throwable. This allows a saber to kick. Set this to 1, and "singleBladeThrowable" to 0 for throwable saber staffs.
singleBladeStyle the style to use when set to one blade. Should normally be "medium". (fast, medium, strong, desann, tavion)
singleBladeThrowable set to 1 to make the staff throwable when set to one blade. If you set throwable to 1 and this value to 0 for a saber staff, it allows the saber to be thrown with both blades ignited.
brokenSaber1, brokenSaber2 This is unused in base multiplayer, but was supposed to be model files to use when your staff gets broken. It does work however in Single Player. It may be used in some mods, so set it to the usual value of "brokenstaff", or whatever broken staff model the mod has.
twoHanded set this to 1 for a staff. This restricts force powers if g_saberRestrictForce is set to 1, but makes the hilt stronger in locks and parries.


Sword and Non-lightsaber-blade Weapon Keys

name note
noDlight 1 (removes the saber's dynamic glow effect)
noBlade 1 (Removes the saber blade effect)
noIdleEffect 1 (prevents the saber from drawing effects or doing damage when it collides with stuff without you doing an attack.
noWallMarks 1 Pretty obvious.
trailStyle 0 For no trail, 1 for a saber trail, 2 for a sword trail.
idleInBack Does nothing unless you are using JA+. 1 to make the weapon go in whatever holster you selected over your back when out of use, 2 to make it go over your back without a holster.
bounceOnWalls Optionally you may want to set this to 1 to make it hit walls. This can be very annoying however, as several attacks always hit the floor.


Misc Keys

name note
notInMP set this to one to make the saber nonselectable in MP.
saberStyle a single combat style/stance which the saber is locked in. (fast, medium, desann, tavion etc.)
saberStyleLearned stances that are given to the player upon being given the saber
saberStyleForbidden which styles can't be used with the saber, doesn't take away the styles from the player but doesn't allow them to be used with the saber
lockable 0/1 (if it can be in a saber lock)
disarmable 0/1 (if it can be disarmed)
blocking 0 to stop the character from trying to auto block projectiles (shots will bounce off however)
forceRestrict a power to restrict if twoHanded is set to 1. The cvar g_saberRestrictForce may have to be set to 1. Enter the key multiple times to block multiple powers:
  • FP_HEAL
  • FP_LEVITATION
  • FP_SPEED
  • FP_PUSH
  • FP_PULL
  • FP_TELEPATHY
  • FP_GRIP
  • FP_LIGHTNING
  • FP_SABERTHROW
  • FP_SABER_DEFENSE
  • FP_SABER_OFFENSE
  • FP_RAGE
  • FP_PROTECT
  • FP_ABSORB
  • FP_DRAIN
  • FP_SEE
lockBonus a bonus in saber locks
parryBonus a bonus in parries. In Single Player, to block sabers with a break parry bonus, this must equal that bonus +2 (ex. a saber needs a PB of 3 to block a BPB of 1).
breakParryBonus a bonus to break a parry. In Single Player, values of 1+ makes medium, staff, tavion, and perhaps duals stance swings uninterruptible. At most they can only be blocked partially.
disarmBonus you should get the idea by now...
returnDamage 1 to make a saber keep spinning and doing damage when returning from a throw, rather than flying straight back.
customSkin an alternate texture to apply to the model.
onInWater 1 to allow on in water.
boltToWrist if 1, attaches the hilt to the wrist rather than the hand, so you can make claws and the likes.
noDismemberment set to 1 for clubs and blunt weapons.
alwaysBlock set to 1 for shields etc. This also lets you block when you normally couldn't, such as mid-swing or when knocked over.
noManualDeactivate if 1, you cant switch dual and staff to single mode. you can still press 1 to deactivate the saber.
saberRadius (normally 3) how wide the saber's first blade should be (minimum of 0.25)
bladeStyle2Start used to define which blades use bladeStyle and which ones sue bladeStyle2, set to the number of last blade you want to use the default style. Example file can be found at the bottom.


Crazy Keys

name note
moveSpeedScale (decimals allowed) makes the character speed change. (e.g 0.5 is half speed, 2 is double speed)
animSpeedScale (decimals allowed) Attack speed. (e.g 0.5 is half speed, 2 is double speed)
knockbackScale amount that hit players are knocked back
damageScale Usually this is only helpful for making over powered sabers, but you can also make low damage training sabers with it.
splashDamage 100% of this value is dealt at point of impact, 0% delt at the splash radius:
splashRadius maximum range of splash damage
splashKnockback scales like splashDamage


Multiple Blade Keys

  • saberLength2, saberLength3 etc. (up to 8)
  • saberColor2 etc.
  • saberRadius2 etc.


Custom Sound Keys

Set any of the following to a valid sound file:

name note
spinsound when the saber is thrown. Also used in katas.
swingSound1
swingSound2
swingSound3
fallSound1 for when the saber falls to the ground
fallSound2
fallSound3
hitSound1
hitSound2
hitSound3
blockSound1 these are for when your attacks are blocked, not the other way around.
blockSound2
blockSound3
bounceSound1 these are for your blade/saber bouncing off a wall
bounceSound2
bounceSound3


Effects

Set these to valid .efx files:

name note
hitPersonEffect impact on players
g2MarksShader Marks left on players
hitOtherEffect impact on walls
blockEffect when you parry a blow
bladeEffect Use an .efx file instead of a lightsaber blade. Reports of this causing crashes when the saber is thrown.


Animations

Set these to a name from anims.h or BehavEd. Animations are handled server-side, so you can adjust the animations of base sabers on your server and players will see the new animations. They will also see animations set in custom sabers that they don't have, so long as those sabers are saved on the server, and the animations are base.

  • readyAnim
  • drawAnim
  • putawayAnim
  • tauntAnim
  • bowAnim
  • meditateAnim
  • flourishAnim
  • gloatAnim


Disable Moves

Set these to 1 to disable each move:

  • noRollStab
  • noPullAttack
  • noBackAttack
  • noStabDown
  • noWallRuns
  • noWallFlips
  • noWallGrab
  • noRolls
  • noFlips
  • noCartwheels
  • noKicks
  • noMirrorAttacks (the stab left and right at once attack with dual sabers)


Move Replacements

Moves to Replace (Keys)

name note
kataMove kata
lungeAtkMove lunge
jumptAtkUpMove jump + attack
jumpAtkFwdMove dfa
jumpAtkBackMove (like staff reverse dfa flip)
jumptAtkRightMove (like butterfly)
jumpAtkLeftMove (like butterfly)

Moves to Set (Values)

  • LS_NONE (regular attack)
  • LS_A_TL2BR
  • LS_A_L2R
  • LS_A_BL2TR
  • LS_A_BR2TL
  • LS_A_R2L
  • LS_A_TR2BL
  • LS_A_T2B
  • LS_A_BACKSTAB
  • LS_A_BACK
  • LS_A_BACK_CR
  • LS_ROLL_STAB
  • LS_A_LUNGE
  • LS_A_JUMP_T__B_
  • LS_A_FLIP_STAB
  • LS_A_FLIP_SLASH
  • LS_JUMPATTACK_DUAL
  • LS_JUMPATTACK_ARIAL_LEFT
  • LS_JUMPATTACK_ARIAL_RIGHT
  • LS_JUMPATTACK_CART_LEFT
  • LS_JUMPATTACK_CART_RIGHT
  • LS_JUMPATTACK_STAFF_LEFT
  • LS_JUMPATTACK_STAFF_RIGHT
  • LS_BUTTERFLY_LEFT
  • LS_BUTTERFLY_RIGHT
  • LS_A_BACKFLIP_ATK
  • LS_SPINATTACK_DUAL
  • LS_SPINATTACK
  • LS_LEAP_ATTACK
  • LS_SWOOP_ATTACK_RIGHT
  • LS_SWOOP_ATTACK_LEFT
  • LS_TAUNTAUN_ATTACK_RIGHT
  • LS_TAUNTAUN_ATTACK_LEFT
  • LS_KICK_F
  • LS_KICK_B
  • LS_KICK_R
  • LS_KICK_L
  • LS_KICK_S
  • LS_KICK_BF
  • LS_KICK_RL
  • LS_KICK_F_AIR
  • LS_KICK_B_AIR
  • LS_KICK_R_AIR
  • LS_KICK_L_AIR
  • LS_STABDOWN
  • LS_STABDOWN_STAFF
  • LS_STABDOWN_DUAL
  • LS_DUAL_SPIN_PROTECT
  • LS_STAFF_SOULCAL
  • LS_A1_SPECIAL
  • LS_A2_SPECIAL
  • LS_A3_SPECIAL
  • LS_UPSIDE_DOWN_ATTACK
  • LS_PULL_ATTACK_STAB
  • LS_PULL_ATTACK_SWING
  • LS_SPINATTACK_ALORA
  • LS_DUAL_FB
  • LS_DUAL_LR
  • LS_HILT_BASH


Example Custom .SAB

Spoon Hilt

spoon
{
    name          "Spoon of Death"
    saberType     SABER_SINGLE
    saberModel    "models/weapons2/spoon/spoon.glm"
    saberLength   10
    noWallMarks   1
    throwable     1
    notInMP       0
    noDlight      1
    noBlade       1
    trailStyle    1
    noIdleEffect  1
    onInWater     1
    norollStab    0
    bounceOnWalls 1
    idleinback    2
    soundOn       "sound/weapons/spoonofdeath/on.mp3"
    soundOff      "sound/weapons/spoonofdeath/off.mp3"
    soundLoop     "sound/effects/null.wav"
    swingSound1   "sound/weapons/spoonofdeath/swing1.mp3"
    swingSound2   "sound/weapons/spoonofdeath/swing2.mp3"
    swingSound3   "sound/weapons/spoonofdeath/swing3.mp3"
    spinSound     "sound/weapons/spoonofdeath/on.mp3"
    fallSound1    "sound/weapons/spoonofdeath/fall1.mp3"
    fallSound2    "sound/weapons/spoonofdeath/fall2.mp3"
    fallSound3    "sound/weapons/spoonofdeath/fall3.mp3"
    fallSound4    "sound/weapons/spoonofdeath/fall4.mp3"
    hitSound1     "sound/weapons/spoonofdeath/hit1.mp3"
    hitSound2     "sound/weapons/spoonofdeath/hit2.mp3"
    hitSound3     "sound/weapons/spoonofdeath/hit3.mp3"
    blockSound1   "sound/weapons/spoonofdeath/fall1.mp3"
    blockSound2   "sound/weapons/spoonofdeath/fall2.mp3"
    blockSound3   "sound/weapons/spoonofdeath/fall3.mp3"
}

BladeStyle2Start example

dual_test
{
	name		"Test"
	saberType	SABER_STAFF
	saberModel	"models/weapons2/saber_dual_1/saber_dual_1.glm"
	soundOn		"sound/weapons/saber/saberon.wav"
	soundLoop	"sound/weapons/saber/saberhum4.wav"
	soundOff	"sound/weapons/saber/saberoff.wav"
	saberColor	red
	saberColor2	blue
	numBlades	2
	saberLength	32
	saberStyle	staff
	throwable		0
	singleBladeStyle	medium
	singleBladeThrowable		1
	brokenSaber1	brokenstaff
	brokenSaber2	brokenstaff
	twoHanded		1
	
	//define Bladestyle 1, you can have a maximum of 2 bladestyles per saber
	noblade			0
	trailstyle		0
	noDlight		0
	
	//define Bladestyle2
	noblade2		1
	trailstyle2		1
	noDlight2		1

	//Tell the game to use bladestyle2 for all blades after Blade 1
	BladeStyle2Start	1
}