• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Adding New Moves to Gen 3

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Cut for brevity

Indeed. That is how I should have done it. Retrospect is a wonderful thing.

On the downside, this only works for moves which have a similar move already in existance. I know the AI needs modified to support the new moves either way, but at least with using your method, that amount of work is cut substantially.

Battle Script Editors are being worked on to make this sort of work easier, so maybe I'll go back and retrospectively change the system to use the style you show above.

It would certainly make any modifications to the AI easier!

I thank you for pointing this out!
 

BrandoSheriff

Has a tendency to figure things out
776
Posts
16
Years
Wow, it's been a while since I've been on this side of the forums. xD
Anyways, I've got my hack stuff back on my new computer, and I'm continuing work on my project, but one problem still persists:

How do I give my new moves proper descriptions?
 

pawell6

The truthseeker
50
Posts
14
Years
Wow, it's been a while since I've been on this side of the forums. xD
Anyways, I've got my hack stuff back on my new computer, and I'm continuing work on my project, but one problem still persists:

How do I give my new moves proper descriptions?

You can use XSE to change descritptions of moves.
 

Omega Zero

Is back...
444
Posts
14
Years
Wow, it's been a while since I've been on this side of the forums. xD
Anyways, I've got my hack stuff back on my new computer, and I'm continuing work on my project, but one problem still persists:

How do I give my new moves proper descriptions?

Find the pointer for move descriptions
Copy all of it plus 4xnumber of new moves

and paste it somewhere in the rom,
then repoint everything to the new move descriptions place.
 

ShadowTails

I'm working on a better Avatar
638
Posts
18
Years
  • Age 32
  • Seen Mar 7, 2015
Regarding move descriptions, when I try to point to other areas in the rom for the descriptions, it will bring up other random text, no matter where I point it.

At first I just repointed the pointer table, and that worked just fine, but trying to add a new pointer at the end for the 355th move in the rom would never work. It would just pick a random thing of text, and if I changed another move, like Growl, to the description that I put in free space, it would pick another text even if it was the same offset as the custom move.
ln5ZRR8.png

lav5F5K.png



The only time any new description would work is if I put it after Psycho Boost without repointing all of the move descriptions, and when I tried repointing all the move descriptions, nothing works.

Is there another pointer that I have to set to get this to work right? I've been trying all sorts of different things, but I've run into this problem. After trying everything, I figured I should ask here. I got everything else to work, my new move does damage and it does everything that it should do, but I can't figure out what to do about move descriptions for the life of me.
 
Last edited:
1
Posts
11
Years
  • Seen Mar 14, 2023
This is the first time I am trying to mod a Pokémon Game, and this looked very amazing to me, so I figured I'd give it a shot, but I encountered an error.
I'm sure I did everything as it said I should, but anyway, this happens (Images in attachments)
 
1
Posts
12
Years
  • Seen Sep 2, 2018
forgive me for being new to this but how could I just do something simple like make howl raise accuracy instead of attack? I know its not a standard effect but still doesn't seem like it should be too difficult. I don't necessarily wanna have to repoint a bunch of code is all. (This would be for Emerald.)

I can't seem to find the right byte or bytes to change... knowing how the data structure is outlined for attack effects, animations or whatever would help like how bulbapedia formats it on their "Move_data_structure_in_Generation_III" page
 

BugMania

The Bug Master
32
Posts
10
Years
  • Seen Nov 4, 2016
Jambo 51, ​​it seems that you are not entered programming ASM to jump movements according to the levels of the Pokemon ... ... happens that a pokemon on level 35 appears with the same movements of a level 1.

... excuse me if I'm wrong speaking
 

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
So while fiddling with the 649 patch I noticed a rather nasty bug in the second move table extension method detailed in the OP. While it works fairly well, pokemon are generated with the first four moves in their movepool, regardless of how high level they are. Movepools looked like this:

4bMiQif.png


when they should have looked like this:

noalzq0.png


This can be fixed by using the following routine in place of the second one Jambo provides:

