Jump to content
psy_commando

tool Pokemon Mystery Dungeon 2 - Psy_commando's Tools and research notes

Recommended Posts

Posted (edited)

PMD2EoSRowlet__19521.png.be244bd950f54edd2dbdf3dc0eb72659.png

Happy New Year, ProjectPokémon! I finished adding Rowlet to Explorers of Sky. It does not replace any existing mon, but one of the unused dummies in the files.

I wanted to share the results with the forum. The files can be downloaded following this link.

EDIT: female Rowlet was glitched due to me copypasting the same information for both male and female entities and forgetting to switch the actual gender. In the current download it is fixed, as well as adding Dartrix and Decidueye's data but not their proper sprites (I will finally start working on them). The latter means the download now has three folders for portraits and .xml files for Dartrix and Decidueye, which need to be dragged alongside Rowlet's.

In order to install, it is recommended to follow these steps:

  • Create a new Solution for your rom with SkyEditor. We'll use this tool for starter and portrait editing. In case you need a tutorial for initiating those mods, evadinxon explained how it works:
  • Drag the files in the "SkyEditor files" folder into your Portrait mod folder. The latter is found in your SkyEditor solution's folder after creating its respective project (see tutorial above).
  • As for the starters, modify both leader and partner options as you wish. In order to include Rowlet, you'll need to put the first dummy right after Giratina's second entry as an available option. Do not forget to save the starter editing file.

guide1.png.b90e37535807e2d04b5973e984e9cdc0.png

  • Replace the "BaseRom/Raw Files/data/MONSTER" files with the ones provided in the "data/MONSTER" folder of the download link. This step can be made at any time before making the rom in the final step, but it is very important to get it done as it contains all of Rowlet's overworld sprites.
  • Next, we are going to make use of psy_commando's StatsUtil tools and tutorial, specifically the ones in the following post. We are not using the StatsUtil utility available in SkyEditor because the strings do not seem to be modified (and thus Rowlet would appear as "??????????" which we do not desire).
  • We build the Solution (after saving everything) in SkyEditor, and then we have two options: either drag the new rom into the recently provided "pmd2_modding_setup" folder and extract the rom files following the tutorial, or add manually the edits available in the Starter and Portrait mod folders to our main BaseRom folder (that is, by dragging all Raw Files folders found in those two mods to the one found in BaseRom), then take the new Raw Files to the "pmd2_modding_setup" directory renamed as "rom". I suggest this second method due to issues I had while trying extract the ROM following psy_commando's tutorial, but theoretically both methods should work.
  • Drag the pokenames.txt in the "StatsUtil files (which has two options depending of your ROM: EUR or USA)" folder to the "pmd2_modding_setup" directory, then follow the decompilling step in psy_commando's tutorial.
  • Drop the rest of the files found in "StatsUtil files" again to the "pmd2_modding_setup" directory, then go to romstats/pokemon_data and delete 0537___________.xml (you should now have 0537_Rowlet.xml next to it). This is to avoid any possible problem for having unneccesary files. Another note regarding this step is that we have a 0536_Giratina.xml file. Replacing the old one with ours is required for Rowlet's stats growth, as the program displaces this particular data by one entry. Giratina-O is not affected by this (tested in my most recent EoS run).
  • Press "3a_CompileEverythingAndMakeRom" and the Rowlet-enhanced rom should appear as rom.nds there!

Didn't open my own thread as it is still fairly incomplete: Dartrix and Decidueye are in the data, but their sprites are the same as Rowlet's, and some little details (species items, the footprint) need to be implemented. I also wanted to showcase how useful psy_commando's tools (and SkyEditor too) can be.

The Rowlet line cannot appear in any dungeon at the moment as encounters cannot be modified, so it will have to either be your starter or the partner.

