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

Kefka

  • Crazy poster
  • *
  • Posts: 176
  • Karma: 10
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1500 on: 2019-05-12 19:36:47 »
Quote
But I don't know why, for some reason it keeps start the music battle... it's weird! :| I've also replaced the p0data2 and the AssemblyCSharp..so I really don't know! I've checked once, twice..I can check again..maybe I'm missing something but...

Ah, I knew I forgot something! A few pages back I was asking tirlititi about changing the music used in certain battle formations, and this was his response:

No, it's determined in a couple of .txt files of the "resources.assets" archive. The files are called "BtlEncountBGMMetaData.txt" (for battles on the field) and "WldBtlEncountBGMMetaData.txt" (for battles on the map).

The files present like this :
Code: [Select]
{
  "ID of Field": {
    "ID of Battle in the Field": "ID of Battle Music",
    ...
  },
  ...
}
Battles have the music ID "0" (for normal encounters), "35" (for bosses) and "111" (for Hunter's Chance). Some battles are not registered in these files, when they don't stop the music played in the field (the "Don't Stop Music" battle flag is also checked for them in the "Enemy" panel).

Now what you have to do is open Hades Workshop, but instead of opening the FF9_Launcher the normal way, go to Tools -> Unity Assets Viewer, and open the Launcher there. Then go to Archive -> Shared Assets -> resources. Now scroll until you find the "BtlEncountBGMMetaData.txt" and export it (a text file will be generated in the HadesWorkshopAssets folder). Open this text file, the format is the one described by tirlititi. The list of field IDs is the same as in Hades Workshop when the fields are NOT sorted. In our case, Pandemonium laboratory is field ID 2705. There you will see that battle formation 896 is listed with a "0", which means normal battle theme. You'll have to delete the "896": "0" entry from this field, save, and then import this text file back into the Unity Assets Viewer by right-clicking the "BtlEncountBGMMetaData.txt" and chosing 'Import Selection'.

That should do the trick. Keep in mind that this will keep the field music playing at any time battle formation 896 is triggered, so maybe remove it as a random encounter from that location.

Loseless

  • Fast newbie
  • *
  • Posts: 49
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1501 on: 2019-05-12 20:59:56 »
Hey, guys! Maybe someone has experience regarding a particular idea of mine:

Every character has an ability list. I know how to swap abilities for others, but not all characters have the same number of abilities. So is therefore possible to give or add abilities to the list. What I want to know is how to do this. I want characters to learn abilities they normally don't have access to. I guess this requires some CIL code editing, but I haven't been able to find where it is.

Any thoughts?

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1502 on: 2019-05-13 14:26:01 »
Ah, I knew I forgot something! A few pages back I was asking tirlititi about changing the music used in certain battle formations, and this was his response:

Now what you have to do is open Hades Workshop, but instead of opening the FF9_Launcher the normal way, go to Tools -> Unity Assets Viewer, and open the Launcher there. Then go to Archive -> Shared Assets -> resources. Now scroll until you find the "BtlEncountBGMMetaData.txt" and export it (a text file will be generated in the HadesWorkshopAssets folder). Open this text file, the format is the one described by tirlititi. The list of field IDs is the same as in Hades Workshop when the fields are NOT sorted. In our case, Pandemonium laboratory is field ID 2705. There you will see that battle formation 896 is listed with a "0", which means normal battle theme. You'll have to delete the "896": "0" entry from this field, save, and then import this text file back into the Unity Assets Viewer by right-clicking the "BtlEncountBGMMetaData.txt" and chosing 'Import Selection'.

That should do the trick. Keep in mind that this will keep the field music playing at any time battle formation 896 is triggered, so maybe remove it as a random encounter from that location.

It works!! Thanks alot!!!  :-D :-D



eugene9

  • Fast newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1503 on: 2019-05-13 20:45:31 »
Hello!! Is there any way of changing Zidane's casting animation for Kuja's, Freya's, Vivi's or Garnet's? If so, could you tell me how I could do that, pls?
Thanks in advance  :)
« Last Edit: 2019-05-14 07:25:39 by eugene9 »

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1504 on: 2019-05-14 11:57:40 »
I have also another question if anyone can help.. there's somebody who knows in battle, how to make a model closing their eyes when KO and not look wierd/"creepy" like this?? Unfortunately this happens also when they're sleeping, faint etc etc on the normal field..but..why?

