• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
February 07, 2025, 06:26:06 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - mrgudenheim

1
Release: https://github.com/mrgudenheim/FFTae/releases
Github: https://github.com/mrgudenheim/fftae

v1.03 - Added initial support for Animation Rewrite ASM. Only SetBackFacedOffset opcode is supported in this release. Since the Animation Rewrite ASM changes the ffc2 opcode to have 1 parameter instead of 0, there may be issues unless all vanilla ffc2 opcodes are changed to something else.
v1.02 - Improved responsiveness when loading rom or switching spr. Improved ui of animation list and frame list
v1.01 - xml generated will now be for all modified files. SEQ and SHP will be auto selected when selecting a sprite. fixed bug causing wep seq pointers to be wrong
v1.00 - Added animation preview
v0.04 - Changed tool to load files from the whole ROM. Added SHP preview list.
v0.03 - Add or delete animations. Add, delete, or edit animation pointers
v0.02 - added file size overwrite to the generated xml

This tool streamlines editing animations/SEQ files and creating a patch. It's mostly based on the process I followed before, but also fixes some issues.
https://ffhacktics.com/smf/index.php?topic=13253

Limitations and Notes:
- Putting multiple Move opcodes in a row may cause weird issues.
- Deleting an animation will cause any pointer that points past the end to instead point to the first animation

References:
https://ffhacktics.com/wiki/SEQ_%26_Animation_info_pageNo message is associated with this attachment.
2
Spriting / Blank Templates with subframe outlines
January 09, 2025, 04:55:59 pm
I've attached some blank templates that outline the subframes for different sprite shp types. I had not seen templates for the type2 or the altima types before. The type1 and type2 templates have blue background for subframes that are used for submerged frames.

The chocobo template seems incomplete compared to what exists on the vanilla spritesheet, probably missing the subframes related to being mounted.
The type1 and type2 templates may also be missing subframe outlines related to being mounted.
3
This process is greatly streamlined by the animation editor tool: https://ffhacktics.com/smf/index.php?topic=13263.0

This is the step by step process I used to change the shooting animation to have multiple muzzle flashes to look like burst-fire shooting.
While there are at least 12 shooting animations in the game (front facing and back facing for each of equal height, lower height, higher height, for each of wep1.seq and wep2.seq), this write up is only about changing a single one for simplicity - wep1, type1, equal height, front facing

burst_fire2.gif

Useful references:
SEQ File documentation - https://ffhacktics.com/wiki/SEQ_%26_Animation_info_page
Type1 Gun Attack Equal Height - https://ffhacktics.com/wiki/T1_Mid_Mod_Gun
Wep1 Gun Attack Equal Height - https://ffhacktics.com/wiki/W1_Mid_Mod_Gun

The general steps are the following:
1) Figure out what hex needs to be inserted or changed
2) Extract the SEQ files using CDmage
3) Use a hex editor (I used HxD) to overwrite and insert the new bytes
3.1) Put in the new bytes in wep.seq to call the eff animation (QueueSpriteAnim) multiple times and fix the timings to last long enough
3.2) Fix the section 3 size
3.3) Fix the seq section 2 references to all the later animations
3.4) Increase the timings in the type1.seq to last long enough to show the longer wep animation
4) If file size was not changed, import the new .seq file(s) to the .bin using CDmage, otherwise use a hex editor (or juravis?) to directly write your changes to the the .bin


Since I wanted to change the shooting animation I started by looking at the Type1 Gun Attack animations and the Wep1 Gun attack animations. Displaying multiple sequential muzzle flashes could probably be achieved at least two ways, adding frames to the eff.seq OR adding frames to the wep1.seq. I arbitrarily chose to modify the wep1.seq.
The W1 Mid Mod Gun attack animation spans memory 0x04F6 through 0x0512. I chose to duplicate the opcode that calls the eff.seq and a few of the frames after it:
QueueSpriteAnim(02,08)
LoadFrameWait(06,02)
LoadFrameWait(0c,02)
in the hex as
FF F2 02 08 06 02 0C 02
w1_01.png

