MM Userdata Structures - LeonardoTheMutant/SRB2-Murder-Mystery GitHub Wiki
MM userdata related to the player. In the examples below, p
is used as the name of the player_t
variable. An access to the MM-related variable var
of player_t
is written as p.mm.var
.
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
role |
int, one of the ROLE_* constants |
Specifies the player's current role in the game. See the list of role constants for the details. | |||||||||||||||
kills |
int | The number of kills the player has made. In PONG 2-player minigame this variable acts as the score per-player. | |||||||||||||||
killername |
string | The name of the player who killed player p .Note: The code has a special exception for the killer player's name set as "your stupidity" as it sometimes is used to identify the players who died by the map hazard (crusher, pit, drowned in water, etc.). This name will also be translated on HUD. |
|||||||||||||||
lang |
string | The client's currently set language. Translates all the game messages and HUD-related text into the specified language. For example, MM.lang = "EN" will set the language in the displayed content to English. |
|||||||||||||||
weapondelay |
tic_t | It is very similar to the p.weapondelay , but this one (p.mm.weapondelay ) is used for the MM recreation of the weapons since the vanilla variable is always set to 0 to prevent the vanilla weapons from firing. |
|||||||||||||||
sneak |
boolean | This variable tells whether or not the player is currently sneaking. While sneaking, the player makes no footstep sounds and leaves no footmarks on the ground. | |||||||||||||||
camping |
tic_t | "Camping timer" for players with the Murderer role. Depending on the value of the mm_camping Console Variable, it is used to kick players with p.mm.role == ROLE_MURDERER who are sitting near the dropped Sheriff's Emerald for longer than 30 seconds. |
|||||||||||||||
shremd_dist |
fixed_t | The distance to the closest dropped Sheriff's Emerald. It is calcualted only for the Murderers (for calculating p.mm.camping ) and Innocents. (for Emerald Radar). |
|||||||||||||||
hud |
userdata table | The table with the player's HUD related data:
|
|||||||||||||||
timetravel |
userdata table | The table with the player's Time Travel related data:
|
|||||||||||||||
help |
userdata table | The table with the player's GUI manual related data:
|
The userdata of the dropped Sheriff Emerald's object (MT_SHREMD
)
Name | Type | Description |
---|---|---|
x | fixed_t | The Emerald's X possition |
y | fixed_t | The Emerald's Y possition |
z | fixed_t | The Emerald's Z possition |
timezone |
int, one of the TIMEZONE_* constants |
The timezone the emerald is dropped in |
The description of each value in the MM
table. The MM
constant itself is defined in /SRC/INIT.LUA
Name | Type | Description |
---|---|---|
version |
string | Version number of the add-on. |
debug |
boolean | Enable/Disable the add-on's Debug Mode functionality Note: The add-on must boot with this variable set to true to use the Debug in any form.
|
builddate |
string | The build date of the add-on. |
text |
table | Collection of all text used in Murder Mystery with all translations. This variable is netsynced. See the source code for details. |
RoleColor |
string[5] | The vanilla text colors for roles, use one of the ROLE_* constants as index to get the color for the specified role. For the dead player color access MM.RoleColor[5] . |
RoleColorHUD |
string[5] | The MM text colors for roles, use one of the ROLE_* constants as index to get the color for the specified role. For the dead player color access MM.RoleColorHUD[5] . |
hud |
table | HUD control variables for each sub-renderer (MM.hud.game , MM.hud.scores , MM.hud.intermission ). Each sub-renderer has two attributes: enabled (custom scripts can disable MM's HUD renderers by setting this to false ) and pos (coordinates of the different HUD elements). |
graphics |
patch_t | Table acting as the Video RAM that holds all loaded (cached) patches. Patches cane be loaded into this table with V_LoadPatch() before rendering them and unloaded with V_UnloadPatch() when they are not longer needed. Access the patches in this table by their name (ex. MM.graphics["CHAOS3"] ). |
graphics.charset |
patch_t[256] | A sub-table dedicated to storing the character patches. The character set can be loaded into this table with V_LoadCharset() and unloaded by setting the table slot values to nil.Note: Slots 0 -31 are reserved for control characters (chars 16 -31 are used for color) and cannot be occupied. |
CharsetStandardReady |
boolean | Is the Standard ASCII part (characters 33-127 ) of the Character (Video) Memory loaded and ready to be used? If not, the HUD code will try to load the "STCFN" character set. |
CharsetExtendedReady |
boolean | Is the Extended ASCII part (characters 128-255 ) of the Character (Video) Memory loaded and ready to be used? If not, the HUD code will try to load the character set specified in the CHARSET entry of the Language File, by the player's chosen language (player.mm.lang ). |
death_sfx |
int[] | Table containing all Sound Effects (sfx_* lumps) that are used as the death sounds/jingles. |
shwdwn_music |
string[] | The 6-character strings of the music track names that are used as Showdown Duel themes. Tracks from this list are being randomly selected by MM_StartShowdownMusic()( ) function if the map does not have its own Showdown Theme specified with Lua.ShowdownTrack in SOC. |
shwdwn |
string | The 6-character name of the current Showdown Duel track playing, also marks if the Duel is happening right now or not. |
susnce |
string | The 6-character name of the current Suspense track playing. |
winner |
int | The winner of the round, can be one of the 3 possible values: 0 - Tie, 1 - Murderer, 2 - Civilians (Sheriffs, Heros and Innocents). This variable is netsynced. |
winreason |
int | The win reason, can be one of the WIN_* constants. This variable is netsynced. |
timelimit |
int | Works just like SRB2's vanilla timelimit but MM uses its own. The value is measured in Minutes. This variable is netsynced. |
shremds |
mobj_t[] | The table containing all dropped Sheriff Emerald objects (MT_SHREMD ). |
pong |
table | Variables for Pong 2-player minigame. This variable is netsynced. See /SRC/INIT.LUA and /SRC/LUA/MINIGAMES/MINIGAMES.LUA for details. |