Difference between revisions of "AlterParameter"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "__FORCETOC__ = {E6} {{IE_E6}} = {{IE_E6_ex}} Dynamically alters a specified parameter of the next event instruction with a defined Variable's value. Does not affect {{IE_E6}...")
 
m (Xifanie moved page Event Instruction E6 to AlterParameter)
 
(No difference)

Latest revision as of 05:11, 23 February 2021

{E6} AlterParameter

AlterParameter(xPR,xVR)

Dynamically alters a specified parameter of the next event instruction with a defined Variable's value.

Does not affect AlterParameter instructions. If an AlterParameter instruction is encountered, the alteration will be passed on to the next instruction. This allows to stack multiple edits to the same instruction.

For example:

AlterParameter(x00,x02) //Variable 0x0002 Holding a value of 0x00000080
AlterParameter(x02,x03) //Variable 0x0003 Holding a value of 0x00000005
AlterParameter(x03,x04) //Variable 0x0004 Holding a value of 0x00000007
WalkTo(x00,x00,000,000,x00,x00,+32,x01)

Would dynamically alter the WalkTo instruction to

WalkTo(x80,x00,005,007,x00,x00,+32,x01)


Parameter : Byte (hex)

  • 0xC0
    • 0x00: Overwrite 1 Byte
    • 0x40: Overwrite 2 Bytes
    • 0x80: Overwrite 3 Bytes
    • 0xC0: Overwrite 4 Bytes
  • 0x00-0x3F: Offset (in bytes)


Here's a table to make your life easier so you don't have to calculate it yourself. For example, if we look at WalkTo(), the values for X and Y are x02 and x03 respectively, which are the values you'd use for this parameter.

