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

itoikenza

  • *
  • Posts: 47
  • Chrono Cross Modder: http://pastebin.com/fuj8s836
    • View Profile
    • Chrono Cross Hacking Wish List!
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #250 on: 2014-12-23 21:16:20 »
Tirlititi is it possible to replace "Change" into any other command list instead?

here's what i tried, but nothing worked...
also the only reason i linked the "itoikenza" command list, is because it won't let me add moves otherwise...


@Tirlititi, Remember that?

have you ever fixed the change/defend not being changeable into a moveset yet?
« Last Edit: 2014-12-23 21:21:15 by itoikenza »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #251 on: 2015-01-11 16:37:26 »
There're 2 or 3 change and defend command in ff9.img. All have pointers point to them. You need to edit it and other text which are not supported by HadesWorkshop by an hex editor or program likes Atlas.

Anyone know the opcode to access small Kana letter in Japanese version? I guess it's some kind of F9xxyy but havent found it yet.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #252 on: 2015-01-11 20:19:21 »
Updated to v0.26b.
Few things new there. I had so much trouble with one of them...

- You can now change the battle scene of battles,
- You can modify the preloading datas of fields and world maps : it allows to trigger any battle inside any field and jump from any field to another,
- Modified the "MP Multiplier" field for spells, it was flags in the end (thanks Baby5 again for that),
- You can now see and remove (not add nor edit yet) special text opcodes I called "Format Codes" : they are used to tell whether a dialog bubble must be up or down, or place the bubble on the screen (ZackNeji : if you delete the format codes of Alexandria hidden dialogs, they will display fine on this screen),
- Fixed 3 bugs with the game script : the harmless one plus two others... There might be some more though :/

About preloading datas, they are half-automatized : you don't have to care of making preloading datas match each other (if an enemy formation is preloaded, its battle scene must be also preloaded for example) but you need to manually add preloading datas (fields and enemy formations mainly) if you use one in the game's script.

itoikenza, I am aware of this problem everytime I open the program ^^"
But the recent insight I had with battle's mechanics make me think it will be really hard for me to understand it, and therefore manage those commands.

So, I said I would tell about how making an "hidden dialog" patch with the tool so here it is.
First, open the disc 1 and 2 and go to the fields panel.

1) For Steiner's Bitterness part :
This one is quiet easy, you go in Ruined Prima Vista's storage room script (or whichever it is called in your langage), select the "Function Main_Loop" : the dialogs are mainly scripted in this single function in this field (in most fields, the dialogs are scripted in each character's own function instead). Check the different "WindowSync/Async" opcodes to guide yourself in the script.
You'll find these lines :
Code: [Select]
        if ( VARL_GenBool_2439 == 1 ) {
            WindowSyncEx( 13, 1, 128, 364 )
        }
        if ( VARL_GenBool_2438 == 1 ) {
            WindowSyncEx( 13, 1, 128, 365 )
        }
        if ( VARL_GenBool_2437 == 1 ) {
            WindowSyncEx( 13, 1, 128, 366 )
        }
The variables VARL_GenBool_243x seems to not be used anywhere else. The easiest way to unlock a line of dialog is to delete the "if" statement around it (the line containing the "if" and the closing braces).
Don't forget to parse the function before hitting the button "Ok".

2) For Steiner and Morrid's conversation :
Go in the Observatory Mountain's Shack script and search for the "Function GrandpaA_Loop", specifically these lines.
Code: [Select]
    case 12:
        WindowSync( 6, 128, 118 )
        set VAR_GlobInt16_28 = 17
        EnableHeadFocus( 2 )
        set VAR_GlobUInt8_31 = 96
        RunSharedScript( 7 )
        break
This function and the "SteinerB_2" one are responding each other using the variable "VAR_GlobInt16_28" which tells the current state of the dialog. Here, the variable is said to jump from the value 12 to the value 17, skiping a part of the dialog. Just replace the 17 by 13 and it will be fine.

