Rizbot
Joined 17 December 2024
No edit summary |
|||
(16 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
{{/login}} | {{/login}} | ||
=== | === Latest processing results === | ||
{{/results}} | {{/results short}} | ||
== Functionality and scope == | == Functionality and scope == | ||
Line 22: | Line 22: | ||
=== Input === | === Input === | ||
The bot fetches JSON data from the following pages to generate blocks of wikitext: | The bot fetches JSON data from the following pages (in the <code>Rhythm Game Wiki:</code> namespace) to generate blocks of wikitext: | ||
{{Special:PrefixIndex/Rizbot/data | {{Special:PrefixIndex/Rhythm Game Wiki:Rizbot/data}} | ||
Input JSON files can be divided into two main categories: '''basic data''' and '''extra data'''. | |||
* '''Basic data''' is data that is stored directly in the game files. JSON input files with ''basic data'' can be easily recreated by converting game data into JSON; no additional information is required. For example: [[Rhythm Game Wiki:Rizbot/data/rizline_song_data.json]], which contains a list of songs, can easily be generated from the [[Rizline:AssetList|AssetList]] file, located inside ''[[Rizline:Rizline|Rizline]]''<nowiki/>'s game files. | |||
* '''Extra data''' is data that usually provides additional information about items in ''basic data''. The data inside ''extra data'' input JSON files is not stored anywhere in the game, or is stored in places such that it is not easy to extract it automatically. ''Extra data'' is created manually and cannot be recreated from the game files by themselves. For example: [[Rhythm Game Wiki:Rizbot/data/rizline_extra_song_data.json]] contains additional song metadata such as: song price, release version, and additional requirements for obtaining the song in [[wikipedia:wikitext|wikitext]]. Some of the data in ''extra data'' files (such as wikitext descriptions of items) is only useful within the context of this wiki. | |||
Both types of data files are used together to generate Rizbot blocks. The data is divided in this way to allow for easier automatic updating and generation of ''basic data'' when the game updates, while preserving the ''extra data'' which cannot be easily generated from the game files. | |||
=== Output === | === Output === | ||
When run, the bot automatically updates: | When run, the bot automatically updates: | ||
* Instances of [[Template:RizlineSongInfoBox|RizlineSongInfoBox]] templates (using the | * The list of achievements (using the [[#rizline_achievement_list]] command) | ||
* Lists of songs (using the | ** [[Rizline:Bio]] | ||
* The list of non-achievement bio tags (using the [[#rizline_bio_list]] command) | |||
** [[Rizline:Bio]] | |||
* Instances of [[Template:RizlineSongInfoBox|RizlineSongInfoBox]] templates (using the [[#rizline_song_info_box]] command), which are in all pages contained in [[:Category:Rizline songs]]. | |||
* Lists of songs (using the [[#rizline_song_list]] command), which are in the following pages: | |||
** [[Rizline:List of songs]] | ** [[Rizline:List of songs]] | ||
** [[Rizline:Disc 1]] | ** [[Rizline:Disc 1]] | ||
Line 34: | Line 44: | ||
** [[Rizline:Disc EX]] | ** [[Rizline:Disc EX]] | ||
** [[Rizline:Coin]] | ** [[Rizline:Coin]] | ||
* The list of sound effects (using the [[#rizline_sound_list]] command) | |||
** [[Rizline:Sound effects]] | |||
Planned functionality includes automatic updating and generation of: | Planned functionality includes automatic updating and generation of: | ||
* Song statistics - note counts, colors, etc. | * Song statistics - note counts, colors, etc. | ||
* Asset tables for songs | * Asset tables for songs | ||
== Usage == | == Usage == | ||
Line 47: | Line 58: | ||
The sections that the bot should edit are indicated manually with markers: | The sections that the bot should edit are indicated manually with markers: | ||
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> BEGIN command_name [arg1 [arg2...]] | * <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> BEGIN <nowiki>## command_name [arg1 [arg2...]] --></nowiki></code>, and | ||
* <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> END | * <code><nowiki><!-- ##</nowiki> RIZ<nowiki/>BOT <nowiki/> END <nowiki>## command_name --></nowiki></code>, | ||
where <code>command_name</code> is the type of the section that the bot should generate (for example, <code>rizline_song_info_box</code>, or <code>rizline_song_stats</code>). All command names are described below. Additional space-separated arguments may be added after the <code>section_type</code> in the <code>BEGIN</code> marker. | where <code>command_name</code> is the type of the section that the bot should generate (for example, <code>rizline_song_info_box</code>, or <code>rizline_song_stats</code>). All command names are described below. Additional space-separated arguments may be added after the <code>section_type</code> in the <code>BEGIN</code> marker. | ||
'''Warning:''' It is important to remember that anything that is between the <code>BEGIN</code> and <code>END</code> markers will be overwritten. Manual changes to the content in-between the markers will be lost when the bot will be launched again. | '''Warning:''' It is important to remember that anything that is between the <code>BEGIN</code> and <code>END</code> markers will be overwritten. Manual changes to the content in-between the markers will be lost when the bot will be launched again. | ||
=== | == Commands == | ||
=== rizline_achievement_list === | |||
To generate a list of achievements using Rizbot, use the following syntax: | |||
<pre> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_achievement_list --></nowiki> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_achievement_list --></nowiki> | |||
</pre> | |||
This command takes in no additional arguments. | |||
=== rizline_bio_list === | |||
To generate a list of purchasable bio tags using Rizbot, use the following syntax: | |||
<pre> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_bio_list --></nowiki> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_bio_list --></nowiki> | |||
</pre> | |||
This command takes in no additional arguments. | |||
=== rizline_song_info_box === | |||
To generate a song info box using Rizbot, use the following syntax: | To generate a song info box using Rizbot, use the following syntax: | ||
<pre> | <pre> | ||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN | <nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_song_info_box RizlineLevelID --></nowiki> | ||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END | <nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_song_info_box --></nowiki> | ||
</pre> | </pre> | ||
Line 65: | Line 100: | ||
** If song data associated with this ID cannot be found, an error will occur. | ** If song data associated with this ID cannot be found, an error will occur. | ||
=== | |||
=== rizline_song_list === | |||
To generate a list of songs using Rizbot, use the following syntax: | To generate a list of songs using Rizbot, use the following syntax: | ||
<pre> | <pre> | ||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN | <nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_song_list ListType --></nowiki> | ||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END | <nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_song_list --></nowiki> | ||
</pre> | </pre> | ||
Line 80: | Line 116: | ||
** <code>coin</code> - Generate a list of songs purchasable with coins. Used in: [[Rizline:Coin]]. | ** <code>coin</code> - Generate a list of songs purchasable with coins. Used in: [[Rizline:Coin]]. | ||
** Any other value will cause an error. | ** Any other value will cause an error. | ||
=== rizline_sound_list === | |||
To generate a list of sound effects using Rizbot, use the following syntax: | |||
<pre> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> BEGIN <nowiki>## rizline_sound_list --></nowiki> | |||
<nowiki><!-- ##</nowiki> RIZ<nowiki>BOT</nowiki> END <nowiki>## rizline_sound_list --></nowiki> | |||
</pre> | |||
This command takes in no additional arguments. |