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

[EM] Battle Engine Upgrade (On Halt, Will undergo reboot!)

Status
Not open for further replies.
794
Posts
10
Years
  • NOTE:
    Nature colored stats have been erased from the project. If you want them in your hack, check out my signature link.(Reason it got deleted was because it's not directly related to battling and had conflicting hooks).
    If your game crashes upon entering poke summary reapply the nature stat hack that's present in my signature. (Don't forget to change the offsets tho!)

    NOTE2:
    build, insert and pgeinidump scripts have been renamed to build.py, insert.py and pgeinidump.py respectively to signify that they are written in Python language.

    Sorry for all the troubles!
     

    LCCoolJ95

    Limited Capacity
    638
    Posts
    14
    Years
  • Have this glitch when leveling up...empty spots in party level up:
    57c37d4f0f2410bdcc3f0cceb19c902f_500.png
     

    Marky Vigoroth

    ...I just liked the Skarmory icon.
    171
    Posts
    8
    Years
  • I know that I said that I was going to ask you over private-messaging, but I thought that this thread would have been better.

    I want to do the following modifications to my local copy this engine:
    • The 'Steel' type is renamed to the 'Metal' type.
    • In addition to the 'Fairy' type, there are also 'Light,' 'Sound,' and 'Rainbow' types.
    tumblr_inline_n4asxmS6Qe1rskww2.bmp
    (This is from a screengrab of NSE working on FireRed, but I want to give an idea of what I want to achieve in my hack.)

    So far, I had done the following modifications to off-folder copies of these files:
    poke_types.h
    Spoiler:

    asm_defines.s
    Spoiler:

    types_expansion.s
    Spoiler:


    What else do I need to do? I am very familiar with C++ (not C proper, though) and assembly, plus I could understand your technical explanation last time.
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    I know that I said that I was going to ask you over private-messaging, but I thought that this thread would have been better.

    I want to do the following modifications to my local copy this engine:
    • The 'Steel' type is renamed to the 'Metal' type.
    • In addition to the 'Fairy' type, there are also 'Light,' 'Sound,' and 'Rainbow' types.
    tumblr_inline_n4asxmS6Qe1rskww2.bmp
    (This is from a screengrab of NSE working on FireRed, but I want to give an idea of what I want to achieve in my hack.)

    So far, I had done the following modifications to off-folder copies of these files:
    poke_types.h
    Spoiler:

    asm_defines.s
    Spoiler:

    types_expansion.s
    Spoiler:


    What else do I need to do? I am very familiar with C++ (not C proper, though) and assembly, plus I could understand your technical explanation last time.

    You need to edit the type chart in as well. It is in battle_system.c or the damage_calc file.
     

    Marky Vigoroth

    ...I just liked the Skarmory icon.
    171
    Posts
    8
    Years
  • You need to edit the type chart in as well. It is in battle_system.c or the damage_calc file.
    Thank you so much! The new type table works!
    When-Woody-hugs-Totoro-you-wish-you-could-hug-him-too.gif


    PGE is acting a little weird, though. I do not know if either PGE or the engine are at fault, but, no matter whether I use the stable or beta version of PGE, the move effects appear messed up, but the actual effects are fine. (One example is Ember: this move gives a probability of burning, but PGE says that the move lowers the opponent's Attack. However, in the actual ROM, the move burns instead of lowering Attack.) I do not know of any place where I can put the new offsets, though, given that I looked just about everywhere, including the roms.ini file.

    UPDATE 0: ...never mind. My copy of PGE was out of date.
    UPDATE 0: No; wait... the relationship really is messed up. Fire Punch, Ice Punch, and Thunderpunch all have the same effect in PGE, plus I cannot change the additional effect of Scratch; the ROM does not recognise the change. What is wrong?
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    Thank you so much! The new type table works!
    When-Woody-hugs-Totoro-you-wish-you-could-hug-him-too.gif


    PGE is acting a little weird, though. I do not know if either PGE or the engine are at fault, but, no matter whether I use the stable or beta version of PGE, the move effects appear messed up, but the actual effects are fine. (One example is Ember: this move gives a probability of burning, but PGE says that the move lowers the opponent's Attack. However, in the actual ROM, the move burns instead of lowering Attack.) I do not know of any place where I can put the new offsets, though, given that I looked just about everywhere, including the roms.ini file.

    UPDATE 0: ...never mind. My copy of PGE was out of date.
    UPDATE 0: No; wait... the relationship really is messed up. Fire Punch, Ice Punch, and Thunderpunch all have the same effect in PGE, plus I cannot change the additional effect of Scratch; the ROM does not recognise the change. What is wrong?

    We have the changed the order of move effects. So it doesn't match in PGE. See the battle_script_for_moves.s file for the exact order. The support for custom move effect will come in the next release of PGE and then I'll put the config file for the new order.
     

    Gamer2020

    Accept no Imitations!
    1,062
    Posts
    15
    Years
  • We have the changed the order of move effects. So it doesn't match in PGE. See the battle_script_for_moves.s file for the exact order. The support for custom move effect will come in the next release of PGE and then I'll put the config file for the new order.
    It's already implemented. Just gotta edit PGEAttackEffects.txt
     
    4
    Posts
    7
    Years
    • Seen Mar 20, 2024
    Okay, so I've been fiddling around with my rom, reading this thread, and I've gotten almost everything to work. The moves, abilities, etc. However, I can't seem to edit the Pokemon in any editor. G3T and G3HS I've been told don't work and the only editor that supposedly works is PGE.

    I can get everything in PGE working but the Pokemon Editor. I get this error message:

    Spoiler:


    It then allows me to enter the Pokemon editor. Everything seems to be right, but when I select any Pokemon it tells me this: imgurcom/a/Ri1XL
    I don't have any other programs with the rom open. I then get the same error message as before and selecting continue just locks up the program. I don't think I've seen anyone else have this problem, can anyone help? I'm using the latest version of PGE from github.
     

    Gamer2020

    Accept no Imitations!
    1,062
    Posts
    15
    Years
  • Okay, so I've been fiddling around with my rom, reading this thread, and I've gotten almost everything to work. The moves, abilities, etc. However, I can't seem to edit the Pokemon in any editor. G3T and G3HS I've been told don't work and the only editor that supposedly works is PGE.

    I can get everything in PGE working but the Pokemon Editor. I get this error message:

    Spoiler:


    It then allows me to enter the Pokemon editor. Everything seems to be right, but when I select any Pokemon it tells me this: imgurcom/a/Ri1XL
    I don't have any other programs with the rom open. I then get the same error message as before and selecting continue just locks up the program. I don't think I've seen anyone else have this problem, can anyone help? I'm using the latest version of PGE from github.

    https://github.com/Gamer2020/PokemonGameEditor/issues
     

    Trainer 781

    Guest
    0
    Posts

    Ooh, that's great. How come did I manage to miss it.
    Then onto editing the PGEAttackEffects.txt file.

    UPDATE 0: No; wait... the relationship really is messed up. Fire Punch, Ice Punch, and Thunderpunch all have the same effect in PGE, plus I cannot change the additional effect of Scratch; the ROM does not recognise the change. What is wrong?

    EDIT: The PGEAttackEffects.txt is added in the repo. Replace the one of the repo with the existing PGE one.
     
    Last edited:

    MissingNo. / M (00)

    M̶̽͛͛̂̅̈̒̈́̓̒͝ ̘̱̬̺̣͚̖̮̗͆̾i̵ ̨̢̨̬̙͖̃̂̌̋̈́̔? ?? �� ��
    13
    Posts
    7
    Years
  • Well, the landscape since I last was advance hacking has changed hasn't it?

    I haven't done any Pokemon hacking since 2010 or 2011. The tools now seem much more robust. I remember using all those old tools like Advance Map, YAPE, A-Tack, Advance Text.
    I will be happy to have them replaced.

    I need some advice in regrades to this engine rewrite. I understand that this engine upgrade changes the game quite a bit, so I can only assume lots of tools will therefore won't
    be compatible completely. Also it seems the author of Pokemon Game Editor (Gamer2020) seems to work closely with this project and I assume is one of the most compatible
    tools with this project.

    I could use a list with links, to compatible and flexible tools that work with this engine upgrade. Like Text editors and Mart tools.
    So besides Pokemon Game Editor, which looks fantastic by the way. What else should I consider using with this?
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • Spoiler:
    yeah it's only changed just a small bit; advancemap is still a near-necessity and yape can be used just finely (albeit not with expanded pok?mon, which is also a thing now)
    basically, the battle engine upgrade is an upgrade to the battle engine. and that's it.
    it's not gonna mess up some other facet of the game~
    most tools will be compatible with roms upgraded by this--just not those to edit pok?mon or attacks (except for pge, of course)
    if i have one bit of advice for you, it's to get comfortable with a hex editor, but a few tools i personally use:
    Nameless Sprite Editor (graphics), Sappy (music), AdvanceMap (mapping) (hopefully soon-to-be-usurped by Awesome Map Editor when it is released), XSE (scripting), Hackmew's thumb.bat to compile ASM, and HxD (hex editor for literally everything else)
    there's also IDA for viewing the assembly of a game if you feel up to it
    i'm not entirely sure if these are the greatest in their areas but they've worked for me well
    (mart tools existed once?)
     

    MissingNo. / M (00)

    M̶̽͛͛̂̅̈̒̈́̓̒͝ ̘̱̬̺̣͚̖̮̗͆̾i̵ ̨̢̨̬̙͖̃̂̌̋̈́̔? ?? �� ��
    13
    Posts
    7
    Years

  • I can't use a Hex editor to save my life. And yea there was a tool called Advance mart.

    Boy your only 15 wow, And you use a hex editor? What have I been doing with my life?

    I always hated Advanced map, for all its glitches. But it was the only thing to use at the time, But it seems like I can get ride of YAPE at least and have it replaced with Pokemon Game Editor.
     
    794
    Posts
    10
    Years
  • Well, the landscape since I last was advance hacking has changed hasn't it?

    I haven't done any Pokemon hacking since 2010 or 2011. The tools now seem much more robust. I remember using all those old tools like Advance Map, YAPE, A-Tack, Advance Text.
    I will be happy to have them replaced.

    I need some advice in regrades to this engine rewrite. I understand that this engine upgrade changes the game quite a bit, so I can only assume lots of tools will therefore won't
    be compatible completely. Also it seems the author of Pokemon Game Editor (Gamer2020) seems to work closely with this project and I assume is one of the most compatible
    tools with this project.

    I could use a list with links, to compatible and flexible tools that work with this engine upgrade. Like Text editors and Mart tools.
    So besides Pokemon Game Editor, which looks fantastic by the way. What else should I consider using with this?

    Yeah, the romhacking scene has grown a lot.

    As for the tools PGE is fully compatible with it and there's a script that will create an ini for it. (Most tools use an ini nowadays. It's a text file that can be modified and contains offsets of pokemon data as well as number of moves, pokemon ,etc.)

    As BluRose said this is a project that aims to change (mostly) the battle experience, so most tools will work just fine with it(provided you edit said ini).

    There's Kurapika's Gen3Tools that also works with it although it won't be able to correctly read and edit pokemon movesets.

    For pokemon sprite editing use either PGE or Wichu's Advanced Sprite series.

    The only map editor is sadly still A-map, though there is another in development that looks promising. Use A-map 1.92 and make sure to always search for free space starting from 0xE3CF64, because it wrongly assumes it starts earlier and may corrupt your data.

    Now, you shouldn't use Yape and Gen3 Suite. The former is outdated, the latter is buggy.

    Hex editor is your friend and we rom-hackers use it a lot. A quick tut for you:
    - Use HxD. It's free and has a nice GUI(interface)
    - To go to offset, hit ctrl + g
    - To find bytes hit ctrl + f and change datatype for hex-values
    - to copy bytes hit ctrl + B and NOT ctrl + V

    I see you mentioned A-mart. Items in shops are all done via scripts, so you could edit those in XSE(sadly the only script editor out there, though just like with a map editor, a new one is on the way).

    Also take a look at some sticky threads/tutorials in the beginner's section. Should help you with organizing all this new material. :P
     

    MissingNo. / M (00)

    M̶̽͛͛̂̅̈̒̈́̓̒͝ ̘̱̬̺̣͚̖̮̗͆̾i̵ ̨̢̨̬̙͖̃̂̌̋̈́̔? ?? �� ��
    13
    Posts
    7
    Years

  • Glad to hear that the new tools are using ini's now.

    YAPE was good and polished tool in its day, but now there seems to be no need for it. PGE completely replaces it. RIP YAPE, you were a excellent tool.{XD}

    The Advanced Sprite editor seemed to sometimes corrupt sprite data of icons and the user interface of Emerald. And it hasn't been updated in a long time, so I doubt much has changed.

    Doesn't A-map have a 1.95 version? If I remember correctly, the newest version was bugged. I will probably use PGE anyways since it is currently supported.

    I will look into tutorials for HxD I'm a visual learner.

    Another thing that is great about modern day hacking is that there are better and proper tutorials nowadays. tutorial videos in the past were few and far between and were typically terrible.

    Does anyone know of any good text editors besides A-text?
     
    Last edited:
    794
    Posts
    10
    Years

  • UPDATE
    Someone asked me to add two more features to the engine and those are:
    - GenVI ExpShare
    - Double Wild Battles

    Open up your config.h file and edit it to your will. Each define has a comment, so you shouldn't have too much troubles with it. :P

    Now, I made double wild battles happen only on certain tiles and created a table for it.
    It goes like this:
    - tile number
    - percent chance

    You can edit it either via hex editor or directly in the double_wild_battles.c file. The table is called "double_grass_tiles".

    Note it's not aligned and a tile number is a halfword. So editing it in hex would look like this for a normal grass tile with 5 percent chance:
    0D 00 05
    To add more to the table you'd do
    0D 00 05 0E 00 05 0F 00 05, etc.

    You can only add as much entries as you define via "DOUBLE_WILD_TILES" and not more! So if you set that define to 5 you can have up to 5 entries.
     
    55
    Posts
    14
    Years
    • Seen Feb 1, 2023
    Dizzy, would you be opposed to writing the python build scripts to be more mac/linux friendly? I've dug into a few of them and the necessary changes seem to be minimal. I realize basically nobody uses them in the hacking scene, but it still may be useful in the future.

    Edit: python didn't like writing errors to syserr (line 66 in build.py if you're curious)... but I guess that must be a version 3 thing, and I'm using 2.7 ...?
    Also, maybe you should consider using dynamic paths for files the script opens (i.e. using os.chdir(os.path.dirname(__file__))--see stackoverflow question 1432924 for info). Just a suggestion :P
     
    Last edited:
    794
    Posts
    10
    Years
  • Dizzy, would you be opposed to writing the python build scripts to be more mac/linux friendly? I've dug into a few of them and the necessary changes seem to be minimal. I realize basically nobody uses them in the hacking scene, but it still may be useful in the future.

    Sure. I would've done it earlier but there was no one that could test them. :P
    So I assume you own either mac or linux and the scripts don't work for you? And you already figured out the necessary changes? I'm all ears. :)
     
    Status
    Not open for further replies.
    Back
    Top