I chose to increase the wait time on the last frame of this section to have a short time between the muzzle flashes to make it more noticable. This leads to the total 16 bytes of hex I needed to insert into wep1.seq to:
FF F2 02 08 06 02 0C 12 FF F2 02 08 06 02 0C 12
w1_02.png

Since I've inserted bytes the pointer references in section 2 of the SEQ needs to be updated and the size of section 3 (first 2 bytes of section 3) needs to be updated.
Since 16 bytes were added the size of section 3 is updated from 29 06 to 39 06
w1_03.png

Since the W1 Mid Mod Gun is animation 08, the pointer references for animation 09 through 0x5D need to have 16 added. I did the math and generated the text to paste in using a simple google spreadsheet (concatenating leading zeros where necessary).
w1_04.png

Now that frames have been added to the wep.seq, the type1.seq T1 Mid Mod Gun should be updated to stay in sync. To do this I changed the delay on a single frame from 02 to 2E. To improve the animation further the PlayAttackSound(01) could be duplicated, but I was too lazy to do this.
t1_01.png

With the needed hex known, it now needs to be put in the .bin. Since type1.seq did not change size, this is as easy as opening the .bin with CDmage, and right clicking type1.seq to import the modified file.
Since wep1.seq did change file size, unfortunately CDmage cannot be used. Instead I used HxD to directly write the hex to the .bin. Fortunately there lots of empty space after wep1.seq so the added bytes are not an issue. Unfortunately wep1.seq is spread across two CD sectors, so the modified seq file needs to be pasted in as two separate parts so the bytes between sectors (highlighted in blue) are not overwritten.
I find where to paste it in by using ctrl-F to find a string of hex from the wep1.seq. In the vanilla rom, wep1.seq starts at 0x08003D18.
As much of of the modified wep1.seq as possible goes before the sector change, and the rest gets pasted in after the highlighted section.
bin_01.png
4
Release: https://github.com/mrgudenheim/FFTorama/releases
Github: https://github.com/mrgudenheim/FFTorama
v1.20 - assembled frame and animation will update in real time while editing the canvas
v1.19 - improved performance, fixed rotations in right-facing frames
v1.18 - added new settings to show submerged frames or right-facing frames
v1.17 - added new options for importing palettes under "Import FFT Options" button
v1.16 - minor bugfix to fix issue with assembled frame and animation background color
v1.15 - added option to swap palettes when importing or exporting - the spritesheet must only use the first 16 colors of the current palette. When importing a portrait, added option to overwrite a row of the current palette
v1.14 - fixed crash when eff2 spritesheet type was selected. Fixed exporting 4bpp bmp files (formation sprites and portraits). Added ability to import portraits.
v1.13 - added buttons to import palettes from 4bpp and 8bpp .bmp files and to export spritesheets, formation sprites, and portraits as paletted bmp files.
v1.12 - added animation names
v1.11 - added button to export an individual assembled frame
v1.10 - added functionality to save settings and autoload the settings the next time the project is opened
v1.09 - Added ability to load graphics from sp2. The .pck and release notes are on github
v1.08 - Fixed bug that would cause pixelorama to crash anytime pixelorama was started with the FFTorama extension already enabled. Also added a default layout that will be loaded the first time the extension is enabled. The .pck and release notes on github
v1.07 - .pck and release notes on github
v1.06 - .pck and release notes on github
v1.05 - .pck and release notes on github
v1.04 - Implemented interpretation of opcodes that use loops and MFItem opcodes. Added offsets for weapons. Added button to load in custom .shp or .seq files.
v1.03 - Implemented rotations on frames. Added interpretations of opcodes for QueueSpriteAnim, Move, SetLayerPriority, SetFrameOffset, FlipHorizontal. QueueSpriteAnim allows seeing the weapon and effect together with the unit attack animation.
v1.02 - Improved handling of WEP and EFF animations by adding setting to select weapon. Fixed bug where 2 bytes were skipped after every opcode.
v1.01 - Improved how WEP and EFF sprite sheets are handled.
v1.00 - Fixed some UI issues. Viewports for frame and animation now allow panning and zooming
v0.02 - Added all vanilla shp and seq types and improved the UI


