Jump to content

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


Recommended Posts

13 hours ago, psy_commando said:

Yep.

And all genderless or male or female only species have a counterpart entity as well. Its a dummy though. Its only there to keep both gender entry tables aligned within the data files.

Bosses works differently. The NPC that appears on the map is a special entity that's only meant for the cutscene. We still don't know yet for sure how bosses works. But we have some ideas. I suspect fixed.bin to have part of the answer.

Well it depends on how typing effectiveness is implemented. But if its just a table, it would be trivial to hook everything accessing it and inject a larger table  somewhere, or just load it dynamically. That's what I did with the levels and NPCs for instance. Its not really trickery, its just rewriting part of the game code to do something slightly different.

What's interesting is, when I was using a previous version of @evandixon's save editor to edit my old EoT save, I somehow corrupted the save in such a way that when I loaded it in Desmume, all of my Pokémon except the the protagonist were gone, and in the partner's place was a Bulbasaur. If I talked to him, the game would crash. What was interesting, however is that that the NPCs referred to him as reserve_22

When I was poking around in yesterday with your StatUtil, I noticed some reserve_xx (including 22) entries after the "real" Pokémon. Does this mean that the reserves are just used for testing purposes or preventing the game from crashing if a glitch is performed, then would there be any harm in replacing them? I mean, there probably wouldn't be too much point, if increasing the cap becomes a thing in the future, and then you'd have to figure out how to get them to spawn in a dungeon or edit them into your save, but it's be interesting to see what exactly is needed to get a new entity to work properly in the game.

 

Well, it's only trickery because I don't fully understand it! :P

 

(beyond it being editing precompiled code when you don't have access to the source, that is)

Link to comment
Share on other sites

  • 3 weeks later...

Alright; I did a thing.

Meme3.png

Basically, the abilities "Run Away" and "Klutz" are completely removed from the game, and the Pokémon who did have it, now have their hidden ability instead, if it existed in Gen IV. For example, Eevee now has Adaptability and Anticipation, and Ponyta now has Flame Body and Flash Fire. I made an exception for Aipom though, as they'd lose the ability Skill Link upon evolution if I followed this rule. Note that this will make the Raticates you find in numerous dungeons quite a bit harder, not only do they no longer run away from you, but they also have Hustle which will add 50% to their physical attack.

 

Another thing is that I've made it so that Abra no longer loses the ability to float over water or lava when they evolve into Kadabra and then into Alakazam. I have no idea why it wasn't like this beforehand, especially considering all of Alakazam's sprites show them floating!

Meme2.5.png

Lastly, Castform's size has been reduced to 2 stars instead of 4, Gyrados' to 3 stars from 4, and Milotic's to 3 from 4. I don't believe Castfrom is overpowered like the devs evidently did, especially considering he's damaged by sandstorms. As for Gyrados and Milotic, as they're both non-legendaries who evolve from 1 star Pokémon, I think 3 stars is more appropriate. Interestingly, even though there's no Pokémon in the game who already has a size of 3, it works just perfectly and how you'd expect.

Meme2.png

So, yeah. I've done some testing with it and it all seems good. I think I edited both the male and female of each species, but let me if now if I missed anything. I didn't have a patch because of the various regions, and you may already have filled in the portraits with SkyEditor or changed the ROM in some way, so I'll just leave the files. https://drive.google.com/open?id=0B1-sBoZAiZiGdThBRS1iTVpYQlU

To patch a ROM with these files, just download this, and follow this until the "romstats" folder appears, open it, and drop the files into "pokemon_data". Then hit "3a_CompileEverythingAndMakeRom.bat" and the rom.nds is your patched ROM.

 

Of course, it wouldn't have been possible without @psy_commando's tools, I just made this to show off what they could do.

Edited by TyVogue64
  • Like 3
Link to comment
Share on other sites

OK, I did another thing. The KaoUtil works perfectly. 

Newmeme.png

I got @growlithecubone's custom portraits to work (I did Kirlia's myself). And yes, I know Poochyena isn't in the starter menu, I just replaced Dunsparce's grin portrait because I'm lazy.  I used GIMP's indexed mode to ensure there were no more than 16 colours.

 

Here's what you've got to do:

  1. First put a single pixel of a colour you're not using down anywhere on the image. This is to make sure GIMP
    generates enough colours.
  2. Next, hit Image>Mode>Indexed, put in 16 for the Maximum No. of Colors, then hit Convert. 
  3. Get rid of the pixel you drew in step 1.
  4. After that, hit Colors>Map>Rearrange Color Map
  5. Then drag the unused colour to the left-most side and hit OK. This colour will be replaced by pure black in game.
  6. Go to File>Export and then Load Defaults and Export.
  7. Right click on the image and hit Properties, then Details and it should say it has a bit depth of 4. Additionally,
    it shouldn't be more than around 900 bytes or so and be 40x40 pixels big.
  • Like 2
