Code Move Resource Thread Page 19

Started by Spherical Ice April 22nd, 2013 10:29 PM
  • 289649 views
  • 465 replies
Age 21
Male
.....Cuba, sorry about that
Seen 2 Weeks Ago
Posted November 2nd, 2022
13 posts
1.9 Years
Fly (DPPT)
Spoiler:
14 XX 17 03 2D B8 0B 08 05 04 00 F7 00 00 01 00 FF FF 04 05 00 AC 27 00 97 27 11 AA AA AA 08 CC CC CC 08

AA:
19 97 00 C0 02 B8 6B 3E 08 02 04 00 00 00 00 0D 00 50 01 13 BB BB BB 08 0A 03 0C 0C 08 19 80

BB:
0E C7 59 1D 08 05 08 19 97

CC:
0A 03 0C 0C 08 19 80 00 C0 02 D0 6B 3E 08 02 01 14 00 04 14 02 08 7C 3E 08 02 04 00 00 00 00 01 00 00 00 03 F9 89 09 08 05 05 01 00 06 00 00 00 08 00 01 00 19 81 00 3F 05 0B 03 0D 13 BB BB BB 08
Note: XX is your inserted BG


BG:
Age 21
Male
.....Cuba, sorry about that
Seen 2 Weeks Ago
Posted November 2nd, 2022
13 posts
1.9 Years
False Surrender:
Spoiler:
00 9F 27 00 2D 28 0A 03 19 81 00 3F 02 3C 7B 3E 08 02 07 1F 00 03 00 01 00 FF 7F 0A 00 00 00 0A 00 02 80 7C 3E 08 03 04 00 00 00 00 01 00 14 00 03 F9 89 09 08 05 05 01 00 07 00 00 00 09 00 01 00 05 0B 03 0D 08


Here is a particle made by me:
Male
Seen March 27th, 2023
Posted November 6th, 2022
70 posts
9.3 Years
For now I only know how to merge animations, and I am one of those who replace graphics (in this case, attack particles and BG)
I am slowly learning how to make animations
Yeah, create a complete new animations is not easy at all...
By the way, you are able to re-create the particles shown in the video i linked? I see you are good at graphics
Age 21
Male
.....Cuba, sorry about that
Seen 2 Weeks Ago
Posted November 2nd, 2022
13 posts
1.9 Years
Yeah, create a complete new animations is not easy at all...
By the way, you are able to re-create the particles shown in the video i linked? I see you are good at graphics
Not really, since those animations really ... in my opinion, they must be fake.
That video must be edited, or the one who made those modifications must be a professional haha
Male
Seen March 27th, 2023
Posted November 6th, 2022
70 posts
9.3 Years
Not really, since those animations really ... in my opinion, they must be fake.
That video must be edited, or the one who made those modifications must be a professional haha
The second one. He was one of best ASM rom hacker, but then disappeared.
Anyway i talk about particles, since both of you did the same Scary Face particle sprite, i think you can replicate the others, like his Fire particles? You already did a great job with Fly BG 🤔
Age 21
Male
.....Cuba, sorry about that
Seen 2 Weeks Ago
Posted November 2nd, 2022
13 posts
1.9 Years
Snap Trap (Leer + Bite)
Spoiler:
00 2B 27 0A 00 28 00 0C 08 08 19 B9 00 C0 02 30 EF 3F 08 02 02 18 00 F4 FF 03 B1 98 09 08 05 05 FB FF FB FF 0A 00 00 00 01 00 05 04 0A 0B 00 0D 00 9B 27 00 97 27 0A 01 0C 0C 08 19 9A 00 3F 02 30 79 3E 08 02 06 00 00 E0 FF 00 00 00 00 33 03 0A 00 02 30 79 3E 08 02 06 00 00 20 00 04 00 00 00 CD FC 0A 00 04 0A 02 08 7C 3E 08 02 04 00 00 00 00 01 00 02 00 03 F9 89 09 08 05 05 01 00 00 00 04 00 07 00 01 00 05 0B 01 0D 04 01 08

