Jump to content

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


Recommended Posts

3 hours ago, psy_commando said:

Nope, GTI works very differently inside.

There's stuff in the works for it though! Both PSMD and GTI are very similar, so mod tools for one will most likely work for the other. @evandixon got some tools working for those too!

The function that sets the starter in GTI inexplicably causes the game to crash, and I haven't been able to figure out why yet. It may be possible to apply some of my PSMD pafches to make it work, but there's only so much timd to go around, and I'm spending it on PSMD.

If someone managed to increase the text speed, I'd be more willing to replay the game, and by extension, more willing to hack it. It is a great game after all.

[Edit] I took another look at it. I have a lead on increasing the text speed (nothing solid and no change yet). Starters will take more work, since there appears to be more hard-coding involved, which makes things much harder to change.

Link to comment
Share on other sites

If I remember correctly, missing assets/not precached assets makes the starter select screen crash. I remember testing some changes at one point and you ended up testing them?

Also, all the starter models are all on the select screen and get unhidden depending on the pokemon #. Basically adding starters to GTI is a lot more involved than PSMD.

Link to comment
Share on other sites

  • 1 month later...

Hi, I'm ToneyIndiana93

I recently got back into rom hacking after quite a bit, and decided to start with something I never really done before, so I came to Mystery Dungeon for it (it's one of my favorite games ever). I finally got some things working, but I wanted to make a MIDI rip of the soundtrack, I got your tool for it, and I don't understand how to use it. If you could help me, it would be appreciated. I think i'm pretty stupid for not knowing how to use it, but I never used something that used that same interface before. I have all the .smd and .swd and all the data ripped and extracted but I really wanted to somehow just get MIDI's of the format. Thanks, any help is appreciated.

Link to comment
Share on other sites

1 hour ago, ToneyIndiana93 said:

Hi, I'm ToneyIndiana93

I recently got back into rom hacking after quite a bit, and decided to start with something I never really done before, so I came to Mystery Dungeon for it (it's one of my favorite games ever). I finally got some things working, but I wanted to make a MIDI rip of the soundtrack, I got your tool for it, and I don't understand how to use it. If you could help me, it would be appreciated. I think i'm pretty stupid for not knowing how to use it, but I never used something that used that same interface before. I have all the .smd and .swd and all the data ripped and extracted but I really wanted to somehow just get MIDI's of the format. Thanks, any help is appreciated.

The usage is described here: https://github.com/PsyCommando/ppmdu/blob/ppmd_audioutil_0.37/readmes/ppmd_audioutil.txt#L163

Shouldn't be too much different from statsutil.

  • Like 1
Link to comment
Share on other sites

44 minutes ago, evandixon said:

The usage is described here: https://github.com/PsyCommando/ppmdu/blob/ppmd_audioutil_0.37/readmes/ppmd_audioutil.txt#L163

Shouldn't be too much different from statsutil.

When I run the audioutil, It flashes this for 1 second and then closes right after, I can't run anything with it. I tried replicating this in another command line (I thought if it wasn't 

this command line then I could do another clean one) but the nothing really works out. I extracted the games contents with a PMD2 pack  psy_commando  made, and got everything, even though that wasn't GUI it didn't do this.

 

doesntwork.png

 

I'm really a noob when it comes to anything with pure command lines that is not drag and drop... i have to learn quite a bit...

Edited by ToneyIndiana93
Link to comment
Share on other sites

1 minute ago, ToneyIndiana93 said:

When I run the audioutil, It flashes this for 1 second and then closes right after, I can't run anything with it. I tried replicating this in another command line (I thought if it wasn't 

this command line then I could do another clean one) but the nothing really works out. I extracted the games contents with a PMD2 pack  psy_commando  made, and got everything, even though that wasn't GUI it didn't do this.

 

doesntwork.png

You need to run it using the command prompt. CD into the directory the program's in, then type what's in the readme I linked. (If any path contains spaces, the path needs to be wrappen in quotation marks.)

  • Like 1
Link to comment
Share on other sites

1 hour ago, evandixon said:

You need to run it using the command prompt. CD into the directory the program's in, then type what's in the readme I linked. (If any path contains spaces, the path needs to be wrappen in quotation marks.)

I'm using command prompt as the command line. So all I need to do is type is

ppmd_audioutil.exe -pmd2 "(nameofextractedfolder)/data" "out_bgm" ?

sorry if im being extraordinarily stupid, i've never used command prompt to run something like this before...

Edited by ToneyIndiana93
Link to comment
Share on other sites

49 minutes ago, evandixon said:

That looks right

OK, so, I know I'm doing something wrong and I know where it is, but can't find out WHAT it is.

