Final Fantasy Hacktics

Modding => PSX FFT Hacking => Topic started by: pokeytax on June 21, 2011, 06:46:03 pm

Title: ARH: Ability Requirements Hack
Post by: pokeytax on June 21, 2011, 06:46:03 pm
(https://dl.dropboxusercontent.com/u/4580484/7fd0fb59ba070b4c2f489df5731824e5.gif)

Reposting this hack because IMO it needs its own thread (mods feel free to merge this if you disagree). Xifanie's ARH is below as ARH v1.1.

If you are a newbie, this hack lets you set abilities to only be usable when ______, where the blank can be just about anything. It works like Cloud's Materia Blade requirement and ALL SWORDSKILL needing a sword equipped, but on steroids.

Because I need to upgrade this slightly to play well with ALMA, I am posting my own tweaked version here too, although it's a bit sloppy. Notably it has .xml output because opening a hex editor gives me hives.

Changelog

- Fixed for console (in theory) and added arbitrary byte to byte (or halfword to halfword) comparisons (in theory).  Use at your own risk.



- Finally made Celdia's bugfixes.



- Raven fixed a bug! Thanks Raven!
- Some Item/Throw etc. abilities were messed up and being banned.
- Status byte #1 fixed to no longer also be a required item.



- "Character" field added, limiting abilities to specific special characters.
- R/S/M field adjusted to work with ALMA better.
- Ability to wholly disable Item through Math Skill added, so they can be better used as ALMA passives.
- Restriction indices shifted up to start at 05, because I'm seriously that lazy. Will probably be fixed later.
- Export to .xml added.
- probably crashes all the damn time who even knows
Title: Re: ARH: Ability Requirements Hack
Post by: Xifanie on June 21, 2011, 09:04:01 pm
Oh wow that is soooo cute poketax! :)
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 01:54:43 pm
Whoa... you just turned Ramza back into a guy for Mercenaries Pokeytax! Though there is one thing missing and I'm not entirely how useful it would be for anyone else but... is it possible to make a *Forbid Character*, while I can make the majority of skills unique to Rad and Ramza, that would leave nothing for the NPC's, though if I forbid Rad and Ramza from being able to use their partner's skills that would allow me to solve two problems with one stone. Women wouldn't be using only Ramza skills and Men wouldn't be using only Rad skills.

All in all keep up the good work! I'll post my thoughts on it when I actually test it out.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 02:25:17 pm
Hmm, I can't seem to get the ARH hack to appear in OrgASM, I looked at it and from what I could see from my limited knowledge there didn't appear to be anything wrong with the .XML itself... does it work for you?
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on June 22, 2011, 05:19:05 pm
Quote from: LastingDawn on June 22, 2011, 02:25:17 pm
Hmm, I can't seem to get the ARH hack to appear in OrgASM, I looked at it and from what I could see from my limited knowledge there didn't appear to be anything wrong with the .XML itself... does it work for you?


Well, in a typical show of brilliance I neglected to update some of the code (now fixed in the OP), but that should not affect its showing up in FFTorgASM. If you post your .xml, that would help... the tables are wider than I've used before so that might be it.

Forbid Character would indeed be less useful to most, but it's literally a difference of one bit in the code, so I magnanimously typed that one keystroke for you.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 05:37:34 pm
Ah, thank you very much Pokeytax! I'll definitely try out this version and hopefully give you some meaningful feedback.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 07:01:12 pm
Bah, no luck... but I do have something interesting to say at least, it appears to work when I've made no changes to it, but when I make my changes FForgASM no longer seems to read it, here it is if you think the problem might be fixable.

http://ld.ffhacktics.com/ARH%20v1-2%20Forbid.xml
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on June 22, 2011, 07:18:43 pm
This looks like an unaltered file, I can load it fine... do you have a bad one generated by your spreadsheet? I haven't tested this in anything but Excel so that may be the issue.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 07:28:13 pm
Oh, ahem... that's my fault. I didn't realize I had up an unaltered spreadsheet for that. Should be the same link as last time, just updated the file.

http://ld.ffhacktics.com/ARH%20v1-2%20Forbid.xml
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on June 22, 2011, 07:40:41 pm
Not reading the attributes correctly. Gonna have to move up the chain one link to the spreadsheet, can you send me the .xls you used? I know it's tedious but this is how it gets solved.

Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 07:44:20 pm
No trouble, I'm just glad to be of any help.

