Difference between revisions of "Tutorial: Adding custom maps to the wiki"
m |
|||
Line 76: | Line 76: | ||
== Adding Terrain Data == | == Adding Terrain Data == | ||
+ | |||
+ | '''Getting the Terrain Code Without Ganesha Dx''' | ||
You must know which mesh file you want to extract the information from. Normally that will be the first map state mesh. | You must know which mesh file you want to extract the information from. Normally that will be the first map state mesh. | ||
Line 86: | Line 88: | ||
GoTo that offset, and copy 4098 (0x1002) bytes at that position. The 2 extra bytes are the width and length of the map. | GoTo that offset, and copy 4098 (0x1002) bytes at that position. The 2 extra bytes are the width and length of the map. | ||
+ | |||
+ | '''Getting the Terrain Code With Ganesha Dx''' | ||
+ | |||
+ | Open your Map in Ganesha Dx and go to ''View -> Show Raw Terrain Data''. Press the ''Generate'' Button and then press the ''Copy to Clipboard'' Button. Every time you make a change to your Terrain, you must click the ''Generate'' Button again. | ||
+ | |||
+ | '''Where to put the Code''' | ||
Paste the result as the second argument of the #printmap function as below. There can be spaces between each byte or none, either way it will work. | Paste the result as the second argument of the #printmap function as below. There can be spaces between each byte or none, either way it will work. |
Revision as of 05:07, 12 June 2022
Choose a map_identifier, for example: FFTHacker_Alternate_Sweegy_Woods
Take the following screenshots, either with Ganesha DX (WiP) or with the Map Viewer.
Press the following keys to adjust the map viewer:
- X : Makes the axis lines disappear
- Shift+b : Turns the background magenta
PS: The following filenames must use underscores _ instead of spaces!
Azimuth | Altitude | Magnify | Field of View | Suffix | Example |
---|---|---|---|---|---|
0° | 90° | 100% | Isometric | _bev.png | FFTHacker_Alternate_Sweegy_Woods_bev.png |
45.0° | 30° | 100% | Isometric | _45.png | FFTHacker_Alternate_Sweegy_Woods_45.png |
135.0° | 30° | 100% | Isometric | _135.png | FFTHacker_Alternate_Sweegy_Woods_135.png |
225.0° | 30° | 100% | Isometric | _225.png | FFTHacker_Alternate_Sweegy_Woods_225.png |
315.0° | 30° | 100% | Isometric | _315.png | FFTHacker_Alternate_Sweegy_Woods_315.png |
Edit the screenshots with Photoshop/GraphicsGale/Affinity Photo or whatever you prefer in order to set Magenta to a transparent color and to crop the images to their smallest sizes.
Upload all of these files in one go with Special:BatchUpload
Create a new page with the map_identifier as the title with the following contents:
{{ #printmap: map_identifier }} [[Category:Maps]] [[Category:Custom Maps]]
For example:
{{ #printmap: FFTHacker_Alternate_Sweegy_Woods }} [[Category:Maps]] [[Category:Custom Maps]]
Preview to make sure everything is working, then save!
Adding Terrain Data
Getting the Terrain Code Without Ganesha Dx
You must know which mesh file you want to extract the information from. Normally that will be the first map state mesh.
There's no real simple way to determine which file it is, other than that it's not a texture file (i.e. it will be under 128kb) and will be saved by Ganesha.
The first map state's mesh file's ISO sector is located at 0x0000001C and is 4 bytes long... you might be able to cross-reference with the vanilla map list here matching with the Sector Start: https://ffhacktics.com/wiki/MAP/
Open up the Mesh file in a hex editor and at 0x00000068 you should find the offset for Terrain Data. It is stored in Little-Endian so make sure to byte-flip.
GoTo that offset, and copy 4098 (0x1002) bytes at that position. The 2 extra bytes are the width and length of the map.
Getting the Terrain Code With Ganesha Dx
Open your Map in Ganesha Dx and go to View -> Show Raw Terrain Data. Press the Generate Button and then press the Copy to Clipboard Button. Every time you make a change to your Terrain, you must click the Generate Button again.
Where to put the Code
Paste the result as the second argument of the #printmap function as below. There can be spaces between each byte or none, either way it will work.
Note: I replaced most bytes with "..." to not fill up your screen
{{ #printmap: FFTHacker_Alternate_Sweegy_Woods | 0A 09 00 00 01 ... 01 00 }} [[Category:Maps]] [[Category:Custom Maps]]