3) Cleyra Meeting :
For this one, you have to enable an ATE in one (or several) of Cleyra's fields. I personally enabled it only in the Cathedral's hall field because it is simplier, but I don't know which conditions should have been met to enable it in developers' mind.
So, go in the Cathedral's hall field (in the US version, that's the 2nd field called "Cleyra/Cathedral" ; be sure to get to the sandstorm-still-active version of it, the first one).
The interesting part of the script is found in the "Function Main_Init" :
Code: [Select]
    if ( VARL_GenUInt8_484 == 0 ) {
        set VAR_GlobUInt16_30 |= 2
    }
    if ( VARL_GenUInt8_484 == 2 ) {
        set VAR_GlobUInt16_30 |= 8
    }
    if ( VARL_GenUInt8_483 == 0 ) {
        set VAR_GlobUInt16_30 |= 1
    }
    if ( VARL_GenUInt8_483 == 2 ) {
        set VAR_GlobUInt16_30 |= 4
    }
    if ( VARL_GenBool_3857 == 0 ) {
        set VAR_GlobUInt16_30 = 0
    }
You need to add these lines in the list of "if" statement (before the last one, that's better) :
Code: [Select]
    if ( VARL_GenBool_3856 == 0 ) {
        set VAR_GlobUInt16_30 |= 16
    }
The variable "VARL_GenBool_3856" is a flag that is set to 1 once the ATE has been seen, and 16 is a bit-flag corresponding to the 5th ATE, the hidden one.
You'll surely need to translate the lines of text for this dialog (in the Text panel of the program), as I think it's only present in the Japanese version of the game.
See there for the original dialog and an english translation by luksy.

4) Reaching Cid :
I assumed this part of the game was intended to be right after the ATE "Brahne's Fleet Arrives".
Search for the first "Brahne's Fleet/Event" field's script. It is quiet low placed in the field list. At the end of the "Function Linblum_Soldier_Loop", you'll find something like this :
Code: [Select]
            PreloadField( 5, 1363 )
            set VAR_GlobInt16_21 = 1363
            if ( VAR_GlobUInt8_17 == 255 ) {
                set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
            }
            0xA9( 250 )
            FadeFilter( 6, 24, VAR_GlobUInt8_17, 255, 255, 255 )
            Wait( 25 )
            if ( VAR_GlobBool_167 == 1 ) {
                RunSoundCode( 265, 65535 )
                set VAR_GlobBool_167 = 0
            }
            if ( VAR_GlobBool_162 == 0 ) {
                if ( VAR_GenUInt8_13 < 9 ) {
                    set VAR_GenUInt8_13 = 3
                }
                RunSoundCode1( 20864, 2297, 0 )
            }
            if ( VAR_GlobBool_163 == 0 ) {
            }
            set General_FieldEntrance = 2
            Field( 1363 )
            break
You must set the field to 1364 (Lindblum Airship Dock) instead of 1363 (Lindblum Hallway). Modify it in both the "PreloadField" and the "Field" opcodes. You also need to set the variable "General_FieldEntrance" to value 1, so Zidane appears at the right place of the Docks.
Once you have done that, you need one more thing for this one : you need to add the "Lindblum Airship Dock" field to the preloading datas of the Brahne's fleet field. Hit the button for editing preloading datas, go to the "Fields" section, search for the Dock's field in the list on the left and then add it. If you run out of space, delete the Hallway's field before since the two fields are not linked anymore.

Aaaaaaand you're done with that (and so am I ^^).
« Last Edit: 2017-10-12 19:23:20 by Tirlititi »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #253 on: 2015-01-12 01:23:16 »
I found that the world map's dialogue uses embeded pointers for locations at the beginning of the text block. These pointers called TOKENIZE in Hades, and the program calculates it wrongly. Anyone notice that the location names are wrong with Hades?

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #254 on: 2015-01-12 09:18:23 »
Wa.
Indeed, they are calculated wrongly for the japanese version. I'll correct it for the next version.

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #255 on: 2015-01-12 12:11:54 »
And the dialogue bubble height are always zero in Japanese version.
Btw, I tried to fix the calculation with Atlas.






Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #256 on: 2015-01-13 11:37:16 »
I wonder is there any way to trigger each dialogue text without palying?
After translating, we need to check if the dialogue bubble fit the text or not, and playing through the game is nearly impossible.
I see there's debug mode in the text, but how to enter it?

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #257 on: 2015-01-17 08:43:43 »
I found a way to test all sentences we translated without having to play through the game. Just use the save state.

From 1:37 in this video

https://www.youtube.com/watch?v=uz3VuN_o9bQ

ste459

  • *
  • Posts: 14
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #258 on: 2015-02-21 07:57:51 »
Hello!!  :)