Spoiler: show
« Last Edit: 2019-05-14 12:09:04 by ToraCarol »

Incinerator

  • Crazy poster
  • *
  • Posts: 168
  • Karma: 8
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1505 on: 2019-05-14 21:10:27 »
I have also another question if anyone can help.. there's somebody who knows in battle, how to make a model closing their eyes when KO and not look wierd/"creepy" like this?? Unfortunately this happens also when they're sleeping, faint etc etc on the normal field..but..why?

Spoiler: show

UV texture errors from upscaled NPCs textures and the like of p0data4.bin!. High res textures damage texture animation + UV on some objects for unknown reasons; I have the same issue with my model's 4096x4096 textures. Have not yet found a fix for this yet!.

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1506 on: 2019-05-15 14:39:21 »
UV texture errors from upscaled NPCs textures and the like of p0data4.bin!. High res textures damage texture animation + UV on some objects for unknown reasons; I have the same issue with my model's 4096x4096 textures. Have not yet found a fix for this yet!.

Understand..thank you for the reply, Incinerator!  ;)

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1507 on: 2019-05-15 18:02:40 »
Guys sorry..I have another problem, and I hope someone of you can help me. Now I've added extra dialogs on Burmecia field, before Cleyra..but for some reason, when it goes on World Map it happens something like..that?

Spoiler: show


So what happened? What's the problem?

That's the code i modified

Code: [Select]
Function Freya_Loop
    switchex 6 ( VAR_GlobUInt8_24 ) {
    case 0:
        EnableHeadFocus( 0 )
        SetStandAnimation( 8385 )
        Wait( 30 )
        set VAR_GlobUInt8_26--
        while ( VAR_GlobUInt8_26 > 0 ) {
            set VAR_GlobBool_230 = 1
            Wait( 1 )
        }
        while ( VAR_GlobBool_230 == 1 ) {
            Wait( 1 )
        }
        set VAR_GlobBool_231 = 1
        break
    case 1:
        RunAnimation( 8387 )
        WaitAnimation(  )
        SetStandAnimation( 6484 )
        WindowSync( 1, 128, 302 )
        set VAR_GlobBool_231 = 1
        break
    case 5:
        WindowSync( 1, 128, 307 )
        set VAR_GlobBool_231 = 1
        break
    case 12:
        RunAnimation( 6482 )
        WaitAnimation(  )
        SetStandAnimation( 2556 )
        set VAR_GlobUInt8_26--
        while ( VAR_GlobUInt8_26 > 0 ) {
            set VAR_GlobBool_230 = 1
            Wait( 1 )
        }
        while ( VAR_GlobBool_230 == 1 ) {
            Wait( 1 )
        }
        set VAR_GlobBool_231 = 1
        break
    case 13:
        RunAnimation( 6489 )
        SetStandAnimation( 6635 )
        WindowAsync( 1, 128, 319 )
        WindowSync( 1, 128, 320 )
        WaitAnimation(  )
        RunAnimation( 6629 )
        SetStandAnimation( 2556 )
        set VAR_GlobBool_231 = 1
        break
    case 15:
        WaitAnimation(  )
        SetObjectFlags( 7 )
        SetPathing( 0 )
        SetWalkSpeed( 45 )
        TimedTurn( Angle(62969, 61115), 16 )
        WaitTurn(  )
        InitWalk(  )
        Walk( -2567, -4421 )
        SetDialogProgression( 0 )
        set Field_MusicVolume = 0
        RunSoundCode2( 34305, 0, 128, Field_MusicVolume )
        set VAR_GlobBool_167 = 0
        if ( 1 ) {
            set VAR_GlobBool_167 = 1
        }
        RunSoundCode2( 38401, 65535, 128, 0 )
        if ( VAR_GlobUInt8_17 == 255 ) {
            set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
        }



------I MODIFIED FROM HERE------



     0xA9( 250 )
        FadeFilter( 6, 64, 0, 255, 255, 255 )
        Wait( 65 )
        MoveInstantXZY( -1707, 0, -3264 )
        TurnInstant( 56 )
        Wait( 75 )
        WindowAsync( 0, 16, 336 )
        RaiseWindows(  )
        WaitWindow( 0 )
        Wait( 25 )
        0xA9( 250 )
        WindowAsync( 0, 16, 337 )
        RaiseWindows(  )
        WaitWindow( 0 )
        Wait( 25 )
        0xA9( 250 )
        WindowAsync( 0, 16, 338 )
        RaiseWindows(  )
        WaitWindow( 0 )
        Wait( 35 )
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }


----------------TO HERE

        0x27( 127 )
        RunSoundCode1( 21761, 65535, 0 )
        RunSoundCode( 8448, 65535 )
        set VAR_GenInt24_64 = 246588L
        set VAR_GenInt16_67 = 64746
        set VAR_GenInt24_69 = 2147483647L
        set World_PlayerAngle = 248
        set General_FieldEntrance = 51
        set VARL_GenBool_753 = 1
        if ( General_ScenarioCounter >= 4600 ) {
            set VARL_GenBool_754 = 1
        }
        if ( VAR_GenUInt8_13 < 9 ) {
            set VAR_GenUInt8_13 = 3
        }
        RunSoundCode1( 20864, 1321, 0 )
        if ( VAR_GenUInt8_14 < 9 ) {
            set VAR_GenUInt8_14 = 3
        }
        RunSoundCode1( 20864, 1322, 0 )
        set General_ScenarioCounter
        set World_MusicVolume = 125
        switchex 2 ( General_FieldEntrance ) {
        case 65 ; 83:
            set World_WhiteTransition = 1
            break
        default:
            set World_WhiteTransition = 0
            break
        }
        if ( General_ScenarioCounter < 5990 ) {
            switch 67 ( General_FieldEntrance ) from 17 {
            case +0 ; +6 ; +7 ; +9 ; +10 ; +11 ; +16 ; +17 ; +21 ; +24 ; +27 ; +29 ; +34 ; +46 ; +47 ; +49 ; +66:
                WorldMap( 9000 )
                break
            case +18 ; +19 ; +25 ; +26 ; +28 ; +30 ; +31 ; +33:
                WorldMap( 9011 )
                break
            case +1 ; +12 ; +13 ; +20:
                WorldMap( 9010 )
                break
            case +50 ; +51 ; +52 ; +53 ; +54 ; +55 ; +56 ; +57 ; +58 ; +59 ; +60 ; +61:
                WorldMap( 9002 )
                break
            case +35:
                WorldMap( 9001 )
                break
            case +45:
                set General_FieldEntrance = 0
                WorldMap( 9009 )
                break
            }
        } else {
            if ( General_ScenarioCounter < 10400 ) {
                if ( ( General_ScenarioCounter >= 9615 ) && ( General_ScenarioCounter <= 9790 ) ) {
                    switchex 4 ( General_FieldEntrance ) {
                    case 7 ; 10 ; 2 ; 83:
                        WorldMap( 9005 )
                        break
                    }
                } else {
                    switch 84 ( General_FieldEntrance ) from 2 {
                    case +0 ; +2 ; +3 ; +4 ; +5 ; +7 ; +8 ; +11 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +18 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +39 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +48 ; +49 ; +54 ; +57 ; +61 ; +62 ; +77 ; +81:
                        WorldMap( 9003 )
                        break
                    case +51:
                        WorldMap( 9004 )
                        break
                    case +52:
                        WorldMap( 9005 )
                        break
                    case +53:
                        WorldMap( 9006 )
                        break
                    case +83:
                        WorldMap( 9012 )
                        break
                    case +60:
                        set General_FieldEntrance = 0
                        WorldMap( 9009 )
                        break
                    }
                }
            } else {
                if ( General_ScenarioCounter < 11090 ) {
                    switch 85 ( General_FieldEntrance ) from 1 {
                    case +0 ; +1 ; +2 ; +4 ; +5 ; +6 ; +7 ; +9 ; +10 ; +11 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +38 ; +39 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +49 ; +50 ; +56 ; +59 ; +62 ; +63 ; +64 ; +79 ; +81 ; +82:
                        WorldMap( 9007 )
                        break
                    case +84:
                        WorldMap( 9012 )
                        break
                    case +61:
                        set General_FieldEntrance = 0
                        WorldMap( 9009 )
                        break
                    }
                } else {
                    switch 85 ( General_FieldEntrance ) from 1 {
                    case +0 ; +1 ; +4 ; +5 ; +6 ; +7 ; +9 ; +12 ; +13 ; +14 ; +15 ; +16 ; +17 ; +19 ; +20 ; +21 ; +22 ; +23 ; +24 ; +25 ; +26 ; +27 ; +28 ; +29 ; +30 ; +31 ; +32 ; +33 ; +34 ; +35 ; +36 ; +37 ; +38 ; +40 ; +41 ; +42 ; +43 ; +44 ; +45 ; +46 ; +47 ; +49 ; +50 ; +57 ; +60 ; +62 ; +63 ; +64 ; +80 ; +82:
                        WorldMap( 9008 )
                        break
                    case +84:
                        WorldMap( 9012 )
                        break
                    case +61:
                        set General_FieldEntrance = 0
                        WorldMap( 9009 )
                        break
                    }
                }
            }
        }
        set VAR_GlobBool_231 = 1
        break
    }
    Wait( 1 )
    loop

