Skip to content

Commit

Permalink
Small visual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NeeEoo committed Oct 13, 2024
1 parent c209871 commit dc6d89b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/pages/wiki/modding/note-splashes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Note splashes

# Note Splashes

First, you need to put the .png and .xml of the notesplashes into ``./images/game/splashes/``
First, you need to put the .png and .xml of the note splashes into ``./images/game/splashes/``
The filename should be the name you want to reference the splashes in the data, in this case we'll use ``sploosh``.
Here is how the spritesheet should look like:

Expand Down Expand Up @@ -41,25 +41,25 @@ Next, you need to make a .xml file for the data of the splashes, you can do this
Heres what the essential variables for the data .xml are:

To start, <syntax lang="xml">&lt;splashes&gt;</syntax> is where you start with. It has basic attributes like:
- ``sprite``: The sprite that appears for the notesplashes (starting from ``./images/``).
- ``alpha``: The visibility of the splash, with 1being completely solid and 0 being useless because itjust makes the splash transparent.
- ``antialiasing``: Changes if the splashes areantialiased or not. (default is `true`).
- ``scale``: The scale the splashes show up as. (default is `1`).
- ``sprite``: The sprite that appears for the note splashes (starting from ``./images/``).
- ``alpha``: The visibility of the splash, with 1being completely solid and 0 being useless because it just makes the splash transparent. (default is <code class="hljs-string">1</code>).
- ``antialiasing``: Changes if the splashes are antialiased or not. (default is <code class="hljs-string">true</code>).
- ``scale``: The scale the splashes show up as. (default is <code class="hljs-string">1</code>).

After defining the previous node, <syntax lang="xml">&lt;strum&gt;</syntax> is for defining each strum. It only has one singular attribute which is:
- ``id``: The ID of the splash you're making data for. (left = 0, down = 1, etc.).

Then, to define the animation of the splash (or animations since you can have multiple of those) use <syntax lang="xml">&lt;anim&gt;</syntax>, the following attributes are:
- ``name``: This is the name of the animation that you're editing in the data
- ``anim``: This is the name of the animation that you're editing in the spritesheet .xml file.
- ``fps``: The framerate of the animation.
- ``fps``: The framerate of the animation. (default is <code class="hljs-string">24</code>).
- ``x``: This is the X offset (use this if the splash is not centered on the arrow).
- ``y``: This is the Y offset (use this if the splash is not centered on the arrow).

## Making the splash show up

Now that you setup the note splashes, you have to code them in. <br>
All you have to do is add this one piece of code in a Gameplay Script: *(change ``sploosh`` to the name of the splahses you just made)*
All you have to do is add this one piece of code in a Gameplay Script: *(change <code class="hljs-string">"sploosh"</code> to the name of the splashes you just made)*
```haxe
function onPlayerHit(e)
{
Expand All @@ -69,7 +69,7 @@ function onPlayerHit(e)
And then this is how they should look in-game or something like that.

<!-- muted is required for autoplay on chromium -->
<video width="360" height="360" autoplay muted>
<video width="360" height="360" autoplay muted loop>
<source src="./note-splashes.webm" type="video/webm">
Your browser does not support the video tag.
</video>
1 change: 1 addition & 0 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ pre {

>ul:has(li a) {
z-index: 0;
background: var(--list-background-color);
position: relative;
overflow: hidden;
}
Expand Down

0 comments on commit dc6d89b

Please sign in to comment.