• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Formula Hack v0.57

Started by formerdeathcorps, November 14, 2011, 06:41:21 pm

RavenOfRazgriz

It's also good for stopping the AI from spamming horribly OP moves like Altima 2's Lifebreak-All-Ultima in 1.3.  That functionality is good for bosses, since you can give them things that are horribly scary and horribly OP to create tension without worrying about the boss being impossible to beat.  Even a difficulty patch can make use of that, since nothing says that said boss' "lesser" skills can't be scary too.


formerdeathcorps

They no longer use their moves optimally.  If you give the AI flare, for example, and it sees it can pull a KO, it will do so every time (unless it has to resurrect an ally or heal itself).  If you flag flare with "random hits", the AI will only use it some of the time rather than all of the time.  Mind you, with flare, given the MP and CT costs in vanilla, that may not be so bad an idea.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Pickle Girl Fanboy

Does Random Hits also imply Multiple Hits?

If it does, then Random Hits is fucking stupid.  The AI should, when it finds a Random Hits ability, try to reduce the AOE by attacking targets in such a way that the AOE is restricted to the target.

Also, should there be a separate Multiple Hits flag, or is there one already?

Xifanie

random hits is terrible... it randomly forces to use the specified skill over any other possible action. As long as targeting is possible, even if the skill doesn't do anything and has 0% to hit, the AI will still be forced to attempt using it.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Pickle Girl Fanboy

It looks like I'm not qualified to have an opinion on Random Hits, since I can't figure out what it does.

formerdeathcorps

Multiple hits is hard-coded currently to formulas.  Don't worry, it will be assigned to a flag (or equivalent thereof).
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Pickle Girl Fanboy

Quote from: formerdeathcorps on December 04, 2011, 05:49:37 pmIf you flag flare with "random hits", the AI will only use it some of the time rather than all of the time.

Quote from: Xifanie on December 04, 2011, 06:30:45 pmRandom hits randomly forces the AI to use the specified skill over any other possible action. As long as targeting is possible, even if the skill doesn't do anything and has 0% to hit, the AI will still be forced to attempt using it.

So which is it?  Will it force the AI to attempt to use it if targeting is possible, or will it disuade the AI from using an otherwise optimal ability once in a while?

Xifanie

What I said; fdc and I both already figured out how to make skills multi-hits. fdc will have a flag for it, but currently you can't really have weapon strike + many hits; the game will "forget" your equipped weapon after the first strike and will punch in the air afterwards.
FFTPatcher has a lot flags misnamed... that's because melonhead didn't read my spreadsheet carefully and named all the flags just like in my spreadsheet... that along with many other flags was marked as red, meaning just a wild guess of what it could be linked to. melonhead took those for granted.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

formerdeathcorps

December 05, 2011, 01:08:52 am #29 Last Edit: March 20, 2012, 05:15:58 pm by formerdeathcorps
Flags to be saved:


BATTLE.BIN: 0x114880
9C15060C
00000000
00000000
1980053C
CC08A524
1200A287
1000B493
C0010334
19008302
12800000
2180B000
0E000334
19004300
12180000
0680013C
C0100200
21104100
21186100
F3FB6990
F4FB7190
F6EB5894
F1FB7390
F2FB7590
40000133
05002010
21088002
20002935
39003132
3FEE0508
06002132
2C000133
06002010
06000234

BATTLE.BIN: 0x114ABC
20003931
0E002017

BATTLE.BIN: 0x114B18
4F004010

BATTLE.BIN: 0x00114B24
20000233

BATTLE.BIN: 0x00114B38
0C000233
04004010
00601033

BATTLE.BIN: 0x00114B58
00400533
00200633

BATTLE.BIN: 0x114C50
A3150608
4000BF8F
BDFF2017
21800000
C9EE0508
00000000

BATTLE.BIN: 0x11E670
3C00B5AF
3800B4AF
3400B3AF
3000B2AF
2C00B1AF
8B780108
2800B0AF
3C00B58F
3800B48F
3400B38F
3000B28F
2C00B18F
2800B08F
0800E003
4800BD27

NOTE: Direct is included here as well.


BATTLE.BIN: 0x11B3BC
C0100300
0680013C
21082200
F5EB2290
000025A6
40004330
82190300
01004230
40100200
25186200
000043A2
01005226
00000000
00000000


