Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: spydermann93 on May 15, 2022, 07:45:15 PM

Title: Remote Active Defense Not Working in FFX3.3
Post by: spydermann93 on May 15, 2022, 07:45:15 PM
Hey guys,

This has been a bug for a long time on my end and I'm not sure what to do to fix it. Remote Active Defenses do not work with FFX3.3 when used by the player. This is NOT the FF Active Defense attribute.

The AI can use them via the AI Tactics, but when I, as a player, try and use a Remote Active Defense, nothing happens. There are a few workarounds, but they aren't exactly what I'm looking for.

Here's an example:

Shield Man has two powers: An Active Defense and a Remote Active Defense. Both powers are exactly the same, except that the Remote power has the Remote flag checked. When I control him, he can shield himself just fine, but when he uses the Remote power on Defenseless Man, nothing happens. Now Shield Man and Defenseless Man are controlled by the AI. The AI Shield Man can give AI Defenseless Man a shield with his remote power.

Does anybody have a clue as to where I can start looking to fix this?
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: oktokels on May 15, 2022, 09:32:51 PM
Quote from: spydermann93 on May 15, 2022, 07:45:15 PM
Does anybody have a clue as to where I can start looking to fix this?

I have the same problem.
Not 100% certain, but i think it could be a problem with the hero file itself. Most of my hero files are created via EZHERO 4.0, and i'm pretty sure that ezhero has a problem with  :ffvstr: active defenses. When i'm working on ezhero and go to the option "send to text", the program crashes just when the text reaches the part of the remote active defenses.

I need to test this theory by using alchemiss or another non-custom character that has a remote active defense power, to see if it has the same problem.
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: spydermann93 on May 16, 2022, 01:03:55 AM
I don't think it's EZ Hero. Quetzlcoatl has a Remote AD but it doesn't work, either.

I'm feeling it's a script somewhere that handles Remote checks, but I haven't found out exactly what it is.
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: Epimethee on May 16, 2022, 02:01:51 AM
Interesting bug. Curious to see if it's custom-character related. Otherwise, you could add a print statement to the function called by the custom command:

The following in ffx.py
def OnffActiveDefense(target,char):
    power=getByTemplate(char,FFX_FFACTIVEDEFENSE_CUSTOM,2)

would become
def OnffActiveDefense(target,char):
    print "***** Active defense on %s by %s"%(target,char)
    power=getByTemplate(char,FFX_FFACTIVEDEFENSE_CUSTOM,2)


You can then compare script.log between the AI and player-controlled versions.
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: Epimethee on May 16, 2022, 02:26:55 AM
Quote from: spydermann93 on May 16, 2022, 01:03:55 AM
Quetzlcoatl has a Remote AD but it doesn't work, either.
I'm starting to wonder if it's not something that was fixed in the very confidential FFvsTTR beta patch (which was never officially released, as it apparently had serious issues and IG just gave up on FF at that point, as they probably couldn't justify putting any more cash into it). This might explain that it worked, presumably, for Taskmaster X.
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: spydermann93 on May 16, 2022, 04:47:30 AM
Quote from: Epimethee on May 16, 2022, 02:01:51 AM
Interesting bug. Curious to see if it's custom-character related. Otherwise, you could add a print statement to the function called by the custom command:

The following in ffx.py
def OnffActiveDefense(target,char):
    power=getByTemplate(char,FFX_FFACTIVEDEFENSE_CUSTOM,2)

would become
def OnffActiveDefense(target,char):
    print "***** Active defense on %s by %s"%(target,char)
    power=getByTemplate(char,FFX_FFACTIVEDEFENSE_CUSTOM,2)


You can then compare script.log between the AI and player-controlled versions.

Is this code referring to TaskMaster's FF ActiveDefense powers or the normal :ffvstr: Active Defense powers?
Title: Re: Remote Active Defense Not Working in FFX3.3
Post by: Epimethee on May 18, 2022, 12:35:01 AM
Taskmaster's. Built-in (non-FFX) powers don't use the .py Python files; they're inside the .exe instead. The code I referenced is inside ffx.py, at line 30694 of the FFX 3.3 version. Please back up you ffx.py before editing of course.