FF ACTIVE DEFENSE (HIT POINTS 10, 20, 35 & 50)

By Taskmaster X

This attribute is a scripted version of the original Freedom Force Active Defense for Freedom Force vs. the 3rd Reich, complete with HitPoints, Regeneration, Not Movable, and can also be used Remotely, just like in FFvTTR. So, think of this as all the best things of the FF and FFvTTR active defenses rolled into one.

The way it works is the actual Active Defense is an Active Defense Power in FFEdit that is set to Absorb. The code then calculates the amount of points absorbed and removes them from the HP of the Attribute. It also removes the absorbed energy immediately, so the character never really absorbs and energy. When HP reaches 0, the Active Defense is canceled.

Customisation

When creating the Active Defense in FFEdit, make sure you set the Block Type to Absorb and the EP Cost should be None. If the Active Defense is to be used Remotely, make sure you select "Can Only Use Remotely" in the Defence Flags. The character can still use this power on himself if you choose to customize the power to be used both on the user and remotely. So, you don't need to create two seperate powers - one with the Remote flag and one without. Also, you'll need to change the duration of the Active Defense using the datfiles.Campaign_ChangeActiveDefenceDuration function because new Active Defense Powers created in FFEdit are automatically given Short (10 sec.) Duration. If you set your Duration to be longer than 10 seconds in the customization, then the AD will disappear before your customized duration. For more info about using this function go to the ModMaking section of this manual and click on the Powers.dat link under the DAT Files subsection.

Due to FFX Control Centre having a limit on the number of customizable attributes, FF Active Defense has to be customized manually by opening ffxcustom2.py and looking for the FF Active Defense section:

### FF Original Active Defense
FFX_FFACTIVEDEFENSE_CUSTOM=[
["default","CUSTOM_FF_ACTIVE_DEFENSE","ff_active_defence",20,"Moveable","Regenerate","No Remote",66,"No",0],
["types","CCommand","sPower","iDuration","PMoveable?","PRegenerate?","PRemote Use?","iEP Cost","PLock?","iLock Time"],
]

Example:

### FF Original Active Defense
FFX_FFACTIVEDEFENSE_CUSTOM=[
["default","CUSTOM_FF_ACTIVE_DEFENSE","ff_active_defence",20,"Moveable","Regenerate","No Remote",66,"No",0],
["types","CCommand","sPower","iDuration","PMoveable?","PRegenerate?","PRemote Use?","iEP Cost","PLock?","iLock Time"],
["force field man","FORCE_FIELD","ff_active_defence_all",30,"Moveable","Regenerate","",66,"No",0],
]

In this example, Force Field Man's command is FORCE_FIELD and the name of the power in FFEdit is ff_active_defence_all and will last for 30 seconds. He can move and the Active Defense will stay on and will also regenerate lost HP. He can use the power on himself and remotely on other characters and the Energy Cost is 66. His animation will not be locked when using the Power so the Lock Time needs to be 0.

Special Customisations

With the ability to set the duration lower than 10, you can simulate characters that can raise a quick defense that lasts a few seconds and then disappears. This is great for characters who use an animation that shows them using their Defence (twirling a hammer, raising a shield, etc.) and you only want the defence to last as long as the animation is running. For instance, if the animation of twirling a hammer lasts only 3.5 seconds, then your duration should be 3.5. This way when the animation stops, so does the Active Defence Power. You can also Lock the animation to make it look like their using their defence animation longer. For instance, a character with an animation of him raising his shield up in front of him can be locked, to make it look like he's concentrating on protecting himself. Just set the Lock Time to the amount of time it takes the animation to get to the position that looks the best when locked. The Lock will last as long as the duration you put in the customization.

This attribute was recently updated so that you can use Active Defence Powers that are not set to Absorb. So you can set that Active Defence meant for the twirling hammer example above to Deflect. Also a new AI tactic was created specifically for this kind of Active Defense. The TDeflectMissiles AI tactic is similar to the TDodgeMissiles AI tactic. They both detect any projectiles in the character's vicinity and if one is detected, then the tactic is used. While TDodgeMissiles makes the character move about to avoid the projectiles, TDeflectMissiles causes the character to use their FF Active Defence. Projectile detection is improved by lowering the AI Time Delay for the character.