Saber hilts
Arguably the Jedi or Sith's most valuable tool outside of the Force is his or her lightsaber. Within the realm of MBII, the lightsaber's characteristics are defined for the game engine by a file in the map's .pk3 structure called a .sab file. Mappers and modders utilize or edit existing .sab files in order to specify certain wanted traits and characteristics of lightsabers, which, upon compilation of the information by the game's engine, are actualized within the game as hilts - the iconic herald of Jedi (and Sith) everywhere. By editing or adding predetermined command lines into a .sab file, a mapper or a modder can alter the characteristics granted to a saber hilt. The following content details specific examples of command lines to be used in .sab files. In Full Authentic Mode, the majority of the base Jedi Academy .sab file options are still available. Please put notInOpen 1 into any .sab file that you include within an FA.
Contents |
Lightsaber Configurations
These are all the attributes allowed granted to .sab files. Some descriptions are included along with default values.
NOTE: Add new sabers by putting their entries in a .sab file in ext_data/sabers.
Standard Fields
- saberType SABER_NONE - what kind of saber to use (SABER_SINGLE, SABER_STAFF)
- saberModel "models/weapons2/saber_reborn/saber_w.glm" - what saber hilt model to use
NOTE: The surface names on saber models should always start with "w_", the code expects it.
- customSkin "" - A .skin file to apply to the saber hilt model, if any (overrides saber hilt model's internal texture mapping).
- soundOn "sound/weapons/saber/enemy_saber_on.wav" - Turn on sound.
- soundLoop "sound/weapons/saber/saberhum3.wav" - Loop sound (must be a .wav file).
- soundOff "sound/weapons/saber/enemy_saber_off.wav" - Turn off sound.
- numBlades 1 - How many blades it has (min of 1, max of 2).
NOTE: Each blade will be drawn from it's corresponding tag's position in the direction (negative X axis in ModView) of that tag.
- saberLength 32 - How long the saber's first blade should be (minimum of 4).
- saberLength2 saberLength - How long the saber's second blade should be (minimum of 4).
NOTE: These should be input in order as setting saberLength automatically sets all of the others to the same length.
- saberRadius 3 - How wide the saber's first blade should be (minimum of 0.25).
- saberRadius2 saberRadius - How wide the saber's second blade should be (minimum of 0.25).
NOTE: These should be input in order as setting saberRadius automatically sets all of the others to the same radius.
- saberColor red - What color the saber's 1st blade should be (Valid colors: random, red, orange, yellow, green, blue, and purple).
- saberColor2 saberColor - What color the saber's 2nd blade should be.
NOTE: these should be input in order as setting saberColor automatically sets all of the others to the same color.
- saberStyle none - What one style it's limited to, if any (fast, medium, strong, desann, tavion, dual, staff).
- saberStyleLearned none - What styles they should get when they are given this saber (they don't have to use these, but they become available if they didn't know them before).
- saberStyleForbidden none - What styles cannot be used with this saber (it doesn't take the style from them, it just doesn't allow them to use these styles if they try).
NOTE: The saberStyle field overrides the previous two fields, so don't use them together. Use saberStyle if you only want to allow one style (that style is given to the person using that saber).
- maxChain 0 - How many moves can be chained in a row with this weapon (-1 is infinite, 0 is use default behavior).
- lockable 1 - Whether or not it can be stuck in a saber lock.
- throwable 1 - Whether or not it can be thrown.
- disarmable 1 - Whether or not it can be disarmed (dropped).
- blocking 1 - Whether or not user will try to block incoming shots (shots always bounce off it, this just determines if the user *tries* to block with it).
- twoHanded 0 - Whether or not it requires 2 hands (makes it restrict force powers but makes it stronger in locks or parries).
- forceRestrict 0 - What force powers it restricts; use these keys, a seperate entry per power:
- 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 0 - This pushes harder/weaker in saber locks.
- parryBonus 0 - This is stronger/weaker in a parry (harder to break, more likely to knock away).
- breakParryBonus 0 - This is more/less likely to break a parry.
- breakParryBonus2 0 - For second blade style (see bladeStyle2Start below).
- disarmBonus 0 - This is more/less likely to disarm another saber in a saber lock or knock away.
- disarmBonus2 0 - For second blade style (see bladeStyle2Start below).
- singleBladeStyle none - Makes it so that you use a different style if you only have the first blade active.
- singleBladeThrowable 0 - Makes it so that you can throw this saber if only the first blade is on.
- brokenSaber1 none - If saber is actually hit by another saber, it can be cut in half/broken and will be replaced with this saber in your right hand.
- brokenSaber2 none - If saber is actually hit by another saber, it can be cut in half/broken and will be replaced with this saber in your left hand.
- returnDamage 0 - When returning from a saber throw, it keeps spinning and doing damage.
Additional Fields
The following fields were added after retail version:
NOTE: These values are global to the saber, like all of those above.
Done in cgame (client-side code)
- spinSound none - If set, plays this sound as it spins when thrown.
- swingSound1 none - If set, might play this sound when swung during an attack.
- swingSound2 none - If set, might play this sound when swung during an attack.
- swingSound3 none - If set, might play this sound when swung during an attack.
NOTE: Must provide all three swingSounds.
- fallSound1 none - If set, might play this sound when weapon falls to the ground.
- fallSound2 none - If set, might play this sound when weapon falls to the ground.
- fallSound3 none - If set, might play this sound when weapon falls to the ground.
NOTE: Must provide all three fallSounds.
- onInWater 0 - If set, weapon stays active even in water
Done in game (server-side code)
- bounceOnWalls 0 - If non-zero, the saber will bounce back when it hits solid architecture (good for real-sword type mods).
- moveSpeedScale 1.0 - You move faster/slower when using this saber.
- animSpeedScale 1.0 - Plays normal attack animations faster/slower.
- boltToWrist 0 - If set, saber model is bolted to wrist, not in hand (useful for things like claws, shields, etc.).
- readyAnim none - Animation to use when standing idle (use name of enum in anims.h or BehavEd's list).
- drawAnim none - Animation to use when drawing weapon (use name of enum in anims.h or BehavEd's list).
- putawayAnim none - Animation to use when putting weapon away (use name of enum in anims.h or BehavEd's list).
- tauntAnim none - Animation to use when hit "taunt" (use name of enum in anims.h or BehavEd's list).
- bowAnim none - Animation to use when hit "bow" (use name of enum in anims.h or BehavEd's list).
- meditateAnim none - Animation to use when hit "meditate" (use name of enum in anims.h or BehavEd's list).
- flourishAnim none - Animation to use when hit "flourish" (use name of enum in anims.h or BehavEd's list).
- gloatAnim none - Animation to use when hit "gloat" (use name of enum in anims.h or BehavEd's list).
- noRollStab 0 - If set, cannot do roll-stab move at end of roll.
- noPullAttack 0 - If set, cannot do pull+attack move (move not available in MP anyway).
- noBackAttack 0 - If set, cannot do back-stab moves.
- noStabDown 0 - If set, cannot do stabdown move (when enemy is on ground).
- noWallRuns 0 - If set, cannot side-run or forward-run on walls.
- noWallFlips 0 - If set, cannot do backflip off wall or side-flips off walls.
- noWallGrab 0 - If set, cannot grab wall & jump off.
- noRolls 0 - If set, cannot roll.
- noFlips 0 - If set, cannot do flips.
- noCartwheels 0 - If set, cannot do cartwheels.
- noKicks 0 - If set, cannot do kicks (can't do kicks anyway if using a throwable saber/sword).
- noMirrorAttacks 0 - If set, cannot do the simultaneous attack left/right moves (only available in Dual Lightsaber Combat Style).
Done in both cgame and game (BG code)
- kataMove 0 - If set, player will execute this move when they press both attack buttons at the same time (see list below for valid values).
- lungeAtkMove 0 - If set, player will execute this move when they crouch+fwd+attack (see list below for valid values).
- jumpAtkUpMove 0 - If set, player will execute this move when they jump+attack (see list below for valid values).
- jumpAtkFwdMove 0 - If set, player will execute this move when they jump+fwd+attack (see list below for valid values).
- jumpAtkBackMove 0 - If set, player will execute this move when they jump+back+attack (see list below for valid values).
- jumpAtkRightMove 0 - If set, player will execute this move when they jump+rightattack (see list below for valid values).
- jumpAtkLeftMove 0 - If set, player will execute this move when they jump+left+attack (see list below for valid values).
- LS_NONE - Do a regular attack instead of a special move (overrides the usual special move with a normal 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
Blade Styles
These values can be specified differently for different blades (see bladeStyle2Start below for more info):
Done in cgame (client-side code)
- noWallMarks 0 - If 1, stops the saber from drawing marks on the world (good for real-sword type mods).
- noDlight 0 - If 1, stops the saber from drawing a dynamic light (good for real-sword type mods).
- noBlade 0 - If 1, stops the saber from drawing a blade (good for real-sword type mods).
- noClashFlare 0 - If non-zero, the saber will not do the big, white clash flare with other sabers.
- trailStyle 0 - Default (0) is normal, 1 is a motion blur and 2 is no trail at all (good for real-sword type mods).
- g2MarksShader none - If set, the game will use this shader for marks on enemies instead of the default "gfx/damage/saberglowmark".
- hitSound1 none - If set, might play this sound when saber hits a person.
- hitSound2 none - If set, might play this sound when saber hits a person.
- hitSound3 none - If set, might play this sound when saber hits a person.
NOTE: Must provide all three hitSounds.
- blockSound1 none - If set, might play this sound when saber/sword hits another saber/sword.
- blockSound2 none - If set, might play this sound when saber/sword hits another saber/sword.
- blockSound3 none - If set, might play this sound when saber/sword hits another saber/sword.
NOTE: Must provide all three blockSounds.
- bounceSound1 none - If set, might play this sound when saber/sword hits a wall and bounces off.
- bounceSound2 none - If set, might play this sound when saber/sword hits a wall and bounces off.
- bounceSound3 none - If set, might play this sound when saber/sword hits a wall and bounces off.
NOTE: Must provide all three bounceSounds and bounceOnWall must be set to 1.
- blockEffect none - If set, plays this effect when the saber/sword hits another saber/sword (instead of "saber/saber_block.efx").
- hitPersonEffect none - If set, plays this effect when the saber/sword hits a person (instead of "saber/blood_sparks_mp.efx" in MP and "sparks/blood_sparks2" in SP).
- hitOtherEffect none - If set, plays this effect when the saber/sword hits something else damagable (instead of "saber/saber_cut.efx").
Done in game (server-side code)
- knockbackScale 0 - If non-zero, uses damage done to calculate an appropriate amount of knockback.
- damageScale 1 - Scale up or down the damage done by the saber.
- noDismemberment 0 - If non-zero, the saber never does dismemberment (good for pointed/blunt melee weapons).
- noIdleEffect 0 - If non-zero, the saber will not do damage or any effects when it is idle (good for real-sword type mods).
- splashRadius 0 - Radius of splashDamage.
- splashDamage 0 - Amount of splashDamage, 100% at a distance of 0, 0% at a distance = splashRadius.
- splashKnockback 0 - Amount of splashKnockback, 100% at a distance of 0, 0% at a distance = splashRadius.
- alwaysBlock 0 - If set, the blades will always be blocking (good for things like shields that should always block).
- noManualDeactivate 0 - If set, the blades cannot manually be toggled on and off (does not affect turning the whole saber on/off, just hitting the saber style cycle button when using dual sabers or a multi-blade saber).
Secondary Blade Styles
The following can be different for the extra blades - not setting them individually defaults them to the value for the whole saber (i.e. the first blade):
- bladeStyle2Start 0 - if set, blades from this number and higher use the following values (otherwise, they use the normal values already set)
NOTE: You can only have a maximum of two styles of blades. bladeStyle2Start is the number of the first blade to use these values on. All blades before this use the normal values above, all blades at and after this number use the secondary values below.
Done in cgame (client-side code)
- noWallMarks2 0 - If 1, stops the saber from drawing marks on the world (good for real-sword type mods).
- noDlight2 0 - If 1, stops the saber from drawing a dynamic light (good for real-sword type mods).
- noBlade2 0 - If 1, stops the saber from drawing a blade (good for real-sword type mods).
- noClashFlare2 0 - If non-zero, the saber will not do the big, white clash flare with other sabers.
- trailStyle2 0 - Default (0) is normal, 1 is a motion blur and 2 is no trail at all (good for real-sword type mods).
- g2MarksShader2 none - If set, the game will use this shader for marks on enemies instead of the default "gfx/damage/saberglowmark".
- hit2Sound1 none - If set, might play this sound when saber hits a person.
- hit2Sound2 none - If set, might play this sound when saber hits a person.
- hit2Sound3 none - If set, might play this sound when saber hits a person.
NOTE: Must provide all three hit2Sounds.
- block2Sound1 none - If set, might play this sound when saber/sword hits another saber/sword.
- block2Sound2 none - If set, might play this sound when saber/sword hits another saber/sword.
- block2Sound3 none - If set, might play this sound when saber/sword hits another saber/sword.
NOTE: Must provide all three block2Sounds.
- bounce2Sound1 none - If set, might play this sound when saber/sword hits a wall and bounces off.
- bounce2Sound2 none - If set, might play this sound when saber/sword hits a wall and bounces off.
- bounce2Sound3 none - If set, might play this sound when saber/sword hits a wall and bounces off.
NOTE: Must provide all three bounce2Sounds and bounceOnWall must be set to 1.
- blockEffect2 none - If set, plays this effect when the saber/sword hits another saber/sword (instead of "saber/saber_block.efx").
- hitPersonEffect2 none - If set, plays this effect when the saber/sword hits a person (instead of "saber/blood_sparks_mp.efx" in MP and "sparks/blood_sparks2" in SP).
- hitOtherEffect2 none - If set, plays this effect when the saber/sword hits something else damagable (instead of "saber/saber_cut.efx").
Done in game (server-side code)
- knockbackScale2 0 - If non-zero, uses damage done to calculate an appropriate amount of knockback.
- damageScale2 1 - Scale up or down the damage done by the saber.
- noDismemberment2 0 - If non-zero, the saber never does dismemberment (good for pointed/blunt melee weapons).
- noIdleEffect2 0 - If non-zero, the saber will not do damage or any effects when it is idle (good for real-sword type mods).
- splashRadius2 0 - Radius of splashDamage.
- splashDamage2 0 - Amount of splashDamage, 100% at a distance of 0, 0% at a distance = splashRadius.
- splashKnockback2 0 - Amount of splashKnockback, 100% at a distance of 0, 0% at a distance = splashRadius.
- alwaysBlock2 0 - If set, the blades will always be blocking (good for things like shields that should always block).
- noManualDeactivate2 0 - If set, the blades cannot manually be toggled on and off (does not affect turning the whole saber on/off, just hitting the saber style cycle button when using dual sabers or a multi-blade saber).