• 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?".
  • 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.

Tool: [Gen IV] Move Data Editing

BluRose

blu rass
811
Posts
10
Years
  • Hello everyone! Looking into Gen IV move editing lately. Wanted to streamline the process.

    I whipped up a very simple batch script using armips and narchive plus a few files that builds the move data narc (a/0/1/1 or waza_tbl.narc) from scratch using labeled constants.

    Here's the GitHub repository:
    hgss-moves

    Currently, it's built to match the move data from HGSS (the output is literally narc a011). No idea whether or not the DPPt data matches or not, but am certain that it has the same structure.

    There are build instructions in the repository, but putting them here too:

    1.) Make the edits that you would like. The move data is enumerated in moves.s. Unless if you know what you are doing, you shouldn't need to edit any of the other files.
    2.) Place armips and narchive executables from the link above in the folder that you downloaded of the repository.
    3.) Run build.bat. It runs armips on the moves.s file to build all the data subfiles, runs narchive on the subfiles, and then deletes all the subfiles so all that is left is the output waza_tbl.narc.
    4.) Replace the file at a/0/1/1 in your HGSS ROM (or possibly DPPt's waza_tbl.narc, untested though) with the waza_tbl.narc that was generated from this repository.
    5.) Bam! Move data edited.


    There are also 2 free bytes at the end of each move! They are literally there as padding.


    What still needs to be done?
    - It appears like the field that I have labeled as contest's appeal is actually somewhat of a Contest Effect field. Will look into it eventually, but as of the moment am not interested
    - Figure out how to expand moves and how this behaves with it
    - Move animations and battle scripts
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • i guess i should go over move data structure really quickly

    each individual subfile in narc a011 covers one move. that is how the git repo is set up; create the files for the moves and then combine them with narchive to create the resulting file

    structure of each move's data:
    Code:
    2 bytes - battle effect (corresponds with battle script in narc a030)
    1 byte - physical, special, or status move?  (0, 1, or 2?)
    1 byte - base power
    1 byte - type (check [url=https://github.com/BluRosie/hgss-moves/blob/master/constants.s]this[/url] for type enumerations)
    1 byte - accuracy (out of 100)
    1 byte - base power points
    1 byte - secondary effect change (i.e. chance that thunder paralyzes or chance that metal claw raises attack)
    2 bytes - target
    1 byte - priority (negative numbers supported)
    1 byte - flags (similar to the gen 3 field)
    1 byte - contest effect
    1 byte - contest type (check above constants file for enumerations)
    2 bytes - always 0 (padding)
    main thing to note is that the battle effect field corresponds with the subfile in narc a030. these are their own scripts of sorts.

    battle scripts are SUPER inefficient. every last parameter is 4 bytes.
    but yes that's the move data structure.
    i'll try and dissect some battle scripts eventually

    something to look into--how are animations assigned? the way i would do it is just sequential in a narc, i.e. narc aNNN[move] == animation script. we'll see how game freak did it tho
     
    7
    Posts
    6
    Years
    • Seen Apr 24, 2022
    Hm lucky that I randomly find this actual thread about gen 4 attack editing lol.
    So I've been looking into attack editing of pokemon platinum and I figured how the basic hex editing for pp, power, accuracy and type works. What I can't figure out is how to change those additional effects. Like not the effect chance but the effect itself. For example that an attack paralyzes instead of freezing. Or adding/changing an effect to a multi hit attack, like icicle spear or an status move like leer. Is that even possible?
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • Hm lucky that I randomly find this actual thread about gen 4 attack editing lol.
    So I've been looking into attack editing of pokemon platinum and I figured how the basic hex editing for pp, power, accuracy and type works. What I can't figure out is how to change those additional effects. Like not the effect chance but the effect itself. For example that an attack paralyzes instead of freezing. Or adding/changing an effect to a multi hit attack, like icicle spear or an status move like leer. Is that even possible?

    the first two bytes of each move's data is the file index in narc a030 of the battle script that codes that specific move's effect
    i haven't done much since completing this since college ramped up, but basically we need to be looking for a limiter on all of that data--a max file number in the code somewhere
    i haven't even tested if there is a limiter or not (copying an identical battle script to a new effect then assigning that effect would tell if there is a limiter or not)
    but changing the effect would require changing the battle script itself, yep
     
    7
    Posts
    6
    Years
    • Seen Apr 24, 2022
    Soo it's a been while since I worked on this so not sure if I can remember everything, but I did write stuff down so hopefully I can. Will write a guide on it if people are interested then as well.
    Thanks to your find with the actual effects being stored in the a/0/3/0 narc or the be_seq.narc for platinum I figured how to get most additional effects with attacks working. Like adding a status effect to a multi-attack hit. I even figured how to make some new additional effects, like the one's in quiver dance and coil. There is one issue with them, but it's relatively small so I think it's still worth using them.
    Anyway what I realised now is, if it would be possible to actually add moves instead of replacing existing one's would make this even greater. Buut I'm assuming this requires ASM, which is definitely past me. Did you ever do any research on this?
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • Soo it's a been while since I worked on this so not sure if I can remember everything, but I did write stuff down so hopefully I can. Will write a guide on it if people are interested then as well.
    Thanks to your find with the actual effects being stored in the a/0/3/0 narc or the be_seq.narc for platinum I figured how to get most additional effects with attacks working. Like adding a status effect to a multi-attack hit. I even figured how to make some new additional effects, like the one's in quiver dance and coil. There is one issue with them, but it's relatively small so I think it's still worth using them.
    Anyway what I realised now is, if it would be possible to actually add moves instead of replacing existing one's would make this even greater. Buut I'm assuming this requires ASM, which is definitely past me. Did you ever do any research on this?

    howdy! i apologize for not being too active on the forums as of late!
    i have actually managed to significantly improve the repository that i linked.
    new moves, effects, and animations have actually all been figured out. there is currently placeholder data for all of the gen 5 moves and a few more that have been figured out lately. i am currently working, with a chinese hacker named bubble, on importing all of the gen 5 moves. if you would like to help, feel free to shoot me a message on discord or even responding here (but please respond so i get a notification lol). you can keep track of these at the github repository

    the issues tab currently has a list of all that has been done thus far

    EDIT: i'll also have to update the opening post at some point. would be really cool to get a bunch of contributors going

    here's a few gifs of the few moves with animations that we have, note that soak currently has hone claws' animation (and incinerate has tackle's) and wide guard's/incinerate's effect has yet to be programmed:
    [Gen IV] Move Data Editing
    [Gen IV] Move Data Editing
    [Gen IV] Move Data Editing
    [Gen IV] Move Data Editing
    [Gen IV] Move Data Editing
     
    Last edited:
    Back
    Top