Link to comment
Share on other sites

Finally got back to this place.  Thought I'd have to reset my password because of the security issue so I kept putting it off...

But I picked up on the effect bin again.  And now it is finished.

https://www.spriters-resource.com/ds_dsi/pokemonmysterydungeonexplorersofsky/sheet/85692/

A few closing notes for posterity, as an addendum to the info I posted up there in

Section 2 is definitely responsible for some form of Draw-behind shenanigans.  I went through the whole list of effects and all of the components that don't use a "0" for that value tend to appear behind the player.

Also, the metaframes all use X and Y offset values in the same format as with WAN sprites.

For Colors... as far as the custom palettes for each effect goes, a series of transformations is applied to the color value as it appears in ROM in order to get the value that appears in game:  First, the color value is rounded down to the nearest multiple of 8, and that becomes the color that appears in the palette viewer.  That palette viewer color is then multiplied by 32, and divided by 31.  That is then the true color as it appears in-game.  Really strange, considering no other graphics files do this to my knowledge...

Anyways, it feels good to finally have resources like this out there... 8 years after release...  Now I can go back to my fangame. lol

  • Like 2
Link to comment
Share on other sites

  • 3 months later...

While we have been doing a lot of research on Explorers, but there's also another game I've been interested in researching lately.

Since Pokémon Mystery Dungeon: Forward! Adventurers of Flame, Pokémon Mystery Dungeon: Let's Go! Adventurers of Storm and Pokémon Mystery Dungeon: Aspire! Adventurers of Light never got released outside of Japan. Little has been documented about these games, but they use very similar file formats to the Explorers ones. So the Adventures ones also could be included in PMD2 as well, since they're part of the same generation, but instead released as WiiWare on the Wii.

One particular file format that drew my attention, was the AT7P file container format. I haven't done much research on it, but it is an archive format that also uses compression (possibly lz77 or yaz0).

Unless we're able to extract and repack this file format, there won't be much hope of a translation project occurring anytime in the future. Which is why I'm interested in researching this file format. So far from what I've found apart from it's header ID "AT7P" at 0x0-2, I've found that free space within this file is indicated by every byte as "45". It could be related to some of the file container formats in the Explorers (such as AT4PX and AT4PN). I'll need to do some research, but if anyone else wants to, you'll need a program called ShowMiiWads in order to unpack the Wii .app files. There's two of these AT7P files contained in the app, they're under the names "data1_WPAJ.bin" and "data2_WPAJ.bin"

In the compressed data, I can see that data1_WPAJ.bin contains only a data.ini with some version info stuff inside data.ini. But it seems like data2_WPAJ.bin contains all the game data in it, only thing left to do, is to have a solution to unpack and repack the files. Just from looking at it, it seems to contain many SIR0 files as well.

Link to comment
Share on other sites

  • 3 weeks later...

So, its been a really long time since I updated this thread!

And I've been making some progress on a few things! Namely a sprite editor:

590ee2edbce5c_2017-05-0705_00_59-PPMDUSpriteMuncher.thumb.png.da4c40662cccc54579e9ab445890cae1.png

Its still really early on tho! But I got some of the stuff behind the scene working finally!

  • Like 4
Link to comment
Share on other sites

11 hours ago, psy_commando said:

So, its been a really long time since I updated this thread!

And I've been making some progress on a few things! Namely a sprite editor:

590ee2edbce5c_2017-05-0705_00_59-PPMDUSpriteMuncher.thumb.png.da4c40662cccc54579e9ab445890cae1.png

Its still really early on tho! But I got some of the stuff behind the scene working finally!

 

Glad to see that this thread hasn't been forgotten! That editor certainly looks pretty robust already.

 

On the topic of sprite editing, would you mind if I asked you if it's possible to add more sprites into the game, then just use PPMD StatUtil and change a Pokémon or reserve entity to have the new sprite? I ask this because that's the only really obstacle to adding new Pokémon into the game (other than the fairy type, but only a few need that), and because some people had the idea to remove gender in favour of having a shiny version of every Pokémon, which seems like a neat idea.   

Edited by TyVogue64
Link to comment
Share on other sites

4 minutes ago, TyVogue64 said:

 

Glad to see that this thread hasn't been forgotten! That editor certainly looks pretty robust already.

 

On the topic of sprite editing, would you mind if I asked you if it's possible to add more sprites into the game, then just use PPMD StatUtil and change a Pokémon or reserve entity to have the new sprite? I ask this because that's the only really obstacle to adding new Pokémon into the game (other than the fairy type, but only a few need that), and because some people had the idea to remove gender in favour of having a shiny version of every Pokémon, which seems like a neat idea.   