Male
Seen July 20th, 2022
Posted June 14th, 2022
35 posts
7.9 Years
Sorry for the late response! I kinda hit a dead end with the animation stuff and took a break. My pointers and offsets are all fine. I triple double checked that. I initially believed that my issue could stem from the fact that I'm editing an already hacked ROM, but I did some testing with this animation and here's what I found:

First, I checked Dark Pulse's animation in MrDollSteak's 1.5a rombase, and it works fine. It looks like the Uproar with little Will-O-Wisp flames coming out and has the Faint Attack background. I checked the location of the animation code in the rombase. The only difference between his and mine (besides the pointers) is that he put the smaller parts of the code before the main chunk (in order) whereas I put mine after. He also stuck in a few bytes of free space between each part as a buffer, but I think that's more so he could tell what part was where when you look at the hex, not because it was necessary. I don't do that because I like to consolidate space. I write down the offset values elsewhere to keep track.

Then I tested the animation in a clean Fire Red ROM where I added Dark Pulse (in the same location so I didn't have to change my offsets & pointers), and it crashed too! That means that my already hacked ROM isn't the issue, or at least it's not likely to be. Just to be sure, I even positioned the code how MrDollSteak did (fixing the pointers this time), and it also crashed.

Because this animation consistently freezes after the background is set, the next segment(s) of the attack must be the issue. I think it's trying to call for a sprite, particle, or effect that comes from some table in the ROM that has either been moved or that isn't present at all. I know that some of the move animators imported or made custom sprites/particles for making new moves like this, but I don't know how to look for them or add them in if that's what I'm missing.

Basically, I have 3 options going forward:
1. I miraculously find a way to fix this animation or find someone who can help me fix it. This is ideal, but probably not gonna happen any time soon.
2. I start over from scratch using MrDollSteak's rombase. This is definitely not the route I want to take because his rombase includes a lot of things I don't want. For just wanting to add in a few moves from Gen 4, all the extra baggage is a hefty price to pay for working animations.
3. I make a new animation myself. I wouldn't be opposed to this because I have an idea of what can work. Going off of MrDollSteak, Water Pulse with the Faint Attack background and the Will-O-Wisp fire sprites sounds good. It's basic, but hey if I can get it to work, I don't care. Gen 3 animations aren't super glamorous anyways. The issue with this option is that I have zero experience with making animations, and the resource threads on here for doing that aren't easy for me to understand. I would need a helping hand with that.

So yeah that's where I'm at

IF ANYONE ELSE BROWSING THIS THREAD CAN HELP, PLEASE PM ME
I don't really understand how to "replace backwards", can you give me an example? I have been trying for 2 days but the animation is always not working. @@

robertussan

he/him
Seen February 24th, 2023
Posted October 2nd, 2022
10 posts
4.2 Years
I don't really understand how to "replace backwards", can you give me an example? I have been trying for 2 days but the animation is always not working. @@
I think you meant to respond to the post I quoted, but I can still help you with that.
First of all, the animation might just be busted and doesn't work anyway.
Secondly, I think that guy was talking about the difference between offsets and pointers, so here's a little crash course.

An offset is the location for a byte in memory. They are denoted 0xXXYYZZ or XX YY ZZ, where XX, YY, and ZZ are "digits" represented as bytes. In a hex editor (I use hex workshop, highly recommend it), every byte has an offset, and you can find it by highlighting or clicking on which byte you want. Think of how you use the index of a textbook. If you need to find information (the byte), the index gives you the page number (offset) where you can find it.

A pointer is a configuration of bytes that points to an offset.
To create a pointer for an offset:
1) take the offset --> XX YY ZZ
2) switch the first and last byte --> ZZ YY XX (I think that's where the "replace backwards" comes from)
3) add the byte "08" to the end of it --> ZZ YY XX 08
...and that's your pointer!
Offsets will be different for everyone because you can insert hex code pretty much anywhere. Because of this, move animators already include the ending byte "08" and leave the rest of the pointer (the ZZ YY XX part) to be filled out.

Let's use move animations as an example.
Move animation hex is sometimes broken up into a main part and a secondary part (or parts) that the main part points to. If that's the case, you'll see ZZ YY XX in the main part. That means you need to insert a pointer. But where do you make it point to? To the offset where the secondary part of the code begins.

