RDCode: Difference between revisions
m list redirect until page exists |
Camellia258 (talk | contribs) m minor typo fix |
||
| (5 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
'''RDCode''' (abbreviation of ''Rhythm Doctor Code'') is the set of features in Rhythm Doctor that encompass | '''RDCode''' (abbreviation of ''Rhythm Doctor Code'') is the set of features in Rhythm Doctor that encompass Custom Methods, Tags, Conditionals, and simple programming via reading and writing to variables. Here and elsewhere and in the community, the word "'''''RDCode'''''" on its own usually refers to its programming language. | ||
Note that all RDCode is affected by the player's '''Visual Offset''', which can cause timing issues in certain cases. | |||
== Custom Methods == | == Custom Methods == | ||
See [[Call Custom Method]]. | '''Custom Methods''' are functions that can be executed for various uses, whether to manage audio, VFX, gameplay, or specific built-in cases like a ''Gameover'' or custom ''Rank'' screen. | ||
See [[Call Custom Method]] for how to execute Custom Methods and [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit List of Custom Methods] for a list of the available ones. | |||
'''''Note that Custom Methods are not officially endorsed to be used by the devs, and can break anytime when the game updates.''''' | |||
=== Comment Commands === | === Comment Commands === | ||
| Line 11: | Line 17: | ||
== Tags == | == Tags == | ||
See [[Tag Action]] and [[Call Custom Method]]. | '''Tags''' can be set on events to run them at any time, in order. If an event or series of events are tagged, they will run whenever the tag is run. This is useful for looping the same events or running them based on player inputs or choices (i.e. not bound to a specific beat nor bar). | ||
Tagged events only run at the same time if, on the timeline, they're placed on the same beat and bar. They're run in order, such that if a tagged event is placed on beat 1 and another on beat 2, when running the tag, the first event will run immediately and there will be a 1 beat delay to the next event. <!-- ive no idea how to word this better if anyone could check it thanks --> | |||
See [[Tag Action]] for running and managing tags. ([[Call Custom Method]] also has a set of Custom Methods that equate to Tag Action's functionality.) | |||
To add a tag to an event, click on the "''Bar''" text in the top of the Event window, and it will turn into a "''Tag''" textbox. | To add a tag to an event, click on the "''Bar''" text in the top of the Event window, and it will turn into a "''Tag''" textbox. | ||
<!--It's best practice to encompass individual and separate tags in square brackets (<code>[]</code>).--> | |||
See [[List_of_Custom_Methods#Tags|List of Tags]] for a set of special tags that can't be affected by Tag Action but rather are handled by game input. | |||
== Conditionals == | == Conditionals == | ||
| Line 50: | Line 61: | ||
'''Custom''' conditionals allow for '''RDCode''' conditional expressions to be inputted, such as comparisons (e.g. <code>i0 < 5</code>) and boolean reading (e.g. <code>b0</code>). | '''Custom''' conditionals allow for '''RDCode''' conditional expressions to be inputted, such as comparisons (e.g. <code>i0 < 5</code>) and boolean reading (e.g. <code>b0</code>). | ||
See [[List of Custom Methods#Variables|List of Variables]] for variables that can be checked within these types of conditionals. | |||
== RDCode programming == | == RDCode programming == | ||
| Line 64: | Line 77: | ||
Note that, when converting between data types (e.g. <code>i0 = f0</code>, <code>b0 = i0</code>), floats will be '''rounded''' (0.5 rounding is inconsistent, can be upwards or downwards), and integers to booleans will return '''false''' if its equal to 0, otherwise '''true'''. | Note that, when converting between data types (e.g. <code>i0 = f0</code>, <code>b0 = i0</code>), floats will be '''rounded''' (0.5 rounding is inconsistent, can be upwards or downwards), and integers to booleans will return '''false''' if its equal to 0, otherwise '''true'''. | ||
Certain events that have text-boxes are able to read these 30 variables, using curly brackets (<code>{}</code>), and having inside a valid RDCode arithmetic expression. (e.g. in a [[Floating Text]] event, <code>Current score: {i0}</code> will display the current value of <code>i0</code>). | |||
There are '''non-readable but writeable''' variables that affect gameplay and visuals, and they're only able to be used in '''[[Call Custom Method]]''' events. E.g. <code>wobblyLines</code> (bool), <code>noHitFlashBorder</code> (bool), and <code>room[]</code> (this is a special '''array''' variable that can accept custom methods that affect individual rooms). See [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit List of Custom Methods] for a further list. | There are '''non-readable but writeable''' variables that affect gameplay and visuals, and they're only able to be used in '''[[Call Custom Method]]''' events. E.g. <code>wobblyLines</code> (bool), <code>noHitFlashBorder</code> (bool), and <code>room[]</code> (this is a special '''array''' variable that can accept custom methods that affect individual rooms). See [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit List of Custom Methods] for a further list. | ||