Author Topic: [PSX/PC] General editor - Hades Workshop (0.50b)  (Read 842387 times)

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35b)
« Reply #600 on: 2016-11-12 17:43:45 »
Thank you both for reporting those bugs.
I'll try to fix them but now I'm on a small pause for HW.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35b)
« Reply #601 on: 2016-11-24 20:44:24 »
Update !
I wondered whether I should call it v0.36 or not, because there is some cool new stuff. But I finally opted for 0.35c (that gives an excuse for not working on backgrounds... plus 0.36 would make it sound as if I was almost over with it).

So:
- You can now choose the Battle Scene of battles for the Steam version (it was already available for PSX),
- Changed the way you add a new spell to enemies : you can now copy an attack from any battle and add it somewhere else,
- You can now add new enemies (not new battles) : with the same copy/paste principle, you can make battles with any combination of enemies,
- Improved a bit the attack sequencing for enemy attacks (all the codes have a name and a description of what it does now),
- Fixed the stats panel bug, making battles unplayable if you modified in for the Steam version,
- Fixed the UI text bug (in particular with the cutscene skip), the UI texts are still quite unpleasant to modify though...
- Found the meaning of a flag for spells (it became rare enough to mention it).


So, about adding enemies, there are a few constraints and some step-by-step method to follow:
1) Copy the enemy you want to add (right-click), then go to the battle where you want to add him and paste.
2) Copy some attacks for that enemy: it is advised to copy/paste attacks from its original battle since then the sequencing and animations will match. You can get any other spell as well though (but then you need to modify the spell sequence or the animations will look weird).
3) Select those new attacks you copied and change their field "Animations" -> select the new enemy.
4) Similarly, select the new enemy and change its "Default Attack" to one of those you added (it's only used for Berserk/Confuse),
5) Modify at least one of the enemy Groups to include the new enemy in it.
6) Click on "Edit Entries", select the last entry named "Object" in the list, Add one entry (it will pop between that Object and Zidane's entry) and change the entry type to 2,
7) Modify the AI script to include an AI for your enemy. You might copy/paste the AI of the original battle sometimes (for regular enemies mainly) but you can also use a very basic AI:

7-a) Function Main_Init
Add a line "InitObject" with the new enemy's entry for the first argument and 128, 129, 130 or 131 for the second (one that is not taken already). If you added more than once of the new enemy inside the enemy group, add more lines like these.
Example: I added 2 Abominations in a battle with 1 Adamantoise and so I added the two last "InitObject" lines
Code: [Select]
Function Main_Init
    InitObject( 1, 128 )
    InitObject( 2, 129 )
    InitObject( 2, 130 )
    return

7-b) Add a function of type 0 (Main) for your enemy's entry (right-click on the function list for that). Nothing absolutly required there so you can just write a single "return" and parse.
Example: I let this example so you don't forget to add a main function nor a "return" line.
Code: [Select]
Function Abomination_Init
    return

7-c) Add a function of type 5 (ATB).
You're not forced to make an AI as complicated as the ones the game has. You can go with something as simple as a "GetRandom" for selecting the attack and basic SV_Target selection.
Example: My Abomination has two different attacks: Silent Slap which is single-target and Fira which is Multi-target. I make it so Silent Slap is used 2/3 of the time and Fira the remaining third.
Code: [Select]
Function Abomination_ATB
    if ( GetRandom % 3 ) {
        set SV_Target = RandomInTeam(SV_PlayerTeam)
        Attack( 4 )
        return
    }
    set SV_Target = SV_PlayerTeam
    Attack( 5 )
    return

7-d) Counter, CounterEx, Loop and Death functions are optionnal.

Lastly, you may customize the enemy's attacks/stats.

Important things to note:
- There seems to be a limit to how many different enemy datas can be in a single battle. You can have up to 3 different enemies in the Enemy List (otherwise, the game softlock when the battle starts). You can have up to 4 enemies in total in one battle anyway, counting duplicates.
- Same thing for enemy attacks : you can have up to 18 different attacks. I have no idea why there is this limit...
- When you are done with adding enemies/attacks, you should always have the list of attacks used by the first enemy followed with the list of attacks used by the 2nd enemy, etc... I'll try to remove that condition in the future but for now, it's better to respect it.