To use the extension, extract the .pck file from the zip and drag it into Pixelorama. Two tabs should be added to the top left.
If the new tabs do not appear, you may need to go to Edit-> Preferences -> Extensions and select and enable FFTorama.
The new tabs and be dragged to new locations withing pixelorama.
https://www.oramainteractive.com/Pixelorama-Docs/extension_system/extension_basics#installing-the-extension

This extension adds two panels to pixelorama. One to display a selected frame and one to display an animation. When selecting a frame, the corresponding sections of the sprite sheet will be selected.

Please comment with any feature requests or bugs found

Notes:
- Animations only interpret the following opcodes:
    - LoadFrameAndWait
    - QueueSpriteAnim - Location of weapon and effect sheets are set in the settings panel
    - LoadMFItem, UnloadMFItem, MFItemPosFBDU - Item to load is set in the settings panel
    - Move operations
    - SetLayerPriority
    - SetFrameOffset
    - FlipHorizontal
    - Wait
    - WaitForInput, WeaponSheatheCheck1, and WeaponSheatheCheck2 - These are interpreted as a fixed delay (in frames) set in the settings panel
- There may be alignment errors on frames that use rotation
- Does not handle transparency
- Looks up SP2 graphics in extended spritesheets or separate spritesheet - settings to use animation id, frame id, or hardcoded offsets based on animation id (for longer extended spritesheets)
- If a loaded custom file uses the same name as a vanilla file, the vanilla version will be overridden. To get the vanilla behavior back there are two options:
a) change the name of (or delete) the corresponding file in User/AppData/Roaming/pixelorama/FFTorama.
b) load in the vanilla file
- When exporting, the sprite should only use the first 16 colors in the palette. Formation sprite exports use the current assembled frame.
- Works with Pixelorama 1.0 or newer

Works with Pixelorama 1.0:
https://github.com/Orama-Interactive/Pixelorama
https://orama-interactive.itch.io/pixelorama
https://www.oramainteractive.com/Pixelorama-Docs/
5
Cerabow's mod (https://ffhacktics.com/smf/index.php?topic=12487.msg231540#msg231540) is really great, but while playing through I was frustrated by the need to move to specific tiles to unlock the next level of deep dungeon. This led me to create the attached hack that can be patched directly over an ISO that was already patched with Cerabow's ppf (0.13.2668) so the next level of deep dungeon will auto unlock when the player wins the battle at the current deepest level.

I've also attached a version compatible with the vanilla game (the only thing changed is the location offset), but if you're working with the vanilla game, it would probably be better to edit the conditionals using the spreadsheet: https://ffhacktics.com/smf/index.php?topic=12859.msg231014

