.sab

From Jedi Knight Wiki | JKHub
Revision as of 23:41, 21 February 2013 by MUG (talk | contribs) (Created page with "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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 in japlus) 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 - 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.
  • 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

  • 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.
  • 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.
  • brokenSaber1 and brokenSaber2 - This is unused in base, but was supposed to be model files to use when your staff gets broken. 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. According to notes in assets1.pk3 this restricts force powers but makes the hilt stronger in locks and parries.

Sword and Non-lightsaber-blade Weapon Keys

  • 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

  • saberStyle - a single combat style/stance which the saber is locked in.
  • lockable - 0/1
  • disarmable - 0/1
  • blocking - 0 to stop the character from trying to auto block projectiles
  • forceRestrict - a power to restrict if twoHanded is 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
  • breakParryBonus - a bonus to break a parry
  • 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 - 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.

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)
  • 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:

  • spinsound - when the saber is thrown. Also used in katas.
  • swingSound1
  • swingSound2
  • swingSound3
  • fallSound1
  • fallSound2
  • fallSound3
  • hitSound1
  • hitSound2
  • hitSound3
  • blockSound1 - these are for when your attacks are blocked, not the other way around.
  • blockSound2
  • blockSound3
  • bounceSound1
  • bounceSound2
  • bounceSound3

Effects

Set these to valid .efx files:

  • 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)

  • 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 - Do a 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"

}