Let's say I'm adding a move animation into my ROM, and I need the pointer for offset 0x123456 where the secondary part of the code starts.
1) break the offset down into bytes: 12 34 56
2) flip the first and last bytes like so: 56 34 12

I've been exactly where you are: struggling to learn about ROM hacking because these basic things either aren't explained or they're detailed in a few posts hidden among a million others. The learning curve is steep, but I hope this helps. Also check out the post below yours. ortz3 made a Move Animation Creator which might make your move animations a thing of the past. Good luck!
Seen May 9th, 2022
Posted December 13th, 2021
1 posts
1.5 Years
I made a Google Sheet that lists all the attack effects in FireRed by their value as the row, with the second column being example attacks for the effects not named within PGE's Attack Editor. I also tried to list which effects don't skip the 'applying damage' part of the move, but I've probably missed a lot of those. All of the boxes left blank in the first column are not used by any move nor are named within PGE's Attack Editor.

https://docs.google.com/spreadsheets/d/1EtF4CVOuGHVBRvy10d0VzKLEczaELjpI-x3lnQXLE5k/edit?usp=sharing
Seen 2 Weeks Ago
Posted March 10th, 2023
135 posts
3.1 Years
Update

It is now 100% working, Psystrike/Psyshock and Secret Sword effect :

Spoiler:

Emerald:
Spoiler:

Alter the Defense-boost abilities :
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global multiscaleandfurcoat
 
Main:
CheckTwistMoves:
	ldr r0, CurrentMove
	ldrh r0, [r0]
	ldr r3, PStrike
	cmp r0, r3
	beq Swap
	ldr r3, PShock
	cmp r0, r3
	beq swap
	ldr r3, SSword
	cmp r0, r3
	bne Continue