I also tested the deep dungeon light fix (https://ffhacktics.com/smf/index.php?topic=12525.0) over Cerabow's, and didn't have any issues.
6
Tutorials and Learning / Lessons Learned by a noob
January 07, 2024, 11:42:01 am
While making a mod for the first time, the tutorial link index (https://ffhacktics.com/smf/index.php?topic=9204.0) was awesome, but also a little overwhelming. This post is to summarize the things I learned with the help of discord and poking around in files, the forum, and the wiki.

What is event editing (aka eventing) and how is it different than (assembly) ASM hacks?

While all changes mods make end up as assembly, event editing seems somewhat unique in that all events get compiled into a large blob, so mix and matching event edits is far less feasible. Event editing is performed with either "easyvent editor super perfect" or "JuraviS". Some complex events, such as TLW NewGame+ and Credits events, should only be compiled with JuraviS. "Events" include things such as cutscenes, dialogue in battle, game over, bethla sluice trigger, deep dungeon unlocking deeper levels, TLW Remix "Preparation menu", etc.


What are conditionals and how to edit them?

World conditionals tell the game when to trigger events. These can be edited using a spreadsheet to create the xml. I used the conditionals v4 spreadsheet from the TLW resources. Note, TLW conditionals spreadsheet has hidden columns, rows, and sheets, but you don't need them to make edits.
What are event conditionals? I don't know, I didn't try to mess with them.

https://ffhacktics.com/wiki/Process_Scenario_Conditionals
https://ffhacktics.com/wiki/Process_Scenario_Conditional


Learning about xml files

Each xml patch can have the following:

A name and description - used by FFTorgASM so people know what they are applying

file - The file that will be edited. Files can be seen by opening the FFT iso with CDmage. If you know the memory you want to overwrite with a hack, the appropriate file can be found with https://ffhacktics.com/wiki/Routine_Locations
file names orgASM takes is basically the file path with / and . replaced with underscores
FFTorgASM automatically applies hacks to the data sections of CD sectors - this means offsets in xml files will basically never match offsets seen by looking at the full rom in a hex editor

offset (ie. memory location in the file) - this is where the assembly will be overwritten. Multiple offsets can be given by separating them with commas

offsetMode - When set to  RAM, the offset is actually a different location. Routine's documented on the wiki use the RAM location. Mentioned near the end of Glain's tutorial (https://ffhacktics.com/smf/index.php?topic=8408.msg166663#msg166663). RAM location to file location needs to substract the value from this table: https://ffhacktics.com/wiki/Routine_Locations

mode - mode="Data" seems to overwrite the hex directly, while mode="ASM" allows code functions (https://ffhacktics.com/wiki/R3000_instruction_set https://ffhacktics.com/wiki/PSX_instruction_set) and variable symbols, which then get converted to hex by FFTorgASM. ASM mode is usually (always?) used with offsetMode="RAM".

The "jal" instruction goes to another function. Search the wiki for the memory value without the leading 0x to find what it does. For example, for the instruction "jal    0x8017e7e4" search the wiki for "8017e7e4".

Some of the most common memory locations can be looked up on the wiki quick links:
https://ffhacktics.com/wiki/Battle_Stats
https://ffhacktics.com/wiki/World_Stats
https://ffhacktics.com/wiki/Variables

Some hacks use psuedo instructions (https://cseweb.ucsd.edu/classes/fa12/cse141/project/pseudo.html) which aren't on the wiki pages, but follow similar naming conventions. Examples include:
move - is an addu instruction where the source register is r0
li = "load immediate" behaves like lui, "load upper immediate" but instead of just setting the upper half of a register, it sets both halves. This takes 2 instructions,
Lui
Ori

If FFTorgASM says an xml can't be loaded because of a bad string input, check to make sure all locations that use offsetmode="RAM" also use mode="ASM".

mode="DATA" example:
<Location file="MAP_MAP107_GNS" offset="30, 44, 58, 6C" mode="DATA"> B9 </Location>
mode="ASM" example:
<Location file="BATTLE_BIN" offset="00070d84" mode="ASM" offsetMode="RAM">
    ori r2, r0, 0x00    # make it so the map can't update when a crystal is laid
</Location>



XML Variables

Each variable needs a "default" value and a "name" that FFTorgASM will show. There seem to be two ways to do variables:

1. Directly write the value at the offset

2. Set symbol="true" so the variable name can be referenced later in the patch. Variables are referenced with %NameNoSpaces


Directly writing variable example:
<Variable file="MAP_MAP107_GNS" offset="30" default="B0" name="NOGIAS Light Level" />

Symbol variable example:
<Variable name="Always On" bytes="1" default="00" symbol="true" />
<Location file="BATTLE_BIN" offset="158210" offsetMode="RAM" mode="ASM">
    ori r1,r0,%AlwaysOn <!-- check if the player turned it Always On -->
</Location>


When using the % to insert a variable value, it's like a #define macro, but it actually is inserting the variable's decimal value
and since values in <Location>  tags are read as hex, it's taking the decimal value and re-interpreting as hex


How to Patch TLW to a vanilla ISO using resources:
1. Make a backup of a vanilla ISO
2. Open the vanilla ISO in ShiShi and expand it (File -> Expand ISO). It may not look like anything is happening, but the "Max SPR size" should change from 4something to 6something. If you don't expand the ISO some of the sprite images will give error saying they are too large when you attempt to import them.
3. Import all the sprites. For each sprite, select the correct sprite number from the top dropdown in ShiShi and then Sprite->Import BMP. Set the sprites SHP and SEQ to match the file name (Type 1, 2 or MON). For example, to import Balthier's sprite, first select the "19 - Rafa (Guest)" in ShiShi, then import the file, then set SHP and SEQ to TYPE1.
"Sprite->Import all sprites" did not work for me.
4. Import all other images. Go to the "Other Images" tab. Image->Import all images
5. Use CDmage to open the ISO and navigate to EVENTS and find the TEST.evt file. Right click the file within CDmage and import the TLW TEST.EVT
Order of steps 6 and 7 does not matter as far as I know.
6. Use FFTPatcher (I used 0.497) to patch "TLW FFTPatcher" - File->Open patch,  PSX->Patch ISO
7. Use FFTactext to patch "TLW Tactext" files. File->Open .ffttext then ISO->Patch ISO
8. Use FFTorgASM in each folder ("AMS FFTP 0.495 B1" and DATA FFTP 0.482) to patch all the ASM.
8a) Highlight "all" in the list on the left. Press "Check all" button. All boxes should have a check mark.
8b) Optionally open the conflict checker - there shouldn't be any conflicts.
8c) Press "Patch..." then press "Patch..." on the new window.
Some people have said they had success with all the xml files being patched at once with the latest FFTorgASM instead of in two separate rounds with the two different versions of FFTorgASM.
7
Completed Mods / FFT TLW g edition 1.05
January 07, 2024, 10:14:44 am
FFT:TLW g edition 1.05 (PSX Mod)

Changelog
1.0 - bugged and could not progress past 2nd battle (Gariland)
1.01 - Rebuilt following best practices. Significant bugs still present.
1.02 - Rebuilt using qol and job extension hack versions from TLW remixed. Tested through Chapter 2 Dorter battle.
1.03 - Modified experience hacks. Units will get exp and jp even if they are dead or petrified at end of battle. Uploaded experience hack collection. Probably bugs lurking due to one hack writing at the incorrect location.
1.03.1 - Slightly lowered the base jp gain per enemy from 24 to 20. Tested through beginning of Chapter 2. Probably bugs lurking due to one hack writing at the incorrect location.
1.04 - fixed hack that lets dead/petrify units gain exp/jp.
1.05 - exp and jp will be gained per enemy at end of battle, regardless of their status. Previous versions only gave exp/jp per KOed enemy.
1.06 - 1) Fixed bug that dead units would not gain jp (fix was by overwriting checks in Store JP routine). 2) Exp and jp awarded at end of battle is now awarded 5 times, independent of number of enemies. Many battles have five or 6 enemies, so this mostly makes a difference for the single zodiac demon battles.