I also made a more extensive example of what can be done with this feature. And a video out of it.
https://www.youtube.com/watch?v=ODoALz8p_Kw
You can download the mod there (both .hws to see how I did and Steam files to play that battle) :
https://www.dropbox.com/s/0a2ct2r7r4i92wy/PC_PandeMadness.zip?dl=1
You can see that cameras can't be customized very well ^^"

I'll be off for work next week ; when I return, I'll see what can be done about field backgrounds.
« Last Edit: 2019-03-10 13:05:18 by Tirlititi »

vivigix

  • *
  • Posts: 26
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #602 on: 2016-11-26 11:56:53 »
Tirlititi I just watched video on YouTube,  it is amazing.
Thank you for your job. You are the best.

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #603 on: 2016-11-30 23:18:45 »
Backgrounds, Backgrounds, Backgrounds ;D

Baby5

  • *
  • Posts: 10
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #604 on: 2016-12-07 13:22:00 »
Thank you for this update! It works like a charm now, I have not encountered any bugs yet with the most recent version.

itoikenza

  • *
  • Posts: 47
  • Chrono Cross Modder: http://pastebin.com/fuj8s836
    • View Profile
    • Chrono Cross Hacking Wish List!
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #605 on: 2016-12-11 00:29:14 »
 Wow. Tirlititi, you are a saint! A god among Programmers... Please don't forget my silly request of modding "Change" & "Defend"?!

Sent from my MotoE2(4G-LTE) using Tapatalk


Epiphoskei

  • *
  • Posts: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #606 on: 2017-01-19 00:25:00 »