First of all: thank you for your awesome work. FF9 is my favourite game, and I always dreamed the possibility to mod it!
When I firt saw this post, I can't believe it. Thanks

I really would ask a question to modders more experienced than me: it's possible to make a script that allows a boss to refill his Health Point when they are low? I know that the HP hard limit of 65535 cannot be exceeded. But if it were possible to make a script that refill (for example) Kuja Trance HP when they go under 10.000, and to do this thing for a limited number of time, the problem of max HP can be bypassed.

For example, we can declare a variable X. X start value (at the beginning of the fight) has to be 1.
When during the battle the boss HP go lower than 10.000, the boss refill his HP to the full value and X becomes 2.
And so on, until X reach a default value (for example 10) and the script interrupts.

I have no experience in programming except very little of Visual Basic 6. So I may wrote only stupid things.

I ask the question to coders more skilled than me. Is it possible? We can have a Kuja Trance, Ozma, Hades with virtually unlimited HP, for very challenging fights!
« Last Edit: 2015-02-21 08:00:13 by ste459 »

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #259 on: 2015-02-21 10:07:42 »
Yes, it is possible by editing the AI script.
I'm planning to make a more detailed manual of script editing, but there are still some few bugs and I wish to know the purpose of some more functions. But that, you can do already.

For AI script, the functions are usually the followings.
- A single main function that usually only inits the enemies with a InitObject call.
- For each enemies, a set of function that can be made of:
-- Init: usually defines which regular attacks the enemy will use and their mana cost (read the first values as Byte 64).
-- ATB: what the enemy does when its ATB is full.
-- Loop: a function that check the enemy's state each frame and may respond to it accordingly. It always ends with the lines "Wait(1)" and "loop". That's the one you're looking for. (optional but frequent)
-- Counter: what the enemy does when it has been hitted (optional)
-- CounterEx: what the enemy does when it casts a spell on himself or anytime the "counter" doesn't trigger for some reason (optional)
-- Death: what happens when the enemy dies (optional)
They may be sorted differently, though.

For most bosses, you may have noticed that they display 10 000 more HP than they should. Trance Kuja's HP is 55535 in-game, not 65535. That's because the looping function is scripted so when Kuja goes under 10 000 HP, he speaks, cast Ultima and ends the fight.
That's this part of the code specifically :
Code: [Select]
    if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) {
        // Wait until Kuja no longer attacks
        while ( IsAttacking != 0 ) {
            Wait( 1 )
        }
        // A check of "The battle has started"
        if ( GetBattleState != 4 ) {
            return
        }
        // Freeze the ATB and hide it.
        RunBattleCode( 32, 0 )
        while ( GetBattleState != 1 ) {
            Wait( 1 )
        }
        // Cast Ultima (the speech is included in it)
        set #( SV_Target = SV_PlayerTeam )
        AttackSpecial( 5 )
        while ( !( VAR_GenUInt8_199 & 16 ) ) {
            Wait( 1 )
        }
        RunBattleCode( 40, 1 )
        set VAR_GenUInt8_199 &= 65519
        Wait( 1 )
        while ( !( VAR_GenUInt8_199 & 16 ) ) {
            Wait( 1 )
        }
        // Fade filter and ends the fight
        FadeFilter( 0, 1, 0, 255, 255, 255 )
        set VAR_GenUInt8_199 &= 65519
        while ( IsAttacking != 0 ) {
            Wait( 1 )
        }
        set SV_FunctionEnemy[DEFEATED_ON] =$ 1
        RunBattleCode( 33, 5 )
        return
    }

So, you see, to check if an enemy's HP is under 10 000, that's the line "#( SV_FunctionEnemy[HP] <$ 10000 )".
Using simply "SV_FunctionEnemy[HP] <$ 10000" should also work. The purpose of the # operator and $ operator modifier is to handle multiple characters at once.
For instance, the expression "#( SV_PlayerTeam[HP] ==$ 1 )" will return true if there is at least 1 character in the team whose HP is 1.
However, "SV_PlayerTeam[HP] == 1" won't work. It will return true only if the 1st character's HP is 1 and all the others' are 0.

More precisely, suppose you have 4 characters in the team and their HP are 100, 113, 210 and 95.
"SV_PlayerTeam[HP]" returns a list : [100, 113, 210, 95]
"SV_PlayerTeam[HP] >=$ 100" also returns a list : [1, 1, 1, 0]
"#( SV_PlayerTeam[HP] >=$ 100 )" returns the amount of bits on : 3