http://ld.ffhacktics.com/ARH%20v1-2%20Forbid%20(1).xls
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on June 22, 2011, 08:00:30 pm
Yeah, plenty of weird stuff going on. I didn't plan well for people pasting their text in, I'll fix that next time. Here is a functional .xml to tide you over.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 08:07:17 pm
Ah? Oh sorry about that. It just seemed an easier way of moving all of the data from the other ARH into the new one without having to do it piecemeal.

Thank you for all the effort you've put into this Pokeytax.
Title: Re: ARH: Ability Requirements Hack
Post by: LastingDawn on June 22, 2011, 08:47:30 pm
That did the trick! Thank you Pokeytax, the .xml file you made works perfectly! Also this fixed the crashing when you want to check the Help messages, go figure.
Title: Re: ARH: Ability Requirements Hack
Post by: Celdia on July 09, 2011, 01:43:34 am
Hey pokeytax, I don't suppose you could tell me what's wrong here could you?

http://img810.imageshack.us/img810/5227/arh12.jpg

As you can see there, I'm running OpenOffice. The output in the XML tab is pretty much useless because of what you see there. It goes like that all the way down to A111 before producing Hex output again.

I've attached the spreadsheet in question.
Title: Re: ARH: Ability Requirements Hack
Post by: RavenOfRazgriz on July 09, 2011, 02:54:53 am
Hey Pokeytaxed I think I fixed your shit.

You're using "=VLOOKUP(EO8;$text.$F$2:$O$156;10;FALSE())" instead of "=IF(ISBLANK(EO8);"00";VLOOKUP(EO8;$text.$F$2:$O$156;10;FALSE()))" in columns GL and GM.

Here's a fix of the sheet Celdia posted so she can test and make sure this now works correct in-game. 
Title: Re: ARH: Ability Requirements Hack
Post by: Celdia on July 09, 2011, 08:23:37 am
Well this is certainly working better. But it looks like the statuses aren't quite labeled right now. I triple-checked everything for the skill in the Ramuh slot to be accessible when I have Don't Move and Undead status together but the skill doesn't show up. If I remove Undead from the requirements, it shows up fine.

