Author Topic: Analysis of the Map files  (Read 8012 times)

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Analysis of the Map files
« on: June 18, 2015, 09:51:23 AM »
So, the core map folder (\gn_dat3\map\data) has three files in each individual map folder. I have figured out what each file roughly does.
  • ###.fmf - This file contains the map design and where objects are placed.
  • ###.mad - This file contains all the data for the map, such as the music, the encounter table, the map name, tileset, etc. I'll get into this down below.
  • ###.obs - This file controls warps and other object locations, such as NPCs and Item balls.

Now, I've spent roughly the past 2 hours going over the .mad file to try and decipher what it contains. I've managed to figure out most of whats in it, save for 2 things. There's also some things that need some additional checking, but that's something to do at a later time. These are the findings of my investigation, this should help in getting information for the wiki prepped, as well as making a tool for extracting the information a whole lot easier. The example map used here is the Garden of the Sun, map 160.



It seems that battle background determines the wild battle music used. I have a hunch this is determined somewhere within the executable file, unless I'm just really thick and overlooking it somewhere. As for the Overworld Fog Effect, there are 8 values for it.
  • 01 - Normal
  • 02 - Forest Darkness
  • 03 - Mist
  • 04 - Snow
  • 05 - Falling Cherry Blossoms
  • 06 - Red Hue
  • 07 - Butterflies? I'm not entirely sure.
  • 08 - Starry Sky of Small Desires

I've also looked at the .obs file, since it controls events and warps. However, there's no feasible way i'm deciphering that. It looks too complex for me to comprehend. Someone else might be able to understand it, but as it stands, I cannot.
« Last Edit: August 16, 2015, 07:39:43 PM by DerxwnaKapsyla »
I do the 2humons in RMXP

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #1 on: June 18, 2015, 10:09:16 PM »
I have updated the first post with new findings and an updated image. The new findings document the Field Encounter Type and the Overworld Fog Effect.
I do the 2humons in RMXP

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #2 on: August 16, 2015, 07:40:34 PM »
In light of recent things, I have edited the first post again with updated information. We now know where the alternate encounter table is stored.
I do the 2humons in RMXP

Offline Greenmittenz

  • A Member group
  • Posts: 101
    • View Profile
Re: Analysis of the Map files
« Reply #3 on: August 17, 2015, 05:27:39 AM »
Posting this here cause it is relevant to maps...

Finally got around to uploading all the map files to imgur if people want to play with them. Posting a shortened version of the imgur album link.
http://goo.gl/q02xZj
Puppet Dance Performance Any% speedrun in 1:42:38 (WR) http://www.twitch.tv/greenmittenz/v/17460931

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #4 on: August 17, 2015, 02:30:15 PM »
Posting this here cause it is relevant to maps...

Finally got around to uploading all the map files to imgur if people want to play with them. Posting a shortened version of the imgur album link.
http://goo.gl/q02xZj

How did you get your hand on these out of curiosity? For reference.
I do the 2humons in RMXP

Offline Greenmittenz

  • A Member group
  • Posts: 101
    • View Profile
Re: Analysis of the Map files
« Reply #5 on: August 17, 2015, 04:15:45 PM »
I received the maps from dabomstew, I believe he used the fmf to render the map layout and the obs to place the objects but I am not exactly sure how he went about doing so.
Puppet Dance Performance Any% speedrun in 1:42:38 (WR) http://www.twitch.tv/greenmittenz/v/17460931

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #6 on: August 17, 2015, 04:38:02 PM »
We'll probably need these again when the dlc comes out, as it's adding new maps. But until then, this is perfect!
I do the 2humons in RMXP

Offline Greenmittenz

  • A Member group
  • Posts: 101
    • View Profile
Re: Analysis of the Map files
« Reply #7 on: August 17, 2015, 08:22:41 PM »
Apparently the only thing to really do with the OBS and FMF files is to build the maps which we already have...
"ya we have the maps generated already
there is not too much more to do with that data
other than "rom hacking""

Dabomstew and my primary interest in them has been for routing the speedrun but at the very least we will probably do it again when the major patch comes out as it will be relevant for speedrunning. I am also working on matching up the trainer table with the events along with all the items to show what all the item orbs and stuff are on each map.
Puppet Dance Performance Any% speedrun in 1:42:38 (WR) http://www.twitch.tv/greenmittenz/v/17460931

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #8 on: August 17, 2015, 08:43:10 PM »
That will be even more helpful, since I'm trying to document that stuff on the wiki right now. I've only gotten done Hakurei Shrine, and Route 1 is almost done.
I do the 2humons in RMXP

Offline Greenmittenz

  • A Member group
  • Posts: 101
    • View Profile