So, how do you do what you suggested ? By doing exactly what you suggested ! You take a variable ("VAR_LocUInt8_60" is fine for that purpose and completly unused), increment it and heal each time Kuja goes under 10 000 and launch the end of the battle only once it reaches a certain amount.
You also need to set the local variable counter to more than 61 in order to use "VAR_LocUInt8_60" (in the "Local Variable Panel" above the function's script, write "allocate 61" instead of the previous "allocate" statement).

To heal, use this line:
Code: [Select]
set SV_FunctionEnemy[HP] =$ FirstOf(SV_FunctionEnemy[MAX_HP])"FirstOf" converts a list [value1, value2, value3, value4] into value1.
You can also use :
Code: [Select]
set SV_FunctionEnemy[HP] =$ 65535
You may want to init VAR_LocUInt8_60 to 0 in the enemy's initialization function but it's always initialized to 0 by default.

The resultant code should look something like this :
Code: [Select]
Function func_Trance_Kuja_Loop
    if ( !VAR_LocUInt8_0 ) {
        set VAR_LocUInt8_0 = 1
        while ( !( GetBattleLoadState & 8 ) ) {
            Wait( 1 )
            set VAR_GenUInt8_206 = GetRandom
        }
        set SV_FunctionEnemy[SHADOW] =$ 0
        while ( GetBattleState != 1 ) {
            Wait( 1 )
            set VAR_GenUInt8_206 = GetRandom
        }
        RunBattleCode( 35, 0 )
        while ( GetBattleState != 4 ) {
            Wait( 1 )
        }
    }
    if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) {
        if ( VAR_LocUInt8_60 < 5 ) {
            set VAR_LocUInt8_60++
            set SV_FunctionEnemy[HP] =$ FirstOf(SV_FunctionEnemy[MAX_HP])
        } else {
            while ( IsAttacking != 0 ) {
                Wait( 1 )
            }
            if ( GetBattleState != 4 ) {
                return
            }
            RunBattleCode( 32, 0 )
            while ( GetBattleState != 1 ) {
                Wait( 1 )
            }
            set #( SV_Target = SV_PlayerTeam )
            AttackSpecial( 5 )
            while ( !( VAR_GenUInt8_199 & 16 ) ) {
                Wait( 1 )
            }
            RunBattleCode( 40, 1 )
            set VAR_GenUInt8_199 &= 65519
            Wait( 1 )
            while ( !( VAR_GenUInt8_199 & 16 ) ) {
                Wait( 1 )
            }
            FadeFilter( 0, 1, 0, 255, 255, 255 )
            set VAR_GenUInt8_199 &= 65519
            while ( IsAttacking != 0 ) {
                Wait( 1 )
            }
            set SV_FunctionEnemy[DEFEATED_ON] =$ 1
            RunBattleCode( 33, 5 )
            return
        }
    }
    Wait( 1 )
    loop

Note that Kuja's counter-attacks are based on his current HP. You may want to change that also. And you may also want not to heal Kuja completly (let's say bring his HP to 55535 instead of 65535) so his Curaga still heals him.
Hope you'll be more at ease after that ^^

Congrats Yugisokubodai btw (your music is nice ^^).
« Last Edit: 2017-05-11 13:44:12 by Tirlititi »

ste459

  • *
  • Posts: 14
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #260 on: 2015-02-21 14:48:55 »
Great!! Now i'll test it. Thank you for your detailed answer.

I'm planning to do some balance changes to make the game more challenging. The only defect of this game is that's too easy, in particular in the late game.


tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #261 on: 2015-02-23 11:12:42 »
Just want to say, GREAT WORK Tirlititi!!!

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #262 on: 2015-02-27 21:28:11 »
Thanks :)

Updated to 0.27 :
- Field backgrounds can be viewed and exported (not edited yet),
- You can modify the amount of enemies inside battles ; be sure to change it both in the main panel and in the battle script,
- Added a window telling you how much some file reading processes are progressing (this is quiet useful when you load fields or battle scenes, since they are long to read),
- fixed bugs (tokenize code for japanese, some script bugs, some UI bugs...).

