Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-01-19 01:50:02

Maniac379
Member
Registered: 2015-01-15
Post 1/42

[G/S] Changing Moves

I've been working on a Gold hack and Miksy91 has been helping me able to answer most of my questions so far ha (http://www.pokecommunity.com/showthread … ost8577985).  I'm going to ask this one here because I want to get Mateo's attention too ha.

Btw great website with tons of useful information.

Anyway I am currently looking to replace some current moves with some new moves.  Now I believe I can do a lot with existing effects to start off with.  I found the offsets to hex edit the text name and descriptions of moves.  I also have a program I could use to edit moves for existing conditions.  Now I'm really looking for how to do this without that program for when I want to also add new moves effects (I'm assuming there's room here and I wouldn't have to overwrite existing).  Namely the offsets first would be a great help.  This thread seemed relevent (http://hax.iimarck.us/topic/4098/) but there is little info on the offsets and how I'm to convert the assembly code correctly (I imagine using my gbasmedit program).

Now I mentioned Mateo's name because I noticed your Christmas ROM hack has loads of stuff that I am/was planning to do but I'm doing this for fun and I was hoping you could shed some light on your implementation of physical/special split to the attacks.  I found this (http://hax.iimarck.us/topic/4542/) but it's for Red and I don't know enough yet to find my own offsets to say the least.

Last edited by Maniac379 (2015-01-19 01:52:23)

Offline

#2 2015-01-19 08:50:28

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 236/411
Website

Re: [G/S] Changing Moves

The pointer table of the move effects is at 0x271f4 (09:71f4) in Crystal, but I don't know its exact location in G/S. Just try to find a big pointer table around that area I guess.

Battle commands 3c and 5d are unused in Crystal, so I guess they are unused in G/S too. You may use them to create your own battle command with assembly language. Otherwise you can just make use of the existing battle commands and combine it in different ways (as long as it makes sense) to create new move effects, like Chamber did with Dragon Tail.

All the useful information can be found here:
https://github.com/kanzure/pokecrystal/ … inters.asm
https://github.com/kanzure/pokecrystal/ … ffects.asm
https://github.com/kanzure/pokecrystal/ … mmands.asm

Last edited by Crystal_ (2015-01-19 08:50:54)

Offline

#3 2015-01-19 17:47:38

Maniac379
Member
Registered: 2015-01-15
Post 2/42

Re: [G/S] Changing Moves

How do I interpret this information.  I have assembly editor but it doesn't simplify code into easy to read words like checkobideience like the links do.  That being said I also don't know how to take the links code and compile it/hex edit it without any offsets.  I figure at the least if I have an offset I can relate hex numbers to what the code is saying on my own.  What sort of program are those links meant to be used with because I already have JohtoMap/Pksvu/Goldfinger/Gameboy Assembler Editor.  The closest thing that seems to relate would be using Pksvu to decompile at the move effect table offset, otherwise I don't have anything that would relate those representative words for the actual code.

Offline

#4 2015-01-19 19:30:24

Miksy91
Member
Registered: 2010-10-16
Post 2,157/2,305

Re: [G/S] Changing Moves

Hi,

I mentioned disassembly briefly in one post there. That "pokecrystal" is a disassembly of pokemon crystal that you can work with to make a hack too. That would mean you wouldn't have to hex edit much at all but play around with textual asm code a lot (= more convenient that editing the asm routines built in the rom).

Offline

#5 2015-01-19 20:00:54

Maniac379
Member
Registered: 2015-01-15
Post 3/42

Re: [G/S] Changing Moves

Ha hey Miksy!

So my question would be what sort of program would I need to look into using for such a thing.  Then it seems a lot of the disassembly stuff is based for crystal not for gold/silver so if I eventually want to get into adding/editing maps such as putting a safari zone back in the game should I get into disassembly or stick with what I've been doing.  Can I switch back and forth between doing disassembly and hex editing?  I'm fine with hex editing honestly, it's not to cumbersome as long as I have references as to where code snippets start for scripts, text(text is slow though), and the like.  I'm willing to learn whatever, already learned this much.

Offline

#6 2015-01-19 21:49:04

Danny-E 33
Administrator
Registered: 2012-06-09
Post 841/1,022

Re: [G/S] Changing Moves

Maniac379 wrote:

I'm fine with hex editing honestly, it's not to cumbersome

I used to feel the same way


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#7 2015-01-20 00:54:41

Maniac379
Member
Registered: 2015-01-15
Post 4/42

Re: [G/S] Changing Moves

Well I found the offset for move data, now if I want to create a new effect though...

Offline

#8 2015-04-04 21:13:23

Urnighter
Member
Registered: 2015-01-17
Post 44/123

Re: [G/S] Changing Moves

I have a question dealing with adding moves.

So I attempted to add Night Slash as $fc in move_constants.asm, but my pokemon simply learned Beat Up ($fb) in game. I suppose I can't simply expand the list by adding new letters after f? Is there any way to add a new move without replacing an existing one?

Offline

#9 2015-04-05 19:50:30

Maniac379
Member
Registered: 2015-01-15
Post 6/42

Re: [G/S] Changing Moves

Urnighter wrote:

I have a question dealing with adding moves.

So I attempted to add Night Slash as $fc in move_constants.asm, but my pokemon simply learned Beat Up ($fb) in game. I suppose I can't simply expand the list by adding new letters after f? Is there any way to add a new move without replacing an existing one?

In G/S/C there is not enough empty space in the move data locations to add new moves, there might be like 2 or 3 empty slots but all other 250 slots are taken of the 254.  So no, you have to replace an existing move.  (And remember to account for all the pokemon movesets/tm changes this might cause)

Offline

#10 2015-04-05 22:51:34

comet
Member
Registered: 2012-04-09
Post 548/672

Re: [G/S] Changing Moves

Move identifiers are a byte. 0 means no move and 255 (-1) is usually a list terminator. This leaves 1-254 (1-fe). So it's an implementation problem.

You can make it use 2 bytes instead, by modifying any code that handles moves and extending the relevant structs in wram/sram.

Offline

#11 2015-04-05 22:58:55

Urnighter
Member
Registered: 2015-01-17
Post 46/123

Re: [G/S] Changing Moves

I just attempted to add Night Slash by replacing Conversion. I swapped conversions name for slash everywhere it appeared, changed the animation to be the same as slashes, and changed its power/accuracy etc. to Night Slash's in gen 4, but in game it just appears as glitched nonsense text and crashes the game.

Any ideas what I did wrong? Is there a list of everything I would have to change to successfully replace the move?

Offline

#12 2015-04-05 23:14:45

comet
Member
Registered: 2012-04-09
Post 549/672

Re: [G/S] Changing Moves

Don't know what the problem could be without seeing your changes. As usual, post the result of running "git diff".

As for 0xfc turning into 0xfb, you probably need to increment the NUM_ATTACKS constant. Ideally, this would be automatic.

Offline

#13 2015-04-05 23:48:26

Urnighter
Member
Registered: 2015-01-17
Post 47/123

Re: [G/S] Changing Moves

Never tried git diff before, but this is what happens when I run it. Do I need to specify a specific area of pokecrystal?

git diff wrote:

michael-williams-computer:pokecrystal Dad$ git diff
diff --git a/Makefile b/Makefile
index d65dfb8..ccf0395 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ $(all_obj): $$*.asm $$($$*_dep)
pokecrystal.gbc: $(crystal_obj)
        rgblink -n $*.sym -m $*.map -o $@ $^
        rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
-       cmp baserom.gbc $@
+#      cmp baserom.gbc $@


pngs:
diff --git a/audio.asm b/audio.asm
index 58af4ad..19f7e8d 100644
--- a/audio.asm
+++ b/audio.asm
@@ -109,7 +109,7 @@ INCLUDE "audio/music/johtowildbattle.asm"
INCLUDE "audio/music/johtowildbattlenight.asm"
INCLUDE "audio/music/johtotrainerbattle.asm"
INCLUDE "audio/music/lookyoungster.asm"
-INCLUDE "audio/music/tintower.asm"
+INCLUDE "audio/music/belltower.asm"
:

Offline

#14 2015-04-06 00:01:41

comet
Member
Registered: 2012-04-09
Post 550/672

Re: [G/S] Changing Moves

By default it filters the output through a program called "less", which lets you scroll through, but makes copying tough. You can write the whole thing to a file called diff.txt with "git diff > diff.txt".

Offline

#15 2015-04-06 00:27:20

Urnighter
Member
Registered: 2015-01-17
Post 48/123

Re: [G/S] Changing Moves

Well, that got quite a bit longer.

Too long for the forum limit, so maybe this will work?

http://www.writeurl.com/text/73nh01hssl … qccvshi2g4

That's quite a lot to look through, though.

Note I also attempted to put Leaf Blade over Conversion 2.

Offline

#16 2015-04-06 01:17:10

comet
Member
Registered: 2012-04-09
Post 551/672

Re: [G/S] Changing Moves

These stand out:

diff --git a/battle/effect_command_pointers.asm b/battle/effect_command_pointers.asm
index 073fe40..4775359 100644
--- a/battle/effect_command_pointers.asm
+++ b/battle/effect_command_pointers.asm
@@ -32,7 +32,6 @@ BattleCommandPointers: ; 3fd28
     dw BattleCommand1c ; 361e4
     dw BattleCommand1d ; 362e3
     dw BattleCommand1e ; 3705c
-    dw BattleCommand1f ; 3707f
     dw BattleCommand20 ; 3710e
     dw BattleCommand21 ; 36671
     dw BattleCommand22 ; 366e5
@@ -69,7 +68,6 @@ BattleCommandPointers: ; 3fd28
     dw BattleCommand41 ; 35864
     dw BattleCommand42 ; 35926
     dw BattleCommand43 ; 359d0
-    dw BattleCommand44 ; 359e6
     dw BattleCommand45 ; 35a53
     dw BattleCommand46 ; 35a74
     dw BattleCommand47 ; 35b16
diff --git a/battle/moves/move_effects_pointers.asm b/battle/moves/move_effects_pointers.asm
index 4f95544..71db521 100644
--- a/battle/moves/move_effects_pointers.asm
+++ b/battle/moves/move_effects_pointers.asm
@@ -28,7 +28,6 @@
     dw Rampage
     dw Whirlwind
     dw MultiHit
-    dw Conversion
     dw FlinchHit
     dw Heal
     dw Toxic
@@ -91,7 +90,6 @@
     dw Encore
     dw PainSplit
     dw Snore
-    dw Conversion2
     dw LockOn
     dw Sketch
     dw DefrostOpponent

You also need to put "const NIGHT_SLASH" after slash in move_constants.asm, to match the other references.

Icy Stone's attributes need to replace Up-Grade's.

IcyStoneDesc's pointer needs to be where UpGradeDesc's was.

The pointer to IcyStone in ItemEffects needs to be where UpGrade's was.

Last edited by comet (2015-04-06 01:27:26)

Offline

#17 2015-04-06 23:50:06

Urnighter
Member
Registered: 2015-01-17
Post 49/123

Re: [G/S] Changing Moves

Alright, so after poking around it seems like the BattleCommand05: ; 34631 is critical hits and thus should be used for both leaf blade and night slash? So, instead of having just deleted out dw BattleCommand1f ; 3707f and 359e6 I should have made them correspond with text that mirrored BattleCommand05: ; 34631? Sorry if this is completely off, I had foolishly assumed that by simply deleting every place that conversion was mentioned and replacing it with leaf blade and night slash it would work.

Thanks

Offline

#18 2015-04-07 03:19:34

comet
Member
Registered: 2012-04-09
Post 552/672

Re: [G/S] Changing Moves

The problem is that by deleting the pointer outright you're shifting the rest of the command table. The command id then maps to the wrong code. This is because the command ids (in macros/move_effect.asm) are static at the moment.

So you just need to make sure the other commands aren't shifted. You could put the pointers back, or you could just put filler there (for example, just "dw" without a label).

For the second case, you never added the pointers to the new move effects, just the labels.

Last edited by comet (2015-04-07 03:21:40)

Offline

#19 2015-04-07 20:50:24

Maniac379
Member
Registered: 2015-01-15
Post 6/42

Re: [G/S] Changing Moves

The way I changed old moves into new moves was much more straightfoward by manually changing the name and description in a hex code program and then using an attack editor to change the power/acc/effect(assuming effect exists already) into the game.  Then the level up moveset editor could change where the move was learned.

Offline

#20 2015-04-07 22:12:52

Urnighter
Member
Registered: 2015-01-17
Post 52/123

Re: [G/S] Changing Moves

comet wrote:

For the second case, you never added the pointers to the new move effects, just the labels.

Could you elaborate a little here? I assume the second case means the second area of code you highlighted, but I didn't add new labels to that section so I'm not sure. Also, I suppose I need dws there also due to it being static?

Also, I did another test just cause I was curious to see how it would work with the dws, and it all went perfect. Only issue is that leaf blade still has a glob of strange text tacked to the end, which I assume has to do with what you mentioned above but I failed to understand.

Last edited by Urnighter (2015-04-07 22:18:58)

Offline

#21 2015-04-08 00:32:33

comet
Member
Registered: 2012-04-09
Post 553/672

Re: [G/S] Changing Moves

Urnighter wrote:
comet wrote:

For the second case, you never added the pointers to the new move effects, just the labels.

Could you elaborate a little here? I assume the second case means the second area of code you highlighted, but I didn't add new labels to that section so I'm not sure. Also, I suppose I need dws there also due to it being static?

diff --git a/battle/moves/move_effects.asm b/battle/moves/move_effects.asm
index 1e3bd45..caf1372 100644
--- a/battle/moves/move_effects.asm
+++ b/battle/moves/move_effects.asm
@@ -22,6 +22,8 @@ EggBomb:
 Waterfall:
 Crabhammer:
 Slash:
+NightSlash:
+LeafBlade:
 Aeroblast:
 Megahorn:
 CrossChop:

The problem with Leaf Blade's text is this:

-    db "CONVERSION2@"
+    db "LEAF BLADE"

Offline

#22 2015-04-08 01:14:24

Urnighter
Member
Registered: 2015-01-17
Post 53/123

Re: [G/S] Changing Moves

Awesome! Thank you so much Comet.

When I work on adding new pokemon I'll likely run into some issues, so I hope you can point me in the right direction on my thread if I get confused.

Offline

#23 2015-04-11 19:13:24

Urnighter
Member
Registered: 2015-01-17
Post 54/123

Re: [G/S] Changing Moves

Alright, so now I'm working on move animations.

Night Slash went well and works fine, I combined Nightmare and Slash to get the animation.

Leaf Blade not so much. My goal is to get the leaves to pop up in the air from "Razor Leaf" and start to drift down followed rapidly by the "Cut" animation.

anims.asm wrote:

BattleAnim_LeafBlade: ; ca909
anim_1gfx ANIM_GFX_PLANT
anim_sound $0, SFX_VINE_WHIP
anim_obj $14, 48, 80, $28
anim_obj $14, 48, 80, $5c
anim_obj $14, 48, 80, $10
anim_obj $14, 48, 80, $e8
anim_obj $14, 48, 80, $9c
anim_obj $14, 48, 80, $d0
anim_wait 6
anim_obj $14, 48, 80, $1c
anim_obj $14, 48, 80, $50
anim_obj $14, 48, 80, $dc
anim_obj $14, 48, 80, $90
anim_wait 80
anim_sound $42, SFX_VINE_WHIP
anim_incobj $3
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $5
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $7
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $9
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $1
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $2
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $4
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $6
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $8
anim_wait 2
anim_sound $42, SFX_VINE_WHIP
anim_incobj $a
anim_wait 2
anim_1gfx ANIM_GFX_CUT
anim_sound $1, SFX_CUT
anim_obj $3a, 152, 40, $0
anim_wait 32
anim_ret
; ca939

I've tried about 6 different times by messing with what I include and what I don't include without much luck. I'm sure I could get it if I just kept experimenting, but if I could have an explanation of what exactly was wrong that would save a lot of time.

Offline

#24 2015-04-12 02:17:53

comet
Member
Registered: 2012-04-09
Post 555/672

Re: [G/S] Changing Moves

10 must be the max amount of objects you can have at a time. Putting "anim_clearobjs" before the cut stuff works for me.

Offline

Board footer

Powered by FluxBB