Incinerator

  • Crazy poster
  • *
  • Posts: 168
  • Karma: 8
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1508 on: 2019-05-15 20:53:51 »
Guys sorry..I have another problem, and I hope someone of you can help me. Now I've added extra dialogs on Burmecia field, before Cleyra..but for some reason, when it goes on World Map it happens something like..that?

Spoiler: show


So what happened? What's the problem?

I've experienced this glitch on to many times!. Not sure what causes this to happen, but it certainly is affected by modifying or adding certain functions in certain fields of the game!. This happened also if done on Madain Sari Disc 2 after recruiting Amarant and heading to the Iifa Tree.

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1509 on: 2019-05-16 12:17:37 »
Aw man..now how can I solve? I've tried to copypaste back the original code but it still happen and I really don't know what to do! :(

Tirlititi

  • Freak
  • *
  • Posts: 590
  • Karma: 78
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1510 on: 2019-05-16 21:50:18 »
About a character following another one, you should look at the script of Beatrix in Alexandria and inspire yourself from that.
The important code is this loop:
Code: [Select]
        while ( 1 ) {
            if ( Distance(GetEntryPosX(250), GetEntryPosY(250)) > 640 ) { // Entry 250 is the player's character
                while ( ( Distance(GetEntryPosX(250), GetEntryPosY(250)) > 500 ) && ( ( IsMovementEnabled == 1 ) || ( VAR_GlobUInt8_33 == 1 ) ) ) {
                    SetObjectFlags( 5 )
                    SetWalkSpeed( 45 )
                    if ( Distance(GetEntryPosX(250), GetEntryPosY(250)) > 1000 ) {
                        SetWalkSpeed( 60 )
                    }
                    InitWalk(  )
                    MakeAnimationLoop( 1 )
                    Walk( GetEntryPosX(250), GetEntryPosY(250) )
                }
                if ( IsMovementEnabled == 0 ) {
                    Wait( 1 )
                }
            } else {
                Wait( 10 )
                if ( ( Distance(GetEntryPosX(250), GetEntryPosY(250)) > 640 ) && ( ( IsMovementEnabled == 1 ) || ( VAR_GlobUInt8_33 == 1 ) ) ) {
                    TurnTowardObject( 250, 32 )
                    WaitTurn(  )
                }
            }
        }

About the victory pose, it's the script code 0xDB (I just learnt that).
"0xDB(0, 1)" enables the victory pose of Zidane.
"0xDB(0, 0)" disables the victory pose of Zidane.

I have to reinstall things to test for separating the slots of Eiko and Marcus. Too bad it's not working for you, TheHobgoblin, you seemed to do things pretty well.

About the menu's UI size, you can try to edit the C# source code of the menu and use something like that:
Code: [Select]
this.SubMenuPanel.transform.localScale = new Vector3(1.2f, 1.0f, 1.0f);This would go in the method "MainMenuUI::Awake" (at the beginning, that's fine). I am not sure if it will work though, as UI modding is not something I know a lot about (and some informations are stored in GameObject and Transform files in the archives level1 and level2). Try to play with the figures here if you see that it has an effect.

About the item limit in shops, I'm not sure of what is wrong... That might have been broken because of a Steam update a long time ago?
Anyway, you can change the sold items in shops by modifying the C# code (using dnSpy). It's the field "FF9/ff9buy::_FF9Buy_Data" (it consists of a list of item IDs either of maximum size 32 or ended by the null item 255).

About the Android version, there are a lot of things in common, provided that you can unpack the .obb archives (I don't remember how to do that). For instance, the "sharedassets" archives (yes, that's archives inside other archives... I don't chose the rules) is in the folder "assets\bin\Data" and the engine's source code is in "assets\bin\Data\Managed\Assembly-CSharp.dll".
There should also be "a0dataXXX.bin" equivalents of the Steam's "p0dataXXX.bin" somewhere... This prefix is "i" for iOS and I don't know if the PS4 and Switch versions have different formats.
The class "AssetManagerUtil" shows how different versions are handled. I don't think that the difference between the platforms are so big, but they may be non-trivial.
In any case, it would require some (a lot?) of work to mod the other versions, both for updating HW and for converting the non-PC games to suitable files.

About the list of abilities, all the characters have exactly the same number of (learnable spells + supporting abilities).
The only way to add more spells (= active abilities) without changing a lot of the game's engine is to remove supporting abilities to counter-balance. It's in the "Party -> Stats" panel.

About modifying the animations, you should try using the Unity Assets Viewer: it allows to export animated 3D models (most of them are in the archive p0data4). Unfortunatly, re-importing a modified 3D model bugs and is hardly working at all. However, for modifying the animations only, it should be working. Follow the tutorial there and make sure that the option "Automatically Convert 3D Models -> Import Meshes/Materials" is disabled.

About the eyes animations (both for the characters and for the last battle's structure), it's a bugging feature of the Steam port. I don't know what happened but they apparently rewrote this part of the source code and it's not doing the same as the PSX version. I've no idea of how to fix it. There may also be a problem when the textures are upscaled, as Incinerator says (I've not done any test about that).

About the World Map bug, it's a bug of Hades Workshop, explained here. Sorry about that. The good thing is that it is fairly easy to fix (your mod files are not corrupted or anything).

Sorry answering so late.
Thanks a lot for answering each other.

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1511 on: 2019-05-16 22:05:10 »
Thank YOU for all the replies Tirlititi! Tomorrow I check


eugene9

  • Fast newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1512 on: 2019-05-17 00:55:14 »

About modifying the animations, you should try using the Unity Assets Viewer: it allows to export animated 3D models (most of them are in the archive p0data4). Unfortunatly, re-importing a modified 3D model bugs and is hardly working at all. However, for modifying the animations only, it should be working. Follow the tutorial there and make sure that the option "Automatically Convert 3D Models -> Import Meshes/Materials" is disabled.


Thank you very much for all your help. But unfortunately, I'm very clumsy in terms of modding. I have tried to do all what your told me (and what I have read in your previous posts) but without success... If you don't mind, could you tell me, step by step, how I could change Zidane's battle animation like his pose, attack and casting by any other character's? I mean, a guide for slow learners like me to follow. Thanks in advance and sorry for being an annoyance.
« Last Edit: 2019-05-17 10:51:31 by eugene9 »

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1513 on: 2019-05-18 16:22:46 »
Thank YOU for all the replies Tirlititi! Tomorrow I check

Ok, the problem on World Map was solved..thank you so much!

Now I'm testing the "following character" thing on Burmesia and..seem to work perfectly! I have Freya that follows Zidane and it's...awesome. But I have a problem on the first part.

At the start of Burmesia there's a looping part where Freya, Zidane etc talking to each other... in this case, where I have to put that code for Freya? Thank you and anyone for the reply!
« Last Edit: 2019-05-18 16:28:13 by ToraCarol »

Tirlititi

  • Freak
  • *
  • Posts: 590
  • Karma: 78
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1514 on: 2019-05-19 19:06:27 »
@eugene9: Ah, I didn't understand exactly what you wanted.
I still don't really do. In most cases, you can't just "make someone uses someone else's animation". For instance, Zidane as a tail, not Steiner, so there's no way to use the animations of Zidane for someone who doesn't have a tail and vice versa... most of the time.

What you can try to do, using the Unity Assets Viewer:
1) In Hades Workshop, open "Tools -> Unity Assets Viewer", then "File -> Open -> FF9_Launcher.exe",
2) Then "Archive -> Streaming Assets -> p0data5" ; you should see a bunch of animation files appearing,
3) Select the animation you want to replace (you can sort the list by the "File Name" to have them grouped by models or by "Infos" to have them grouped by animation name), then "Right click -> Export Selection",
4) Select the animation by which you want to replace the previous one (let's call them A1 and A2: you want to replace A1 by A2) and "Right click -> Export Selection",
5) In the folder of FF9, there should now be a folder called "HadesWorkshopAssets" that contain the two files you just exported,
6) Copy A2 inside the folder of A1 and then rename it to replace it (give to A2 the name of A1),
7) Back in the Unity Assets Viewer, select A1 and "Right click -> Import Selection",
8‌) Done: the animation file has been replaced in the game's archive (if you have several copies of the game, the archive updated is the one corresponding to the "FF9_Launcher.exe" that you opened).

