List of Custom Methods: Difference between revisions

Jump to navigation Jump to search
(Created page with "#REDIRECT [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit] <!-- redirect until someone makes the list in wiki -->")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
#REDIRECT [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit]
This is a list of custom methods and variables that can be used for [[Call Custom Method]] and [[RDCode#Conditionals|Conditionals]].
<!-- redirect until someone makes the list in wiki -->
 
This list is '''unfinished''', please refer to the '''[https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit Rhythm Doctor Custom Method Sheet]''' for information.
 
{| class="wikitable"
|+ Custom Methods
|-
! Custom Method !! Description
|-
| <code>MistakeOrHeal(float'''DamageOrHeal''')</code> || Positive values will do the "''note missed''" vignette flash and sound effect, and add specified number of misses to the hit stats, '''decreasing the rank accordingly'''.<br>Negative values will do the "''note hit''" vignette flash and remove number of misses from the hit stats, '''improving the rank accordingly'''. Early & late stats will be unaffected.<br>Has no effect on heart visuals.
|- <!-- from [[Play Song]] vvv -->
| <code>CurrentSongVol(float'''TargetVolume''', float'''FadeTimeSeconds''')</code> || Sets the volume of the most recently played song to '''TargetVolume''' over the time given in '''FadeTimeSeconds'''.
|-
| <code>PreviousSongVol(float'''TargetVolume''', float'''FadeTimeSeconds''')</code> || Sets the volume of the second most recently played song to '''TargetVolume''' over the time given in '''FadeTimeSeconds'''.
|-
| <code>SongVol(string'''filename.ogg*external''', float'''TargetVolume''', float'''FadeTimeSeconds''')</code> || Sets the volume of a specific filename to '''TargetVolume''' over the time given in '''FadeTimeSeconds'''. Can target sound effects from [[Play Sound]].
|-
| <code>StopSong(int'''FadeTimeInSeconds''')</code> || Like '''CurrentSongVol''', with no volume control.
|-
| <code>OneSongAtATime(bool'''Enabled''')</code> || Stops the previous song as soon as a new [[Play Song]] event is triggered.
|- <!-- from [[Shake Screen]] vvv -->
| <code>smoothShake = bool'''Enabled'''</code> || Replaces screen shakes with a smooth version. '''Note''': this seems to only work with ''OnPreBar''. This method may make the room display incorrectly when completed.
|-
| <code>rotateShake = bool'''Enabled'''</code> || Replaces screen shakes with a rotation shake. '''Note''': this method may make the room display incorrectly when completed.
|}
<!-- please add more
add columns by doing this
 
|-
| <code>CoolCustomMethod(type'''Variable1''')</code> || This is a cool custom method.
 
-->
 
=== Variables ===
 
This is a list of variables and miscellaneous methods that can be used in [[RDCode#Conditionals|Conditionals]].
 
{| class="wikitable"
|+ Variables for Conditionals
|-
! Variable !! Description
|-
| <code>autoplay</code> || Boolean. Whether [[Otto|Autoplay]] is on or not.
|-
| <code>atLeastRank(string'''Rank''') || Method to check for a rank. Can't distinguise plus and minus variants, except for S+.
|-
| <code>atLeastNPerfects(int'''HitsToCheck''', int'''NumberOfPerfects''')</code> || Checks if '''NumberOfPerfects''' of the last '''HitsToCheck''' beats have been hit.
|-
| <code>arePlayerInputsSwapped</code> || Boolean. Whether the player has used "Swap Hands."
|-
| <code>levelSpeed</code> || Float. Speed of the level. Chilly speed is 0.75, chili speed is 1.5, and default is 1.
|-
| <code>numMistakes</code><br><code>numMistakesP1</code><br><code>numMistakesP2</code> || Number of mistakes, collectively and per-player.
|-
| <code>platform</code> || String. Platform used by the computer: ''Mac'' or ''Windows'' (Linux can be checked if both are false).
|-
| <code>voiceLanguage</code> || String. Language used by the user: only ''English'' and ''Chinese'' are supported by this variable, so use the [[RDCode#Language|Language Conditional]] otherwise.
|-
| <code>upPress</code> || Up Arrow Key Press
|-
| <code>downPress</code> || Down Arrow Key Press
|-
| <code>leftPress</code> || Left Arrow Key Press
|-
| <code>rightPress</code> || Right Arrow Key Press
|-
| <code>upIsPressed</code> || Up Arrow Key Is Pressed
|-
| <code>downIsPressed</code> || Down Arrow Key Is Pressed
|-
| <code>leftIsPressed</code> || Left Arrow Key Is Pressed
|-
| <code>rightIsPressed</code> || Right Arrow Key Is Pressed
|-
| <code>upReleased</code> || Up Arrow Key Is Released
|-
| <code>downReleased</code> || Down Arrow Key Is Released
|-
| <code>leftReleased</code> || Left Arrow Key Is Released
|-
| <code>rightReleased</code> || Right Arrow Key Is Released
|-
| <code>anyPlayerPress</code> || Any Key Press
|-
| <code>anyPlayerRelease</code> || Any Key Is Released
|-
| <code>p1Press</code> || P1 Any Key Press
|-
| <code>p2Press</code> || P2 Any Key Press
|-
| <code>p1IsPressed</code> || P1 Any Key Is Pressed
|-
| <code>p2IsPressed</code> || P2 Any Key Is Pressed
|-
| <code>p1Release</code> || P1 Any Key Is Released
|-
| <code>p2Release</code> || P2 Any Key Is Released
|-
| <code>buttonPressCount</code> || Amount of times a button has been pressed<sup>''(Not 2P Compatible?)''</sup>
|}

Latest revision as of 09:50, 10 February 2025

This is a list of custom methods and variables that can be used for Call Custom Method and Conditionals.

This list is unfinished, please refer to the Rhythm Doctor Custom Method Sheet for information.

Custom Methods
Custom Method Description
MistakeOrHeal(floatDamageOrHeal) Positive values will do the "note missed" vignette flash and sound effect, and add specified number of misses to the hit stats, decreasing the rank accordingly.
Negative values will do the "note hit" vignette flash and remove number of misses from the hit stats, improving the rank accordingly. Early & late stats will be unaffected.
Has no effect on heart visuals.
CurrentSongVol(floatTargetVolume, floatFadeTimeSeconds) Sets the volume of the most recently played song to TargetVolume over the time given in FadeTimeSeconds.
PreviousSongVol(floatTargetVolume, floatFadeTimeSeconds) Sets the volume of the second most recently played song to TargetVolume over the time given in FadeTimeSeconds.
SongVol(stringfilename.ogg*external, floatTargetVolume, floatFadeTimeSeconds) Sets the volume of a specific filename to TargetVolume over the time given in FadeTimeSeconds. Can target sound effects from Play Sound.
StopSong(intFadeTimeInSeconds) Like CurrentSongVol, with no volume control.
OneSongAtATime(boolEnabled) Stops the previous song as soon as a new Play Song event is triggered.
smoothShake = boolEnabled Replaces screen shakes with a smooth version. Note: this seems to only work with OnPreBar. This method may make the room display incorrectly when completed.
rotateShake = boolEnabled Replaces screen shakes with a rotation shake. Note: this method may make the room display incorrectly when completed.

Variables

This is a list of variables and miscellaneous methods that can be used in Conditionals.

Variables for Conditionals
Variable Description
autoplay Boolean. Whether Autoplay is on or not.
atLeastRank(stringRank) Method to check for a rank. Can't distinguise plus and minus variants, except for S+.
atLeastNPerfects(intHitsToCheck, intNumberOfPerfects) Checks if NumberOfPerfects of the last HitsToCheck beats have been hit.
arePlayerInputsSwapped Boolean. Whether the player has used "Swap Hands."
levelSpeed Float. Speed of the level. Chilly speed is 0.75, chili speed is 1.5, and default is 1.
numMistakes
numMistakesP1
numMistakesP2
Number of mistakes, collectively and per-player.
platform String. Platform used by the computer: Mac or Windows (Linux can be checked if both are false).
voiceLanguage String. Language used by the user: only English and Chinese are supported by this variable, so use the Language Conditional otherwise.
upPress Up Arrow Key Press
downPress Down Arrow Key Press
leftPress Left Arrow Key Press
rightPress Right Arrow Key Press
upIsPressed Up Arrow Key Is Pressed
downIsPressed Down Arrow Key Is Pressed
leftIsPressed Left Arrow Key Is Pressed
rightIsPressed Right Arrow Key Is Pressed
upReleased Up Arrow Key Is Released
downReleased Down Arrow Key Is Released
leftReleased Left Arrow Key Is Released
rightReleased Right Arrow Key Is Released
anyPlayerPress Any Key Press
anyPlayerRelease Any Key Is Released
p1Press P1 Any Key Press
p2Press P2 Any Key Press
p1IsPressed P1 Any Key Is Pressed
p2IsPressed P2 Any Key Is Pressed
p1Release P1 Any Key Is Released
p2Release P2 Any Key Is Released
buttonPressCount Amount of times a button has been pressed(Not 2P Compatible?)