Credits to:

  • psy_commando and evadinxon for their tools, which are the basis of this project.
  • End45, for helping me out with the stats growths and strings issues.
  • The user Nightmare from Pokémon Reloaded: el foro (hope this doesn't count as advertising). My sprites are heavily based on his walking, attack and damaged animations.
  • All those who gave (or give, if this post is well received) feedback to my posts.

That is all. If by any chance you want all Rowlet's graphics separately, it is here as well as in my first post.

Edited by Reimu_needs_$$$
  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, SonikkuA/Kinopio said:

How did you add more images? Does the imageindex need to be modified?

Yes. In the Pokémon data, each species has a certain number in SpriteIndex which corresponds to a sprites folder for dungeon (m.attack, m.monster) and outside (m.ground) animations. What is interesting is the possibility of adding new folders after 0598, which is my Rowlet's case (0599). Then assign that number in the SpriteIndex and if the frames were well done (indexed, the right size, etc) your creation will appear accordingly.

Share this post


Link to post
Share on other sites
17 hours ago, SonikkuA/Kinopio said:

How did you add more images? Does the imageindex need to be modified?

Well I'm not making an entirely new slot, just editing an existing one. If I extract with grfxcrunch and add images, repack, the new ones added are glitched as shown image.thumb.png.b4dc2f6bd687b8bd30f2bf556558182b.png
Even though it's supposed to be a 32 by 32 square like this 
0050.png.e8f54ce88d51deda5ad6848f50f53d36.png

Share this post


Link to post
Share on other sites
Posted (edited)

Can't help you much with the sprites editor since it crashed all the time in my computer, so for my sprites I copied Piplup's as a base then modify the sprites, palette and size of some images.

You can always try this with Psyduck: replace all the .xml files in m.ground save the Psyduck sprites and palette for one corresponding to a starter then add the amount of images needed for those files to work (for which I do advise to watch the animations with the editor so you know the ImageIndex for eah sprite). Sure it is not exactly the desired result since you lose Psyduck's normal animations, but you can make a copy of the original then compare both in order to restore them.

Does the editor work well when you save edits? Despite its usefulness I read it was in a beta state.

Edited by Reimu_needs_$$$
  • Like 1

Share this post


Link to post
Share on other sites

Yeah the editor is a bit buggy. Just to edit the pallete it crashes, so I'm forced to use grfxcrunch for that. Doesn't save images if I try to import over the corrupted ones either : / 
As for copying over Piplup, I'll try that

Share this post


Link to post
Share on other sites

Weirdly the offset was really off compared to Piplup. But after a lot of edits to the animation XML I'm almost done!
image.png.d994654f818b3ff149f8598e37cd2ece.png

 image.png.d8acf4afc4edc65eba7b6c57fec7d136.png
Just need to check the quicksand, tumble, lookup, and breathing in anim

Something weird I noticed when editing, the Y axis value is flipped. Negative makes the sprite go up, and vice versa

Anyway, thanks for the help Reimu_needs_$$$

Share this post


Link to post
Share on other sites

@Reimu_needs_$$$ I just tried out your Rowlet mod and it's surprisingly well done but for whatever reason the IQ groups for male and female Rowlets are different seeing that Females have it at group 0 I'm guessing that's unintentional.

Share this post


Link to post
Share on other sites
19 hours ago, XModxGodX said:

@Reimu_needs_$$$ I just tried out your Rowlet mod and it's surprisingly well done but for whatever reason the IQ groups for male and female Rowlets are different seeing that Females have it at group 0 I'm guessing that's unintentional.

Yes it was unintentional, I already updated the download link with the fix. Kinda weird since I recall copypasting the data and forgetting to switch the gender (which already did before as another fix). I guess I hadn't decided on Rowlet's IQ Group back then.

BTW I finished my Rowlet run and only found the following bug, which I figured out today how to solve:

bug1.png.f10862efb2ae07ce172e460c6a7b0004.pngFIXED.png.25cb70da95c2dde4a1aa718b74827ffb.png

First picture happened if you chose Rowlet as your Pokémon, and had to do with this particular sprite's offset being wrongly introduced This fix is also included in the download link.

As a bonus (don't want to brag about it, but...):

arceus.png.507c0f049a0035c88b3c3d0609561442.png

Edited by Reimu_needs_$$$

Share this post


Link to post
Share on other sites

Oh wow I was just going to report that bug.

Also don't tell Arceus you stole his dex number.

Share this post


Link to post
Share on other sites

So I have been attempting to implement new personal items to the game's database, and thus far I had the following issues:

  • These items, which replace unused, empty slots, do not have any effect. In the .xml corresponding to the items' data, I have managed only to introduce their sprite, descriptions, coin value and type.
  • You cannot even mix them in Croagunk's Swap Shop, game does not recognize them (f. ex. Rowlet Wing and Rowlet Card are the 1 star rarity items, but you cannot get Rowlet Tag, the 2 star rarity one). I managed to get the items, however, by clearing Zero Isle Center.

Pics ("Ala Rowlet" is "Rowlet Wing" in Spanish):

items_showcase.png.d25897efae37f5cf7bb88c230837d38b.png     AlaRowlet.png.4208d594f9c9cb509e48507a0967768a.png

Is there any research on this I might have overlooked?

On 2/10/2020 at 3:24 AM, XModxGodX said:

Also don't tell Arceus you stole his dex number.

Yep, did that because it would be weird to have Shaymin at #492 and then jump straight to Rowlet's original #722. Don't think it is an important matter but it is very easy to modify in Rowlet's .xml file regardless.

Edited by Reimu_needs_$$$

Share this post


Link to post
Share on other sites
On 2/11/2020 at 10:58 PM, Reimu_needs_$$$ said:

So I have been attempting to implement new personal items to the game's database, and thus far I had the following issues:

  • These items, which replace unused, empty slots, do not have any effect. In the .xml corresponding to the items' data, I have managed only to introduce their sprite, descriptions, coin value and type.
  • You cannot even mix them in Croagunk's Swap Shop, game does not recognize them (f. ex. Rowlet Wing and Rowlet Card are the 1 star rarity items, but you cannot get Rowlet Tag, the 2 star rarity one). I managed to get the items, however, by clearing Zero Isle Center.

After reading this I went ahead and did some research on the effects of exclusive items. I expected them to be hardcoded and basically impossible to edit, but turns out they are not! You can change the effects of exclusve items or add new ones with some hex editing.
Here's what I found out:

There is a table inside arm9.bin that goes from 0x98568 to 0x98CD9 which contains one entry for every exclusive item in the game, including the last 48 dummy items at the end of the list. Each entry has 2 bytes:

  •     The first one is the ID of the effect the item has, which ranges from 0 to 0x80 (Both included, 0 means no effect)
  •     The second one is used to address the stat buffs table (see below). 0 means the item does not buff any stats.

I guess you replaced some of the unused items, so to give them an effect you just need to go to the part of the table corresponding to the unused entries (It starts at 0x98c80, every entry is 00 00 from that point on) and change the values there for each item.
This is the list of effects: (I have checked only some of the random chances, but it seems that they are always the same for similar effects)

Spoiler

1: Immunity to paralysis
2: Immunity to confusion
3: Immunity to infatuation
4: Immunity to freeze
5: Immunity to critical hits
6: Reduces damage from Selfdestruct and Explosion by 50%
7: Reduces damage from any explosion by 50%
8: Immunity to move sealing
9: Immunity to damage from the weather
a: Immunity to sleep
b: Chance to cause poison, paralysis or sleep after being attacked (30%)
c : Chance to cause poison after being attacked (30%)
d: Chance to leave foe asleep after being attacked
e: Chance to cause a nightmare after being attacked (30%)
f: Chance to cause a burn after being attacked
10: Chance to cause paralysis after being attacked
11: Chance to cause confusion after being attacked (30%)
12: Chance to cause infatuation after being attacked
13: Chance to cause freeze after being attacked
14: Chance to cause shadow hold after being attacked
15: Chance to cause constriction after being attacked
16: Chance to cause cringe after being attacked
17: Chance to cause blindness after being attacked (30%)
18: Chance to seal the move used by foe after being attacked
19: Chance to obtain invisibility after being attacked (30%)
1a: Chance to increase movement speed after being attacked
1b: Chance of being teleported after being attacked if the attack left the pokemon on low HP (50%)
1c: Chance to cause perish song after being attacked (30%)
1d: Chance of reducing foe's speed after being attacked
1e: Reduces damage taken from physical attacks by 50%. Doesn't stack with reflect.
1f: Reduces damage taken from special attacks by 50%. Doesn't stack with light screen.
20: Allows countering physical and regular attacks (Full damage, always happens)
21: Chance to return moves that cause status conditions to foe (60%)
22: Chance to prevent fainting, leaving the pokemon with 1HP instead (50%)
23: Allows countering physical and regular attacks (25% of the damage, always happens)
24: Increases the range of thrown items (Thorns and similar won't stop until they hit something)
25: Chance to return a move to the attacker (20%)
26: Immunity to stat reductions
27: Changes the pokemon's type to one that is resistant to the type of the last move that hit it
28: Protects against status problems under clear weather
29: Protects against status problems under sunny weather
2a: Protects against status problems under sandstorm weather
2b: Protects against status problems under cloudy weather
2c: Protects against status problems under rainy weather
2d: Protects against status problems under hail weather
2e: Protects against status problems under foggy weather
2f: Increases movement speed under clear weather
30: Increases movement speed under sunny weather
31: Increases movement speed under sandstorm weather
32: Increases movement speed under cloudy weather
33: Increases movement speed under rainy weather
34: Increases movement speed under hail weather
35: Increases movement speed under foggy weather
36: Increases attack speed under clear weather
37: Increases attack speed under sunny weather
38: (Most likely increases attack speed under sandstorm weather, untested)
39: (Most likely increases attack speed under cloudy weather, untested)
3a: Increases attack speed under rainy weather
3b: Increases attack speed under hail weather
3c: (Most likely increases attack speed under foggy weather, untested)
3d: Increases evasiveness by 2 levels under clear weather
3e: Increases evasiveness by 2 levels under sunny weather
3f: (Most likely increases evasiveness by 2 levels under sandstorm weather, untested)
40: Increases evasiveness by 2 levels under cloudy weather
41: Increases evasiveness by 2 levels under rainy weather
42: (Most likely increases evasiveness by 2 levels under hail weather, untested)
43: Increases evasiveness by 2 levels under foggy weather
44: The pokemon's attacks ignore reflect and lightscreen
45: Increases damage dealt against ghost type pokemon with normal and fighting type moves
46: Increases damage dealt against dark type pokemon with normal and psychic type moves
47: All of the pokemon's moves recover 1 PP when entering a new floor
48: The pokemon recovers all of its HP when entering a new floor
49: Increases natural HP regeneration speed
4a: Max PP + 2
4b: Max PP + 4
4c: Max HP + 10
4d: Max HP + 20
4e: Max HP + 30
4f: Increases received EXP
50: The pokemon receives EXP when taking damage
51: Chance to recover PP when getting hit by an attack (30%)
52: Chance of not consuming PP when using an attack (10%)
53: Prevents thrown items from hitting the pokemon
54: Returns items thrown against the pokemon
55: Extends the effects of the Pokémon's moves from itself to the whole team
56: Increased chest drop chance
57: Doubles the amount of recovered HP when using HP-draining moves
58: Boosts the abilty Pressure, causing enemies to consume more PP when attacking
59: Immunity to status changes
5a: Reduction of damage taken from moves by 50%
5b: Increase of damage dealt with moves by 50%
5c: If an ally is poisoned, the pokemon absorbs the status to heal HP
5d: Recover HP when eating berries or apples
5e: Increased chance of a keckleon shop appearing in a dungeon (Base chance increased by 19%)
5f: Increased chance of hidden stairs appearing in a dungeon (Base chance increased by 19%)
60: Allows using items and moves without damaging allies
61: Increased chance of activation of Pickup
62: Increased chance of defeated foes dropping money
63: (?)
64: HP recovers faster while on water
65: Stepping on water heals status problems
66: Fire-type moves used against the pokemon will always miss
67: Water-type moves used against the pokemon will always miss
68: Grass-type moves used against the pokemon will always miss
69: Electric-type moves used against the pokemon will always miss
6a: Fighting-type moves used against the pokemon will always miss
6b: Ground-type moves used against the pokemon will always miss
6c: Flying-type moves used against the pokemon will always miss
6d: Psychic-type moves used against the pokemon will always miss
6e: Ghost-type moves used against the pokemon will always miss
6f: Dragon-type moves used against the pokemon will always miss
70: Dark-type moves used against the pokemon will always miss
71: Steel-type moves used against the pokemon will always miss
72: The pokemon absorbs fire-type moves and heals HP
73: The pokemon absorbs water-type moves and heals HP
74: The pokemon absorbs grass-type moves and heals HP
75: The pokemon absorbs electric-type moves and heals HP
76: The pokemon absorbs ice-type moves and heals HP
77: The pokemon absorbs fighting-type moves and heals HP
78: The pokemon absorbs ground-type moves and heals HP
79: The pokemon absorbs flying-type moves and heals HP
7a: The pokemon absorbs psychic-type moves and heals HP
7b: The pokemon absorbs bug-type moves and heals HP
7c: The pokemon absorbs rock-type moves and heals HP
7d: The pokemon absorbs ghost-type moves and heals HP
7e: The pokemon absorbs dragon-type moves and heals HP
7f: The pokemon absorbs dark-type moves and heals HP
80: The pokemon absorbs steel-type moves and heals HP

The stat buffs table starts at 0x9852C and ends at 0x98567, right before the effect table. It has 15 entries, each one is 4 bytes long.
Each of the 4 bytes indicates how much each stat is buffed by the item (Order: Atk, Def, SpAtk, SpDef)
For example, if an exclusive item has its second byte on the effect table set to 3, the buffs granted by it can be found at 0x9852C+4*3 = 0x98538 = [10, 0, 10, 0]. An item with this value would increase attack and special attack by 10.

So if you want an item to just give a stat boost you would need to set its first byte on the effect table to 0 and the second one to 1-14, depending on the stats you want to increase. Keep in mind that you can't change the values on the stat buffs table without affecting every other item which uses the same entry there.

Getting the items to show up in Croagunk's swap is going to be trickier though. If you look at the list you will see that all the items that follow the *, *, **, *** pattern are together between position 506 and 1013. The game only checks if you have the required items to create higher rarity ones within that range, that's why yours don't appear on the list.
Fixing that would require to write a rom hack that changed the behaviour of the code that does those checks and then create a patch to apply the changes on the rom.

Edited by End45
  • Like 1
  • Speechless 1

Share this post


Link to post
Share on other sites

I'm really amazed how you guys are managing to do something with gfxcrunch! Its pretty awful to work with ^^; Which is why I began working on that editor, which ironically isn't doing much better right now XD

Also, about croagunk's shop, there's some loose files that contains swap lists. I think its in SYNTH/synth.bin. Its something I didn't really invest too much time into, but, its most likely doable to change those. Otherwise, if its just a table in the binaries, its fairly easy to write a wrapper to load the table from a custom sir0 file. I did that with the level list a while ago to allow adding custom maps to the game without having to mod the binaries.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...