• Welcome to Final Fantasy Hacktics. Please login or sign up.
August 04, 2021, 09:16:00 pm


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.

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.

Messages - nitwit

PSX FFT Hacking / Re: AOE damage / AOE Heal?
July 22, 2021, 06:39:32 pm
Seems like a very tall order. Only things that resemble that are Wish and Self Destruct.



If you mean a skill where you select the damage target, and then you select the healing target, then look into the Dual Cast asm hacks somewhere. I don't remember if they were finished.
Help! / Re: Necromancer Job
July 21, 2021, 07:41:08 pm
Quote from: Greybeoluve on July 21, 2021, 06:57:40 pmHow did you get this to work?

I have it saved as an XML patched using FFTOrgASM, however my spell only casts 1 time and has 00% to effect any target.

I've fiddled around with the status it's changing 20 for cancel dead and I've also set it for 33 all or nothing zombie, neither works and nor does fiddling with x and y values

Pictured is my current ability setup trying to get this to work.
Small interjection here, the prtscr (Print Screen) or scrncap (Screen Capture) key on your keyboard takes a picture of your current desktop and puts it in the clipboard. From there you can paste it into Paint, Lazpaint, or an image editor of your choice to get a perfect copy of your screen.
New Project Ideas / Re: Patch Ideas Proposal Thread
July 20, 2021, 10:20:01 pm
Head over to GBAtemp forums and ask around in the PSP boards until you find something that lets you extract files from a PSP disc image similar to CD Mage for the PS1. CD Mage is here on the wiki, I think PS1 games use mode 2, form 1 when opened with CD Mage, I always forget. There are only 4 possible options (mode 1/2 form 1/2) so try everything until it works.

If that works, do as I said in my last post: compare file sizes, compare hashes, find a binary diff program. I think I have one lying around somewhere (unfortunately it was written in Java), so I can post it when you get that far and after I rouse myself to write a good readme for it.

Don't worry about decompressing anything until you get to that point, otherwise you'll be too demoralized to continue. Even if it is compressed, there is almost certainly a tool to decompress it on a romhacking site somewhere, and any headers present in such files should be obvious to anyone who's worked with file headers before.

Once you have a set of sound files and you have a means to split them into parts, you can directly compare them byte per byte or you can look around for documentation on the subject and perhaps even programs to handle them. I remember someone at Qhimm worked on a sound editor for FF8, which was made around the same time as FFT. Probably uses a very similar format.

Here's a tutorial on using the command line.

"Awareness of your ignorance is the first step to becoming wise."
~ Boko


If you can figure out the structure and location of sound files on disc, then you should be able to find them in a save state, and from there RAM. Once you have their location in RAM you can very quickly test out various values to determine what parts of the data do what.

Designing a test scenario where you can debug things as quickly and completely as possible is a very useful skill to have.
PSX FFT Hacking / Re: ASM Requests
July 20, 2021, 04:48:02 pm
Quote from: JadeKnightblazer on July 09, 2021, 11:19:57 amRequest: Formulas 0F and 10 (AbsMP/AbsHP) allow Status infliction.


Looking at them on the wiki, they share between 1/3 and 1/2 of the same assembly code, and they are sequential (one right after the other). Look at the RAM addresses (the 8 digit hexadecimal numbers before the colons) in the code tags below to see what I mean.

00189084: 27bdffe8 addiu r29,r29,0xffe8         //start of formula 0F
00189088: afbf0010 sw r31,0x0010(r29)
0018908c: 0c06216e jal 0x 001885b8            Magic Evade
00189090: 00000000 nop
00189094: 1440000d bne r2,r0,0x 001890cc
00189098: 00000000 nop
0018909c: 0c062273 jal 0x 001889cc            Calculate_Accuracy_for_Magical_Spells - Calculate (MA + X)*Faith% This is essentially the same routine as 0x188a24 except without elemental boosting.
001890a0: 00000000 nop
001890a4: 14400009 bne r2,r0,0x 001890cc
001890a8: 00000000 nop
001890ac: 0c0619a3 jal 0x 0018668c            MP Damage
001890b0: 00000000 nop
001890b4: 3c038019 lui r3,0x8019
001890b8: 8c632d90 lw r3,0x2d90(r3)
001890bc: 00000000 nop
001890c0: 94620008 lhu r2,0x0008(r3)           r2 = MP Dmg
001890c4: 0c061d1b jal 0x 0018746c            MP_Recovery_Routine
001890c8: a4620004 sh r2,0x0004(r3)            Store r2 as HP Dmg (used in MP recovery routine - HP Dmg set to 0x00 in MP recovery routine)     
001890cc: 8fbf0010 lw r31,0x0010(r29)
001890d0: 27bd 0018 addiu r29,r29,0x 0018
001890d4: 03e00008 jr r31
001890d8: 00000000 nop                         //end of formula 0F