Without any ASM edits, there's available 1200 slots for Pokemon. Because of how genders work, this number is really 600. Psy_commando is the expert here, but it may be possible to add new Pokemon as long as that number is not exceeded.

  • Like 1
Link to comment
Share on other sites

35 minutes ago, evandixon said:

Without any ASM edits, there's available 1200 slots for Pokemon. Because of how genders work, this number is really 600. Psy_commando is the expert here, but it may be possible to add new Pokemon as long as that number is not exceeded.

 

Yes, I'm fully aware of that. I've replaced reserve entities before without any consequence. There's 19 of them to work with, double if you count the genders. What I was saying is that since the game is let up to allow the male and female have a different sprite, you might be able to have all the females be shiny, for example. Even neuter Pokémon like Groundon have a second "gender" entry that's just blanked out that could be used.

Link to comment
Share on other sites

On 5/7/2017 at 2:04 AM, psy_commando said:

So, its been a really long time since I updated this thread!

And I've been making some progress on a few things! Namely a sprite editor:

590ee2edbce5c_2017-05-0705_00_59-PPMDUSpriteMuncher.thumb.png.da4c40662cccc54579e9ab445890cae1.png

Its still really early on tho! But I got some of the stuff behind the scene working finally!

Neato :D

I hope I'll be able to play with this soon. I've been attempting some pokemon sprites (gen 5 and up) and an attempt at giving Mareep special starter animation sprites. Does this just cover the pokemon sprites and status effects, or will you be able to do the overworld and special effects as well?

  • Like 2
Link to comment
Share on other sites

Well I'm trying to get it to be usable soon. But so far I'm having some issues because of the tree view thing.. I might drop that part for something simpler if I can't get things to be tidier and working like I want.. Plus it creates a ton of redundancy..
Also right now it only does import. So keep in mind a big part of the work is left to do xD

You mean the levels graphics and backgrounds?

That's coming in another tool! This thing is basically some practice before I get to work on the level editor xD

Here's another peek at the WIP UI. Tho, I feel I could probably make a sort of thumbnail preview instead of the treeview.. I'll have to investigate..

5912c6210ed08_2017-05-1003_49_07-PPMDUSpriteMuncher.thumb.png.661bffb51cf433c1fca945e794830478.png

  • Like 3
Link to comment
Share on other sites

Animashuns :D

Still lots of bugs to fix, and work to do..Cropping ,and well the wrap-around feature of the NDS kinda mess with my cropping algorithm..

Also Qt is basically a minefield of segfaults.. All those pointers just beg for something bad to happen ^^;;

Its hell to debug xD

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
On 6/7/2017 at 11:04 PM, psy_commando said:

I haven't mentioned much here in a while but the tool is slowly starting to take shape! I fixed a lot of problems with displaying frames and animations. And I made a small video to show:

Its still a work in progress tho!

This looks very nice! Keep up the good work. :)

  • Like 2
Link to comment
Share on other sites

17 minutes ago, psy_commando said:

Thanks! ^^

I got character sprite export to work! But I just gotta work out importing images, and editing animations! Soo, it shouldn't be too long until the first release, hopefully! If everything goes well..

Question:

What are things that we currently cannot do with our current knowledge?

Link to comment
Share on other sites

11 minutes ago, psy_commando said:

That's very vague..

But, in terms of the game, modifying dungeons tilesets/layouts, modifying tilesets, modifying animated BGs, fonts. And that's pretty much all I can think of.

I'm sorry, heh.

I was thinking about perhaps backporting emeras and looplets from Super to Sky. Would it be possible?

Edited by Thunder
Link to comment
Share on other sites

13 minutes ago, Thunder said:

I'm sorry, heh.

I was thinking about perhaps backporting emeras and looplets from Super to Sky. Would it be possible?

That would require some serious edits to the game's binary. It's not possible with current research AFAIK (but then again, psy_commando has already done things that I once thought impossible).

  • Like 3
Link to comment
Share on other sites

Well, its "possible", but like evan said, you'd have to do some pretty extensive asm edits to the game. And right now, the dungeon mode code is not very documented at all.

But since exclusive items grant bonuses similarly, and IQ skills do the same as emeras, the basics you could re-use are there I guess.

It would be nice if some volunteers would like to map out the game's binaries though! That would speed things up a lot!

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hey I see you are really working hard on this "starter and partner randomizations". I know you are not done yet with it, but I am really excited for the starters and partners randomization. I played a explorers of sky randomizer but I was kind of dissapointed when I saw I couldnt randomize my starter and partner. I am really excited and I wish you the best of luck.

Link to comment
Share on other sites

I really love the mystery dungeon series and the little portraits <3. But I was wondering if I could have a little help with changing the expression of the Pokemon in the image if that wouldn't be too much trouble, please?

Link to comment
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...