However, as I said, you will likely have bugs and non-working animations... But there might be a few animations that can be compatible with 3D models they were not meant for... if you're lucky.

@ToraCarol: You can put the "Freya follows Zidane" code in a new function with a high function code (let's say "Function Freya_20" if it doesn't exist already) and add the line "RunScriptAsync( 2, 255, 20 )" inside the "Freya_Init" function (replace 20 by your function code if needed).
This way, it won't mess with the "Freya_Loop" function. The condition "IsMovementEnabled" in the code I showed should be enough to disable that feature during cutscenes.
You may want to add a "return" line after the end of the "while ( 1 )" loop even though that shouldn't be problematic (I think I added a warning if there's no "return" or "loop" line when you parse).

eugene9

  • Fast newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1515 on: 2019-05-19 19:46:39 »
@eugene9: Ah, I didn't understand exactly what you wanted.
I still don't really do. In most cases, you can't just "make someone uses someone else's animation". For instance, Zidane as a tail, not Steiner, so there's no way to use the animations of Zidane for someone who doesn't have a tail and vice versa... most of the time.

What you can try to do, using the Unity Assets Viewer:
1) In Hades Workshop, open "Tools -> Unity Assets Viewer", then "File -> Open -> FF9_Launcher.exe",
2) Then "Archive -> Streaming Assets -> p0data5" ; you should see a bunch of animation files appearing,
3) Select the animation you want to replace (you can sort the list by the "File Name" to have them grouped by models or by "Infos" to have them grouped by animation name), then "Right click -> Export Selection",
4) Select the animation by which you want to replace the previous one (let's call them A1 and A2: you want to replace A1 by A2) and "Right click -> Export Selection",
5) In the folder of FF9, there should now be a folder called "HadesWorkshopAssets" that contain the two files you just exported,
6) Copy A2 inside the folder of A1 and then rename it to replace it (give to A2 the name of A1),
7) Back in the Unity Assets Viewer, select A1 and "Right click -> Import Selection",
8‌) Done: the animation file has been replaced in the game's archive (if you have several copies of the game, the archive updated is the one corresponding to the "FF9_Launcher.exe" that you opened).

