diff --git a/ExtractConstants.lua b/ExtractConstants.lua index 13f5aec77435bcfb11ae2d3fa89bf49e8ec58b5b..8f3fab0911c204abd876aea25df27a2609e0e61e 100644 --- a/ExtractConstants.lua +++ b/ExtractConstants.lua @@ -202,8 +202,7 @@ for _, pageName in ipairs{ 'List_of_sounds', 'Sound', 'S_SKIN', - 'A_CustomPower', - 'Chaos_Emerald', + 'Powers', 'Palette', 'Linedef', 'Reserved_tags', diff --git a/wiki/Chaos_Emerald.txt b/wiki/Chaos_Emerald.txt deleted file mode 100644 index 07729fecf6ccc549f2b7270d17036726960e1bf9..0000000000000000000000000000000000000000 --- a/wiki/Chaos_Emerald.txt +++ /dev/null @@ -1,81 +0,0 @@ -{{Old}} -: ''For the pick-up emerald objects, see [[Thing types#Other collectibles|Thing types > Other collectibles]].'' - -{| class="infobox" align="right" -|- -! [[image:CEMGA0.png]] [[image:CEMGB0.png]] [[image:CEMGC0.png]] [[image:CEMGD0.png]] [[image:CEMGE0.png]] [[image:CEMGF0.png]] [[image:CEMGG0.png]] [[image:CEMGH0.png]]<br/>The seven Chaos Emeralds and the secret eighth -|} -The '''Chaos Emeralds''' are hidden items in most Sonic games, and collecting all seven is necessary to get the true ending. In SRB2, the seven Chaos Emeralds are used to allow [[Sonic]], [[Knuckles]] and [[Metal Sonic]] to turn into Super Sonic, Super Knuckles, and Super Metal Sonic respectively, as well as unlock secrets. Transforming into super form is done by pressing spin mid-jump, and can only be done if the player has at least 50 [[ring]]s, and is not holding a [[shield]]. - -The exact implementation of the Chaos Emeralds, as well as the method to collect them, differs depending on the [[gametype]] being played, as does the behavior of Super forms. - -==Single Player/Coop== -In [[Single Player]], the emeralds are to be collected as the player progresses through the various levels. The emeralds collected by the player can be kept track of using the [[Rankings/Scores HUD]]. - -To collect the emeralds, the player must collect an [[Emerald Token]] in one of the stages. When the stage is completed, the player is warped to one of seven [[Special Stage]]s. In these stages, the player is transformed into their NiGHTS form and must fly around the track to collect enough blue spheres to destroy the [[Ideya Capture]], and return to the start again within the time limit for the Special Stage. If this is done successfully, the player is rewarded with a Chaos Emerald as well as any points they earned from that Special Stage. If not, the Special Stage ends, and the player earns nothing. If more than one Emerald Token is collected in a stage, a player re-enters either the same Special Stage, or enters a new one, depending on how the previous Special Stage went. - -In [[Cooperative]] mode, emerald-collecting is much the same as in Single Player, except with multiple players and with the Multiplayer Special Stages instead – the emeralds are shared by all players in the game, but only those players who are playing as Sonic, Knuckles, or Metal Sonic can turn Super in regular, unmodified SRB2. - -==Match/Capture the Flag== - -In the [[Match]] and [[Capture the Flag]] gametypes (not including Team Match), the Chaos Emeralds are collectable within the stages themselves, and can allow one of the players in the game to gain a temporary speed boost and temporary invincibility. Because of this, the emeralds are considered an important part of these gametypes, as they can potentially decide the winning players or team. The console variable <code>[[Console/Variables#powerstones|powerstones]]</code> can be used to turn this feature on or off; by default it is turned on. - -Each Match/CTF stage contains a large amount of [[Match Chaos Emerald Spawn]]s in which the seven Chaos Emeralds can randomly appear. At the start of the Match/CTF session, each of the emeralds will spawn at the location of one of these after a random time between 1 and 2 minutes. Once spawned, they can each be collected by one of the players – unlike in Single Player/Coop these emeralds are not shared by all players, but are stored as separate collections for individual players. The displayed player's own collection is visible on the [[Game HUD]]. The emerald collections of all players in the game session can be viewed through the [[Rankings/Scores HUD]], which displays the icons for the emeralds collected by each player besides their own life icons in the player listings. - -Being damaged by an opponent or a hazard will cause a player to spill all their collected emeralds if they lack a shield. However, emeralds can also be tossed by players, allowing other players to obtain the emeralds – this tactic can be useful in CTF in particular. If a spilled/tossed emerald is not collected within 12 seconds, or it falls into a death pit, it will disappear from the map. Any missing emeralds will eventually be respawned at a Chaos Emerald spawn again up to approximately a minute afterwards. - -If a player manages to collect all seven Chaos Emeralds, they will be granted 20 seconds of Super Sneakers and Invincibility. Afterwards, the Chaos Emeralds will start spawning again. - -==Technical information== -Given the two different systems of collecting Chaos Emeralds in-game detailed above, the internal storage methods for Chaos Emeralds also differ accordingly: -* In [[Single Player]]/[[Coop]], the Chaos Emeralds collected by all players are stored in the [[Lua/Global variables|global variable]] <code>'''emeralds'''</code>, which can be accessed (but not modified directly) with the use of [[Lua]] scripts. -* In [[Match]]/[[Capture the Flag]], the Chaos Emeralds collected by each player are stored using the player power <code>'''pw_emeralds'''</code>. In Lua, this power can be accessed or modified for a particular player with the code <code>''player''.powers[pw_emeralds]</code>. - -To store the collected emeralds in both of the above systems, the Chaos Emeralds themselves are represented by a series of toggles known as the '''Chaos Emerald flags'''. These are listed below: -{| class="wikitable" -!Value -!Flag name -!Emerald -!Icon -|- -! 1 -| <code>EMERALD1</code> -| [[Chaos Emerald 1|Green Emerald]] -| [[image:CEMGA0.png|center]] -|- -! 2 -| <code>EMERALD2</code> -| [[Chaos Emerald 2|Purple Emerald]] -| [[image:CEMGB0.png|center]] -|- -! 4 -| <code>EMERALD3</code> -| [[Chaos Emerald 3|Blue Emerald]] -| [[image:CEMGC0.png|center]] -|- -! 8 -| <code>EMERALD4</code> -| [[Chaos Emerald 4|Light Blue Emerald]] -| [[image:CEMGD0.png|center]] -|- -! 16 -| <code>EMERALD5</code> -| [[Chaos Emerald 5|Orange Emerald]] -| [[image:CEMGE0.png|center]] -|- -! 32 -| <code>EMERALD6</code> -| [[Chaos Emerald 6|Red Emerald]] -| [[image:CEMGF0.png|center]] -|- -! 64 -| <code>EMERALD7</code> -| [[Chaos Emerald 7|Gray Emerald]] -| [[image:CEMGG0.png|center]] -|} - -The Lua function <code>[[Lua/Functions#All7Emeralds|All7Emeralds]]</code> can be used to determine whether a given variable contains all of the above Chaos Emerald flags within. - -There are several sets of emerald sprites used by the game. Among them are <code>CEMGA0</code>–<code>CEMGG0</code> (used by the emerald Objects), <code>CEMGH0</code> (used for the wire-frame emerald in [[Black Hole Zone]]), <code>CHAOS1</code>–<code>CHAOS7</code> (full-size sprites used by the HUD), and <code>TEMER1</code>–<code>TEMER7</code> (miniature sprites used by the Match/CTF HUD). - -[[Category:SRB2 documentation]] diff --git a/wiki/Constants.txt b/wiki/Constants.txt index 9bca242101beaa0fad352634e6329653614b5ae8..697bc00ab765ffd2513535e7120b206f149fb4b3 100644 --- a/wiki/Constants.txt +++ b/wiki/Constants.txt @@ -1,4 +1,5 @@ {{old}} +{{todo|https://wiki.srb2.org/wiki/User:LJ_Sonik/List_of_outdated_Lua_stuff}} This is a comprehensive list of all '''constants''' that can be used in [[SOC]]s and [[Lua]] scripts. Constants are special keywords recognized by [[SRB2]], such as <code>FRACUNIT</code> and <code>TICRATE</code>, which represent a specific, unchangeable integer number. In Lua, these must ''always'' be written in the correct case as given in this article (or in linked articles). SOC, however, is case-insensitive and allows all constants to be written in any case whatsoever. Many groups of constants are identifiable by certain prefixes in their names – for example, all primary Object flags have the <code>MF_</code> prefix, while all secondary Object flags have the <code>MF2_</code> prefix instead. {{note|Due to the sheer number of constants available in SRB2 altogether, not all of them can be listed here. For convenience, this article provides links to other articles on the SRB2 Wiki already covering specific groups of constants, where they may be explained in more detail than this article can give.}} @@ -296,8 +297,8 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i |The executable's Mod ID. In SRB2 v2.2, 18 is the default value for this constant. |- !<code>MODVERSION</code> -|47 -|The executable's Mod Version. In SRB2 v2.2.6, 47 is the default value for this constant. +|54 +|The executable's Mod Version. In SRB2 v2.2.13, 54 is the default value for this constant. |- !<code>CODEBASE</code> |220 @@ -308,12 +309,12 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i |The game's version number. |- !<code>VERSIONSTRING</code> -|"v2.2.8" +|"v2.2.13" |The game's version, as a string. |- !<code>SUBVERSION</code> -|6 -|The game's sub-version number. +|13 +|The game's sub-version number. In SRB2 2.2.13, it's 13. |- !<code>FLOATSPEED</code> |<code>FRACUNIT*4</code> @@ -1126,7 +1127,7 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i ! 32768 ! <code>0x8000</code> | <code>PF_JUMPED</code> -| The player has just jumped. +| The player is jumping. |- ! 65536 ! <code>0x10000</code> @@ -1201,7 +1202,7 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i ! 1073741824 ! <code>0x40000000</code> | <code>PF_FINISHED</code> -| The player has finished the level. Separate from <code>exiting</code>, as its for cases where players can move around while waiting for others to finish the level. +| The player has finished the level. Separate from <code>exiting</code>, as it's for cases where players can move around while waiting for others to finish the level. |} ==={{anchor|Player animations|PA_}} Player animations (<code>PA_*</code>)=== @@ -1315,14 +1316,14 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i |} ==={{anchor|Shield types|SH_}} Shield types (<code>SH_*</code>)=== -{{main|A_CustomPower}} +{{main|Powers}} {{see also|Shields}} ==={{anchor|Carry types|CR_}} Carry types (<code>CR_*</code>)=== -{{main|A_CustomPower}} +{{main|Powers}} ==={{anchor|Player powers|pw_}} Player powers (<code>pw_*</code>)=== -{{main|A_CustomPower}} +{{main|Powers}} ==={{anchor|Emerald flags|EMERALD}} Emerald flags (<code>EMERALD''n''</code>)=== {{main|Chaos Emerald#Technical information|l1=Chaos Emerald > Technical information}} @@ -1656,6 +1657,9 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i |[[Capture the Flag]] |} +==={{anchor|Intermission type|int_}} Intermission types (<code>int_*</code>)=== +{{main|Game_modes#Attributes|l1=Game modes > Attributes}} + ==={{anchor|Marathon_mode|MA_}} Marathon Mode flags (<code>MA_*</code>)=== {{todo|Elaborate.}} {| class="wikitable" @@ -1841,6 +1845,119 @@ Note that bit-shifting an integer by <code>FRACBITS</code> in either direction i |Use splat flat renderer (treat cyan pixels as invisible). |} +==={{anchor|Sector special flags|SSF_}} Sector special flags (<code>SSF_*</code>)=== +{| class="wikitable" +!Decimal +!Hexadecimal +!Flag name +!Description +|- +!1 +!<code>0x1</code> +|<code>SSF_OUTERSPACE</code> +|{{todo|Add a description}} +|- +!2 +!<code>0x2</code> +|<code>SSF_DOUBLESTEPUP</code> +|{{todo|Add a description}} +|- +!4 +!<code>0x4</code> +|<code>SSF_NOSTEPDOWN</code> +|{{todo|Add a description}} +|- +!8 +!<code>0x8</code> +|<code>SSF_WINDCURRENT</code> +|{{todo|Add a description}} +|- +!16 +!<code>0x10</code> +|<code>SSF_CONVEYOR</code> +|{{todo|Add a description}} +|- +!32 +!<code>0x20</code> +|<code>SSF_SPEEDPAD</code> +|{{todo|Add a description}} +|- +!64 +!<code>0x40</code> +|<code>SSF_STARPOSTACTIVATOR</code> +|{{todo|Add a description}} +|- +!128 +!<code>0x80</code> +|<code>SSF_EXIT</code> +|{{todo|Add a description}} +|- +!256 +!<code>0x100</code> +|<code>SSF_SPECIALSTAGEPIT</code> +|{{todo|Add a description}} +|- +!512 +!<code>0x200</code> +|<code>SSF_RETURNFLAG</code> +|{{todo|Add a description}} +|- +!1024 +!<code>0x400</code> +|<code>SSF_REDTEAMBASE</code> +|{{todo|Add a description}} +|- +!2048 +!<code>0x800</code> +|<code>SSF_BLUETEAMBASE</code> +|{{todo|Add a description}} +|- +!4096 +!<code>0x1000</code> +|<code>SSF_FAN</code> +|{{todo|Add a description}} +|- +!8192 +!<code>0x2000</code> +|<code>SSF_SUPERTRANSFORM</code> +|{{todo|Add a description}} +|- +!16384 +!<code>0x4000</code> +|<code>SSF_FORCESPIN</code> +|{{todo|Add a description}} +|- +!32768 +!<code>0x8000</code> +|<code>SSF_ZOOMTUBESTART</code> +|{{todo|Add a description}} +|- +!65536 +!<code>0x10000</code> +|<code>SSF_ZOOMTUBEEND</code> +|{{todo|Add a description}} +|- +!131072 +!<code>0x20000</code> +|<code>SSF_FINISHLINE</code> +|{{todo|Add a description}} +|- +!262144 +!<code>0x40000</code> +|<code>SSF_ROPEHANG</code> +|{{todo|Add a description}} +|- +!524288 +!<code>0x80000</code> +|<code>SSF_JUMPFLIP</code> +|{{todo|Add a description}} +|- +!1048576 +!<code>0x100000</code> +|<code>SSF_GRAVITYOVERRIDE</code> +|{{todo|Add a description}} +|} + ==Other== ==={{anchor|Emblem flags|GE_|ME_}} Emblem flags (<code>GE_*/ME_*</code>)=== {{see also|Custom unlockables and emblems}} @@ -1985,8 +2102,8 @@ CV_HIDEN |The variable is a cheat, and can be reset to its default value by using <code>[[Console/Commands#cheats|cheats]] off</code> in the console. |- !4096 -|<code>CV_NOLUA</code> -|The variable cannot be set from Lua. +|<code>CV_ALLOWLUA</code> +|The variable can be set from Lua. Custom Lua-defined console variables will automatically have this flag set. |} ==={{anchor|Command flags|COM_}} Command flags (<code>COM_*</code>)=== @@ -2338,6 +2455,240 @@ CV_HIDEN |- |} +==={{anchor|Menu types|MN_}} Menu types (<code>MN_*</code>)=== +{|class="wikitable" +!Value +!Name +!Description +|- +!1 +|<code>MN_NONE</code> +|{{todo|Add a description}} +|- +!2 +|<code>MN_MAIN</code> +|{{todo|Add a description}} +|- +!3 +|<code>MN_SP_MAIN</code> +|{{todo|Add a description}} +|- +!4 +|<code>MN_SP_LOAD</code> +|{{todo|Add a description}} +|- +!5 +|<code>MN_SP_PLAYER</code> +|{{todo|Add a description}} +|- +!6 +|<code>MN_SP_LEVELSELECT</code> +|{{todo|Add a description}} +|- +!7 +|<code>MN_SP_LEVELSTATS</code> +|{{todo|Add a description}} +|- +!8 +|<code>MN_SP_TIMEATTACK</code> +|{{todo|Add a description}} +|- +!9 +|<code>MN_SP_TIMEATTACK_LEVELSELECT</code> +|{{todo|Add a description}} +|- +!10 +|<code>MN_SP_GUESTREPLAY</code> +|{{todo|Add a description}} +|- +!11 +|<code>MN_SP_REPLAY</code> +|{{todo|Add a description}} +|- +!12 +|<code>MN_SP_GHOST</code> +|{{todo|Add a description}} +|- +!13 +|<code>MN_SP_NIGHTSATTACK</code> +|{{todo|Add a description}} +|- +!14 +|<code>MN_SP_NIGHTS_LEVELSELECT</code> +|{{todo|Add a description}} +|- +!15 +|<code>MN_SP_NIGHTS_GUESTREPLAY</code> +|{{todo|Add a description}} +|- +!16 +|<code>MN_SP_NIGHTS_REPLAY</code> +|{{todo|Add a description}} +|- +!17 +|<code>MN_SP_NIGHTS_GHOST</code> +|{{todo|Add a description}} +|- +!18 +|<code>MN_MP_MAIN</code> +|{{todo|Add a description}} +|- +!19 +|<code>MN_MP_SPLITSCREEN</code> +|{{todo|Add a description}} +|- +!20 +|<code>MN_MP_SERVER</code> +|{{todo|Add a description}} +|- +!21 +|<code>MN_MP_CONNECT</code> +|{{todo|Add a description}} +|- +!22 +|<code>MN_MP_ROOM</code> +|{{todo|Add a description}} +|- +!23 +|<code>MN_MP_PLAYERSETUP</code> +|{{todo|Add a description}} +|- +!24 +|<code>MN_MP_SERVER_OPTIONS</code> +|{{todo|Add a description}} +|- +!25 +|<code>MN_OP_MAIN</code> +|{{todo|Add a description}} +|- +!26 +|<code>MN_OP_P1CONTROLS</code> +|{{todo|Add a description}} +|- +!27 +|<code>MN_OP_CHANGECONTROLS</code> +|{{todo|Add a description}} +|- +!28 +|<code>MN_OP_P1MOUSE</code> +|{{todo|Add a description}} +|- +!29 +|<code>MN_OP_P1JOYSTICK</code> +|{{todo|Add a description}} +|- +!30 +|<code>MN_OP_JOYSTICKSET</code> +|{{todo|Add a description}} +|- +!31 +|<code>MN_OP_P1CAMERA</code> +|{{todo|Add a description}} +|- +!32 +|<code>MN_OP_P2CONTROLS</code> +|{{todo|Add a description}} +|- +!33 +|<code>MN_OP_P2MOUSE</code> +|{{todo|Add a description}} +|- +!34 +|<code>MN_OP_P2JOYSTICK</code> +|{{todo|Add a description}} +|- +!35 +|<code>MN_OP_P2CAMERA</code> +|{{todo|Add a description}} +|- +!36 +|<code>MN_OP_PLAYSTYLE</code> +|{{todo|Add a description}} +|- +!37 +|<code>MN_OP_VIDEO</code> +|{{todo|Add a description}} +|- +!38 +|<code>MN_OP_VIDEOMODE</code> +|{{todo|Add a description}} +|- +!39 +|<code>MN_OP_COLOR</code> +|{{todo|Add a description}} +|- +!40 +|<code>MN_OP_OPENGL</code> +|{{todo|Add a description}} +|- +!41 +|<code>MN_OP_OPENGL_LIGHTING</code> +|{{todo|Add a description}} +|- +!42 +|<code>MN_OP_SOUND</code> +|{{todo|Add a description}} +|- +!43 +|<code>MN_OP_SERVER</code> +|{{todo|Add a description}} +|- +!44 +|<code>MN_OP_MONITORTOGGLE</code> +|{{todo|Add a description}} +|- +!45 +|<code>MN_OP_DATA</code> +|{{todo|Add a description}} +|- +!46 +|<code>MN_OP_ADDONS</code> +|{{todo|Add a description}} +|- +!47 +|<code>MN_OP_SCREENSHOTS</code> +|{{todo|Add a description}} +|- +!48 +|<code>MN_OP_ERASEDATA</code> +|{{todo|Add a description}} +|- +!49 +|<code>MN_SR_MAIN</code> +|{{todo|Add a description}} +|- +!50 +|<code>MN_SR_PANDORA</code> +|{{todo|Add a description}} +|- +!51 +|<code>MN_SR_LEVELSELECT</code> +|{{todo|Add a description}} +|- +!52 +|<code>MN_SR_UNLOCKCHECKLIST</code> +|{{todo|Add a description}} +|- +!53 +|<code>MN_SR_EMBLEMHINT</code> +|{{todo|Add a description}} +|- +!54 +|<code>MN_SR_PLAYER</code> +|{{todo|Add a description}} +|- +!55 +|<code>MN_SR_SOUNDTEST</code> +|{{todo|Add a description}} +|- +!56 +|<code>MN_AD_MAIN</code> +|{{todo|Add a description}} +|- +!57 +|<code>MN_SPECIAL</code> +|{{todo|Add a description}} +|} {{Template:Lua}} {{Template:SOC}} diff --git a/wiki/Functions.txt b/wiki/Functions.txt index ff07111d99a6d1d2c78759a09c570d599372f549..c9bde75d653537b0d90cdeec70180432058e0c56 100644 --- a/wiki/Functions.txt +++ b/wiki/Functions.txt @@ -1,4 +1,4 @@ -{{todo|Make sure all functions have been added, then document their purpose.}} +{{todo|https://wiki.srb2.org/wiki/User:LJ_Sonik/List_of_outdated_Lua_stuff}} This is a comprehensive list of all '''functions''' that can be utilized by [[Lua]] scripting, excluding those that are part of [[Lua/Userdata structures|userdata structures]]. In the "function" column of each table below, '''bolded''' text is the actual name of the function, text in ''italics'' represents argument types (e.g.: <code>''int''</code>, <code>''mobj_t''</code> or <code>''boolean''</code>) which should '''not''' be written in actual Lua scripts when using the function, while arguments surrounded by brackets ( <code>[ ]</code> ) are optional and can be omitted when using the function. Unless noted otherwise, the argument names can be chosen freely; the argument names used in this article have no special meaning and are only there to simplify the explanations. Some functions have an alternative syntax, using a different number of arguments or different argument types, for instance. @@ -52,13 +52,23 @@ Some of the functions listed below can be used to convert between these two diff |fixed_t |Returns the tangent of the given angle as a fixed-point value. Output values range from about <code>-1303*FRACUNIT</code> to about <code>1303*FRACUNIT</code>. Undefined values, such as tan(90°) or tan(270°), are represented by <code>INT32_MIN</code>. |- +|{{anchor|asin}}<code>'''asin'''(''fixed_t'' x)</code> +|angle_t +|{{todo|Add a description}} +|- +|{{anchor|acos}}<code>'''acos'''(''fixed_t'' x)</code> +|angle_t +|{{todo|Add a description}} +|- | style="white-space:nowrap" |{{anchor|FixedAngle}}<code>'''FixedAngle'''(''fixed_t'' a)</code> +{{anchor|fixangle}}<code>'''fixangle'''(''fixed_t'' a)</code> |angle_t |Converts an integer in the fixed-point scale to an angle value. ''Example: <code>FixedAngle(90*FRACUNIT)</code> will return <code>ANGLE_90</code>.'' |- |{{anchor|AngleFixed}}<code>'''AngleFixed'''(''angle_t'' a)</code> +{{anchor|anglefix}}<code>'''anglefix'''(''angle_t'' a)</code> |fixed_t |Converts an angle value to an integer in the fixed-point scale. @@ -81,54 +91,64 @@ These are mathematical functions that are designed to be used with ''fixed-point !Description |- |{{anchor|FixedMul}}<code>'''FixedMul'''(''fixed_t'' a, ''fixed_t'' b)</code> +{{anchor|fixmul}}<code>'''fixmul'''(''fixed_t'' a, ''fixed_t'' b)</code> |fixed_t |Returns the result of multiplying <code>a</code> by <code>b</code> in the fixed-point scale. ''Example: <code>FixedMul(2*FRACUNIT, 3*FRACUNIT)</code> will return <code>6*FRACUNIT</code>.'' |- |{{anchor|FixedInt}}<code>'''FixedInt'''(''fixed_t'' a)</code> +{{anchor|fixint}}<code>'''fixint'''(''fixed_t'' a)</code> |int |Returns the integer component of <code>a</code> as a normal integer. ''Example: <code>FixedInt(45*FRACUNIT)</code> will return 45.'' |- |{{anchor|FixedDiv}}<code>'''FixedDiv'''(''fixed_t'' a, ''fixed_t'' b)</code> +{{anchor|fixdiv}}<code>'''fixdiv'''(''fixed_t'' a, ''fixed_t'' b)</code> |fixed_t |Returns the result of dividing <code>a</code> by <code>b</code> in the fixed-point scale. ''Example: <code>FixedDiv(6*FRACUNIT, 3*FRACUNIT)</code> will return <code>2*FRACUNIT</code>.'' |- |{{anchor|FixedRem}}<code>'''FixedRem'''(''fixed_t'' a, ''fixed_t'' b)</code> +{{anchor|fixrem}}<code>'''fixrem'''(''fixed_t'' a, ''fixed_t'' b)</code> |fixed_t |Returns the [[w:Remainder|remainder]] of dividing <code>a</code> by <code>b</code> in the fixed-point scale. ''Note: Negative values for <code>b</code> are not handled correctly and may slow down the game.'' |- |{{anchor|FixedSqrt}}<code>'''FixedSqrt'''(''fixed_t'' a)</code> +{{anchor|fixsqrt}}<code>'''fixsqrt'''(''fixed_t'' a)</code> |fixed_t |Returns the [[w:Square root|square root]] of <code>a</code> in the fixed-point scale. ''Example: <code>FixedSqrt(16*FRACUNIT)</code> will return <code>4*FRACUNIT</code>.'' |- | style="white-space:nowrap" |{{anchor|FixedHypot}}<code>'''FixedHypot'''(''fixed_t'' a, ''fixed_t'' b)</code> +{{anchor|fixhypot}}<code>'''fixhypot'''(''fixed_t'' a, ''fixed_t'' b)</code> |fixed_t |Returns the [[w:Hypotenuse|hypotenuse]] of <code>a</code> and <code>b</code> in the fixed-point scale (i.e., the length of the longest side of a right-angled triangle where the other sides have lengths <code>a</code> and <code>b</code>). ''Example: <code>FixedHypot(3*FRACUNIT, 4*FRACUNIT)</code> will return <code>5*FRACUNIT</code>.'' |- |{{anchor|FixedFloor}}<code>'''FixedFloor'''(''fixed_t'' a)</code> +{{anchor|fixfloor}}<code>'''fixfloor'''(''fixed_t'' a)</code> |fixed_t |Returns the [[w:Floor and ceiling functions|floor]] of <code>a</code> (the largest integer that is not larger than <code>a</code>) in the fixed-point scale. |- |{{anchor|FixedTrunc}}<code>'''FixedTrunc'''(''fixed_t'' a)</code> +{{anchor|fixtrunc}}<code>'''fixtrunc'''(''fixed_t'' a)</code> |fixed_t |Returns the value of <code>a</code> rounded to the nearest whole number towards 0 (or <code>a</code> truncated to zero decimal digits) in the fixed-point scale. |- |{{anchor|FixedCeil}}<code>'''FixedCeil'''(''fixed_t'' a)</code> +{{anchor|fixceil}}<code>'''fixceil'''(''fixed_t'' a)</code> |fixed_t |Returns the [[w:Floor and ceiling functions|ceiling]] of <code>a</code> (the smallest integer that is not smaller than <code>a</code>) in the fixed-point scale. |- |{{anchor|FixedRound}}<code>'''FixedRound'''(''fixed_t'' a)</code> +{{anchor|fixround}}<code>'''fixround'''(''fixed_t'' a)</code> |fixed_t |Returns the value of <code>a</code> rounded to the nearest whole number away from 0 in the fixed-point scale. |} @@ -157,6 +177,107 @@ These are simple yet specialized functions that do not fit within the ''[[#Base ''Example: <code>ColorOpposite(SKINCOLOR_WHITE)</code> will return the values <code>SKINCOLOR_BLACK</code> and 10.'' |} +===Easing functions=== +These are interpolation functions meant to simulate movement between two different points in time in varying degrees of smoothness. Their main use is in the animation of graphics and objects, but there are other applications. Learn more [https://easings.net here]. + +In all of these functions, <code>t</code> is the interpolation ratio, ranging from 0 to <code>FRACUNIT</code>. <code>start</code> is the value where the movement should start and <code>end</code> where it's supposed to end: the function then returns the interpolated value corresponding to the provided <code>t</code>. + +The <code>start</code> argument is optional and defaults to 0, with the exception of <code>ease.inback</code>, <code>ease.outback</code> and <code>ease.inoutback</code>, where it is mandatory if the <code>param</code> argument needs to be specified as well. + +{| class="wikitable" +!Function +!Return value(s) +!Description +|- +|{{anchor|ease.linear}}<code>'''ease.linear'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|Linear interpolation. The movement speed will be constant throughout the entire duration of the movement. +|- +|{{anchor|ease.insine}}<code>'''ease.insine'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInSine InSine] function. Movement starts slow and accelerates in a sine function rate. +|- +|{{anchor|ease.outsine}}<code>'''ease.outsine'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutSine OutSine] function. Movement starts fast and decelerates in a sine function rate. +|- +|{{anchor|ease.inoutsine}}<code>'''ease.inoutsine'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutSine InOutSine] function. Movement starts slow, accelerates and decelerates again near the end, in a sine function rate. +|- +|{{anchor|ease.inquad}}<code>'''ease.inquad'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInQuad InQuad] function. Movement starts slow and accelerates in a quadratic function rate. +|- +|{{anchor|ease.outquad}}<code>'''ease.outquad'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutQuad OutQuad] function. Movement starts fast and decelerates in a quadratic function rate. +|- +|{{anchor|ease.inoutquad}}<code>'''ease.inoutquad'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutQuad InOutQuad] function. Movement starts slow, accelerates and decelerates again near the end, in a quadratic function rate. +|- +|{{anchor|ease.incubic}}<code>'''ease.incubic'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInCubic InCubic] function. Movement starts slow and accelerates in a cubic function rate. +|- +|{{anchor|ease.outcubic}}<code>'''ease.outcubic'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutCubic OutCubic] function. Movement starts fast and decelerates in a cubic function rate. +|- +|{{anchor|ease.inoutcubic}}<code>'''ease.inoutcubic'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutCubic InOutCubic] function. Movement starts slow, accelerates and decelerates again near the end, in a cubic function rate. +|- +|{{anchor|ease.inquart}}<code>'''ease.inquart'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInQuart InQuart] function. Movement starts slow and accelerates in a quartic function rate. +|- +|{{anchor|ease.outquart}}<code>'''ease.outquart'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutQuart OutQuart] function. Movement starts fast and decelerates in a quartic function rate. +|- +|{{anchor|ease.inoutquart}}<code>'''ease.inoutquart'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutQuart InOutQuart] function. Movement starts slow, accelerates and decelerates again near the end, in a quartic function rate. +|- +|{{anchor|ease.inquint}}<code>'''ease.inquint'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInQuint InQuint] function. Movement starts slow and accelerates in a quintic function rate. +|- +|{{anchor|ease.outquint}}<code>'''ease.outquint'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutQuint OutQuint] function. Movement starts fast and decelerates in a quintic function rate. +|- +|{{anchor|ease.inoutquint}}<code>'''ease.inoutquint'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutQuint InOutQuint] function. Movement starts slow, accelerates and decelerates again near the end, in a quintic function rate. +|- +|{{anchor|ease.inexpo}}<code>'''ease.inexpo'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInExpo InExpo] function. Movement starts slow and accelerates in an exponential function rate. +|- +|{{anchor|ease.outexpo}}<code>'''ease.outexpo'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeOutExpo OutExpo] function. Movement starts fast and decelerates in an exponential function rate. +|- +|{{anchor|ease.inoutexpo}}<code>'''ease.inoutexpo'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end])</code> +|fixed_t +|[https://easings.net/#easeInOutExpo InOutExpo] function. Movement starts slow, accelerates and decelerates again near the end, in an exponential function rate. +|- +|{{anchor|ease.inback}}<code>'''ease.inback'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end, [''fixed_t'' param]])</code> +|fixed_t +|[https://easings.net/#easeInBack InBack] function. Movement initially recoils towards <code>param</code>, then accelerates towards the end. +|- +|{{anchor|ease.outback}}<code>'''ease.outback'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end, [''fixed_t'' param]])</code> +|fixed_t +|[https://easings.net/#easeOutBack OutBack] function. Movement decelerates towards the end and recoils towards <code>param</code>. +|- +|{{anchor|ease.inoutback}}<code>'''ease.inoutback'''(''fixed_t'' t, [[''fixed_t'' start], ''fixed_t'' end, [''fixed_t'' param]])</code> +|fixed_t +|[https://easings.net/#easeInOutBack InOutBack] function. Movement recoils towards <code>param</code> both at the start and the end. +|} + ==HUD library== These are the functions included in SRB2's ''HUD library''. These functions relate to the [[head-up display]], and are all prefixed with ''hud.'' (aside from the [[#Patch/string drawing functions|patch/string drawing functions]]). Where they are required, the coordinates provided to these functions should be for the base 320×200 pixel resolution – such that x is a value between 0 and 320 (measured from the ''left'' of the screen), y is a value between 0 and 200 (measured from the ''top'' of the screen), and x = 0, y = 0 is the top-left corner of the screen. These values will automatically be adjusted by the game for other resolutions. @@ -197,6 +318,9 @@ Valid huditem string options, for the functions <code>[[#hud.enable|hud.enable]] !<code>"textspectator"</code> |Information text as a spectator |- +!<code>"crosshair"</code> +|Crosshair in first-person +|- !<code>"score"</code> |Score text and counter |- @@ -253,6 +377,12 @@ Valid huditem string options, for the functions <code>[[#hud.enable|hud.enable]] |- !<code>"intermissionmessages"</code> |Intermission – Information text +|- +!<code>"intermissiontitletext"</code> +|Intermission – Co-Op/Special Stage title text +|- +!<code>"intermissionemeralds"</code> +|Intermission – Special Stage emeralds |} ====HUD hooks==== @@ -716,25 +846,28 @@ Registers a console variable with the name <code>name</code> for use in the cons |- !<code>CV_Natural</code> |<code>{MIN = 1, MAX = 999999999}</code> +|- +!<code>CV_TrueFalse</code> +|<code>{False = 0, True = 1}</code> |} Custom PossibleValue tables need to be formatted as such: -<source lang="lua">{string1=value1, string2=value2, [...]}</source> +<syntaxhighlight lang="lua">{string1=value1, string2=value2, [...]}</syntaxhighlight> This gives each possible value listed in the table a string name of its own, which can be used in the console itself when the variable is in use. If <code>MIN</code> and <code>MAX</code> are used as string names for possible value entries, these will act as the minimum and maximum of a bounded range of possible values, allowing any value in-between the two to be picked as well. Otherwise, the selectable values for the console variable are limited explicitly only to the possible value entries listed in the table. Example of custom <code>MIN</code> and <code>MAX</code> values: -<source lang="lua">{MIN = 20, MAX = 50}</source> +<syntaxhighlight lang="lua">{MIN = 20, MAX = 50}</syntaxhighlight> The contents of <code>CV_RegisterVar</code> can alternatively be laid out as such: -<source lang="lua">CV_RegisterVar({name = , defaultvalue = , flags = , PossibleValue = , func = })</source> +<syntaxhighlight lang="lua">CV_RegisterVar({name = , defaultvalue = , flags = , PossibleValue = , func = })</syntaxhighlight> Or: -<source lang="lua">CV_RegisterVar({ +<syntaxhighlight lang="lua">CV_RegisterVar({ name = , defaultvalue = , flags = , PossibleValue = , func = -})</source> +})</syntaxhighlight> In the above two layouts, the names of the variables of the table are written out, and so do not need to be placed in any particular order unlike as in the above. |- @@ -982,6 +1115,12 @@ Currently, tables passed through NetVars hooks or stored in custom player/mobj f This issue can be solved by calling this function ''during script loading'' to have SRB2 register the given <code>metatable</code>, in such a way that the tables/userdata this metatable is attached to (via <code>setmetatable()</code>) will not lose their metatable when sent to a client connecting to the server. |- +|{{anchor|userdataMetatable}}<code>'''userdataMetatable'''(''string'' userdataname)</code> +|table or nil +|Takes a string as only argument and returns the metatable +associated to the userdata type this string refers to. +Returns nil if the string does not refer to a valid userdata type. +|- |{{anchor|getTimeMicros}}<code>'''getTimeMicros'''()</code> |<code>int</code> |{{todo|Rephrase? [https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1647 See merge request].}} @@ -992,7 +1131,7 @@ This is used as a profiling timer function: Two values returned by this function '''Warning about OpenGL and HUD hooks:''' measuring Lua API calls that contain OpenGL API calls can give unreliable/confusing results because of the asynchronous nature of OpenGL. This applies to measuring HUD drawing functions in OpenGL mode. Example: -<source lang="Lua"> +<syntaxhighlight lang="Lua"> -- Get the time before the code to be profiled local first = getTimeMicros() @@ -1012,7 +1151,7 @@ local second = getTimeMicros() -- Substract the newest time against the oldest time local result = second - first -- This result will represent the time between [first] and [second], in microseconds -</source> +</syntaxhighlight> |} ===G_Game=== @@ -1033,6 +1172,47 @@ local result = second - first ''Example: <code>G_BuildMapTitle(1)</code> will return <code>"Greenflower Zone 1"</code>''. |- +|{{anchor|G_FindMap}}<code>'''G_FindMap'''(''string'' query)</code> +|INT32, string, table +|{{todo|Improve the description}} +Returns: + +<pre> +[1] => map number +[2] => map title +[3] => search frequency table +</pre> + +The frequency table is unsorted. It has the following format: + +<pre> +{ + ['mapnum'], + + ['matchd'] => matches in map title string + ['keywhd'] => matches in map keywords + + The above two tables have the following format: + + { + ['pos'] => offset from start of string + ['siz'] => length of match + }... + + ['total'] => the total matches +}... +</pre> +|- +|{{anchor|G_FindMapByNameOrCode}}<code>'''G_FindMapByNameOrCode'''(''string'' query)</code> +|INT32, string or nil +|{{todo|Improve the description}} +Returns: + +<pre> +[1] => map number +[2] => map title +</pre> +|- |{{anchor|G_DoReborn}}<code>'''G_DoReborn'''(''int'' playernum)</code> |nil |Respawns the player whose player number is <code>playernum</code>. Avoid calling this function directly in Single Player; set the player's <code>player.playerstate</code> to <code>PST_REBORN</code> instead. @@ -1092,20 +1272,38 @@ If <code>G_SetCustomExitVars</code> was called beforehand, the level will exit u |boolean |Returns true if the current gametype is a "platformer" gametype ([[Single Player]], [[Coop]], [[Race]] or [[Competition]]); otherwise returns false. |- +|{{anchor|G_CoopGametype}}<code>'''G_CoopGametype'''()</code> +|boolean +|{{todo|Add a description}} +|- |{{anchor|G_TagGametype}}<code>'''G_TagGametype'''()</code> |boolean -|Returns true if the current gametype is [[Tag]] or Hide and Seek; otherwise returns false. +|{{todo|Rewrite the description to take into account the gametype rules}} +Returns true if the current gametype is [[Tag]] or Hide and Seek; otherwise returns false. +|- +|{{anchor|G_CompetitionGametype}}<code>'''G_CompetitionGametype'''()</code> +|boolean +|{{todo|Add a description}} |- |{{anchor|G_AddPlayer}}<code>'''G_AddPlayer'''(''int'' skin, ''int'' color, ''string'' name, ''int'' bottype)</code> |player_t |{{todo|Rephrase? [https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1383 See merge request].}} -Adds a bot to the game. +Adds a bot to the game. <code>skin</code>, <code>color</code> and <code>name</code> specify how bot will look like. <code>bottype</code> can be one of the following values: +*<code>BOT_NONE</code> – Player is not bot +*<code>BOT_2PAI</code> – Bot acts like Tails from SinglePlayer +*<code>BOT_2PHUMAN</code> – Bot acts like Tails but his controls can be taken by human Player 2 +*<code>BOT_MPAI</code> – Bot has unique AI. It can be modded with LUA through <code>BotTiccmd</code> hook + <font color="red">'''''Note: Console commands (COM_BufInsertText) can't be executed as a bot at the moment.'''''</font> |- |{{anchor|G_RemovePlayer}}<code>'''G_RemovePlayer'''(''int'' playernum)</code> |nil |Removes the bot. (''Cannot be applied to human players.'') |- +|{{anchor|G_SetUsedCheats}}<code>'''G_SetUsedCheats'''(''boolean'' silent?)</code> +|nil +|{{todo|Add a description}} +|- |{{anchor|G_TicsToHours}}<code>'''G_TicsToHours'''(''int'' tics)</code> |int |Converts the given time in tics to hours. @@ -1162,6 +1360,40 @@ Adds a bot to the game. |Returns true <code>p</code>% of the time, where <code>p</code> is a fixed-point number between 0 and <code>FRACUNIT</code>. For example, <code>P_RandomChance(FRACUNIT/2)</code> returns true 50% of the time. |} +===M_Menu=== +{| class="wikitable" +!Function +!Return value(s) +!Description +|- +|{{anchor|M_MoveColorAfter}}<code>'''M_MoveColorAfter'''(''UINT16'' color, ''UINT16'' target)</code> +|nil +|Shifts the given <code>color</code> skincolor ahead of the <code>target</code> skincolor. Reflected in the multiplayer setup menu and other functions, but will not affect <code>color</code>'s index value. +|- +|{{anchor|M_MoveColorBefore}}<code>'''M_MoveColorBefore'''(''UINT16'' color, ''UINT16'' target)</code> +|nil +|Shifts the given <code>color</code> skincolor behind the <code>target</code> skincolor. Reflected in the multiplayer setup menu and other functions, but will not affect <code>color</code>'s index value. +|- +|{{anchor|M_GetColorAfter}}<code>'''M_GetColorAfter'''(''UINT16'' color)</code> +|UINT16 +|Returns the skincolor after <code>color</code> as a <code>UINT16</code> value. +|- +|{{anchor|M_GetColorBefore}}<code>'''M_GetColorBefore'''(''UINT16'' color)</code> +|UINT16 +|Returns the skincolor before <code>color</code> as a <code>UINT16</code> value. +|} + +===M_Map=== +{| class="wikitable" +!Function +!Return value(s) +!Description +|- +|{{anchor|M_MapNumber}}<code>'''M_MapNumber'''(''string'' name)</code> +|INT32 +|Returns the map number for a map identified by the last two characters in its name, or 0 if no map corresponds to these characters. +|} + ===P_Enemy=== {| class="wikitable" !Function @@ -1290,7 +1522,7 @@ Note that this function does not actually affect <code>''player''.rings</code>; |- |{{anchor|P_DoMatchSuper}}<code>'''P_DoMatchSuper'''(''[[player_t]]'' player)</code> |nil -|Gives invincibility, speed shoes, and steals score form others if <code>player</code> has all 7[[Match Chaos Emerald Spawn|Match Emeralds]]. Will remove the emeralds afterwards. +|Gives invincibility, speed shoes, and steals score from others if <code>player</code> has all 7 [[Match Chaos Emerald Spawn|Match Emeralds]]. Will remove the emeralds afterwards. |} ===P_Map=== @@ -1322,6 +1554,18 @@ The [[blockmap]] is checked for any Objects or walls to collide with; any Object |{{anchor|P_TeleportMove}}<code>'''P_TeleportMove'''(''[[mobj_t]]'' mobj, ''fixed_t'' x, ''fixed_t'' y, ''fixed_t'' z)</code> |boolean, <code>[[mobj_t]]</code> |Teleports the Object straight to the <code>x</code>, <code>y</code>, and <code>z</code> coordinates supplied, but does not account for whether the Object will be stuck in this position, and will always return true. This function additionally returns the "tmthing" Object set during the run of the function, which in the majority of cases will be <code>mobj</code> itself. + +<font color="red">'''''Note: This function has been deprecated since the introduction of 2.2.11, we recommend you use the P_SetOrigin or P_MoveOrigin instead.'''''</font> +|- +|{{anchor|P_SetOrigin}}<code>'''P_SetOrigin'''(''[[mobj_t]]'' mobj, ''fixed_t'' x, ''fixed_t'' y, ''fixed_t'' z)</code> +|boolean, <code>[[mobj_t]]</code> +|Teleports the Object to the <code>x</code>, <code>y</code>, and <code>z</code> coordinates supplied without any positional checks. As all interpolation values of the Object are '''reset''', this function should be used for instant movement. It will always return true, plus the "tmthing" Object set during the run of the function, which in the majority of cases will be <code>mobj</code> itself. + +|- +|{{anchor|P_MoveOrigin}}<code>'''P_MoveOrigin'''(''[[mobj_t]]'' mobj, ''fixed_t'' x, ''fixed_t'' y, ''fixed_t'' z)</code> +|boolean, <code>[[mobj_t]]</code> +|Teleports the Object to the <code>x</code>, <code>y</code>, and <code>z</code> coordinates supplied without any positional checks. As all interpolation values of the Object are '''kept''', this function should be used for continuous movement. This function additionally returns the "tmthing" Object set during the run of the function, which in the majority of cases will be <code>mobj</code> itself. + |- |{{anchor|P_SlideMove}}<code>'''P_SlideMove'''(''[[mobj_t]]'' mo)</code> |nil @@ -1349,6 +1593,10 @@ Objects that cannot be damaged by <code>P_RadiusAttack</code> include: any Objec |fixed_t |Returns what would be the floorz (the absolute Z position of the floor) at the <code>x</code>, <code>y</code>, and <code>z</code> coordinates supplied. <code>height</code> should be the height of the Object you want to check this for (needed for checking solid/quicksand FOFs). Keep in mind the coordinates and perhaps even the height do not necessarily have to be the actual position of an existing Object. |- +|{{anchor|P_CeilingzAtPos}}<code>'''P_CeilingzAtPos'''(''fixed_t'' x, ''fixed_t'' y, ''fixed_t'' z, ''fixed_t'' height)</code> +|fixed_t +|Returns what would be the ceilingz (the absolute Z position of the ceiling) at the <code>x</code>, <code>y</code>, and <code>z</code> coordinates supplied. <code>height</code> should be the height of the Object you want to check this for (needed for checking solid/quicksand FOFs). Keep in mind the coordinates and perhaps even the height do not necessarily have to be the actual position of an existing Object. +|- |{{anchor|P_DoSpring}}<code>'''P_DoSpring'''(''[[mobj_t]]'' spring, ''[[mobj_t]]'' object)</code> |nil |The <code>spring</code> Object sends <code>object</code> into the air like a spring. <code>spring</code> does not necessarily have to be an Object with the <code>MF_SPRING</code> flag, but it should have least all the same attributes as one; see the [[Spring]] article for more details. Note that <code>object</code> will also be given the <code>MFE_SPRUNG</code> flag, marking it as having already touched a spring this tic; the flag will automatically be removed the next tic. If this function is called while <code>object</code> has this flag set, it will have no effect. @@ -1469,7 +1717,7 @@ The hook <code>[[Lua/Hooks#MobjSpawn|MobjSpawn]]</code> can be used to modify or |nil |Sets the type and duration of the player's [[palette]]. This is used in the game to flash the screen in events such as when the player is teleported, or when an [[Armageddon Shield]] explodes – see [[PLAYPAL]] for the palette numbers available in the default <code>PLAYPAL</code> lump. |- -|{{anchor|P_GetClosestAxis}}<code>'''P_GetClosestAxis'''(''[[mobj_t]]'' mobj)</code> +|{{anchor|P_GetClosestAxis}}<code>'''P_GetClosestAxis'''(''[[mobj_t]]'' source)</code> |<code>[[mobj_t]]</code> |Returns the closest [[Axis]] Object (of type <code>MT_AXIS</code>) to <code>source</code>. |- @@ -1481,11 +1729,11 @@ In SRB2, this function is called when the player uses the paraloop move while fl Below is some example Lua code that recreates <code>A_RingExplode</code>'s explosion, using an Object <code>actor</code> as a spawn position: -<source lang="lua"> +<syntaxhighlight lang="lua"> for i=0,15 P_SpawnParaloop(actor.x, actor.y, actor.z + actor.height, FixedMul(actor.info.painchance, actor.scale), 16, MT_NIGHTSSPARKLE, i*ANGLE_22h, S_NULL, true) end -</source> +</syntaxhighlight> Notes: * ''For all Objects spawned by this function, <code>mobj.fuse</code> is set to <code>(FixedDiv(radius,5*(FRACUNIT/4))>>(FRACBITS+2)) + 1</code>, and <code>mobj.tics</code> to <code>mobj.fuse - 7</code>. The minimum values it can set for them are 2 and 1, respectively. These values are set to make sure that the Objects will all disappear eventually.'' @@ -1531,6 +1779,49 @@ Notes: |{{anchor|P_RemoveFloorSpriteSlope}}<code>'''P_RemoveFloorSpriteSlope'''(''[[mobj_t]]'' mobj)</code> |nil |Wipes the <code>''mobj.floorspriteslope''</code> field from <code>mobj</code>, effectively ceasing its rendering as a sloped floor sprite. Recommended to use when a sloped floor sprite is no longer needed, since they can increase memory usage. +|- +|{{anchor|P_RailThinker}}<code>'''P_RailThinker'''(''[[mobj_t]]'' mobj)</code> +|boolean +|{{todo|Add a description}} +|- +|{{anchor|P_XYMovement}}<code>'''P_XYMovement'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} +|- +|{{anchor|P_RingXYMovement}}<code>'''P_RingXYMovement'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} +|- +|{{anchor|P_SceneryXYMovement}}<code>'''P_SceneryXYMovement'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} +|- +|{{anchor|P_ZMovement}}<code>'''P_ZMovement'''(''[[mobj_t]]'' mobj)</code> +|boolean +|{{todo|Add a description}} +|- +|{{anchor|P_RingZMovement}}<code>'''P_RingZMovement'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} +|- +|{{anchor|P_SceneryZMovement}}<code>'''P_SceneryZMovement'''(''[[mobj_t]]'' mobj)</code> +|boolean +|{{todo|Add a description}} +|- +|{{anchor|P_PlayerZMovement}}<code>'''P_PlayerZMovement'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} +|} + +===P_Polyobj=== +{| class="wikitable" +!Function +!Return value(s) +!Description +|- +|{{anchor|polyobjects.GetForNum}}<code>'''polyobjects.GetForNum'''(''[[polyobj_t]]'' polyobject, ''INT32'' id)</code> +|<code>[[polyobj_t]]</code> +|Retrieves a polyobject by its numeric ID. Returns <code>nil</code> if no such polyobject exists. |} ===P_Slopes=== @@ -1542,6 +1833,10 @@ Notes: |{{anchor|P_GetZAt}}<code>'''P_GetZAt'''(''[[pslope_t]]'' slope, ''fixed_t'' x, ''fixed_t'' y)</code> |fixed_t |Returns the corresponding Z position on the slope for the X/Y coordinates given. +|- +|{{anchor|P_ButteredSlope}}<code>'''P_ButteredSlope'''(''[[mobj_t]]'' mobj)</code> +|nil +|{{todo|Add a description}} |} ===P_Spec=== @@ -1686,7 +1981,7 @@ Shatters the FOF <code>rover</code>, making it vanish from the map and spawning |- |{{anchor|P_GetJumpFlags}}<code>'''P_GetJumpFlags'''(''[[player_t]]'' player)</code> |int -|Checks whether <code>player</code>'s skin has SF_NOJUMPDAMAGE and returns the appropriate flags to set for their jump. +|Checks whether <code>player</code>'s skin has <code>SF_NOJUMPDAMAGE</code> and returns the appropriate flags to set for their jump. |- |{{anchor|P_PlayerInPain}}<code>'''P_PlayerInPain'''(''[[player_t]]'' player)</code> |boolean @@ -1722,11 +2017,11 @@ Shatters the FOF <code>rover</code>, making it vanish from the map and spawning |- |{{anchor|P_SetObjectMomZ}}<code>'''P_SetObjectMomZ'''(''[[mobj_t]]'' mobj, ''fixed_t'' momz, [''boolean'' relative?])</code> |nil -|Sets <code>mobj</code>'s momz to the value given. If <code>relative</code> is true, this will be added to the Object's previous momz, otherwise it will replace it. (Note: This also corrects for scaling and reverse gravity.) +|Sets <code>mobj</code>'s <code>momz</code> to the value given. If <code>relative</code> is true, this will be added to the Object's previous <code>momz</code>; otherwise, it will replace it. (Note: This also corrects for scaling and reverse gravity.) |- |{{anchor|P_RestoreMusic}}<code>'''P_RestoreMusic'''(''[[player_t]]'' player)</code> |nil -|Restores the music to whatever should be depending on whether <code>player</code> has any powerups or not. +|Restores the music to whatever it should be depending on whether <code>player</code> has any powerups or not. |- |{{anchor|P_SpawnShieldOrb}}<code>'''P_SpawnShieldOrb'''(''[[player_t]]'' player)</code> |nil @@ -1734,7 +2029,7 @@ Shatters the FOF <code>rover</code>, making it vanish from the map and spawning |- |{{anchor|P_SpawnGhostMobj}}<code>'''P_SpawnGhostMobj'''(''[[mobj_t]]'' mobj)</code> |<code>[[mobj_t]]</code> -|Spawns a "ghost" of <code>mobj</code> (a 50% translucent clone of the Object that lasts only 8 tics normally before disappearing). Useful for creating afterimages of Objects such as players, such as with the [[Super Sneakers]] power-up or when a player is in Super form. Returns the ghost Object spawned. If a player Object the ghost was made after possesses a [[S_SKIN#followitem|followitem]], a ghost of that item's Object will additionally be spawn and assigned as the player ghost's tracer, and vice versa. +|Spawns a "ghost" of <code>mobj</code> (a 50% translucent clone of the Object that lasts only 8 tics normally before disappearing). Useful for creating afterimages of Objects such as players, such as with the [[Super Sneakers]] power-up or when a player is in Super form. Returns the ghost Object spawned. If a player Object the ghost was made after possesses a [[S_SKIN#followitem|followitem]], a ghost of that item's Object will additionally be spawned and assigned as the player ghost's tracer, and vice versa. |- |{{anchor|P_GivePlayerRings}}<code>'''P_GivePlayerRings'''(''[[player_t]]'' player, ''int'' amount)</code> |nil @@ -1750,11 +2045,11 @@ Shatters the FOF <code>rover</code>, making it vanish from the map and spawning |- |{{anchor|P_ResetScore}}<code>'''P_ResetScore'''(''[[player_t]]'' player)</code> |nil -|Resets <code>player</code>'s scoreadd value to 0, ending any score chains in progress. +|Resets <code>player</code>'s <code>scoreadd</code> value to 0, ending any score chains in progress. |- |{{anchor|P_DoJumpShield}}<code>'''P_DoJumpShield'''(''[[player_t]]'' player)</code> |nil -|If <code>player</code> has the shield power SH_PROTECTELECTRIC, this will activate the [[Lightning Shield]]'s double jump. In any other case, <code>player</code> peforms a [[Whirlwind Shield]]-style jump and switches to their falling animations. +|If <code>player</code> has the shield power <code>SH_PROTECTELECTRIC</code>, this will activate the [[Lightning Shield]]'s double jump. In any other case, <code>player</code> performs a [[Whirlwind Shield]]-style jump and switches to their falling animations. |- |{{anchor|P_DoBubbleBounce}}<code>'''P_DoBubbleBounce'''(''[[player_t]]'' player)</code> |nil @@ -1803,7 +2098,7 @@ Note that Objects with the [[Object flags#Secondary flags|secondary flag]] <code |- |{{anchor|P_HomingAttack}}<code>'''P_HomingAttack'''(''[[mobj_t]]'' source, ''[[mobj_t]]'' target)</code> |boolean -|The <code>source</code> Object faces the <code>target</code> Object and moves towards it; needs to be repeatedly used to work properly. <code>source</code>'s movement speed depends on what <code>source</code> is – players will move at 2/3 of their actionspd value, the [[Deton]] will move at 17/20 of the enemy player's normalspeed value, otherwise all other Objects will use their Object type's <code>Speed</code> value (threshold of 32000 for the source cuts this in half). Returns <code>true</code> if the homing attack was successful, returns <code>false</code> if not. +|The <code>source</code> Object faces the <code>target</code> Object and moves towards it; needs to be repeatedly used to work properly. <code>source</code>'s movement speed depends on what <code>source</code> is – players will move at 2/3 of their <code>actionspd</code> value, the [[Deton]] will move at 17/20 of the enemy player's <code>normalspeed</code> value, otherwise all other Objects will use their Object type's <code>Speed</code> value (a <code>threshold</code> of 32000 for the source cuts this in half). Returns <code>true</code> if the homing attack was successful, returns <code>false</code> if not. |- |{{anchor|P_SuperReady}}<code>'''P_SuperReady'''(''[[player_t]]'' player)</code> |boolean @@ -1815,7 +2110,7 @@ Note that Objects with the [[Object flags#Secondary flags|secondary flag]] <code |- |{{anchor|P_SpawnThokMobj}}<code>'''P_SpawnThokMobj'''(''[[player_t]]'' player)</code> |nil -|Spawns the <code>player</code>'s thokitem defined in S_SKIN at <code>player</code>'s location. Defaults to MT_THOK if no object is defined. +|Spawns the <code>player</code>'s <code>thokitem</code> defined in <code>S_SKIN</code> at <code>player</code>'s location. Defaults to <code>MT_THOK</code> if no object is defined. |- |{{anchor|P_SpawnSpinMobj}}<code>'''P_SpawnSpinMobj'''(''[[player_t]]'' player, ''int'' type)</code> |nil @@ -1827,7 +2122,7 @@ Note that Objects with the [[Object flags#Secondary flags|secondary flag]] <code |- |{{anchor|P_SwitchShield}}<code>'''P_SwitchShield'''(''[[player_t]]'' player, ''int'' shield)</code> |nil -|Switches the current [[shield]] <code>player</code> has with <code>shieldtype</code>. This will also cause an unused Armageddon Shield to explode. For the list of possible shield types, see [[Constants#Shield types|Shield types]]. +|Switches the current [[shield]] <code>player</code> has with <code>shieldtype</code>. This will also cause an unused [[Armageddon Shield]] to explode. For the list of possible shield types, see [[Constants#Shield types|Shield types]]. |- |{{anchor|P_PlayJingle}}<code>'''P_PlayJingle'''(''[[player_t]]'' player, ''int'' jingletype)</code> |nil @@ -1845,6 +2140,22 @@ Note that Objects with the [[Object flags#Secondary flags|secondary flag]] <code |{{anchor|P_Earthquake}}<code>'''P_Earthquake'''(''[[mobj_t]]'' inflictor, ''[[mobj_t]]'' source, ''fixed_t'' radius)</code> |nil |Damages enemies within the given <code>radius</code>. Used for Super Knuckles' landing. +|- +|{{anchor|P_PlayerFullbright}}<code>'''P_PlayerFullbright'''(''[[player_t]]'' player)</code> +|boolean +|{{todo|Add a description}} +|- +|{{anchor|P_MovePlayer}}<code>'''P_MovePlayer'''(''[[player_t]]'' player)</code> +|nil +|{{todo|Add a description}} +|- +|{{anchor|P_PlayerCanEnterSpinGaps}}<code>'''P_PlayerCanEnterSpinGaps'''(''[[player_t]]'' player)</code> +|boolean +|{{todo|Add a description}} +|- +|{{anchor|P_PlayerShouldUseSpinHeight}}<code>'''P_PlayerShouldUseSpinHeight'''(''[[player_t]]'' player)</code> +|boolean +|{{todo|Add a description}} |} ===R_Data=== @@ -1861,6 +2172,14 @@ Note that Objects with the [[Object flags#Secondary flags|secondary flag]] <code |int |If a texture with the name given by <code>name</code> exists, returns its texture number. Otherwise, returns -1. |- +|{{anchor|R_TextureNameForNum}}<code>'''R_TextureNameForNum'''(''int'' number)</code> +|string +|Returns the texture name for the texture whose number is supplied in <code>number</code>. For a list of textures by number, see [[List of textures by number]]. +|- +|{{anchor|R_CheckTextureNameForNum}}<code>'''R_CheckTextureNameForNum'''(''int'' number)</code> +|string +|If a texture with the number given by <code>number</code> exists, returns its texture name. Otherwise, returns '''"-"'''. +|- |} ===R_Draw=== @@ -1955,24 +2274,24 @@ For all of the functions below with an optional <code>player</code> parameter, t !Return value(s) !Description |- -|{{anchor|S_StartSound}}<code>'''S_StartSound'''(''[[mobj_t]]'' origin, ''int'' soundnum, [''[[player_t]]'' player])</code> +|{{anchor|S_StartSound}}<code>'''S_StartSound'''(''[[mobj_t]]''/''[[sector_t]]'' origin, ''int'' soundnum, [''[[player_t]]'' player])</code> |nil |Starts the given sound effect from <code>origin</code>, or plays the sound globally if <code>origin</code> is nil. If <code>origin</code> exists and has a [[skin]] applied, certain sounds may be replaced with [[S_SKIN#Custom sounds|custom sounds]] set for the skin. If in a [[Mario mode]] or Christmas NiGHTS level, certain sounds will automatically be swapped with different sounds for the given level type (these take priority over custom skin sounds). If the third argument is set, the sound will only be played for that player. Otherwise, it will be heard by all players. |- -|{{anchor|S_StartSoundAtVolume}}<code>'''S_StartSoundAtVolume'''(''[[mobj_t]]'' origin, ''int'' soundnum, ''UINT8'' volume, [''[[player_t]]'' player])</code> +|{{anchor|S_StartSoundAtVolume}}<code>'''S_StartSoundAtVolume'''(''[[mobj_t]]''/''[[sector_t]]'' origin, ''int'' soundnum, ''UINT8'' volume, [''[[player_t]]'' player])</code> |nil |Starts the given sound effect at a specific volume from <code>origin</code>, or plays the sound globally if <code>origin</code> is nil. If <code>origin</code> exists and has a [[skin]] applied, certain sounds may be replaced with [[S_SKIN#Custom sounds|custom sounds]] set for the skin. Unlike <code>S_StartSound</code>, Mario mode and Christmas NiGHTS have no effect on the sound used. Volume ranges from 0 to 255, inclusive. |- -|{{anchor|S_StopSound}}<code>'''S_StopSound'''(''[[mobj_t]]'' mobj)</code> +|{{anchor|S_StopSound}}<code>'''S_StopSound'''(''[[mobj_t]]''/''[[sector_t]]'' origin)</code> |nil -|Stops any sound that the given <code>mobj</code> is playing. +|Stops any sound that the given <code>origin</code> is playing. |- -|{{anchor|S_StopSoundByID}}<code>'''S_StopSoundByID'''(''[[mobj_t]]'' mobj, ''int'' soundnum)</code> +|{{anchor|S_StopSoundByID}}<code>'''S_StopSoundByID'''(''[[mobj_t]]''/''[[sector_t]]'' origin, ''int'' soundnum)</code> |nil -|Stops the sound <code>soundnum</code> that <code>mobj</code> may be playing. +|Stops the sound <code>soundnum</code> that <code>origin</code> may be playing. |- |{{anchor|S_ChangeMusic}}<code>'''S_ChangeMusic'''(''string'' musicname, [''boolean'' looping?, [''[[player_t]]'' player, [''int'' mflags, [''int'' position, [''int'' prefadems, [''int'' fadeinms]]]]])</code> |nil @@ -2030,17 +2349,17 @@ Returns true if the fade was done for all players or the user's local player, re Returns true if the fade was done for all players or the user's local player, returns false if not. |- -|{{anchor|S_OriginPlaying}}<code>'''S_OriginPlaying'''(''[[mobj_t]]'' origin)</code> +|{{anchor|S_OriginPlaying}}<code>'''S_OriginPlaying'''(''[[mobj_t]]''/''[[sector_t]]'' origin)</code> |boolean -|Returns true if a sound effect with <code>mobj</code> as the origin is being played, false if not. +|Returns true if a sound effect with <code>origin</code> as the origin is being played, false if not. Example: -<source lang="Lua"> +<syntaxhighlight lang="Lua"> if S_OriginPlaying(players[0].mo) -- is a sound being played from the player's mobj? print("beep!") -- beep if yes end -</source> +</syntaxhighlight> <font color="red">'''''Note: This function only checks sounds being played for the local client, and thus isn't network safe. Use at your own risk.'''''</font> |- @@ -2049,24 +2368,24 @@ end |Returns true if a sound effect with the given ID is being played, false if not. Example: -<source lang="Lua"> +<syntaxhighlight lang="Lua"> if S_IdPlaying(sfx_thok) -- is a thok sound being played at all? print("beep!") -- beep if yes end -</source> +</syntaxhighlight> <font color="red">'''''Note: This function only checks sounds being played for the local client, and thus isn't network safe. Use at your own risk.'''''</font> |- -|{{anchor|S_SoundPlaying}}<code>'''S_SoundPlaying'''(''[[mobj_t]]'' origin, ''int'' soundnum)</code> +|{{anchor|S_SoundPlaying}}<code>'''S_SoundPlaying'''(''[[mobj_t]]''/''[[sector_t]]'' origin, ''int'' soundnum)</code> |boolean -|Returns true if a sound effect with the given ID and <code>mobj</code> as the origin is being played, false if not. +|Returns true if a sound effect with the given ID and <code>origin</code> as the origin is being played, false if not. Example: -<source lang="Lua"> +<syntaxhighlight lang="Lua"> if S_SoundPlaying(players[0].mo, sfx_thok) -- is a thok sound being played from the player's mobj? print("beep!") -- beep if yes end -</source> +</syntaxhighlight> <font color="red">'''''Note: This function only checks sounds being played for the local client, and thus isn't network safe. Use at your own risk.'''''</font> |- @@ -2096,44 +2415,46 @@ end | |{{todo|Everything :3}} |- -|{{anchor|S_MusicPlaying}}<code>'''S_MusicPlaying'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_MusicExists}}<code>'''S_MusicExists'''(''string'' mname, [''boolean'' checkmidi, [''boolean'' checkdigi]])</code> +|boolean +|Returns whether music of name <code>mname</code> exists within any of the currently loaded files. + +By default, this checks for both digital (<code>O_</code>) ''and'' MIDI (<code>D_</code>) versions of the music file, but the checks can be toggled with the arguments <code>checkdigi</code> and <code>checkmidi</code>, respectively. |- -|{{anchor|S_MusicPaused}}<code>'''S_MusicPaused'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_MusicPlaying}}<code>'''S_MusicPlaying'''([''[[player_t]]'' player])</code> +|boolean or nil +|{{todo|Add a description}} |- -|{{anchor|S_MusicName}}<code>'''S_MusicName'''</code> -|string -|Returns the current music playing as a string. +|{{anchor|S_MusicPaused}}<code>'''S_MusicPaused'''([''[[player_t]]'' player])</code> +|boolean or nil +|{{todo|Add a description}} |- -|{{anchor|S_MusicName}}<code>'''S_MusicExists'''(''string'' name)</code> -|boolean -|Returns true if <code>name</code> music exists in any WAD file loaded, returns false if not. +|{{anchor|S_MusicName}}<code>'''S_MusicName'''([''[[player_t]]'' player])</code> +|string or nil +|{{todo|Add a description}} |- -|{{anchor|S_SetMusicLoopPoint}}<code>'''S_SetMusicLoopPoint'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_SetMusicLoopPoint}}<code>'''S_SetMusicLoopPoint'''(UINT32 looppoint, [''[[player_t]]'' player])</code> +|boolean or nil +|{{todo|Add a description}} |- -|{{anchor|S_GetMusicLoopPoint}}<code>'''S_GetMusicLoopPoint'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_GetMusicLoopPoint}}<code>'''S_GetMusicLoopPoint'''([''[[player_t]]'' player])</code> +|UINT32 or nil +|{{todo|Add a description}} |- -|{{anchor|S_PauseMusic}}<code>'''S_PauseMusic'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_PauseMusic}}<code>'''S_PauseMusic'''([''[[player_t]]'' player])</code> +|boolean or nil +|{{todo|Add a description}} |- -|{{anchor|S_ResumeMusic}}<code>'''S_ResumeMusic'''</code> -| -|{{todo|Everything :3}} +|{{anchor|S_ResumeMusic}}<code>'''S_ResumeMusic'''([''[[player_t]]'' player])</code> +|boolean or nil +|{{todo|Add a description}} |} ==Iterator functions== None of these functions should be called directly, with the exception of <code>mobjs.iterate</code>. They should be used in a for loop, as such: -<source lang="lua">for player in players.iterate +<syntaxhighlight lang="lua">for player in players.iterate -- Handle player here -end</source> +end</syntaxhighlight> Note that the ending parentheses, <code>()</code>, are omitted in the above code – this does not apply to <code>mobjs.iterate</code>, however, for technical reasons. @@ -2236,9 +2557,9 @@ This function is deprecated in Lua 5.1. Use collectgarbage ("count") instead. |{{anchor|ipairs}}<code>'''ipairs'''(''table{}'' t)</code> |function, table, int |This function is to be used in a for loop to iterate through all entries in an array-like table, such as in the code shown below: -<source lang="lua">for k, v in ipairs(t) +<syntaxhighlight lang="lua">for k, v in ipairs(t) --contents -end</source> +end</syntaxhighlight> <code>k</code> and <code>v</code> are the key and value for each entry in table <code>t</code>. The iteration starts from key 1 (not 0) and iterates in numeric order. @@ -2256,9 +2577,9 @@ Technical comment: this function actually returns three values: an iterator func |{{anchor|pairs}}<code>'''pairs'''(''table{}'' t)</code> |function, table, nil |This function is to be used in a for loop to iterate through all entries in a table, such as in the code shown below: -<source lang="lua">for k, v in pairs(t) +<syntaxhighlight lang="lua">for k, v in pairs(t) --contents -end</source> +end</syntaxhighlight> <code>k</code> and <code>v</code> are the key and value for each entry in table <code>t</code>. Unlike <code>ipairs</code>, every entry will be iterated through, in an undefined order. diff --git a/wiki/Global_variables.txt b/wiki/Global_variables.txt index fcfed97a68a14747ca64a684a7a72190a92ef829..0f1e3ad9f8bba6547e43cb6ba2b53d161f97d760 100644 --- a/wiki/Global_variables.txt +++ b/wiki/Global_variables.txt @@ -1,3 +1,5 @@ +{{todo|https://wiki.srb2.org/wiki/User:LJ_Sonik/List_of_outdated_Lua_stuff}} + This is a list of all pre-defined '''global variables''' and tables that are accessible by [[Lua]]. ==Variables== @@ -12,6 +14,11 @@ In the event of a netgame, these variables either cannot be manually changed, or !Accessibility !Description |- +!<code>udmf</code> +|boolean +|{{No|Read-only}} +|Returns true if the map is in [[User:MascaraSnake/UDMF|UDMF]], false if not. +|- !<code>gamemap</code> |number<!--INT16--> |{{No|Read-only}} @@ -80,7 +87,7 @@ In the event of a netgame, these variables either cannot be manually changed, or !<code>marathonmode</code> |number<!--"integer bitflag sequence"--> |{{No|Read-only}} -|The current [[Marathon_Mode|Marathon Mode]] flags. See [[Constants#Marathon_mode|Constants > Marathon Mode flags]]. +|The current [[Marathon_Run|Marathon Mode]] flags. See [[Constants#Marathon_mode|Constants > Marathon Mode flags]]. |- !<code>devparm</code> |boolean @@ -92,6 +99,11 @@ In the event of a netgame, these variables either cannot be manually changed, or |{{No|Read-only}} |Returns true if the game has been modified and the modification does not have a custom gamedata file, false if not. |- +!<code>usedCheats</code> +|boolean +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>menuactive</code> |boolean |{{No|Read-only}} @@ -122,6 +134,26 @@ In the event of a netgame, these variables either cannot be manually changed, or |{{No|Read-only}} |The number of points required before a round can end. |- +!<code>redflag</code> +|<code>[[mobj_t]]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>blueflag</code> +|<code>[[mobj_t]]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>rflagpoint</code> +|<code>[[mapthing_t]]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>bflagpoint</code> +|<code>[[mapthing_t]]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>spstage_start</code> |number<!--INT16--> |{{No|Read-only}} @@ -130,7 +162,7 @@ In the event of a netgame, these variables either cannot be manually changed, or !<code>spmarathon_start</code> |number<!--INT16--> |{{No|Read-only}} -|The map number of the first map of [[Marathon_Mode|Marathon Mode]]. +|The map number of the first map of [[Marathon_Run|Marathon Mode]]. |- !<code>sstage_start</code> |number<!--INT16--> @@ -225,7 +257,7 @@ In the event of a netgame, these variables either cannot be manually changed, or !<code>spacetimetics</code> |number<!--INT16--> |{{No|Read-only}} -|How long the player can survive in a [[Space_Countdown|space countdown]] before suffocating +|How long the player can survive in a [[Space_Countdown|space countdown]] before suffocating. |- !<code>extralifetics</code> |number<!--INT16--> @@ -235,7 +267,7 @@ In the event of a netgame, these variables either cannot be manually changed, or !<code>nightslinktics</code> |number<!--INT16--> |{{No|Read-only}} -|How long it takes for a [[NiGHTS#Link| NiGHTS link]] to fade out. +|How long it takes for a [[NiGHTS#Link|NiGHTS link]] to fade out. |- !<code>gameovertics</code> |number<!--INT16--> @@ -247,6 +279,26 @@ In the event of a netgame, these variables either cannot be manually changed, or |{{No|Read-only}} |How long the ammo removal warning will be displayed when shooting a weapon ring without regular rings in [[Match]] and related gametypes. |- +!<code>use1upSound</code> +|UINT8 +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>maxXtraLife</code> +|UINT8 +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>useContinues</code> +|UINT8 +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>shareEmblems</code> +|UINT8 +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>gametype</code> |number<!--INT16--> |{{No|Read-only}} @@ -305,12 +357,12 @@ In the event of a netgame, these variables either cannot be manually changed, or !<code>SUBVERSION</code> |number |{{No|Read-only}} -|The game's subversion number. For SRB2 v2.2.10, this will return 10. +|The game's subversion number. For SRB2 v2.2.11, this will return 11. |- !<code>VERSIONSTRING</code> |string |{{No|Read-only}} -|The game's version string. For SRB2 v2.2.10, this will return <code>"v2.2.10"</code>. +|The game's version string. For SRB2 v2.2.11, this will return <code>"v2.2.11"</code>. |} ===Client-side=== @@ -414,13 +466,13 @@ This is a list of all global variables that are tables. Most of these serve as g |This table is used to look up or modify attributes for a specific [[Object type]], where <code>''MT_NAME''</code> is an integer that is expected to be the [[List of Object types|<code>MT_*</code>]] constant for the Object type in question. Example usage: -<source lang="lua">mobjinfo[MT_RING_BOX].reactiontime = 20 +<syntaxhighlight lang="lua">mobjinfo[MT_RING_BOX].reactiontime = 20 local playerh = mobjinfo[MT_PLAYER].height -- Example usage with mobj_t variables, using "mobj" as an example: mobj.state = mobjinfo[mobj.type].spawnstate -- mobj.info is a shortcut for mobjinfo[mobj.type], -- i.e., mobj.info.VARIABLE == mobjinfo[mobj.type].VARIABLE --- so this last example could be written more concisely as "mobj.state = mobj.info.spawnstate"</source> +-- so this last example could be written more concisely as "mobj.state = mobj.info.spawnstate"</syntaxhighlight> Whole entries for <code>mobjinfo[]</code> can be recreated from scratch if needed (see [[Lua/Freeslots and Object resources]]). |- !<code>states</code> @@ -430,12 +482,12 @@ Whole entries for <code>mobjinfo[]</code> can be recreated from scratch if neede |This table is used to look up or modify attributes for a specific [[state]], where <code>''S_NAME''</code> is an integer that is expected to be the [[List of states|<code>S_*</code>]] constant for the state in question. Example usage: -<source lang="lua">states[S_SPOS_STND].sprite = SPR_RBUZ +<syntaxhighlight lang="lua">states[S_SPOS_STND].sprite = SPR_RBUZ local standtics = states[S_PLAY_STND].tics -- Example usage with mobj_t variables, using "mobj" as an example: local st = states[mobj.state] st.action(mobj, st.var1, st.var2) --- calls the action for mobj's current state</source> +-- calls the action for mobj's current state</syntaxhighlight> Whole entries for <code>states[]</code> can be recreated from scratch if needed (see [[Lua/Freeslots and Object resources]]). |- !<code>sfxinfo</code><br />(''alt.: <code>S_sfx</code>'') @@ -453,11 +505,11 @@ Whole entries for <code>sfxinfo[]</code> can be recreated from scratch if needed |Converts a [[sprite]] prefix number to a string consisting of the 4-letter sprite name, or vice versa. <code>''SPR_NAME''</code> is an integer that is expected to be the [[List of sprites|<code>SPR_*</code>]] constant for the sprite prefix number in question. Likewise, <code>''"NAME"''</code> must be a four-letter prefix belonging to an existing sprite set. Example usage: -<source lang="lua">print(sprnames[SPR_NULL]) -- prints "NULL" +<syntaxhighlight lang="lua">print(sprnames[SPR_NULL]) -- prints "NULL" print(sprnames["NULL"]) -- prints 0 (the value of SPR_NULL) -- Example usage with mobj_t variables, using "mobj" as an example: print("sprite = SPR_"..sprnames[mobj.sprite]) --- prints out prefix of mobj's sprite</source> +-- prints out prefix of mobj's sprite</syntaxhighlight> |- !<code>spr2names</code> |string<br /><br />number<br /> @@ -478,14 +530,14 @@ print("sprite = SPR_"..sprnames[mobj.sprite]) |This table is used to look up the properties of a [[skin]], where <code>''skinnum''</code> is an integer between 0 and 31. Alternatively, <code>''skinname''</code> is the skin's <code>[[S_SKIN#name|name]]</code> attribute, which can be given instead of the skin number. Example usage: -<source lang="lua">print(skins[0].name) -- prints "sonic" +<syntaxhighlight lang="lua">print(skins[0].name) -- prints "sonic" print(skins["sonic"].name) -- also prints "sonic" S_StartSound(nil, skins[0].soundsid[SKSTHOK]) -- plays sfx_thok -- Example usage with mobj_t variables, using "mobj" as an example: print("my character's name is "..skins[mobj.skin].realname) -- prints out the "real" name for the mobj's skin mobj.color = skins[mobj.skin].prefcolor --- changes mobj's color to skin's prefcolor</source> +-- changes mobj's color to skin's prefcolor</syntaxhighlight> |- !<code>mapthings</code> |<code>[[mapthing_t]]</code> @@ -523,6 +575,12 @@ mobj.color = skins[mobj.skin].prefcolor |<code>#sectors</code><br />→ Number of sectors in map |This table is used to look up the properties of a [[sector]]. |- +!<code>polyobjects</code> +|<code>[[polyobj_t]]</code> +|<code>polyobjects[''i'']</code> +|<code>#polyobjects</code><br />→ Number of polyobjects in map +|This table is used to look up the properties of a [[polyobject]]. +|- !<code>mapheaderinfo</code> |<code>[[mapheader_t]]</code> |<code>mapheaderinfo[''i'']</code> @@ -542,7 +600,7 @@ mobj.color = skins[mobj.skin].prefcolor |This table is used to access the pivots of each of a sprite's frames, where <code>''SPR2_NAME''</code> is an integer expected to be the <code>SPR_*</code> constant for the sprite in question. Likewise, <code>''"NAME"''</code> must be a four-letter prefix belonging to an existing sprite set. Each of the entries of this table contain an array of <code>[[Lua/Userdata_structures#spriteframepivot_t|spriteframepivot_t]]</code> userdata, each index corresponding to a frame of animation the sprite possesses. Example usage: -<source lang="lua"> +<syntaxhighlight lang="lua"> --Editing pivot properties for frame A of SPR_BUS2 spriteinfo[SPR_BUS2] = { pivot = { @@ -555,7 +613,7 @@ spriteinfo[SPR_BUS2].pivot["B"] = {x = 420, y = 69} spriteinfo[SPR_BUS2].pivot["C"] = spriteinfo[SPR_BUS2].pivot["B"] spriteinfo[SPR_BUS2].pivot["D"].x = 128 spriteinfo[SPR_BUS2].pivot["E"].y = 64 -</source> +</syntaxhighlight> |- !<code>spr2defaults</code> |<code>playersprite_t</code> @@ -564,11 +622,11 @@ spriteinfo[SPR_BUS2].pivot["E"].y = 64 |This table is used to look up or set the sprite to fallback to on a specific sprite2, if a character is missing such sprite, where <code>''SPR2_NAME''</code> is an integer that is expected to be the <code>SPR2_*</code> constant for the sprite2 in question. Likewise, "NAME" must be a four-letter prefix belonging to an existing sprite set. Note that only custom sprite2 defaults can be modified. Example usage: -<source lang="lua">-- Okay usage of spr2defaults +<syntaxhighlight lang="lua">-- Okay usage of spr2defaults spr2defaults[SPR2_RAIL] = SPR2_ROLL -- Will cause an error to be shown on attempt to modify spr2defaults[SPR2_WAIT] = SPR2_SKID -</source> +</syntaxhighlight> |- !<code>skincolors</code> |<code>skincolor_t</code> diff --git a/wiki/Hooks.txt b/wiki/Hooks.txt index a8945af37bd6cddf63bec56dd9d4e50e8cb31f69..a7c314141c9262bec78e996ae732358e73526983 100644 --- a/wiki/Hooks.txt +++ b/wiki/Hooks.txt @@ -4,7 +4,7 @@ A [[Lua]] '''hook''' is an event that occurs within SRB2 that Lua functions may A function is bound to a hook by calling the <code>addHook</code> function: -<source lang="lua"> +<syntaxhighlight lang="lua"> --A local function hooked local function my_mobj_thinker_handler() @@ -17,7 +17,7 @@ addHook("MobjThinker", function() --do things end , MT_PLAYER) -</source> +</syntaxhighlight> This function takes three arguments: a string denoting the hook to add this function to, the function being hooked, and a third argument whose type and purpose varies depending on the hook (and which is omitted for some hooks). Some hooks use the return value of the hooked function to determine what should be done next, while other hooks do not use it. As seen in the above example, the hooked function can either be defined as a local function and then passed to <code>addHook</code>, or it can be defined inline during the call to <code>addHook</code>. The latter is useful for short functions that are only used once in the context of this particular <code>addHook</code> call, but if the function is long or needs to be used again elsewhere in the Lua script, the former method is preferred. @@ -406,7 +406,7 @@ Similar to MobjThinker: Executes once per tic for the player as it runs its thin ==== PlayerCanDamage ==== ''Hook format'': <code>addHook("PlayerCanDamage", ''functionname'')</code> -''Function format'': <code>function(<font size="1">player_t</font> ''player'',<font size="1">mobj_t</font> ''mobj'')</code> +''Function format'': <code>function(<font size="1">player_t</font> ''player'', <font size="1">mobj_t</font> ''mobj'')</code> Determines whether the player can damage another object; generally performed when a player and object collide with another. If returning ''true'', the player is forced to attack the object. When returned ''false'', the player is forced to not attack the object. Returning no argument continues the game's usual checks. @@ -433,7 +433,7 @@ Executes once per tic for the local client before their button inputs are sent t ''Function return value'': Fixed-point number (the new player's height) -The function should return a fixed-point number which the player object's height will be set to, If the function returns nil or a negative value, the game will use default checks to determine the player height. +The function should return a fixed-point number which the player object's height will be set to. If the function returns nil or a negative value, the game will use default checks to determine the player height. ==== PlayerCanEnterSpinGaps ==== ''Hook format'': <code>addHook("PlayerCanEnterSpinGaps", ''functionname'')</code> @@ -442,7 +442,7 @@ The function should return a fixed-point number which the player object's height ''Function return value'': Boolean (should the player fit into the gap?) -The function should return a boolean which can forcibly allow or block gap passage, returning <code>true</code> allows players to fit into any gap that is larger than their mobj's height, while returning <code>false</code> will prevent the player from fitting into any gap that is smaller than their skin's height field. +The function should return a boolean which can forcibly allow or block gap passage, returning <code>true</code> allows players to fit into any gap that is smaller than their skin's height field, while returning <code>false</code> will prevent the player from fitting into any gap that is smaller than their skin's height field. ==== ShouldDamage ==== ''Hook format'': <code>addHook("ShouldDamage", ''functionname'', [<font size="1">int</font> ''objecttype''])</code> @@ -514,5 +514,15 @@ Thus, a return statement like <code>return false, mflags, looping, 5000, 0, 3000 Executes when SRB2 evaluates whether a jingle of type <code>JT_OTHER</code> should continue playing. Jingles are evaluated only when <code>[[Lua/Functions#P_RestoreMusic|P_RestoreMusic]]</code> is called. If this function returns false or nil, the jingle will stop; otherwise, it will continue. <font color="red">'''''This hook is only executed locally.'''''</font> +=== Other === +==== HUD ==== +''Hook format'': <code>addHook("HUD", ''functionname'', <font size="1">string</font> ''hudtype'')</code> + +''Function format'': <code>function(''v'', <font size="1">camera_t</font> ''camera'', <font size="1">player_t</font> ''player'')</code> +''Alternative format'': <code>function(''v'', <font size="1">player_t</font> ''player'')</code> + +Functions exactly the same as <code>[[Lua/Functions#hud.add|hud.add]]</code>, adding a new HUD element to the game. The list of valid <code>''hudtype''</code> options is [[Lua/Functions#HUD_hooks|here]]. + + {{Template:Lua}} [[Category:Lua]] diff --git a/wiki/Linedef.txt b/wiki/Linedef.txt index fddaeb08c3a47d40b3870e9e5c90e462dace2845..9ef965391b248aaa56e7c48e78316b9bd3b4e54e 100644 --- a/wiki/Linedef.txt +++ b/wiki/Linedef.txt @@ -1,19 +1,21 @@ [[Image:Linedef.png|thumb|500px|right|A section of [[Greenflower Zone Act 1]] with a linedef highlighted.]] -A '''linedef''' is a [[:Category:Map components|map component]] that connects two [[vertex|vertices]] on a [[map]] in a straight line. Linedefs mark the boundaries between [[sector]]s, and a typical sector is defined by a closed loop of linedefs. No two linedefs may cross, and they all must be shorter than 32768 fracunits in length. +A '''linedef''' is a [[:Category:Map components|map component]] that connects two [[vertex|vertices]] on a [[map]] in a straight line. Linedefs mark the boundaries between [[sector]]s, and a typical sector is surrounded by a closed loop of linedefs. No two linedefs may cross, and they all must be shorter than 32768 fracunits in length. ==Rendering== {{for|details on how textures are rendered|Sidedef}} -Somewhat contrary to intuition, linedefs themselves are not rendered by the game engine. Instead, each linedef is associated with one or two [[sidedef]]s, which set the [[texture]]s displayed on the front and back side of the linedef. Every linedef must have a front sidedef; the sector it faces is called the ''front sector''. Most linedefs also have a back sidedef, which faces the ''back sector''. However, linedefs that form the boundary of the map have a back side that faces into empty space which the player cannot enter, rather than a back sector; these linedefs do not need a back sidedef (except if they use a special effect that requires it) and are thus called ''one-sided linedefs''. These settings are normally automatically set by the [[WAD editors#Map editors|map editor]]. +Each linedef is associated with one or two [[sidedef]]s, which set the [[texture]]s displayed on the front and back side of the linedef. Every linedef must have a front sidedef; the sector it faces is called the ''front sector''. Most linedefs also have a back sidedef, which faces the ''back sector''. However, linedefs that form the boundary of the map have a back side that faces into empty space which the player cannot enter, rather than a back sector; these linedefs do not need a back sidedef (except if they use a special effect that requires it) and are thus called ''one-sided linedefs''. These settings are normally automatically set by the [[WAD editors#Map editors|map editor]]. ==Relationship to sectors== The sectors to which a linedef belongs are not determined by the geometrical structure of the map, but by the sector references of the linedef's sidedefs. This allows sectors to be disjoint. However, it also means that illegal sector configurations such as [[unclosed sector]]s are possible (for example, multiple linedefs facing the same region but with different sector references on the relevant sidedefs), which can lead to crashes. Such circumstances can often arise when deleting linedefs in such a way that the [[WAD editors#Map editors|map editor]] does not correct the sector references automatically. In these cases, the mapper has to correct the references manually. ==Specification== -The linedefs of a map are stored in the <code>LINEDEFS</code> [[lump]] as a list. Each linedef has a 14-byte entry consisting of the following: +In the binary map format, the linedefs of a map are stored in the <code>LINEDEFS</code> [[lump]] as a list. Each linedef has a 14-byte entry consisting of the following: {| class="wikitable" -!Bytes!!Data type!!Description +!Bytes +!Data type +!Description |- |0–1||Signed 16-bit integer||Beginning [[vertex]] |- @@ -34,27 +36,32 @@ The linedefs of a map are stored in the <code>LINEDEFS</code> [[lump]] as a list [[Image:ZBTut-LinedefProperties.png|right|thumb|200px|[[Zone Builder]]'s linedef properties window. Click to enlarge.]] ===Action=== {{for|a list of linedef actions|Linedef types}} -Also known as ''linedef type'', ''linedef special'' or ''linedef effect'', this property is a number that specifies a special effect. Some actions directly affect the linedef itself, while others affect a specified [[target sector]], the [[player]], or other [[Object]]s or events in the game. Many linedef actions depend on additional parameters, which are supplied via the properties of the linedef (e.g., length or flags), its sidedefs (e.g., texture offsets) or its adjacent sectors (e.g., floor or ceiling height). Because of this, linedefs with special actions that do not affect the linedef itself should usually be placed in a [[control sector]] outside of the playable part of the map, so that the properties of the control sector and its linedefs do not interfere with the layout of the map. Linedefs without a special effect have linedef type 0. +Also known as ''linedef type'', ''linedef special'' or ''linedef effect'', this property is a number that specifies a special effect. Some actions directly affect the linedef itself, while others affect a specified [[target sector]], the [[player]], or other [[Object]]s or events in the game. Many linedef actions depend on additional parameters. In [[UDMF]] maps, these are supplied via a set of [[#Action arguments|arguments]]. In binary maps, the parameters are instead supplied via the properties of the linedef (e.g., tag, length or flags), its sidedefs (e.g., texture offsets) or its adjacent sectors (e.g., floor or ceiling height). Because of this, linedefs with special actions that do not affect the linedef itself should usually be placed in a [[control sector]] outside of the playable part of the map, so that the properties of the control sector and its linedefs do not interfere with the layout of the map. Linedefs without a special effect have linedef type 0. ===Tag=== -This property specifies which sector(s) the linedef action will affect. The effect will be applied to all sectors whose [[Tagging|tags]] match this property. Certain effects, such as the [[Linedef type 413|Change Music]] special, do not affect specific sectors; in this case, the tag can be left as 0. Note that if a linedef that needs a tag is tagged with 0, it will affect all sectors with tag 0, which are generally considered "untagged". Certain linedefs can be tagged with [[Reserved tags#Tag 65535|65535]] to affect all sectors in the map. This is useful for certain visual effects that should apply to the whole map. +{{see also|Tagging}} +This is a number chosen by the map designer that identifies the linedef for the purpose of applying special effects to it, such as [[linedef executor]]s. In the binary format, only one tag can be supplied, whereas UDMF supports multiple tags. In the binary map format, linedef specials often use the linedef's tag to specify the tag of the [[sector]], linedef or [[Thing]] that the special effect should be applied to. In UDMF, this is usually done via an [[#Action arguments|argument]] instead. ===Flags=== -Linedef flags are used to give special properties to a linedef or the effect it exhibits. The table below lists the normal significance of the linedef flags. For some linedef specials, the flags have different meanings. In those cases, the effects will be listed in the corrsponding article for the linedef type. Note that in [[Zone Builder]], the names of certain flags change dynamically, depending on the current selected linedef action. For example, when viewing a linedef with the [[Linedef type 254|Bustable Block]] special selected, the flag "[6] ''Not Climbable''" becomes "[6] ''Strong characters only''". +Linedef flags are used to give special properties to a linedef or the effect it exhibits. The table below lists the normal significance of the linedef flags. In binary maps, the flags may also be used as parameters for a linedef action. In this case, they change their meaning depending on the action, and more details are given in the corresponding article for the linedef type. In [[Zone Builder]], the names of the flags change dynamically depending on the currently selected linedef action. For example, when viewing a linedef with the [[Linedef type 254|Bustable Block]] special selected, the flag "[6] ''Not Climbable''" becomes "[6] ''Strong characters only''". In UDMF maps, linedef flags are not used as parameters for linedef actions, so they always have the same meaning regardless of the linedef type. {| class="wikitable" -! Decimal !! Hexadecimal !! Editor name !! [[Constants|Internal name]] !! Description +!Decimal +!Hexadecimal +!Editor name +![[Constants|Internal name]] +!Description |- ! 1 ! <code>0x0001</code> | Impassable -| <code>ML_IMPASSIBLE +| <code>ML_IMPASSIBLE</code> | Makes the linedef impassable for the [[player]] and other [[Object]]s. |- ! 2 ! <code>0x0002</code> | Block Enemies | <code>ML_BLOCKMONSTERS</code> -| Prevents almost all moving [[enemy|enemies]] and [[boss]]es from crossing the linedef. Does not prevent enemies from detecting the player if the linedef is between them. This flag is also often used for other purposes by specific linedef types. +| Prevents almost all moving [[enemy|enemies]] and [[boss]]es from crossing the linedef. Does not prevent enemies from detecting the player if the linedef is between them. |- ! 4 ! <code>0x0004</code> @@ -67,7 +74,7 @@ Linedef flags are used to give special properties to a linedef or the effect it | style="white-space: nowrap;"|Upper Unpegged | <code>ML_DONTPEGTOP</code> | ''(Two-sided linedefs only)'' -If this flag is set, the upper textures are attached to the higher of the two ceilings that border the linedef. Otherwise, they are attached to the lower of the two ceilings. See [[Pegging]]. This flag is also used to make [[Timed linedef executor/Upper Unpegged|timed linedef executors]] and to enable [[Slope#Texture skewing|texture skewing]] on [[FOF]]s. +If this flag is set, the upper textures are attached to the higher of the two ceilings that border the linedef. Otherwise, they are attached to the lower of the two ceilings. See [[Pegging]]. In binary maps, this flag is also used to make [[Timed linedef executor/Upper Unpegged|timed linedef executors]] and to enable [[Slope#Texture skewing|texture skewing]] on [[FOF]]s. |- ! 16 ! <code>0x0010</code> @@ -81,40 +88,40 @@ If this flag is set, the lower textures are attached to the lower of the two flo | Slope Skew | <code>ML_EFFECT1</code> | ''(Two-sided linedefs only)'' -If any of the linedef's upper or lower textures are attached to a [[slope]], setting this flag will cause them to be skewed to match the angle of the slope. See [[Slope#Texture skewing|Slope > Texture skewing]] for further details. This flag is also often used for other purposes by specific linedef types. +If any of the linedef's upper or lower textures are attached to a [[slope]], setting this flag will cause them to be skewed to match the angle of the slope. See [[Slope#Texture skewing|Slope > Texture skewing]] for further details. |- ! 64 ! <code>0x0040</code> | Not Climbable | <code>ML_NOCLIMB</code> -| Prevents climbing characters, e.g., [[Knuckles]], from climbing walls on this linedef. This flag is also often used for other purposes by specific linedef types. +| Prevents climbing characters, e.g., [[Knuckles]], from climbing walls on this linedef. |- ! 128 ! <code>0x0080</code> | No Midtexture Skew | <code>ML_EFFECT2</code> -| If the middle textures are attached to a [[slope]], they will usually be skewed to match the angle of the slope. Setting this flag disables the skewing effect. See [[Slope#Texture skewing|Slope > Texture skewing]] for further details. This flag is also often used for other purposes by specific linedef types. +| If the middle textures are attached to a [[slope]], they will usually be skewed to match the angle of the slope. Setting this flag disables the skewing effect. See [[Slope#Texture skewing|Slope > Texture skewing]] for further details. |- ! 256 ! <code>0x0100</code> | Peg Midtexture | <code>ML_EFFECT3</code> | ''(Two-sided linedefs only)'' -Inverts the [[pegging]] behavior of the middle textures. If the middle textures would be attached to the ceiling otherwise, setting this flag will make them attach to the floor. If they would be attached to the floor otherwise, setting this flag will make them attach to the ceiling. This flag is also often used for other purposes by specific linedef types. +Inverts the [[pegging]] behavior of the middle textures. If the middle textures would be attached to the ceiling otherwise, setting this flag will make them attach to the floor. If they would be attached to the floor otherwise, setting this flag will make them attach to the ceiling. |- ! 512 ! <code>0x0200</code> | Solid Midtexture | <code>ML_EFFECT4</code> | ''(Two-sided linedefs only)'' -Makes the middle textures solid. This flag is also often used for other purposes by specific linedef types. +Makes the middle textures solid. |- ! 1024 ! <code>0x0400</code> | Repeat Midtexture | <code>ML_EFFECT5</code> | ''(Two-sided linedefs only)'' -Tiles the middle textures so that they fill up the empty space between the upper and lower texture, rather than just being rendered once. Additionally, the X offset can be used to control how often the texture is tiled: For each extra copy of the texture, 4096 should be added to the X offset. For example, an offset of 8192 will cause the texture to be rendered three times. This flag is also often used for other purposes by specific linedef types. +Tiles the middle textures so that they fill up the empty space between the upper and lower texture, rather than just being rendered once. In binary maps, the sidedef's X offset can be used to control how often the texture is tiled: For each extra copy of the texture, 4096 should be added to the X offset. For example, an offset of 8192 will cause the texture to be rendered three times. In UDMF maps, the number of repetitions is set via the sidedef's "texture repeats" field. |- ! 2048 ! <code>0x0800</code> @@ -132,13 +139,13 @@ Tiles the middle textures so that they fill up the empty space between the upper ! <code>0x2000</code> | Effect 6 | <code>ML_EFFECT6</code> -| Used for miscellaneous purposes by specific linedef types. +| In binary maps, this flags is used for miscellaneous purposes by specific linedef types. In UDMF maps, it is unused and inaccessible. |- ! 16384 ! <code>0x4000</code> | Bouncy Wall | <code>ML_BOUNCY</code> -| Causes Objects to bounce off walls on this linedef. This flag is also occasionally used for other purposes by specific linedef types. +| Causes Objects to bounce off walls on this linedef. |- ! 32768 ! <code>0x8000</code> @@ -147,5 +154,13 @@ Tiles the middle textures so that they fill up the empty space between the upper | Allows the attributes for each side of an [[FOF]] to be specified individually, rather than using the attributes of the [[control linedef]] for every side. The control sector must have at ''least'' the same number of linedefs as the target sector(s); each linedef of the target sector(s) is then controlled by one linedef of the control sector. Useful for making [[multi-property FOF]]s where each side has its own properties. |} +==UDMF-only sector properties== +{{unfinished}} +===Action arguments=== + +===Alpha and rendering style=== + +===Linedef executor delay=== + {{Template:Map components}} [[Category:Map components]] diff --git a/wiki/List_of_skin_colors.txt b/wiki/List_of_skin_colors.txt index 034acd54a6be3599bb9c107b854ae3adc2d396e7..19b33067bb1daf8bca083b21b9816cdf79dc0ff3 100644 --- a/wiki/List_of_skin_colors.txt +++ b/wiki/List_of_skin_colors.txt @@ -5,7 +5,7 @@ By default, the range of colors that will be changed by skin colors is the green The [[actions]] <code>[[A_ChangeColorAbsolute]]</code> and <code>[[A_ChangeColorRelative]]</code> can be used to change the skin color of an Object for [[SOC]]s; for [[Lua]], <code>''mobj''.color</code> (or <code>''player''.mo.color</code>) is the current skin color value set for an Object. For players, <code>''player''.skincolor</code> is the player's selected "normal" skin color in [[multiplayer]] (or the default color, in [[Single Player]]); the player may change to other colors when they have turned super or have special power-ups such as the [[Fire Flower]] power-up or [[invincibility]] in [[Mario mode]] levels, but this value acts as the fallback skin color to use when they are no longer super or don't have the listed power-ups anymore. ==Normal skin colors== The table below lists the available skin color choices available to players and other objects, listing both the named [[constants]] for use in SOC/Lua (listed in the "Internal name" column) and the name strings for use with the <code>[[Console/Variables#color|color]]</code> console variable, ''[[S_SKIN#prefcolor|prefcolor]]'', or ''[[S_SKIN#prefoppositecolor|prefoppositecolor]]'' in a character's <code>S_SKIN</code> (listed in the "Name" column). The columns "#1" to "#16" denote the range of colors to replace each of the 16 colors from the palette to be swapped in-game. Note that many of the colors overlap several columns, to show that they are shared. - +{{todo|Update to 2.2.12}} {| class="wikitable" style="text-align:center;" ! Value ! [[Constants|Internal name]] @@ -1108,6 +1108,886 @@ The table below lists the available skin color choices available to players and | colspan="2" style="background-color: #9D2F5B; border-color:#9D2F5B; color:white" |206 | style="background-color: #85274D; border-color:#85274D; color:white" |207 |- +! TODO +| <code>SKINCOLOR_MOONSTONE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Moonstone +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ROSEWOOD</code> +| style="background-color: #FFFFFF; border-color:#000000" |Rosewood +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_LATTE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Latte +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_BOULDER</code> +| style="background-color: #FFFFFF; border-color:#000000" |Boulder +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_SEPIA</code> +| style="background-color: #FFFFFF; border-color:#000000" |Sepia +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ECRU</code> +| style="background-color: #FFFFFF; border-color:#000000" |Ecru +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ROSEBUSH</code> +| style="background-color: #FFFFFF; border-color:#000000" |Rosebush +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_EGGPLANT</code> +| style="background-color: #FFFFFF; border-color:#000000" |Eggplant +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_CHERRY</code> +| style="background-color: #FFFFFF; border-color:#000000" |Cherry +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_PEPPER</code> +| style="background-color: #FFFFFF; border-color:#000000" |Pepper +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_GARNET</code> +| style="background-color: #FFFFFF; border-color:#000000" |Garnet +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_FOUNDATION</code> +| style="background-color: #FFFFFF; border-color:#000000" |Foundation +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_TANGERINE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Tangerine +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_TOPAZ</code> +| style="background-color: #FFFFFF; border-color:#000000" |Topaz +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_GOLDENROD</code> +| style="background-color: #FFFFFF; border-color:#000000" |Goldenrod +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_PEAR</code> +| style="background-color: #FFFFFF; border-color:#000000" |Pear +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_LEMON</code> +| style="background-color: #FFFFFF; border-color:#000000" |Lemon +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_HEADLIGHT</code> +| style="background-color: #FFFFFF; border-color:#000000" |Headlight +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_CHARTREUSE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Chartreuse +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_SHAMROCK</code> +| style="background-color: #FFFFFF; border-color:#000000" |Shamrock +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_JADE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Jade +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_MASTER</code> +| style="background-color: #FFFFFF; border-color:#000000" |Master +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ISLAND</code> +| style="background-color: #FFFFFF; border-color:#000000" |Island +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_BOTTLE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Bottle +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_OCEAN</code> +| style="background-color: #FFFFFF; border-color:#000000" |Ocean +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_TURQUOISE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Turquoise +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_AQUAMARINE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Aquamarine +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_MARINE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Marine +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_DREAM</code> +| style="background-color: #FFFFFF; border-color:#000000" |Dream +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_DAYBREAK</code> +| style="background-color: #FFFFFF; border-color:#000000" |Daybreak +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ARCTIC</code> +| style="background-color: #FFFFFF; border-color:#000000" |Arctic +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_MIDNIGHT</code> +| style="background-color: #FFFFFF; border-color:#000000" |Midnight +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_GALAXY</code> +| style="background-color: #FFFFFF; border-color:#000000" |Galaxy +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_MAJESTY</code> +| style="background-color: #FFFFFF; border-color:#000000" |Majesty +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_NOBLE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Noble +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_FUCHSIA</code> +| style="background-color: #FFFFFF; border-color:#000000" |Fuchsia +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_SIBERITE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Siberite +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_ROYAL</code> +| style="background-color: #FFFFFF; border-color:#000000" |Royal +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_MAUVE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Mauve +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_EVENTIDE</code> +| style="background-color: #FFFFFF; border-color:#000000" |Eventide +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_TAFFY</code> +| style="background-color: #FFFFFF; border-color:#000000" |Taffy +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_FANCY</code> +| style="background-color: #FFFFFF; border-color:#000000" |Fancy +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_SANGRIA</code> +| style="background-color: #FFFFFF; border-color:#000000" |Sangria +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- +! TODO +| <code>SKINCOLOR_VOLCANIC</code> +| style="background-color: #FFFFFF; border-color:#000000" |Volcanic +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +| style="background-color: #FFFFFF; border-color:#FFFFFF" | - +|- ! ''69'' ! <code>''MAXSKINCOLORS''</code> <sup>2</sup> @@ -1682,7 +2562,7 @@ In the table below, the columns "#1" to "#16" have the same meaning as with the Certain skin colors of the normal range have a corresponding "opposite" skin color. These are used to modify the [[Level End Sign]]'s background color in particular; depending on the player's current skin color, the End Sign's background will change its color to the corresponding "opposite" skin color if one exists. However, as the End Sign's background is a single shade rather than multiple, the End Sign also has to modify the sprite frame used for the background since a single shared shade does not work in practice across all skin colors – to get around this, it has 16 different frames (C–R) to choose from for the 16 different shades, one of which is determined for each opposite skin color. These frames for the End Sign actually run in increasing order of brightness; C is the darkest shade, and R is the lightest shade. Handling of opposite skin colors and their appropriate shade for the End Sign is done by <code>[[A_SignPlayer]]</code>. Note that the frame number is actually decreased by an amount rather than simply being modified. The table below lists the respective opposite skin colors for each skin color, along with the shade index used and the resulting frame character and palette value used by the End Sign itself. (frame = R - shade index): - +{{todo|Update to 2.2.12}} {| class="wikitable" style="text-align:center;" !Skin color !Opposite color @@ -2097,6 +2977,270 @@ Handling of opposite skin colors and their appropriate shade for the End Sign is |1 |Q | style="background-color: #66F7CB; border-color:#66F7CB" |121 +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MOONSTONE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ROSEWOOD</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_LATTE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_BOULDER</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_SEPIA</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ECRU</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ROSEBUSH</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_EGGPLANT</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_CHERRY</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_PEPPER</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_GARNET</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_FOUNDATION</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_TANGERINE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_TOPAZ</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_GOLDENROD</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_PEAR</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_LEMON</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_HEADLIGHT</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_CHARTREUSE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_SHAMROCK</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_JADE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MASTER</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ISLAND</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_BOTTLE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_OCEAN</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_TURQUOISE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_AQUAMARINE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MARINE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_DREAM</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_DAYBREAK</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ARCTIC</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MIDNIGHT</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_GALAXY</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MAJESTY</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_NOBLE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_FUCHSIA</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_SIBERITE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_ROYAL</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_MAUVE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_EVENTIDE</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_TAFFY</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_FANCY</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_SANGRIA</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO +|- +| style="background-color: #FFFFFF; border-color:#000000" |<tt>SKINCOLOR_VOLCANIC</tt> +| style="background-color: #FFFFFF; border-color:#000000" |<tt>TODO</tt> +|TODO +|TODO +| style="background-color: #FFFFFF; border-color:#FFFFFF" |TODO |} Outside of <code>A_SignPlayer</code>, another way to access these opposite skin colors is through the special Lua function <code>[[Lua/Functions#ColorOpposite|ColorOpposite]]</code>. This function returns both the opposite skin color's number and the shade index value for use with the End Sign. diff --git a/wiki/Palette.txt b/wiki/Palette.txt index 993b19bb5c4ad6062b888df56b1166d6254450f9..af8deb4529ae5eb92488b1183b467564af6ee0f5 100644 --- a/wiki/Palette.txt +++ b/wiki/Palette.txt @@ -59,7 +59,8 @@ The first 32 colormaps correspond with the following sector brightness level ran | {| class="wikitable" |- -!Colormap # !!Brightness +!Colormap # +!Brightness |- !0 | style="background:#FFFFFF;" |248–255 @@ -88,7 +89,8 @@ The first 32 colormaps correspond with the following sector brightness level ran | {| class="wikitable" |- style="vertical-align:bottom;" -!Colormap # !!Brightness +!Colormap # +!Brightness |- !8 | style="background:#BFBFBF;" |184–191 @@ -117,7 +119,8 @@ The first 32 colormaps correspond with the following sector brightness level ran | {| class="wikitable" |- style="vertical-align:bottom;" -!Colormap # !!Brightness +!Colormap # +!Brightness |- !16 | style="background:#7F7F7F; color:white;" |120–127 @@ -146,7 +149,8 @@ The first 32 colormaps correspond with the following sector brightness level ran | {| class="wikitable" |- style="vertical-align:bottom;" -!Colormap # !!Brightness +!Colormap # +!Brightness |- !24 | style="background:#3F3F3F; color:white;" |56–63 diff --git a/wiki/A_CustomPower.txt b/wiki/Powers.txt similarity index 71% rename from wiki/A_CustomPower.txt rename to wiki/Powers.txt index 4f2ff1529b5362de85132b47eb3b541847a2b75d..8c3a6dacef59a9fd4e7c019101c5fdf8fdd2af3b 100644 --- a/wiki/A_CustomPower.txt +++ b/wiki/Powers.txt @@ -1,9 +1,11 @@ -{{wrongtitle|title=A_CustomPower}} -'''A_CustomPower''' is an [[Actions|action]] that gives the target (must be a player) a power-up, and plays <code>SeeSound</code>. The power-up is determined by Var1. Var2 sets the value of the power-up (how much of the power-up the player gets, or the duration). If any of the shield powers are selected using this action, the shield orb for the power given will be automatically spawned if it doesn't already exist on the player. +'''Powers''' are special properties that can be applied to players, modifying their state via giving them a power-up such as a shield or altering how they interact with the environment. -In SRB2, this action is internally used by [[linedef type 434]], using a dummy <code>MT_NULL</code> Object to call <code>A_CustomPower</code> with the player who triggered it set as the target. Flag [6] / ''Not Climbable'' checked on this linedef special will make any timer powers infinite in duration – this is achieved in [[SOC]]s or [[Lua]] scripts using <code>A_CustomPower</code> by setting Var2 to <code>UINT16_MAX</code> (65535), a special value that prevents timer powers from reducing their values. <code>NUMPOWERS</code> can be used to retrieve the number of powers for Lua. +There are three methods to apply powers to the player: +* Setting <code>player.powers[pw_powername] = value</code> in [[Lua]]. As an example, to give the Super Sneakrs for 3 seconds you would set <code>player.powers[pw_sneakers] = 3*TICRATE</code> +* Using [[linedef type 434]] in a map editor +* Call [[A_CustomPower]] in [[SOC]] or [[Lua]] -The custom powers are as follows: +==List of Powers== {| class="wikitable" |- !Value @@ -125,6 +127,10 @@ The custom powers are as follows: ! 28 | <code>pw_ignorelatch</code> | While non-zero, prevents the player from latching to <code>CR_GENERIC</code> objects. Adding 32768 to this value will additionally prevent the player from latching to any object except for NiGHTS carrying objects. This does not prevent new attachments due to [[A_MixUp]] teleportation. +|- +!29 +|<code>pw_strong</code> +|A series of <code>STR_</code> flags that toggle how a player attacks and can destroy FOFs. <sup>'''5'''<sup> |} <sup>'''1'''</sup> The values for the shields are as follows: @@ -299,6 +305,10 @@ In Lua scripts, use <code>(''player''.powers[pw_shield] & SH_NOSTACK)</code> to ! 12 | <code>CR_DUSTDEVIL</code> | Being carried by a [[Dust Devil]]. +|- +! 13 +| <code>CR_FAN</code> +| {{todo|Add a description}} |} <sup>'''3'''</sup> Var2 defines which multiplayer emeralds are given to the player according to the table below. If you wish to award multiple emeralds at once, add the corresponding values. For example, to award all seven Chaos Emeralds, Var2 should be 127. @@ -355,50 +365,126 @@ In Lua scripts, use <code>(''player''.powers[pw_shield] & SH_NOSTACK)</code> to | Launched off a half-pipe this tic. |} -{{Hide text -| Code – A_CustomPower -| <source lang="c">// Function: A_CustomPower -// -// Description: Provides a custom powerup. Target (must be a player) is awarded the powerup. Reactiontime of the object is used as an index to the powers array. -// -// var1 = Power index # -// var2 = Power duration in tics -// -void A_CustomPower(mobj_t *actor) -{ - player_t *player; - INT32 locvar1 = var1; - INT32 locvar2 = var2; - boolean spawnshield = false; - -#ifdef HAVE_BLUA - if (LUA_CallAction("A_CustomPower", actor)) - return; -#endif - if (!actor->target || !actor->target->player) - { - CONS_Debug(DBG_GAMELOGIC, "Powerup has no target.\n"); - return; - } - - if (locvar1 >= NUMPOWERS) - { - CONS_Debug(DBG_GAMELOGIC, "Power #%d out of range!\n", locvar1); - return; - } +<sup>'''5'''</sup> The values for <code>pw_strong</code> are as follows: - player = actor->target->player; - - if (locvar1 == pw_shield && player->powers[pw_shield] != locvar2) - spawnshield = true; - - player->powers[locvar1] = (UINT16)locvar2; - if (actor->info->seesound) - S_StartSound(player->mo, actor->info->seesound); +{| class="wikitable" +!Decimal +!Hexadecimal +!Name +!Description +|- +! 0 +! <code>0x0000</code> +| <code>STR_NONE</code> +| Nothing. All strong powers can stack onto each other. +|- +! 1 +! <code>0x0001</code> +| <code>STR_ANIM</code> +| Remove powers when leaving current animation. +|- +! 2 +! <code>0x0002</code> +| <code>STR_PUNCH</code> +| Frontal attack (knuckles glide). +|- +! 4 +! <code>0x0004</code> +| <code>STR_TAIL</code> +| Rear attack. +|- +! 8 +! <code>0x0008</code> +| <code>STR_STOMP</code> +| Falling onto object (fang bounce). +|- +! 16 +! <code>0x0010</code> +| <code>STR_UPPER</code> +| Moving upwards into object (tails fly). +|- +! 32 +! <code>0x0020</code> +| <code>STR_GUARD</code> +| Protect against damage. +|- +! 64 +! <code>0x0040</code> +| <code>STR_HEAVY</code> +| Prevent vertical rebound when landing on enemies. +|- +! 128 +! <code>0x0080</code> +| <code>STR_DASH</code> +| Special type for machine dashmode, automatically removes your powers when leaving dashmode. +|- +! 256 +! <code>0x0100</code> +| <code>STR_WALL</code> +| Breaks any wall. +|- +! 512 +! <code>0x0200</code> +| <code>STR_FLOOR</code> +| Breaks floors. +|- +! 1024 +! <code>0x0400</code> +| <code>STR_CEILING</code> +| Breaks ceilings. +|- +! 2048 +! <code>0x0800</code> +| <code>STR_SPRING</code> +| Powers up spring objects. +|- +! 4096 +! <code>0x1000</code> +| <code>STR_SPIKE</code> +| Break spikes. +|- +! 30 +! <code>0x001E</code> +| <code>STR_ATTACK</code> +| |Generic attack. Equal to <code>STR_PUNCH|STR_TAIL|STR_STOMP|STR_UPPER</code>. +|- +! 1792 +! <code>0x0700</code> +| <code>STR_BUST</code> +| |Equal to <code>STR_WALL|STR_FLOOR|STR_CEILING</code>. +|- +! 17 +! <code>0x0011</code> +| <code>STR_FLY</code> +| |Used by <code>CA_FLY</code>. Equal to <code>STR_ANIM|STR_UPPER</code>. +|- +!3 +! <code>0x0003</code> +| <code>STR_GLIDE</code> +| |Used by <code>CA_GLIDEANDCLIMB</code>. Equal to <code>STR_ANIM|STR_PUNCH</code>. +|- +! 7985 +! <code>0x1F31</code> +| <code>STR_TWINSPIN</code> +| |Used by <code>CA_TWINSPIN</code>. Equal to <code>STR_ANIM|STR_ATTACK|STR_BUST|STR_SPRING|STR_SPIKE</code>. +|- +! 2143 +! <code>0x085F</code> +| <code>STR_MELEE</code> +| |Used by <code>CA2_MELEE</code>. Equal to <code>STR_ANIM|STR_PUNCH|STR_HEAVY|STR_WALL|STR_FLOOR|STR_SPRING|STR_SPIKE</code>. +|- +! 521 +! <code>0x0209</code> +| <code>STR_BOUNCE</code> +| |Used by <code>CA_BOUNCE</code>. Equal to <code>STR_ANIM|STR_STOMP|STR_FLOOR</code>. +|- +! 4224 +! <code>0x1080</code> +| <code>STR_METAL</code> +| |Used by <code>SF_MACHINE</code> dashmode. Equal to <code>STR_DASH|STR_SPIKE</code>. +|} - if (spawnshield) //workaround for a bug - P_SpawnShieldOrb(player); -}</source>}} -{{Actions - Powers and monitors}} -[[Category:Actions|CustomPower]] -[[Category:Actions - Powers and monitors|CustomPower]] +[[Category:Editing lists]] +[[Category:SRB2 documentation]] +[[Category:SOC]] +[[Category:Lua]] diff --git a/wiki/S_SKIN.txt b/wiki/S_SKIN.txt index 7c5bf78eb7a0552320a3ab3b34c2487ac4c5c79a..4e139c3e3140283258e8f2df7a435288656247d9 100644 --- a/wiki/S_SKIN.txt +++ b/wiki/S_SKIN.txt @@ -1,5 +1,5 @@ {{wrongtitle|title=S_SKIN}} -<code>'''S_SKIN'''</code> is a special text [[lump]] that is used to define a playable character [[skin]] for SRB2. It determines the name of the skin and various attributes for the character itself, e.g., abilities, movement speeds and items spawned. The lump itself also acts as a starting marker for the character's sprites, which must immediately follow it within a [[WAD]] or [[PK3]] file. +<code>'''S_SKIN'''</code> is a special text [[lump]] that is used to define a playable [[Characters|character]] [[skin]] for SRB2. It determines the name of the skin and various attributes for the character itself, e.g., abilities, movement speeds and items spawned. The lump itself also acts as a starting marker for the character's sprites, which must immediately follow it within a [[WAD]] or [[PK3]] file. The name of this lump is partially flexible – the game will only check if the lump's name starts with "S_SKIN" in order for it to be recognised as the definition of a new skin. Anything can be used after these first six characters, e.g., <code>S_SKIN1</code>, <code>S_SKIN2</code>, and <code>S_SKINAB</code> are all acceptable alternatives to <code>S_SKIN</code> as the lump name. @@ -33,7 +33,7 @@ The unique name of the skin, for identification purposes internally. It is used ===flags=== :''Default: 0'' -Determines the '''skin flags''' given to the skin – these are a series of toggles that determine whether certain traits available for a character are applied. These are listed in the table below. Alternatively, flags can be given individually using their parameters. For example, <code>super = true</code> is an alternative way of giving a character the <code>SF_SUPER</code> flag. (Note that the flags <code>SF_NOSUPERSPRITES</code> and <code>SF_NOSUPERJUMPBOOST</code> do not currently have alternative parameters, so they can only be set using the <code>flags</code> parameter.) +Determines the '''skin flags''' given to the skin – these are a series of toggles that determine whether certain traits available for a character are applied. These are listed in the table below. Alternatively, flags can be given individually using their parameters. For example, <code>super = true</code> is an alternative way of giving a character the <code>SF_SUPER</code> flag. {| class="wikitable" !Decimal @@ -315,7 +315,7 @@ The character's secondary special ability. Only one of these may be selected; th ! 1 |<code>CA2_SPINDASH</code> |Spindash -|The default secondary ability, which is used by Sonic, Tails, Knuckles, and Metal Sonic. The player can use the ''Spin'' [[controls|control]] to charge a spindash, or otherwise spin on the ground while moving. The player will also jump with the spinning animation ([[Custom character tutorial/Sprites#Frame list|sprite prefix ROLL]]). +|The default secondary ability, which is used by Sonic, Tails, Knuckles, and Metal Sonic. The player can use the ''Spin'' [[controls|control]] to charge a spindash, or otherwise spin on the ground while moving. |- ! 2 |<code>CA2_GUNSLINGER</code> @@ -395,7 +395,7 @@ Specifies the range of colors in the palette on the character's sprites that can ===prefcolor=== :''Default: Green'' -Specifies the default [[List of skin colors|skin color]] for the character. Only the color names listed below can be used; numbers are not accepted. This is required for [[Single Player]], where the character's color cannot be changed by the player. The possible values are as follows: +Specifies the default [[List of skin colors|skin color]] for the character. Only the color names listed below can be used '''unless you are defining a prefcolor for a custom character'''; numbers are not accepted. This is required for [[Single Player]], where the character's color cannot be changed by the player. The possible values are as follows: {| class="wikitable" style="text-align:center;" | style="background-color: #FFFFFF; border-color:#000000" |White @@ -477,7 +477,7 @@ Specifies the default [[List of skin colors|skin color]] for the character. Only ===supercolor=== :''Default: Gold'' -Specifies the default [[List of skin colors|skincolor]] for the character's Super form. Only the color names listed below can be used; numbers are not accepted. The possible values are as follows: +Specifies the default [[List of skin colors|skincolor]] for the character's Super form. Only the color names listed below can be used '''unless you are defining a supercolor for a custom character'''; numbers are not accepted. The possible values are as follows: {| class="wikitable" style="text-align:center;" | style="background-color: #EDEDED; border-color:#000000" |Silver @@ -495,7 +495,7 @@ Specifies the default [[List of skin colors|skincolor]] for the character's Supe ===prefoppositecolor=== :''Default: N/A'' -This specifies the [[List of skin colors|skincolor]] for the character's signpost background, when you're using their prefcolor. Omitting this option, or using another color in multiplayer, will use the pre-defined opposite color for their skincolor. Only the color names listed below can be used; numbers are not accepted. The possible values are as follows: +This specifies the [[List of skin colors|skincolor]] for the character's signpost background, when you're using their prefcolor. Omitting this option, or using another color in multiplayer, will use the pre-defined opposite color for their skincolor. Only the color names listed below can be used '''unless you are defining a prefoppositecolor for a custom character'''; numbers are not accepted. The possible values are as follows: {| class="wikitable" style="text-align:center;" | style="background-color: #FFFFFF; border-color:#000000" |White @@ -755,9 +755,9 @@ By giving your lump the <code>P_SKIN</code> name instead, you can edit an existi ''Example:'' <pre> -name = fang -realname = Nack -hudname = NACK +name = tails +realname = Miles +hudname = MILES </pre> ==Related links== diff --git a/wiki/Thing.txt b/wiki/Thing.txt index c02c8d6d761413960e21e77817cb76aa1aa09370..e79d07f4e704dbf7addf58d9b5b11c5655960a9e 100644 --- a/wiki/Thing.txt +++ b/wiki/Thing.txt @@ -6,10 +6,12 @@ A '''Thing''' is a [[:Category:Map components|map component]] that is used to sp Things are closely related to [[Object]]s, but they are not the same. Most Thing types correspond directly to an Object type. For example, a Thing of the type "[[Crawla]]" will spawn an Object of the type "Crawla". However, some types of Objects cannot be placed directly on a map via a Thing, such as missiles or shields. Similarly, some Thing types are not directly linked to an Object type. For example, special placement patterns such as the [[Circle of Rings]] spawn a group of Objects in a predetermined arrangement rather than just a single Object. ==Specification== -The Things of a map are stored in the <code>THINGS</code> [[lump]] as a list. Each Thing has a 10-byte entry consisting of the following: +In the binary map format, the Things of a map are stored in the <code>THINGS</code> [[lump]] as a list. Each Thing has a 10-byte entry consisting of the following: {| class="wikitable" -!Bytes!!Data type!!Description +!Bytes +!Data type +!Description |- |0–1||Signed 16-bit integer||[[#X/Y position|X position]] |- @@ -26,7 +28,7 @@ The Things of a map are stored in the <code>THINGS</code> [[lump]] as a list. Ea ===Thing type=== {{for|a list of Thing types|Thing types}} [[Image:ZB_Thing_Properties_Dialog.png|right|thumb|200px|[[Zone Builder]]'s Thing properties window. Click to enlarge.]] -This determines the Thing's type, ranging from 0 to 4095. In map editors such as [[Zone Builder]], [[SRB2 Doom Builder]] and [[SRB2 Workbench]], the Thing types are separated into different categories by a drop-down list, which makes the [[Zone Builder tutorial/Thing placement|Thing placement process]] easier. +This determines the Thing's type. In the binary map format, it can range from 0 to 4095, whereas [[UDMF]] allows Thing type numbers up to 65535. In map editors such as [[Zone Builder]], [[SRB2 Doom Builder]] and [[SRB2 Workbench]], the Thing types are separated into different categories by a drop-down list, which makes the [[Zone Builder tutorial/Thing placement|Thing placement process]] easier. In Zone Builder and SRB2 Doom Builder, additional properties for a Thing type will be displayed when selected in the Thing properties window. These are determined by the configuration file loaded for the editor. @@ -34,28 +36,33 @@ In Zone Builder and SRB2 Doom Builder, additional properties for a Thing type wi These are the absolute X and Y map coordinates the Thing is located at, measured in fracunits. These can be any value from -32768 to 32767. These properties are normally set when a Thing is first placed in the map or dragged around after being placed; however, in [[Zone Builder]] and [[SRB2 Workbench]], they can also be changed manually through the Thing properties window. ===Z position=== -For most Thing types, this property is the Z-offset that determines how far up from the floor – or how far down from the ceiling – the Thing is placed, measured in fracunits. For most Thing types, the Z-offset is measured from the floor up by default, but for Thing types that hang from the ceiling by default, such as the [[Chain]], it is measured from the ceiling down. If the Thing's ''Flip'' flag is checked, this behavior is inverted – if the offset is usually measured from the floor up, it is now measured from the ceiling down, and vice versa. The Z position can be any value from 0 to 4095. Thing types that do not use this property directly for determining the Thing's Z-offset (or at all) include the [[Axis]], [[Axis Transfer]], [[Axis Transfer Line]], and the non-customizable [[Hoop]]. +For most Thing types, this property is the Z-offset that determines how far up from the floor – or how far down from the ceiling – the Thing is placed, measured in fracunits. For most Thing types, the Z-offset is measured from the floor up by default, but for Thing types that hang from the ceiling by default, such as the [[Chain]], it is measured from the ceiling down. If the Thing's ''Flip'' flag is checked, this behavior is inverted – if the offset is usually measured from the floor up, it is now measured from the ceiling down, and vice versa. In the binary map format, the Z position can range from 0 to 4095; UDMF allows Z positions between -32768 and 32767. Thing types that do not use this property directly for determining the Thing's Z-offset (or at all) include the [[Axis]], [[Axis Transfer]], [[Axis Transfer Line]], and the non-customizable [[Hoop]]. Map editors such as [[Zone Builder]], [[SRB2 Doom Builder]] and [[SRB2 Workbench]] also provide an ''Absolute'' option – when the box for this is checked, the Thing's absolute Z position from 0 is determined instead. The map editor will then calculate the required relative Z position automatically, which will be displayed when the Thing properties window is next opened. -Because ''Doom'' did not originally support Z-offsets for Things, there is no dedicated Z position field in the map format. SRB2 works around this by assigning the upper 12 bits of the 16-bit Flags value to the Z position. As a result, only 4 bits are left for the actual flags, so SRB2 only allows for 4 Thing flags. Map editors that are not specifically adapted for SRB2 will not display a field for the Z position. In these editors, the Z position must be set via the Flags value instead; [[#Flags|see below]] for details. +Because ''Doom'' did not originally support Z-offsets for Things, there is no dedicated Z position field in the binary map format. SRB2 works around this by assigning the upper 12 bits of the 16-bit Flags value to the Z position. As a result, only 4 bits are left for the actual flags, so SRB2 only allows for 4 Thing flags in the binary format. Map editors that are not specifically adapted for SRB2 will not display a field for the Z position. In these editors, the Z position must be set via the Flags value instead; [[#Flags|see below]] for details. ===Angle=== -For most Thing types, this property controls the direction the Thing is facing. This is measured relative to the east in a counterclockwise fashion, so 0º is north, 90º is east, 180º is south, and 270º is west. Some Thing types (e.g., the [[Star Post]]) use this property for additional effects; in these cases it can have any value and might even exceed 360º. Any value within a range of -32768 to 32767 can be used here. +This property controls the direction the Thing is facing. This is measured relative to the east in a counterclockwise fashion, so 0º is north, 90º is east, 180º is south, and 270º is west. In the binary format, some Thing types (e.g., the [[Star Post]]) use this property for additional effects; in these cases it can have any value and might even exceed 360º. Any value within a range of -32768 to 32767 can be used here. ===Parameter=== -This is a special value ranging from 0 to 15 that can determine extra properties for a Thing. Notable Thing types that use this property include various [[Thing types#NiGHTS|NiGHTS items]] as well as the [[Fan Particle Generator]] and [[Flame Jet]]s. +This is a special value ranging from 0 to 15 that can determine extra properties for a Thing. Notable Thing types that use this property include various [[Thing types#NiGHTS|NiGHTS items]] as well as the [[Fan Particle Generator]] and [[Flame Jet]]s. It is only available in binary maps; UDMF maps have access to the more flexible [[#Arguments|arguments]] instead. -The Parameter value is not part of ''Doom''<nowiki>'</nowiki>s original map format and was added specifically for SRB2. Internally, it is stored in the upper 4 bits of the Thing's Type value. As a result, the actual Thing type is restricted to 12 bits in SRB2 and may therefore only range from 0 and 4095 – unlike ''Doom'' where it could range from 0 to 65535. Because the Parameter value is SRB2-specific, only map editors that are adapted specifically for SRB2, such as [[Zone Builder]] and [[SRB2 Workbench]], provide a field for it. In other map editors, such as the original [[Doom Builder]] and [[SRB2 Doom Builder]], it must be set via the Type field – the Parameter value must be multiplied by 4096 and then added to the Thing type number, e.g. ,the [[Crawla (Blue)|Blue Crawla]] (Thing type 100) with a parameter value of 2 would have a Thing type number of 100 + 2×4096, or 8292. +The Parameter value is not part of ''Doom''<nowiki>'</nowiki>s original map format and was added specifically for SRB2. In the binary map format, it is stored in the upper 4 bits of the Thing's Type value. As a result, the actual Thing type is restricted to 12 bits in binary maps and may therefore only range from 0 and 4095 – unlike in ''Doom'' and in UDMF, where it can range from 0 to 65535. Because the Parameter value is SRB2-specific, only map editors that are adapted specifically for SRB2, such as [[Zone Builder]] and [[SRB2 Workbench]], provide a field for it. In other map editors, such as the original [[Doom Builder]] and [[SRB2 Doom Builder]], it must be set via the Type field – the Parameter value must be multiplied by 4096 and then added to the Thing type number, e.g. ,the [[Crawla (Blue)|Blue Crawla]] (Thing type 100) with a parameter value of 2 would have a Thing type number of 100 + 2×4096, or 8292. ===Flags=== -These are a series of toggles that may be applied to a Thing to change how the Object spawned behaves in-game – outside the context of level editing, these are referred to as '''Thing flags''' to differentiate them from [[Object flags]]. Some Thing types (e.g., the [[NiGHTS Bumper]]) do not consider the flags individually and instead require combinations of these flags for certain effects; in these cases, the individual effects of these flags may or may not apply. +These are a series of toggles that may be applied to a Thing to change how the spawned Object behaves in-game. Note that the Thing flags are not the same as the [[Object flags]], which determine an Object's properties in-game and cannot be set in the map editor. -In map editors such as Zone Builder, SRB2 Doom Builder and SRB2 Workbench, the flags are displayed as a list of checkboxes that can be checked. The mathematical total of the corresponding values for the selected flags is given in the ''Flags value'' box below the flags list. Note that this value also contains the Thing's [[#Z position|Z position]], multiplied by 16 – the resulting ''Flags value'' is calculated as: ''Thing flags'' + ''Z position''×16. This is because SRB2 uses the upper 12 bits of the Flags field to store the Z position. +In UDMF, only the ''Flip'' flag is available. The other flags are exclusive to the binary map format. They do not have any general effect – rather, their effect differs depending on the Thing type. UDMF has no need for these flags since it uses the [[#Arguments|arguments]] for type-specific settings instead. + +In map editors such as Zone Builder, SRB2 Doom Builder and SRB2 Workbench, the flags are displayed as a list of checkboxes that can be checked. The mathematical total of the corresponding values for the selected flags is given in the ''Flags value'' box below the flags list. Note that this value also contains the Thing's [[#Z position|Z position]], multiplied by 16 – the resulting ''Flags value'' is calculated as: ''Thing flags'' + ''Z position''×16. This is because SRB2 uses the upper 12 bits of the Flags field to store the Z position. Some Thing types (e.g., the [[NiGHTS Bumper]]) use the flags value directly as a parameter; in these cases, the flags and the Z position do not have their usual effects. The flags and their purposes are given below: {| class="wikitable" -! Value !! Editor name !! [[Constants|Internal name]] !! Description +!Value +!Editor name +![[Constants|Internal name]] +!Description |- ! 1 | Extra @@ -82,18 +89,187 @@ In most cases, this flag will also give the corresponding [[Object]](s) the [[Ob | <code>MTF_AMBUSH</code> | This is a special flag that has no general effect but is rather used by certain Thing types for turning on extra features or alternative behavior. -In most cases, this flag will also give the corresponding [[Object]](s) the [[Object flags#Primary Object flags|Object flag]] <code>MF2_AMBUSH</code> when checked. Exceptions to this include the following Thing types: +In binary maps, this flag will also give the corresponding [[Object]](s) the [[Object flags#Primary Object flags|Object flag]] <code>MF2_AMBUSH</code> when checked. Exceptions to this include the following Thing types: * [[Axis]], [[Axis Transfer]] and [[Axis Transfer Line]] * [[NiGHTS Bumper]] * [[Star Post]] * All [[monitor]]s that cannot turn into [[WRM]]s. * [[Pushable]] Objects if <code>MTF_OBJECTSPECIAL</code> is also set. +|- +! 16 +| Absolute Z height +| <code>MTF_ABSOLUTEZ</code> +|{{todo|Add a description}} |} -A flag named ''(Used for Z offsets)'' may also be displayed in some map editors below the flags listed above – this flag is reserved for calculating the Thing's Z-offset and should never be checked manually. +Some older map editors may display a flag named ''(Used for Z offsets)'' below the flags listed above – this flag is reserved for calculating the Thing's Z-offset and should never be checked manually. In some editors, the names of certain flags may change depending on the current Thing type. For example, the ''Ambush'' flag is renamed to ''Float'' for [[ring]]s because it makes them hover 24 fracunits above the ground. For most [[Thing types#Monitors|power-up monitors]], it is renamed to ''Random (Weak)'' because it makes them respawn randomly in a [[WRM]] fashion in multiplayer. Zone Builder supports renaming for all flags, SRB2 Workbench for the ''Special'' flag and the ''Ambush'' flag, and SRB2 Doom Builder only for the ''Ambush'' flag. +==Editor metadata== +In Zone Builder (for binary maps) and Ultimate Zone Builder (for UDMF maps) it is possible to set custom names and sprites, rename flags and label various other Thing properties through special comments to modify how they appear in the editor. They '''must''' be listed as comments within the definition of the corresponding Object, be that in SOC (<code>#</code>) or Lua (<code>--</code> or <code>//</code>). + +===Zone Builder=== +Zone Builder's parser supports the following properties for both SOC and Lua Object definitions. + +{| class="wikitable" +!Property +!Description +|- +! <code>$Name</code> +| The name of the Thing inside the editor, e.g. <code>$Name Steam Jet</code>. +|- +! <code>$Sprite</code> +| The name of the sprite lump the Thing should use in the editor, e.g. <code>$Sprite STEMD0</code>. Note that the desired sprite lump must also be included in the resources for this to work. +|- +! <code>$Category</code> +| The category this Thing can be found in, e.g. <code>$Category Techno Hill</code>. +|- +! <code>$Flags1Text</code> +| The label for the Extra flag, e.g. <code>$Flags1Text Disable collision</code>. +|- +! <code>$Flags4Text</code> +| The label for the Special flag, e.g. <code>$Flags4Text Continuous</code>. +|- +! <code>$Flags8Text</code> +| The label for the Ambush flag, e.g. <code>$Flags8Text Mute sounds</code>. +|- +! <code>$AngleText</code> +| The label for the Angle value, e.g. <code>$AngleText Radius</code>. +|- +! <code>$ParameterText</code> +| The label for the Parameter, e.g. <code>$ParameterText Order</code>. +|- +! <code>$FlagsValueText</code> +| The label for the "Flags value" textbox. +|- +! <code>$Arrow</code> +| Enables the arrow pointing to the direction of the thing's angle. +|- +! <code>$NoArrow</code> +| Disables the arrow pointing to the direction of the thing's angle. +|} + +===Ultimate Zone Builder=== +Ultimate Zone Builder's parser currently only supports the following properties for Lua Object definitions. + +{| class="wikitable" +!Property +!Description +|- +! <code>$Title</code> +| The name of the Thing inside the editor, e.g. <code>$Title Steam Jet</code>. +|- +! <code>$Sprite</code> +| The name of the sprite lump the Thing should use in the editor, e.g. <code>$Sprite STEMD0</code>. Note that the desired sprite lump must also be included in the resources for this to work. +|- +! <code>$Category</code> +| The category this Thing can be found in, e.g. <code>$Category Techno Hill</code>. You can have subcategories by using a backslash: "Enemies/Arid Canyon" will put the actor within the "Arid Canyon" subgroup of the "Enemies" group. +|- +! <code>$Arg''N''</code> +| Allows the label for an argument to be overridden. ''N'' is the argument number, ranging from 0 to 9: e.g. <code>$Arg0</code>. The following <code>$Arg''N''</code> properties can only be used if this is present. +|- +! <code>$Arg''N''Default</code> +| Allows to set the default value for this argument. +|- +! <code>$Arg''N''RenderStyle</code> +| Allows a visual representation of this argument, drawing the specified shape using the argument's value as a radius. Supports <code>Circle</code> and <code>Rectangle</code>. +|- +! <code>$Arg''N''RenderColor</code> +| Allows to specify a custom color for <code>$ArgNRenderStyle</code>. The color should be specified as an RRGGBB hexadecimal value. +|- +! <code>$Arg''N''ToolTip</code> +| Allows a custom tooltip to be displayed when hovering the argument label. The newline character <code>\n</code> can be used to format the text. +|- +! <code>$Arg''N''Type</code> +| Restricts the argument to a specific type. See the available types in the [[Thing#Argument types|Argument types]] below. +|- +! <code>$WallSprite</code> +| This thing will be displayed as a papersprite in Visual Mode. Must be followed by <code>true</code> to work. +|- +! <code>$FlatSprite</code> +| This thing will be displayed as a splat in Visual Mode. Must be followed by <code>true</code> to work. +|- +! <code>$SpawnCeiling</code> +| This thing will be displayed at a height relative to the ceiling instead of the floor in Visual Mode. Must be followed by <code>true</code> to work. +|- +! <code>$Angled</code> +| Enables the arrow pointing to the direction of the thing's angle. +|- +! <code>$NotAngled</code> +| Disables the arrow pointing to the direction of the thing's angle. +|- +! <code>$Color</code> +| Allows overriding the category color for this Thing. Possible values range from 0 to 19: see the [[Thing#Color table|Color table]] below. +|- +! <code>$IgnoreRenderStyle</code> +| The Thing's <code>renderstyle</code> setting will be ignored by the editor. This may be useful for viewing invisible Things in Visual Mode. +|- +! <code>$ClearArgs</code> +| Clears any arguments inherited by the game configuration. +|- +! <code>$Obsolete</code> +| Marks this Thing type as obsolete. The Thing will be detected by "Check obsolete things" Map Analysis Mode and will display as such in the Thing Properties window, as well as the Thing Info panel. +|- +! <code>$GZDB_SKIP</code> +| Halts the parser from reading the current script any further. This can be used to skip SOC or Lua scripts that do not contain any Thing definitions. + +|} + +====Argument types==== +* 0 = Integer (default) +* 4 = Action special +* 5 = Sector effect +* 8 = Angle in degrees +* 10 = XXRRGGBB color +* 11 = Enum option +* 12 = Enum bits +* 13 = Sector tag +* 14 = Thing tag +* 15 = Linedef tag +* 22 = Byte angle +* 23 = Thing Radius +* 24 = Thing Height + +====Color table==== +{| class="wikitable" +!colspan="2"|Index +!Config Name +!System Name +! +!colspan="2"|Index +!Config Name +!System Name +! +!colspan="2"|Index +!Config Name +!System Name +! +!colspan="2"|Index +!Config Name +!System Name +|- +|0||{{color|#696969}}||Dark Gray||DimGray|| ||5||{{color|#9400D3}}||Magenta||DarkViolet|| ||10||{{color|#32CD32}}||Light Green||LimeGreen|| ||15||{{color|#F5F5F5}}||White||WhiteSmoke +|- +|1||{{color|#4169E1}}||Blue||RoyalBlue|| ||6||{{color|#B8860B}}||Brown||DarkGoldenrod|| ||11||{{color|#AFEEEE}}||Light Cyan||PaleTurquoise|| ||16||{{color|#FFB6C1}}||Pink||LightPink +|- +|2||{{color|#228B22}}||Green||ForestGreen|| ||7||{{color|#C0C0C0}}||Gray||Silver|| ||12||{{color|#FF6347}}||Light Red||Tomato|| ||17||{{color|#FF8C00}}||Light Orange||DarkOrange +|- +|3||{{color|#20B2AA}}||Cyan||LightSeaGreen|| ||8||{{color|#808080}}||Light Gray||Gray|| ||13||{{color|#EE82EE}}||Light Magenta||Violet|| ||18||{{color|#BDB76B}}||Light Brown (default)||DarkKhaki +|- +|4||{{color|#B22222}}||Red||Firebrick|| ||9||{{color|#00BFFF}}||Light Blue||DeepSkyBlue|| ||14||{{color|#FFFF00}}||Yellow||Yellow|| ||19||{{color|#DAA520}}||Orange||Goldenrod +|} + +==UDMF-only Thing properties== +{{unfinished}} +===Tags=== + +===Pitch and roll=== + +===Scale=== + +===Arguments=== + ==See also== * [[Zone Builder tutorial/Thing placement]] * [[SRB2 Doom Builder tutorial/Thing placement]] diff --git a/wiki/Userdata_structures.txt b/wiki/Userdata_structures.txt index 52fe71a8a9be63cdf2dc376c854c7d57b661f663..7f4ba8b4a9466a35417399f9217046b61833a353 100644 --- a/wiki/Userdata_structures.txt +++ b/wiki/Userdata_structures.txt @@ -1,4 +1,4 @@ -{{todo|Document new variables - notably many NiGHTS variables in <code>player_t</code> are missing.}} +{{todo|https://wiki.srb2.org/wiki/User:LJ_Sonik/List_of_outdated_Lua_stuff}} {{todo|Document taglist_t and other UDMF-related things. Also do not forget <code>sectors.tagged()</code> etc. Helpful link: [https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1292].}} This article lists all the '''userdata''' types available for [[Lua]] in SRB2, as well as the variables they contain. ==Notes== @@ -99,12 +99,25 @@ This userdata type represents an [[Object]]. In the examples below, <code>''mobj |{{Yes|Read+Write}} |The absolute angle the Object is facing horizontally. 0 is East, <code>ANGLE_90</code> is North, <code>ANGLE_180</code> is West, and <code>ANGLE_270</code> is South. |- -!<code>rollangle</code> +!<code>pitch</code> +|<code>angle_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>roll</code> +|<code>angle_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>spriteroll</code> +(<code>rollangle</code>) |<code>angle_t</code> |{{Yes|Read+Write}} |The roll angle of the Object's sprite, that is, the rotation of the sprite on-screen relative to the center of the sprite, if SpriteInfo is not set. Positive angles roll the sprite in a counterclockwise manner. + +Note that <code>''mobj''.spriteroll</code> and <code>''mobj''.rollangle</code> are the same variable – they both do the same thing, and changing one will also change the other. |- !<code>sprite</code> |enum ([[List of sprites|<code>SPR_*</code>]]) @@ -263,6 +276,18 @@ Note that changing the value of <code>''mobj''.state</code> directly in Lua will |{{Yes|Read+Write}} |Whether this Object will use the rainbow colormap, tinting the sprite using the color set in <code>color</code>. |- +!<code>drawonlyforplayer</code> +|<code>[[#player_t|player_t]]</code> +|{{Yes|Read+Write}} +|When set to a player, this Object is only visible for that player and anyone spectating that player. +|- +!<code>dontdrawforviewmobj</code> +|<code>[[#mobj_t|mobj_t]]</code> +|{{Yes|Read+Write}} +|When set to an Object, <code>''mobj''</code> will be hidden if <code>''mobj''.dontdrawforviewmobj</code> is the current camera. + +For example, if <code>''mobj''.dontdrawforviewmobj</code> is set to a player Object, then <code>''mobj''</code> will be hidden for that player if the player is in first-person.<br/>If a player's <code>awayviewmobj</code> is in use and is set to the same Object as <code>''mobj''.dontdrawforviewmobj</code>, then <code>''mobj''</code> is hidden for that player. +|- !<code>bnext</code> |<code>[[#mobj_t|mobj_t]]</code> |{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} @@ -433,6 +458,11 @@ The default <code>''mobj''.friction</code> value for most Objects is 59392 (hexa |<code>fixed_t</code> |{{Yes|Read+Write}} |This controls whether the Object casts a shadow, and how large the shadow is relative to the Object's radius. +|- +!<code>dispoffset</code> +|<code>INT32</code> +|{{Yes|Read+Write}} +|Used to resolve ordering conflicts when drawing sprites that are in the same position in Software rendering. Sprites with a higher display offset are always drawn in front of sprites with a lower display offset. For instance, the shield orbs all have this set to 1, which means they are always displayed in front of the player when both are in the exact same position. Any integer value can be used here, including negative values; SRB2's Objects only use values up to 2, so anything above that will make the Object take precedence over all of SRB2's default Objects. For most Objects, this can be set to 0. |} ===player_t=== @@ -533,7 +563,7 @@ In both cases, ''(bobbing displacement)'' is a displacement value calculated usi |{{Yes|Read+Write}} |The current range of the player's "bobbing" displacement used by the first-person camera, relative to the base viewing height. The value of this variable normally depends on the player's current speed: -<source lang="lua">player.bob = (FixedMul(player.rmomx,player.rmomx) + FixedMul(player.rmomy,player.rmomy))/4</source> +<syntaxhighlight lang="lua">player.bob = (FixedMul(player.rmomx,player.rmomx) + FixedMul(player.rmomy,player.rmomy))/4</syntaxhighlight> The actual bobbing displacement calculated for <code>''player''.viewz</code> oscillates between -(<code>''player''.bob</code>/2) and +(<code>''player''.bob</code>/2). The maximum value for <code>''player''.bob</code> itself is 16*<code>FRACUNIT</code>. @@ -568,7 +598,7 @@ The actual bobbing displacement calculated for <code>''player''.viewz</code> osc |The amount of spheres the player possesses. |- !<code>pity</code> -|SINT8 +|<code>SINT8</code> |{{Yes|Read+Write}} |The player's "pity" hit counter for Match/CTF modes; normally when <code>''player''.pity</code> reaches 3 or above, this will spawn a [[Pity Shield]] around the player and <code>''player''.pity</code> will be reset to 0. |- @@ -600,12 +630,12 @@ The actual bobbing displacement calculated for <code>''player''.viewz</code> osc ! style="white-space:nowrap" |<code>powers[''powername'']</code> |<code>UINT16</code> array |{{Partial|''Table:'' Read-only<br />''Table entries:'' Read+Write|style=white-space:nowrap;}} -|A table containing the current values for all powers for the player, where ''powername'' is an integer expected to be one of the [[A_CustomPower|<code>pw_*</code>]] constants. The table itself cannot be directly reassigned, but entries in it can be accessed or modified. Use of the values depends on the power selected – see the <code>[[A_CustomPower]]</code> article for more information on each power. +|A table containing the current values for all powers for the player, where ''powername'' is an integer expected to be one of the [[Powers|<code>pw_*</code>]] constants. The table itself cannot be directly reassigned, but entries in it can be accessed or modified. Use of the values depends on the power selected – see the [[Powers]] article for more information on each power. Example usages of this variable: -<source lang="lua">player.powers[pw_super] = 0 +<syntaxhighlight lang="lua">player.powers[pw_super] = 0 player.powers[pw_invulnerability] = 20*TICRATE -player.powers[pw_shield] = ($1 & ~SH_NOSTACK)|SH_WHIRLWIND</source> +player.powers[pw_shield] = ($1 & ~SH_NOSTACK)|SH_WHIRLWIND</syntaxhighlight> |- !<code>pflags</code> |enum ([[Constants#Internal player flags|<code>PF_*</code>]]) @@ -630,7 +660,7 @@ player.powers[pw_shield] = ($1 & ~SH_NOSTACK)|SH_WHIRLWIND</source> !<code>skin</code> |<code>INT32</code> |{{No|Read-only}} -|The player's current skin (skin numbers are to be used). In [[multiplayer]], it is the player's chosen skin selected in the Player Setup menu or through the console variable <code>[[Console/Variables#skin|skin]]</code>. +|The player's current skin number. In [[multiplayer]], it is the player's chosen skin selected in the Player Setup menu or through the console variable <code>[[Console/Variables#skin|skin]]</code>. It is important to note that <code>''player''.skin</code> is ''not'' the actual skin displayed in-game (which would be <code>''player''.mo.skin</code>), but a backup skin variable for the game to reference for drawing the lives display and the player's icon on the multiplayer scoreboard. @@ -647,11 +677,21 @@ It is important to note that <code>''player''.skincolor</code> is ''not'' the ac For instance, when the player has collected a Fire Flower powerup, <code>''player''.mo.color</code> is changed to <code>SKINCOLOR_WHITE</code>, while <code>''player''.skincolor</code> remains the original skin color the player had before. Afterwards, if the player lost this power-up, <code>''player''.mo.color</code> is re-set to the value of <code>''player''.skincolor</code>, restoring the player's original skin color. |- +!<code>availabilities</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>score</code> |<code>UINT32</code> |{{Yes|Read+Write}} |The player's current score. In most cases, this should be modified using <code>[[Lua/Functions#P_AddPlayerScore|P_AddPlayerScore]]</code> to account for limits, extra life bonuses, Team Match team scores and NiGHTS mode. |- +!<code>recordscore</code> +|<code>UINT32</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- !<code>dashmode</code> |<code>tic_t</code> |{{Yes|Read+Write}} @@ -1064,6 +1104,21 @@ Note that when the player has finished the level, <code>''player''.realtime</cod |{{Yes|Read+Write}} |Used in [[NiGHTS]] mode to save the finishing time for <code>''player''.nightstime</code> for the mare just completed by the player. |- +!<code>lapbegunat</code> +|<code>tic_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>lapstartedtime</code> +|<code>tic_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>finishedspheres</code> +|<code>INT16</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- !<code>finishedrings</code> |<code>INT16</code> |{{Yes|Read+Write}} @@ -1152,7 +1207,7 @@ Note that when the player has finished the level, <code>''player''.realtime</cod !<code>onconveyor</code> |<code>INT32</code> |{{Yes|Read+Write}} -|When the player is in a sector with either the [[Wind/Current]] or [[Conveyor Belt]] specials, <code>''player''.onconveyor</code> will be set to 2 or 4 respectively. <code>''player''.onconveyor</code> is then used to determine when and whether to set <code>''player''.cmomx</code> and <code>''player''.cmomy</code> to 0 or not. +|When the player is in a sector affected by a [[Pusher tutorial|pushing]] or [[Scroller tutorial|scrolling]] effect, <code>''player''.onconveyor</code> will be set to 2 or 4 respectively. <code>''player''.onconveyor</code> is then used to determine when and whether to set <code>''player''.cmomx</code> and <code>''player''.cmomy</code> to 0 or not. |- !<code>awayviewmobj</code> |<code>[[#mobj_t|mobj_t]]</code> @@ -1187,6 +1242,21 @@ Note that when the player has finished the level, <code>''player''.realtime</cod * 1 – The player is a bot player currently using bot AI * 2 – The player is a bot player currently controlled by Player 2 controls |- +!<code>botleader</code> +|<code>[[player_t]]</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>lastbuttons</code> +|<code>UINT16</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>blocked</code> +|<code>boolean</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- !<code>jointime</code> |<code>tic_t</code> |{{Yes|Read+Write}} @@ -1203,6 +1273,11 @@ Note that when the player has finished the level, <code>''player''.realtime</cod |The amount to add to the FOV in the [[OpenGL]] renderer. This is automatically corrected every tic so you will need to set this continually for any real effect. <font color="red">'''''Note: If not modified by Lua, this value is only calculated by the game locally if the [[OpenGL]] renderer is being used and <code>[[Console/Variables#gr_fovchange|gr_fovchange]]</code> is turned on (otherwise, it is set to zero), and thus isn't network safe. Use at your own risk.'''''</font> +|- +!<code>ping</code> +|<code>UINT32</code> +|{{No|Read-only}} +|The amount of ping the player has in miliseconds while connected to a netgame. |} ===ticcmd_t=== @@ -1250,6 +1325,11 @@ This userdata type represents a player's current button information, i.e., what |<code>UINT16</code> |{{Yes|Read+Write}} |Contains flags representing buttons currently pressed ([[Constants#Button flags|<code>BT_*</code>]] constants should be used). +|- +!<code>latency</code> +|<code>UINT8</code> +|{{No|Read-only}} +|{{todo|Add a description}} |} ===skin_t=== @@ -1455,6 +1535,16 @@ This userdata type represents the properties of a character [[skin]], which are |enum ([[List of sounds|<code>sfx_*</code>]]) array |{{No|Read-only}} |A table containing all of the corresponding sound numbers for all skinsound slots for the skin, where ''SKSNAME'' is an integer that is expected to be one of the [[Constants#Skin sounds|<code>SKS*</code>]] constants. For example, <code>skins["sonic"].soundsid[SKSTHOK]</code> returns <code>sfx_thok</code>, the default sound for the <code>SKSTHOK</code> skinsound slot; for custom characters who may have a custom sound set for any of the skin sounds, this returns the sound number for the custom sound instead. +|- +!<code>sprites</code> +|<code>skin_t.sprites[]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>supername</code> +|string +|{{No|Read-only}} +|{{todo|Add a description}} |} ==SOC== @@ -1813,6 +1903,16 @@ This userdata type represents the properties of a [[level header]]. In the examp |{{No|Read-only}} |<code>[[Level header#NextLevel|NextLevel]]</code>, as an integer. |- +!<code>marathonnext</code> +|<code>INT16</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>keywords</code> +|<code>string</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>musname</code> |string |{{No|Read-only}} @@ -1838,6 +1938,31 @@ This userdata type represents the properties of a [[level header]]. In the examp |{{No|Read-only}} |<code>[[Level header#MusicInter|MusicInter]]</code> |- +!<code>muspostbossname</code> +|<code>string</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbosstrack</code> +|<code>UINT16</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbosspos</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbossfadein</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>musforcereset</code> +|<code>INT8</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>forcecharacter</code> |string |{{No|Read-only}} @@ -1873,6 +1998,36 @@ This userdata type represents the properties of a [[level header]]. In the examp |{{No|Read-only}} |<code>[[Level header#TitleCardActDiamond|TitleCardActDiamond]]</code> |- +!<code>maxbonuslives</code> +|<code>INT8</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbossname</code> +|<code>string</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbosstrack</code> +|<code>UINT16</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbosspos</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>muspostbossfadein</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>musforcereset</code> +|<code>INT8</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>ltzzpatch</code> |string |{{No|Read-only}} @@ -1959,6 +2114,31 @@ This userdata type represents the properties of a [[level header]]. In the examp |<code>UINT8</code> |{{No|Read-only}} |<code>[[Level header#MenuFlags|MenuFlags]]</code>. See [[Constants#Menu flags|<code>LF2_*</code>]] constants. +|- +!<code>selectheading</code> +|<code>string</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>startrings</code> +|<code>UINT16</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>sstimer</code> +|<code>INT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>ssspheres</code> +|<code>UINT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>gravity</code> +|<code>fixed_t</code> +|{{No|Read-only}} +|{{todo|Add a description}} |} ===skincolor_t=== @@ -2103,6 +2283,21 @@ This userdata type represents a map [[Thing]]. In the examples below, <code>''ma |{{Yes|Read+Write}} |The angle the map Thing is facing, in degrees. For most purposes, this is a value from 0 to 359 – 0 is East, 90 is North, 180 is West and 270 is South. However, some Object types use this variable for other purposes; in these cases, it can be any value from -32768 to 32767. |- +!<code>pitch</code> +|<code>INT16</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>roll</code> +|<code>INT16</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>scale</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- !<code>type</code> |<code>UINT16</code> |{{Yes|Read+Write}} @@ -2127,6 +2322,36 @@ This userdata type represents a map [[Thing]]. In the examples below, <code>''ma |<code>[[#mobj_t|mobj_t]]</code> |{{Yes|Read+Write}} |Points to the Object spawned by the map Thing. This is not set for Thing types that have no corresponding Object type, such as special placement patterns. In these cases, the value of <code>mobj</code> is <code>nil</code>. +|- +!<code>tag</code> +|<code>INT16</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>taglist</code> +|<code>taglist</code> +|{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} +|{{todo|Add a description}} +|- +!<code>args</code> +|<code>mapthing_t.args</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>stringargs</code> +|<code>mapthing_t.stringargs</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>spritexscale</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>spriteyscale</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} |} ===sector_t=== @@ -2194,6 +2419,11 @@ This userdata type represents a [[sector]]. In the examples below, <code>''secto |{{Yes|Read+Write}} |The [[tagging|tag]] of the sector. Due to the way this is set up, all tags from 32768 to 65535 (seen when using map editors) are in fact -32768 to -1, although either can be used for assigning a new tag value (it will be automatically converted to the latter version anyway). Changing the value of <code>''sector''.tag</code> will have the same effect as changing it with [[Linedef type 409]] or [[Linedef type 410]]. |- +!<code>taglist</code> +|<code>taglist</code> +|{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} +|{{todo|Add a description}} +|- !<code>thinglist()</code> |function |{{No|Read-only}} @@ -2228,6 +2458,46 @@ This userdata type represents a [[sector]]. In the examples below, <code>''secto |<code>[[#pslope_t|pslope_t]]</code> |{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} |The sector's ceiling slope. This is nil if no ceiling slope is set. +|- +!<code>floorxoffset</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>flooryoffset</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>floorangle</code> +|<code>angle_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>ceilingxoffset</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>ceilingyoffset</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>ceilingangle</code> +|<code>angle_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>floorlightsec</code> +|<code>INT32</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>ceilinglightsec</code> +|<code>INT32</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} |} ===subsector_t=== @@ -2343,6 +2613,21 @@ This userdata type represents a [[linedef]]. In the examples below, <code>''line |{{No|Read-only}} |The tag number set for the linedef. Due to the way this is set up, all tags from 32768 to 65535 (seen when using map editors) are in fact -32768 to -1, although either can be used for assigning a new tag value (it will be automatically converted to the latter version anyway). |- +!<code>taglist</code> +|<code>taglist</code> +|{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} +|{{todo|Add a description}} +|- +!<code>args</code> +|<code>mapthing_t.args</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>stringargs</code> +|<code>mapthing_t.stringargs</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>sidenum[''i'']</code> |<code>UINT16</code> array |{{No|Read-only}} @@ -2358,6 +2643,16 @@ This userdata type represents a [[linedef]]. In the examples below, <code>''line |{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} |Points to the linedef's back sidedef, if it exists (same as <code>sides[''line''.sidenum[1]]</code>); this will return nil if not. |- +!<code>alpha</code> +|<code>fixed_t</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>executordelay</code> +|<code>INT32</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>slopetype</code> |string |{{No|Read-only}} @@ -2377,6 +2672,11 @@ This userdata type represents a [[linedef]]. In the examples below, <code>''line |{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} |Points to the linedef's back sector, if it exists. |- +!<code>polyobj</code> +|<code>[[polyobj_t]]</code> +|{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} +|{{todo|Add a description}} +|- !<code>firsttag</code> |<code>INT16</code> |{{No|Read-only}} @@ -2452,6 +2752,11 @@ This userdata type represents a [[sidedef]]. In the examples below, <code>''side |{{Yes|Read+Write}} |The sidedef's middle texture number. This is 0 if no valid texture is set. See [[List of textures by number]] for the numbers of SRB2's textures. |- +!<code>line</code> +|<code>[[line_t]]</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- !<code>sector</code> |<code>[[#sector_t|sector_t]]</code> |{{Partial|''Userdata:'' Read-only<br />''Userdata variables:'' Read+Write|style=white-space:nowrap;}} @@ -2471,6 +2776,36 @@ This userdata type represents a [[sidedef]]. In the examples below, <code>''side |string |{{No|Read-only}} |Concatenation of the upper, middle and lower texture name strings, for linedef types that require text in any of them. +|- +!<code>offsetx_top</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>offsety_top</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>offsetx_mid</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>offsety_mid</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>offsetx_bot</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} +|- +!<code>offsety_bot</code> +|<code>fixed_t</code> +|{{Yes|Read+Write}} +|{{todo|Add a description}} |} ===vertex_t=== @@ -2512,11 +2847,27 @@ This userdata type represents a [[vertex]]. In the examples below, <code>''verte |{{No|Read-only}} |The absolute Y coordinate of the vertex in the map. |- -!<code>z</code> +!<code>floorz</code> +|<code>fixed_t</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>floorzset</code> +|<code>boolean</code> +|{{No|Read-only}} +|{{todo|Add a description}} +|- +!<code>ceilingz</code> |<code>fixed_t</code> |{{No|Read-only}} -|Used as an absolute Z coordinate in some special cases, but for all Lua purposes this is unused. +|{{todo|Add a description}} +|- +!<code>ceilingzset</code> +|<code>boolean</code> +|{{No|Read-only}} +|{{todo|Add a description}} |} + ===ffloor_t=== This userdata type represents an [[FOF]]. @@ -2612,6 +2963,11 @@ This userdata type represents an [[FOF]]. |<code>INT32</code> |{{Yes|Read+Write}} |The FOF's alpha/translucency value. This should be a value between 1 and 256. +|- +!<code>blend</code> +|enum (<code>[[Constants#Blend_modes|AST_*]]</code>) +|{{Yes|Read+Write}} +|{{todo|Add a description}} |} ===pslope_t=== @@ -2648,9 +3004,9 @@ This userdata type represents a [[slope]]. In the examples below, <code>''slope' For sector-based slopes, the origin's X/Y position is placed a fixed horizontal distance (known as the "extent" internally) away from the middle point of the linedef that defines the slope, at an angle of <code>xydistance</code>. The Z position is set as the un-sloped height of the floor or ceiling plane the slope is created for. Currently, the only way to modify this variable is by assigning to it a custom table with x, y and z fields, such as below: -<source lang="lua"> +<syntaxhighlight lang="lua"> slope.o = {"x" = 1*FRACUNIT, "y" = 2*FRACUNIT, "z" = 3*FRACUNIT} -- change the origin's position to (1, 2, 3) -</source> +</syntaxhighlight> If <code>SL_DYNAMIC</code> is set in the slope's flags, the origin's Z position (<code>slope.o.z</code>) will be automatically corrected accordingly with the sector heights or vertices used to create the slope. ''This means that <code>slope.o.z</code> cannot be modified by Lua unless the flag is set.'' |- diff --git a/wiki/Video_flags.txt b/wiki/Video_flags.txt index 873317a151613b9ba2db40edc6f81f8c5b3ff9d6..1791b58564e153e47edef3a37cccab0bd2b9448e 100644 --- a/wiki/Video_flags.txt +++ b/wiki/Video_flags.txt @@ -1,3 +1,4 @@ +{{old}} '''Video flags''' are a series of toggles that determine the properties of [[List of graphics|graphics]] drawn during SRB2 runtime, whether in the form of text or patches. These flags are listed here for reference, as they are used by both the console command <code>[[Console/Commands#cechoflags|cechoflags]]</code> as well as [[Lua]]'s [[Lua/Functions#HUD library|HUD library functions]]. Also listed in this page are several [[constants]] related to the video flags used for masking and bit-shifting, which are detailed in their respective sections and are relevant only for [[SOC]]/[[Lua]]. ==Video flag bits and masks== @@ -51,7 +52,7 @@ Unlike with other types of flags, the video flags are divided into individual se ===Scale=== These flags control how text or patches are scaled in-game. However, they may or may not have an effect depending on the screen resolution – by default the size of graphics is determined by the ratio of the current resolution to the default resolution (320×200). Having none of the scaling flags set corresponds with <code>[[Console/Variables#con_textsize|con_textsize]] huge</code>. -Note that the given X/Y positions of the top left corner of text or patches will also be scaled, unless <code>V_NOSCALESTART</code> is set. Patch offsets will also be scaled unless <code>V_NOSCALESTART</code> is set; however, <code>V_OFFSET</code> allows them to be scaled if combined with <code>V_NOSCALESTART</code>. +Note that the given X/Y positions of the top left corner of text or patches will also be scaled, unless <code>V_NOSCALESTART</code> is set. Patch offsets will also be scaled unless <code>V_NOSCALESTART</code> is set. If any of these flags are set, the flags <code>V_SNAPTOTOP</code>, <code>V_SNAPTOBOTTOM</code>, <code>V_SNAPTOLEFT</code> and <code>V_SNAPTORIGHT</code> will have no effect. {| class="wikitable" @@ -435,7 +436,7 @@ These flags can be combined with each other freely; however, some flags may not ! 1073741824 ! <code>0x40000000</code> | <code>V_NOSCALESTART</code> -| Do not scale the text or patch's starting position, i.e., the top-left corner of the text/patch. This will cause it to be placed as if the resolution was the default of 320×200, while still retaining the size of the text/patch for the resolution currently being used, assuming <code>V_NOSCALEPATCH</code> is not being used. This causes the text/patch to be in the top-left in higher resolutions. Generally not recommended because the resulting appearance will vary depending on the resolution used. Patch offsets will also not be scaled unless <code>V_OFFSET</code> is also used. +| Do not scale the text or patch's starting position, i.e., the top-left corner of the text/patch. This will cause it to be placed as if the resolution was the default of 320×200, while still retaining the size of the text/patch for the resolution currently being used, assuming <code>V_NOSCALEPATCH</code> is not being used. This causes the text/patch to be in the top-left in higher resolutions. Generally not recommended because the resulting appearance will vary depending on the resolution used. Patch offsets will also not be scaled. If this flag is set, the flags <code>V_SNAPTOTOP</code>, <code>V_SNAPTOBOTTOM</code>, <code>V_SNAPTOLEFT</code> and <code>V_SNAPTORIGHT</code> will have no effect.