About field background, they are not 100% well displayed. Some tilesets (think of those as layers) are a mess and I don't know how to handle them ^^" Those tilesets are mainly about the "Places names" that are displayed when you first enter a new place but there are also some effects of light. There are also few tilesets that are behind ones they should be ahead of.
You can export them as .tiff (Gimp can read them at least). The filesize is hugely non-optimized.
You can see background's animations too.

For adding enemies to a battle, you must add to an enemy group, verify its "Targetable" flag is on, and add a "INIT_OBJECT" line inside battle's main function. Note that some enemies are moving back to a fixed position (Black Waltz 2, for instance, always go back to its default position in vanilla games after a Teleport move). The angle is also re-initialized to 0 most of the time.

You can see a stupid fight patch I made with this version here.

I guess I'll keep making bug-fixes updates while I'm studying the top-level file format. I need to make the remaining (menu) texts available and I can't do it without this step (plus it should unlock the card's panel also).
« Last Edit: 2015-02-27 21:30:49 by Tirlititi »

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #263 on: 2015-03-01 09:04:40 »
Thanks :)

Updated to 0.27 :
- Field backgrounds can be viewed and exported (not edited yet),
- You can modify the amount of enemies inside battles ; be sure to change it both in the main panel and in the battle script,
- Added a window telling you how much some file reading processes are progressing (this is quiet useful when you load fields or battle scenes, since they are long to read),
- fixed bugs (tokenize code for japanese, some script bugs, some UI bugs...).

About field background, they are not 100% well displayed. Some tilesets (think of those as layers) are a mess and I don't know how to handle them ^^" Those tilesets are mainly about the "Places names" that are displayed when you first enter a new place but there are also some effects of light. There are also few tilesets that are behind ones they should be ahead of.
You can export them as .tiff (Gimp can read them at least). The filesize is hugely non-optimized.
You can see background's animations too.
I guess I'll keep making bug-fixes updates while I'm studying the top-level file format. I need to make the remaining (menu) texts available and I can't do it without this step (plus it should unlock the card's panel also).

Awesome update.

When you say "(not edited yet)" what do you mean? Are there plans for us to be able to upscale the backgrounds or replace them entirely (sort of like the work edone for FF7 and FF8 with Palmer and so on)?

Are there any plans to add any sort of batching to the backgrounds at all? There are a loooot of backgrounds as we all know, doing them all 1by1 is possible, but very time consuming.

Something else that would be interesting, though not exactly necessary, is to have the viewer window be larger than its current size, most backgrounds don't actually fit correctly.
Its not exactly an issue to scroll up/down left/right though, which is why I said its not necessary, just a minor thing.

Great work.
« Last Edit: 2015-03-01 09:22:27 by DanTsukasa »

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #264 on: 2015-03-01 10:58:27 »
Thanks !

It is planned to make backgrounds editable, yes.
However, the main problem with that is the image size (that's why you can't make the other textures larger than what they currently are). If there is space to add some lines in fields' scripts, increasing a background's size (including upscaling them) would hit the limit extremely fast.
That's another reason why I try to get more of the high-level structures : to add a tool that could increase the size and get ride of that limitation.

The viewer window needs rework ^^ As you said, most backgrounds don't fit inside. The pathing and few other stuff should also be displayed in this window so I let it the way it is until I decide its final form. Same as the Script editor that definitely needs improvements.

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #265 on: 2015-03-01 13:07:44 »
However, the main problem with that is the image size (that's why you can't make the other textures larger than what they currently are). If there is space to add some lines in fields' scripts, increasing a background's size (including upscaling them) would hit the limit extremely fast.

The viewer window needs rework ^^ As you said, most backgrounds don't fit inside. The pathing and few other stuff should also be displayed in this window so I let it the way it is until I decide its final form. Same as the Script editor that definitely needs improvements.

Could you explain the image size limits in a bit more detail at all?