However, as I said, you will likely have bugs and non-working animations... But there might be a few animations that can be compatible with 3D models they were not meant for... if you're lucky.


Sorry for being an annoyance, but the option "Import selection" remains unavailable even after I have renamed the archive the way you told me. I don't know what I'm doing wrong. Possibly... do I need to rename also the folder? Do I need to reload ("F5") the  Unity Asser Viewer?
« Last Edit: 2019-05-19 19:48:26 by eugene9 »

Tirlititi

  • Freak
  • *
  • Posts: 590
  • Karma: 78
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1516 on: 2019-05-19 19:51:05 »
You must not have the game's files opened in the main frame of Hades Workshop (the tool should have poped up a warning about that).
Close the main frame and the importation will get available.

eugene9

  • Fast newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1517 on: 2019-05-19 20:38:49 »
You must not have the game's files opened in the main frame of Hades Workshop (the tool should have poped up a warning about that).
Close the main frame and the importation will get available.

Ooops! my bad!!! thank you for your help :). And what about changing Zidane's model for his trance model?
EDIT: I don't get animations working, everytime I try to swap characters' battle animation they remain in T pose.
« Last Edit: 2019-05-19 22:33:40 by eugene9 »

ToraCarol

  • Crazy poster
  • *
  • Posts: 116
  • Karma: 11
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1518 on: 2019-05-20 14:16:39 »
Quote
@ToraCarol: You can put the "Freya follows Zidane" code in a new function with a high function code (let's say "Function Freya_20" if it doesn't exist already) and add the line "RunScriptAsync( 2, 255, 20 )" inside the "Freya_Init" function (replace 20 by your function code if needed).
This way, it won't mess with the "Freya_Loop" function. The condition "IsMovementEnabled" in the code I showed should be enough to disable that feature during cutscenes.
You may want to add a "return" line after the end of the "while ( 1 )" loop even though that shouldn't be problematic (I think I added a warning if there's no "return" or "loop" line when you parse).