BUGS
...

My goal for this mod are the following:
- Provide a mod I would recommend to my brothers who only played the vanilla game 20+ years ago. Like many other mods, the goal is basically "vanilla but better".
- Avoid significant balance changes to retain the "vanilla" feel and keep the battle mechanics guide (BMG) mostly applicable.
Some of the changes below don't strictly follow the above, but I think they improve the experience enough they are worth including.

It's based on FFT:TLW 2.031 with the following modifications:
- Fix for short name glitch in balthier event - https://ffhacktics.com/smf/index.php?topic=13075.msg232720#msg232720
- Ashley Riot battle won't trigger. The world conditional checks if story progression equals 01, but story progression will always be greater than 01 when entering zeklaus - I think this fight could cause frustration for my brothers due to the difficulty. Combined with it not being optional and not being in vanilla I'm choosing to disable it from the mod.
- Deep dungeon events auto unlock the next floor when winning the battle (events attached)
- Deep dungeon levels are permanently dimly lit (based on updated version of Pride's xml - https://ffhacktics.com/smf/index.php?topic=12268.msg226249#msg226249, https://ffhacktics.com/smf/index.php?topic=12525.0)
- Exp/jp gained after battle. Exp and jp gained are not dependent on successful actions (Based on Glain's xml) - This is a significant departure from vanilla, but I feel the vanilla exp/jp gain system is one of the biggest flaws of the vanilla game.
EXP amount = 5 * {18 + [4 * (RamzaLevel - UnitLevel)]}
JP amount = 5 * {(Job Lv * 2) + [(Unit's Level / 4) + 20]}
- Learn on Hit applies to any unlocked job (Glain's xml)
- Quality of life changes 1.14 including the 1.14e cancel movement - https://ffhacktics.com/smf/index.php?topic=12769.0
- Used Razele's "Broken / stolen items can be bought back at Fur Shop" instead of "extended warranty". When I tried using qol 1.14 "extended warranty" I experienced a bug causing black screen when entering battles.

To do: Figure out if I can incorporate the following from TLW Remix (https://ffhacktics.com/smf/index.php?topic=13119.0)
- Preparation Menu, allowing you access to a wide variety of options before a battle begins. No more will you be stuck just randomly guessing what you might want to send out on the field before even seeing it.
- Game Over recovery, allowing you to immediately retry the battle or even return to the world map (provided you aren't in the middle of a battle sequence).
- Dark Knight (F) and Bard have been swapped around. This should now cause Dark Knight JP to spill over with other Dark Knights, and Bards with Dancers, rather than the mix we had before.
- Guests have been brought back, at least for a first playthrough. They should remain as battle-only Guests in New Game Plus.
- When Mustadio, Agrias, and Ovelia are temporarily unavailable during Chapter 2, as well as Rafa during Chapter 3, they're flagged Missing instead of being removed from the Roster. Upon reappearing, they use the stats and equipment they had saved in battle. (Sadly, Ovelia is then removed for good at the end of Chapter 2.)
- Alma joins the party after the final battle against Altima. Once she joins, she automatically learns Ultima 2 and All-Ultima. Ramza still has to pay to learn these skills in the Depths of Murond New Game Plus menu. Like Ramza, she has both Male PA and Female MA, and cannot abandon the party due to low Brave or high Faith.
- Several maps/events that didn't have Move-Find Item options now do. Mostly because of the Reveal Treasures option in the Preparation Menu. Battles which don't let you deploy units now have at least one controllable unit with Move-Find Item. The player's inventory will no longer be reset after the Orbonne Monastery prologue battle, allowing the items there to be retained for Chapter 1.
- You can skip the Wiegraf fight and get straight to Velius.
- Any unit can flip the switches at Bethla, not just Ramza.
- New version of the Roster Hack which allows the return of Guests during the first playthrough. Slots 18, 19, and 20 start out reserved for Guests, decreasing as the game goes on and fewer slots are needed. Units can also be flagged as Guests without NEEDING to be in the Guest-designated slots, allowing Beowulf and Reis to be flagged accordingly during their sidequests as needed. The Load Formation functionality is now ignored if units aren't in the Roster, rather than loading junk data. The Bench Hack ignores Guests and can't be used to fill the slots designated for Guests until they're no longer reserved for them. Guests can be freely deployed in battles they aren't already reserved for - meaning you can bring units like Alma and Ovelia along to battles as long as they're still in the party.
- A customized version of the Permadeath Terminator has been included, which can be toggled on or off. When active, once a unit's timer runs out, it becomes unrevivable, but does not turn into treasure or a crystal. It is currently enabled for all Rendezvous battles, meaning that you can't permanently lose units during those battles.
- Scene skipping: for non-battle events, hold Start at the beginning of the scene, after a camera movement, or as a dialogue box is finished in order to instantly skip the scene. In order to better facilitate this change, Start now also works as a text advancement button, the same as O, X, or Select.
- Missing units can have their equipment and skills changed, preventing any of them from locking their gear away from others - or being unable to have their gear reset before returning for a future battle.

Dream wishlist for future (these are unlikely to ever happen):
- Streamline the sidequests. My brothers are unlikely to look up guides or move around to every city or read rumors, so it would be nice if the cutscenes/events auto triggered regardless of location and map battles displayed red when they become available.
- Let crystals in deep dungeon increase light, but never have the light decrease to zero. Edit event to have Elidibs set light to zero part way through battle.
- Make Ashely Riot battle optional. Maybe triggered through a rumor.

Thank you to the FFHacktics community for helping me in discord. The ppf should be applied over a vanilla iso.

I have not tested a full playthrough yet of the complete mod.