1
FF9 Tools / Re: [PSX/PC] General editor - Hades Workshop (0.50b)
« on: 2025-07-12 20:33:04 »
@iamthehorker: Hello. That's the link now. Dropbox indeed changed its URL format several years ago.
The Collector
The Collector
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Function Region8_Init
SetRegion( ( -44, 1481 ), ( -159, 1237 ), ( 31, 1169 ), ( 88, 1329 ) )
return
Function Region8_Range
ifnot ( IsMovementEnabled ) {
return
}
Bubble( 1 )
return
Function Region8_SpeakBTN
ifnot ( IsMovementEnabled ) {
return
}
// Whatever happens when interacting while inside the region
return
global int8 {variable_name} VAR_GlobInt8_0
if ( GetEntryUniqueID(250) == 11 ) {
// Zidane is the player character
}
if ( GetEntryUniqueID(250) == 13 ) {
// Garnet is the player character
}
I have not tested it but I think that should be the way to go.public class POINTS
{
public ushort hp;
public short mp;
public short at;
public sbyte at_coef;
public byte capa;
}
with "at" being the ATB and "at_coef" being its speed (that depends both on Haste/Slow but also on the battle speed configuration).public bool FF9BMenu_IsEnableAtb()
{
if (!this.commandEnable)
return false;
if (FF9StateSystem.Settings.cfg.atb != 1uL)
return true;
if (this.hidingHud)
return this.currentPlayerId == -1 || this.currentButtonGroup == BattleHUD.CommandGroupButton || this.currentButtonGroup == string.Empty;
return this.currentPlayerId == -1 || ButtonGroupState.ActiveGroup == BattleHUD.CommandGroupButton || ButtonGroupState.ActiveGroup == string.Empty;
}
SetTextVariable( 0, 300 ) // Replace "[ITEM=0]" by "Red Stone"
SetTextVariable( 1, 301 ) // Replace "[ITEM=1]" by "Blue Stone"
SetTextVariable( 2, 302 ) // Replace "[ITEM=2]" by "Yellow Stone"
SetTextVariable( 3, 303 ) // Replace "[ITEM=3]" by "Green Stone"
// The function to pick the Blue Stone, in Mountain Path/Trail (1551)
Function Zidane_15
// The following lines are the movement of Zidane crouching in front of the statue
TimedTurn( Angle(2679, 3842), 32 )
WaitTurn( )
SetStandAnimation( 2605 )
RunAnimation( 2606 )
WaitAnimation( )
// This replaces "[ITEM=0]" in the dialog right below by the name of the item 301 (Blue Stone)
SetTextVariable( 0, 301 )
// Display the dialog with two choices: "[ITEM=0] is set on the stone. Take it out Leave it alone"
WindowSync( 0, 0, 143 )
// The check "!GetDialogChoice" is synonymous to "GetDialogChoice == 0", eg. the player chose "Take it out"
if ( !GetDialogChoice ) {
Wait( 10 )
// Play the pickup sound
RunSoundCode3( 53248, 1340, 0, -128, 125 )
Wait( 10 )
}
// The following lines are the movement of Zidane standing up
SetStandAnimation( 200 )
RunAnimation( 2590 )
if ( !GetDialogChoice ) {
// So, this whole block executes only if the player chose "Take it out"
RunSoundCode3( 53248, 108, 0, -128, 125 )
// Give the key item "Blue Stone" to the player
AddItem( 301, 1 )
// Same as above: replaces "[ITEM=0]" by "Blue Stone" in the upcoming dialog
SetTextVariable( 0, 301 )
// Blocks with "if ( 1 )" always execute; it's a technical leftover to have a "if" block there and it could just have been "WindowSync( 7, 0, 58 )"
if ( 1 ) {
// Display the dialog "Received [ITEM=0]!"
WindowSync( 7, 0, 58 )
} else {
// That part is thus never executed and could be completly removed, it wouldn't make any difference
WindowSync( 7, 0, 59 )
}
// THERE, this is the added subtlety: this variable is a "treasure picked" memo.
// It is enabled once you picked the treasure and usually it
// (1) makes sure that you cannot pick the same treasure multiple times
// (2) counts toward the treasure rank score
// But there, it will also be used to allow the player to place the Blue Stone in the other statue
set VARL_GenBool_2865 = 1
}
WaitAnimation( )
return
// The function to place the different stones, in Mountain Path/Roots (1554)
// I'll write much less details there
Function Zidane_16
SetWalkTurnSpeed( 64 )
SetPathing( 0 )
SetWalkSpeed( 30 )
InitWalk( )
WalkXZY( 1445, 174, 1243 )
TimedTurn( 160, 32 )
WaitTurn( )
SetStandAnimation( 2605 )
RunAnimation( 2607 )
WaitAnimation( )
set VAR_LocUInt8_0 = 0
SetTextVariable( 0, 300 ) // Replace "[ITEM=0]" by "Red Stone"
SetTextVariable( 1, 301 ) // Replace "[ITEM=1]" by "Blue Stone"
SetTextVariable( 2, 302 ) // Replace "[ITEM=2]" by "Yellow Stone"
SetTextVariable( 3, 303 ) // Replace "[ITEM=3]" by "Green Stone"
// Here's the tricky part: the variable "VARL_GenUInt8_358" is tied to "VARL_GenBool_2865"
// "VARL_GenBool_2865" is actually the second bit in "VARL_GenUInt8_358"
// So "VARL_GenUInt8_358" is organised in 8 bits:
// The first 4 bytes are "have you picked up the stones"
// The last 4 bytes are "have you placed the stones"
// "VARL_GenUInt8_358 != 255" is "as long as there's a bit that is not set"
// ie. "as long as the side-quest isn't over"
// "( ( VARL_GenUInt8_358 & ( ~( VARL_GenUInt8_358 >> 4 ) ) ) & 15 )" is a complex formula that enables the different choices
// It enables a choice if the related item (1) has been picked and (2) has not been placed yet
while ( ( !VAR_LocUInt8_0 ) && ( VARL_GenUInt8_358 != 255 ) ) {
EnableDialogChoices( ( ( VARL_GenUInt8_358 & ( ~( VARL_GenUInt8_358 >> 4 ) ) ) & 15 ) | 16, 0 )
// "There’s a hole. Put [ITEM=0] in. Put [ITEM=1] in. Put [ITEM=2] in. Put [ITEM=3] in. Leave it alone"
WindowSync( 0, 0, 144 )
if ( GetDialogChoice == 4 ) {
// "Leave it alone" -> Exit the loop
set VAR_LocUInt8_0 = 1
} else {
// Update "VARL_GenUInt8_358" in order to say that the stone has been placed
set VARL_GenUInt8_358 |= ( 1 << ( GetDialogChoice + 4 ) )
SetTextVariable( 4, GetDialogChoice + 300 )
RemoveItem( GetDialogChoice + 300, 1 )
WindowSync( 0, 0, 145 ) // "Put in [ITEM=4]"
RunSoundCode3( 53248, 1339, 0, -128, 125 )
}
}
// etc...
if ( VARL_GenUInt8_358 == 255 ) {
WindowSync( 0, 128, 146 ) // "Zidane “Hmm? Something came out from the back...”"
if ( GetItemCount(229) < 99 ) { // Can carry another Moonstone
if ( VARL_GenBool_7381 == 0 ) {
RunSoundCode3( 53248, 108, 0, -128, 125 )
set VARL_GenBool_7381 = 1
SetTextVariable( 0, 229 )
AddItem( 229, 1 )
WindowSync( 7, 0, 58 ) // "Received Moonstone!"
}
} else {
WindowSync( 7, 0, 62 ) // "Cannot carry another Moonstone."
}
}
}
SetStandAnimation( 200 )
RunAnimation( 2591 )
WaitAnimation( )
TimedTurn( 32, 32 )
WaitTurn( )
InitWalk( )
WalkXZY( 1327, 170, 1228 )
MoveInstantXZY( 1327, 170, 1228 )
SetPathing( 1 )
return
set VAR_LocUInt8_1 = GetItemCount(300)
set VAR_LocUInt8_1 |= (GetItemCount(301) << 1)
set VAR_LocUInt8_1 |= (GetItemCount(302) << 2)
set VAR_LocUInt8_1 |= (GetItemCount(303) << 3)
// Replace "VARL_GenUInt8_358 != 255" by "(VARL_GenUInt8_358 & 240) != 240"
while ( ( !VAR_LocUInt8_0 ) && ( (VARL_GenUInt8_358 & 240) != 240 ) ) {
EnableDialogChoices( ( ( VAR_LocUInt8_1 & ( ~( VARL_GenUInt8_358 >> 4 ) ) ) & 15 ) | 16, 0 )
// etc..
}
// Also for the reward that marks the end of the side-quest
if ( (VARL_GenUInt8_358 & 240) == 240 ) {
WindowSync( 0, 128, 146 ) // "Zidane “Hmm? Something came out from the back...”"
// etc...
}