The pathing? Do you mean the walkmesh, I remember a Zidane_2 tool let you view/export walkmeshes but I never got the tool working (eventhough I have the source codes to everything he's done).

One thing that I think would be nice, probably for everything actually, is batching export (and import), someone could export all the scripts from lets say disc 1 as a text file and edit that, reimporting it later on, not sure if it'd save any time over the current method though, but it'd be great for fields and battle maps.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #266 on: 2015-03-01 13:50:37 »
Yes, the walkmesh. I got Zidane_2's tool working for me.

About the size limit : each field is packed in a "cluster data", regrouping every data needed for this field. There are the background, the script, the local models (really few models are global and usable anywhere ; and yes, that makes a lot of duplicates), the local animations for models, the local sounds, etc...

Between each of these datas, there is litterally no space available. However, between the field clusters, there is some 00 bytes unused.
There is between 0 and 2047 free bytes, depending on luck (clusters' locations are multiples of 2048 so the 00 are just for padding, initially). 2047 bytes, that's enough to add a bit of code, but that wouldn't even allow an increase of a 256x256 image to a 258x256 image (2 bytes = 1 pixel for backgrounds)... You could win 1 pixel in one of the 2 dimensions.

About batching import/export, I'm thinking about it for scripts (it has been asked for texts also...) but there are still a lot of unknown opcodes and such. I also think about changing function names' case LikeThis instead of LIKE_THAT (it was thought to be more like an assembly-looking code at the beginning).
All that to say I'll eventually do that, but not before all the bugs are fixed and that part of the tool is stabilized.

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #267 on: 2015-03-05 20:54:07 »
Greetings, everyone,

I’m new on this site and I just wanted to say that you guys are awesome! I have used many of your tools with great success already, and now that my FF7 hack is more or less complete, I’ve started working on FF9 next.

I wanted to thank you, Tirlititi, for making this great editor! Final Fantasy IX has always been one of my all-time favorite FFs, and I’ve been dreaming of modding it for a long time.

But right now, I’ve encountered a problem, and I hope that you can help me solve it:

For some unknown reason, the newest version of Hades Workshop (0.27) crashes every time I go to the Item, Enemies, or Environment section. I’ve tried it with both .bin and .iso files, and while Hades can open both file types, it also crashes on both of them whenever I go to one of the above mentioned sections. I can’t explain why that happens, because all previous versions of Hades (0.26 and older) worked fine. I thought that maybe my isos were corrupt, but it also happened when I tried to open the original, unaltered files. I have no other programs running in the background, by the way.

Oh, and I’m playing the German version if that makes any difference (it shouldn’t, however, because as I said all previous Hades versions worked flawlessly with them). Do you have any idea what might be causing this?

Thanks in advance for your help, you’re amazing!

Edit: Also, the item icons in the Inventory section are no longer displayed correctly (see picture). In all old versions of Hades Workshop up  to 0.26, they are still displayed correctly. Maybe this gives you an idea of what might be causing this?



It would be great if you could help me solve this issue, as I'd love to continue my FF9 modding.

« Last Edit: 2015-03-20 08:30:27 by Kefka »

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #268 on: 2015-03-21 14:51:40 »
A little message to inform you that I added some deciphered scripts in the 1st post.

Sometimes, when I get curious or when I'm asked to, I take the script of a system in FF9 and make it more readable (renaming variable names and such). That might be interesting to some of you. That's meant to be understandable if you know some programation basis but it's not meant to be parsable in any way (some uninteresting things are cut off).

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #269 on: 2015-03-24 11:42:02 »
Nice, thanks for the understandable version of Ozma's AI. Enemy AI is one of the most interesting aspects to edit, but I still have a lot to learn about it. I have just started changing certain enemies' AIs, and I've already succeeded at some of the things I wanna do (like having Hades use Curse and Doomsday without a countdown, or preventing Beatrix from ending battles automatically after 10 rounds).

However, I'm having trouble with changing the target of certain attacks from single to multiple, and I hope someone can help me with this. Specifically, I'm trying to make Tiamat's Float spell target the entire party instead of just one party member (so he has better chances of pulling off his Snort counterattack). Since he has 2 Float spells in his list, I changed the targeting of both attacks in his AI to SV_PlayerTeam (see picture) just to be sure, but it didn't work. He still casts Float on only one party member. Why?

This doesn't make sense to me as I've already done the same thing successfully with Malboro's Bad Breath, and it worked flawlessly. Now Malboro casts Bad Breath on the entire party.

I've wondered whether it might have something to do with the attack animation? The first Float spell in his attack list has a single-target animation, the second one a multi-target animation, but it seems this second one is never used. Is there a way to make him use it?


Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #270 on: 2015-03-24 15:42:02 »
Yes, that's because of the attack animation.
That's great he has a multi-targeting version of the spell, because otherwise, that wouldn't have been possible.

So, the list of regular attacks he uses is on the initialization function (func_Tiamat_0). Only the 5 first lines matter, the rest is about the randomization system.
Code: [Select]
    SET VAR_B7_20 = 7
    SET VAR_A11_1 = 794688L
    SET VAR_A11_4 = 29060
    SET VAR_A11_7 = 1280
    SET VAR_A11_10 = 24576
VAR_B7_20 -> Number of different regular attacks
VAR_A11_1 and VAR_A11_4 -> Attack IDs of regular attacks
VAR_A11_7 and VAR_A11_10 -> Attack MP costs

The way you should read those ugly 794688L and 29060 is in base 64 (put the selection caret on the numbers and read the base 64 field). 794688L = [ 3 ; 2 ; 1 ; 0 ] and 29060 = [ 0 ; 7 ; 6 ; 4 ] meaning that his regular attacks are all his attacks but the number 5 (Snort) and the number 8 (multi-Float). You have to change the 7 (single-Float) to 8 then.

The calculation to do that is :
[ 0 ; 8 ; 6 ; 4 ]
= 4 + 6*64 + 8*64*64
= 33156

I'm sorry you have to make the conversion yourself everytime you want to change the regular attacks :/
The interface of the script editor needs to change.

Alternatively, you can use a trick and replace the attack 7 by the attack 8 inside the ATE function (func_Tiamat_2). Add these lines right before the 'ATTACK' opcode :
Code: [Select]
    if ( VAR_B7_19 == 7 ) {
        SET VAR_B7_19 = 8
    }
« Last Edit: 2015-03-24 15:50:31 by Tirlititi »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #271 on: 2015-03-24 16:58:12 »
Wow, it worked! Thanks a ton!

Yeah, there's really a lot of variables in every AI script, it was really difficult to get the hang of it at first. I also made another change while I was at it. Did you now that Tiamat can use both Twister and Jet Fire only once per battle? I always found that rather lame, considering that his weaker Crystal version doesn't have this restriction. I made it so that he can use them an unlimited amount of times, and luckily it turned out to be a simple one variable value change for each. With these changes in place, Tiamat can actually be quite challenging now.

So there are certain attacks whose animations support both single and multi-targeting, but others that don't? This must be why changing the target worked for Malboro's Bad Breath, then.
« Last Edit: 2015-03-24 17:04:39 by Kefka »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #272 on: 2015-03-30 14:19:42 »
Sorry for the double post, but I've got another question regarding enemy AI scripts, this time it is about counterattacks. It seems that Function func_1_3 is the script that deals with counterattacks, right? Some enemies have a script in this section that I'm unsure of what it does or even what it is (see picture). Do you know what this is supposed to do? Because all enemies that have that don't have any counterattacks.



For example, I'd like to make Quale counterattack with his Rolling Attack occasionally, so I just copy-pasted a fitting counter script from another enemy (Nova Dragon) into Quale's Function func_1_3. However, he still doesn't counterattack at all. What could I have done wrong? The counter script itself must be OK because we already know that it works fine for Nova Dragon. So... what could be the problem?

It seems that Quale's original counter script doesn't serve any purpose either, because deleting it / replacing it with Nova Dragon's counter script didn't change his normal combat behavior in any way. Same with a few other enemies that have this same (seemingly useless) script in Function func_1_3.

But the big question I wanted to ask is: is it possible to give counterattacks to enemies that normally don't have one?

I'm grateful for any input.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #273 on: 2015-03-31 13:46:35 »
I can't help you about that. I didn't tested that kind of things.
The script you're showing may be useless in 99% of the situations (or maybe it is only a debugging remain).
I think that Zaghnols have a script like this one that only triggers when they get under Mini : it doesn't scale the model with the same factor as the default one.
I've already seen scripts (Ozma's for instance) responding to an attack inside the looping function. Maybe you can try to put the counter here?

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.25)
« Reply #274 on: 2015-03-31 14:17:53 »
Hey Tirlititi (typing that correctly was a challenge).

This tool is super awesome as I've said many times before, I'm quite curious what your future plans are for it, I can't think of many features that could still be added honestly, its pretty feature complete afterall.

I am curious if you've plans to implement a walkmesh viewer/extractor for the field scenes, I know Zidane_2 already made one, which doesn't want to work for me actually.
Outside of that the only things I know you're considering are optimizations and possible batch features (that require optimizations first anyway I think you said).

If you've no plans for that it'd be great if you could give a little rundown on how to use the one by Zidane_2