Amusingly, a skill I have set for access with DM, Transparent and Float shows up when I have DM, Transparent, Undead and Haste. I didn't try testing it without one or the other of those last two so I'm not sure which is triggering it. Don't Move and Transparent seem to work fine though since I took every skill down to JUST those two prerequisites and they all show up and function fine. Looks like I'm in line for a little bit of testing before I get Tactician straightened out.
Title: Re: ARH: Ability Requirements Hack
Post by: Celdia on July 09, 2011, 09:28:45 am
So I did some testing. It looks like the first 'block' of status effects in the "Require All Afflicted Statuses" section isn't responding to the flags in the Data table. Granted, I only tested Undead and (Always:)Defending but I have a feeling that if it try it for Performing it also won't work. Everything else seems to be okay from what I saw. I'll grant that a lot of those status effects aren't terribly effective for limiting skill access (since you can't use any skills during most of them) I did have a small handful planned for using Undead with. Hoping this is just a quick fix.
Title: Re: ARH: Ability Requirements Hack
Post by: Shade on July 09, 2011, 09:58:20 am
Seems like you can't set requirements for RSM?
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on July 09, 2011, 01:37:37 pm
It's trying to read that byte as both a required item and required status. Attached is a fixed version.

Thanks for helping work out the kinks! I expected Libre/Open Calc to be 10% of users instead of 75%, I'll try to optimize better in the future.

Quote from: Shade on July 09, 2011, 09:58:20 am
Seems like you can't set requirements for RSM?


Yes, everything from Potion onward is not really functional. They are there for my own ALMA purposes: currently if you add Vertical Jump4 to, say, Battle Skill, it shows up buggily. I want the ability to make sure these abilities never appear at all if so desired, so they can be used as passives.

You should still be able to set required RSM for skills as in the old ARH though, that's unaffected.
Title: Re: ARH: Ability Requirements Hack
Post by: Celdia on July 09, 2011, 01:47:34 pm
Beautiful. Works like a charm. Thank you, pokeytax!
Title: Re: ARH: Ability Requirements Hack
Post by: RavenOfRazgriz on July 10, 2011, 12:43:26 am
Now he just needs to remember to update his downloads in the OP with these fixes and all will be right in the world.
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on July 12, 2011, 06:23:45 pm
Quick bugfix in the OP to stop bugging up some Item abilities, which was messing up CCP.
Title: Re: ARH: Ability Requirements Hack
Post by: Pickle Girl Fanboy on August 08, 2011, 01:53:04 pm
My computer won't load the "Data" section of the ARH spreadsheet.  I think my computer is too slow.  Could you break that portion of the spreadsheet into two or more sheets/pages?  And this is for all versions of ARH.
Title: Re: ARH: Ability Requirements Hack
Post by: Celdia on August 25, 2011, 05:47:44 am
Hey pokeytax. I just tried making use of the ARH 1.2 you've got attached to the first post here and I ran into a snag where it wasn't working. I checked things against the old 1.1 and found an error in your XML output. You have it writing to 0x04C36C in the SCUS when it should be writing to 0x04CE6C. Also, you might wanna go in and wipe out my data for CCP in that since its far and away from default values.
Title: Re: ARH: Ability Requirements Hack
Post by: Atma on February 22, 2012, 06:16:50 pm
just found this.  super awesome!  I've been wracking my brain trying to find a work around to make more 'requires x' skills.  I've wanted to do requires guns and didn't wanna lose requires sword and didn't wanna limit myself to only using a single weapon (materia blade) for a whole skillset.
However... i'm trying to figure out how to use this and it's eluding me.  How do i choose which skill to edit the requirements of?
I'm assuming i can add the abilities i want to add the requirement to in the data tab... but how?
Title: Re: ARH: Ability Requirements Hack
Post by: Xifanie on February 22, 2012, 07:18:44 pm
If no ability is linked to the requirement slot, it will display #N/A in the First Matching Ability column on the Data sheet. If so you can use that slot for a new set of skills. Let's say your free slot is 07 and you want to have multiple abilities require an axe to be used, set the axe requirement in the 07 row in the Data sheet and set all abilities you want that axe requirement for to 07 in the Table sheet (the yellow column).
Title: Re: ARH: Ability Requirements Hack
Post by: Atma on February 23, 2012, 12:46:59 am
I think I understood that.  I'll try it out tomorrow.  Thanks for the reply and for making this.  This is gonna play a huge part in my patch.
(edit):
Tried it.  Makes sense, now. <3
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on April 15, 2013, 09:02:59 pm
(https://dl.dropboxusercontent.com/u/4580484/7fd0fb59ba070b4c2f489df5731824e5.gif)

This is a WIP new ARH version.  Along with fixing console compatibility, it attempts to implement Xif's idea for arbitrary unit data checks:

Quote from: Xifanie

If [Chocobo Riding] != 0x00 (meaning, the unit IS riding something)
return TRUE

If [HP] / [Max HP] < 10%
AND
If [HP] > 0
Return TRUE



What it probably does is make your entire party sterile and initiate an infinite Quick loop, because it's an ambitious hack that I haven't thoroughly tested.  But, better to post it for the adventurous than let it rot on my hard drive.  And of course, thanks again Xif, for making a hack so good it's mandatory.
Title: Re: ARH: Ability Requirements Hack
Post by: Choto on April 24, 2013, 08:38:17 am
Looks fantastic =) you could come up with some funny requirements (Only usable after you have acted!). Couple questions:

How exactly would you do mathematics like "HP / Max HP"?

and the much more important question,

Do you know why the old ARH was causing JoT5 to crash on console? I want to get working on console-fixed hacks for it, but I never knew what exception was causing the crash on there :(
Title: Re: ARH: Ability Requirements Hack
Post by: pokeytax on April 24, 2013, 05:53:43 pm
1) (https://dl.dropboxusercontent.com/u/4580484/arhexam.png)

2) Nope.  My best guess is that it was not just the unaligned loads but also the jump on the AI side.  To make this version work, I had to move that to the Materia Blade check, and go dig the no longer available unit ID out of a technically unallocated part of the stack.

But... personally, I have encountered some really resilient bugs on PSX, more so than on other consoles.  Whether it's some undocumented PSX register protocol, some sloppiness I keep overlooking, or magic, who knows, but sometimes, it's easier to rewrite code that doesn't work than debug it.
Title: Re: ARH: Ability Requirements Hack
Post by: Choto on April 24, 2013, 06:05:49 pm
Ah, didn't see that extra operation column there :P Thanks!

I'll keep that in mind when going through the hacks. It's important to Elric so I'll give it a shot and see how the landscape looks. If the ARH is fixed for console.. that'll be a HUGE start lol
Title: Re: ARH: Ability Requirements Hack
Post by: Kaedre on May 27, 2013, 11:00:38 pm
Is possible to make that ARH works with skill sets instead of abilities?

I actually want an ASM that add an innate (EXTRA) skill set to an specified job. Example:
thiefs with innate throw, but conserves steal; knights with innate charge, but conserves battle skill, etc.

If ARH could make that skill sets have a job requirement, we can achieve this using hacks like "throw innate all" and then adding to throw "requires Job = thief"
ALMA also can add innates skill sets to all jobs, i only need a requirement hack for them so i can decide which job allows which skill set.

Like i don't know a thing about hacking stuff, maybe all this can be harder than i think.
If this is the case, i only want that somebody tells me, so i can remove this idea from my mind.
Title: Re: ARH: Ability Requirements Hack
Post by: Xifanie on May 28, 2013, 12:24:37 am
Sadly I was told any given unit can only have access to 34 skills at a time (2 full skillsets + defend + I forgot what other skill), so I'm not even sure how possible it would be even if you restricted all skillsets to a smaller amount of skills. To say the least, ARH doesn't support this function.
Title: Re: ARH: Ability Requirements Hack
Post by: Kaedre on May 28, 2013, 09:09:43 am
Thanks for the quick response, Tiffany.

I was guessing that ARH could be changed to allow these skill sets requirements. But i wasn't thinking in the skill number limitation per unit.
I believe it may still be possible with a limited number of skills as you said. (about 10 per skill set) So 3 skill sets = 30 skills (+move, attack, etc)
Or maybe i misunderstand you, and can't be possible to have 3 skill sets at a time on a unit?   ¿(o.0)?

The thing is i thought (in my ignorance about hackings) that this addition (skill set requirements) can be applied to ARH without a lot of work.

P.S: ((((Excuse me for the abuse of parenthesis in my posts))))    (o_o)

EDIT: i forgot some very important. I have to say: Thanks for ARH !!!
The fact that i am here annoying people with this questions, doesn't means i am not appreciating the big work thats makes ARH one of the most useful tools for adding creativity to skills customizations. So don't blame me, please!
( "...blame yourself or god..." )   (^_^)
Title: Re: ARH: Ability Requirements Hack
Post by: nitwit on August 05, 2014, 08:16:49 pm
How would I make certain samurai skills require that you have a certain katana in inventory and that you have a katana equipped, without breaking katanas when the abilities are used?
Title: Re: ARH: Ability Requirements Hack
Post by: Rufio on August 22, 2014, 08:44:47 pm
Hmm..  at first i thought you wanted just to make each ability require holding a different katana (which gives me an idea for a weaponmaster class) but I see you mean holding any katana AND have the right katana in your inventory.

If I'm right, all you should have to do (assuming you are using the original katana slots and haven't changed the draw out action menu), is set them all to require katana in the ARH and shove in this ASM i just wrote up.

