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

usb

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1025 on: 2018-03-05 11:57:11 »
Thanks usb :)
Yeah, I thought that they fixed that bug, but apparently not. It doesn't concern only Italian but also French and Spanish. The bug lies in the CIL method "BattleHUD::SetBattleCommandTitle" but it's a bit tricky to fix it there with HW.

What you can do though is bypass the bug: go to the "Interface" panel, select the "Battle Spell Naming" field and add 13 entries to it (right-click -> Add), then write the proper full names ("Colpo Fire" etc...). Finally, go to the "Party -> Spells" panel and change the casting names of the magic swords spells to the entries that you just added.
It's a bit dirty as a fix, but it works. You should also translate the names in the "Interface" panel if you want it to work for all the languages (I think the game would crash in non-italian language otherwise).

For info, you can have up to 62 custom spell names in that interface field.

thank you for your reply... I'll try as soon as possible.

update:
change the casting names of the magic swords spells to the entries that you just added
under spells panel there are only the basic magic and not the magic swords (they are under special). if i change the vivi magic when Vivi cast Fire magic it will be shown as Colpo Fire but the magic sword is still wrong

For the "Interface" panel, in localization entry, there is this strange behavior (if it is supposed to be ok it can be ignored):
Select italian language > german text
Select spanish language > italian text
Select german language > spanish text
Select french language > french text
In hades 0.39b
« Last Edit: 2018-03-05 12:14:41 by usb »

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1026 on: 2018-03-05 12:40:15 »
About the "Spells" panel: yes, the Magic Swords are in there as well, but they are spread around. Most of them are next to Dagger's summons and Flare/Doomsday are at the end of the list.

About the "Localization" field, yes I noticed that. As strange as it appears, it's not a bug from HW but that's how the latest Steam version texts are (they were correctly set in the previous Steam versions). Don't bother.

usb

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1027 on: 2018-03-05 12:53:49 »
About the "Spells" panel: yes, the Magic Swords are in there as well, but they are spread around. Most of them are next to Dagger's summons and Flare/Doomsday are at the end of the list.

About the "Localization" field, yes I noticed that. As strange as it appears, it's not a bug from HW but that's how the latest Steam version texts are (they were correctly set in the previous Steam versions). Don't bother.

wow.. you're right. I didn't notice at all. Changed in english and I easly found. Thank you very much for you'ra patience.

Lyrithus

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1028 on: 2018-03-12 19:08:26 »
I was hoping I could find a few resources. I'm looking for a list of CIL methods with definitions. For example, I found in this thread that "CalcSub_203" is the CIL method for "Physical Strike". I'd like to know what the other definitions are for the rest of the "CalcSub".

Couple things that would be handy:
The ability to import/export lists of new CIL methods for a specific CIL class. For example:

If I had a file that contained a list of Customized CIL methods ("SubCalc_100" through "SubCalc_525") for "btl_calc", I could upload that as a sub mod that could be imported by HW.

aidolu12

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1029 on: 2018-03-17 19:42:47 »
Hi Tirlititi, hope you are doing great, once again thank you for working on this tool! have been wonderful.

May I ask, since you told me to check the CIL codes to modify some parts of the game engine results (not sure how to put that), have been quite difficult for me to understand the language, even though I got a little bit more use to it.

I wanted to ask, and I am quite sure will be possible, but not sure how to put it inside the coding. Can the party HP and MP be recovered after a battle? or 25% of current hp and mp? If anybody know how to put it, will be awesome for letting me know.

Gordo98

  • Fast newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1030 on: 2018-03-19 21:04:57 »
This tool looks really cool just from browsing it for awhile but I want to ask; Will editing AI for someone who has no experience in coding whatsoever be a challenge for me and I guess a random question but am I able to make Protect, Shell, Haste and Regen last longer? Imo they don't last long enough in this game to make them useful.

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1031 on: 2018-03-20 21:56:46 »
@aidolu12: Yes, it's extremely difficult to do CIL changes by only looking at the CIL code. It's way better to look at the C# code to at least understand how the engine works before guessing how you can tweak it (it requires reading C# but that's always better than CIL).
You can see the C# code in Memoria's Github page, or using a tool like dnSpy or dotPeek.