001890dc: 27bdffe8 addiu r29,r29,0xffe8        //start of formula 10... and just after the end of the previous formula.
001890e0: afbf0010 sw r31,0x0010(r29)
001890e4: 0c06216e jal 0x001885b8            Magical_Evade_Calculation
001890e8: 00000000 nop
001890ec: 14400009 bne r2,r0,0x 00189114
001890f0: 00000000 nop
001890f4: 0c062273 jal 0x 001889cc            Calculate Accuracy for Magical Spells
001890f8: 00000000 nop
001890fc: 14400005 bne r2,r0,0x 00189114
00189100: 00000000 nop
00189104: 0c061989 jal 0x 00186624      Calculate HP% damage 
00189108: 00000000 nop
0018910c: 0c061c92 jal 0x 00187248      HP Absorption
00189110: 00000000 nop
00189114: 8fbf0010 lw r31,0x0010(r29)
00189118: 27bd 0018 addiu r29,r29,0x 0018
0018911c: 03e00008 jr r31
00189120: 00000000 nop                          //end of formula 10

You might be able to make them into one formula, with conditional branches (assembly version of if-elseif-else) for the parts that differ. I haven't thought about how you would do that, but it's probably interesting enough that someone will help you on the discord if you put in the effort.

I just now thought about it, and you need to check the formula byte for the skill that used it. I'm sure someone documented where this data is and how to get it.

There is probably a lot of hardcoded stuff that uses the formula IDs, so you'll need to if possible make sure that whatever formula pointer table exists has both formulas point to the same code block. If it won't let you point to the same block of code and each sequential pointer must point to a part of ram that is after the previous pointer's value, then add a nop (00 00 00 00) at the beginning, have formula 0F point to that, then have formula 10 point to the actual start of the code. That's the easiest (read: most half-assed) way to do it until we someday understand all the hardcoding and have a fully commented and assemble-able disassembly.

I think this is the formula pointer table:

No idea what you have to change in that table to get it to behave, probably the starting address (in RAM) of the first line of code in each formula.

As for adding status procs, I think you need to add some routines from formula 08 Dmg_F(MA*Y).

Specifically these:
00188dcc: 0c0621c7 jal 0x 0018871c        ; Elemental Absorb and status roll
00188dd0: 00000000 nop                   
00188dd4: 14400003 bne r2,r0,0x 00188de4 ; Branch if status effect roll fails
00188dd8: 00000000 nop                   
00188ddc: 0c061fad jal 0x 00187eb4        ; Apply status (to action) - (Preserve hit status, evade type, hit %)

Though if you go that far and you have room left, you may as well add full elemental modification to formulas 0F and 10 - elemental strengthen and elemental XA * YA.


On further thought, mixing an absorb formula, undead reversal, and elemental affinities (especially weak, halve, and absorb) will have unforeseen consequences and probably won't work out how you want it to.

I instead recommend you use the status proc code in formula 0A.
New Project Ideas / Re: Patch Ideas Proposal Thread
July 20, 2021, 03:51:16 pm
Quote from: Spooniest on July 19, 2021, 08:04:13 pmI apologize if this has been asked about before.

I estimate that about 1/3 of the sound effects in FFT: WotL are wrong. Has anyone looked into simply replacing them with the PSX Sound Effects? I've checked around on the forum for a bit now, and I don't see anyone talking about it, or ever having talked about it.

Off the top of my head:

