summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZetogit <66174658+Zetogit@users.noreply.github.com>2021-01-24 03:50:05 +0100
committerZetogit <66174658+Zetogit@users.noreply.github.com>2021-01-24 03:50:05 +0100
commitab41fe41892b7b4bb35fd446377bf431928733bf (patch)
tree00d28b81ed7a6754afdb7d5967f11170b14387a4
parent810b4dd6ca30d1bbc469b4ef2ca94ea618ca499c (diff)
Updated Attack animation tiles (markdown)
-rw-r--r--Attack-animation-tiles.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/Attack-animation-tiles.md b/Attack-animation-tiles.md
index 6a838f7..9d7dc52 100644
--- a/Attack-animation-tiles.md
+++ b/Attack-animation-tiles.md
@@ -1,14 +1,15 @@
-* **Introduction**
+**### Introduction**
The aim of this tutorial is to use additional tiles for the attack animations in battle.
There are 2 ways to do that: moving black tiles from both attack tilesets to the font tileset, and/or add a new tileset.
-The 1st method lets you add up to 22 tiles, the 2nd method lets you add 32 tiles more or less but it puts some limitations. You can use both methods to have a total of 54 new tiles.
-Before starting the tutorial, I strongly recommend to know how animations work in pokered. You need to know at least what are frameblocks and subanimations, especially for the first method.
+The 1st method lets you add up to 22 tiles, the 2nd method lets you add 32 tiles more or less but it puts some limitations.
+You can use both methods to have a total of 54 new tiles. Before starting the tutorial, I strongly recommend to know how animations work in pokered. You need to know at least what are frameblocks and subanimations, especially for the first method.
* ### **A/ Method 1: Moving black tiles and replacing them**
This is the best way if you only need few tiles.
+
**1. Move your tiles**
First you need to know that the font tileset (in gfx/font/font.png) is used in battle just like the 2 attack animation tilesets. If you look at this font tileset, you will notice a white empty space (enough for 32 tiles) right after the 64 characters, BUT this space can't be used for the tiles that use 4 colors. The font tileset is coded in 1 bit per pixel (1bpp), which means that it only uses black (and white for the transparency of course). No gray.
@@ -33,7 +34,7 @@ Now, you know which frameblock you have to change: 52. Because Amnesia and confu
That's it, you just replaced the question mark tiles without messing with Amnesia's animation. You can use your new tiles now.
-*** B/ Method 2: Adding a new tileset**
+**### B/ Method 2: Adding a new tileset**
You will be able to add only one tileset of 32 tiles, choose a size of 128*16 preferently but any size should be fine, and of course the tileset must be indexed in 4 colors (black, white, light grey and dark grey). A few limits to this method:
*You might be restricted to 16 tiles if you add many attack animations (subanimations, frameblocks...).
@@ -51,6 +52,7 @@ In engine/battle/animations.asm, add these lines under the AnimationTileset2 poi
Then add this under the 3 anim_tileset lines: anim_tileset x, AnimationTileset3
Replace the "x" by the number of tiles you have in your tileset (32 if you stick to this number).
+
**2. Restructure the banks**
Adding a tileset will probably make the bank space overflow. This bank should be bank1E normally. You need to move some data in this bank to another bank. For this, create a new bank and a new section for it in layout.link (the file name may change depending on the updates of the pokered repository). Type in something like:
@@ -60,6 +62,7 @@ Adding a tileset will probably make the bank space overflow. This bank should be
Then you can move the data from bank1E in main.asm to your new bank, but make sure to keep these includes in the same bank: engine/battle/animations.asm, data/moves/animations.asm, data/battle_anims/subanimations.asm, data/battle_anims/frame_blocks.asm, engine/overworld/cut2.asm and engine/overworld/dust_smoke.asm.
These files need each other in some way, don't put them in separate banks.
+
**3. Affect the tileset to an animation**
In data/moves/animations.asm, set the 3rd parameter of the animation you want to 3. This tells the compiler that the animation uses the tileset 3. We do count tilesets from 0 but 0, 1 and 2 are for tilesets 1 and 2, and 3 is for tileset 3.
@@ -79,7 +82,9 @@ Same thing in data/battle_anims/special_effect_pointers.asm, you have to remove
Now you can use your new tileset.
+
**5. Why setting FIRST_SE_ID to 0xC5?**
+
This part is not necessary for the tutorial but it's meant to explain what happens in the code.
When you set the tileset ID of an animation to 3, this causes a bug as soon as you use your new tileset (if FIRST_SE_ID is left to 0xC0). The bug comes from the PlayAnimation routine in engine/battle/animations.asm.