Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2017-01-25 13:23:32

Maniac379
Member
Registered: 2015-01-15
Post 26/71

[pokecrystal] Edited moves not working right

I'm new to Pokecrystal so I'm starting by redoing what I had already done in my still rather generic White Gold hack.  First thing I tried is replacing old moves with new moves.  I replaced doubleslap with dark pulse which seems to function correctly.  I think replaced razor Wind with nasty plot.  I know raising sp attack was an unused effect so initially I set it to use the swords dance effect and it confuses the enemy instead for some reason.  Next I tried swapping a move for earth power which seems to lower sp attack on hit chance even though it says it should be lowering sp def.  I also swapped Take Down for Brave Bird keeping the same effect (ignoring that it needs a different recoil % for now) and it's acting like focus energy.

Not sure what's going on here...

https://github.com/maniac379/White-Crystal2

My guess is maybe since the new move names have different amounts of characters it is shifting the rest of the move section over causing it to intepret the wrong numbers?  But the PP and type seem correct...

Last edited by Maniac379 (2017-01-25 17:53:18)


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#2 2017-01-25 23:56:31

Rangi
Member
Registered: 2016-05-09
Post 483/634

Re: [pokecrystal] Edited moves not working right

Reread the guide to adding a new move with a new effect, and be careful with the difference between a move, a move effect, and a battle command.

• The constants in constants/move_constants.asm should correspond with the tables in battle/move_names.asm, battle/moves/move_descriptions.asm, battle/moves/moves.asm, and battle/anims.asm.
• The "move effects" constants in constants/battle_constants.asm should correspond with the table in battle/moves/move_effects_pointers.asm. (The definitions go in battle/moves/move_effects.asm.)
• The table in macros/move_effect.asm should correspond with the table in battle/effect_command_pointers.asm. (The definitions go in battle/effect_commands.asm.)

Your move definitions for Nasty Plot look okay, although its description isn't updated and it's defined to use EFFECT_ATTACK_UP_2 instead of EFFECT_SP_ATK_UP_2.

