diff --git a/docs/Adding-a-New-Achievement.md b/docs/Adding-a-New-Achievement.md index 069005c..8c5337f 100644 --- a/docs/Adding-a-New-Achievement.md +++ b/docs/Adding-a-New-Achievement.md @@ -24,13 +24,13 @@ import('backend.Achievements'); var condition:Bool = false; function update(elapsed:Float) { - if (PlayState.instance.score > 9000) + if (PlayState.instance.score >= 1000000) condition = true; } function endSong() { if (condition) { - Achievements.unlock('over_nine_thousand', { + Achievements.unlock('road_to_a_million', { date: Date.now(), song: PlayState.song.song }, { diff --git a/docs/Adding-a-New-Language.md b/docs/Adding-a-New-Language.md index 2314fe3..526cd25 100644 --- a/docs/Adding-a-New-Language.md +++ b/docs/Adding-a-New-Language.md @@ -1,5 +1,11 @@ -## Language Data -Firstly, you need to edit these two main text files: +## Creating the JSON File +First, you need to create a file in `assets/languages/` called `[language-code].json`.
+The name doesn't really matter, so you can call it whatever you want. + +For its data, copy [this](https://raw.githubusercontent.com/Joalor64GH/Rhythmo-SC/main/assets/languages/en.json), and edit it with your translations. + +## Loading your Language +Now, you need to edit these two main text files: * `assets/languages/languagesList.txt` - Your list of languages. (e.g., `de`, `en`, `es`, `fr`) * `assets/languages/languagesData.txt` - This is so that your language can be pushed into `LanguagesState.hx`. @@ -13,6 +19,21 @@ So, for example, if you wanted to add German, it would look like: Deutsch (Deutschland):de ``` -Now, you need your `.json` file, which should be located in `assets/languages/[language-code].json`.
-Of course, this contains the data for your language.
-To add your data, just copy [this](https://raw.githubusercontent.com/Joalor64GH/Rhythmo-SC/main/assets/languages/en.json), and edit it with your translations. \ No newline at end of file +## Localization Functions +Like most functions, these can be accessed through [scripting](https://github.com/Joalor64GH/Rhythmo-SC/wiki/Scripting). + +### Switching to Another Language +```hx +Localization.switchLanguage('language-code'); +``` + +If that language is already selected, the change will not happen. + +## Retrieving a Key +```hx +Localization.get('key', 'language-code'); +``` + +If the second parameter is empty, defaults to currnt language. + +For further documentation, check out [`SimpleLocalization`](https://github.com/Joalor64GH/SimpleLocalization). \ No newline at end of file diff --git a/docs/Adding-a-New-Song.md b/docs/Adding-a-New-Song.md index 0b8bdc9..57f0a08 100644 --- a/docs/Adding-a-New-Song.md +++ b/docs/Adding-a-New-Song.md @@ -16,7 +16,7 @@ For your chart, copy this empty template: It should be called `chart.json` and should be located in `assets/songs/[song-name]/chart.json`. ### Charting -To chart your song, go to `PlayState.hx` and then press "7" to go to ChartingState.
+To chart your song, go to `PlayState.hx` and then press "`7`" to go to ChartingState.
Or you can go to your song in `SongSelectState.hx`, and use `SHIFT + ENTER`. When you're done, simply save the chart by using `Save Chart` or `Save Chart As`.
diff --git a/docs/Creating-a-Mod.md b/docs/Creating-a-Mod.md index 9af1e9d..89b06fe 100644 --- a/docs/Creating-a-Mod.md +++ b/docs/Creating-a-Mod.md @@ -1,5 +1,5 @@ ## Creating the Folder -Create a folder in the `mods` folder and rename it to whatever you want.
+Create a folder in the `mods/` folder and rename it to whatever you want.
Doing this manually isn't a problem, but it would be better and faster if you copy-and-pasted the `template` folder. ![](https://github.com/user-attachments/assets/85d6cc54-72e0-406f-b5a0-131b65e32b62?raw=true)