For your particular question, it's not particulary easy in CIL, but you might change the method "BattleHUD::GoToBattleResult" and add this kind of lines:
Code: [Select]
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
ldfld 0x4000809 // POINTS::hp
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x4000229 // BTL_DATA::max
ldfld 0x4000809 // POINTS::hp
ldc.i4.4
div
add
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
stfld 0x4000809 // POINTS::hp
This only restores 25% of max HP of the 1st character only (and doesn't even check if it goes over the max HP limit)...
Best is to use Memoria for that and add these lines instead, since you can surely use local variables when replacing C# code:
Code: [Select]
for (BTL_DATA next = FF9StateSystem.Battle.FF9Battle.btl_list.next; next != null; next = next.next)
if (next.bi.player != 0 && next.cur.hp>0)
next.cur.hp = min(next.cur.hp + next.max.hp / 4, next.max.hp);
Much simpler indeed ^^'

@Gordo98: What you want to do is not related to AI but to the battle system, so CIL code or C# again :/
And increasing the duration of status effects is not possible with HW, as explained here. The best you can do is to change the tick for poison/venom/regen.

Gordo98

  • Fast newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1032 on: 2018-03-20 23:51:07 »
@Tirlititi guess I’ll leave that how it is, but by AI I meant enemy patterns and attacks. For example having the following script.

Turn 1: 50% Poison 50% Silence
Turn 2: Attack
Turn 3: 50% Flare, 40% Stop, 10% Doomsday
Turn 4: Attack
Repeat
50% Counter Physical Attack w/ Stop

Something like that or editing existing enemies and replacing attacks or patterns.

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1033 on: 2018-03-21 10:01:03 »
Ok yes, this is AI script.

So actually, the default AI scripts are usually quite complex. One thing you should do before editing AI scripts is import the local variable informations ("LocalVariableSettings_v1.hws" that is included with the tool). It makes the scripts a bit more readable.
But writing a simple AI script like what you say can be done quite easily. Here is how the "ATB" function would look like:
Code: [Select]
Function Enemy_ATB
    if (turn_counter == 0) {
        // Turn 1
        if (GetRandom % 2) {
            set SV_Target = RandomInTeam( SV_PlayerTeam )
            Attack( Poison ) // It is not "Poison" that should be in the real thing but the attack ID instead
        } else {
            // You may avoid Silencing someone who's already silenced using this kind of lines
            set SV_Target = RandomInTeam( NotMatching(SV_PlayerTeam[STATUS_CURRENT_A], 265) & NotMatching(SV_PlayerTeam[STATUS_CURRENT_B], 64) )
            if (SV_Target == 0) { // Everyone is either dead or silenced already...
                set SV_Target = RandomInTeam( SV_PlayerTeam )
            }
            Attack( Silence )
        }
    }
    if ((turn_counter == 1) || (turn_counter == 3)) {
        // Turn 2 and 4
        set SV_Target = RandomInTeam( SV_PlayerTeam )
        Attack( Physical Attack )
    }
    if (turn_counter == 2) {
        // Turn 3
        set rnd_num = GetRandom % 100
        if (rnd_num < 50) {
            set SV_Target = RandomInTeam( SV_PlayerTeam )
            Attack( Flare )
        } else {
            if (rnd_num < 90) {
                set SV_Target = RandomInTeam( SV_PlayerTeam )
                Attack( Stop )
            } else {
                set SV_Target = SV_PlayerTeam | SV_EnemyTeam
                Attack( Doomsday )
            }
        }
    }
    set turn_counter = ((turn_counter + 1) % 4)
    return
And declare the local variables "turn_counter" and "rnd_num" in the local variable panel:
Code: [Select]
local uint8 turn_counter
local uint8 rnd_num

For the counter-attack, I suggest that you take a look at Gizamaluke's AI and mimic it.

aidolu12

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1034 on: 2018-03-24 22:54:55 »
@aidolu12: Yes, it's extremely difficult to do CIL changes by only looking at the CIL code. It's way better to look at the C# code to at least understand how the engine works before guessing how you can tweak it (it requires reading C# but that's always better than CIL).
You can see the C# code in Memoria's Github page, or using a tool like dnSpy or dotPeek.

For your particular question, it's not particulary easy in CIL, but you might change the method "BattleHUD::GoToBattleResult" and add this kind of lines:
Code: [Select]
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
ldfld 0x4000809 // POINTS::hp
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x4000229 // BTL_DATA::max
ldfld 0x4000809 // POINTS::hp
ldc.i4.4
div
add
call 0x6000F5D // FF9StateSystem::get_Battle
ldfld 0x4002267 // BattleState::FF9Battle
ldfld 0x4002230 // FF9StateBattleSystem::btl_list
ldfld 0x4000226 // BTL_DATA::next
ldfld 0x400022A // BTL_DATA::cur
stfld 0x4000809 // POINTS::hp
This only restores 25% of max HP of the 1st character only (and doesn't even check if it goes over the max HP limit)...
Best is to use Memoria for that and add these lines instead, since you can surely use local variables when replacing C# code:
Code: [Select]
for (BTL_DATA next = FF9StateSystem.Battle.FF9Battle.btl_list.next; next != null; next = next.next)
if (next.bi.player != 0 && next.cur.hp>0)
next.cur.hp = min(next.cur.hp + next.max.hp / 4, next.max.hp);
Much simpler indeed ^^'

@Gordo98: What you want to do is not related to AI but to the battle system, so CIL code or C# again :/
And increasing the duration of status effects is not possible with HW, as explained here. The best you can do is to change the tick for poison/venom/regen.

Tirlititi, thanks, I have not try it yet, I have been busy, but as soon, will let you know.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1035 on: 2018-03-25 11:45:53 »
AI script,
what function makes the enemy perform an attack (ex. Attack(3) ) first every time the battle starts? Attack (3) the enemy will do every start of the fight.

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1036 on: 2018-03-25 14:32:09 »
Look at Black Waltz 3's AI script (the battle on the Cargo Ship). He starts the battle by casting trance on Vivi.
Basically, you need to "set SV_FunctionEnemy[ATB] =$ SV_FunctionEnemy[MAX_ATB]" and use a flag for the first attack of the enemy.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1037 on: 2018-03-26 05:11:58 »
Thanks, it didn't work, but that's okay; I found an alternative.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1038 on: 2018-03-27 02:42:56 »
Just found a bug with HW version 39b.
Cannot change the value of >Power<, value reverts back to default.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1039 on: 2018-04-04 11:29:45 »
is there a function in the script that resets the LV back to 1? boolean variable?

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1040 on: 2018-04-04 12:00:50 »
It is possible, yes. You just need to empty the party reserve and then setup the characters' data: with the "Update level" option, it usually sets the character's level to the average level of the party reserve, but it sets the level back to 1 for an empty party reserve.
Code: [Select]
    SetPartyReserve( 0 )
    SetCharacterData( character_id, 1, 255, 255, 255 )  // By using 255 in the other arguments, you don't change the value
    SetPartyReserve( 255 ) // May be different if you don't want the 8 regular characters to be available

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1041 on: 2018-04-04 16:31:14 »
Thanks Tirlititi!
guess what,
there's always something missing.
This doesn't apply to all characters, it only applies to one: Eiko
It definitely did not apply to Zidane either.
« Last Edit: 2018-04-04 18:33:02 by Incinerator »

DanTsukasa

  • Cool newbie
  • *
  • Posts: 58
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1042 on: 2018-04-05 02:28:30 »
Awesome progress as always.
Would it be possible to add an exporter thats just OBJ for now, for the walkmeshes, I understand the cameras are a bit of a pain, so if those aren't a priority then I can just guesstimate the rest easily enough.
Having the walkmesh will save a lot of time with recreating some of the environments in HD.

Tirlititi

  • Insane poster
  • *
  • Posts: 478
  • Karma: 61
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1043 on: 2018-04-07 13:45:40 »
I don't exactly know what you're preparing us, but that sounds very neat :D
Here are the walkmeshes:
https://www.dropbox.com/s/p0yvu6ofcj658u1/FF9Walkmeshes.zip?dl=1

I don't think that I'll add an option to export them in HW as I am pretty sure that there will never be an importer of walkmeshes in OBJ format. Adding an exporter may make people think that walkmeshes are just a bunch of triangles. I'll just let the walkmeshes here.

PS: I double-faced the triangles because apparently the orientation of triangles is not relevant for walkmeshes.

DanTsukasa

  • Cool newbie
  • *
  • Posts: 58
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1044 on: 2018-04-07 14:11:37 »
Lining these up with Cameras is going to take quite a while, but I'll do what I can.

Ah yeah, this project is... going to take a long time, but I want to have some things to show before I see if anyone else is interested, see if I can get myself a good workflow and the like first.

Thankyou for those, I really appreciate it, if you by chance also happen to know how to export the cameras too, as FBX files, that'll speed things up even more.
I have a tool that exports the FF8 walkmeshes and camera all in the correct positions, which was super handy for running tests, though ironicly enough, I find that FF8 doesn't really have any good camera angles, or makes nearly as much use of its pre-render medium as ffix does.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1045 on: 2018-04-08 00:42:56 »
Tirlititi, I noticed a glaring bug with Vivi using either Cure or Life spells outside of battle. I give him Cure/Cura etc. or Life/Full-Life, and attempt to revive or heal an ally outside of battle, it doesn't heal or revive a character, only depletes his MP, and the Target Window for "Life" shows as if you're curing Bad Statuses.
Differently If I give Steiner/Zidane/Freya Cure/Cura/Life etc., it works perfectly fine. Is this the game's way of showing a black mage just wasn't meant to have white magic?
Also, if a character like Eiko/Dagger (any character who can use Cure) is only in the party, and tries to use Cure outside of battle on themselves, the Target Window refuses to show up. I don't think that was ever present in PSX version.

And about the walkmeshes: specific foot sfxs datas (metal, sand, grain etc.) are stored in the walkmeshes? Replace it and those are lost?
These walkmeshes look like a similar to the meshes I did in The Mist: Resurrection, Memoria levels, tbh.

jmp434

  • Crazy poster
  • *
  • Posts: 225
  • Karma: 52
  • https://www.paypal.me/jmp434
    • View Profile
    • Make a donation
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1046 on: 2018-04-09 06:43:58 »
Hello everyone, being a fan of Final Fantasy 9 especially, I hoped to see its output on PC and the possibility of being able to create it in HD, to redo it in 3D the ideal would be to get the walkmesh, as well as the coordinates camera and each environment to be able to work on it, I am completely null on the mod of FF IX so I wondered if someone had a complete pack to provide me so that I can take care of it? I had already done previously on FF 7 for those who know me :) But FF7 never interest me as much as the 9 and I would like to spend my time on the environment of the 9 which attracts me more and give the opportunity someone to do something :)