Thank you, this is tremendous. In 3 hours I managed to do what I have wanted for ten years. I managed to hard-code the growth cap of Tetra Master cards at 255.

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #607 on: 2017-01-25 12:11:00 »
is there a way to change the starting consumable items? or change items on a field map?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #608 on: 2017-01-25 12:42:07 »
Yeah, the "simple" way to choose the starting item is by giving them through the script of the first "Prima Vista/Cargo Room".
Code: [Select]
AddItem( 236, 10 ) // Give 10 potions to the playerYou remove the default starting items with these lines :
Code: [Select]
RemoveItem( 236, 7 )
RemoveItem( 237, 2 )
RemoveItem( 238, 2 )
RemoveItem( 240, 2 )
RemoveItem( 247, 2 )
RemoveItem( 249, 1 )
RemoveItem( 253, 1 )
I think you can put these lines in the "Main_Init" function as it should run once at the start (I don't think it runs again after the Masked Man fight, but it should be checked).
The best place to put them is in the "Zidane_Loop" function though, next to the "Sure is dark..." line ("WindowSync( 2, 128, 34 )").

The starting items are defined in the CIL method "ff9item::FF9Item_Init". You might change the values there as well, but I don't recommend it as it could be a feature in a future version of HW to have a panel for automatically changing these starting items.

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #609 on: 2017-01-25 12:53:02 »
yea i cant find the scripts ur talking about. are u using a different tool?

also any chance of adding in for steam version, higher than 65k hp it is possible to go above max in pc version. found this by messing with cheat engine
« Last Edit: 2017-01-25 13:05:33 by resinate »

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #610 on: 2017-01-25 13:55:47 »
You have to write those lines in the script.
The scripts themselves are found in the panel "Environment -> Fields" which is present in HW since a long time.

Also, you can't go above 65 535 HP in PC version. HP and max HP are ushort. I don't know what you made with Cheat Engine, but you certainly did not set the HP to more than 65 535. Maybe you did change a temporary buffering of the HP, but that can't be used in the long run.

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #611 on: 2017-01-25 22:33:30 »
but this will blow ur mind, use a tent on a end game boss

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #612 on: 2017-01-29 20:31:37 »
I was thinking of trying something: addind an NPC to, say, Daguerreo's Library that can reset your characters stats, maybe charging a price. It sounds doable, but I'm unsure what to do. Could text limits be an issue? Because some dialog would be necessary...

Or maybe use an existing NPC.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #613 on: 2017-01-29 21:31:30 »
On PC version, you have no text limit and you can add any NPC that you want (it'll be a bit tedious to get his animations, though, because they are not yet documented).
However, the big problem here is that you can't manipulate the stats of the characters through scripts :/
Nor levels, not strength/magic, etc... The only things you can somehow manipulate are the Max HP and Max MP, using a kind of bug, but you have to be in a battle to change them, and I'm pretty sure the changes will revert when the character levels up.

In the future, I plan to add custom functions available in scripts, so you could do what you want with the stats, but that's not for now.

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #614 on: 2017-01-29 21:49:47 »
I was thinking of a function that "introduces" the character to the party, like the first time you meet them.

Say, you talk to an existing NPC, he gives you a list of the chars in your party, pay 100k and the character is reset. I thought it would be simple.

But thanks. Btw, I meant PS version, Pc version is ew. :o

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #615 on: 2017-01-29 22:39:18 »
Nice catch :D

Well, yes, but the PC version has no problem of space capacity ^^'
You can add a few text in the PS version, but you can't add NPC : you'll have to use an existing one indeed.

The usual script function to talk to a NPC is [TheModel]_SpeakBTN. It presents like this :
Code: [Select]
Function OldManOrSomething_SpeakBTN
    // Keep the first few lines : a player can talk to a NPC only if he has the control
    ifnot ( IsMovementEnabled ) {
        return
    }
    set VAR_GlobBool_158 = 0
    if ( VAR_GlobBool_159 == 1 ) {
        DisableMove(  )
        if ( VAR_GlobBool_144 == 0 ) {
            DisableMenu(  )
        } else {
            Wait( 1 )
        }
    }
    0x27( 127 )
    WaitTurn(  )
    // Keep the following 3 lines if you want the NPC to face Zidane when he talks
    set VAR_GlobUInt8_16 = GetEntryAngle(255)
    TurnTowardObject( 250, 32 )
    WaitTurn(  )
    // The following are the animation of the NPC while he talks
    SetStandAnimation( XXX )
    RunAnimation( XXX )

    WindowSync( 0, 128, XXX )     // This line must be changed : choose your custom dialog here
    // For dialogs with different choices, use "GetDialogChoice" to know the one chosen
    if ( GetDialogChoice == 0 ) {     // 0 is the first choice. Let's say the dialog is "Do you want to restart your stats? Yes/No"
        if ( GetGil < 100 ) {
            WindowSync( 0, 128, XXX ) // Not enough money
        } else {
            WindowSync( 0, 128, XXX ) // Which character?...
            if ( GetDialogChoice < 8 ) { // Let's say the ninth choice is a "Cancel" choice
                SetPartyReserve( 0 )       // Explained below
                SetCharacterData( GetDialogChoice, 1, 255, 255, 255 )  // By using 255, you don't change the value
                RemoveGil( 100 )
                RunSoundCode3( 53248, 1045, 0, -128, 125 ) // Optional : play a sound. This one is the "buy something" sound
                SetPartyReserve( 255 )
            }
        }
    }

    // Go back to a standard animation and turn back to its previous facing angle
    WaitAnimation(  )
    SetStandAnimation( XXX )
    RunAnimation( XXX )
    set VAR_GlobBool_158 = 1
    if ( VAR_GlobBool_159 == 1 ) {
        if ( VAR_GlobBool_156 == 0 ) {
            EnableMove(  )
            0x27( 255 )
            if ( VAR_GlobBool_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    TimedTurn( VAR_GlobUInt8_16, 16 )
    WaitTurn(  )
    return

I am not sure how it'll work. It seems indeed that you can change the level this way, but you can't choose which level exactly. However, you're lucky because it seems to be possible to go back to lvl 1 (I didn't test it though).
Normally, the new level is the average of the (other members of the) party reserve's level, but if the party reserve is empty, it's 1. You just need to empty the reserve while calling "SetCharacterData" and put it back to normal afterward.

The dialogs must contain some [INIT_MULTICHOICE] opcode. If you have troubles with that, tell me. You can add a new dialog with a right-click on the dialog list (it always add it at the end).

EDIT : Warning. To use a large number in a script (more than 32767), you need to append 'L' to it most of the time.
For instance, use "100000L" and not "100000". It will bug otherwise (that makes me think that I should throw a warning there...).
« Last Edit: 2017-10-12 20:55:13 by Tirlititi »

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #616 on: 2017-01-30 18:44:42 »
A quick question, when editing enemy attacks, are the attacks identified by IDs or variables in the script? For example, an enemy that casts Thundaga, does the script explicitly refer to that spell, or to the ID (or slot) "occupied" by the list of attacks in each enemy entry?

Say, if you replaced such a spell with any other, would the enemy refuse to cast that spell?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #617 on: 2017-01-30 19:17:17 »
It refers to the ID, which is indeed the slot of the attack. If you replace a spell by another one, he will try to cast the new spell in place of the old one (what might happen is that the targets are not compatible with the new spell animation, and so not all the targets are affected).

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #618 on: 2017-01-30 19:34:10 »
I thought so. I guess as long as you substitute a single targeting spell for a single targeting and a multi for a multi, it ought to work.

Another thing, when adding scripts to heal an enemy (to simulate more than 65k HP), isn't it better to set it to heal x amount y times when it is below 20,000 instead of 10,000? That way, the lowest it can get is 10,001, not triggering <10,000 conditions.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #619 on: 2017-01-30 19:49:25 »
The best is to use the < 10 000 condition in the sense you'll need to heal less times. If there is that "HP less than 10 000 => end the battle" system, you can use it and make an alternate branch that heals the enemy instead of ending the battle.

That's what I did there.

If you use a < 20 000 condition, that's all ok though.

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #620 on: 2017-01-31 08:45:14 »
is there any method to enabling these
*debug moggle shop
*save in menu

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #621 on: 2017-01-31 14:51:09 »
The debug moogle shop can be enabled field by field. It has no point though since it doesn't do anything.
In each of Moogle's scripts, specifically near the beginning of the functions "Moogle_Make_SpeakBTN", you have those lines :
Code: [Select]
            set VAR_B7_9 &= 127
            set VAR_B7_10 = ( 71 | ( VAR_C6_372 << 4 ) )
            if ( VAR_B3_1 >= 0 ) {
                set VAR_B7_10 |= 8
            }
            while ( VAR_B7_9 < 128 ) {
                RunSoundCode3( 53248, 1362, 0, -128, 125 )
                EnableDialogChoices( VAR_B7_10, VAR_B7_9 )
                WindowAsync( 2, 8, 3 )
Replace the line "set VAR_B7_10 = ( 71 | ( VAR_C6_372 << 4 ) )" by "set VAR_B7_10 = ( 103 | ( VAR_C6_372 << 4 ) )" to enable the debug choice. You can also replace it by "set VAR_B7_10 = 127" to enable all the choices (since the mogshop will be invalid, trying to use it in-game will bug though).

There is no leftovers of a "Save in menu" option. It might be a hoax.

JBedford128

  • *
  • Posts: 113
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #622 on: 2017-01-31 15:38:18 »
I assume he refers to enabling the Save option in the menu (which was used for debug purposes). At the very least the menu name and description are left in the data.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #623 on: 2017-01-31 16:22:49 »
Ok, I suppose I didn't search enough.
Anyway, in the MenuUI.cs source file, there is no "Save" option.

aidolu12

  • *
  • Posts: 7
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.35c)
« Reply #624 on: 2017-02-02 13:08:28 »
Hi Tirlititi, seems the tool has really advanced since i used (Final Fantasy Formula IX).

I am on the start of a new project, and interested on asking if was it possible to create a MIP CODE that let an item give exp or ap to the characters.

Thank you for all your work.