Wiki

Clone wiki

NuclearThroneTogether / Scripting / Objects / Player

The following is a list of Player' variables that serve any particular purpose and may be of interest when modding.

General

  • index: Player index (0 for P1, 1 for P2)
  • alias: Player's display name (non-unique)
  • race: Race code. Changing this changes the visual appearance and function but keeps the stats.

Sprites

  • spr_idle: Idle sprite.
  • spr_walk: Walk sprite.
  • spr_hurt: "Taking damage" sprite. Must be 3 frames long.
  • spr_dead: Death animation. Stops at the last frame.
  • spr_sit1: Sitting onto the Throne (start).
  • spr_sit2: Sitting on the Throne (loop).

Sounds

You may want to use race_soundbank to define fallback sounds for what is not available.

  • snd_hurt: Played upon taking damage.
  • snd_dead: Played upon death.
  • snd_lowa: Played when ammo is low.
  • snd_lowh: Played when health is low.
  • snd_chst: Played upon opening a large chest.
  • snd_wrld: Played upon entering a new area.
  • snd_valt: Played upon entering a vault.
  • snd_crwn: Played upon picking up a crown.
  • snd_thrn: Played upon entering 7-3.
  • snd_spch: Played upon sitting upon the Throne.
  • snd_idpd: Played upon entering IDPD HQ.
  • snd_cptn: Played upon defeating the Captain.

Stats

  • accuracy: Spread multiplier (default 1, the less the better).
  • maxspeed: Maximum movement speed.
  • my_health: Current health.
  • maxhealth: Maximum health.
  • size: Used to control freeze frames on hit and some collision aspects.

    Default (Players and most enemies) is 1. Cars and large props are 2. Big Bandit and guardians are 3. Loop bosses are 4-5. Throne is 8.

Weapons

  • wep: Primary weapon' ID ("#id" or a mod weapon name)
  • bwep: Secondary weapon' ID
  • curse: Whether the primary weapon is cursed
  • bcurse:
  • wepflip: Whether the primary weapon is flipped (-1\1) - for melee weapons.
  • bwepflip: Whether the secondary weapon is flipped.
  • ammo: An array of how much ammo the player currently has (per type - 0..5).
  • typ_ammo: An array of how much ammo will be added by an ammo pack (per type - 0..5).
  • typ_amax: An array of maximum ammo (per type - 0..5).
  • typ_name: An array of ammo type names (per type - 0..5).

Combat

  • team: Affects projectile collisions (0: hostile, 1: enemy, 2: player, 3: IDPD).
  • gunangle: Aiming direction.
  • can_shoot: Whether the primary weapon can be fired.
  • bcan_shoot: Whether the secondary weapon can be fired.
  • reload: Frames until the primary weapon is reloaded.
  • breload: Frames until the secondary weapon is reloaded.
  • clicked: Set if trying to attack with melee and bullet weapons while they reload - an attack will be made once the reload finishes.

Abilities

  • roll: Whether the player is rolling (Fish' ability).
  • angle: Roll' angle (roll resets when doing a full circle unless you have TB).
  • infammo: Frames until Gun Warrant runs out (Fish' Ultra B)
  • bleed: Frames until Chicken' death when headless.
  • chickendeaths: Points of maximum health lost by Chicken.
  • safeheadloss: Frames for which loosing the Chicken' head would not reduce maximum health.
  • rogueammo: Rogue' Portal Strike ammo.
  • horrorcharge: Current Horror' beam charge factor.
  • horrornorad: Frames until the player can attract rads again.
  • dogammo: How many more rounds of projectiles Big Dog can fire;
  • turn: Big Dog' spinning direction.
  • frogcharge: Current charge time (in frames) for Frog's active ability. Number of toxic particles released depends on this.

    The formula is frogcharge = (frogcharge + 1) * 0.99, which means that charge is ~26 at 1 second, ~45 at 2 seconds, ~58 at 3 seconds, ~77 at 5 seconds, and ~94 at 10 seconds.

Mutation-specific

  • hammerhead: Wall blocks that the player can destroy (must have the mutation)
  • hammering: Frames until HammerHead "cools down" and you'll need to rub against a wall again to break blocks.
  • canspirit: Whether the player has Strong Spirit (must have the mutation).
  • spiriteffect: Number of frames before health can fall below 1.

Visual

  • wave: Used for a handful of visual animations.
  • right: Whether facing right/east.
  • back: Whether facing back/north.
  • wkick: Primary weapon visual "kick"
  • bwkick: Secondary weapon visual "kick"
  • lsthealth: Previous health (for healthbar animation)
  • drawlowhp: Frames until "low health" warning should no longer be displayed.
  • drawempty: Frames until "low ammo" warning should no longer be displayed.
  • gunshine: Frames until gun should stop shining (is set to 7 on Trigger Fingers proc).
  • smoke: Frames until player should stop leaving a trail of smoke and flames on ground.

Updated