Instruction Example Parameter Value
ElseIf(xVR) ElseIf(x00)
Switch(xVR) Switch(x00)
Case(xVALU) Case(x40)
DisplayMessage(x10,xDT,xMSG#,xID,x00,xPR,+XXXXX,+YYYYY,+ARPOS,xOT) DisplayMessage(x00,x01,x42,x04,x05,x06,x47,x49,x4B,x0D)
UnitAnim(xAU,xMT,xANIM,x00) UnitAnim(x00,x01,x42,x04)
ChangeMapBeta(MAP,x00) ChangeMapBeta(x00,x01)
PlayTrack(xSG) PlayTrack(x00)
Effect(xEFID,xID,XXX,YYY,x00) Effect(x40,x02,x03,x04,x05)
Camera(+XXXXX,+ZZZZZ,+YYYYY,+ANGLE,+MAPRT,+CAMRT,+ZOOM%,+TIMER) Camera(x40,x42,x44,x46,x48,x4A,x4C,x4E)
MapDarkness(xBM,+RED,+GRN,+BLU,TIM) MapDarkness(x00,x01,x02,x03,x04)
MapLight(+00000,+00000,+?????,+RRRED,+GREEN,+BBLUE,+TIMER) MapLight(x40,x42,x44,x46,x48,x4A,x4C)
EventSpeed(xSP) EventSpeed(x00)
Focus(xID,x00,xID,x00,x00) Focus(x00,x01,x02,x03,x04)
SoundEffect(xSDID) SoundEffect(x40)
SwitchTrack(x01,+VOL,TIM) SwitchTrack(x00,x01,x02)
WalkTo(xID,x00,XXX,YYY,xEL,x00,+SPD,x01) WalkTo(x00,x01,x02,x03,x04,x05,x06,x07)
WaitWalk(xID,x00) WaitWalk(x00,x01)
FaceUnit2(xFU,x00,xAU,xMT,xCL,xRS,xDL) FaceUnit2(x00,x01,x02,x03,x04,x05,x06)
RotateUnit(xAU,xMT,xDR,xCL,xRS,xDL) RotateUnit(x00,x01,x02,x03,x04,x05)
Background(RDT,GRT,BLT,RDB,GRB,BLB,TIM,xBS) Background(x00,x01,x02,x03,x04,x05,x06,x07)
BlockLoop(LPA,xVR,xDEST) BlockLoop(x00,x01,x42)
ColorBGBeta(xPR,+RED,+GRN,+BLU,TIM) ColorBGBeta(x00,x01,x02,x03,x04)
ColorUnit(xAU,xMT,xPR,+RED,+GRN,+BLU,TIM) ColorUnit(x00,x01,x02,x03,x04,x05,x06)
ColorField(xPR,+RED,+GRN,+BLU,TIM) ColorField(x00,x01,x02,x03,x04)
FocusSpeed(+SPEED) FocusSpeed(x40)
SpriteMove(xID,x00,+XXXXX,+ZZZZZ,+YYYYY,xMV,x??,+TIMER) SpriteMove(x00,x01,x42,x44,x46,x08,x09,x4A)
Weather(xWP,x01) Weather(x00,x01)
RemoveUnit(xID,x00) RemoveUnit(x00,x01)
ColorScreen(xBM,IRD,IGR,IBL,TRD,TGR,TBL,+TIMER) ColorScreen(x00,x01,x02,x03,x04,x05,x06,x47)
EarthquakeStart(MAG,MER,SMG,SSD) EarthquakeStart(x00,x01,x02,x03)
CallFunction(xFC) CallFunction(x00)
Draw(xID,x00) Draw(x00,x01)
AddUnit(xID,x00,xDR) AddUnit(x00,x01,x02)
Erase(xID,x00) Erase(x00,x01)
AddGhostUnit(xSP,x00,xID,XXX,YYY,xEL,xFD,xDR) AddGhostUnit(x00,x01,x02,x03,x04,x05,x06,x07)
ChangeMap(MAP,x00) ChangeMap(x00,x01)
Reveal(TIM) Reveal(x00)
UnitShadow(xID,x00,xSH) UnitShadow(x00,x01,x02)
SetDaytime(xDT) SetDaytime(x00)
PortraitCol(xPC) PortraitCol(x00)
ChangeDialog(xDB,xMSG#,xPR,xPP) ChangeDialog(x00,x41,x03,x04)
FaceUnit(xFU,x00,xAU,xMT,xCL,xRS,xDL) FaceUnit(x00,x01,x02,x03,x04,x05,x06)
Use3DObject(xID,xST) Use3DObject(x00,x01)
UseFieldObject(xID,x00) UseFieldObject(x00,x01)
LoadEVTCHR(xBL,xEV,x00) LoadEVTCHR(x00,x01,x02)
SaveEVTCHR(xBL) SaveEVTCHR(x00)
SaveEVTCHRClear(xBL,x00) SaveEVTCHRClear(x00)
LoadEVTCHRClear(xBL,x00) LoadEVTCHRClear(x00)
EndTrack(x??) EndTrack(x00)
WarpUnit(xID,x00,XXX,YYY,xEL,xFD) WarpUnit(x00,x01,x02,x03,x04,x05)
FadeSound(x00,TIM) FadeSound(x00,x01)
WaitRotateUnit(xID,x00) WaitRotateUnit(x00,x01)
MirrorSprite(xID,x00,xMI) MirrorSprite(x00,x01,x02)
FaceTile(xAU,xMT,XXX,YYY,x00,xCL,xRS,xDL) FaceTile(x00,x01,x02,x03,x04,x05,x06,x07)
EditBGSound(xSD,+ECH,+VOL,x00,xWT) EditBGSound(x00,x01,x02,x03,x04)
BGSound(xSD,+ECH,+VOL,xST,TIM) BGSound(x00,x01,x02,x03,x04)
SpriteMoveBeta(xID,x00,+XXXXX,+ZZZZZ,+YYYYY,xMV,x??,+SPEED) SpriteMoveBeta(x00,x01,x42,x44,x46,x08,x09,x4A)
WaitSpriteMove(xID,x00) WaitSpriteMove(x00,x01)
Jump(xID,x00,DST,xDR) Jump(x00,x01,x02,x03)
DarkScreen(x00,xSH,ESP,RTS,x00,SES) DarkScreen(x00,x01,x02,x03,x04,x05)
DisplayConditions(xMG,DST) DisplayConditions(x00,x01)
WalkToAnim(xID,x00,xANIM) WalkToAnim(x00,x01,x42)
DismissUnit(xJB,x00) DismissUnit(x00,x01)
ShowGraphic(xGR) ShowGraphic(x00)
WaitValue(xADDR,xVALU) WaitValue(x40,x42)
EVTCHRPalette(xID,x00,xBL,xPL) EVTCHRPalette(x00,x01,x02,x03)
March(xAU,xMT,TIM) March(x00,x01,x02)
ChangeStats(xAU,xMT,xST,+VALUE) ChangeStats(x00,x01,x02,x43)
PlayTune(xSG) PlayTune(x00)
UnlockDate(xTL) UnlockDate(x00)
TempWeapon(xID,x00,xIT) TempWeapon(x00,x01,x02)
Arrow(xTG,x00,xSH,x00) Arrow(x00,x01,x02,x03)
UnitAnimRotate(xID,x00,xDR,xANIM,x00) UnitAnimRotate(x00,x01,x02,x43,x05)
Inventory(xPA,xID,xVA) Inventory(x00,x01,x02)
ShowMapTitle(+XXX,+YYY,+SPD) ShowMapTitle(x00,x01,x02)
InflictStatus(xID,x00,xSS,x0C,x00) InflictStatus(x00,x01,x02,x03,x04)
TeleportOut(xID,x00) TeleportOut(x00,x01)
ResetPalette(xID,x00) ResetPalette(x00,x01)
TeleportIn(xID,x00) TeleportIn(x00,x01)
BlueRemoveUnit(xID,x00) BlueRemoveUnit(x00,x01)
PushTextVal(xVALU) PushTextVal(x40)
PushTextVar(xVR) PushTextVar(x00)
SetTextVal(xTV,xVALU) SetTextVal(x00,x41)
SetTextVar(xTV,xVR) SetTextVar(x00,x01)
ButtonPressGoTo(xBUTT,xGT) ButtonPressGoTo(x40)
LUI(xVARI,xVALU) LUI(x40,x42)
SET(xVARI,xVALU) SET(x40,x42)
SETVar(xVAR1,xVAR2) SETVar(x40,x42)
ADD(xVARI,xVALU) ADD(x40,x42)
ADDVar(xVAR1,xVAR2) ADDVar(x40,x42)
SUB(xVARI,xVALU) SUB(x40,x42)
SUBVar(xVAR1,xVAR2) SUBVar(x40,x42)
MULT(xVARI,xVALU) MULT(x40,x42)
MULTVar(xVAR1,xVAR2) MULTVar(x40,x42)
DIV(xVARI,xVALU) DIV(x40,x42)
DIVVar(xVAR1,xVAR2) DIVVar(x40,x42)
MOD(xVARI,xVALU) MOD(x40,x42)
MODVar(xVAR1,xVAR2) MODVar(x40,x42)
AND(xVARI,xVALU) AND(x40,x42)
ANDVar(xVAR1,xVAR2) ANDVar(x40,x42)
OR(xVARI,xVALU) OR(x40,x42)
ORVar(xVAR1,xVAR2) ORVar(x40,x42)
ZERO(xVARI) ZERO(x40)
Random(xVR,MODUL) Random(x00,x41)
LoadAddress(xVR,xVALU,xVA,LEN) LoadAddress(x00,x41,x03,x04)
UnitAddress(xID,xVR) UnitAddress(x00,x01)
WorldUnitAddress(xID,xVR) WorldUnitAddress(x00,x01)
SaveAddress(xVR,xVALU,xVA,LEN) SaveAddress(x00,x41,x03,x04)
UpdateUnit(xID,xPR) UpdateUnit(x00,x01)
TransformUnit(xAV,xPA,xJB) TransformUnit(x00,x01,x42,x44)
ResetTurnCounter(xID) ResetTurnCounter(x00)
PostEvent(xAC,xSCEN) PostEvent(x00,x41)
LoadConditionals(xCOND) LoadConditionals(x40)
Routine(rROUTINEA) Routine(x00)
JumpForwardIfZero(xJF) JumpForwardIfZero(x00)
JumpForward(xJF) JumpForward(x00)
ForwardTarget(xJF) ForwardTarget(x00)
JumpBack(xJB) JumpBack(x00)
BackTarget(xJB) BackTarget(x00)
WaitForInstruction(xIN,x00) WaitForInstruction(x00,x01)
AlterParameter(xPR,xVR) AlterParameter(x00,x01)
GetTileUnit(+XXX,+YYY,xEL) GetTileUnit(x00,x01,x02)
LoadTileData(xVR,xBO,+XXX,+YYY,xEL) LoadTileData(x00,x01,x02,x03,x04)
SaveTileData(xVR,xBO,+XXX,+YYY,xEL) SaveTileData(x00,x01,x02,x03,x04)
LoadENTD(xENTD,xUNIT) LoadENTD(x40,x42)
LoadENTDUnit(xID,xES,xBS,xFL) LoadENTDUnit(x00,x01,x02,x03)
ConditionalDefeat(xCD) ConditionalDefeat(x00)
Wait(TIMER) Wait(x40)


Variable ID : Byte (hex)

Click here for the list of Variables