The first pic has the command, michael being the name of my PC (not my name) and 123POKEMONROMHACK is the hacking folder (123 at the beginning so it appears first on my list)

Second Picture is the folder structure, just for help. For reference, I'm not pointing to the extra, I'm pointing to the audioutil. I hope this can work out... Inside has the audioutil and The "rom" folder has a folder called "data" and that has a folder called "SOUND" that has a folder called "BGM", maybe you can help me get the directory right with that info.

 

noargu.png

hmm.png

Edited by ToneyIndiana93
Link to comment
Share on other sites

  • 2 months later...

sorta frightened on posting here since it hasn't been active since march and a lot of forums will give you a strike for replying to a dead thread

i've been lurking this thread for years but never made an account on here? well way back in the day (by which i mean 3 ½ years ago) i got involved with the PMD2 midi business when i was a wee 12 year old and used PsyCommando's utility to rip all the midis out of PMD2 to the GM standards

after looking to see if anyone made a GM mapped PMD2 soundfont i found this thread on reddit which linked back to the outdated midi pack i compiled in late 2014, though i have since changed my tumblr url from calibore. i noticed the poster said that "the MIDI pack is pretty outdated (was made before even the Procyon engine got reverse-engineered), and some instruments are wrong, such as the Alto Sax actually being a french horn", so that inspired me to redo the entire thing but make it as close to the original track as i can, using the GM mapped PMD2 soundfont this guy made.