Code:
.text
.align 2
.thumb
.thumb_func
.global newmovesetstyle2
main:
 ldrb r1, [r0, #0x2]
 mov r2, #0xFF
 cmp r1, r2
 beq exit2
 lsl r2, #0x8
 add r2, #0xFF
 mov r9, r2
 mov r3, #0x0
loop: lsl r0, r3, #0x1
 add r0, r0, r3
 ldr r1, movesettable
 add r1, r1, r6
 ldr r1, [r1, #0x0]
 add r7, r0, r1
 ldrb r0, [r7, #0x2]
 mov r4, r10
 cmp r0, r4
 bgt exit2
 ldrb r1, [r7, #0x1]
 ldrb r0, [r7, #0x0]
 lsl r1, r1, #0x8
 orr r1, r0
 mov r0, r8
 str r3, [sp, #0x0]
 mov r4, r1
 bl branchone
 mov r5, #0xFF
 ldr r3, [sp, #0x0]
 cmp r0, r9
 bne exit
 mov r0, r8
 add r1, r4, #0x0
 bl branchtwo
 ldr r3, [sp, #0x0]
exit: add r3, #0x1
# lsl r1, r3, #0x1
# add r1, r1, r3
# add r0, r7, r1
 mov r1, #0x3
 add r0, r7, r1
 ldrb r0, [r0, #0x2]
 cmp r0, r5
 bne loop
exit2: add sp, #0x4
 pop {r3-r5}
 mov r8, r3
 mov r9, r4
 mov r10, r5
 pop {r4-r7}
 pop {r0}
 bx r0
branchone: push {r4-r7,lr}
 add sp, #-0x4
 ldr r7, gothere
 bx r7
branchtwo: push {r4-r7,lr}
 ldr r7, gothere2
 bx r7
.align
gothere: .word 0x0803E8B5
gothere2: .word 0x0803EC43
movesettable: .word 0x0825D7B4
The changes are fairly simple. First, Jambo's code seemed to assume that the method called by "branchone" returned 0xFF if the pokemon didn't have a spare slot in its movepool- not only would this cause problems with Spit Up (which is move 0xFF), but in actuality it returns 0xFFFF. (Note that this means you won't be able to use slot 0xFFFF for a move and have it behave properly without further tweaking). I modified the code to look for that instead. I also fixed two other issues that were never reached previously- the call to "branchtwo" now properly pushes last register, and the move being learned is stored in r4 before branchone is called at all, which means that pokemon don't constantly learn their level instead of actual moves.

This only applies to the method that enables you to have more than 512 moves- if all you did was repoint a few tables this doesn't impact you.

(implying anyone cares when over two years have passed and only one other person noticed)

EDIT: don't use this by its own. I was working with the 649 to patch this, and assumed the only tweaks were what Jambo documented here; he made a bunch of other changes as well. Read the next page, there's a byte tweak for it that should fix things most of the time.

11/4/2014 edit: updated this method, it should work properly now even without the one following it.
 
Last edited:

Tlachtli

Crit happens.
267
Posts
12
Years
I just want to add that Jambo's first method in the OP works perfectly for Emerald if you substitute the addresses below. Also if you want to add in Contest data for new moves (only applies to R/S/E), the table locations and lengths are listed with the rest below below. I also copied the extra addresses from the end of the table instead of the beginning, but that shouldn't make any difference.

Table locations and lengths for Emerald/BPEE:
Code:
Attack Names - Start at 0x31977C, 4615 bytes (0x1207 hex) + 13*new
Attack Data - Start at 0x31C898, 4260 bytes (0x10A4 hex) + 12*new
      (PP Data - Start at 31C898+4)
Contest Move Data - Start at 0x58C2B4, 2840 bytes (0xB18 hex) + 8*new
Contest Effect Data - Start at 0x58CDCC, 1420 bytes (0x58C hex) + 4*new
Attack Description Table - Start at 0x61C524, 1420 bytes (0x58C hex) + 4*new
Attack Animation Table - Start at 0x2C8D6C, 1420 bytes (0x58C hex) + 4*new
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Okay, so, I've correctly inserted the 3 routines for extending the move table past 512 moves.
I also inserted Doesn't reworked routine instead of Jambo's one.
Now there's a new(?) problem.
So my moves a working fine, everything part 512 works fine. But the problem is that my pokemon will now, now longer learn a new move, regardless of whether it is a new move or an old move.
I've checked the routines, and pointers and everything. Is there something else wrong with the routine or am I just stupid?
 

BugMania

The Bug Master
32
Posts
10
Years
  • Seen Nov 4, 2016
Okay, so, I've correctly inserted the 3 routines for extending the move table past 512 moves.
I also inserted Doesn't reworked routine instead of Jambo's one.
Now there's a new(?) problem.
So my moves a working fine, everything part 512 works fine. But the problem is that my pokemon will now, now longer learn a new move, regardless of whether it is a new move or an old move.
I've checked the routines, and pointers and everything. Is there something else wrong with the routine or am I just stupid?





See this routine I wrote:
Spoiler:

So, instead of using the routine of the Jambo51, use this:
Spoiler:

This causes, instead of loading the movesettable adding to the level of the Pokemon, directly loading a byte of memory to your taste!
...
In this case, the movements were loaded with my previous routine.
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Wait wait, how would I insert those routines? I only inserted the second one and replaced Doesn't fixed routine with yours, so I essentially replaced the second routine.
That still wouldn't work, so I'm going to ask that, do I just insert the first routine anywhere? What other bytes do I have to modify to branch to the first routine?

My theory is that, maybe, the first routine is the problem, since the 512+ moves are loading correctly, and its just that I'm not learning any moves. But I don't know...
 

BugMania

The Bug Master
32
Posts
10
Years
  • Seen Nov 4, 2016
Wait wait, how would I insert those routines? I only inserted the second one and replaced Doesn't fixed routine with yours, so I essentially replaced the second routine.
That still wouldn't work, so I'm going to ask that, do I just insert the first routine anywhere? What other bytes do I have to modify to branch to the first routine?

My theory is that, maybe, the first routine is the problem, since the 512+ moves are loading correctly, and its just that I'm not learning any moves. But I don't know...

Ok, sorry if I was not very clear ...
Spoiler:

Spoiler:
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
After all of that, my Pokemon still won't learn any new moves.
However, the error in Jambo's original routine (the one Doesn't points out) has been erased so, that's a plus.

I'm sorry for causing you this trouble, but, I just think that figuring this out is something that needs to be done.
 
76
Posts
15
Years
  • Age 31
  • Seen Aug 8, 2021
Welp, since nobody else wants to try to help out Emerald hackers, I guess I'll throw these in here.
These are all Emerald pointers, obviously.
Attack data: 31C898
Name data: 31977C
Anim data: 2C8D6C
Limiter: 14e504
Effects data: Haven't got a ****ing clue, the tutorial fails me for this one
 

bcrobert

Lazy Antagonist
82
Posts
12
Years
  • Seen Aug 8, 2022
Welp, since nobody else wants to try to help out Emerald hackers, I guess I'll throw these in here.
These are all Emerald pointers, obviously.
Attack data: 31C898
PP data: 31c89d
Name data: 31977C
Anim data: 2C8D6C
Limiter: 14e504
Effects data: 2d86a8
Contest data: 58c2b4

Does this help? My additions are in bold. I haven't tested these myself but I believe they're correct. Thought I'd chime in since you saved me the trouble of tracking down the limiter. ;)

EDIT. Tlachtli had covered literally everything except the limiter without me realizing it somehow. These are correct but scroll up to post 91 for a more detailed answer.
 
Last edited:

Teh Blazer

Divider of Zero
776
Posts
15
Years
I repointed my table and added new moves, but now my status effect animations have changed to my new moves (ex: instead of z's when you're asleep a bunch of rocks fall on your head). Was there something I forgot to repoint?
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
I repointed my table and added new moves, but now my status effect animations have changed to my new moves (ex: instead of z's when you're asleep a bunch of rocks fall on your head). Was there something I forgot to repoint?

Is this just on the new moves or the old moves as well? If it's just the new moves, don't worry, that's normal because the animation pointers get shifted over one place. But if it's the old moves as well, you might have don't something very wrong with the pointers to the animation pointer table or messed up one of the animation script pointers. Make sure you backup and quintuple check everything.
 
Back
Top