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

New potential format for Event Instructions?

Started by Xifanie, July 27, 2020, 11:44:08 pm

Xifanie

I'd want to make it like JSON, or something. It would improve readability and this type of format could also be extended to event conditionals and world map instructions. Also, this probably won't ever happen as I'm sure it's more than my body can handle. 😅

Example:

Offset = 0x12A000;

UnitIDs = {
   Ramza: 0x02,
   Alma: 0x30,
   Simon: 0x80,
   DeadKnight: 0x81,
   DeadMonk: 0x82,
};

Instructions = {

Camera(
   X: 392, Y: 1272, Z: 1420,
   Angle: 334, Rotation: 480,
   Zoom: 100%,
   Frames: 1
),
WaitForInstruction( WaitFor: Camera ),

UnitAnim( UnitID: Simon, Animation: Dead ),
UnitAnim( UnitID: DeadKnight, Animation: Dead ),
UnitAnim( UnitID: DeadMonk, Animation: Dead ),
WarpUnit( UnitID: Ramza, X: 4, Y: 11, Facing: East ),
WarpUnit( UnitID: Alma, X: 4, Y: 11, Facing: East ),

SpriteMove( UnitID: Ramza, X: -44 ), WaitSpriteMove( UnitID: Ramza ),
SpriteMove( UnitID: Alma, X: -40 ), WaitSpriteMove( UnitID: Alma ),
ColorUnit( UnitID: Ramza, Preset: Shadows ), Wait( Frames: 2 ),
ColorUnit( UnitID: Alma, Preset: Shadows ), Wait( Frames: 2 ),

UseFieldObject ( ObjectID: 0x02 ), WaitFieldObject()

RotateUnit ( UnitID: Simon, Rotation: 8, Speed: 1 ), WaitRotateUnit( UnitID: Simon ),
Unknown_6D(),
ResetPalette( UnitID: Ramza ), ResetPalette( UnitID: Alma ),

LoadEVTCHR( MemoryBlock: 1, Slot: 0x42 ), WaitForInstruction( WaitFor: LoadEVTCHR ), SaveEVTCHR( MemoryBlock: 1 ),

SpriteMove( UnitID: DeadKnight, Z: 8 ),

EVTCHRPalette( UnitID: DeadKnight, MemoryBlock: 1, Palette: 0x02 ),
EVTCHRPalette( UnitID: DeadMonk, MemoryBlock: 1, Palette: 0x02 ),
UnitAnim( UnitID: DeadKnight, Animation: { Type: EVTCHR, MemoryBlock: 1, ID: 2 } ),
UnitAnim( UnitID: DeadMonk, Animation: { Type: EVTCHR, MemoryBlock: 1, ID: 1 } ),
SpriteMove( UnitID: DeadMonk, Z: 8 ), WaitSpriteMove( UnitID: DeadMonk ),

EVTCHRPalette( UnitID: Simon, MemoryBlock: 1, Palette: 0x04 ),
UnitAnim( UnitID: Simon, Animation: { Type: EVTCHR, MemoryBlock: 1, ID: 7 } ),

Instruction_63( UnknownA: 0xC9 ),

[...]

Async({
   Wait( Frames: 10 ),
   SpriteMove( UnitID: Ramza, Frames: 36 ),
   Wait( Frames: 16 ),
   ColorUnit ( UnitID: Ramza, Preset: 0x08, Frames: 4 ),
   WaitSpriteMove( UnitID: Ramza ),
   UnitAnim ( UnitID: Ramza, Animation: Standing ),
   Wait( Frames: 20 ),
   [...]
   UnitAnim ( UnitID: Ramza, Animation: Bow ),   
}),

[...]

DisplayMessage(
   Type: CloseByScript | Regular | Bottom,
   UnitID: Simon,
   MessageID: 0x0003,
   String:
"{font:08}Simon {br}
{font:00}U, ugh...Alma...{br}
Why...are you....here?{end}",
   Y: 12, ArrowX: -4,
   Open: Smooth
),
WaitForInstruction( WaitFor: Dialog ),

DisplayMessage(
   Type: CloseByScript | Regular | Top,
   UnitID: Alma,
   MessageID: 0x0004,
   String:
"{font:08}Alma{br}
{font:00}What happened?{end}",
   X: 18, Y: 28, ArrowX: -4,
   Open: Shock
),
WaitForInstruction( WaitFor: Dialog ),

ChangeDialog(
   DialogID: Bottom,
   MessageID: 0x0005,
   String:
"{font:08}Simon{br}
{font:00}It's dangerous....here.{br}
Hurry....run.   {br}
They...came for the Holy{br}
Stone 'Virgo'...{end}"
),
WaitForInstruction( WaitFor: Dialog ),

ChangeDialog( DialogID: Top, MessageID: Close ),

[...]

};
  • Modding version: PSX
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