Evadable (this one's a bit trickier, because the AI only counts physical evasion)
Require Sword
Require Materia Blade



BATTLE.BIN: 0x1132C4
1000A393
C0010234
19006200
12100000
1980033C
CC086324
21A04300
1200A387
0E000234
19006200
12100000
0680013C
C0180300
21104100
21186100
F1FB4790
F0FB5390
2800A7A3
F2FB4790
F3FB5290
3000A7A3
F6FB4790
F6EB7890
3800A7A3
00000000

BATTLE.BIN: 0x11344C
20000233

The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

The Damned

December 05, 2011, 11:15:21 am #30 Last Edit: December 05, 2011, 10:31:02 pm by The Damned
(I'm late as always, but given that I wasn't even on yesterday....)

I don't think I'm using the random flag for anything. Malak & Rafa have been changed for probably close a year now and Hydras' random moves were slain a while ago even when they were just normal enemies. The only other things that uses it is, what, the Nameless Song and Dance abilities? Those have both also been dead for me for quite some time.

Anything that's desperation move-worthy I'm testing out another way that doesn't use randomness. The random flag can have its uses as Raven pointed out, but by and large it makes the already troubled AI even dumber than it should be. (Clarifying EDIT: Fixed the first sentence of this paragraph.)

Anyway, Reflect and Silence are/were the same flag? How so? Not everything that's reflectable is affected by Silence and vice versa, so...?
"Sorrow cannot be abolished. It is meaningless to try." - FFX's Yunalesca

"Good and evil are relative, but being a dick cannot be allowed." - Oglaf's Thaumaturge in "The Abyss"

"Well, see, the real magic isn't believing in yourself. The real magic is manipulating people by telling them to believe in themselves. The more you believe, the less you check facts."  - Oglaf's Vanka in "Conviction"

FFMaster

Reflect and Silence should be seperate flags, like they are now. Shit like summons, for example. IMO, random hits should be saved, it's a useful flag for boss fights.
  • Modding version: Other/Unknown
☢ CAUTION CAUTION ☢ CAUTION CAUTION ☢

Pickle Girl Fanboy

I don't care what happens, as long as we retain the ability to create abilities like rafa/malak/hyudra/hydra/tiamat/reis multi-hit, random hit abilities, with both the ability to flag and alter multi-hit (specifically, Hit = x or y +1) and maybe the ability to flag random hit.

May I ask why you're trying to consolidate flags like random hits?  Do you intend to keep random hits hardcoded to a forumula?  If that's the case, then couldn't you just make the AI check if that formula is in effect?


We also need reflect and silence to be separate flags, since we might use silence to create a debuff like Addle or Palsy.

NOTE: the bolded text is me rambling, since I don't remember exactly how multiple random hits work.  Do they hit randomly within the AOE of the ability, and does each "hit" have a hardcoded AOE of it's own?

formerdeathcorps

December 05, 2011, 08:09:54 pm #33 Last Edit: December 05, 2011, 08:48:12 pm by formerdeathcorps
There's way too much confusion about what is going on.  Let's release a map showing explicitly what gets mapped where.

You will notice that each number appears at least twice on the map.  If an ability flag has the same number as an AI flag, the AI flag, when I finish, will assume the role of the ability flag.  If you see a "b" next a number, that means the code that I need to modify in FFT between these two effects are closely linked, and hence, I will tackle both cases simultaneously in my forum post.

Special Notes:
4b is Triple Attack and Triple Breath because both of those AI flags correspond to "3 Directions" the ability flag.  The only difference to the AI is that Triple Attack is not ranged and Triple Breath is.  A future version will definitely merge both AI flags under Triple Breath.
(1) is Evadable.  Like I mentioned in my earlier post, the only skills with the AI flag that correspond to "Evadable" flagged are skills that are P-EVable.  Thus, I'm not exactly sure merging "Evadable" into the AI flag marked "Unknown" is wise.  The key is to see if the AI byte that holds the value of hit chance checks M-EV.  If it does, then it should be fine to code this merger.
* is Direct.  The problem here is that the byte containing direct is loaded onto the stack before the targeting pattern is created.  This is much harder to analyze because trying to track when addresses on the stack are read/written from is a lot harder a task (because it happens much more often than designated data RAM).  Nor can I directly write the desired AI byte to the stack because that would affect all the other flags on the same byte/column (including ones that don't have an AI flag equivalent).  Thus, this flag may be put off until later.
+ is EQ Sword and EQ Materia Blade.  The problem here is that Xif's ARH renders these obsolete, but Xif's ARH probably needs to be recoded to run on all systems and uses a lot of free-space.  Unless Xif wants to do this, I'd likely have to do this, but since this is not directly related to my formula hack, removing the effects from the EQ Sword and MAteria Blade flags while preserving their functions in some other feature will spend a good deal of time mostly away from the formula hack.  Thus, these flags may be put off until later.

Quote
May I ask why you're trying to consolidate flags like random hits?  Do you intend to keep random hits hardcoded to a forumula?  If that's the case, then couldn't you just make the AI check if that formula is in effect?

I think I'm getting the source of your confusion.  Malak/Rafa/Reis/Tiamat spells have "Random Hits" (under AI), "Random Fire" (under Abilities), and multi-hit (hardcoded) simultaneously and you're mixing the three up.
I was slating the AI flag "Random Hits" for deletion.  Most of you opposed it.  Hence, it will not be.  That flag, by itself, HAS NOTHING to do with the Ability flag "Random Fire".  The fact they are even named similarly is a consequence of melonhead making FFTP when we knew nothing about flags and not correcting these names over time.  The reason why Square paired all the skills with "Random Hits" with all the skills that also have "Random Fire" is unknown and likely would result in no change if you removed "Random Hits".
The ability flag "Random Fire" means that given an AoE, you will hit a random panel in the AoE rather than the whole space.  THat is a flag and isn't hard-coded at all.
Multi-hits, a characteristic of tiamats and Rafa/Malak/Reis, will be turned into a flag, though the priority is relatively low.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Vanya

So basically you're consolidating redundant flags. On a side note FFTP really needs to have all those flags rewritten.
  • Modding version: Other/Unknown
¯\(°_0)/¯

Pickle Girl Fanboy

Vanya, many of the flag names are hardcoded into fftpatcher.  What we really need is a complete rewrite in something like C++, with the focus on clean and well-commented code (for easy maintainability), modularity, and cross-platform compilation.  This should make everyone happy, because one of our geekier members can host the latest Windows and Mac binaries, and the rest of us linux bastards can compile fftpatcher ourselves, do bugtesting, and learn about programming along the way.  This will probably require that FFTPatcher (or whatever we want to call the software suite which will replace it) get it's own board or sub-board.

RavenOfRazgriz

Quote from: Pickle Girl Fanboy on December 06, 2011, 03:39:40 pm
Vanya, many of the flag names are hardcoded into fftpatcher.


No, only that box containing Learn on Hit (so Learn with JP, Action?/Display Ability Name, Learn on Hit, Blank, Unknown A/Used by AI, Unknown B/Smart-Target Allies, Unknown C/Smart-Target Enemies, Blank, Blank, Blank, Blank, Unknown D/Sidestep on Dodge) are hardcoded to FFTPatcher directly.  The AI Behavior and Ability Behavior boxes (the other two Flag windows) can be edited through Resources.zip like most everything else text-related in FFTPatfcher.  The problem is, outside of a bit of name-changes-for-clarity and clarifying 2 or 3 AI Behavior Unknowns (Unknown A/Check CT, Unknown B/Check Faith, Unknown C/Check Evasion), we don't really need to rename most of those until FDC's well into his Flag mauling work, and you can get all the info I just gave you on them right here.  Considering FDC has hobbled FFTPatcher together from its source code before (see: .466), I imagine he or someone else could take the source code for .457 and/or .466 (the only versions of FFTPatcher worth using since .478 is shit) and fix up that one hardcoded window.

I don't happen to have anything remotely resembling a C# compiler, though, nor do I have FFTPatcher's source code lying around, hence why I never bothered with that myself.

formerdeathcorps

To be fair, I didn't code 466.  That was on Xif's FTP.  I released 478 from the C# source-code.

However, 478 is not a complete copy of FFTP (which is why melonhead didn't release it yet).  Hence, many features are broken.
.478's Patcher is completely broken.  I never released a functional copy.  What we commonly call .478's Patcher is actually .466's.
.478's ShiShi, after R999's revisions, is the best version.
.478's orgASM compiled without any bugs, but it itself is buggy.  Don't use it.
.478's TacText...I never bothered using it, but I do remember creating the executable.

AS for my work at releasing the thing?  I did this over 2 days, spending about 12 hours on the source code per day, with minimal food in between.  Mind you, my actual coding skill in C# is not great, so given my working conditions, I probably made some errors.  It's probably why Patcher doesn't even work in the first place.  My C# compiler while I recompiled 478 was the shareware one from Microsoft (since I didn't have one at the time), but I am using a free one now.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Vanya

Well, In that case it would probably be a good idea to eventually work on the patcher to implement all the cool shit that's being done now.
  • Modding version: Other/Unknown
¯\(°_0)/¯

Glain

If you check out the last post in this thread, I actually did grab melonhead's latest and compile it successfully (no compile-time errors at all), and run it seemingly without error. I have a zip up in that latest post of that compiled version, wondering if anyone found anything wrong with it. Admittedly I didn't test it too much, but all the programs seem to work. Not sure why this conflicts with fdc's findings. Oddly, a bunch of people seem to have downloaded it, but there's no feedback at all.

PGF, can't say I agree about the rewrite idea, unless some people really want to do it. You'd spend half the time trying to figure out how to create the GUI (form elements) in C++, which come built-in in C#. That would be so annoying that I'd probably rather use java, which is cross platform as well. Maybe you could find a good library to do it... not to mention there is a LOT of code. I see the point about cross-compatibility, but I'm still not sold on the idea that it wouldn't be possible to configure wine or the like to run FFTP. (didn't someone make casual mention of doing it at one point?)

With that said, IF the current base we have works, it probably isn't a bad idea to update some of the things like flag names; maybe even make a few code modifications.
  • Modding version: Other/Unknown