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

Trap Extension v1.0

Started by Xifanie, March 29, 2022, 07:13:39 am

Xifanie

March 29, 2022, 07:13:39 am Last Edit: March 29, 2022, 07:41:47 am by Xifanie
Download
💾 Trap Extension.xlsm
💾 Trap Extension.xml

This hack allows you to place old and brand-new traps on the field with an abilities, or with event instructions.

DEFAULT TRAPS
000 | 0x00 Degenerator: -1 Level
001 | 0x01 Deathtrap: 100% Death Sentence
002 | 0x02 Sleeping Gas: 100% Sleep
003 | 0x03 Steel Needle: 25% Max HP Damage
004 | 0x04 Rejuvenation: +HP (Level+1) x 5
005 | 0x05 Explosion: -HP (Level+1) x 2
006 | 0x06 Fusillade: -HP (Level+1) x 5
007 | 0x07 Manafont: +MP (Level+1) x 2
008 | 0x08 Wizardbane: -MP (Level+1) x 5 / 2
009 | 0x09 Leech: -MP (Level+1) x 5
010 | 0x0A Vanishing Smoke: 100% Transparent
011 | 0x0B Blinding Smoke: 100% Blind
012 | 0x0C Choking Gas: 100% Poison
013 | 0x0D Silence Gas: 100% Silence
014 | 0x0E Oil Bug: 100% Oil
015 | 0x0F Stasis: 100% Don't Move + Don't Act
016 | 0x10 Befuddling Gas: 100% Confuse + Berserk
017 | 0x11 Swarm: 100% Blood Suck
018 | 0x12 Stone Gas: 50% Petrify
019 | 0x13 Gil Bug: +Gil (Level+1) x 250
020 | 0x14 Grasshopper: Restore Movement (doesn't work if Act was used)
021 | 0x15 Plot Armor: 100% Immortal
022 | 0x16 Powerup: +1 SP / +2 PA / +2 MA (doesn't display)

SUMMARY
Adds a trapping formula which lets the player add custom traps on the battlefield that will trigger once.
The formula cannot be properly processed by AI, so I recommend that you uncheck "Used by AI."
Adding a trap to a tile that already has a trap will replace it with the new one.
The Y value of the formula determines which Trap Type will be set at the targeted tile.
You can either have trap skills that target the same tile as the user, or target empty tiles.
You can assign the formula to whichever formula ID suits your needs best.

WARNING: The ability MUST include a unit (ideally the user) in its AoE when it resolves in order to call the formula, which is why I have the following recommendations below.

EMPTY TILES TARGETING
Ability will fail if a unit is on the same tile as the targeted tile when the ability resolves.
"Auto Target" must be OFF
Recommended Settings:
Range: 1
AoE: 1
Linear Range ON
Vertical Threshold ON
Top-Down Target ON
Hit Caster ON
Can Select Unit OFF

SELF TARGETING
Ability will fail if the user is not on the same tile as the targeted tile when the ability resolves.
Auto Target must be ON
Recommended Settings:
Range: 0
AoE: 0
Hit Caster ON

CREATING NEW TRAPS
Unfortunately, removing status effects through traps is not possible at this time.
You can either hardcode your own traps at @custom_traps, or set a Formula + X + Y value at trap_types.
  • 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

Xifanie

March 29, 2022, 07:13:53 am #1 Last Edit: March 29, 2022, 07:42:25 am by Xifanie
Tutorial
First Things First

  • Make sure you change the Trapper formula to the ID that you want
  • Use the Add-Ins Load FFTText function (unless you use vanilla text)

Hack Columns

Name
For your own reference

Description
For your own reference

Particle Effect
Effect animation that plays when a trap is triggered.
https://ffhacktics.com/wiki/Extra_Particle_Effects

Ability Name
Ability Name to be displayed with a Check box when a unit steps on the trap.

Formula
Formula to use to apply effects on the target.
Attacker's stats will be set to the Trapper's stats.
If set to 0xFF, The sheet's hardcoding will be used instead. (See @custom_traps)
WARNING: Status effects are currently not supported with formulas, but they can be applied (but not removed) with hardcoding

X
X value to use with the Formula

Y
Y value to use with the Formula

Ignore
If true, this trap can be ignored by the Ignore RSM (equipped),
or deactivated by the Deactivate RSM (equipped).
If false, the trap will always trigger.

Text Row
Just set it to FF for custom abilities. Don't concern yourself with this.
It actually affects the text offset loaded from "Battle - Action Effects"
Overriden if Ability Name !== 0xFFFF

Adding Traps to battles with the Event Instruction Upgrade Hack

The Traps Format is as follows:
XX YY UU TT

X: X Coordinate
Y: Y Coordinate
U: 0x80 Elevation
0x40 Trap is active (this should always be set to true)
0x00-0x1F ENTD Unit ID (0x00 to 0x0F for ENTD units, 0x10 to 0x14 for the Player's roster units)
T: Trap Type ID

Of course those bytes would be reversed in event code when using LUI/OR
LUI(xVARI,xTTUU)
OR(xVARI,xYYXX)

Script Example:

//Load the Traps Table Address into Variable 0x0001
LUI(x0001,x8015)
LoadAddress(x01,x02B8,x01,004)

//Set Sleeping Gas (0x02) Trap at coordinates (8,3,0) laid by ENTD Unit 0x03
LUI(x0000,x0243)
OR(x0000,x0308)
SaveAddress(x00,x0000,x01,004)

//Set Manafont (0x0D) Trap at coordinates (4,5,1) laid by ENTD Unit 0x01
LUI(x0000,x0DC1)
OR(x0000,x0504)
SaveAddress(x00,x0000,x01,004)
  • 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

3lric

  • Modding version: PSX

ekaiser

I love this SO MUCH it bring tears in my eyes! Thanx Xif!! So much time for try so much stuf. Also for some reason, i dont think is for all but for me and some others may be, this Trap.xml ONLY works with FFTORGASM 0.493BetaV6.
  • Modding version: PSX