Sorry for the bad english, google translation does not speak very well your language.

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1047 on: 2018-04-09 09:38:36 »
Hello everyone, being a fan of Final Fantasy 9 especially, I hoped to see its output on PC and the possibility of being able to create it in HD, to redo it in 3D the ideal would be to get the walkmesh, as well as the coordinates camera and each environment to be able to work on it, I am completely null on the mod of FF IX so I wondered if someone had a complete pack to provide me so that I can take care of it? I had already done previously on FF 7 for those who know me :) But FF7 never interest me as much as the 9 and I would like to spend my time on the environment of the 9 which attracts me more and give the opportunity someone to do something :)

I could see new walkmeshes would provide possibility to import new backgrounds in assets; but whole 3D . In that case, the backgrounds would be kicked, and instead add 3D environments (maps) in the assets. No need for a walkmesh then, in such case. You see?

(Still dunno about the Vivi Cure bug).

DanTsukasa

  • Cool newbie
  • *
  • Posts: 58
  • Karma: 2
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1048 on: 2018-04-09 09:59:10 »
I could see new walkmeshes would provide possibility to import new backgrounds in assets; but whole 3D . In that case, the backgrounds would be kicked, and instead add 3D environments (maps) in the assets. No need for a walkmesh then, in such case. You see?

(Still dunno about the Vivi Cure bug).

I don't think its really possible to just switch everything out with 3d meshes, what I'll do, and I'm guessing what jmp434 intends to do is simply remodel and replace the backgrounds like what people did with the FF7 backgrounds (admittedly, to a much higher quality).

Incinerator

  • Cool newbie
  • *
  • Posts: 73
  • Karma: 2
  • "I'm a woman, but I fight like a man!" - Freya R.
    • View Profile
    • FF9:FF:EMR:TZA
Re: [FF9] General editor - Hades Workshop (0.39b)
« Reply #1049 on: 2018-04-09 22:44:11 »
I don't think its really possible to just switch everything out with 3d meshes,

Oh it's possible; being a Unity game after all.