Thank you as always, it works great!  One last question for now about the "following" thing, when I'm going from one Field to another it happens that Zidane keeps to run through the new field as he have to do, but Freya, instead, stops suddenly and waits in that field (anyway she appears back in the new field, obviously) ..so, how can I do to let Freya follow Zidane? Hope I explained well
« Last Edit: 2019-05-20 15:38:17 by ToraCarol »

Tirlititi

  • Freak
  • *
  • Posts: 590
  • Karma: 78
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1519 on: 2019-05-20 18:25:42 »
@eugene9: I warned you it wouldn't work for most animation swaps... Since the animation is not fitted to the model, no animation is played.

@ToraCarol: It's also the same "IsMovementEnabled" check. Since you don't have the control during the transition, the script stops.
I would say, the best is to add this line in the field transition script ("RegionX_Range" most of the time):
Code: [Select]
set VAR_GlobBool_247 = 1And in the following loop:
Code: [Select]
if ((IsMovementEnabled == 0) && VAR_GlobBool_247) {
    InitWalk(  )
    Walk( GetFieldExitX, GetFieldExitY )
    return
}
"VAR_GlobBool_247" is the last bit of the last global variable and thus is the least often used. It is not used in any script of Burmecia but it is used at some other place (in those places, one can use "VAR_GlobBool_0" because the first 8 bytes are always used for the placing of the objects (VAR_GlobInt16_0, etc...) but then it needs to be re-initialized to 0 in the "Main_Init" script after the placing of all the objects).

Incinerator

  • Crazy poster
  • *
  • Posts: 168
  • Karma: 8
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1520 on: 2019-05-20 19:24:28 »
Ooops! my bad!!! thank you for your help :). And what about changing Zidane's model for his trance model?
EDIT: I don't get animations working, everytime I try to swap characters' battle animation they remain in T pose.

Tirlititi has a mod for trance models defaults!.
https://www.dropbox.com/sh/ac7sr4q3z2cx9vp/AACQDfqXPvn8c3ylXeGUrBKEa?dl=0&preview=PC_AlwaysTranceMod.zip

it sets all characters on trance model but can be edited with the provided .hws!.


eugene9

  • Fast newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1521 on: 2019-05-20 19:40:43 »
Tirlititi has a mod for trance models defaults!.
https://www.dropbox.com/sh/ac7sr4q3z2cx9vp/AACQDfqXPvn8c3ylXeGUrBKEa?dl=0&preview=PC_AlwaysTranceMod.zip

it sets all characters on trance model but can be edited with the provided .hws!.
First things first. Thank you all for your help and instructions! I'm very glad to see how supportive this community is :).  I know that mod, and I have used it. But the problem is that it sets all characters into their trance model, I only wnat it for Zidane. Evenmore, I don't know why, but when casting spells with that mod on, there is always a kind of shadow shilouette behind the spellcaster which looks quite weird.

TheHobgoblin

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 2
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1522 on: 2019-05-20 20:37:10 »
Tirlititi has a mod for trance models defaults!.
https://www.dropbox.com/sh/ac7sr4q3z2cx9vp/AACQDfqXPvn8c3ylXeGUrBKEa?dl=0&preview=PC_AlwaysTranceMod.zip

it sets all characters on trance model but can be edited with the provided .hws!.

I don't suppose this could be used to add trance skins to Beatrix, Marcus, Blank and Cinna and an animation to change into them. Or, perhaps rather, allow them to have a "trance mode" without actually shifting to a new model.

As things are now, the game will crash if they are given a trance bar and it becomes full because the animation/skin is missing from those models.

And the only way I can think of a work around would be to edit the action for what happens when trance happens is so that instead of doing the animation to shift into their trance model, to make it so that all characters maybe just do their victory pose instead. So then none of the characters ever use their trance modes. I am not even sure if that would work, but I imagine it might.

And, honestly, not using the second skin for any of the characters is fine for me. Final Fantasy 7 didn't need its characters to mutate into weird super saiyajin versions of themselves for the round they had trance after all.

But-- still-- I might decide I want to try to make a trance skin for Marcus eventually if I can get him working without eliminating Eiko from the game.