Re: Analysis of the Map files
« Reply #9 on: August 19, 2015, 09:37:54 AM »
Ok finally finished going through the game and matching up the events with the trainer table and items. Figured the information might be helpful for you to use with the wiki so I copied my lookup tables to google docs.
https://docs.google.com/spreadsheets/d/1mwOh22k1ropW0nDX7BTZfrCUpWiXvw--IwkGl8VDDcs/edit?usp=sharing

Some notes about the stuff
About the maps themselves. Events 0-49 are typically standard events such as story missions. 50+ tend to be Items. 2xx are NPCs that only talk to you and 512+ are trainers and after all trainers on the map are numbered it goes on to the named trainers. Then events in the 8xx-9xx range tend to be warps of some kind.

MapDB - Just a reference with the links to the images I uploaded earlier. The names are just to be able to separate the maps as they often have the same name in the game files.
EncounterDB - Encounters mid level and encounter rate in each map. There might be a few places I missed cause honestly I was lazy when I threw the info together.
BattleDB - Matches the Unnamed trainers on each map with their event number to the trainer number in the trainer table.
TrainerDB - Completed trainer table with all relevant information.
EvBattleDB - This is a table I made for all of the special/event battles or more precisely the "Named" trainers. Many of the events to trigger the battles can be hard to identify so this just ties all the event battles to the map where they occur.
ItemLocDB - Ties map number and event number to the item that you get.
ConnectionDB - Simply shows which maps and connected to others through warps. The one exception is with map 19 that ties to Makai, the map doesn't show a warp but it does act as a warp so I included it anyways.

Some more about the Trainer and Battle tables. All of the trainers are accounted for in the game other then the following.
0 Seems to be a test battle nothing special... Potentially called on for the starter encounter but that is likely calling a wild encounter based on how the AI acts.
12-16 Not in the game at all but perhaps these were used in the demo?
500 maybe a placeholder? the real stuff starts at 512
587-592 These are the fairies down in the unaccessible area in the scarlet devil mansion. The issue is that there is one more event then there are trainers to assign to them meaning one of them is a double up. I might fill them in later but for now you can't get to it normally anyways so I wont worry about it.
1021-1023 These are all test battles found on the debug maps. You can't access them normally so I didn't bother dealing with them.

Also something I plan to get eventually but did not think of when I did my quick run through of the game was to record all of the shops and what you can get and which maps they are on.
« Last Edit: August 19, 2015, 09:40:08 AM by Greenmittenz »
Puppet Dance Performance Any% speedrun in 1:42:38 (WR) http://www.twitch.tv/greenmittenz/v/17460931

Offline akatsukisky

  • A Member group
  • Posts: 9
    • View Profile
Re: Analysis of the Map files
« Reply #10 on: August 20, 2015, 10:56:39 AM »
Um hey guys, I have a question. While it appears that Mokou's house is in the map database, I am unable to find a way there.

Is it an unimplemented map coming with the C89 DLC or do you need a specific way to enter her house, just like how you can go to the depths of the Bamboo Forest?

Also. I saw Flandre running around in the SDM. And yet I am still unable to actually fight and do a single puppet smashfest (Power Kasen with A+ all stats and the Fighting ultimate move "Vacuum Break Fist: 150 Focus, cannot move next turn") on her. Does anyone know how to find her?

Offline Greenmittenz

  • A Member group
  • Posts: 101
    • View Profile
Re: Analysis of the Map files
« Reply #11 on: August 20, 2015, 06:32:12 PM »
You can access Mokou's house... In the files near mokou's house on the bamboo forest map you can see the warp event is #1001 and 1002. then jsut find where on the map the other side of that warp is (hint NPC #516).

As for Flandre She is not in the game as a fight. There are some extra unimplemented rooms in the SDM that might have lead to a fight with her eventually but atm she is not even in the trainer list.
Puppet Dance Performance Any% speedrun in 1:42:38 (WR) http://www.twitch.tv/greenmittenz/v/17460931

Offline Elyk

  • Moderator
  • A Member group
  • *****
  • Posts: 66
    • View Profile
Re: Analysis of the Map files
« Reply #12 on: August 30, 2015, 03:02:21 AM »
After the translation patch is finished I'd like to talk about the map stuff you have written because I'm interested in how far we can push modding.

Offline akatsukisky

  • A Member group
  • Posts: 9
    • View Profile
Re: Analysis of the Map files
« Reply #13 on: September 02, 2015, 09:44:59 AM »
Um, another question? I saw an item that Suwako-sama gives in the Wiki, which doubles XP and PP gained from battles. Can I know where to find the little god?

(Already cleared, now finding the remaining SCs and reincarnating puppets to use for Shinki)

Offline DerxwnaKapsyla

  • Administrator
  • A Member group
  • *****
  • Posts: 162
  • What is development and how do I game
    • View Profile
Re: Analysis of the Map files
« Reply #14 on: September 02, 2015, 06:47:11 PM »
Postgame, either right away or after the Kasen sidequest, behind the Moriya Shrine in Lake Moriya's center
I do the 2humons in RMXP