- Any kind of bladed weapon strike.
- Any sound effect of a lightning elemental spell.
- Any sound effect of wind or a "whoosh" of a body in motion (think the Dragoon's "Jump" sound).
- All death cries of humans (male/female) and monsters

Basically, anything that uses that noise channel, to make something sound "scratchy" or "breathy" seems to have been redone for WotL, and it does NOT sound good, at all. I can't guess as to why this was done, but it was probably to do with the tiny tiny speakers on the PSP. It isn't 'distortion' in the strict sense of the word. That's a guitar effect, and as a guitar player of 25 years I am familiar with what it sounds like. It seems to me like the sound effects were edited on purpose and that's what they came back like, and they were never fixed.

Is this even possible? One would think that in 14 years (or whatever it's been), someone would have tried to do this...?

Apologies if any of this seems overbearing/idiotic/banal to you, dear readers. I don't believe I've posted in this forum much before, so I am almost entirely unfamiliar with your local culture. How's the food here? Heh.
If the effects are altered, you know what files they are stored in, and you can extract both of those files, then you can just compare them to see if they've changed. Simplest way is to first check if they are different sizes, hash them (using Get-FileHash in PowerShell if you use Windows 10) to see if they are different in some way, and then use some sort of binary diff program to print the differences between the files. I can offer some advice on doing this should you need it.

If the effects are not altered then the next suspect is the sound engine, and I no very little about that. Considering it's compiled code for two different platforms (one of whose instruction set is a superset of the other, and both with different hardware configurations) it's unlikely that the sound engine code would be identical even if you could find and isolate it.

Knowing that the same or similiar code was compiled for two somewhat different platforms could help with docompilation if you can figure out how to use Ghidra or IDA Pro. A 2nd year CS student hacking a different game I also hack has tried to get it to work, with mixed results.

If somehow you rule out both of those, then the last culprit is the hardware itself. There is nothing you can reasonably do about that unless you are an electrical engineer or a masterful hardware hacker.;
PSX FFT Hacking / Re: ASM Requests
June 30, 2021, 09:37:13 pm
Hack Idea: Disable crytalization and treasure chest effects, and when a non-essential character's KO countdown expires they instead become unusable for a number of days equal to their character level. Essential characters still produce a game over when they are made unusable.

I think I remember seeing a piece of text for the "unusable" effect - or maybe "unavailable" - similar to the text for characters that are on errands.
PSX FFT Hacking / Re: Pride's ASM Thread
June 20, 2021, 06:44:17 pm
Quote from: Ansehelm on June 20, 2021, 04:23:49 pmAwesome, this looks great! The original Attribute Rewrite hack is one of the central ASMs in my mod, so I'll have to check this out.  A few questions though:

When you say not to use the attribute page in Patcher, does that mean that all existing attribute values in patcher should be zeroed out, or are they just ignored/overwritten by the spreadsheet data?
When you click "Patch ISO" in FFTPatcher, a dialog box pops up which gives you options on what files and data you want to patch. Ensure that Item attributes isn't checked.
Quote from: Mustardio on June 19, 2021, 06:47:51 pmAnyone have any suggestions on how to flag bombs as items for chemist throw item use?

I was messing around with FFTPatcher and can't seem to get it to work.

I've tried

Abilities -> 0189 Bomb -> Item
Items -> 7D/7E/7F Flameburst / Snowmelt / Spark Bombs -> Item Type -> None or Bomb
Skill Sets -> 06 Items -> 0189 Bomb in one of the empty slots
Jobs -> 4B Chemist -> Innate -> 0189 Bomb

I'm beginning to think its not possible.
Items and Throw are hardcoded to use their respective items and item types (or perhaps item ID ranges). You need to find where they're hardcoded. If anyone knows it will be on the wiki, search "item hardcoding" and "throw hardcoding".

I do know that in the lower portion of the ability tab in FFTPatcher, every ability from 0x170 Potion on down is part of the same table. You can see this by editing Phoenix Down "Item Use" and Shuriken "Throwing" in the Abilities tab of FFTPatcher, then looking at the gameshark code tab. The addresses of the gameshark codes (which are just RAM addresses with a prefix) are almost right next to each other... almost, because there are two unused entries in that table for Items 0xFE and 0xFF.

While every item from 0x170 Potion on down is part of the same table, the number of bits per entry and of course the programmed context of each entry varies. You need to find the code that determines the context and modify it

QuoteAlternatively does anyone know how I can convert one of the lesser used items into a bomb-like item and keep remedies as all-purposes status cure.
You could try giving items different formulas and see what happens with different Z values. If that doesn't work, then you can change items to inflict statuses rather than cure them in the Items tab, then change the animation effect in the Abilities tab. Mosfungus bomb inflicts poison and so on.

If you do this, let us know what works and what doesn't.
Tutorials and Learning / Re: Command Prompt FAQ
June 14, 2021, 11:09:39 pm
I had it lying around for my other projects requiring the command prompt, figured I'd post it here too.

Feel free to steal it.
Tutorials and Learning / Command Prompt FAQ
June 14, 2021, 09:16:16 pm
1. What is the command prompt?

Command prompt is a program included with all versions of Windows which allows you to execute scripts (small programs) using a purely text-based interface.
Contrast this with the graphical user interface (buttons, mouse interactions) found in most programs you've previously used.

The command prompt reacts only to text based commands, and to some degree to mouse clicks. If you want something to work, you need to type it in and hit enter.

2. How do I access the command prompt?

You can access the command prompt (another term for command line) by navigating the Windows Start menu. It's usually under System or System Tools. You could also use the Run or Search menus to look for cmd.exe, which is the name of the actual command prompt program.

Access the Run menu with the Windows Key and the r key, then type cmd.exe and hit enter to bring up the command prompt.

If you want a version of the command prompt with a few more features, then you can use Powershell instead. It's found in it's own menu in the Windows 10 Start Menu.

3. How do I use the command prompt once I have it open?

As I said above, you type things into it (commands) and hit enter to execute those things.

Two useful commands that you should know are cd (change directory), and dir (view directory contents). If you're not familiar with the term, directory means essentially the same thing as folder in the context of Windows.

Type cd followed by the name of the folder you want to navigate to, then hit enter. For example:
cd Users

If you want to view the contents of a folder, type dir followed by the name of the folder you want to inspect and then hit enter. For example:
dir Users

If you don't want to type the full name, or are unsure of what constitutes a legal folder name, then type the command, and then hit tab to cycle through all legal inputs for that command in the current working folder.

Tab will autofill stuff like the folder names, required prefixes, and the backslash that indicates the end of a folder.

You can navigate through more than one folder at a time, by separating each folder in the path you want to navigate through with a backslash. For example:
cd Users\Nitwit

dir Users\Nitwit

Usually, cd and dir operate assuming that you're navigating from the folder you are currently in, which is found just before the part of the command prompt in which your typing appears. This is the full path to the current folder, starting from the name of the hard drive where you started. For example:

This is called the absolute path. At any time and in any location, you can navigate to an absolute path by typing it in full, starting with the name of the hard drive where it is found and going sequentially from there through each folder.
cd D:\Backups\Mods\FFT\

dir E:\

The command prompt always starts in the named drive where Windows operating system is installed, in this case:

If you want to navigate up a folder, enter .. after the command. For example:
cd ..

You can navigate up multiple folders by separating each .. with a backslash. For example:
cd ..\..

You can navigate both up and down multiple folders by combining .. and folder names. For example:
cd ..\..\FFT\editors\

You can send the text output of a command (what it prints in the command prompt) to a text file with the redirection operator, which is the > character. For example:
dir C:\Users\Nitwit\Mods\FFT\gamefiles > fft_files_listing.txt

You can switch between any commands you've previously entered with the up and down arrows.

It is impossible to break anything with cd and dir, feel free to explore.

4. Why should I learn how to use the command prompt?

There are several reasons you should learn this.
  • A lot of tools lack the graphical user interface (GUI) found in things like FFTPatcher, and can only be used with either the command prompt or through a batch file: a sort of script that can be made to run a command by clicking on it, among other things. Most coders don't make batch files. Many of these tools are very useful, and few people want to make a version with a GUI.
  • Tools that can be run through the command prompt can be run through scripts in other programming languages, enhancing their usefulness and automating drudgery. For instance, CD Mage lacks the ability to import multiple files at once, so I wrote a python script that calls Cebix's psxinject program to import hundreds of modified files into a disc image.
  • Knowing how to use the command line makes it easier to learn how to do other coding and administration tasks, from file hashing to using a compiler. It's one of the first tasks that every novice programmer and hacker should learn how to do.
  • Some tools with a GUI only produce error messages when called from the command line. Without an error message, you have fewer leads as to why a tool isn't working.
  • If for some godforsaken reason you use Linux, you have no option but to use command line tools, scripts, and spreadsheets to make game editors.
  • The command line accepts wildcards (also known as regular expressions if you want a deep dive on the subject), which can be a simple and easy to way automate boring tasks.
Spriting / Re: Spriter Workflow Poll
June 10, 2021, 03:01:43 am
Quote from: RetroTypes on June 10, 2021, 12:22:32 amNot a spriter besides some palette editing lol, but I saved the two templates I've found over the years, and always recommend GraphicsGale for most spriting stuff. Hope this helps!
Yep, that seems to be it. I did a search for "template" on the spriting board, the only results I got were the same or previous versions of those.

MON sprite template results (unsure who to credit):

Human sprite template result (credit to Xifanie):

It doesn't look like there are any redundancies in the sprite sheets so it wouldn't be possible to make a tool that fleshes out pieces of a sheet that shares the same parts.
Spriting / Spriter Workflow Poll
June 09, 2021, 03:26:16 am
1. What image editors do you use?
2. What is your workflow like?
3. How much time is spent spriting compared to housekeeping tasks like previewing sprites, copying and pasting body parts, and aligning pieces together on the spritesheet?
4. What tools and resources do you use to shorten and ease your workflow? I assume you use position template spritesheets, preview generators, collections of sprite parts you've disassembled for franken-spriting.
5. What parts of your job, if any, could be automated and how?

Also please post any template spritesheets - position or otherwise - you have so a guide on FFT-specific spriting can be made later.
Event Editing / Re: Pre-Battle Menu
June 04, 2021, 05:33:42 am
Quote from: Nyzer on June 03, 2021, 09:27:03 amI either wasn't aware of or don't remember this, but I'd expect it's related to early ASM issues that should be fixed in the rerelease, since Jot5 should be playable on modded PSX consoles in the future.
Looking forward to playing it when you rerelease it!

Quote from: Nyzer on June 03, 2021, 09:27:03 amThat's a really interesting idea. I don't know if there's any way to have an always-displayed sprite of some kind on the map - it might be doable with ghostunits, but I haven't checked, though I will once I get around to this feature - but it's theoretically possible to alter the traps and items due to this. I think there are multiple sets of data for the locations, though, so they'd most likely all have to be changed together, and it's certainly not something that would be included with this set of commands (unless someone else did it).

Folks could certainly do something interesting/trollish by using maps for specific fights and just moving all four locations to a vital chokepoint, then setting them all to empty with always activating traps.
Now that I think about it, simply highlighting the tile similarly to attack targeting or movement - but with a different color when in x squares of a treasure/trap - is a better idea.


I thought you were mistaken, but it looks like there are either multiple copies of the move-find item data or it's temporarily stored in various places.

There are also the found item flags for each battlefield, which must be part of save data since they can't be found again. Randomizing move-find item data and and renewing them after each battle frees up that space. Something to consider if a hack needs a few hundred extra bytes in save data and you have the means to use those bytes.

While I'm only interested in randomizing them and their traps and maybe getting a support skill that lets players see them (or an option for this hypothetical hack which ensures only player characters can find items), manipulating battlefield traps, weather, and lighting makes for a more flavorful geomancer.

Again, it's not a big deal as I can currently change their coordinates, alter traps, and rebalance items so it doesn't matter if enemies get them on my own. Don't consider this a request, just a possible solution that may fit your needs in the future.
Event Editing / Re: Pre-Battle Menu
June 03, 2021, 02:28:38 am
Quote from: Nyzer on June 02, 2021, 12:22:18 amSo here's a feature that'll be added in to the View Map option later, thanks to discussion on Discord: the ability to see the spots where Move-Find Items are.


800f5ba8 - current loaded map (set at f385c)

800f5e74 - Move-Find Item Data (and Traps)
 0x00 - X/Y Coordinate (Y + X * 16, up to 15 each)
              Upper Nibble - 0x?X - X Coordinate
              Lower Nibble - 0xX? - Y Coordinate
 0x01 - Trap
 0x80 - No Activation
 0x40 - Unknown
 0x20 - Always Trap
 0x10 - Disable Trap
 0x08 - Steel Needle
 0x04 - Sleeping Gas
 0x02 - Deathtrap
 0x01 - Degenerator
 0x02 - Rare Item ID
 0x03 - Common Item ID

 0x04-0x0f - same as above, but for locations 2-4

80059414 -  Move-Find item items found flags (4 bits each, 0x40 bytes total)
 - http://ffhacktics.com/wiki/Variables#Propositions_.2F_Jobs
0xF0 - ??
0x0F - At the main gate of igros

The short version is, I can check the current map, use that to determine which map we're on, pull all the X/Y data for each individual Move-Find Item, and even check to see which items have and haven't already been found.

But this is definitely a "coming later" feature, since I've still got Jot5 work to do.
I don't want to distract you from this or Jot5 (did you ever figure out why it doesn't work as an eboot on the PSP?), or go way off topic, but this is great especially if a hack alters item locations.

Only way it would be better is with a hack that randomizes treasures and traps so they appear on any tile you can legally move on at random in each new battle in the same location, and perhaps have a sparkle in the air above them or something. Maybe the sparkle could be tied to a 3 or 4 AoE passive effect on thieves or Move Find-Item. Beneficial traps would be very nice too, as would flagging certain rare item traps so they only give items to the player. Though you could just make it obvious where items are by making the traps always trigger. Just my 2 cents, don't consider it a request or anything.

Feel free to move this to your hacking thread if you feel it's too off topic.
Quote from: Dokurider on May 31, 2021, 01:28:45 pmI'm gonna post this here so Glain doesn't forget again.
In Ability Flags 1, 0x80/0x40 are actually Target All Allies and Target All Enemies respectively...but both are bugged. Actually they're disabled on purpose and you can reenable both of them with a single line edit. I made a video showing off what it was supposed to do.

And here's the hack if you need to test it.
Isn't that just... maximum range, and the flags for only target allies and self-target allowed? Perhaps they disabled it because it's redundant (while also ignoring all the other redundancies and hard-coded behaviors)? Am I mistaken?

It's still cool though.
Quote from: Tyler_Durden64 on May 15, 2021, 08:25:04 pmHey man, if you're offended by a simple question or request, thats your problem. Im not apologizing for it and Im not gonna sit here and pretend like some and say "take all the time you need, i dont want this sooner, id prefer later". I asked if the mod was dead and if it'd be possible to release in smaller chunks, simple questions that require simple yes or no anwsers that would of sufficed. Yes, obviously if i could do it myself i wouldn't be here asking. I guess I'll check back on this next year then, sense as you said, you'll  work on this when you're damn good and ready 🤷‍♂️.
Pick at least one:
  • Git gud
  • Drop the entitlement
I may be mistaken, but I believe there are features in FFTOrgASM which allow a degree of customization for asm hacks. You could use that to make your formula 19 hacks check for any debuff, by altering the byte loaded and bit checked for.

Should be pretty obvious how it works (and how to customize it without such niceties) for anyone with freshman level coding experience who wants to change the status effect used, but it's something to consider if you're so inclined and want to make it easier on other people.
Help! / Re: Patching w OpenEmu (Mac)
April 04, 2021, 01:11:45 am
Try duckstation.

The chapel thing occurs on a PSP, happened to me too (though not that bad) but seems purely aesthetic.
New Project Ideas / Re: Grindless Balance Patch
March 23, 2021, 04:11:59 am
I think there's an ASM hack somewhere that negates in-battle JP/EXP changes, and grants a certain amount after each battle. I can't remember where it is though, you'll have to look around for it.
Help! / Re: [Solved] Weapon affect range
March 23, 2021, 04:06:22 am
Unless someone has positively verified such a thing and posted it, I wouldn't take it for fact.

I made a Gameshark code (using the Gameshark tab in FFTPatcher) that changes Dagger to 2 range and lunging type, and Broadsword to 5 range, arcing type.

80063AC0 4A02
80063B50 1E05

I tested it on pSXfin by editing memory addresses directly, though it took me a minute to remember the correct byte order.

It works fine, exactly as intended.

Yes, you can change weapon ranges. You should test it before you take anyone's word for it. I vaguely remember there being some hardcoding, and it being tied to attack type: striking, lunging, direct, or arcing.

Striking: everything not listed below - maybe hardcoded to 1 range.
Lunging: spears, sticks, and cloths - unknown if there's any hardcoding of range to exactly 2 tiles, try 1 and 3+ ranges.
Direct: crossbows, guns, harps, books - hardcoded so you can't attack less than 3 tiles from you. You can change the max range to be greater than 3 range IIRC.
Arcing: bows - same as direct hardcoding. I'm not sure if the range-to-height ratio bonus/penalty hardcoding is just for arcing or both arcing and direct, and if it's only a bonus.

There may be other hardcoded things that are too subtle for me to notice, like animation or sound effects.

If you're beyond 1 tile it looks like you're pointing/swinging a sword at someone and then they react to being hit, as if the characters were elementary school kids with much more solid rules of what constitutes a real hit than is normal for that demographic. Then again, my second test strike didn't hit, so maybe the "nuh-huh, you didn't really hit me" rule is in effect. Changing this requires editing weapon strike graphics, or what graphics each weapon references in FFTPatcher.

Anyways, range being tied to attack type seems obvious to me given that all the weapons with varying attack ranges have different attack types.