WARNING:  I AM VERY NEW TO ASM AND AM NOT SURE THIS WILL DO WHAT I THINK IT WILL DO!


<Patch name="Katanas don't break.">
<Description>Removes Random Break from Katana Formulas</Description>
<Location offset="120988" file="BATTLE_BIN">
00000000
00000000
</Patch>


I haven't messed around with the katana ability slots that much yet because I'm afraid of the hardcoding, but if this doesn't work then you would have to do some ASM around the the Katana Inventory action menu, which is well beyond me.
Title: Re: ARH: Ability Requirements Hack
Post by: Choto on August 22, 2014, 11:04:26 pm
I think that will work to prevent katana breaking (although it could be done in a simpler place of the routine), but he would still have to make a check for "is X katana in inventory? If so - work, if not - don't work". I'm not sure where you would put it though in vanilla code. Worst comes to worst you could put the check at the beginning of the formula those abilities use.

That aside, nice to see somebody take a stab at a hack. Nice work
Title: Re: ARH: Ability Requirements Hack
Post by: Rufio on August 22, 2014, 11:51:13 pm
my logic here is that draw out will still call your katana inventory, then im hoping something in the katana inventory draw out menu will pick up the arh hack requirement for having a katana equipped.  the it will cast the spell as normal and not break the sword you had in the inventory to select the spelk in the first place.
Title: Re: ARH: Ability Requirements Hack
Post by: Pride on August 23, 2014, 05:31:55 am
So you want Draw Out to only be able to use the ability on the equipped katana?
Title: Re: ARH: Ability Requirements Hack
Post by: Rufio on August 23, 2014, 05:51:02 am
from what I understood he wanted the draw out to work the same but not break the weapon AND require any katana equipped
Title: Re: ARH: Ability Requirements Hack
Post by: Choto on August 23, 2014, 02:56:22 pm
hehe well the ARH wouldn't pick up what's in the inventory unless you code it to do so. that's the code that needs to be written.
Title: Re: ARH: Ability Requirements Hack
Post by: Rufio on August 23, 2014, 10:29:30 pm
Ahh.  i thought since the draw out action menu links the katana inventory and then the katana inventory links back to the abilities in question it would pick up the "must have katana equipped" bit at that point.  like I said, I havent done much messing around with the samurai ability slots.
Title: Re: ARH: Ability Requirements Hack
Post by: nitwit on August 24, 2014, 01:53:34 am
I want 3 things.