The problem seems to be with move effects. You inserted "dw NastyPlot" between OHKOHit and SuperFang in battle/moves/move_effects_pointers.asm, but without a corresponding "const EFFECT_NASTY_PLOT" in constants/battle_constants.asm. (Which isn't even used in battle/moves/moves.asm. Not that you needed it; just use the existing EFFECT_SP_ATK_UP_2.)

It looks like you haven't modified the battle commands, which is appropriate, since all the ones you need already exist.

TL;DR: delete "dw NastyPlot" from battle/moves/move_effects_pointers.asm and just use EFFECT_SP_ATK_UP_2 in battle/moves/moves.asm for Nasty Plot.

Last edited by Rangi (2017-01-26 02:42:49)


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#3 2017-01-27 02:05:41

Maniac379
Member
Registered: 2015-01-15
Post 27/71

Re: [pokecrystal] Edited moves not working right

Ok I was about to have questions about this if it worked but it seemed to have not worked.  I want to understand the core function in before I do description/animation/sound.

I did your TL;DR version as well.  Then I also put NastyPlot above the correct effect in move_effects (before was on the Swords Dance effect).  I also then removed NastyPlot completely.  Nope

Makes sense to me not to mess with battle commands since I'm not using new effects.  I had that dw NastyPlot there because every move seemed to be there.  dw SwordsDance is there even though it also isn't listed  constants/battle_constants.asm so that point confuses me.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#4 2017-01-27 02:31:19

Rangi
Member
Registered: 2016-05-09
Post 489/634

Re: [pokecrystal] Edited moves not working right

You did not delete "dw NastyPlot" from battle/moves/move_effects_pointers.asm.

If you haven't made many changes so far, I would suggest using a fork of pokecrystal to help narrow down bugs.

• Instead of making your own White-Crystal2 repository and having those huge initial commits of every single file, go to pret/pokecrystal and click Fork in the top-right. You'll then have your own forked pokecrystal with all its files.
• Clone the pokecrystal fork locally, just as you've done with White-Crystal2, but make changes in sets. For example, just add Nasty Plot, making every code change that you need to do so, and then commit them (with a useful message like "Added Nasty Plot", not just blank). Then you or anyone else can see your commit history, click the "Added Nasty Plot" commit, and see what changes you made. It's easy to spot a line in the wrong place, or a file you should have updated but didn't.


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#5 2017-01-27 02:36:26

Maniac379
Member
Registered: 2015-01-15
Post 28/71

Re: [pokecrystal] Edited moves not working right

Ok I didn't know if we were actually going to check the changes to my uploaded file.  I uploaded it not.  I am doing push updates in Cygwin because I couldn't figure out how to reasonably upload this many files to begin with.  It doesn't seem to give me an option to add comments when I do that.  Haven't decided if I'll use Github or my own back up yet.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#6 2017-01-27 02:50:43

Rangi
Member
Registered: 2016-05-09
Post 491/634

Re: [pokecrystal] Edited moves not working right

In Cygwin you would do this:

git commit -m "Add Nasty Plot"
git push

But you might prefer TortoiseGit. It adds an Explorer GUI extension, so you can do things like right-click a file and do TortoiseGit→Add, then TortoiseGit→Commit and type a message in the dialog, then it'll automatically ask to push. Or TortoiseGit→Diff shows the uncommitted changes you've made.

Last edited by Rangi (2017-01-27 02:51:01)


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#7 2017-01-27 02:56:24

Rangi
Member
Registered: 2016-05-09
Post 492/634

Re: [pokecrystal] Edited moves not working right

Maniac379 wrote:

I had that dw NastyPlot there because every move seemed to be there.  dw SwordsDance is there even though it also isn't listed  constants/battle_constants.asm so that point confuses me.

Yeah, some of the move effects just have the same name as their corresponding move.

If you pair up constants/battle_constants.asm and battle/moves/move_effects_pointers.asm in a spreadsheet, you'll see this correspondence:

const EFFECT_FOCUS_ENERGY    dw FocusEnergy
const EFFECT_RECOIL_HIT      dw RecoilHit
const EFFECT_CONFUSE         dw DoConfuse
const EFFECT_ATTACK_UP_2     dw SwordsDance
const EFFECT_DEFENSE_UP_2    dw DefenseUp2
const EFFECT_SPEED_UP_2      dw Agility
const EFFECT_SP_ATK_UP_2     dw SpecialAttackUp2

So the names aren't identical. The compiler doesn't care. If you're unsure what a name is associated with, pair them up and check.


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#8 2017-01-27 03:01:09

Maniac379
Member
Registered: 2015-01-15
Post 29/71

Re: [pokecrystal] Edited moves not working right

Yeah that's what I mean there is both a dwAttackUp2 and a dwSwordsDance.  Yet you suggested that by me putting in dwNastyPlot since there was already dwSpAttkUp2 that was the error.

Again I did that change but it didn't seem to fix the problem with Nasty Plot.   Does the order of that list matter?

I appreciate the help.  I learned a lot about hex editing/scripting and stuff before but this time around I want to really learn how to use this pokecrystal.  I think I will look into tortoisegit.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#9 2017-01-27 03:46:16

Rangi
Member
Registered: 2016-05-09
Post 493/634

Re: [pokecrystal] Edited moves not working right

Maniac379 wrote:

Yeah that's what I mean there is both a dwAttackUp2 and a dwSwordsDance.  Yet you suggested that by me putting in dwNastyPlot since there was already dwSpAttkUp2 that was the error.

Again I did that change but it didn't seem to fix the problem with Nasty Plot.   Does the order of that list matter?

I appreciate the help.  I learned a lot about hex editing/scripting and stuff before but this time around I want to really learn how to use this pokecrystal.  I think I will look into tortoisegit.

I see no "dw AttackUp2" in the original pokecrystal's battle/moves/move_effects_pointers.asm. Sure, battle/moves/move_effects.asm defines SwordsDance and AttackUp2 as the same thing, but that doesn't matter. You can define whatever labels you want. Calling a label "SwordsDance" doesn't somehow associate it with the move Swords Dance; the assembler doesn't know what any of the words mean. The meaning comes from how you use it.

In this case, battle/moves/moves.asm has a table of move properties, and defines their effects with the constants from constants/battle_constants.asm. Those constants are used as indexes into a table of move effect pointers in battle/moves/move_effects_pointers.asm, and the effects being pointed to are defined in battle/moves/move_effects.asm. So if you see an effect in battle/moves/move_effects.asm that has two labels, SwordsDance and AttackUp2, you figure out which one matters by seeing which label is used in the pointer table.

The order of any list matters very much. If you mean the list of constants, the constant values go 0, 1, 2, etc in order. If you mean the list of pointers, they have to correspond exactly with the constants.


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#10 2017-01-27 12:43:50

Maniac379
Member
Registered: 2015-01-15
Post 30/71

Re: [pokecrystal] Edited moves not working right

Oh ok I follow you.  Also I see my confusion because my battle/moves/move_effects_pointers.asm has dw SwordsDance but I didn't see that it the does not have a dw AttackUp2 and I then realized that every other stat boost attack only lists the actual attack or the effect and not both.  So that clears that up.  If I wanted to list NastyPlot in that table I should be replacing SpecialAttackkUp2 and not what I did replace....

OOOO

Order matters and I see that when replacing what I might not have needed to replace in that file I shifted the entire list down.  I am 99% sure this is why I'm getting the confuse effect on nasty plot!  Will confirm tonight!


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#11 2017-01-27 23:44:32

Maniac379
Member
Registered: 2015-01-15
Post 31/71

Re: [pokecrystal] Edited moves not working right

Yes this completely fixed the issue!  I have a much better understanding of this now.  My original impression of pokecrystal was that it would function more like a programming language with all the variables being defined.  I didn't realize it was more like a very well done visual interpretation of the hex code.  The benefit of compiling every time and not having to move around and repoint for free space alone makes this sooo nice.

Going to dive into animations here in a bit


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#12 2017-01-28 04:05:27

Rangi
Member
Registered: 2016-05-09
Post 494/634

Re: [pokecrystal] Edited moves not working right

My original impression of pokecrystal was that it would function more like a programming language with all the variables being defined.  I didn't realize it was more like a very well done visual interpretation of the hex code.

Exactly. :) Glad I could help!


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#13 2017-01-28 04:58:41

Maniac379
Member
Registered: 2015-01-15
Post 32/71

Re: [pokecrystal] Edited moves not working right

I know you've done it in your hack but things like adding Running Shoes, Physical/Special split, and other changes of that nature...is there documentation or trial and error?  I know there's a movement.asm file and a file that defines special and physical based on type.  I was going to try and look at your disassembly for polished crystal but the changes are soooo drastic and I only seem to be able to see the comments on the last update to the file.

I downloaded and set up git tortoise but not sure how to link it in with my github still.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

Board footer

Powered by FluxBB