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

ToraCarol

  • Crazy poster
  • *
  • Posts: 112
  • Karma: 7
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1550 on: 2019-06-11 10:19:32 »
Marcus's model might not have a jump animation as I don't think there is any point in the story that he jumps.
This sounds like the model moving, trying to execute an animation that doesn't exist, so instead doesn't do anything for the duration that the animation is meant to happen and then returning to the normal state.

Yeah, I think so too..so what's Jump3 stands for?  :| Probably nothing of what I used to think!

Tirlititi

  • Freak
  • *
  • Posts: 582
  • Karma: 73
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1551 on: 2019-06-11 14:30:35 »
@masagrator: Yes, that's a problem happening because of the Steam version.
Basically, they used a weird alpha channel for rendering the edges of the tiles while it was a "completly opaque/completly transparent" alternative in the PSX format.
The shift on the carpet (wow, I had a hard time seeing it even with your mark...) surely comes from the way they upscaled the images for the Steam version (because it's not a tile edge).
Fragosso knows better than me this kind of things...

@ToraCarol: There should not be any "return" line if the first "if" block that you show.
The problem with the jump animation is more likely to be the one described here. You need to use this jump animation before in the script to let the game load it (using "SetRightAnimation( 5041 )" just before "SetRightAnimation( 5224 )" is enough).
Emulating a "Change disc" screen requires modding the C# code and adding new assets (textures) to the game. I don't know if it can work, sorry.
You may more easily add a "Would you like to save?" screen, as it can simply be emulated with a dialog box... but I can understand that it's not what you want.

ToraCarol

  • Crazy poster
  • *
  • Posts: 112
  • Karma: 7
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1552 on: 2019-06-11 15:28:32 »
Quote
@ToraCarol: There should not be any "return" line if the first "if" block that you show.

The problem with the jump animation is more likely to be the one described here. You need to use this jump animation before in the script to let the game load it (using "SetRightAnimation( 5041 )" just before "SetRightAnimation( 5224 )" is enough).

Emulating a "Change disc" screen requires modding the C# code and adding new assets (textures) to the game. I don't know if it can work, sorry.
You may more easily add a "Would you like to save?" screen, as it can simply be emulated with a dialog box... but I can understand that it's not what you want.

Thank you for all you replies, as always.
I was already thinking of adding a dialog box, but I was hoping that somebody has an idea of how to emulate this thing, because as I said i'm not good on C# code an stuff... but it's ok anyway! Let's hope someone someday will find a way! For now i'll just add a dialog box!
« Last Edit: 2019-06-11 15:42:26 by ToraCarol »

ToraCarol

  • Crazy poster
  • *
  • Posts: 112
  • Karma: 7
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1553 on: 2019-06-15 16:06:21 »
I fixed the "following Character" and Marcus thing..thanks a bunch!


1) About the save dialog box, you know guys where can i put it between the Disc 1 and 2? Is kinda complicated because there's a cinematic/unexisting field and the Borden field without any particular main loop..and I don't know where to put properly without mess everything! :|

2) Also, have you find a way to solve this,Tirlititi? I've tried with "Raise Windows" but for some reason it seem to not work!

Spoiler: show


3) Last but not least, what about if I want to set in a "Trance Mode at start of the battle" other characters instead only Zidane, Steiner and Vivi? It's possible?
 I know there is something that enables "Trance Mode" in the main enemy attacks, is it correct?

UPDATE:

I've tried to make something new, so now I want to add a cutscene on Lindblum Castle (between the Cid becomes a Frog event and the reunion), so I've tried to read your threads, plus the one from the evil forest you've teached me. I've set all the variables and I've also added the "general fieldentrance=10"

