Stadium Dat Convertion

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Stadium Dat Convertion

Postby mee » Wed Aug 23, 2017 1:59 pm

I'm gonna say right away, this isn't so simple. But I am gonna put this up here for anyone who wishes to try.
This might also take a while to write, but thats my issue :)

Tools:

1) DEX
2) TPF EXTRACT
3) TEXMOD
4) Photoshop CS2 and its dds plugin
5) Hex editor- there is a link for one in the link above
6) MUER
7) Madden DB Editor
That should be it for the tools need.


Next you start the conversion!

1) Use tpf extract to extract the files from the tpf stadium you are converting.
2) Move them into a folder. We will get back to them later
3) You need to get your TMdl from the base stadium.
    a) Open up your roster. Check the SRES value for the stadium you need
    b) Take the SRES value multiple by 12, then add 1 (like if SRES is 12, you need file 145)
    c) Open stadiums.dat go to said file (say 145) and extract it(day version). You then add 4 and take again (file 149-dusk) and one last time (153-night)
    d) If its compressed, you need to uncompress it. (If you need instructions go here first video)
4) Fire up the hex editor and open the TMdl you got from stadiums.dat
5) On the text side look for the letters LOCA 10 lines down. Press after the A.
6) Highlight the next 4 characters, switch to the hex side and read them (say 00 92 17 00)
7) This is where the LOCA section starts. The byte are in reverse order, but the byte itself is correct. (So it would be 179200)
8) Go to said hex point, cut from there to the end of the file, the File-New-Paste-Save.
9) Return to the base stadium. Press SEARCH-FIND and type MMAP. Memorize the hex location.
10) Scroll to the end of the file, press between the final 2 periods on the text side.
11) Press CTRL-E and replace the first number with the location where the MMAP starts.
12) CUT-File-New-Paste-Save
13) You should save your original file (which only contains the TMdl now) with a new name.
14) Do so for all 3 stadiums.

Now we have, separately, a TMdl, an MMAP, and a LOCA. Now we work on the graphics.
So the Giants traded Beckham....

Stadium Dat Convertion

Sponsor

Sponsor
 

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Re: Stadium Dat Convertion

Postby mee » Wed Aug 23, 2017 1:59 pm

GRAPHICS

Now we go back to the file which we extracted from the tpf.
1) Open up the mmap in DEX. You may need to change the file extension to .dat not .mmap
2) Now we need to match up the files in the dat to the files in your folder.
TIP: Use texmod to log the files in the stadium, then compare definition files to help you match them up!
3) After you have them matched up, fire up the graphics from the tpf into photoshop.
4) Every graphics needs to follow the same ratio of dimmensions from the original in the dat. So if the original was 128x256, the new one can be 256x512, but not 128x512. Also the biggest dimension in a file can be 1024 for both the height and the width. Also the size has to be in powers of 2 (like 2 4 8 16 32 64 128 etc.)
5) Save it as a dds. Use these settings (image and explanation from 1312qohelet)
Image
*underlined in red - required*
*outlined in green - arbitrary, depending on what you are working on, ie portraits, logos, uniforms*
After saving, you have an image that will be accepted by StingRay68's DAT Editor and DEX
6) Now you need to import these images over the originals in the MMAP
7) Save you file after you finish with it please.
8) Follow all these steps for all 3 versions of the stadium.

Now all the graphics are in the MMAP. Now we need to import he MMAP, fix the size of it, and fix the location of the LOCA in the TMdl.

RETURNING THE MMAP AND LOCA

1) Open up the standalone TMdl in the hex editor
2) Copy-Paste the MMAP after the TMdl
3) Pause and check the length on the MMAP (Bottom mid-right on the HxD hex editor)
4) Go to the header of the file on the line before LOCA you will see the word TEXT. (TEXT=MMAP)
5) After the word TEXT skip 4 characters then highlight the next 4 characters(This would be 78-7B in hex). This is the length/size of the MMAP.
6) Back in the hex side you want to change the bytes to the new MMAP size. Again bytes themselves stay the same, reverse order. So if you length was 1A B4 87 you change the 4 byte to 87 B4 1A 00. Follow?
7) Now go and paste in the LOCA after the MMAP
8) Now we need to fix the starting section of the LOCA. Return to the header of the file, and highlight the 4 characters after LOCA(84-87 in hex)
9) Check the byte where you MMAP ends (say 179200) you change the 4 characters to 00 92 17 00. Follow? Reverse order of bytes, but the byte itself stays the same.
10) Save
11) Follow all these steps for all 3 stadiums
So the Giants traded Beckham....

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Re: Stadium Dat Convertion

Postby mee » Wed Aug 23, 2017 2:00 pm

IMPORT INTO STADIUMS.DAT AND THE ROSTER

