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

[Pokeemerald] Decomp Trainer Editor

853
Posts
3
Years
    • Seen Nov 9, 2023
    Yes, it only works for Pokeemerald. If you attempt to open Pokeruby or Pokefirered on it, the tool doesn't load anything.

    The IVs field is not something introduced by the editor, it's all vanilla code. It goes from 0 to 255 and affects all of a Pokémon's stats.
    Setting the field to 255 means the Pokémon will have 31 IVs in its 6 stats.
    Presumably, each 8 points you add to that field should translate to 1 IV in each stat.

    And no, since this editor doesn't introduce original code and vanilla doesn't let you edit a trainer's Pokémon's EVs, you can't modify those using this tool.

    So I've been looking around doing research on different topics and when I find a guide on the topic I'm looking for, (how to add new items to a rom)
    I check the credits, and it says you're the guy in the know. lol

    So thanks. and are there any quick tips you can give me for adding an item to my game, and defining how the game should use said item?
    I'm using fire red by the way, and my proposed item would be used only outside of battle.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • So I've been looking around doing research on different topics and when I find a guide on the topic I'm looking for, (how to add new items to a rom)
    I check the credits, and it says you're the guy in the know. lol

    So thanks. and are there any quick tips you can give me for adding an item to my game, and defining how the game should use said item?
    I'm using fire red by the way, and my proposed item would be used only outside of battle.
    That's completely off-topic for this thread. If you have questions that are not related to the topic of the thread, you should make a new one in the Decomp & Disassembly Help section,

    That being said, if you know the fundamentals of adding new items and the only thing left to do is to code a field usage function, my advice would be to study how the fieldUseFunc of other items work. All the code you need to look at should be in src/item_use.c and src/party_menu.c.
     
    17
    Posts
    3
    Years
    • Seen Feb 19, 2024
    So I noticed the editor freezes if I try to add a newly added trainer in constants. Any way to make it more receptive to constants changes?
     
    27
    Posts
    6
    Years
    • Seen Nov 19, 2023
    Hey! Unfortunately the tool isn't all that flexible, but keeping a formatting equal to that of the original code it should recognise the trainer.
     

    winnipeginstinct

    Some random guy on the internet
    3
    Posts
    5
    Years
  • This is really cool, but is there any way to add different AI stipulations (if I ever get around to figuring out how to implement them into the hack)? Things like switching around bad matchups or using certain strategies if the Pokemon isn't doing much damage, or has certain moves?
     
    27
    Posts
    6
    Years
    • Seen Nov 19, 2023
    Hey! Glad you are finding the tool interesting. You can change the AI flags existing in the game by default in the AI tab, and it is theoretically possible to add custom ones without having to modify the code of the tool as long as you add them to the file where the other defines are, "constants/battle_ai.h".
     
    1
    Posts
    2
    Years
    • Seen Jul 9, 2021
    Hey, thanks for the great tool! I am starting to work on my first Hack and am a little unsure about trainer classes. I know - they only appear as prefix and have influence on money, but they would give the story a more convincing touch, if they fit correctls. Is there any way to add completly new trainer classes?
     
    1
    Posts
    12
    Years
    • Seen Jun 2, 2022
    I'm curious if anyone else is running into this as well. The editor boots fine (v1.2.3) and runs perfectly for like one or two trainers. By the time I click to a third or fourth trainer, it acts odd. I can still edit the previous trainer and scroll through the list of trainers, but it won't load any new trainers unless I close and restart the editor. Anyone know why?
     
    4
    Posts
    4
    Years
    • Seen Aug 22, 2023
    Hey, I know this thread has been inactive for a while but I'm struggling to get the tool to run.
    I'm a beginner so it might be me missing something obvious...

    Basically when I boot up the .jar file, the window loads up and I can select the project directory. I select the pokeemerald folder, then click OK.
    The tool then goes unresponsive with the Project tab greyed out and nothing loads in.
    I tried a few versions from the github and on two different PCs, all with the same result.

    If I run the .jar from Powershell, I get the following error when I select the directory:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

    The rest of the console output is here:
    https://pastebin.com/RmRkQM2d

    Any idea why this might be happening?
     
    Last edited:
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    Hey, I know this thread has been inactive for a while but I'm struggling to get the tool to run.
    I'm a beginner so it might be me missing something obvious...

    Basically when I boot up the .jar file, the window loads up and I can select the project directory. I select the pokeemerald folder, then click OK.
    The tool then goes unresponsive with the Project tab greyed out and nothing loads in.
    I tried a few versions from the github and on two different PCs, all with the same result.

    If I run the .jar from Powershell, I get the following error when I select the directory:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

    The rest of the console output is here:
    https://pastebin.com/RmRkQM2d

    Any idea why this might be happening?

    The tool no longer works as of this commit. The added macros cause the tool's partyName parsing to fail.
    EDIT: See https://www.pokecommunity.com/showthread.php?p=10681949#post10681949
     
    Last edited:
    4
    Posts
    4
    Years
    • Seen Aug 22, 2023
    The tool no longer works as of this commit. The added macros cause the tool's partyName parsing to fail.

    Ah, I see. Thank you for letting me know.
    Is there any alternative, or am I best off modifying trainers manually for now? I know roughly where the data is, but wouldn't know where to start building a tool like this.
     
    4
    Posts
    4
    Years
    • Seen Aug 22, 2023
    There isn't, and you are.
    There was never a reason to use a GUI to modify straightforward data tables such as the trainers' or their party's.

    That's fair enough, thank you for clarifying!
    I agree it's not exactly difficult to do, but a tool would potentially have saved some time.
    For example, I can modify wild encounter data tables directly too without much difficulty, but it's simply quicker to do so through porymap.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • That's fair enough, thank you for clarifying!
    I agree it's not exactly difficult to do, but a tool would potentially have saved some time.
    For example, I can modify wild encounter data tables directly too without much difficulty, but it's simply quicker to do so through porymap.
    I don't see how. Manipulating data in a text file using your keyboard is surely faster than clicking+typing inside a GUI, hence why I said what I said.
     
    17
    Posts
    5
    Years
    • Seen Nov 20, 2023
    Hi, sorry for the necroing, but when I open the jar and select the pokeemerald folder in "open directory", nothing happens. Is there something I'm missing?
     
    17
    Posts
    5
    Years
    • Seen Nov 20, 2023
    When trying to open pokeemerald with this editor the following error occurs (which makes it so that nothing inside the window loads):
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
            at me.disturbo.types.Party.extractPartyName(Party.java:17)
            at me.disturbo.types.Trainer.<init>(Trainer.java:46)
            at me.disturbo.data.parsers.TrainerParser.parseObject(TrainerParser.java:24)
            at me.disturbo.data.parsers.TrainerParser.parseObject(TrainerParser.java:8)
            at me.disturbo.data.IndexedLineParser.parser(IndexedLineParser.java:43)
            at me.disturbo.data.DataManager.loadTrainer(DataManager.java:96)
            at me.disturbo.ui.list.TrainerList.<init>(TrainerList.java:20)
            at me.disturbo.ui.list.TrainerListPanel.<init>(TrainerListPanel.java:22)
            at me.disturbo.ui.MainFrame.createEditor(MainFrame.java:112)
            at me.disturbo.ui.MainFrame.initProject(MainFrame.java:68)
            at me.disturbo.main.DirectoryChooser.<init>(DirectoryChooser.java:19)
            at me.disturbo.ui.MainFrame.lambda$createMenu$0(MainFrame.java:77)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    What is the problem here?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • When trying to open pokeemerald with this editor the following error occurs (which makes it so that nothing inside the window loads):
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
            at me.disturbo.types.Party.extractPartyName(Party.java:17)
            at me.disturbo.types.Trainer.<init>(Trainer.java:46)
            at me.disturbo.data.parsers.TrainerParser.parseObject(TrainerParser.java:24)
            at me.disturbo.data.parsers.TrainerParser.parseObject(TrainerParser.java:8)
            at me.disturbo.data.IndexedLineParser.parser(IndexedLineParser.java:43)
            at me.disturbo.data.DataManager.loadTrainer(DataManager.java:96)
            at me.disturbo.ui.list.TrainerList.<init>(TrainerList.java:20)
            at me.disturbo.ui.list.TrainerListPanel.<init>(TrainerListPanel.java:22)
            at me.disturbo.ui.MainFrame.createEditor(MainFrame.java:112)
            at me.disturbo.ui.MainFrame.initProject(MainFrame.java:68)
            at me.disturbo.main.DirectoryChooser.<init>(DirectoryChooser.java:19)
            at me.disturbo.ui.MainFrame.lambda$createMenu$0(MainFrame.java:77)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    What is the problem here?
    This tool is awfully old. As you can see in its GitHub repo, the last updates to it happened almost 3 full years ago.
    Avoid using it in up-to-date copies of Pokeemerald, and don't even think about using it in the Pokeemerald-expansion, which makes drastic changes to how trainer party data is handled.
     
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    I decided to check what it would take to get this tool to work with current pokeemerald.
    It seems that just restoring the old version of the trainers file is enough:
    Code:
    git checkout 4ffe75c6112ae86f4e8dd47338cccf146cc425ae src/data/trainers.h

    However this won't work with pokeemerald-expansion and obviously you will lose any previous changes you've made to the file.
     

    Jaizu

    Average rom hacker
    281
    Posts
    14
    Years
  • This tool was abandoned, and telling people to downgrade pokeemerald seems like an awful suggestion.
    Don't use a tool to edit trainers, edit the files directly.
     
    Back
    Top