This article lists all the userdata types available in Ringslinger Revolution, as well as the variables they contain.
Info Structures
rsrinfo_t
This userdata type represents the properties of a player’s Ringslinger Revolution variables.
Name
|
Type
|
Description/Notes
|
health
|
integer
|
The player’s current amount of health. When the player is first spawned, this variable is set to RSR.MAX_HEALTH (100 by default).
|
armor
|
integer
|
The player’s current amount of armor. When the player is first spawned, this variable is set to RSR.MAX_ARMOR (100 by default).
|
hurtByEnemy
|
tic_t
|
The player’s enemy hurt timer, or the amount of time left in tics until the player can take damage from enemies and other Object-based hazards.
|
hurtByMelee
|
tic_t
|
The player’s melee hurt timer, or the amount of time left in tics until the player can take damage from melee attacks done by other players.
|
hurtByMap
|
tic_t
|
The player’s level geometry hurt timer, or the amount of time left in tics until the player can take damage from level geometry.
|
attackKnockback
|
boolean
|
Determines whether the player was hurt while attempting to melee attack another player.
|
hitSound
|
integer
|
Determines what sound to play when the player attacks an opponent (should use RSR.HITSOUND_* constants).
|
deathFlags
|
integer
|
Determines how player death should be handled (should use RSR.DEATH_* constants).
|
attackerInfo
|
rsrattackerinfo_t array
|
A table containing the player's attackers and their damage outputs.
|
knockedByAttacker
|
boolean
|
Determines whether the player was knocked off of the level or not.
|
forceInflictorType
|
enum (MT_* )
|
The Object type of the Object that killed the player while they had a Force Shield.
|
forceInflictorReflected
|
boolean
|
Determines whether the Object that killed the player has reflected from another player with a Force Shield.
|
weapons[weaponname]
|
boolean array
|
A table used to determine which weapons the player has in their inventory, where weaponname is an integer expected to be a RSR.WEAPON_* constant. The table itself should not be directly reassigned, but entries in it can be accessed or modified.
|
ammo[ammoname]
|
integer array
|
A table containing the current amounts for all ammo types for the player, where ammoname is an integer expected to be an RSR.AMMO_* constant. The table itself should not be directly reassigned, but entries in it can be accessed or modified.
|
readyWeapon
|
integer
|
The player’s currently held weapon (should use RSR.WEAPON_* constants).
|
pendingWeapon
|
integer
|
The player’s currently pending weapon (should use RSR.WEAPON_* constants).
|
weaponDelay
|
integer
|
The current cooldown for the player's currently held weapon.
|
weaponDelayOrig
|
integer
|
The initial cooldown for the player’s currently held weapon.
|
powerups
|
rsrpowerup_t array
|
A table containing the player's current powerups.
|
starpostData
|
rsrstarpostdata_t
|
A table containing the player’s inventory when they pass a starpost. This variable is reset upon level change (unless the map’s level header has Lua.RSRKeepInv = true ).
|
starpostNum
|
integer
|
The saved starpost number for the last checkpoint the player has touched. This is automatically set to the value of the player’s starpostnum if it differs from this variable’s value.
|
bob
|
integer array
|
A table containing x and y offsets for the player’s weapon on the HUD.
|
screenFade
|
rsrscreenfade_t
|
A table containing the color, translucency, and timer of the player’s screen fade.
|
homing
|
integer
|
The player’s homing timer, for CA_HOMINGTHOK . Basically the same as the player’s homing variable, but intended for when the player homes in on another player.
|
homingThreshold
|
integer
|
The player’s homing threshold. If the player is damaged while they are homing onto another player, this will increase by the damage taken, until a maximum is hit depending on how the player is homing onto the other player (Attraction Shield and/or homing thok).
|
basicCharge
|
integer
|
The player’s current charge of the Red Ring’s altfire.
|
basicChargeSound
|
integer
|
Counter for the player’s Charged Shot sound.
|
basicChargeDontTakeAmmo
|
boolean
|
Determines whether the Charged Shot should take ammo from the player or not.
|
scatterFlak
|
mobj_t
|
Points to the player’s last Mass Slug ring fired.
|
bounceMega
|
mobj_t
|
Points to the player’s last Goldburster ring fired.
|
waspTime
|
tic_t
|
The player's timer for the Homing Ring's altfire.
|
lastbuttons
|
UINT16
|
The previous buttons pressed from player_t.cmd.buttons last tic. Mirrors player_t.lastbuttons .
|
lastexiting
|
tic_t
|
The player’s “exiting” timer from the last tic.
|
lastemeralds
|
UINT16
|
The player’s player_t.powers[pw_emeralds] value from the last tic.
|
useZoom
|
boolean
|
Determines whether the player’s FOV should be zoomed in or not.
|
fovZoom
|
fixed_t
|
The current value that the player’s fovadd variable should be set to.
|
rsrmobjinfo_t
This userdata type represents the properties of an Object type in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
health
|
integer
|
The initial value of the rsrHealth variable for mobj_t .
|
damage
|
integer
|
The damage value dealt to the player on contact.
|
knockback
|
fixed_t
|
The knockback scale value dealt to the player on contact. If set to FRACUNIT , scale is 1.0x; If set to 2*FRACUNIT , scale is 2.0x, etc.
|
nothomable
|
boolean
|
If true, this Object type cannot be homed in on with a Homing Ring.
|
thrustdamage
|
integer
|
The knockback thrust dealt to the player from splash damage.
|
aimthrust
|
boolean
|
If true, this makes the Object type’s splash damage thrust the source Object in the direction they are facing. Currently only used by the Explosion Ring’s altfire.
|
dontreflect
|
boolean
|
If true, this Object type cannot be reflected by a Force Shield.
|
explosive
|
boolean
|
Determines if this Object type is explosive or not.
|
railring
|
boolean
|
Determines if this Object type is a rail ring or not.
|
sparklestate
|
enum (MT_* )
|
The state to use in place of the NiGHTS sparkles when exploding.
|
poweritem
|
boolean
|
If true, this Object type is a power item that takes 1.5x as long to respawn in Match modes.
|
nopainstate
|
boolean
|
If true, this prevents the enemy from entering their painstate when enough damage is taken.
|
painchance
|
integer
|
Makes the enemy enter their painstate in a chance out of 255. This should only be used for Doom-style enemies. Default is -1 (painchance doesn’t trigger painstate).
|
rsrammoinfo_t
This userdata type represents the properties of an ammo type in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
amount
|
integer
|
The amount of ammo to give the player.
|
maxamount
|
integer
|
The maximum amount of ammo to give the player.
|
motype
|
enum (MT_* )
|
The Object type used for pickups for this ammo type.
|
rsrweaponinfo_t
This userdata type represents the properties of a weapon type in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
ammotype
|
enum (AMMO_* )
|
The ammo type to use for the weapon.
|
ammoamount
|
integer
|
The amount of ammo to give when the weapon is picked up.
|
ammoalt
|
integer
|
The amount of ammo used for the weapon’s altfire.
|
altzoom
|
boolean
|
If true, this weapon allows the player to zoom in using altfire.
|
canbepanel
|
boolean
|
If true, the pickup Object for this weapon can be a panel (gives more ammo to the player).
|
class
|
integer
|
The “class” of the weapon (must be a number from 1 through 7). Weapons in the same class are ordered based on classpriority .
|
classpriority
|
integer
|
Determines which weapon gets picked first when selecting a weapon class. Lower numbers give higher priority.
|
delay
|
integer
|
The recovery time for the weapon after it is fired.
|
delayspeed
|
integer
|
The recovery time for the weapon after it is fired, while the player has speed shoes.
|
delayalt
|
integer
|
The recovery time for the weapon’s altfire.
|
delayaltspeed
|
integer
|
The recovery time for the weapon’s altfire, while the player has speed shoes.
|
emerald
|
integer
|
The emerald that the weapon needs for its altfire (uses EMERALDn constants).
|
icon
|
string
|
The name of the graphic to use for the weapon in the weapon bar.
|
pickup
|
enum (MT_* )
|
The Object type to use when the player drops their weapon upon death.
|
powerweapon
|
boolean
|
If true, this prevents the weapon from showing up in the weapon bar if the player has no ammo for it (currently only used by the Rail Ring).
|
slot
|
integer
|
The “slot” of the weapon in its class. This is automatically set by RSR.AddWeapon .
|
states
|
rsrweaponstates_t
|
A table containing states for the given weapon.
|
rsrattackerinfo_t
This userdata type represents the properties of a player's attackers in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
player
|
player_t
|
The player that attacked the victim.
|
damage
|
integer
|
The total amount of damage dealt to the victim by the player.
|
rsrpowerupinfo_t
This userdata type represents the properties of a powerup type in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
icon
|
string
|
The icon graphic used for the powerup HUD display.
|
power
|
integer
|
The power to set for the player’s powers table (uses pw_* constants).
|
tics
|
tic_t
|
The initial value of the tics variable for rsrpowerup_t .
|
rsrskininfo_t
This userdata type represents the properties of a skin in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
noweapons
|
boolean
|
If true, this disables Ringslinger Revolution’s weapon system for the current skin.
|
nodamage
|
boolean
|
If true, this disables Ringslinger Revolution’s player damage system for the current skin.
|
noenemydamage
|
boolean
|
If true, this disables Ringslinger Revolution’s enemy damage system for the current skin.
|
meleeicon
|
string
|
Name of the graphic to use for the melee killfeed icon for this character/skin.
|
hudmodname
|
string
|
Name of the modname used for the character/skin’s HUD in the Custom HUD library. Can be left blank if the character doesn’t have one.
|
Miscellaneous
rsrweaponstates_t
This userdata type represents the states of weapon in Ringslinger Revolution.
Name
|
Type
|
Description/Notes
|
draw
|
string
|
The state that this weapon calls when the weapon is selected.
|
ready
|
string
|
The idle state for the weapon.
|
attack
|
string
|
The state that this weapon calls when the player uses the “Fire” button.
|
attackalt
|
string
|
The state that this weapon calls when the player uses the “Fire Normal” button. Only works if the player has the corresponding emerald for the weapon.
|
rsrpowerup_t
This userdata type represents a powerup.
Name
|
Type
|
Description/Notes
|
powerup
|
integer
|
The powerup in the player’s inventory (uses POWERUP_* constants).
|
tics
|
tic_t
|
The powerup’s timer. When it reaches zero, the element it is attached to will be removed from this table.
|
rsrstarpostdata_t
This userdata type represents data saved when passing a starpost.
Name
|
Type
|
Description/Notes
|
ammo[ammoname]
|
integer
|
A table containing the amounts for all ammo types for the player when they last passed a starpost, where ammoname is an integer expected to be an RSR.AMMO_* constant. The table itself should not be directly reassigned, but entries in it can be accessed or modified.
|
weapons[weaponname]
|
boolean
|
A table used to determine which weapons the player had in their inventory when they last passed a starpost, where weaponname is an integer expected to be a RSR.WEAPON_* constant. The table itself should not be directly reassigned, but entries in it can be accessed or modified.
|
readyWeapon
|
integer
|
The player’s held weapon when they last passed a starpost (should use RSR.WEAPON_* constants).
|
shields
|
integer
|
The shield that the player had when they last passed a starpost (uses SH_* constants).
|
rsrscreenfade_t
This userdata represents a screen fader.
Name
|
Type
|
Description/Notes
|
tics
|
tic_t
|
The screen fader’s timer. When it reaches zero, the screen fader stops.
|
origTics
|
tic_t
|
The initial value for the screen fader’s timer.
|
color
|
tic_t
|
The color of the screen fader (should use a palette index).
|
strength
|
integer
|
The opacity of the screen fader. Value ranges from 0 to FRACUNIT , where 0 is fully transparent, and FRACUNIT is fully opaque.
|
Vanilla Additions
player_t
Name
|
Type
|
Description/Notes
|
rsrinfo
|
rsrinfo_t
|
A table containing RSR info for the player.
|
psprites
|
psprite_t array
|
A table containing the player’s PSprites. See PSprites for more information.
|
rsrStarpostData
|
rsrstarpostdata_t
|
A copy of the player’s rsrinfo.starpostData , used when the player goes to a non-RSR Special Stage.
|
rsrPrevSkin
|
integer
|
The player’s previous skin number. Used for automatically toggling the character’s HUD.
|
mobj_t
Name
|
Type
|
Description/Notes
|
rsrProjectile
|
boolean
|
If true, this Object uses its Object type’s Damage property for P_DamageMobj .
|
rsrRealDamage
|
boolean
|
If true, this Object can deal a precise damage value with P_DamageMobj .
|
rsrDamage
|
integer
|
If set to a number, this Object will deal that amount of damage with P_DamageMobj .
|
rsrDontThrust
|
boolean
|
If true, this Object won’t cause damaged Objects to be thrusted back.
|
rsrForceReflected
|
boolean
|
If true, this Object won’t be reflected by a player’s Force Shield. This is automatically set to true when the Object hits a player with a Force Shield.
|
rsrEnemyBlink
|
integer
|
If set to a number, this Object will “blink” until its value reaches zero.
|
rsrHealth
|
integer
|
The current health value of an Object (presumably an enemy) in Ringslinger Revolution gametypes. This is automatically set when the Object first takes damage.
|
rsrSpawnHealth
|
integer
|
The spawn health value of an Object (presumably an enemy) in Ringslinger Revolution gametypes. This is automatically set when the Object first takes damage.
|
rsrKilled
|
boolean
|
Determines if the Object is dead. This is automatically set to true when the Object’s rsrHealth variable reaches zero in Ringslinger Revolution gametypes.
|
rsrGhostTimer
|
integer
|
The Object’s ghost spawning timer. Used by projectiles to spawn a ghost Object behind them.
|
rsrIsPanel
|
boolean
|
If true, this Object (presumably a weapon pickup) acts as a panel (gives the player twice as much ammo as a non-panel pickup). This is automatically set to true if the pickup is flagged as a panel in the map.
|
rsrAmmoAmount
|
integer
|
If set to a number, this overrides how much ammo is given the player when the Object (presumably a weapon pickup) is picked up.
|
rsrDontRespawn
|
boolean
|
If set to true, this Object doesn’t disappear when collected in co-op.
|
rsrFloatOffset
|
angle_t
|
The y-offset for the item’s “floating” animation. This affects health, armor, and powerup items, as well as any Object that calls RSR.ItemFloatThinker .
|
rsrOrigScale
|
fixed_t
|
The scale of the Object when it was spawned. This is currently only used by the Goldburster and Mass Slug projectiles.
|
rsrBounced
|
integer
|
The bounce counter for the Bounce Ring.
|
rsrPrevMomX
|
fixed_t
|
The Object’s X momentum in the previous tic.
|
rsrPrevMomY
|
fixed_t
|
The Object’s Y momentum in the previous tic.
|
rsrPrevMomZ
|
fixed_t
|
The Object’s Z momentum in the previous tic.
|
rsrLockOnSound
|
boolean
|
If true, this prevents the Homing Ring from playing the lock on sound more than once.
|
rsrRailHitList
|
boolean array
|
Table of Objects the rail ring has hit.
|
rsrStrongBoxIcon
|
mobj_t
|
Points to the icon Object displayed by the strong random monitor.
|
Name
|
Type
|
Description/Notes
|
ringslingerrev
|
string
|
If true, the map is a Ringslinger Revolution map.
|
rsrkeepinv
|
string
|
If true, players will keep their weapons across levels in singleplayer and co-op.
|
rsrweaponstart
|
string
|
Determines what weapons the player starts with and how much ammo each weapon has.
Format example:
Lua.RSRWeaponStart = "WEAPON1:50,WEAPON2:100"
|
rsrloseinvondeath
|
string
|
If true, players will lose their weapons upon death.
|
rsrwaves
|
string
|
If true, the map is a “Waves” map.
|
rsrwavestags
|
string
|
Determines what linedef tags are executed in specific waves in a “Waves” map.
|