1) Open up stadiums.dat. Find an open slot which the number below is divisible by 12. (So 145 would work)
2) Import your day stadium there (145) Skip 3 then import dusk (149), Skip three and import night (153).
3) Save and exit stadiums.dat
4) Open your roster in Madden DB Editor
5) Goto the STAD table.
6) Export to csv
7) Open in Excel (or a different spreadsheet editor)
8) Copy over the line from the stadium you edited and paste it as another line after the other lines
9) Change: SRES to the number one file below your day stadium divided by 12 (so SRES=12 if files 145 149 and 153)
10) SGID to an available number. You a bunch of other things. Nice list by BiT here (BTW the Vikings field replaced the Atlantis one).
11) Import the csv back into the roster and SAVE.
12) Load up the roster in game, select the stadium at the stadium selection screen and enjoy!
13) If you have permission from the creator, share here on FI!
So the Giants traded Beckham....

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Re: Stadium Dat Convertion

Postby mee » Wed Aug 23, 2017 2:00 pm

FAQs

Q: I don't get the whole header section thing :? :?:
A: Lucky for you, I made a fancy chart!
Image
This is a header of an MMAP.
The pink section on the hex side, represents the name of the section on the text side. TMdl, Info, Swap ect.
The green section on the hex side, tells the game where the first byte of the section is. So the LOCA section starts at 0C 4F 21 00, reverse the order is 0x214F0C
The grey section is the length of the section. For the LOCA section it is 74 00 00 00 or 74 bytes long.


Q: Exactly where can I find the MMAP length?
A: Look at the pic
Image

Q: My image in DEX is coming up garbled
A: If you are importing an 8 bit image over a 4 bit one, you need to import it twice.

Q: A bit more about hex editors, please?
A: Basically the hex values come in 2 number pieces equaling one byte, 16 bytes to a line. Every value can be values 0-15, with A=10 B=11 C=12 D=13 E=14 F=15. This is all on the hex side of the editor. You don't really want to work on the text side. The only thing you should do with it ,is finding the section you want (ext, loca etc.) and the name of the TMdl file (which can be found the line after LOCA) which can tell you want the TMdl file does. This is true for more then just stadiums of course.

K great! I'm ready to start. What stadium should I convert?
A: Any tpf stadium can be converted. To release it on the site you need permission.
Poke around the forum. KiT made a bunch.
Then of course, the Heisman mod has 128 stadiums, all unconverted, but getting permission from them to release probably won't happen, but feel free to try.
Also, BigDaddyCool's "All-Inclusive Mod" has somemore(74 to be exact) stadiums in tpf form..

Q: This looks complicated. I'll let the experts do it.
A: It really isn't! It's time consuming for sure, but truthfully simple!
So the Giants traded Beckham....

User avatar
RevanFan
Legend
Posts: 12681
Joined: Fri Jul 15, 2011 5:25 pm
Location: New York

Re: Stadium Dat Convertion

Postby RevanFan » Wed Aug 23, 2017 2:11 pm

Make sure you make a post announcing when you're done editing your reserved posts. If you don't, it won't show up under "unread posts".
Support me on Cash App - $RevanFan
Historic Cowboys Teams Mod
My Cowboys Journal
I'm a die hard Cowboys fan and a lifelong New Yorker.

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Re: Stadium Dat Convertion

Postby mee » Wed Aug 23, 2017 2:16 pm

RevanFan wrote:Make sure you make a post announcing when you're done editing your reserved posts. If you don't, it won't show up under "unread posts".

Thank you. I hope to have the words done by today, its the FAQs and the pics that will take time.
So the Giants traded Beckham....

User avatar
KeepinItTeal
Hall of Fame
Posts: 1784
Joined: Fri Feb 19, 2016 5:11 pm
Location: NE FLA

Re: Stadium Dat Convertion

Postby KeepinItTeal » Wed Aug 23, 2017 10:34 pm

mee wrote:
RevanFan wrote:Make sure you make a post announcing when you're done editing your reserved posts. If you don't, it won't show up under "unread posts".

Thank you. I hope to have the words done by today, its the FAQs and the pics that will take time.


Thank you mee.

1312qohelet
Hall of Fame
Posts: 2146
Joined: Sat Dec 05, 2015 5:12 am
Location: Hill Side

Re: Stadium Dat Convertion

Postby 1312qohelet » Thu Aug 24, 2017 9:17 am

Excellent tutorial....very well done.

User avatar
Kevin5455
Hall of Fame
Posts: 1134
Joined: Tue Dec 27, 2016 10:47 pm
Location: New York

Re: Stadium Dat Convertion

Postby Kevin5455 » Thu Aug 24, 2017 10:22 am

Nice job, mee

User avatar
mee
Hall of Fame
Posts: 1908
Joined: Wed Sep 03, 2014 4:05 pm
Location: New York

Re: Stadium Dat Convertion

Postby mee » Thu Aug 24, 2017 4:51 pm

Thanks guys. Now I'm waiting for one of you to follow the tutorial and convert a stadium ;)
I added a bit more about hex editors in the FAQ.
Feel free to fire away questions to add to the FAQ.
So the Giants traded Beckham....


Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 10 guests