1. Katanas never break when Draw Out is used.  Thanks Rufio for posting that.

2. Using any Draw Out skill requires that you have any katana equipped in your left hand, your right hand, or both hands.  This can be done with several different hacks, the ARH being one of them.

3. Using specific Draw Out skills require that you have specific katanas in your inventory.  I think the ARH covers this but there may be hardcoding that needs to be removed.  If there is then I'm pretty sure it's covered in one of the disassemblies out there and I can jump around the parts concerning this hardcoding or zero them out.

If I can free up enough ability slots (which reminds me to ask about monster attack animations) I want to make a full complement of 16 Draw Out skills.  I'm not sure but I may change one or more of the katanas into other weapon types which means there will be less than 10 katanas as there are in vanilla, so this will require about 2 abilities linked to 1 katana.

There are 10 of them in vanilla.
26 Asura Knife
27 Koutetsu Knife
28 Bizen Boat
29 Murasame
2A Heaven's Cloud
2B Kiyomori
2C Muramasa
2D Kikuichimoji
2E Masamune
2F Chirijiraden

I don't think there are any problems with changing weapon types (beyond unique animations like Draw Out, but maybe not even then if...) if I change the weapon sprite as well, using FFTPatcher and I think one of Raven's workbooks.
Title: Re: ARH: Ability Requirements Hack
Post by: Choto on August 27, 2014, 08:28:10 am
Waiiiit a second. Doesn't vanilla Grey out a draw out ability if you don't have that kata a in your inventory? So then all you need is the arh part and the no break hack.
Title: Re: ARH: Ability Requirements Hack
Post by: Rufio on August 27, 2014, 11:18:10 am
that was my thought process as well
Title: Re: ARH: Ability Requirements Hack
Post by: Xifanie on August 27, 2014, 01:48:38 pm
ARH works this way:
Ability enabled? No Require Sword
Ability Disabled? Require Sword + No sword Equipped (This removes the ability from the list; doesn't grey out)

Preeeeetty sure that only works in normal skillsets. Draw Out is a quantity based skillset, so I just don't see it happening. Hopefully I'm wrong, but I doubt my ARH is that convenient.
Title: Re: ARH: Ability Requirements Hack
Post by: nitwit on August 27, 2014, 09:21:18 pm
Quote from: Choto on August 27, 2014, 08:28:10 am
Waiiiit a second. Doesn't vanilla Grey out a draw out ability if you don't have that kata a in your inventory? So then all you need is the arh part and the no break hack.

Not quite.

There are 10 Draw Out abilities and 10 katanas.  I need to be able to edit the items each ability is hardcoded to require in your inventory.  I also need to expand this to cover even more abilities than the 10 in vanilla.

I asked if this hardcoding is already removed by ARH, but it looks like it's not.  Shouldn't be too hard to find it and figure out how it works myself.

Once that is done, I add the nop to prevent katanas from breaking and then make all of the abilities require that you have a katana equipped.  Then I'm done.