Tirlititi

  • Freak
  • *
  • Posts: 590
  • Karma: 78
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1523 on: 2019-05-20 23:31:23 »
Here is how it works. It's pretty simple:
1) In the class "btl_init", the array "model_id" contains the list of the player character's models:
Code: [Select]
Zidane (2 of them),
Vivi,
Dagger (4 of them),
Steiner (2 of them),
Quina,
Eiko (2 of them),
Freya,
Amarant,
Cinna,
Marcus,
Blank (2 of them),
Beatrix,
Zidane Trance (that's the 20th, at index 19 and there are 2 of them just like the regular),
Vivi Trance,
etc...
up to Amarant Trance.
Which makes a list of size 19 (regular) + 14 (trance) = 33 models.
These are different model names but I think that they mostly use the same mesh files and the different names are meant to link to different animations (but I'm not sure, that's what I remember about). Anyway, the duplicates are because of the different fighting stances when using, for example, thief daggers or thief swords. Dagger also has her long/short hair versions.
About Steiner, I think the difference has to do with a flag that can be activated in the "Battle" and "BattleEx" script codes, but it's a dummied feature and never actually used.

2) The methods "BattlePlayerCharacter::CreateTranceModel" and "btl_init::SetBattleModel" setup the models at the start of the battle. They create both a regular and a trance model/skin for those who have it and hide the trance version. The condition is simply "if ((int)(serialNumber + 19) < btl_init.model_id.Length) // add a trance version" for both methods.
Note that there is a duplicate of the regular model list, "BattlePlayerCharacter::PlayerModelFileName" for some impractical reason. The lists used are thus:
- "BattlePlayerCharacter::PlayerModelFileName" for the regular model and "btl_init::model_id" for its skin (geotexanim),
- "btl_init::model_id" for the trance model and its skin.

3) When creating a trance model, the animations are entirely taken from the regular model so you don't need to care about it (but the trance model has to have exactly the same bone hierarchy as the regular one). I suppose that there is no problem in taking the same "geotexanim" as the regular one or even don't use geotexanim at all (I don't really see a texture animation on battle models, except the trance glowing but that's handled automatically elsewhere).

4) In HW's "Party -> Stats" panel, there's some setting to do in order to have a proper trance command.

5) Characters have a trance gauge if they are not setup with category "temporary character" in the script code initializing them ("SetCharacterData"). Also, trance gauge is disabled early game and for Dagger when she's depressed.

In conclusion
In order to add a properly working trance to Blank, Cinna, Marcus or Beatrix, you need to do 3 things:
• In HW, setup a trance command for the character (define it in the panel "Party -> Commands" and give it to the character "Party -> Stats"; remind that Beatrix has 2 ability sets),
• In HW, remove the "Temporary Character" category of the character(s) you want to give trance to. It's in the "Environment -> Fields" scripts, when the characters join the team, there are lines "SetCharacterData" to tweak a bit. For instance, Beatrix's character data is initialized twice:
-- in the script "A. Castle/Queen’s Chamber" (one of them anyway, there are several ones... the good one has "Bandersnatch" functions in its script), whithin the function "Beatrix_Loop", there's a line "SetCharacterData( 8, 1, 11, 22, 14 )" near 4/5 of the function.
-- in the script "Alexandria/Square" (the one at night), whithin the function "Steiner_Init", there's a line "SetCharacterData( 8, 1, 13, 22, 15 )". In both cases, the change should be replacing the argument "22" by a "6" to remove the "Temporary Character" category.
• In dnSpy, append 5 lines to "btl_init::model_id" by giving trance models.
-- Either use the exact same models as the regulars (ie. append "GEO_MAIN_B0_013", "GEO_MAIN_B0_014", "GEO_MAIN_B0_015", "GEO_MAIN_B0_016" and "GEO_MAIN_B0_017" to the list): the only difference will be the glowing,
-- Or use another existing model and the same bone hierarchy (the correspondances between "model name" and "model numerical ID" is in the dictionary "FF9BattleDB::GEO"),
-- Or find a way to import a workable new model with the right bone hierarchy and register it in both "FF9BattleDB::GEO" and "btl_init::model_id". I have been unsuccessful to import a workable model, as the files added to the archives require a lot of registering and linkage and I apparently miss some (I don't remember if I successfully imported a new texture with the Unity Assets Viewer...).
« Last Edit: 2019-07-07 04:39:18 by Tirlititi »

Incinerator

  • Crazy poster
  • *
  • Posts: 168
  • Karma: 8
  • I’d rather have 1 real friend than a thousand fake
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1524 on: 2019-05-21 00:31:39 »
Tirlititi a new model being replaced/added is not limited to a certain poly amount right? I insured the model has the same bone hierarchy as original and model showed invisible in game!. My model has ~117289 polys. ~88790 without spline patches.