News: 11 March 2016 - Forum Rules

Author Topic: [Final Fantasy Tactics: PSX] Battle Map editing via Ganesha  (Read 885 times)

ArmoredKori

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
[Final Fantasy Tactics: PSX] Battle Map editing via Ganesha
« on: February 13, 2021, 08:58:40 am »
Greetings,

We currently have level editing tools to modify Battle and Event maps of Final Fantasy Tactics via a tool called Ganesha (https://ffhacktics.com/smf/index.php?topic=11483.msg227994#msg227994)

The source code can be found here: https://gomtuu.org/fft/Ganesha/

I was wondering if there were anyone knowledgeable enough in 3d software/programming to know if it's possible to do any of the following:
  • Add ability to export and import common file types (.FBX or .obj) used by other 3D programs
  • Add drag polygon tools instead of having to manually type in coordinates
       if this is implemented, snapping to vertices or grid snapping would be lovely
  • Edit vertices in 3D workspace instead of having to manually type in coordinates
With any one of these QoL updates to this program the Final Fantasy Tactic romhacking community would greatly benefit from easier Custom Map creation.

Thanks in advance for any knowledge sharing!

MysticLord

  • Full Member
  • ***
  • Posts: 195
    • View Profile
Re: [Final Fantasy Tactics: PSX] Battle Map editing via Ganesha
« Reply #1 on: February 13, 2021, 09:39:33 pm »
Here are all the relevant links on maps from the FFHacktics wiki.
https://ffhacktics.com/wiki/Maps/GNS
https://ffhacktics.com/wiki/MAP/
https://ffhacktics.com/wiki/Maps/Texture
https://ffhacktics.com/wiki/Maps/Mesh
https://ffhacktics.com/wiki/Maps/Sectors

General tools download area, links to the latest versions of Ganesha (including source code and what looks like a local copy of Python 2.7) and it's color plugin/update are here. Also of interest is a tool called Map2gl, whose instructions are in the second link.
https://ffhacktics.com/wiki/Tools
https://ffhacktics.com/wiki/Map2gl

Note that there are limits on the filesize of each map, as determined by the number of free bytes available in the last CD sector of each map.
https://ffhacktics.com/wiki/Maps/Sectors

You may be able to get around that by rebuilding a disc image from the game files using Cebix's psxbuild tool:
https://github.com/cebix/psximager

If you can and it works, then the game uses the directory and subdirectory sectors to navigate to and load files. If it doesn't work, it uses custom LBA tables and you'll need to consult with your nearest ASM hacker. Looking for the text "load" at the Routines page of the FFHacktics wiki, there are subroutines for both loading files and loading data, so it could use both... maybe one for navigating within files, and another for loading files or parts of files.
https://ffhacktics.com/wiki/Routine_Locations
https://ffhacktics.com/wiki/Load_File_(0x13bc14)
https://ffhacktics.com/wiki/Load_Data_From_Disc_(0x11bd0)
https://ffhacktics.com/wiki/Load_Data_From_Disc_(0x11bf4)
https://ffhacktics.com/wiki/Load_Data_From_Disc_(0x44694)

Some of those routines have comments which say they accept an LBA as a parameter, so it's used somewhere. Loading modified maps and updating sub/directory sectors and LBA tables is best done programmatically, consult with the FFTPatcher maintainer once your team figures this out.

I don't know anything about Maya or Blender, but you could repost this and any new information that pops up on a their respective message boards and see if it resembles something that already exists. It's very likely that FFTs maps were made using 3D modeling software from back in the day, on a workstation that is roughly equivalent to a low end cell phone today.

edit

Try TrID, a program designed to identify unknown files.
https://www.mark0.net/soft-trid-e.html

edit 2

Looked around the site above and remembered that Xentax is a thing, which led me to Biturn, a program for viewing 3d files in FF7 and probably other Square games. Ask at the Xentax forums.

Xentax Forums - Game Modding - 3D/2D Board:
https://forum.xentax.com/viewforum.php?f=16

Xentax Wiki:
http://wiki.xentax.com/index.php/Game_File_Format_Central

Biturn home page:
http://wiki.xentax.com/index.php/Biturn

edit 3

Post at the Xentax forum and see if they can help. Maybe the Qhimm forums too, I know LazyBastard (who is also the admin of gamehacking.org, you could try their discord) did some work with 3D character models for FF7.

Give it a month, and once you have all the information you can find/harvest, post on the Maya/Blender forums and see if anyone can use what you found and the source code of Ganesha and map2gl to write a script/plugin to convert from one format to another. It will help a lot if you have an example/tutorial you can post so they can quickly and easily understand the workflow, and how the various pieces fit together.

Getting answers on online forums usually requires doing 99% of the legwork and knowing how to spin things so interested people with the right skills can do the last 1% of legwork (and all of the programming, which is why they want you to do the legwork).

edit 4

Given that FFT and VS were made by the same team, lead, and a few years after FFT they probably have a lot in common. I would check in with Valendian and Morris on GameFAQs, romhacking.net, and Github.

Morris wrote a tool to edit Vagrant Story's 3D models, both characters and environments. It's Javascript so it's the smallest leap one can take to get into programming.
https://github.com/morris/vstools

Looking at his github, it has a link to his personal site complete with email and even a phone number. Maybe ring him up and regale him with tales of the great 2021 Snow-pocalypse.
https://morrisbrodersen.de/

Valendian (Michael Collins) wrote Godhands, a Vagrant Story editor.
https://github.com/collinsmichael/GodHands

I'm not sure if Valendian is still around, or if RHDN has a tagging system in posts. May as well give it a shot: @Valendian. If not, just send him a PM.

Mercurial Forge is working on a 3d model viewer, and a personal site (which crashed my browser) with an email address.
https://github.com/MercurialForge/VSViewer
https://www.mercurialforge.com/resume

Korobetski Sigfrid seems to be remaking Vagrant Story with modern tools, probably open sourced to the degree that an engine recreation can be.
https://github.com/korobetski?tab=repositories

Korobetski also developed a Blender plugin for at least some of Vagrant Story's 3D models. It has a link to a Discord server, which is below.
https://github.com/korobetski/blender-vagrant-story
https://discord.gg/BRgsK77zkf

There's some stuff on the Romhacking.net wiki too.
https://datacrystal.romhacking.net/wiki/Vagrant_Story
https://datacrystal.romhacking.net/wiki/Vagrant_Story:SHP_files
« Last Edit: February 15, 2021, 09:45:30 pm by MysticLord »

ArmoredKori

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: [Final Fantasy Tactics: PSX] Battle Map editing via Ganesha
« Reply #2 on: February 15, 2021, 11:02:57 am »
Thank you very much for all this information. I'll try to hit up the Xentax forums to see if we can make any headway!