Swap:
	ldr r0, [sp, #0x18]
	ldr r3, [sp, #0x1C]
	str r0, [sp, #0x1C]
	str r3, [sp, #0x18]
Continue:
	ldrb r0, [r2]
	cmp r0, #0x3F
	bne Multiscale
	ldr r3, [sp, #0x4]
	ldr r0, [r3, #0x4C]
	cmp r0, #0
	beq Return
	ldr r1, [sp, #0x18]
	lsr r0, r1, #1
	add r1, r1, r0
	str r1, [sp, #0x18]
Multiscale:
	cmp r0, #0x89 /*Index number MultiScale*/
	bne FurCoat
CheckHP:
	ldr r1, [sp, #0x4]
	ldrh r0, [r1, #0x28]
	ldrh r1, [r1, #0x2C]
	cmp r1, r0
	bne Return
HalveDamage:
	lsr r7, r7, #0x1
	mov r0, r8
	lsr r0, r0, #0x1
	mov r8, r0
FurCoat:
	ldrb r0, [r2]
	cmp r0, #0xAA /*Index number Fur Coat*/
	bne Return
DefenseBoost:
	ldr r1, [sp, #0x18]
	mov r0, r1
	add r1, r0, r0
	str r1, [sp, #0x18]
Return:
	ldr r0, CurrentMove
	ldrh r0, [r0]
	ldr r3, PStrike
	cmp r0, r3
	beq SwapAgain
	ldr r3, PShock
	cmp r0, r3
	beq SwapAgain
	ldr r3, SSword
	cmp r0, r3
	bne Continue
SwapAgain:
	ldr r0, [sp, #0x18]
	ldr r3, [sp, #0x1C]
	str r0, [sp, #0x1C]
	str r3, [sp, #0x18]
End:
	ldr r2, Back
	bx r2

.align 2
Back: .word 0x08069938+1
CurrentMove: .word 0x020241EA
PStrike: .word 0x21C
PShock: .word 0x1D9
SSword: .word 0x224 /*Replace with the index number of your moves*/

/*00 48 00 47 xx+1 xx xx 08 at 08069918*/

Now we alter some part of the calculate damage function:
Spoiler:

.thumb

Start:
mov r8, r3
ldr r0, CurrentMove
ldrh r1, [r0]
ldr r0, PStrike
cmp r1, r0
beq Swap
ldr r0, PShock
cmp r1, r0
beq Swap
ldr r0, SSword
cmp r1, r0
beq Swap

Classic:
ldr r0, [sp, #4]
ldrh r0, [r0, #0xA]
str r0, [sp, #0x1C]

Back:
ldr r0, Return
mov pc, r0

Swap:
ldr r0, [sp, #4]
ldrh r0, [r0, #0xA]
str r0, [sp, #0x18]
str r2, [sp, #0x1C]
ldrh r0, [sp, #0xC]
mov r1, #3
and r1, r0
cmp r1, #0
beq Back
cmp r1, #3
beq Back
cmp r1, #2
beq Subst
add r0, #1
b Store

Subst:
sub r0, #1

Store:
strh r1, [sp, #0xC]
b Back

.align 2
PStrike: .word 0x21C
PShock: .word 0x1D9
SSword: .word 0x224 /*Index number of those moves*/
Return: .word 0x08069614+1
CurrentMove: .word 0x020241EA

/*00 48 00 47 xx+1 xx xx 08 at 0806960C*/

Finally the ASM for the custom BSP :
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global swapdefsandboosts

main:
push {r0-r3, lr}
ldr r0, BankTarget
ldr r1, BattleData
ldrb r0, [r0]
mov r2, #0x58
mul r0, r2
add r1, #0x1A
add r1, r0
ldrb r2, [r1]
ldrb r3, [r1, #0x3]
strb r3, [r1]
strb r2, [r1, #0x3]
pop {r0-r3, pc}

.align 2
BattleData:.word 0x02024084
BankTarget:.word 0x0202420C

/*Call asm that routine+1 before AND after the "calculatedamage" command in BSP*/
Your Battle Script would look like :
#org @start
jumpifhalfword 0x1 0x20241EA 0x39 @BS
jumpifspecialstatusflag 0x0 0x40000 0x1 @BS
orword 0x2024280 0x40000
setbyte 0x2024482 0x2

#org @BS
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
callasm 0x8A233F1
calculatedamage
callasm 0x8A233F1
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2024488 0x0
cmd49 0x0 0x0
end



I know this is an old post, but I could not get this to work; Inputting code at 69918 causes the game to freeze when I use almost any attacking move.
Edit: This keeps happening:
Edit: Actually, an infinite loop occurs:
They/Them
Seen 21 Hours Ago
Posted 4 Weeks Ago
9 posts
1 Years
Wave Crash: Basically just Crabhammer with a spin, but I think it works
Spoiler:
03 7D 90 09 08 02 05 00 00 12 00 06 00 01 00 04 00 19 73 00 C0 05 00 9D 27 00 A4 27 0A 03 0C 0C 08 02 38 7C 3E 08 04 04 00 00 00 00 01 00 00 00 19 74 00 3F 04 01 02 3C 7B 3E 08 02 07 1F 00 03 00 01 00 AD 7E 0A 00 00 00 00 00 02 3D 4E 9C 02 05 01 00 E8 FF 00 00 00 00 04 00 05 04 08 05 02 84 4E 3D 08 02 03 01 00 00 00 04 00 05 1C 87 00 3F 14 03 03 F9 89 09 08 05 05 01 00 00 00 04 00 08 00 01 00 02 B0 5A 3E 08 02 04 0A 00 0A 00 14 00 01 00 04 04 02 B0 5A 3E 08 02 04 14 00 EC FF 14 00 01 00 04 04 02 3E 5A B0 02 04 F1 FF 0F 00 14 00 01 00 04 04 02 B0 5A 3E 08 02 04 00 00 00 00 14 00 01 00 04 04 02 B0 5A 3E 08 02 04 F6 FF EC FF 14 00 01 00 04 04 02 B0 5A 3E 08 02 04 10 00 F8 FF 14 00 01 00 04 04 02 3E 5A B0 02 04 05 00 08 00 14 00 01 00 04 04 02 B0 5A 3E 08 02 04 F0 FF 00 00 14 00 01 00 05 0B 03 0D 08
Age 29
Male
Brazil
Seen 1 Day Ago
Posted 1 Week Ago
167 posts
5.1 Years
I've made a custom Jaw Lock move effect!

In free space, put:
2E 85 3E 02 02 20 02 03 22 00 07 04 7E 1D 08 28 XX XX XX 08

While the XX XX XX don't need to insert +1:
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 E3 00 47 69 1D 08 29 04 CC 3D 02 02 20 47 69 1D 08 1E 00 15 08 94 1D 08 21 00 00 04 00 00 00 27 8F 1D 08 16 10 8F 00 12 40 00 28 4E 69 1D 08

Special Thanks to HMA tool, made by haven.
I SUPPORT HEX MANIAC ADVANCE!
CHECK IT OUT!!!

Pokémon: Fire Red Extended
Hack rom made by me. 😀
Seen 2 Weeks Ago
Posted March 10th, 2023
135 posts
3.1 Years
King Shield, Spiky Shield, Quick Guard, Wide Guard, Crafty Shield, Mat Block

[SPOILER]
With kleenexfeu telling me a wonderful trick to compile multiple different type of resources together in just a single click that he used in his Emerald Mega implementation too, the protection moves are also implemented using the same trick which makes it ridiculously easy to insert any resource when using ASM.

Emerald:-
Spoiler:

The red portion can be changed according to your ROM.
For Quick Guard, you need to additionally compile and insert this or the routine for speed related Abilities in the Ability resource thread and then set the value of the Priority BL to an appropriate value. The location is 0x803D074 if you are using the first one.

Give these moves 111 as Effect ID.
The routine uses Move IDs to distinguish the effects of Protection moves. See the Protection Move Table in the lower portion of the code fragment to find the Move IDs controlling the code.

(code)
I inserted the script, and I was unable to get Wide Guard to protect against spread moves. Also, implementing this causes Yawn to bypass Protect without playing the move animation. (I know this thread is old.)
I configured the move table to match my ROM's Wide Guard ID.
Seen 2 Weeks Ago
Posted March 10th, 2023
135 posts
3.1 Years
Heal Pulse for [EM]:

Battle Script:
Spoiler:

  attackcanceler
  attackstring
  ppreduce
  tryhealhalfhealth <2D9EFB> 0
  attackanimation
  waitanimation
  orword 0x02024280 256
  healthbarupdate 0
  datahpupdate 0
  printstring 75
  waitmessage 64
  goto <2D8A4E>


Battle Script (bytes):
Spoiler:

00 02 03 7B FB 9E 2D 08 00 09 0A 35 80 42 02 02 00 01 00 00 0B 00 0C 00 10 4B 00 12 40 00 28 4E 8A 2D 08


Animation (bytes):
Spoiler:

02 74 72 59 08 02 05 01 00 01 00 00 00 0C 00 03
24 05 00 9C 27 00 2F 27 1F 59 8C 15 08 07 B7 00
C0 FF 3F 00 03 00 06 00 00 00 0A 00 10 07 FF FF
03 29 75 10 08 0A 01 82 00 03 D1 52 0D 08 05 05
01 00 01 00 00 00 11 00 01 00 0E 8B 08 2D 08 0E
8B 08 2D 08 0E 8B 08 2D 08 03 D1 52 0D 08 05 05
01 00 02 00 00 00 28 00 01 00 0E 8B 08 2D 08 0E
8B 08 2D 08 0E 8B 08 2D 08 0E 8B 08 2D 08 0E 8B
08 2D 08 0E 8B 08 2D 08 05 19 B3 00 80 0E 28 7A
2D 08 05 02 74 72 59 08 02 05 01 00 01 00 0C 00
00 00 03 24 08
They/Them
Seen 21 Hours Ago
Posted 4 Weeks Ago
9 posts
1 Years
Rapid Spin Update [EM]
Spoiler:
00 01 5E 8A 2D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 35 43 02 02 E3 15 2E 35 43 02 02 51 15 28 47 8A 2D 08

Mortal Spin [EM]
Spoiler:
00 01 5E 8A 2D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 35 43 02 02 E3 15 2E 35 43 02 02 02 15 28 47 8A 2D 08