in the ppmdu_audioutil_0.37, i noticed a few things off about the instruments, and i know that you can edit the presets yourself, but i'd like to contribute to them being corrected in an official release. an example was that in almost every song the piccolo instrument (PC#73) is set when really it's supposed to play the flute (PC#74), or oftentimes the violin (PC# 41) is set to the cello (PC#43). songs with nylon str. guitar (PC#25) have it often replaced with the steel str. guitar (PC#26)... etc. some of my "outdated" midis sound a bit better than the newer ones im generating so i just wanted to maybe make this into something ongoing whenever i have the time?

i'm not really a coder, i'm more of a spot the difference kinda person and i can pick out subtleties like if something needs an instrument change or transposing an octave by using my old midi sequences, the official soundtrack, and the PMD2 soundfont as references. so here are a few things to start that are frustrating me a bit and i don't know my way around them:
well they both have to do with the waterfall cave sequence (bgm0024).

  1.  how do i make the preset on the instruments a sine wave? this basically goes for all the "sub-patches" as i call them, tho i think theyre officially called "banks". i know the sine wave was introduced in GM 2 under the square wave patch (PC#81, BS MSB#2) (or in FL studio for some reason the bank select MSB is 8 for sine wave) image.png.51929c7fb9234cfd827ae15044681115.png but i see no way to set a preset to the sine wave specifically, as
          <!--0x62 Sine Wave  (smpl     0xB8 )-->
          <Program>
            <DSEProgramID>98</DSEProgramID>
            <MIDIPreset>81</MIDIPreset>
          </Program>

    is still just the vanilla square wave from GM 1. i actually had to modify this preset to <MIDIPreset>81</MIDIPreset> from <MIDIPreset>88</MIDIPreset> originally since that made it bass & lead (PC#88)

  2. one of the channels has a percussion patch (channel #10 of course), no matter if i include -gm in the command line or not. it's really supposed to be strings but i don't know how to change it back to a melodic patch.

i still have a lot more questions, such as why the drum sequence in drenched bluff has changed from my older rip of it

Spoiler

for the audio i put in a few other instruments so you can recall what drenched bluff sounded like, but the main focus is on the drums

drum sequence of the old rip (more accurate):image.thumb.png.cf0782d122bd9852883f143ffd2314c9.png

drenched bluff old perc.mp3

drum sequence of the new rip (inaccurate):

image.thumb.png.2bf1598408e03784b7e416191567bb38.png

drenched bluff new perc.mp3

but anyways i just wanted to help make stuff more accurate in the ppmdu audioutil xml since i have the resources and senses but without a lot of experience i can't do it all on my own ✌

 

Link to comment
Share on other sites

Its fine, the whole point of this thread is to be bumped every once in a while! XD

I'm not really sure what you're trying to do? The xml file is for remapping PMD2's instruments to GM/GS when doing a midi only export. It has no effect when exporting the tracks along with their soundbank.

And when you say the wrong instrument is set, what do you mean? In the midi-only rips or the soundfont, or in the midi files that accompany the soundfont?

Adding the -gm option on the command line just tries to make it so old GM only software has a better shot at playing it back by swapping any existing drum channel with the right one. By default the files are all exported for a GS compatible midi driver. GS allows things like disabling the drum channel as needed and etc.. The way DSE works is similar to GS and not GM. Which means some tracks just won't work when exporting as GM since they use the drum channel as a melodic channel.

Link to comment
Share on other sites

On 6/12/2018 at 2:49 AM, psy_commando said:

Its fine, the whole point of this thread is to be bumped every once in a while! XD

I'm not really sure what you're trying to do? The xml file is for remapping PMD2's instruments to GM/GS when doing a midi only export. It has no effect when exporting the tracks along with their soundbank.

 And when you say the wrong instrument is set, what do you mean? In the midi-only rips or the soundfont, or in the midi files that accompany the soundfont?

Adding the -gm option on the command line just tries to make it so old GM only software has a better shot at playing it back by swapping any existing drum channel with the right one. By default the files are all exported for a GS compatible midi driver. GS allows things like disabling the drum channel as needed and etc.. The way DSE works is similar to GS and not GM. Which means some tracks just won't work when exporting as GM since they use the drum channel as a melodic channel.

yep, i'm trying to do a midi-only export. the soundfont i use isn't the one generated by your program (since specific instruments are almost impossible to find lol), it is by this guy on reddit who compiled a GM/GS friendly soundfont using samples ripped from the game. i dont use that soundfont to listen to the playback leisurely, i use it to check how close it sounds to the actual soundtrack on the instruments that were exported from the xml.
for example, say i exported treasure town (bgm0009) just as a plain old midi, no editing to the xml. i import the midi into FL studio and see the instrument bank that the original xml gave me. i actually did it just now, here are the instrument presets that were exported into the midi:

image.png.cfda67dc43106ba0f2d45b6db84213a5.png 
i then drag the GM/GS friendly PMD2 soundfont onto one of the channels and set it to the instrument that was exported into the midi to hear if it's right. in this case, the piccolo doesn't even exist in the PMD2 games. for the small woodwinds in PMD2, theres a flute, recorder, and pan flute. the piccolo is PC#73 in the GM/GS patch, but the game simply doesn't have one. but even if it did, it wouldn't be right because after using my memory and listening to the official soundtrack, i know it's really supposed to be the flute. i test it out on the PMD flute and it sounds perfect, exactly like in the game. this means i need to go back and change the preset in the XML file from piccolo (PC#73) to flute (PC#74). i believe this to be a computer mistake since some programs start the patches off at #00 and some start it at #01, in which case patches starting with #00 would have flute at #73.
another one that is wrong is the english horn, but its actual instrument isn't the next patch over -- it's actually the bagpipe, so i think this one is a human mistake. i always thought treasure town sounded like a scottish tune, and when i plugged in the PMD2 bagpipes it fit perfectly, so i went into the XML and changed the english horn to the bagpipes. thats the kinda stuff im here for to review and fix if needed.


i typically always have to go for -gm since the GS midi exports' drum channels use up more than one channel (and there's only 16 available in total), and theyre not assigned to a percussive patch, so the drum sequences are given the default piano. strangely, that wasn't the case for waterfall cave and it gave channel #10 a percussive patch despite it being a GS export, not a GM export. in this case is supposed to be a melodic patch, since waterfall cave should be taking advantage of using all 16 channels for its percussiveless ambience.

image.png.49fc5b9794c080fa84c83c4b191b494d.pngimage.png.e29db160c5b6cc088affe4f67c376692.png

funnily enough, the orchestra kit is also PC#49 just like the strings image.png.11722e75da533c708cf209d0b1ae2c28.png

i just asked permission from the guy on reddit who created the GM/GS PMD2 soundfont if i could share it with you and i'm waiting for a reply. i edited the instruments a bit in polyphone and reduced the envelope release levels since it was too reverby initially. i also added an instrument that was lying around unused from the PMD2 samples which sounds like its from a D-50, but it's not fantasia or anything. it's like a piano layered with strings and a chorus and the closest i could approximate it to was echoes/echo drops but it's really more of a pad than a weird pad than anything else? like an alternate version of fantasia. i'll post my appended version when i'm sure i have permission lol

Link to comment
Share on other sites

This probably has nothing to do with what you are talking about but I will say this anyways because yolo, but if you want to test some more with anything else, I made a MIDI and soundfont export and put it on reddit not too long ago... yet again, probably has nothing to do with what you mean. In fact, I really don't know what you mean. It kinda' just sounds like you are being a bit picky with your export...but correct me if I am wrong hehe. This was a rip as in I directly exported it with the most basic commands. I haven't done music stuff in a long time so I don't remember if I did GS or GM or whatnot, so it probably won't help. Just putting this out because I saw midi and soundfont in your post and maybe I could help with something heheh.

Also I use FL Studio 11, what version are you using? (it will help with me navigating and other stuff)

Link to comment
Share on other sites

@xusu

I had been planning to release a version of the program that exports one soundfont per track to help with this kind of things. One per track mainly because samples are tuned differently for every single tracks. I never really got around to it, since the whole thing is a broken mess really.

Don't use -gm. It won't work well with pmd2 since the tracks have several percussive tracks, and some just don't. GM expects track 10 to be drums always, GS doesn't. The game also never uses more than 16 tracks, so don't worry about it, the default mode will always have 16 tracks max. I think your problem with the chromatic/percussive tracks not switching modes properly comes from how the FL studio sequencer doesn't seems to handle importing/converting sysex midi messages. My tool puts in each midi file some sysex messages to tell the synth to run in GS mode, and set some tracks to chromatic/percussion tracks. A bunch of older synths, like windows' default built-in synth don't support that. So you'll probably have to change those things manually when you import it in FL studio since its midi import is far from perfect.

Also, I suggest you dump the raw pmd2 samples using this line :

"EoSRomRoot/data/SOUND/BGM/bgm.swd" "out_pmd2samples" -hexnum

And then export the list of sample used for each presets for each tracks:

-swdlpath "EoSRomRoot/data/SOUND/BGM/" "out_pmd2samples.txt" -listpres -hexnum

Then if you compare the cv_info file and the out_pmd2samples.txt files for each tracks you'll see what samples each track/instrument presets uses, and can listen to each individual samples exported from the soundfont. That's how I did to figure out what samples are what. It really helps a ton, since the game's soundtrack messes with the samples a lot with effects and etc.

For instance, in treasure town, if you listen to the samples you said are bagpipes, they don't sounds at all like bagpipes. The composer just layered several notes to sound like a bagpipe. But in other tracks, those very same samples are used for something that sounds closer to what sounds more like an English horn or something close to it, maybe a bassoon or some "non-standard" variation that sounds like that. The actual bagpipe samples are used in bgm134 and 137 for example.

Also, some of the instrument samples used in the game are instruments not in general midi or gs. Some percussion(like that Indian percussion in track#29), and etc.. So I put what was closest.

 

About your earlier questions:

1. About the cv_info file, to change the midi instrument used for a given in-game instrument/preset just set the number in-between the MIDIPreset tags to the preset number you want. Like:

<MIDIPreset>81</MIDIPreset>

You don't need to touch the DSE preset. The tags are explained at the top of the cv_info file too.

2. That's because of FL studio's Fruity LSD does not support GS sysex messages, or basically any sysex message afaik. Better use something more compatible like foobar2000 or the bassmidi driver, or anything based on fluidsynth to play the midi with a GS compatible soundfont and you'll notice the drum/chromatic tracks are fine.

  • Like 1
Link to comment
Share on other sites

Well, I think fl studio's midi import was meant more for importing stuff from your typical music notation software that doesn't do anything very fancy with the midis. Roland's GS is an extension on General midi, same with Yamaha's XG, that tried to add missing features to it, but they're their own standards afaik.

But, yeah, lots of things done via sysex messages aren't GM standard. Although GS, or at least some parts of it like some of their extra instruments, kinda became more or less commonly supported outside the standard from what I know/can see. So its really a huge headache to deal with midi compatibility XD

Link to comment
Share on other sites

  • 4 weeks later...
On 7/19/2018 at 2:11 PM, Luma said:

Is it possible to edit tileset colors, pokemon that appear in a dungeon and their levels, starter pokemon, and the amount of floors in a dungeon?

Not yet. But we do know how most of it works. We still need to write tools to do it. Tilesets are still tricky.

 

7 hours ago, Ppvip said:

hello i would like to know how its possible to convert an SWD file to WAV or any audio file in any possible way , cheers

Well, you can rip the individual samples inside a SWD file to wavs using my tool.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

hey so, I've been lurking the thread for quite a while now. I've decided to spice things up a bit and modify the game slightly to have some newer pokemon replace old ones. I've tried Kaoutil for the portraits and Gfxcrunch for the overworld sprites, and so far both have worked well. Problem is, when I try to replace the overworld sprites' .pal file with my own, Gfxcrunch doesn't accept it and won't convert it to a .bin file. It works fine when I leave it alone or use another pokemon's palette, however. But since it doesn't match with the sprites, it looks really ugly in-game. Does the palette file that the game uses have some unique properties that I'm missing, or am I doing something else wrong?

Edit: nvm figured it out

Edited by Laskey
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...