For some reason, I don't know why,the field where I want to intervent (the Linblum hall, near the guest room) continues in an infinite loop of fade in and out (field and music too)..for example,if I have to go trough the guest room it happens this, if I've found all the potions, I have to go back to Cid and I try to go on this field it brings me back on the "Wuei and Garl event" (the one after the Freya cutscene

So..what's wrong? Is the loop code?

Code: [Select]
Function Main_Loop
             
    if ( General_FieldEntrance == 32 ) {
        RunScriptSync( 6, 17, 11 )
        RunScriptSync( 6, 3, 11 )
        RunScriptSync( 6, 4, 11 )
        RunScriptSync( 6, 17, 12 )
        RunScriptSync( 6, 3, 12 )
        RunScriptSync( 6, 4, 12 )
        RunScriptSync( 6, 17, 13 )
        RunScriptSync( 6, 4, 13 )
        RunScriptSync( 6, 3, 13 )
        RunScriptSync( 6, 17, 14 )
        RunScriptSync( 6, 3, 14 )
        RunScriptSync( 6, 4, 14 )
        RunScriptSync( 6, 17, 15 )
        RunScriptSync( 6, 4, 15 )
        RunScriptSync( 6, 3, 15 )
        RunScriptSync( 6, 17, 16 )
        set Field_MusicVolume = 0
        RunSoundCode2( 34305, 0, 48, Field_MusicVolume )
        set VAR_GlobBool_167 = 0
        if ( 1 ) {
            set VAR_GlobBool_167 = 1
        }
        set VARL_GenBool_3619 = 1
    }
   

    switchex 9 ( VAR_GenInt16_239 ) {
    case 2161:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }



   -----------------------HERE I ADDED MY PART-----------------
         
          if ( ( VARL_GenBool_8000 == 1 ) && ( General_FieldEntrance == 10 ) ) {
            RunScriptSync( 6, 15, 11 )
            RunScriptSync( 6, 20, 11 )
            RunScriptSync( 6, 20, 12 )
            RunScriptSync( 6, 15, 13 )
            RunScriptSync( 6, 20, 13 )
            RunScriptSync( 6, 15, 14 )
            Wait( 5 )
            RunScriptSync( 6, 19, 11 )
            RunScriptAsync( 6, 20, 14 )
            RunScriptAsync( 6, 15, 15 )
            RunScriptSync( 6, 19, 12 )
            RunScriptSync( 6, 19, 13 )
            RunScriptSync( 6, 15, 16 )
            RunScriptSync( 6, 15, 17 )
            Wait( 5 )
            RunScriptSync( 6, 15, 18 )
            Wait( 5 )
            RunScriptSync( 6, 19, 14 )
            RunScriptAsync( 6, 20, 15 )
            Wait( 5 )
            TerminateEntry( 15 )
            TerminateEntry( 19 )
            Wait( 10 )
            RunScriptSync( 6, 20, 16 )
            set VARL_GenBool_8000 = 0
            set General_FieldEntrance = 32
            Field( 2169 )
            TerminateEntry( 20 )
        }

------------------------HERE MY PART IS FINISHING---------------------
       
        0x27( 127 )
        PreloadField( 5, 2161 )
        set VAR_GlobInt16_21 = 2161
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2161 )
    case 2163:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2163 )
        set VAR_GlobInt16_21 = 2163
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2163 )
    case 2172:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2172 )
        set VAR_GlobInt16_21 = 2172
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2172 )
    case 2162:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2162 )
        set VAR_GlobInt16_21 = 2162
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2162 )
    case 2169:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2169 )
        set VAR_GlobInt16_21 = 2169
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2169 )
    case 2170:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2170 )
        set VAR_GlobInt16_21 = 2170
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2170 )
    case 2168:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2168 )
        set VAR_GlobInt16_21 = 2168
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2168 )
    case 2113:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2113 )
        set VAR_GlobInt16_21 = 2113
        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_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 55
        Field( 2113 )
    case 2173:
        set VAR_GlobBool_158 = 0
        if ( VAR_GlobBool_159 == 1 ) {
            DisableMove(  )
            if ( VAR_GlobBool_144 == 0 ) {
                DisableMenu(  )
            } else {
                Wait( 1 )
            }
        }
        0x27( 127 )
        PreloadField( 5, 2855 )
        set VAR_GlobInt16_21 = 2855
        if ( VAR_GlobUInt8_17 == 255 ) {
            set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
        }
        0xA9( 250 )
        FadeFilter( 6, 64, VAR_GlobUInt8_17, 255, 255, 255 )
        Wait( 65 )
        if ( VAR_GlobBool_167 == 1 ) {
            RunSoundCode( 265, 65535 )
            set VAR_GlobBool_167 = 0
        }
        if ( VAR_GlobBool_162 == 0 ) {
        }
        if ( VAR_GlobBool_163 == 0 ) {
        }
        set General_FieldEntrance = 0
        Field( 2855 )
    }
    return
« Last Edit: Today at 11:18:55 by ToraCarol »

Satoh

  • Insane poster
  • *
  • Posts: 386
  • Karma: 4
  • Assuming this statement is correct, I'm alive.
    • View Profile
Re: [PSX/PC] General editor - Hades Workshop (0.40b)
« Reply #1554 on: Today at 01:48:35 »
[...]
3) Last but not least, what about if I want to set in a "Trance Mode at start of the battle" other characters instead only Zidane, Steiner and Vivi? It's possible?
 I know there is something that enables "Trance Mode" in the main enemy attacks, is it correct?
[...]
Prison Cage; Garnet battle does this.
It has an attack that fills the Trance meter. It may be a different name in later versions of HW, but in version 0.38 its called Transfer.
in that fight there are a few important things that happen related to the trance bar filling. I'll try to show each of the important parts of the code. You can load the battle up yourself if you want to compare.

Code: [Select]
Function Main_Init
    if ( IsBattleInitialized ) {
        CloseAllWindows(  )
        Wait( 5 )
        TerminateBattle(  )
    } else {
        set SV_EnemyTeam[ATB] =$ FirstOf(SV_EnemyTeam[MAX_ATB])
        set #( VAR_GlobUInt16_33 = ( SV_PlayerTeam[MODEL_TYPE] ==$ 0 ) )
        set #( VAR_GlobUInt16_33 |= ( SV_PlayerTeam[MODEL_TYPE] ==$ 1 ) )
    }
    return
The first check is to see if battle has ended already, that seems to be normal for most battles. Then at [else] there are some commands and one of them is setting the enemy's ATB to the MAX_ATB of the first enemy. Tirlititi will have to explain how the list assignments work because I don't fully understand them, but I know that's what's happening in that line anyway.
Next we have a variable that is looking for Zidane's dagger animation model, and one that's looking for his thief sword animation model, and setting the party slot either of them is in, to VAR_GlobUInt16_33. The code does this twice for unknown reasons, the second time fully overwriting the first one.
(if you want to change this to a random party member you can change it to this
Code: [Select]
set #( VAR_GlobUInt16_33 = RandomInTeam(SV_PlayerTeam) )now, this variable is important for later, because in that fight ONLY Zidane is supposed to start with Trance, and the game needs to know which party slot he's in, in order to target him. (the battle also tracks all the other characters this way too so there is a variable for each specific character you might want to target)

Next since we already set Prison Cage to have full ATB at the start, we have the Prison Cage ATB code (I've again removed some code not related to Trance):
Code: [Select]
Function Prison_Cage_ATB
    if ( !VAR_LocUInt8_3 ) {
        set VAR_LocUInt8_3 = 1
        set #( SV_Target = VAR_GlobUInt16_33 )
        Attack( 8 )
        return
    }
    return
VAR_LocUInt8_3 is for tracking the cutscene progression for Zidane and Steiner explaining what Trance is. To begin with, its not set, so the battle checks if it doesn't exist yet (it doesn't) and then it sets it to 1, sets the SV_Target variable to the VAR_GlobUInt16_33, which it previously set as the party slot for Zidane, so now the next attack to execute will hit Zidane. Finally, it executes Attack( 8 ) which in this battle is Transfer, which fills up a character's Trance meter completely, and then returns out of the [if] and then processes some other things I removed for brevity, and then returns again to allow the game to continue into the next cycle.

If you wanted to change the character to say, Freya, in the prison cage fight, the game locates her model and stores it in VAR_GlobUInt16_45 using this code
Code: [Select]
        set #( VAR_GlobUInt16_45 = ( SV_PlayerTeam[MODEL_TYPE] ==$ 12 ) ) just like it did for Zidane in UInt16_33
A full list of character models can be seen in the Function List, under Var Code > [DATA ACCESS]
Code: [Select]
[MODEL_TYPE]
Zidane : 0 or 1
Vivi : 2
Dagger : 3, 4, 5 or 6
Steiner : 7 or 8
Quina : 9
Eiko : 10 or 11
Freya : 12
Amarant : 13
Cinna : 14
Marcus : 15
Blank : 16 or 17
Beatrix : 18

Note, that if the character you want to target is not in the battle, the code may freeze while it looks for that character specifically, or it may skip right over the Transfer attack completely. I don't know the exact effects, but if the variables aren't set correctly in the PSX version, the battle will just stall as the game tries to attack something that doesn't exist. Tirlititi may have advice on doing other things with targetting.

Battle code is all pretty new to me, but I did just look into this last night, ironically, so I figured I'd explain what I already figured out.
« Last Edit: Today at 02:03:10 by Satoh »