Qhimm.com Forums

Final Fantasy Forums => Tools => Topic started by: Tirlititi on 2013-06-06 17:51:30

Title: [FF9] General editor - Hades Workshop (0.38)
Post by: Tirlititi on 2013-06-06 17:51:30
Hi there !

I'm working on a Final Fantasy IX modding tool called Hades Workshop. It is aiming to allow to edit most of Final Fantasy IX's content. Quite a big project and I don't know if I will ever decide when it's finished  ;D

//============== THE TOOL =================//

The features so far :
- Can open Final Fantasy IX PSX files, in .bin format and in any language version,
- Now works with the Steam version,
- Read and edit datas about :
--- Spells the party can cast,
--- Supporting abilities the party can use,
--- Commands the party has,
--- Default stats of the party members,
--- Items' features,
--- Items sold in shops,
--- Statistics, attacks and AI of enemies,
--- Tetra Master cards,
--- Text, dialogs and charmap,
--- Game's script,
--- MIPS script and CIL script,
--- Model exporting (Battle Scenes only for PSX, more for Steam),
--- Backgrounds (view only in PSX, view/replace in Steam),
--- Steam resources exporter/importer,
--- Spell animation sequencing.
- Works under Windows only (you may recompile the source code I redistribute or use wine under linux).

It may be a good idea to have a look at the help (F2).

Also, I recommend to the new Steam users to go easy with this tool. Several features are easy to get familiar with, but due to the power of this program and the complexity of FF9, there are subtilities and traps to avoid.
You should read this post (http://forums.qhimm.com/index.php?topic=14315.msg242844#msg242844) to get to know some of them.
Important : Hades Workshop doesn't work if Albeoris's Memoria tool was used. The other tool called Memoria (seriously Albeoris...) by gjoerulv works just fine.

Credits :
I made the program, obviously, but I got helped a lot by your wiki (http://wiki.qhimm.com/view/FF9 (http://wiki.qhimm.com/view/FF9)) for cluster datas format and by http://finalfantasy.wikia.com/ (http://finalfantasy.wikia.com/) occasionally.

Other than that, LandonRay and Zande made quiet an useful work in data finding, Zidane_2 wrote most of the other tools about FFIX before me.

The background image has been drawn by Maxa'. You can check his Deviant-Art page here (http://maxa-art.deviantart.com/).

Please tell me if you get any suggestion/bug report/feedback to share ^^

Here are the download links :

HADES WORKSHOP (https://www.hiveworkshop.com/attachments/hadesworkshop-zip.274037/)

Github project (https://github.com/Tirlititi/Hades-Workshop)

The older versions can be found here (https://www.dropbox.com/sh/f8edyp5ua4a7kc7/AACuhcb46gQq4x4IMGmgRgl1a?dl=0)

Thank you for your attention  :)

//=============== THE MODS =================//

Here are Final Fantasy IX mods made using Hades Workshop. I won't speak of LandonRay's mod because it is not related to it, but it's also worth a look ^^
Difficulty Tweak (http://forums.qhimm.com/index.php?topic=17546.0) : Made by Iamthehorker, this mod increases the MP cost of the abilities and make the battles tougher. The gameplay itself is preserved, so it really is an increase of difficulty for an augmented playthrough. If you think that the boss battles end too quickly or if you never saw the use of the ethers/elixirs, this mod is a way to go. It also allows Steiner to equip the Save of the Queen in the end-game.
Final Fantasy Formula IX (http://www.insanedifficulty.com/board/index.php?/topic/4194-final-fantasy-formula-ixfffix) : A mod made by Aidolu with completly different spells and commands. I particulary like how commands have been re-invested to make spells like Songs or Cooking moves. The new spells are mostly taken from other Final Fantasy with few changes sometimes because of the limitation of my program or of FFIX battle mechanics.
Save The Queen (http://www.romhacking.net/hacks/1984/) : A mod made by ThisGuyAreSick2. It allows Steiner to use the allmighty Save The Queen. It also changes the way you synthesize it (it's made in the Black Mage Village in disc 4).
FF9.2.2 (http://forums.qhimm.com/index.php?topic=15217.0) : A mod made by Vir to improve the Perfect Stats challenge balancing. It removes the forced exp battle so a true lvl 1 game can be made. It also fixes the Thunder Slash glitch. Vir also made a Fixed Stats Mod (http://forums.qhimm.com/index.php?topic=16703.0) which removes the primary stat variations from games to games and have a normalized stat progression.
Alternate Fantasy (http://forums.qhimm.com/index.php?topic=16324) : My own mod. It modifies a bit of everything in the game but mostly change the abilities and the gameplay in battles.

Also, you can find here (https://www.dropbox.com/sh/ac7sr4q3z2cx9vp/AACQDfqXPvn8c3ylXeGUrBKEa?dl=0) the different tiny mods I made over the years.

//================ BONUS =================//

Simplified Game Scripts

Here are some scripts of systems or mini-games that are of some interest if you wish to know how the game works in-deep.
FFIX Code Folder (https://www.dropbox.com/sh/8ce6b73316gkx0x/AAA2-z3GCFZf3-Ed-6htDRmCa?dl=0)

Hidden dialogs

Here are some few interesting secret dialogs, never used in the game.
I've also made a patch to enable some of them in-game :
Hidden Dialogs (PSX) (http://www.romhacking.net/hacks/2112/)
Hidden Dialogs (PC) (https://www.dropbox.com/s/ejifo5amf4kkcyc/PC_HiddenScenes.zip?dl=1)
And a video (https://www.youtube.com/watch?v=paxguJo6AqA) showing the patch's content.

Don't hesitate to tell me if you find more unused dialogs : I'll add them to the list ^^

Alexandria [Over the roofs...] :
Puck “So, Vivi... Is this your first time in Alexandria?”
Vivi “Uh...  Um...  Yeah. I bought my ticket from a moogle wearing a hat...”
Puck “Bad luck!  If I ever find that moogle, I'll hurt him plenty!”
Vivi “Uh... Thanks...”
Puck “Alright!  Just a little farther 'til we can see the stage!”

Ruined Prima Vista [Steiner's bitterness] :
[1/3]
Steiner “Those bastards... If they plan to demand a ransom, they're wasting their time.  I'll see to it that they receive nothing!”
[2/3]
Steiner “Wretched thieves... I'll see them all hanged!”
[3/3]
Steiner “Those bastards... They will never get away with this!”

Observatory Mountain [Good and Evil with Grampa Morrid] :
Steiner “Alexandria, off course! Burmecia started the war, and we lost our king as a result.”
Morrid “Many wars were fought before the Lindblum Airship Revolution.”
Morrid “Alexandria intiated some of the wars against Burmecia. Now, can you tell me who was right or wrong?”
Steiner “I-I am not talking about the past! I am talking about the future!”
Morrid “What will you do if Alexandria starts a war?”
Steiner “When will the cargo ship arrive!?”

Gizamaluke's Grotto [Entering Burmecia] :
Burmecian Soldier “This is the Gizamaluke's Grotto. It is Burmecia's border.”
Burmecian Soldier “No one is allowed inside without the king's permission.”

Cleyra [Meeting with the King and the High Priest] translated from japanese by luksy :
Freya “It has been some time, Your Majesty.”
King of Burmecia “Ah, Freya, well met.”
King of Burmecia “The High Priest and I welcome you.”
High Priest of Cleyra “My Lady.”
High Priest of Cleyra “It would appear that this predicament no longer concerns Burmecia alone.”
Freya “I understand, Your Holiness.”
Freya “And yet...”
Freya “I fear my strength alone may not suffice.”
King “Freya...I know what troubles you.”
King “I must apologize for earlier.”
King “Can you ever forgive me?”
King “No! off course you cannot.”
King “But the fate of the people of Burmecia now hangs by but a thread.”

Occupied Lindblum Castle [Reaching Cid] :
Don't get caught by the enemy!
Jump out when she looks away!
Man “The regent is waiting for you at the Base Level.”
Man “The enemy is busy loading supplies. Go down on the lift, now!”
Man “Once you get on the lift, my comrades will take care of the rest.”
Zidane “So, I just take the lift to the Base Level without getting caught?”
Yeah...
Zidane “Piece o' cake! Leave everything to me.”
Huh?
Is anybody there...?
A tail?
Meeow!
Oh, it's only a cat...
Zidane (Wow, that was a close one.)
Man “(You idiot!)”
Man “Whatever you do, don't get caught!”
Man “What's wrong? The regent is waiting at the Base Level.”
Man “Go now, or you'll get caught!”
Zidane “I gotta run while she's looking away.”

Occupied Lindblum Castle [The Ancient World Map] :
Regent Cid “That is a national treasure of Lindblum!”
Regent Cid “It was passed down through my ancestors, since the days of the first regent.”
Regent Cid “It was probably made before our continent was covered in the Mist...”
Regent Cid “That is an ancient map of the entire world!”

Alexandria [Balloon Mini-game] translated from french by me :
Girl “You want to play with us?”
Girl “You've got some time to gather balloons and give them to the boys behind us!”
Girl “You get more time depending on the color of the balloon that you bring.”
Green → 5 more seconds
Yellow → 10 more seconds
Blue → 15 more seconds
Red → 30 more seconds
Girl “All the three of us have a balloon and we are somewhere on the square.”
Girl “Well... Start!”
Boy “X more seconds! You have Y points!”

Final [The 2 worlds' fusion] :
The Iifa Tree could not be stopped...
Gaia and Terra's fusion
caused global chaos,
destroying many cities and
taking many lives...
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-06-06 21:31:18
link not working :/
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-06 21:36:56
Fixed, I added quotes around the link but it wasn't needed...  :roll:

Thanks for warning !
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-06-06 21:37:32
Thanks  ;) by the way im sure you can add the .dll into the program when building it. Some people choose to leave them out because it makes the program bigger i believe. I've heard of "external dependencies" when building source code so im sure you can choose to have it built into the program or make it so you can get the .dll seperately. Not sure how Codelite + wxFormBuilder works though.
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-07 14:47:42
Well, this saves me time trying to make my own program with my very limited knowledge on reading from files.

You may want to look at this (http://forums.qhimm.com/index.php?topic=12648.msg176861#msg176861). I noticed you are missing some of the stats.

Also I haven't figured out the statuses yet. I know some relate to class (Aerial enemies are immune to Float, for example). And I haven't found where the Card is stored. But I imagine the Card drop might be based on the encounter/formation and not just individual enemies. I don't know where the formation data is so I haven't looked around. Also I see where the attack data is probably stored (after the enemy stat data) so this guide (http://www.gamefaqs.com/ps/197338-final-fantasy-ix/faqs/20490) may prove useful if you plan on figuring that out.

I assume what the program calls CP is actually AP?

I also think it would be useful if you still gave the number of the formation. So on Disc 1, the Beatrix battle is file0, so having it say "0: Beatrix" would be a help.

But anyway, I love you for doing this. This is extremely useful.
Title: Re: [FF-IX] Hades Workshop
Post by: NFITC1 on 2013-06-07 14:56:13
Thanks  ;) by the way im sure you can add the .dll into the program when building it. Some people choose to leave them out because it makes the program bigger i believe. I've heard of "external dependencies" when building source code so im sure you can choose to have it built into the program or make it so you can get the .dll seperately. Not sure how Codelite + wxFormBuilder works though.

Depends on the library. If the source is open you can copy what you need into your project. Otherwise, it's safest to distribute the library with it as it may have external dependencies as well. Honestly, size doesn't matter so much anymore. Back before Harddrives were less than 10 GB it would be important to cram as much into as little as you could. Now it's hard to find a machine with less than 80 GB which is more than enough for most people (although my 2TB machine is more than half full :) ).
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-07 16:15:04
Many thanks for the links, JBedford128. I didn't see this topic before ! Very useful.
About enemies' attacks, I know some things about it but the datas are splitted everywhere and particulary in the script file for the AI (that includes which monster uses which attacks...). I still lack knowledge on scripts, though I got some opcode values.
Yeah, maybe the card drop is in the enemy formation, there are a couple of bytes I don't know in it.
And yes, CP -> AP. CP is the french thing and I messed up ^^'.

Quote
I also think it would be useful if you still gave the number of the formation. So on Disc 1, the Beatrix battle is file0, so having it say "0: Beatrix" would be a help.
Okay, I'll add that.

I'm quiet sure there is a simple way to remove the dll dependancies (it should be an option passed to the compiler) ; my attempts to do it just didn't work  :(

Next version will be focused on being able to overwrite datas. It'll be limited anyway but I'll try to make it as full as possible.
Title: Re: [FF-IX] Hades Workshop
Post by: NFITC1 on 2013-06-08 02:14:40
I'm quiet sure there is a simple way to remove the dll dependancies (it should be an option passed to the compiler) ; my attempts to do it just didn't work  :(

I don't think dll embedding is possible. I do enough assembly and disassembly to know that there's not a simple flag to tell a compiler to rip the code out of a library and mesh it with your code. There are lots of reasons this would not work. Unless you can get the source code of these libraries in your target language then I wouldn't think about integrating it into a single executable. I could give lectures about why trying to do such a thing is bad practice, but I'll spare you if you just trust me when I say you shouldn't.
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-06-08 05:44:14
I think its better you keep it the way you have it with the .dll files just added to the rar/zip. you can always make the dll part a last priority (you can come back to) once you feel the program has developed enough.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-10 17:06:28
Updated. I've update the link in the first post so you don't have to search the last version through the topic.

The program may now overwrite datas directly in the binary file. Be careful because you can't unedit what you've done. I'm planning to add a system that saves a backup of the original datas in the .hwf file (when you open the file for the first time) but that's not done yet.
I also fixed that "fatal error" message when you exit the program.

About what you can edit, what you can't edit and what is limited (long boring post incoming :P) :
- texts are limited both in size and in printable characters. You may only use characters from the US/EU char table (link (http://wiki.qhimm.com/view/FF9/CharTables#Character_Table_for_EU_.26_US_version)) and size is limited to what the size initially allocated for all the datas of the same type. For instance, in the US version, there is a size of 1608 characters for ALL the spells names (including the terminating character, so it actually does 1416). In general, there is only up to 3 extra characters so you will most likely have to remove the names from other spells to get some space.
- You can't edit the enemy names yet (there is a way to have more space for them but that will be for another version).
- Commands spell lists are also limited. You may link 2 commands to increase the limit (they would share the same spells). White Magic and White Magic+ are linked by default, as well as Black Magic and Black Magic+ but you can link Dagger's eidolons (trance and normal) and the 2 Beatrix Seikens (dunno why there is 2 of them) so you win 12 spells to put anywhere for free.
- Editing commands don't change the spell list in the menu (only in battle). It doesn't add AP requirement to the character either, so he can use it without having to learn it.
- I added the "Model ID" field to the enemies, but that's more for testing and curiousness than for real use. I'm pretty sure it won't be simple to change the model. I haven't test it yet though.
- You can't change the enemy groups, apart from its frequency and the AP it gives. It would be safe to remove an enemy from a group but any other change would have bugging results.
- You can add up to 32 items to a shop, period.

I removed the "Targetable" flag. I thought it were used by things like the battle with Steiner and the Bomb behind him but that's not even the case. Since it's more something that deals with the battle's script, I'll leave it out for now.
I also added names to the shops. It may be inacurrate for the weapons and armors shops and it is imprecise for the item shops. If someone can confirm the last one is the Zorn and Thorn's shop right before Oeilvert, it would be nice of him.

I'll stop searching for removing the dll dependancies, then. That's not a priority either, as you said, xenokain ^^

Oh, and I added the numbers in the enemy list. I'll make it optional in the following versions, though.
Title: Re: [FF-IX] Hades Workshop
Post by: xLostWingx on 2013-06-10 18:43:14
Love to see work being done with IX  ;D Keep up the good work man.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-06-10 23:55:01
it is very cool). add image extractor and simple chars font editor. like chenge ierogliphs on other chars.
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-06-11 01:32:08
Thanks for the updates  ;D This is extremely useful.
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-11 17:36:02
I've noticed something strange with some bosses. They are displayed as having 10000 HP more than they actually have in the game. This explains why I couldn't find Ozma in the data when searching for his HP, and it also explains why Ozma has 55545, 10000 less than the upper limit.

There obviously is a flag that does this. Friendly Yan proves that 65535 HP is possible. So a flag removes 10000 HP from the given amount, which I can't think of any good reason for.

Edit: Well I think I might have found it. Before the HP value there is a string of 0s (in hex). But I noticed that both Beatrix and Prison Cage had an 80 (so 80 00 00 00 before the HP value). So I changed the 08 to 00 for Prison Cage, and used Death. And Death killed it. I didn't see its HP count though. So that might have just been some statuses that I changed. (additional note: Using Death on Prison Cage causes a game hang).

Edit2: Doesn't effect HP, but does effect some status immunities.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-11 19:14:57
Nonono, that's not that, that's AI-relevant.

When an enemy dies, he just dies, but some bosses (like Ozma, or even the very first Masked Man) actually have a more complex dying animation, which is in fact a spell (Maliris's ending movement is the only one that actually does something). So they have a scripted event : "When they have less than 10000hp, the ATB pauses, they cast a spell and then they die". There is a part of the hexa code about what I think is the event setup for Masked Man's battle :
Code: [Select]
05 D6 1E 0E 7F 02 EE 00 05 79 01 29 24 7D 10
27 1E 2A 7F 02 08 00 05 D6 1F 7D 01 00 2C 7F
10 27 = 10000.
05 is the variable assignement opcode, so it's only about setup (38 is the opcode for an enemy to cast). I don't know a lot about how variables are coded but you can assume the opcode 05 is 7F-terminated. I don't know for sure what 02 is but it seems to be a sort of a JUMP opcode (01 is also JUMP, though...).

Ok, I just saw your 2nd edit. That's a good thing to know nonetheless, thank you :D

EDIT : Ha, sorry, that's not Masked man's battle, that's beatrix's battle. I just went confused with "1st battle in the game" and "1st battle in the battle list"  :oops:
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-11 20:35:38
Oh, that makes a lot more sense. ^_^

Death is tied to this, as both worked on Parasite Cage when I set it to 00. It also allowed Scan to work (it just seems to Miss otherwise), which allowed me to see the true HP. Everything else was Guarded (but I didn't test Venom (no player ability natively has it) or Vanish (which natively targets only allies)).

I don't understand Eat's relationship to it. I could Eat Parasite Cage (well, i didn't (i don't think i could given its HP), but it said "I can no eat until weaker"), but for Garnet it just plain said "I no can eat".

Edit: Oh wait, Garnet gets immunity from Eat because she is of the Humanoid class. Remove the class and she can be Eaten.

So I did some more digging.

Part of the enemy file:
----------------
00 00 00 00 [first-status-set. Status immunity]
00 00 00 00 [second-status-set. Status evasion, and sometimes auto-status]
00 00 00 00 [third-status-set. Status at beginning of battle/sort-of auto-status]
00 00 [HP]
00 00 [MP]
--------------------

Now, with regards to the status immunities:
Byte1 (01=Break, 02=Venom, 04=Virus. 08=Silence, 10=Blind. 20=Annoy, 40=Zombie, 80=??)
Byte2 (01=Death (but not Eat), 02[messes up targetting?], 04=Confuse, 08=Berserk, 10=Stop, 20=Auto-Life, 40=??, 80=Defend)
Byte3 (01=Poison, 02=Sleep, 04=Regen, 08=Haste, 10=Slow, 20=Float, 40=Shell, 80=Protect)
Byte4 (01=Heat, 02=Freeze, 04=Vanish, 08=Doom, 10=Mini,20=Reflect, 40=???, 80=Gradual Petrify)

It's the same statuses with all three sets of status thingies. 80000000 seems to do nothing, but the third-status-set uses 80000000 as a Death immunity. 00020000 is odd as an immunity. I'm not sure I could actually hit the enemy with it on.

So the first-status-set is Guard immunities.

The second-status-set work the same as immunities, but instead of saying "Guard" it says "Miss". Its other benefit is auto-statuses. The ones I've noted are Auto-Float, Auto-Haste, Auto-Reflect, Auto-Slow, Auto-Berserk, Auto-Poison, and Auto-Regen. I didn't go through each one individually, since I got the gist, so there may be more. However, I think Auto-Poison may be purely cosmetic. Unless I've forgotten how Poison worked, I sat waiting for the enemy to take damage but never did. I also suspect Auto-Slow may be cosmetic. I do know that Auto-Reflect works though.

There is also something interesting about Auto-Haste and Auto-Slow. When both are on, both the Haste and Slow indicators will appear next to the enemy. If one is on, and the one that is not on is inflicted on the enemy, both indicators appear then also. This could just be evidence that both are cosmetic and do not function as Auto-Statuses. But I don't know for sure.

The third-status-set inflicts the status at the start of the battle, however the effectiveness of this changes:
-If Stop is a selected status, then it can be removed. Unlike the second-status-set, there's no forced Miss.
-If a status is a temporary status (is removed after a duration) then the status does not stick. A graphic will be seen on start-up but that's it.
-For the countdown statuses, the countdowns are removed. If Doom is a selected status, the enemy will get Death instantly.
-00400000 seems to be Trance. The Masked Man was glowing, but it didn't do anything.
-00010000 and 00000040 have the enemy disappear and commands are never completed.
I also looked at other unknowns in an attempt to find out what they were. The two-bytes after the Animation IDs: Only of the bits in these bytes seems to do anything. "01" makes Prison Cave (the enemy I was testing on at the time) invisible.
-80000000 is the oddest. As discussed before, this is what bosses have. It Guards Instant Death, it makes Scan Miss, it makes Eat Miss (No can  eat), and a new revelation is that it makes Demi Miss too.

Also, after the Steal data, there are two unknown bytes, and then another set of two unknown bytes. For that second set of two unknown bytes, I set it to FF and it meant that when my characters attacked, they actually passed through the Prison Cage and attacked behind it. So these bytes may decide which part of a model the characters should attack.

Additionally, further down, the seventh and eighth bytes after the bytes deciding Blue Magic: These dictate where the cursor appears in relation to the enemy. I switched it to FF and it made the cursor jump all over the screen, but I also set it to a more stable figure that moved the cursor a couple feet upward from its original position. Additionally, my characters attacks towards the cursor. So this is like the bytes I mentioned before, except the offset effects the cursor too, which is not the case for the other ones.

Sorry if any of that wasn't clear, I'm not good with explaining things or words.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-13 01:13:57
It's clear enough, thanks.
I know a bit more than what the programs currently displays. I'll try to write it down.
The Enemy Chunk data has an ID of 10 and begins like every other chunk (see the wiki for that).
Then there is the "groups" datas :
Code: [Select]
1 byte Unknown
1 byte NbGroups
1 byte NbEnemyTypes
1 byte NbAttacks
2 bytes Battle Flags
2 bytes Unknown

Then comes [Nb Groups] times this :
Code: [Select]
1 byte Group Frequency
1 byte Nb Enemies
2 bytes Engaging camera ID
2 bytes AP
2 bytes Unknown
[
1 byte Enemy ID
1 byte Targetable Flag
2 bytes Unknown
2 bytes Position X
2 bytes Position Z
2 bytes Position Y
2 bytes Facing Angle
] (x4)

Then come the enemy's stats (the part you investigated). There are [NbEnemyTypes] of them (thx to you : I didn't know the purpose of the first 12 datas) :
Code: [Select]
4 bytes Status immunity
4 bytes Status evasion/auto-status
4 bytes Status initial cast
2 bytes HP
2 bytes MP
2 bytes Gils
2 bytes Exp
4 bytes Drop Item
4 bytes Steal Item
1 byte Unknown
1 byte Collision size (it tells how large some effects must be, such as scan)
2 bytes Aiming position, as you said (though I don't know more how it should be interpreted)
2 bytes Model ID (thx Zande for this and the followings)
2 bytes Animation ID 1
2 bytes Animation ID 2
2 bytes Animation ID 3
2 bytes Animation ID 4
2 bytes Animation ID 5
2 bytes Animation ID 6
4 bytes Unknown
2 bytes Attack Power
1 byte Speed
1 byte Strength
1 byte Magic
1 byte Spirit
4 bytes Unknown
1 byte Elemental guard
1 byte Elemental absorb
1 byte Elemental half
1 byte Elemental weak
1 byte Level
1 byte Class
1 byte Unknown
1 byte Physical defence
1 byte Physical evade
1 byte Magic defence
1 byte Magic evade
1 byte Blue magic
2 bytes Unknown
2 bytes Cursor position (not the one you mentioned but pretty much the same thing if I remember well)
2 bytes AKAO death ID (sound when he dies)
2 bytes Cursor position (the one you mentioned)
16 bytes Unknown
2 bytes Shadow Gap Y (didn't investigate it...)
7 bytes Unknown
1 byte Drop card
10 bytes Unknown

Finally come the attack stats. [NbAttacks] times this :
Code: [Select]
1 byte Unknown
2 bytes Model ID (though it seems unused ; the real model ID is in the 0x11 chunk file with the attack animations)
1 byte Unknown (often 1F or 5F)
1 byte Effect
1 byte Power
1 byte Element
1 byte Accuracy
1 byte Flags ("use reflect", "is magic" and I don't know the others, unfortunatly :/)
1 byte Status
1 byte MP cost
5 bytes Unknown
And finally, 4 bytes end the whole thing, but I don't know what it might be.

About opcodes, since that's the most interesting thing I would want to hack next. Here is what I know :
The arguments of most opcodes can be either raw values or variable codes. A variable code is a list of variable operations terminated by 7F. I won't list operations here but there is a sample :
Code: [Select]
D40D 7D0200 20 D809 7D0000 18 27 7Fis translated into :
Code: [Select]
( Var_D40D == 2 ) && ( Var_D809 < 0 )20 is the == operation, 18 is the < operation and 27 is the && operation and 7D announce a short numerical value. So it is read like that :
Code: [Select]
D40D 7D0200 20 -> ( Var_D40D == 2 )
D809 7D0000 18 -> ( Var_D809 < 0 )
27 -> ( Var_D40D == 2 ) && ( Var_D809 < 0 )
The result is put on the stack (for a following conditional jump, for instance).

The list of opcodes and their effect (for those I know of) can be seen in the file "Hades_Strings.h" of the source code. I don't list them cause there are a lot of them...

I'll update this post if you or me find more informations. Now I just discovered that the US version and the french version have a huge difference : in the french version, some important datas are compressed (with a compression method called RNC) in a sub-file, making them impossible for me to edit. But that's not the case in the US version... So I guess I'll end up making this program only open the US version...
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-14 16:16:11
The third set of status bytes do not have anything to do with immunity, they are just initial cast, and the status can be removed by standard means (like Remedy).

The fifth byte (first unknown byte, after number of attacks) of the data:
- 01 = When the battle ends in a non-standard way, do not continue battle.(used for bosses and friendly enemies--allows to continue fighting boss after death sequence if turned off)
- 02 = Always back attack
- 04 = [Unknown]
- 08 = [Unknown]
- 10 = no victory pose/no fanfare.
- 20 = cannot escape
- 40 = enemies are out of reach? (Masked Man could still hit me for full damage, i could not hit him)
- 80 = Cannot use magic (greyed out in menu, party members at least)
Sixth byte:
- 01 = Attacks take off a lot: I assume this is the Ipsen effect- weak weapons do more damage
- 02 = [Unknown]
- 04 = [Unknown]
- 08 = prevents the battle results screen.
- 10 = [Unknown]
- 20 = [Unknown]
- 40 = [Unknown]
- 80 = [Unknown]

Since my tests were against Masked Man I could have missed things, like if the unknowns were to effect EXP or Drop, or if the victory poses of some of the characters played or not (although it wouldn't make sense to decide that in the battle data- i thought the same about Magic block and the reverse weapons though).

For the first unknown (byte5) in Attack stats, you state it can only be 1F, but I have seen 5F frequently.

And I am using the PAL UK version and it seems to match up to the US version quite well. I've seen some differences, but most are translation.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-14 20:21:08
Ah, that's a good thing to know. I thought that RNC thing would be used by every european versions.
The header begins with "RNC\1" so if you search the hexadecimal sequence "52 4E 43 01" and find no results, it's sure that's not used. But I trust your test, it may just be a cleaner way to know it.
But for now, I don't seek datas written in this part of the file. That'll become a problem when I'll look for items, characters' stats and supporting abilities.

Thanks for testing the flags :)
I can't do as much testing as I would like to and I'm really grateful you take care of some. I'll release a new version soon, but I would like to make that backup system before.

By the way, the 3rd status set is used for death/eat/scan immunity, no? Even if it's only 1 bit. Also, what is break? You meant petrify?
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-14 21:29:52
Oh yeah, I forgot about that one bit. :p

And by Break I do mean Petrify. Break is the name of the spell. I did the same with Annoy: the status is actually "Trouble" but at the time my main source for status name was ability name.

Also I think I've very likely found the value that stores the card. Dendrobium and Fang both store "01" (both holding the Fang card, the second card) in the byte, and Goblin stores "00" (Goblin card, the first), Beatrix stores "FF" (no card), and Ironite stores 08 and Basilisk stores 05, which match up.

Code: [Select]
16 bytes  Unknown
2 bytes   Shadow Gap Y (didn't investigate it...)
7 bytes   Unknown
1 byte    Card drop (00 to 63, FF is none)
9 bytes   Unknown

I'll confirm this in an edit later (EDIT: Confirmed. I had a Fang drop an Airship card).

Above you may notice that I dropped a byte from what you originally wrote. The total I wrote would be 35 bytes in this section, but you have 36.

So take the Goblin/Fang one for example: After Goblin, there are 36 bytes in this section, then Fang's enemy-block starts. For Fang, there are 35 bytes in this section before the Attacks/Abilities block starts.

So there is an additional byte here between two enemies in the same scene? Or am I missing something?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-15 01:14:50
I checked again and I think you miscalculated.
That does 116 (0x74) bytes for all the stats.
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2013-06-15 01:43:37
Here's what I'm seeing:
Code: [Select]
[end of Goblin]
09 09 09 09 09 01 f9 00 ff 02 ff ee 01 00 f6 f9
fc 00 17 00 b6 00 b4 00 01 00 00 00 00 00 01 00
00 00 00 00                          [36 bytes]

[Fang]      04 e0 00 44 00 00 00 00 00 00 00 00
44 00 aa 00 5a 00 17 00 ff f4 f0 ff ec f0 ed f9
70 03 97 00 c9 06 c9 06 c1 06 cd 0d bd 06 bd 06
00 00 00 00 02 00 08 00 13 08 08 0a 10 00 00 00
00 00 00 01 01 02 64 0a 02 0a 03 00 09 00 13 00
82 00 03 00
           
            0d 0d 0d 0d 0d 01 fa 00 fd 00 fd f7
fc fc f6 f9 f9 00 83 00 ee 00 44 01 22 01 00 00
58 00 01 00 00 00 00                 [35 bytes]

[attack data]        00 00 00 fe 1f 08 08 00 64
2c 00 00 80 00 00 00 00 12 00 fe 1f 40 08 01 00
...............................................
The only explanation is the attack data is wrong. It has one less byte near the start, and one more at the end. Because it says there should be four bytes before the "usually 1F byte", so I assume there should only be three.

If that were the case, it would also explain why I'm seeing five bytes that end the whole thing instead of four.
Title: Re: [FF-IX] Hades Workshop
Post by: Caledor on 2013-06-15 02:07:32
Finally someone showing some love for FF9! Can't wait to see this tool completed! :-D
By the way will it eventually be able to edit things other than magic names like weapon names and so on? And it is possible to avoid the char limit restriction for those sections?

Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-15 11:39:54
@ JBedford128 : Oh, yeah, the attack is wrong, I saw that when I implemented it but forgot to correct here (there is 1 byte less at start and I forgot the accuracy). Sorry.

@ Caledor : Yeah, weapons will be editable, but that's part of the datas that are compressed in some versions (if it only concerns the french version, that's not a big deal, though...).
I can't remove the char limit restriction for now. I can't even tell whether it is easy or would require deep restructuration of the file.
The only thing I can do for now is merging the names when they are the same. I guess I'll eventually do that.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-16 21:05:00
Update.
I added quiet a lot of stuff for enemies, some spell effects, fixed few bugs...
Also made the .ppf exporter. It does the same thing that a PPF creator, but much faster. The comparison is done between the changes you made and the file on the hard disk (so don't save before exporting the .ppf).

The enemies' spells animations are just there for information, they are quiet inaccurate or missing.

Now I'll take a break for a week.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-06-29 01:23:16
when add Πsymbol to text. program is crahing. and add import/export to .txt please
Title: Re: [FF-IX] Hades Workshop
Post by: Avalanche on 2013-06-30 17:17:37
It is possible to add a "modul" where i can edit the game dialogues? We would like to translate the game to Hungarian and it will be awesome if you can help us with your awesome tool. : )
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-06-30 23:17:46
He's on break because hes tired. He's the only one working on anything ff9 related right now.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-06-30 23:39:39
I was not really tired but rather busy ^^ I'm back on the thing now.
I'll add a text module soon, yes.

About the Œ character, I fixed it, thanks. However, there is a "bug" with the text filtering : the program should filter unprintable characters such as £ or whatever, but it doesn't work if you copy-paste those characters, thus the fatal error when saving (but Œ should have been fine, that was my oversight).
Title: Re: [FF-IX] Hades Workshop
Post by: NFITC1 on 2013-07-01 11:38:39
What code language are you writing this in?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-01 11:50:44
Check the first post : that's C++.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-02 20:05:46
Greetings. there was a problem. from the menu select the name can not fit all the letters. and those that are replaced by the symbols are not displayed. (24 letters of the English against 33 Russian) characters in the Japanese version but there are many more problems. may be possible as anything from there move it to also have a lot of character in US version.
Just tell me if anyone knows how to fix the width of the letters. some can not fit across the width (like М on screen, there was no place for the right shade, and Ж to be the width of a Ш)
p.s. screenshot of the test, I hope you'll understand what I mean. hard to explain, but still not their native language)
Here's a link to a screenshot
https://docs.google.com/file/d/0B6Bbbdpi5BzBbmxWbUd1QnoxdW8/edit?usp=sharing
It may also be added to the tool change in the width of each letter)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-02 23:10:38
Na, I don't understant what you said. It's not my native language either so it's even harder to find out ^^'
I'm not even sure it concerns my program or another FF9 text editing tool.
Title: Re: [FF-IX] Hades Workshop
Post by: NFITC1 on 2013-07-03 00:18:58
Check the first post : that's C++.

Ah. I saw Codelite and wxFormBuilder and didn't know what those were. I might be able to help if you need any.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-03 01:15:51
Codelite is an IDE (instead of coding with the a basic text editor, I code with this and it takes care of all the compiling stuff, coloring the code, etc...) and wxFormBuilder is an add-on to wxWidgets, which is a GUI library (countaining functions for creating/customizing windows and everything related).

I'd gladly welcome your help if you can get used to how I poorly code ^^ But since I'll try to remake some part of the code, I guess it'd be better for you to help after I've done it.

EDIT : I said bullsh*t, that'll teach me to answer so late  ::) Fixed it now.
Title: Re: [FF-IX] Hades Workshop
Post by: NFITC1 on 2013-07-03 12:01:05
I wasn't thinking writing or co-authoring. I'm more of a "if you don't know how to do what you want to do" kinda helper. I'm no stranger to sloppy code. The first WallMarket had lousy code. I even came across code I had written 13 years ago! Talk about sloppy!! You know you've got a problem when you're naming variables "newGG" and "neoGG" in the same method. :(
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-03 12:59:49
Lol
Ok, I'll ask you if I'm struggled with something :)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-04 18:40:00
Up. I had way more problems with text than I expected. And it doesn't work so well now...

I also added some features to facilitate the edition. You can sort spells, commands and enemies by alphabetical order and you can also make enemy changes faster with the option "Edit similar enemies" which make the stat changes shared by every enemies with the same name and level (to avoid changing every Beatrix fights together, for instance).

The bugs/problems there are with texts for now :
- You can't export them as .ppf : I saw there was a bug with ppf exporting so I'll try to fix that before I continue it,
- You may only shorten the texts : I need much more investigation on how texts are coded and I don't want to work on the saving feature until I've went further. However, you can export texts as a .txt file so you can begin to work on it if you want to translate FF9,
- Not all the texts are available. All the dialogs are, but pretty much everything related to the menu are not (the menu sections, obviously, but also the item names and such...),
- The special character µ is shown as plain text, as well as the code it calls. Shortly, that means that µ and some of the following characters (at least 1 but often more) are to be ignored,
- As a side effect of the previous bug, some few texts are misread and shortened while some others are longer than they should (you'll see what I mean if you encounter it),
- The first text block is incomprehensible. I don't know what purpose it serves.


Actually, I was more willing to work on scripts and opcodes. Anyone who has infos on how texts work would have my eternal gratitude, because that quiet bores me to find it ^^'
The rest of the post is some boring data informations I know.

So, about the 0x06 chunks, here is what I know :
Code: [Select]
2 bytes TextAmount
2 bytes Unknown/Unused
[
2 bytes TextOffset (from the first text offset position)
1 byte Some Flag?
1 byte Some Flag?
] x TextAmount OR TextAmount x 2
Remaining Texts
Sometimes, the datas are doubled. It might be when the 2nd flag is 0 that the current and the previous texts are linked but I don't really know... For what I saw, dialogs and field texts are doubled while battle texts are not. When texts are doubled, it seems the 2nd offset is the one used...
Here are the opcodes I know, occuring after the character µ (0xF9) :
- 2 (0x02) : slow text apparition (takes 1 argument),
- 4 (0x04) : tokenize the text (1st argument is the number of tokens and following 2 bytes-long arguments are their offset),
- 8 (0x08) : add multiple-choices feature (no argument),
- % (0x0E) : insert text specified in the script file by the command 0x66 (takes 1 argument),
- A-I (0x10-0x18) : insert the name of a team member (no argument),
- U-Z (0x24-0x29) : change the text color (no argument),
- È, Ó and - (0x55, 0x5C and 0x0B) : terminate text (no argument),
- Ü (0x63) : insert the pad square button picture (no argument),
- ò (0x71) : new line for multiple-choices feature (no argument).


EDIT : minor update to fix my chartable. Some special characters were somehow wrong or missing.
Title: Re: [FF-IX] Hades Workshop
Post by: Avalanche on 2013-07-04 21:28:22
Thanks for the good work, i hope someone will help you solve the problems. I follow your work every day.  ;)
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-12 06:51:20
Hi. how to work?  very need to add import/export to text (party)>spells and commands and helps
i waiting when you add export. but this you no add.
thanks for what you do
sorry for stupid language
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-12 10:44:56
Why would you need an import/export feature for texts that you can simply copy/paste?...
It would be a waste of time to me. I have more urgent things to do.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-12 15:00:28
Copy / paste would frequently. because working with the text would have to be much. Golosary be monsters \ composite names
replace the letters under the Russian font not once. why such a small thing would be very difficult if you insert it all manually
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-12 20:53:25
I guess adding a russian font shouldn't be too complicated. I'll think about it.

I don't understand half of your post. Please make efforts and don't use google translation.
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-07-12 21:18:57
He/shes better off asking someone from their native language to help them come back here and post in English.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-12 21:43:58
thanks for you think add russian font.
no translation Google even more difficult to explain. I will try to show

(http://5.firepic.org/5/images/2013-07/27/k5gnyef76m7y.jpg) (http://firepic.org/)

manually in hades workshop is harder to do than if it were the name of magic, etc in - text file. Because it could be done AutoCorrect letters to those that need - the entire text at once
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-07-25 01:43:09
in the future version are possible add more text than normal?

ex: english <-----> portuguese

I'm Back = Estou de volta
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-25 07:59:02
Yes it will. Not in the next version but maybe the one after that. You'll have a fixed size for each "Text block" and there will be some free characters (~50 I guess) unlike the spells/commands texts that have pretty much no extra space.

I had to rewrite a lot of the program, that's why it's taking some time (plus the fact I'm on holidays, ofc ^^).

By the way, shikulja, your image isn't displaying properly for me...
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-07-26 22:50:51
Thanks my friend, so I'll waiting for update of block size   :D
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-27 08:31:03
Update.

So, as said, I rewrote a lot of things :
- Texts are still displayed with "µ" but there are no more trailing characters after that. Instead of "µ+060Hurray !" you have "µHurray !" for instance. Some of the bugs I listed for the previous version are fixed : you can assume the way the texts are displayed now is the way it will be displayed in the final version.
- You may now edit any text (including the ones in the spell/command sections) using an extended text block.
- That extended text block can display the text as it is in-game, roughly. For now, not every opcodes are handled : the speed (not really accurate but fine enough, I think), the colors and some string replacement. The "µ" are not displayed there, of course.
- The extra text in battles is no more accessible. It will be re-added in the "Enemies" section soon.
- I didn't test the PPF conversion yet, it bugged a bit in previous version and I guess it still does (though I did some changes). The PPF conversion doesn't work at all for the "Texts" section for sure.

Additionally, I enabled the "Preferences" menu. The only settings that can be done are the color of the text window and the alphabet used (in the extended text block only).

Next version will be focused on fixing the PPF conversion (and possibly adding a reading feature for .ppf files), adding way to edit the text opcodes (for now, it can only be removed by suppressing the "µ", not added or modified) and increasing the maximum text length.

@ shikulja : Thanks, I just saw you fixed the image. I get the problem now, but cyrillic encoding is a bit of a mess ^^'. Can you try the program with the cyrillic alphabet and tell me if there are still bugs? If that works, I'll extend the cyrillic/greek display to every text extracted from FF9.
The fonts I use are "Cyrillic Basic" for cyrillic and "Symbol" for greek.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-27 10:12:37
program need wxmsw294ud_richtext_gcc_cl.dll

(http://i48.fastpic.ru/big/2013/0727/03/319a5cabe96aff06341f8d5304f4df03.jpg) (http://fastpic.ru/)

give me program with the cyrillic alphabet  or on new version incluted cyrilic?
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-07-27 16:04:25
I'm having the same error here,
(http://img809.imageshack.us/img809/4061/21qg.jpg)
I have a question: this new version have to insert text in *. txt? in the previous version only had to extract

tnanks for you reply my friend
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-28 16:46:42
When you have problems like that, you can always google the dll. I added it to the zip file nonetheless.
I may add an import feature for texts but that's not my priority at all.

Sorry for the missing dll.

EDIT : there were more than 1 missing dll... I'm re-uploading the thing.
EDIT 2 : Done.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-28 18:31:07
it is >preferens>game alphabet>cyrilic   

1. font not normal  in box(1 image)
2. program is hang when i "overwrite binary file" (2 image)

(http://i46.fastpic.ru/big/2013/0728/a6/e010f04a79a37ac92734d0512329c8a6.jpg) (http://fastpic.ru/)


other
(http://i47.fastpic.ru/big/2013/0728/09/0308ac82af20df4852f70dbb4d926209.jpg) (http://fastpic.ru/)




Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-07-28 19:55:26
When you have problems like that, you can always google the dll. I added it to the zip file nonetheless.
I may add an import feature for texts but that's not my priority at all.

Sorry for the missing dll.

EDIT : there were more than 1 missing dll... I'm re-uploading the thing.
EDIT 2 : Done.
Thanks Work very well, but when I Overwrite binari file the program crash and alsot the text are limited, but there is a method to edit freely, I say in the matter of adding many characteres as you want?

OBS: it's hard to know how to move in a program of this size, just as it is a great game franchise like Final Fantasy IX, good luck on your project.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-28 20:32:43
Ultimately, I guess that might be possible, but no one ever succeeded to do a thing like that on an ISO for what I know. The problem is that adding more characters means "pushing" the datas in the file and it doesn't like it.
Fortunatly, there is an extra space empty and unused after the text dialogs (it varies between 0 and 2048 extra characters for one text block). So I can use that space.
The only cautious is that I don't know exactly everything about how dialogs are encoded and I just need to do some tests to get it working well. I'm not planning on pushing the limit more than that.
Also, keep in mind that a lot of the texts in a text block isn't actually used (dialogs from CD X but present in CD Y, debug dialogs, etc...).

I can't reproduce the "overwrite save datas" bug. Does it happen even if you only edit a spell's power? Or is it related to text?
Did it re-scanned the file? The .hwf should be updated. If that's the problem, just delete the .hwf file and let the program redo one.

@shikulja : I think "Cyrillic basic" is meaningless then, since you have already the good font everywhere else (that wasn't the case in your previous screenshot)...

Anyway, I'll try to be a bit faster on the next version, so everything can work properly.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-28 21:15:48
I can't reproduce the "overwrite save datas" bug. Does it happen even if you only edit a spell's power? Or is it related to text?
Did it re-scanned the file? The .hwf should be updated. If that's the problem, just delete the .hwf file and let the program redo one.

1. and text and spells
2. yes rescaned automatic
3. yes delete .hwf file  not help
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-07-28 22:23:19
is random, but the same error occurs
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-07-30 09:01:21
Updated for a bug-fix version :
- Saves and PPF exportation work properly,
- Added a character filtering for the "Edit Text" window,
- You can export text using the extended opcode names if you find it more readable,
- Minor charmap changes.

Note that if you try to put unrecognized characters in texts (since there is a filter, the only way to do it now is to copy/paste them), the program will no longer crash on saves but instead turn those characters into "?".

I also modified the "Game langage" preference : it no longer change the font but change the encoding instead. I really have little clues about how I could make the program compatible with non-West European charset but if it is miraculously of any help, let me know it...
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-30 10:07:48
Working. but it still makes little sense ((
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-07-30 10:18:42
you can change the font to Arial. there is also Latin and Greek, and Cyrillic?
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2013-08-06 23:21:49
Saves and PPF exportation work properly,

can it open saved ppf's? i would love that...
Title: Re: [FF-IX] Hades Workshop
Post by: demeterf on 2013-08-07 15:28:46
Hi!

This is a great program,
I'm waiting for the updated version, that can handle more text in dialogue boxes.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-14 20:15:11
Update.
I'm not spending as much time as before on that, unfortunatly :/

What's new :
- Character limitation is much more flexible for enemies and dialogs,
- You may move and remove opcodes in texts (not add yet - I do not guarantee it's bugless with every opcodes),
- Buttons are displayed in dialogs' preview,
- New pages in dialogs are now displayed with a ¶ instead of a space (it mainly affects Mogster's explanations),
- Font of the text editor switched to "Arial".

EDIT : Forgot to tell you that, if you can write lengthened texts, the text boxes' won't be resized accordingly, so you can't put anything you want either.
To change the box sizes, I guess it'll need to edit the scripts. That's on my to-do list but it's quiet a huge work (I'm a bit experienced on it by now, but I need to make the program read .ppf first).
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-17 08:49:07
Actually, I changed my mind. I won't do a .ppf reader but I'll add a way to save changes in a custom format. It will allow you to pass changes from a disc to another, for instance.

But there's also a trick to load .ppf (and be able to make changes in more than 1 shot ><) :
- Save your .ppf with the option "Add an undo feature",
- Apply your .ppf to your file,
- Open your patched file with Hades Workshop,
- Open each of the tabs (in order to load datas),
- Apply the undo patch,
- You may now export the additional changes you made as a PPF.

Note that "Export as PPF" works this way : it compares the datas between the file in your hard disc and the file you would obtain if you used "Overwrite binary file". The result is a patch that allows the upgrade :
from the file in your hard disc
to the file in your hard disc + the things you edited.

That's why you have to apply the undo patch before exporting as a PPF, so the file in your hard disc be the initial game file.

But this is a temporary trick. I mean I hope that next version you won't need it anymore.
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2013-08-18 01:19:36
Great, thanks for the effort man. looking forward to the custom file export feature.
Title: Re: [FF-IX] Hades Workshop
Post by: Gine on 2013-08-23 10:19:34
I tried to translate FF9 in Asian language (Thai language) with Hades Workshop.

But it is always change to ??????.

I think it is because there are no alphabets in char table.

The problems are,

1. I don't know how to add/replace it into char table with hex edit tool.

2. I don't know how to use char table from QwimmWiki to find the position of char table.

Can you advise me to do this.

Thanks.  :)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-23 12:42:01
I may try to implement asian support, but that'll take some work. I can't see the proper japanese characters in QwimmWiki and I guess Thai isn't written with kanjis anyway...

To be sure I properly got your problem :
1) You have a game version with an Asian alphabet,
2) When you open your file, dialogs and texts are meaningless because they use Occidental alphabet,
3) You copy/paste the dialogs you wrote somewhere else (with a notepad or something) in Asian alphabet,
4) You end up with texts in-game full of "?", as well as when you close/reopen the file using HW.

Are all these points right?
Title: Re: [FF-IX] Hades Workshop
Post by: Gine on 2013-08-23 16:34:53
1) I have English version of ff9.

2) It open perfectly fine in English language.

3) Yes, I did that.

4) Yes.

Thanks for your reply.  :D
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-23 17:12:16
I see, thank you... Unfortunatly, I can't force the game to use another alphabet than he uses. I'll try to see if I can figure out how to make it (if wiki's informations are right, I know where to look at least), but that will definitely take some time...

Also, how many different characters would you need, approximately? less than 200? more than 600?
Title: Re: [FF-IX] Hades Workshop
Post by: Gine on 2013-08-23 17:39:26
They are less than 80 characters.  :)

Here is the alphabets in Unicode for your reference.

http://www.unicode.org/charts/PDF/U0E00.pdf

Thai number is not important.

Whatever it can or can't add Thai alphabets.

I appreciate with your concern. Thanks.  :D
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2013-08-25 21:17:29
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...
(https://dl.dropboxusercontent.com/u/50488782/models/itoikenzaFF9Change.PNG)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-26 19:23:57
Yeah, I know, I need more investigations on commands, but since dialogs was most asked, I went for it first.
Editing the "Change" spell also makes strange results : it seems to apply both the "change row" effect and another effect you would put.

Btw Gine, I found where a charmap is being defined from an image (that draws the characters). I had trouble reading images but Zidane_2 succeeded there, so I guess it may be possible in a relatively near future to use a custom charmap made from an image you'd import.
Title: Re: [FF-IX] Hades Workshop
Post by: Gine on 2013-08-27 16:06:32
Wow. That's great.  :D
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-28 01:23:17
Update :
- Added "Open Mod" and "Save Mod" to save datas in a special file (.hws). They can be used to share modifications across multiple files. Hotkeys for them are Ctrl+Shif+O and Ctrl+S ("Overwrite binary" hotkey has been changed to Ctrl+B),
- Added names for text blocks,
- Added options to sort text blocks similar to the ones for enemies,
- Added unknown flags in spell datas (if you figure out what's their purpose, I'm interested ^^ I guess some of them are about counter-attacks).
- Re-added the extra texts in battle.

About sharing datas across different CD for enemy and text datas : as you may display it, each battle and text block as an ID (identifier). The program simply uses that ID to identify the battles.

I had a lot of bugs with saving and opening .hws files at some point and I'm unsure I fixed all of them. You may got fatal errors or less important bugs... I'll release a bug-fix version soon if that is the case.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-28 22:02:39
Link down...
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-28 22:06:11
That's because I'm updating it ^^'. There was indeed few bugs.
There was an old bug happening when you open/close several files in a row and a bug that made Enemy datas not always saved in HWS files.

Link's back in 10 min :P
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-28 22:23:55
How can you change (add/remove) magic from command groups?
If I remove Fire from Vivi black magic and I equip the first fire staff, he will not learn it?
If I add Holy to Garnet white magic, will it be automatically learned or will it need the item?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-28 22:45:57
"If I remove Fire from Vivi black magic and I equip the first fire staff, he will not learn it?" -> Didn't test it but I guess he'll still "learn" it but won't be able to use it in battle (though it may be useful for Steiner's sword).

"If I add Holy to Garnet white magic, will it be automatically learned or will it need the item?" -> She automatically learns it and can use it in battle (if she has enough MP).

I'm glad some people are interested in modding battles and not only translating the game because that's what I like most too ^^.
Those things are to be improved. I don't know exactly what I'm gonna do next... That may be either that (fixing/improving commands and spells), working on scripts or adding things Landon and Zidane documented about.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-28 23:08:23
It will be nice to tweak a little the class experience...
Is there a limit to known abilities?
Can a char know other's abilities without some major animation problems? Like zidane performing lancer or some black magic...

Tomorrow I'll play a little with some modifications.

Very nice tool. One I would never expect to exist. Certainly opens the way to some major  FF IX mods.

Sir Knight,  I must give you the road...
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-29 09:51:54
Thanks :)

As far as I know, the only abilities with animation problems (for the playable characters) are Freya's abilities with the exception of Lancer (because there is no channeling).

There are also problems sometime with enemies abilities not made for being casted by allies/on enemies. "Purple Haze" (it's Troll's "Solution" ability, btw) is a good example of what may happen : when they do it, enemies go near the target and then release their stuff. However, as a party's spell sfx, the caster doesn't approach the target but you still see purple stuff on both the caster and the target.

Apart from that, there are special effects that should never be used for a regular spell, such as the infamous Ultima, which freeze the game after it's done. You can only access those by checking "Enable all animations" (though I may change this system in the future).
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-29 10:10:02
But you can't change the animation for a specific char, right. If you change a monster ability animation to fix the compatibily with a player, it would corrupt the original atack from the monster, correct?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-29 10:24:46
I guess (never investigated it) it would apply the change to both the enemy and party versions. But I'm confident that, depending how you'd do that, it may fix the problem with no side-effect for the enemy version.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-29 13:58:27
Update again... I found other bugs.

This one is a bit more annoying, since data was not saved in HWS the way it should have been. That means I'll add a "debugging" version of the program : it will load HWS files you created with the previous versions - or at least what it can retrieve - and save them bugless. Just "Save Mod" after having loaded a HWS file. Note that the bug only happened on "Enemies" and "Texts" datas : if you didn't use them in your HWS, no need to download the debugging version of the program.
Once HWS have been saved back, you have to use the regular version also. It's really only for people who spent some time creating a HWS file for their mod and don't want to do that again.

Hades Workshop - Debugging version (http://www.hiveworkshop.com/forums/pastebin_data/fxqiwr/_files/HadesWorkshopDebug.zip)
TO BE CLEAR : do NOT download the program with this link if you didn't use the version 0.17 or 0.17b or if you didn't save any HWS file with it. Download the program from the 1st post of the topic instead.

Sorry about that... It should be fine now since I used the new version for some time and didn't have anymore bugs with HWS files.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-30 08:59:45
Ok... At first glance, everything working ok except I can't make ppf patches work on epsxe, it loads but simply does nothing.
Editing the .bin works.

Some animations are broken (rey's wind makes garnet do some crazy break dance, others make the char go into a defence stance) but overall, it works.

You cannot add a new ability, so you have o replace an existing one (boring for zidane).
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-30 17:56:16
I didn't succeed to make ppf patches work with ePSXe "Auto-apply ppf patches". Either we do it wrong or the ppf version my program makes is not compatible (it creates ppf 3.0). You can use ppf-o-matic instead since it perfectly works with it.

Since I'm at it, and since I'll surely have hard times working on that with the incoming end of the holidays, I'm updating one more time to fix a rare bug that corrupted the ppf exportation.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-08-31 17:38:49
Confirmed... Changing freyas animations makes them compatible with other chars, but breaks the original animation... Still worth it anyway...
Why is carbuncle divided in 4 spells, and witch one must be added to the summon command?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-08-31 20:21:06
Carbuncle has different effects if Eiko's wearing special ores (Emerald, Diamond and Moonstone). The Ruby Light (gives reflect) is the original one. Same goes for Fenrir who is different when Eiko wears a Maiden Prayer.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-09-01 10:10:26
I underdstand that... But wich one must I add to have the default attack? The reflect one? And it will still change based on the addon? And will it change based on the char using the ability or just eiko?

Oh, and by the way, how about two small arrows to order the abilities list?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-09-03 08:05:57
The reflect one, yes, and it will take the addon in account whichever character use the summon.
Sorry for slow answer... And thx for the suggestion, that'd be better indeed.

By the way, the 4th spell flag (the 2nd "Unknown" one) is about Counter attacks while the 8th is about Return Magic (it's only used by ennemies). But you can't counter or return a magic if the attacker/caster is a friend.

There's also informations about enemies' "Auto-statuses" and "Initial Statuses" :

[General]
With the exceptions of "Doom" and "Gradual Petrify", the battles are not won because of an auto/initial status.
When a status can't be cured, it means it can't be cured by any way (spells, items, time, physical attacks...). They might be cured when the enemy dies but I didn't investigate it (Sand Golem is the only enemy I know that can actually be revived).
Color changing is quiet bugged. It doesn't change in the right color most of the time.
[Blind - Reflect - Silence]
Init : status is applied at the beginning, works fine and can be cured.
Auto : status is applied at the beginning, works fine and can't be cured.
[Trouble - Confuse - Stop - Defend - Zombie - Virus (remove Evasion)]
Init : status is applied at the beginning, works fine and can be cured.
Init + Auto : status is applied at the beginning, works fine and can't be cured.
[Shell - Protect]
Init + Auto : status is applied at the beginning, works fine and can't be cured.
[Haste - Slow]
Auto : displays the SFX but doesn't do anything else.
[Sleep - Float]
Init : status applied but cured immediately.
Auto : status is applied at the beginning, works fine and can't be cured.
[Berserk]
Init : status is applied at the beginning, works fine and can be cured.
Auto : status is applied at the beginning, works fine, can't be cured but doesn't change the color.
Init + Auto : status is applied at the beginning, works fine and can't be cured.
[Regen]
Init : status applied but cured immediately (regen HP once).
Auto : status is applied at the beginning, works fine and can't be cured.
[Poison]
Init : status applied but cured immediately (deals damage once).
Auto : displays the SFX but doesn't do anything else.
Init + Auto : status is applied at the beginning, deals damage faster than usual and can't be cured.
[Venom]
Init : status is applied at the beginning, works fine and can be cured.
Auto : status can't be cured but only disables the attacks.
Init + Auto : status is applied at the beginning, deals damage faster than usual and can't be cured.
[Vanish]
Init + Auto : status is applied at the beginning, works fine, can't be cured but doesn't make invisible.
[Mini]
Init : status is applied at the beginning, works fine and can be cured. The enemy is however still normal-sized until it is hit.
Init + Auto : status is applied at the beginning, works fine and can't be cured. The enemy is however still normal-sized until it is hit.
[Doom]
Init or Auto : does instant death (with "Death" message displayed).
[Gradual Petrify]
Init : status is applied with a very fast countdown. Petrify in less than 5 seconds with any spirit value.
[Trance]
Init : makes the enemy shine and uses an attack countdown. The enemy stops shining and the battle bugs when the trance ends (for me, the next attacker was stucked and couldn't do anything until he died-revived while the others kept attacking).
Init + Auto : makes the enemy shine and can't be cured.
[Heat]
Init : status applied (color change) but cured immediately.
Auto : displays the SFX without changing the color but doesn't do anything else.
Init + Auto : status is applied at the beginning, works fine and can't be cured.
[Freeze]
Init : status applied (color change) but cured immediately.
Auto : displays the SFX without changing the color and only disables the attacks.
Init + Auto : status is applied at the beginning, works fine and can't be cured.
[Death]
Init : the enemy has greyed name and can't be targeted (or cancel the spells targeting it). Game crashs if the battle ends (if you run away...).
Auto : the enemy has greyed name and stops attacking when its HP reach 0 (and keep displaying its death animation everytime it's dealt damage) until it's healed.
[Unknown (may be KO)]
Similar to "Death" but doesn't grey the name and disables the enemy's animations when it's hitted.

I'll try to think of a nice way to put informations like this in the "help" tab.
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-09-03 14:24:07
How far are you from equipment editing and texture replacement (like making steiner use beatrix textures, for example)?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-09-03 15:21:31
I've all to be done, but, as said, I can use the work Zidane_2 made so far. For equipments, there are complications I explained somewhere about RNC compression and I still haven't found any working solution for it (I have still few ideas, though, but that needs testing). Not to mention I'm indeed having hard works to do and I can barelly do few tests for Hades Workshop...

But what do you mean by "steiner use beatrix textures" ? You know about UV Mapping, right? If it were only replacing a texture by another, it could be done by copying a block of data from somewhere to somewhere else.

I guess I'll go for an exporting manager next : to include Zidane_2's tools in the program and try to make the corresponding importing features. If I can find more datas on spells and commands, that'll be good too (but I'm afraid some of them are RNC-compressed in some versions).
Title: Re: [FF-IX] Hades Workshop
Post by: eXistenZe on 2013-09-03 21:08:04
You can make a spell use another's animation and textures, right? Is it much different with a char?
And btw, increasing spell amount in a command list, is it possible?
Title: Re: [FF-IX] Hades Workshop
Post by: Tenko Kuugen on 2013-09-03 21:33:33
I'm keeping such a close eye on this that I will definitely make a full blown hack with this eventually. FF9 is my favorite FF game ever.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-09-04 16:53:43
@ eXistenZe : You mean the model? Textures are only drawings. I think it'll be possible to edit scripts (and add Beatrix to the party inside the story) before importing models for fighters.
And yes, you can add spells to commands with the limitations I explained (that is : special commands like "Attack" or "Defend" are hardly editable and you need to link commands or remove spells somewhere before adding others somewhere else).
You can link the 2 "Seiken" commands together as well as linking Dagger's "Summon" with "Eidolon" to gain 12 spell slots in the commands. I have no idea how I could increase the limit and I don't think I will before a long time.

@ Tenko Kuugen : It's mine too :D
Looking forward your mod.
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-09-12 04:18:11
It's a awesome project, its very great work Tirlititi congratulation, but i found a bug see



the the balloon text do not expand, its because the size of the block?
(http://img822.imageshack.us/img822/8708/pvu5.png)

same thing, but its different
(http://img856.imageshack.us/img856/3494/xtey.png)


try insert many text and you see..

thanks and continue with this wonderful project, you're the best
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-09-12 20:44:40
Hey gledson, thx a bunch.
I already knew that but you actually made me remember a thing I wanted to test about it and it turned out I was lucky :)

So, to make it short, you will be able to modify bubbles' size as soon as the next release comes out (I guess this week-end).
Good luck for translating the game.

Also, battle scenes will be exportable. That's not a big news since Zidane_2 already made a tool for that, but you can expect to be able to replace them in-game soon (there'll be size limitations, as always, though :/ ).

EDIT : Update delayed. I had a bad bug, fixed now, but there are still minor things to fix. I'll do it tomorrow.
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2013-09-12 21:54:35
thanks man, I wish you luck in your great tool
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-09-16 19:02:54
Update.
- Added Battle Scene exporter :
--- The loading time when you get on the panel is quiet long ; maybe I'll make it so all the BS are not loaded in one shot at this moment,
--- Y axis is inverted, as in Zidane_2's exporter, I don't know why but it doesn't work if I don't do that...
- Added controllers for dialog bubbles (in the "Texts" panel only) :
--- In the other panels, there is either no need for it (spells descriptions' bubbles are auto-sized, for instance) or it can't be edited at all (spell names...),
--- The preview is not 100% accurate (for the width mainly),
--- Additionaly, bubbles' size are sometime variable (ATE-picking dialogs, for instance, are smaller if not all the ATE are available).
- Added a "Help" window. It is some advanced help written there for the moment ; I don't know if I should add some tutorial-like help for now...

I understood a much more about TIMs images (that wasn't easy ^^'). It will be useful for all that is texture-related (and the charmap).

Also, some of you have already noticed, but I added a sample of "secret" dialogs, never actually used in the final version of the game but still present in the binary file. These 3 dialogs are not all the ones you can find, but there are some of them that can't be found in the US version of the game. You can read them in the 1st post of the thread.

PS. : the upload was frightenly fast this time :O
Tell me if there are bugs with the uploaded files.
Title: Re: [FF-IX] Hades Workshop
Post by: demeterf on 2013-09-23 11:20:33
Thanks!
Title: Re: [FF-IX] Hades Workshop
Post by: R51 on 2013-11-02 18:26:09
I just decided to check this out and it looks pretty slick so far, especially given the lack of other FF9 tools out there. I'm a little confused at what I'm looking at in terms of the enemies, though. Is there any sort of documentation that explains that part? I guess a big part of it could be explained if the enemy data changes from disc to disc, as I've not been able to look t more than disc 1 so far. Beyond that, though, I'm a bit confused on the enemy groups. For instance, why are there six apparently identical entries for Vice at 088,089,and 08C-F? Also, there, why in those same enemies are there Frequences of 40 and 255? What do those two numbers mean?

If any of this is explained in a wiki or anywhere else, thanks in advance for a link, and thanks again for the tool itself!
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-02 19:12:49
Hi. Long time no see.
Version 0.19 out, more to reassure you that I'm not dead than to be an useful update...  :P
- You can import models for Battle Scenes (geometry only, not texture yet),
- Exporting quads is fixed now (at least Blender can read them with most gfx cards),
- You may also change the colors a bit, as well as reorder textures, in Battle Scenes,
- You may now choose not to load texts (names, helps, etc...) when loading mods,
- Added 2 spell effects (Absorb Strength and Absorb Magic).

The bad point :
the size limit... You have between 0 and 2048 free bytes, which is really poor when it comes to models.

The good point :
textures should be importable soon (I guess it'll take much less time than geometry). I hope it will allow a decent way to get more space by optimizing the textures.

Note : the model's format must be .obj (the importer doesn't read the related .mtl file). Each faces be either a triangle or a quad and must have a texture and an UV mapping associated to it. If the program can't interpret some features of the model, it will display a warning and ignore them. Once a model is successfully imported, you must link textures ID from the imported model to the texture list available in the Final Fantasy file (Blender, in particular, tends to un-sort them).

Pfiou, it was really hard for me to make that importer. And I'm so busy with my studies these times... :'(

Thanks for the thx, demeterf, by the way !

@ R51 : posting when I update ^^' speak of a coincidence.
About enemies, there are several things.
- Enemies are often duplicated : I think there is 1 instance for each different battleground (or battle scene) they may appear in. I'm not 100% sure that's the only difference but, for instance, the Big Dragon in the Mist Continent's mountain and the Big Dragon in the Forgotten Continent's plains are separated.
- Additionaly, there are enemy groups (or enemy formations) : they are variations of the same battle, with more or less enemies in it or different enemy types (eg. : Carve Spider or Carve Spider + Axe Beak). The Frequences are the probability you fall on each formation given you have already fallen on that battle. Frequency of 255 is same as 100, actually.

There is a help (F2), which I should update but still gives some useful informations (it strangely lags a bit though...). Don't hesitate to read it if that's not done yet ^^
Also, I tried to answer a lot of questions in this thread, so you may also read it if you have time to spare :P

Thanks for the feedback.
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-11-04 06:45:55
Thanks for the update. Im always checking this. Awesome job on the whole import models work you are putting into this program.
Title: Re: [FF-IX] Hades Workshop
Post by: DanTsukasa on 2013-11-13 11:10:25
Ah this program is awesome!

Is there anychance it might be able to export the models/textures of the world map at any point?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-13 15:29:17
Thanks. To answer you, it might be possible, but I think Zidane_2 (him again !) made a program to see the world map already. I don't remember how it worked (if you could export the models or only see it) but I may try to add this feature in the future.

However, for now, my short-term plan is :
- add a battle scene texture importation,
- add a charmap texture importation (not really advanced : I think you won't be able to see the changes for the texts in the program, only in-game),
- add a section for the party's stats.
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2013-11-13 15:45:10
Tirlititi: don't forget my request, please. the change and defend editing, remember i wanted to change "change" into any choice movelist?
Title: Re: [FF-IX] Hades Workshop
Post by: DanTsukasa on 2013-11-13 17:37:24
Thanks. To answer you, it might be possible, but I think Zidane_2 (him again !) made a program to see the world map already. I don't remember how it worked (if you could export the models or only see it) but I may try to add this feature in the future.

Aye, Zidane_2 made a bunch of software written in Blitz3D for FFIX, I've put the sourcode here (he gave it to me a while ago) so you can grab it if you like, it just sits in there all the time anyway.

Here: https://www.dropbox.com/sh/azf19y7homu8qnj/u-JOQibN1q

Unfortunately you couldn't export from his viewer, it was only that, a viewer, it was pretty good though.
I actually have the sourcecodes to everything he ever did for FFIX, I'd be happy to share it with you, I've got his permission to share it so its not a problem, might help you a little. It's all written in Blitz3D though, so you'll probably have to get the trial version of that.

A guy on the Xentax Forums managed to make a little progress in figuring out the format so I can always provide that info too.

Eitherway this program is awesome and your aforementioned updates sound great, IX doesn't get enough love honestly, I'd love to be able to go in and HD the game with higherquality textures (and perhaps a more painterly art style Ala Bravely Default) some time.

EDIT: In the end I just threw in all the sourcecodes for all the Zidane software he gave me (basically everything he put on the forums plus a few more things he never shared because they were incomplete.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-13 20:06:24
Wow, great !
The Blitz3D script seems exploitable at first glance. It'll be useful anyway :D

Itoikenza, I didn't forget your request nor the fact that the "Commands" section is bad for now, but I can't guarantee any result in this since I don't know where (and how) those datas are stored. I'll try to figure it out when I'll go on Party's stats, but I can only cross the fingers for that :/
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2013-11-14 14:02:27
Wow, this is a wonderful tool! I was testing it, 'cause I plan to use this for my future projects with FF9. I have a question, Tirlititi: can this tool hack the equipment/item/key item/location names?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-14 16:29:37
No, not for now. It's on my to-do list though. Good luck with your project :)

About location names, you may edit them (they are world map texts, even if you would need to change them in all the dialogs too) but it's not working so well as I need to implement text opcode editing.
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2013-11-14 17:30:30
Ah, cool. I'll be waiting for the next update. ;D

Oh yeah, I forgot to mention the Card names. I edited the monster names with Hades Workshop, but the Card names are still the same. Guess they're stored somewhere else.
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2013-11-23 09:59:48
It seems that the program can't edit some eidolon attacks yet. These are the ones I didn't find:
Title: Re: [FF-IX] Hades Workshop
Post by: Caledor on 2013-11-24 12:08:34
I don't know if you already have info regarding items and equipment text so i'll just tell you what i've found.
Items/Key Items/equipment/card names are are located into the SLES/SLUS file in ff9 text format. Pointers for equipment and item names are right above the names, in blocks long 18 byes each, with the first two being the actual pointer. Key item pointers are located after the names instead, but not directly after (there are 386 bytes between the end of the block of the names and the first pointer to key item names in the italian SLES file) in blocks 7 bytes long, with the first two being the actual pointer. I'll try editing card names next so tell me if you need infos about them too. I hope to have saved you some time, keep up the good work!  ;-)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-24 21:53:21
Thanks :D It will save me some time indeed.

@ Kikoutei : You mean they are not in the spell section list? :O
I have them... They are named "Atomos", "Carbuncle" (4 of them, including Ruby-light) and "Fenrir".
Or maybe you speak about the animations or about the effects? Eidolons' effects are quiet weird and you can't change the "ores powerup" effect on them, I guess.
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2013-11-24 22:03:24
@ Kikoutei : You mean they are not in the spell section list? :O
I have them... They are named "Atomos", "Carbuncle" (4 of them, including Ruby-light) and "Fenrir".
Or maybe you speak about the animations or about the effects? Eidolons' effects are quiet weird and you can't change the "ores powerup" effect on them, I guess.
Their names and attacks are not in the same place, believe me. Just like "Rebirth Flame" and "Phoenix". "Phoenix" is shown in the Summon list, while "Rebirth Flame" is shown in the attack/skill message box. Yes, some Eidolon attacks are located somewhere else, I found them using a hex editor.

(http://i830.photobucket.com/albums/zz229/Kikoutei-sama/FF912_zps7a4e7d6d.png)
Title: Re: [FF-IX] Hades Workshop
Post by: Caledor on 2013-11-24 23:57:40
Thanks :lol: It will save me some time indeed.

Glad to have helped. I'm really looking forward for the time when every single string of the game will be editable with your tool.
Ah, and when everything is finished you should consider adding a search function and/or an export/import function to allow easier editing of multiple strings.
Title: Re: [FF-IX] Hades Workshop
Post by: Bosola on 2013-11-25 19:26:12
I haven't really looked at this application, but I thought I'd chip in with a few suggestions.

The first one is to try and avoid storing player modifications as binary files. Seriously. This was a major mistake with the FFVII tools and I really do think it has harmed serious efforts to create large scale modding projects for years. Player changes should be saved first as text files that represent the state of the model (not binary changes). This is really, really important, because it makes mods portable, it lets modders use source control and it makes it feasible to update the implementation of a particular effect etc. without forcing modders to rewrite their projects. This won't always be possible in all circumstances, like model or texture assets, but it's an absolute must for mechanics / stats patches.

The reason is that with 'abstracted' user files, it suddenly becomes trivial for a modder to immediately port a project to multiple international releases. They can store their projects in subversion and branch / merge features as they see fit (branching binaries is arduous; merging them is practically impossible). Updates to tools are no longer as risky, as if a tool's compile / save to PPF messes up a project, you can always wait for the next release and compile again (unlike with some of the FFVII tools, which occasionally lose data on save and force some very time-intensive regression testing). Faulty implementations are bound to tools, not project files, so modders can continue working on stuff whilst tools get fixed.

The other big thing is that abstracted project records can expose implicit global variables in the binary - like duplicate enemy records - without much trouble. In fact, the model doesn't have to represent the binary file at all - if you want to give users the ability to create monster attribute inheritance chains that don't exist explicitly in the binary, you can do so without (much) trouble.

I'm being a bit prejudiced here - I haven't seen your code, I'm just assuming it looks like a lot of the projects I've seen round here before - so possibly you've already considered this. But as it sounds like your project is growing steadily, you might want to think about these things as they'll have architectural implications (because they'll force you to separate out your model).
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-25 20:45:39
So, first thing first, I've updated the program :
- It can now kind of import textures for the Battle scenes models.
- The help is improved a bit.
- I think the dll are not required anymore (it turns out they were only debugging dll ^^').
- Some few bug fixes.

I didn't test the model importation thoroughly but it seems to work, more or less (exporting a model + re-importing it elsewhere works at least).

I'm not really satisfied with the way I handle it because :
1) you have to manually import textures and models separately and make the link after.
2) The texture you can import must not be larger than 768x256 (3 times a 256x256 texture, which is what most of the default scenes use).
3) There are 2 opposite needs concerning textures and UV mapping : the UV mapping in the model must refer to a 256x256 part of the full picture (called "Painting" in the program) but the importation process creates a palette, which is quiet complicated by itself, and would better require the textures to be splitted into smaller parts to have a better resolution (a palette is limited to 256 colors). I really don't know how to make it nice...

Tell me if I made a mistake and the dll are still needed (I don't think that's the case, but who knows...).

@ Kikoutei-sama : Ah, their names... Yes, that is somewhere else, in a more general text block. I'll try to give access to it.

@ Caledor : There is already an exporting feature, but I know that's not that convenient. I'll think about it (a search feature, I guess) but it would be a waste of time to make it before I find a definite way of managing the charmap (if I want the program to be able to write texts in, let's say, chinese, I have to re-write the way the texts are handled by the program).

@ Bosola : I'm not sure to fully understand you. First, models are not the only thing Hades Workshop can edit. Second, I don't know how the FF7 tools you're refering to are coded, but I tried to make the binary saves (the "Save Mod" feature, if that's indeed what you're talking about) looking alike the binary data in the FFIX disc : this way, a program reading a FFIX disc should have little problem reading my files.
Actually, the differences is that
1) there is an header in my file and each data blocks begin with one or several identifiers (which are, if I can do it, also using FFIX's standart : I use the chunk type list and the object's identifiers, for instance).
2) there is no "offset constraint", so the data blocks can be however large or in whichever order they want.

Of course, my system is far from being perfect. I think the last time I looked about it, I told myself that I should have add more "Version bytes" to make the format a bit more flexible (for spells, for instance, I think I'll add to write datas related to Kikoutei-sama's issue in a separated data block instead of just writting them next to the other spell datas).

Tell me if I missed the point or if I'm not clear ^^ That's likely to have happened.
Title: Re: [FF-IX] Hades Workshop
Post by: Caledor on 2013-11-26 08:39:32
The exe keeps asking for dlls. Could you please add them back?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-11-26 09:03:25
Hurray for my dumberness ! (http://forum.ffdream.com/images/smilies/banane.gif)
I didn't test it properly then... They're back.
Title: Re: [FF-IX] Hades Workshop
Post by: Bosola on 2013-11-28 20:01:59
@ Bosola : I'm not sure to fully understand you. First, models are not the only thing Hades Workshop can edit. Second, I don't know how the FF7 tools you're refering to are coded, but I tried to make the binary saves (the "Save Mod" feature, if that's indeed what you're talking about) looking alike the binary data in the FFIX disc : this way, a program reading a FFIX disc should have little problem reading my files.

This is a good practice, as it promotes interoperability, but I don't think it goes far enough. You shouldn't just be saving to binary - for 'gameplay' data, I'd propose you should really be saving a model that may or may not be directly tied to the binary, then provide a compile step.

I can think of quite a few benefits:
If I were writing this tool, that's the approach that I'd take.
Title: Re: [FF-IX] Hades Workshop
Post by: xenokain on 2013-11-29 21:35:05
The tool works perfect,thanks for putting back the .dll files because I couldn't find one that was missing.
Title: Re: [FF-IX] Hades Workshop
Post by: DanTsukasa on 2013-12-05 10:07:45
Though I would share this on the worldmap from a guy on Xentax that was looking into it (for 20 minutes no less).

Vert coordinates and stuff, honestly I don't entirely know what to do with this information so I figured I'd share it here.

Quote

WorldGridW= 24
WorldGridH= 20

V1=2

(seek > 0x1000)

-> function loadSetka2(fil,1,1,13)

tmp1= 0x1000

ffs%=524548
point%=18432

dffs%= 8
mesh[0]= 24
mesh[1]= 4028
mesh[2]= 8216
mesh[3]= 12140

seek > 0x1018
numvert= 118
numTri= 189

VertPointer= 0x3C
TriPointer= 0x3EC

(seek > 0x103C)

//reading 118 vertices

Code:
#    0x103c
v 8.000000 62.466797 58.000000
v 7.675781 63.165039 58.481445
v 7.675781 62.676758 58.481445
v 8.000000 62.890625 58.916016
v 8.000000 63.378906 58.916016
v 2.000000 63.316406 59.892578
v 0.715820 0.000000 59.000000
v 2.000000 0.000000 60.039063
v 2.551758 63.316406 57.777344
v 1.797852 0.000000 57.000000
v 2.117188 0.000000 57.613281
v 4.000000 0.000000 60.146484
v 3.208008 63.316406 59.295898
v 3.338867 0.000000 59.663086
v 7.000000 63.488281 59.101563
v 8.000000 0.000000 59.062500
v 2.865234 63.316406 60.000000
v 3.012695 0.000000 60.146484
v 0.947266 63.316406 59.000000
v 0.819336 0.000000 57.951172
v 1.671875 63.316406 57.990234
v 1.050781 63.316406 58.163086
v 6.000000 63.679688 59.577148
v 7.000000 0.000000 59.248047
v 2.000000 63.316406 59.000000
v 8.000000 61.965820 56.255859
v 7.617188 61.685547 56.000000
v 7.617188 61.553711 56.250000
v 7.284180 61.770508 56.809570
v 8.000000 62.458008 56.656250
v 7.258789 61.783203 56.333008
v 8.000000 62.241211 56.562500
v 2.000000 0.000000 62.000000
v 1.000000 0.000000 63.000000
v 2.000000 0.000000 63.000000
v 1.000000 0.000000 61.000000
v 1.000000 0.000000 62.000000
v 1.000000 0.000000 0.000000
v 2.000000 0.000000 0.000000
v 3.000000 0.000000 62.000000
v 3.000000 0.000000 63.000000
v 3.000000 0.000000 61.000000
v 3.000000 0.000000 0.000000
v 4.000000 0.000000 62.000000
v 4.000000 0.000000 63.000000
v 4.000000 0.000000 0.000000
v 6.000000 0.000000 62.000000
v 5.000000 0.000000 63.000000
v 6.000000 0.000000 63.000000
v 5.000000 0.000000 61.250000
v 5.000000 0.000000 62.000000
v 5.000000 0.000000 0.000000
v 6.000000 0.000000 0.000000
v 7.000000 0.000000 62.000000
v 7.000000 0.000000 63.000000
v 7.000000 0.000000 61.000000
v 7.000000 0.000000 0.000000
v 8.000000 0.000000 63.000000
v 8.000000 0.000000 61.916992
v 8.000000 0.000000 60.903320
v 7.000000 0.000000 60.000000
v 8.000000 0.000000 0.000000
v 0.000000 0.000000 63.000000
v 0.000000 0.000000 62.000000
v 3.715820 0.000000 60.707031
v 0.786133 0.000000 60.000000
v 0.000000 0.000000 61.000000
v 0.000000 0.000000 59.000000
v 1.135742 0.000000 57.000000
v 0.000000 0.000000 56.000000
v 0.000000 0.000000 57.000000
v 0.000000 0.000000 0.000000
v 8.000000 62.955078 58.000000
v 8.000000 62.492188 58.493164
v 2.333984 0.000000 56.000000
v 2.000000 63.316406 57.000000
v 2.480469 63.006836 56.000000
v 1.671875 0.000000 57.778320
v 4.000000 63.316406 60.000000
v 5.000000 0.000000 60.460938
v 5.000000 63.535156 60.314453
v 6.000000 0.000000 59.723633
v 3.000000 63.006836 56.000000
v 3.000000 63.188477 57.000000
v 4.000000 63.087891 56.000000
v 4.000000 62.835938 57.000000
v 4.000000 62.998047 58.000000
v 7.082031 63.344727 58.075195
v 5.000000 63.368164 59.000000
v 4.000000 63.083008 59.000000
v 4.838867 63.087891 56.000000
v 6.000000 63.423828 59.000000
v 8.000000 62.901367 57.071289
v 6.946289 61.757813 56.954102
v 6.447266 60.680664 56.508789
v 6.657227 60.787109 56.254883
v 6.775391 60.762695 56.000000
v 6.270508 60.709961 56.729492
v 5.901367 60.823242 57.098633
v 6.763672 61.841797 57.445313
v 5.419922 61.757813 56.500000
v 4.810547 62.090820 57.190430
v 5.555664 61.580078 57.444336
v 6.222656 62.095703 57.960938
v 6.397461 61.182617 56.000000
v 5.547852 61.500977 56.000000
v 5.000000 62.343750 58.000000
v 7.310547 61.329102 56.000000
v 7.833984 61.919922 56.000000
v 8.000000 62.081055 56.000000
v 8.000000 62.449219 56.775391
v 0.000000 0.000000 58.000000
v 6.000000 0.000000 60.000000
v 8.000000 0.000000 59.847656
v 2.000000 0.000000 60.871094
v 1.513672 0.000000 56.000000
v 6.000000 0.000000 61.000000
v 0.000000 0.000000 60.000000

Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-12-05 16:28:11
shakotay2 has to be over-busy to refuse to spend more than 20 minutes on this...

Anyway, that doesn't interest me. This is the extracted data of the World Map's model (and far from all of it). If something, the structure of the datas inside the binary would be more interesting to me. But then again, I don't intend to make a World Map's model extractor before some time.

Thanks for your will to help, though.
Title: Re: [FF-IX] Hades Workshop
Post by: DanTsukasa on 2013-12-05 19:24:36
Yeah figured I'd share it since I had it laying about anyway, and I did say before I'd share it but I totally forgot.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-12-14 22:11:37
hi. how to import text block back in program?
and need export - enemies names, attacks, spells, help text, items ets
like:
{COMMANDS}
1. [ATTACK]
HELP=Attack with equipped weapon.
2. ...
3. ...
{ENEMIES}
1. [MALBORO]
Bad Breath
Thundaga
Virus Tentacles
etc..

Very need. all text import\export
because the team is already preparing for the translation of the text and game. Forward only when it will be convenient to Use text
thanks.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-12-14 23:53:10
(http://s6.hostingkartinok.com/uploads/thumbs/2013/12/cc407333c561347845eed504626d61dd.png) (http://hostingkartinok.com/show-image.php?id=cc407333c561347845eed504626d61dd)

not working export for this simbols
/translating on russian/
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2013-12-15 22:26:02
Update.
This version is quiet incomplete for several reasons, but I'm afraid I won't work on the program a lot for the christmas period...
- You can now change the charmap's image (it's in the "Text" panel) and so the whole alphabet the game uses,
- Some others UI images became also editable in the process,
- Improved the "Preferences" options,
- Thus, you can now open Final Fantasy IX, the japanese version !
- Fixed some bugs.

About what's not complete :
- The letters' width is not editable yet. If you replace a letter by another one bigger, it will render weirdely in-game. In the following example of what I mean, the latin alphabet has been replaced by the same alphabet, but bigger :
(http://www.hiveworkshop.com/forums/pastebin_data/fxqiwr/FFIX_Chmap.jpg)
- Some of the charmap textures use really few colors and take the advantage of that to have 2 different textures painted at the same place. You can't use that trick yet when you import your own texture.
- I have seen some bugs with the .ppf conversion of Battle Scenes but I didn't fixed it yet.
- For now, I suggest you to go to the "Preferences" options before opening any file, select the alphabet you want, and then only open a file. You should be able to swap between alphabets whenever you want in the next release, but it's still in-progress.

And last but not least : I have included 2 charmaps in "HadesWorkshop.conf". Those are the only ones I know because they are on the qhimm wiki. If you want to read files using other charmaps (random example : the cyrillic alphabet :P ), you'll have to PM it to me (the whole charmap, TITS all the symbols used in FFIX's texts and their order, just like these (http://wiki.qhimm.com/view/FF9/CharTables)) so I can add it to the program. You can also try to add it yourself into "HadesWorkshop.conf" using the same syntax than for the others. "HadesWorkshop.conf" is coded with utf-8 and must remain so.

shikulja, I won't add an "Import all the texts" feature for now : you'll have to simply copy/paste them from you notepad to the program.
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-12-17 02:01:00
WOW O_o  impressive!

you need to add
intro image with text
names of cities and continents
images from a card game tetra (images with text)
Images of the main menu - a new game, continue
image with text - game over
Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2013-12-17 03:29:29
(And last but not least )
It works! when I pick up all the letters and symbols I will send you.
yet in'm slightly shocked)) is what I dreamed)

(http://s020.radikal.ru/i718/1312/b6/2efb9afa106bt.jpg) (http://radikal.ru/fp/9c68addd189841fa8a9f33925003f872)

RussianPirate Charmap  Kudos and RGR
https://drive.google.com/file/d/0B6Bbbdpi5BzBMVQ3WmlQZGdYNFE/edit?usp=sharing

in the game
(http://s020.radikal.ru/i718/1312/79/f4cbf6c1107et.jpg) (http://radikal.ru/fp/dddde64d9ffc418caedf61d0446517d0)

Because of limitations - a lot of cuts (

Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-01-02 22:15:00
Updated for a bug-fix version (mainly).
- There were several bugs in savings. In short, PPF exportation didn't work when textures were involved and mod saves couldn't be read properly some texts (saves are not corrupted however).
- When you load mods and it says "There are unused things in this disc", the unused things are not discarded anymore when you save your mod back. A mod file can thus contain all the datas about the 4 discs at the same time (it was best to have 1 mod per disc until now because of these datas not used in each of them).
- The rendering problem of letters described in my previous update has been replaced by another  :-D The letters' size are very roughly adjusted from the picture's width. It's not precise a lot so there may be a little difference with normal letters' spacing.

I'm gonna add the other texts to the tool progressively.

Happy new year btw.
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2014-01-04 20:45:27
Hey Tirlititi, I'd like to change Ozma's HP to 1,000,000, but it's not working. Is it because the game's limited to a maximum of 65535 HP?
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2014-01-04 21:43:02
Yeah, HP is assigned to two bytes, and most bosses have 10000 HP off of that. 55535 is Ozma's actual HP, the highest possible amount.
Title: Re: [FF-IX] Hades Workshop
Post by: Gine on 2014-01-09 19:22:45
You're amazing!

Thanks for your work and Happy New Year. :D
Title: Re: [FF-IX] Hades Workshop
Post by: Tenko Kuugen on 2014-01-20 14:00:28
dropping in to say how much I appreciate the work you're doing and how much I'm looking forward to one day being able to create extensive overhauls of FF9
Title: Re: [FF-IX] Hades Workshop
Post by: LeonhartGR on 2014-01-20 21:06:29
...being able to create extensive overhauls of FF9

Wow...! That was quite a bomb statement! Looking forward to that myself :P :P
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-01-21 16:28:13
Haha, I wished I could go that far. Thanks for the cheers, I appreciate ^^

I guess I'm going to make one more little update before attacking the next big release. I have found another bug in saving games (this one is not my fault ! That was because of a weirdery in FFIX's datas) and I'll make it so you can import 2 pages in the charmap textures.
I've begun to make a mod myself, so I did some tests about effects and battle mechanics. I'll also put them in the help.

By the way, did you know that a fire spell cures the Frozen status? I find this kind of little subtleties great in RPGs  ;D
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2014-01-31 14:14:57
I'm having a problem here. The program crashes whenever I try to edit King Leo's name in the 'Enemies' section (I press backspace and then it crashes). It happened with the enemy party 'King Leo; Zenero; Benero'. I was editing Disc 1, by the way.

I also have a question: is it possible to add opcodes to the text with this tool?

Edit: More crashes. This time happened while renaming Ironite's Flame attack. I don't know what's going on.

Edit2: It also happened while renaming Sahagin's Water-gun, while pressing backspace.

Edit3: I applied the ppf patch I created with HW on Disc 2, and now this message appears in HW:
Quote
An unhadled exception occurred. Press "Abort" to terminate the program, "Retry" to exit the program normally and "Ignore" to try to continue.
It appears every time I go to the Enemies section. :(

Note: The error reported on Edit 3 is not related to the other ones.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-02-02 08:15:43
I don't know what's going on either :/

But you shouldn't open patched games with Hades Workshop (there is 1 unsafe thing : export a patch when the file on your disc has been modified somehow). Patches/overwrite binary should be used only to create the final version of the game. Use the "Save Mod" (Ctrl+S) option to save changes that you want to go back to later.

I'm releasing an updated version then. There is the bug-fix I talked about in my previous post : it may come from there (though it was pretty harmless if you only used "Save Mod"). You can also import 2 pages of charmaps instead of 1, increasing a bit the number/size of characters you can draw for a custom alphabet.

You were using the version 0.21b, right?

Anyway, I hope it'll be fixed without too much pain ^^' Sorry about that.
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2014-02-02 11:34:32
Yeah, it was the version 0.21b indeed.

And, well, the 'Save Mod' option is having some errors, that's why I'm using 'Export PPF Patch' instead. Some of these errors don't let me save the Memoria text block, claiming that the text was unused, when in fact, it wasn't.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-02-02 11:52:46
It says "data unused in this disc" : it only means that the Memoria text block doesn't exist in disc 1-3. You mean you opened your mod file on disc 4 and it said "Unused text block" about the Memoria text block?
Title: Re: [FF-IX] Hades Workshop
Post by: Thisguyaresick2 on 2014-02-02 11:54:58
Oops, I forgot to mention the disc, sorry. Yeah, it was Disc 4.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-02-02 12:10:14
That's a bug, then, yes.
Hum.... Maybe the japanese version has some differences about that? I don't have the disc 4 : I do my tests (about the japanese version) on disc 1 and didn't experience bugs like this for now.

I'll try to get where it comes from. Thanks a bunch for telling me.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-03-28 15:08:29
Update to version 0.22.

- Supporting abilities are now available to edit.
--- Only name, help and magic stone cost can be edited for now.

- Stats are now available to edit.
--- You can change the experience recquired to level up as well as the HP/MP progression curve,
--- You can change the default name, primary stats (at lvl 1) and ability list for each characters (the 8 permanents + the 4 temporaries). Note that the "ability list" also completes the edition of the commands.

- Items are now available to edit.
--- For key items, you can change the name, help and description,
--- For regular items, you can change most of things about them (except for the way ores impact eidolons).

- Added the few items' effect to the spell effect list though the formulas aren't relevant for spell uses,
- You may now make Quina learn supporting abilities when s/he eat an enemy (the supporting ability name is not properly displayed when s/he does, though :/),
- Added a way to change the palette selection for making the importation of custom charmaps easier,
- Fixed few visual bugs.

Next things I would like to do are :
- Adding Tetra master's cards edition,
- Adding a Damage Calculator tool (if anyone wants to help me on this, that would be great ^^),
- Adding a way to edit/add text opcodes (at least for the basic ones),
- Fixing that bug Thisguyaresick2 told of... I couldn't reproduce it even though I didn't spend much time on it,
- Completing every things not complete yet, such as the eidolons' power boosts or casting words...

Have fun. Those things should have been editable much sooner since you guys and LandonRay made the documentation about this since a long time ^^'

EDIT : update to version 0.22b : fixed a fatal error bug when some text was copied/pasted + fixed a bug making a weapon's elemental attack non editable.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-04-06 22:41:37
Update to 0.23.
- Synthesis shops are now available to edit.
- Fixed a bug with key items' descriptions on some versions of the game.
- Fixed a bug on items' battle help on PPF exports.
- Fixed a minor bug happening when charmap was changed.

Thanks a bunch to Thisguyaresick2 for pointing out these bugs ^^

Note that on versions with the 2nd fixed bug (most of versions, I fear), you won't be able to get item text modifications when loading HWS files (the ones saved with the versions 0.22). Sorry.
Also, still on these versions, the last key item's description can't be edited at all for now (it will always say "not enough space") but that's not a real problem since it is unused...
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2014-04-21 02:19:31
Nice, i will test ^^
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-05-10 20:30:15
I can't seem to get text color to change in item descriptions.

I wanted to add an Add Status effect to a weapon and have the text be red like normal. My Add button on the Edit Text Screen is grayed out, clicking in the list doesn't do anything, pasting in the µ doesn't do anything, nor copying and pasting a colored entry...

Please inform? Thank you.

Edit: I had searched 'color,' but now I see that the most recent update's note on text editing may apply to this question. Not sure. Sorry if I should have noticed that.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-10 21:15:03
Yes, that was one of my notes. You didn't miss anything : it is not possible to add/edit text opcodes at the time. It'll be possible in the next version, though. Should be ready in 2 weeks or sooner.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-05-10 21:19:26
Hey, thanks so much for the quick reply, even though I had overlooked my own solution (both there and, I now see, in the Help menu).

Question: suppose I play the game with the modded equipment, then in two weeks you release another version and I edit text color. Would I be able to mod the disc and load up my old game? Would it matter if I had the item in my inventory? Essentially, can I get away with fixing the aesthetics later?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-10 21:47:00
It will never matter if it's only cosmetic.

I'll speak for memory card saving (because for save states, it's different in the worse way) :
- Modifying the stats given by the items or the attacks of the weapons matter if you had a character equiped with it. I think it goes back to normal (to the newest version) when you un-equip then re-equip them.
- Modifying the party's stats, both the "Level Progression" and the individual stats are likely to bug. I didn't test it so I can't say for sure. It might go back to normal when you level up and/or un-equip then re-equip something.
- Abilities learned are replaced by the new ones and it has the same amount of AP than for the previous one. Let's say I have a save with Zidane's Thievery at 80/100 and I modify the game so he needs 200 to learn Flare instead of Thievery, then he will have 80/200 AP for learning flare. Also, you keep gaining AP once you're done learning an ability (but it's invisible of course).
- If you modify the Magic Stones requirement of supporting abilities and if a character has it activated (when you saved), it will totally mess up with the total amount of magic stones available for that character. I don't know if it's getting back to normal after leveling up but that's still something.

Everything else is safe and should have no side-effect nor bug.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-05-10 22:10:38
Huzzah. I like your program very much and thank you for it.

At the moment I am just doing some minor rebalancing: giving characters who had no weapons with stats such so they can have stat growth more comparable to the others, tweaking Whale Whisker and Angel's Flute so they may be sidegrades to the Tiger Racket... My idea had been to give them statuses to add, but perhaps I'll just give them +2 Magic and they can be upgrades to the Magic Racket and a sidegrade in that way.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-13 15:17:31
Hello, I found this great tool on Romhacking.net and now I'm here.
First, thank you very much for your effort.
Secondly, my PC can read Japanese properly, but I wonder why the Japanese encoding in Hades Workshop is not right. Below are my screenshots for Hades Workshop and Deling (FF8 editor) for Japanese version of FF9 and FF8.

Hades Workshop, thing are not right
(http://i.imgur.com/jVSoRRA.jpg)

Deling, things are right
(http://i.imgur.com/Jk3Vcgc.jpg)

Can you tell me what I have to do to read the Japanese encoding properly?

Second, I want to translate FF9 to my native language, so I must redraw the font. Can you tell me and people here where the font locate? Is there any tool out there allow me to extract and reinsert to font?

Thank you very much for reading.
 :)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-13 17:28:14
Hey thanks !
To properly display the japanese test, go in the File->Preferences menu and select Japanese as the game's alphabet.

The font is in the Environment->Text panel. Check out the "Charmap" section, you'll see several pictures : the global text font is the first one.

Here is the method to import your own font (I should add it in the help but I always forget ><) :
1st step : create an image .tga with every letters and characters you want. That's tedious if you paint it but Gimp and other programs have options to paint characters. Best way to draw them : they must be 13 pixels high maximum, 3, 6, 9, 12 or 15 pixels large, being white on a black background and having ~ 6 different tones of grey. It's also better if you use the same dimensions than in the game, so it's better to export the font before and use it as the base image.
2nd step : open HadesWorkshop.conf with a simple text editor and add a new line in the [Text] section :
Charmap[YourLanguageHere]=
and then you put all the letters one by one. They should be in the same order than in your image (that makes things easier). Since you don't draw the space, you can put it anywhere (it's in 16th position in normal games but that's only a standart). You're limited to 247 characters for the first charmap. If you need more, add a second line "Charmap[YourLangageHere][A]=" and put up to 256 more characters in that line. You can do it once again with a "B" option so you can use up to 759 characters.
3rd step : open Hades Workshop and your game, go to the charmap image (Environment -> Texts -> Charmap) and select the first picture : you see the current charmap. Click on "Manage Textures" then "Browse", select your charmap image, adjust its scale/position and then click on "Import" : you see the characters as they will appear in-game. Because of the way FFIX compresses it, it'll look bad if your letters are not 3, 6, etc... pixels-large.
4th step : in the same screen, select all the paintings one by one and make them surround each a letter. The order here must be the same as the one in the .conf file (let a 0-large painting for the space). You can delete or add paintings with a right-click.
5th step : go to preferences and select your charmap in the field "Game alphabet".
6th step : translate everything you can ^^'

Note that the Japanese version actually uses an extended charmap that is dependant on where the player is located. The font picture for it can be managed the same way, but there is no support for displaying/editing characters from that charmap inside the dialogs...
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-13 22:17:29
Thank you very much for the quick reply.

Actually, I did choose Japanese alphabet in the preference, but it's no use. I wonder why? Does it concerned to the Non-unicode setting in the Window's control panel? Currently, my setting for non-unicode for program is Japanese, and I can read Japanese properly in other softwares except for Hades Workshop.

I'm pretty used to doing the font editting stuff, I'll try the way you mentioned here.

P/S: I decided to choose Japanese version as the base of my translation because at the first glance, it uses more space than English version (because of Kanjis) so I have much space for my text than the English one.

I wonder does FF9 use any kind of pointer for text?

And one more important thing: it's the character width. How can I adjsut the character width? For example, the original character "A" has 12 pixels width, but I redraw it in to "i", so there's a space after the letter. Is there a way to reduce or enlarge the width space?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-14 17:20:21
I have no clue about the japanese, then... Works fine for me when I try to open the japanese version. If I recall well, the unicode encoding for my program is utf-8. Do you read properly the HadesWorkshop.conf file when you open it with a text editor?

For the letters' width, you can use the extra space obtained when you redraw big letters, as long as you keep everything a multiple of 3. It only mean you'll have to actually do the 4th step and adjust every "letter boxes" to fit the letters.

I'm not sure of what you mean by text pointers : there are tables of pointers for each text tokens (so "Cure" has a pointer for it, "Cura" has another which points 5 characters after the previous one). But I don't think there is a pointer table for each location to where there is text (a table saying "there's ability texts here, menu texts here, etc...").
Besides, the pointers for text tokens are not always near the texts themselves, and the 0-position often differs for a case to another.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-15 12:56:54
Now I know why I can not read the Japanese version properly. The reason as the video below.

https://www.youtube.com/watch?v=fFK3Br_W-3I (https://www.youtube.com/watch?v=fFK3Br_W-3I)

Here's the summery.

1. When I first downloaded Hades Workshop, the HadesWorkshop.conf is 4K (3,107 bytes) and it has Japanese charmap, Latin charmap in it.
2. When I opended Hades Workshop and choose Japanese in the preference, somehow it automatically overwrite the conf file. This is inevitable.
3. The new .conf file (overwrited by the program) now is 1Kb (297 bytes) and the Japanese charmap, Latin charmap was gone!

I wonder is the the bug of HadesWorkshop? 
By the way, I download the proram from Romhacking.net
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-15 16:43:31
Ok, thanks for the explanation. I'll see what I can do about that (it has to be some sort of option to make sure the .conf file is properly read/overwritten whichever your platform's configuration is).
There is no difference between the Romhacking.net version and the one here. Only the source code is in a separate file here.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-16 15:35:53
In the Control panel, there's Region and Language setting. When I chose Change system locale to English, now Hadesworkshop doesn't delete the Japanese charmap in the .conf file so I can read it properly now.
But if I change system locale to Japanese, Hadeworkshop delete Japanese charmap whenever I open it.
Hope to see another version which fix this problem soon.
Title: Re: [FF-IX] Hades Workshop
Post by: demeterf on 2014-05-18 12:55:42
Hello, your program works great, but I have a problem.

I'm not really good with creating charmaps, so could I request your help (or someone else's) to make
Ő, Ű, ő, ű characters for a hungarian translations? Only these characters are missing. It would be a really big help.

By the way, I see, that I can export text blocks, but cannot import them back. Is it possible, that in the near future you make the enviroment/texts part importable? It would fasten up the translation process, because it's really hard and slow to open, then close a text line, and repeat plus it would be possible to work with a group to translate...

Thank you! :)
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-18 14:12:17
Is there some characters you don't need in the charmap? Because there's the place to add ő and ű but not the upper-case ones without deleting anything.

Here is the lower-case texture (at the right of the picture) :
https://dl.dropboxusercontent.com/u/98687557/Charmap.tga

For the upper-case, just copy-paste a O and a U and the accent from the lower-case and put it over an unneeded character.
If there are no unneeded character, it'll be much more complicated :/ It's really tedious to properly draw letters from nothing because the game's compression algorithm tends to alterate the picture a lot.

You still have to do all the steps 2-6, though.

For the importing feature, that's not my priority.
Title: Re: [FF-IX] Hades Workshop
Post by: demeterf on 2014-05-19 12:45:55
Yes, there are some characters that I don't need, but I downloaded GIMP (it has taken a half hour to learn how to use it :D ), edited the charmap file, (deleted a char that I don't need, copied the normal upper case version and the accent from the lower- case version to make Ő and Ű) and the config file, and now it works perfectly.

The only problem is, that now I can't load the iso file with Hades if it's patched. But I can do make a mod :D

Anyway, thanks for your help. It will be much easier to do the translation from now on.

Title: Re: [FF-IX] Hades Workshop
Post by: shikulja on 2014-05-21 07:45:47
need add\edit this menu (add characters from charmap like in image)
(http://immage.biz/images/2014/05/21/b4pG8TsSW.jpg)
and add save/load gliph positions in manadge texture menu
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-23 23:20:04
I now can open the Japanese version, but there's many Kanji missing from the text (ones replaced by "?").
Is this because of differents Kanji table are used in different location in the game?

(http://i.imgur.com/EObREVt.jpg)

Is there any way to fix this?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-24 10:19:56
Yes, that's because of the extended table. I don't know any simple way to make it work : I guess I'll have to list all the kanjis in each of the extended tables and put them in the .conf as well...
If it's only a matter of translating, you can try to find the game script somewhere else and erase those characters. It shouldn't bug if you replace them by some other text.

Another bad news : the update will surely be delayed. I want to fix that previous bug, with the local system dependancies and I'm not done yet with the other thing that I've worked on.
Title: Re: [FF-IX] Hades Workshop
Post by: JBedford128 on 2014-05-24 15:29:54
If it helps, I had a Japanese reader figure out the "first" table for me once (the one in the Prima Vista rooms, don't remember if its ID is 0):

Code: [Select]
            '姫','我','隊','来','船','誘','拐','父','様','思','居','芝','観','演','虫','室',
            '客', 'Υ','_','俺','愛','貴','度','奏','語','婚','刃','足','恋','話','仕','連',
            '達','結','役','嫌','親','聞','掛','仲','言','主','太','乗','飛','続','望','宵',
            '友','声','待','席','議','会','込','訳','申','引','醜','隙','驚','皆','苦','兄',
            '張','頑','悟','良','奴','落','貸','到','団','戻','遅','娘','容','始','困','負',
            '勝','存','納','年','座','玉','為','観','考','関','機','痛','壊','塞','赦','余',
            '露','礼','悲','弟','済','刺','静','烈','憎','希','和','笑','千','丸','斯','母',
            '原','覧','裂','公','盛','評','集','揮','響','美','番','情','急','舞','台','細',
            '練','習','念','計','違','願','恩','配','漫','毎','朝','穴','幕','軽','頼','鳥',
            '君','顏','参','安','丈','夫','熱','勘','弁','明','説','籍','祝','建','怪','男',
            '捕','低','鐘','総','豪','少','逢','緒','帰','央','貢','仇','庫','温','泣','潮',
            '早','準','完','供','胆','例','功','哀','彼','広','界','拒','輝','七','貝','似',
            '仮','倉', non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non
sauce (http://i829.photobucket.com/albums/zz212/JBedford128/kanji.png)

Where "non" is nothing.

I felt too bad about asking her to do the rest because it takes a long time, and there's like 20 of them or something.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-24 19:58:16
Yeah, that'll save some time to me or thisguyaresick (who gentlefully helps me).
Thank your friend for us.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-05-27 05:00:28
need add\edit this menu (add characters from charmap like in image)
(http://immage.biz/images/2014/05/21/b4pG8TsSW.jpg)
and add save/load gliph positions in manadge texture menu

For shikulja's question:
1. Extract FF9.IMG from the CD
2. Open it in a hex editor. I recommend Windhex by Bongo.
3. You can edit the hex manually or just use Atlas to insert it. The address as my picture below.

(http://i.imgur.com/LOD4CtI.jpg)

For Tirlititi's: I have seen many strategy games like Fire Emblem use various Kanji tables as well as the Kana table. They have a trigger bite for each array, such as $09 to trigger the Kana array, $0A for Kanji array 1 and $0B for Kanji array 2. I think FF9 use the same method (Japanese version). Can you embede this function to Hades workshop?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-27 09:23:07
I know how it works, it's just that it's incredibly tedious because we need to register all the kanjis' tables and that there are a lot of them (between 20 and 30 I would say).
You're right about the byte flags though. It's explained here :
http://wiki.qhimm.com/view/FF9/CharTables

The problem is for the "External Kanji Table" : there is one different for each place in the game. thisguyaresick is doing a great job at the moment to write down all these tables but you can figure it takes some time.

EDIT : Actually, that makes 65 external tables in total...
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-05-31 23:32:12
Update to 0.24.
Here are the changes :
- You can now edit the game's script (for fields and battles). It's a new feature and is still very limited though. You can also edit fields' name. See bellow for more informations,
- You can now add and edit text opcodes. I don't know the effect of all the opcodes but the most useful of them (the unknown are read as their hexadecimal code, as before).
- Added a "curve editing tool" for the level progressions. It's nice for seeing the progression curves, but not too much precise. It's more like a gadget for now even if it's better than a bunch of figures. I'd like to improve it but that really shouldn't be my priority.
- Fixed the bug making the configurations file not working depending on the local system.
- Fixed a bug making World Maps' texts uneditable (it must be recent because that worked before).
- Improved the time spent for scanning files (it shouldn't upgrade with this version though ^^').

Also, please note that the DLLs have been updated as well.

So, I've got a whole bunch of things to say...

First, I gave up on card data finding. There are several reasons for that, the main one being the fact they are not at the same place at all in the binary files in PAL/NTSC versions and the Japanese one. I'll get back to it when I understand better the top levels structures of the binary file (once again, your wiki helped a lot but it wasn't enough for that particular problem :/).

Second, about the external kanji table, I'm being helped by ThisGuyAreSick2 and Yugisokubodai and that's the next thing I'm donna do. It will come asap with a bug-fix version if I find any (not that I want it but I know there are usually some of them ^^').

Third, the game's script...
You can edit both Battle scripts and Field scripts, as said, but you cannot edit the World Maps' scripts. The reason is that, in the Japanese version, there is A FRACKING BLOCK OF TEXT IN THE MIDDLE OF THE SCRIPT. I have absolutely no clue about why it is there or even if it's properly handled by the game itself (it may be present only inside unused World Maps, since there are 13 of them). So I disabled the reading/editing of the scripts in World Maps.
Here is an example of a piece of script :
(http://www.hiveworkshop.com/forums/pastebin_data/fxqiwr/HadesWorkshopScriptSample.jpg)
It's Baku's scripted movements and dialogs after the party defeats him (as Masked Man). The first "Animation" code is him patting Zidane's head, then he says "You're looking a lot better", then he faces south (a 0 angle is south ; a 64 angle is west) and say "Gwahahaha", etc...

About what you can edit, I'm not 100% sure of pretty much everything, so it may bug a lot. I just played with it a little and succeeded in changing some chests' content, some dialogs and with a good practice, you should be able to edit some scripted cinematics to a certain extent.
About editing limitations : I don't know the meaning of most opcodes and I've not implemented a way to change a code's length yet. Thus, you can't change an opcode yet, only its arguments. What's more, you can't change any of its arguments, but only the numerical ones. Most of opcodes' arguments can be either numerical values or "variable code" : the variable codes are (quiet) well displayed but cannot be edited yet.
Also, all the JUMP-ing opcodes are displayed as is. The jumping offset is the binary value so it won't help a lot. I would like to turn them all into "if/then/else", "switch" and "loop" statements but that's for a next time.

And one last thing : the edition of the script can be made easier if you go to the item, stats, texts and enemies panel before. Some numerical values (item ID, character's name, text ID and battle ID) will be translated in more understandable things. It's not 100% accurate though, for now :/

I'm gonna be really busy IRL for the month to come. I don't think I'll do anything else than reading some kanji tables until then.

EDIT : Update to 0.24b. Fixed some few things I forgot to do.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-06-02 03:19:10
I'm doing with the Kanji tables now  :P
By the way, about the font. I extracted it with Tim Viewer, edited it with a photo editor out there, then re-insert to the game and it's displayed just as in the Photo editor.

However, when I exctracted the font using Hades to .tga file, then edited it with the photo editor, re-inserted with Hades, it does't displayed excatly what I did in the photo editor.

I wonder does Hades modifies the font wrongly?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-06-02 17:50:11
There are several sorts of TIM and I handle them quiet differently. Besides the compression method (the 3-pixels-coded-as-2 thing), there is also the handling of the transparancy : it's ignored in some of the TIMs.

I guess TIM viewer retrieve the 3rd pixel slightly differently than me, then... But I only compute a mean and it seems the most correct way of doing it...
Title: Re: [FF-IX] Hades Workshop
Post by: aladore384 on 2014-07-02 10:03:46
Hi Tirlititi,

First thanks for this tool. It's amazing. I am now considering fixing those minor glitches still present in the game.

The infamous Thunder Slash Glitch is my target for now and we're having a lengthy discussion with Vir about HOW it should be fixed : http://www.gamefaqs.com/boards/197338-final-fantasy-ix/69536029#8

But that's not why I am replying here. I was wondering if you would make the tool so that we can change stuff in Tetra Master. I'd like to fix the 1,700 pts glitch.

Self-quoting from : http://www.gamefaqs.com/boards/197338-final-fantasy-ix/69143572?page=5#54

Quote
I was wondering about the intended rank for 1,700 pts in Tetra Master. It currently reads "Would you like to discard this card?" as we all know. The 2nd best rank is "Master".

Now, if you read the "Strategy Guide" key item, it is signed by "Grand Master I", and I think this is the title that would have been earned by the player if there wasn't the glitch. Simply "Grand Master" would be my guess as I don't think they would have specified the count, or maybe "Grand Master IX", who knows !
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-02 16:29:12
Hi Aladore,
I don't really know how to fix that bug properly. The title "The Collector" is present in the text datas but it is kinda badly referenced for its use in the card menu.

Here is what I know :
• The text list begins with each of the 32 rank names, including the last one which is "The Collector".
• The text coming right after it is "Would you like to discard this card ?".
• In the UI datas, there is some variable pointer instead of the text ID for the collector rank's text field.
So it seems that the variable jump from value 30 ("Master") to value 32 (the "Would you like..." text ID) instead of being caped at 31 ("The Collector"). I don't know why, though, but I checked and there is no dummy rank in-between so it really seems to be relative to how the variable is increased.

So, here is a ppf patch to fix it (https://dl.dropboxusercontent.com/u/98687557/TheCollector.zip) in a non-satisfying way (for me ^^') : I swapped the IDs of the texts "The Collector" and "Would you like...". Two errors make it work fine... It's only for the US version, though.
But I would prefer to fix the way the variable is incremented.

As for being able to fix it with HW, I don't think it will be feasible before long. I gave up on Tetra Master edition and even so it would be more a matter of coding/UI managing.

About the Thunder Slash glitch, I personally think that it was changed from a physical attack to a demi-like spell because otherwise it would be too much similar to Thunder Swords. It would be that they forgot to change the accuracy (and maybe power) in the process.

Thanks for your feedback and good luck bug-fixing the game ^^
Title: Re: [FF-IX] Hades Workshop
Post by: aladore384 on 2014-07-02 20:35:47
Thanks to you, I had the curiosity to check "The Collector" rank's localization in French, which is "LE Grand Maître"... kinda disappointing. Anyway this gave me closure about this issue.

http://aladore3viii4.free.fr/files/FF9/Tetra%20Master%20ranking%20-%20French.htm

I used monkey-moore-0.5-2009-11-29-win32 for a Relative Search in order to check that.

I was wondering, your "The Collector fix" ppf file worked perfectly for my NTSC US copy : how did you make it ? If it's too much trouble don't bother to answer, but I was thinking of making the same file for other regions. So if you could provide me with the names of softwares that can do the job I'd be grateful.

Well, just for the sake of discussion, I also wondered about the cap of two things :

- Frogs caught : 32,767. This cap seems forced as it is 7FFF in hex. Do you think another cap was intended ?

- Jump rope : there seem to be no cap at all. After 8,388,607 (7F FFFF) the counter displays 0 and after 16,777,215 (FF FFFF) the counter overflows. I tested 9,999 among other values to see if there is a cap but I don't seem to find one.

Also, about the Thunder Slash glitch, it's settled. We (Vir and I) both agreed on the fact that it should be changed to Physical Attack. The only nitpicking lies in the Power where Vir went with 19 and I went with 17.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-02 21:14:22
I wrote a detailled way to make the fix, but it was a bit tedious and doesn't work for the japanese version (card datas are a bit different in it). So here it is :

More details if someone wants to make one himself (you should better know some hex editing ^^') :
Only in PAL/US versions

You need to change 3 bytes to fix the bug :
1) change the 31th text pointer to the one of the 32th
2) change the 32th text pointer to the one of the 31th
3) change the ID of the text used by the question box when discarding cards from 32 to 31

1) The text lists and pointers are at the very beginning of the "Card Menu" module (see the wiki (http://wiki.qhimm.com/view/FF9#Disk_IMG_Format) : the card module is the 11th of the 1st directory (Directory '0' in the wiki)). The pointers begin at the position 0x1C of the module and are 4 bytes-long (2 bytes for the actual pointer and 2 unknown bytes). Go to the 31th pointer (position in the module : 0x98) and change its value by the one following it (at position 0x9C).
To find the card module easier, you may try to search for the raw datas 0x0113002F002D that should be at position 0x13 of the card module, but that's not the case in some version (Japanese at least, though it seems to be ok in PAL versions).

2) Do the same for the 32th pointer (at position 0x9C, still) : change it to the value the previous one had before you changed it.

3) Search for the raw datas 0x20000424 in the same module (it seems it's always 0x2000042400000486 in all versions) and change that 0x20 into 0x1F.
You should find it approximatively at the offset 0x5C00 from the beginning of the module.

EDIT : I forgot to answer you about the caps. You will be able to see how values are caped with the scripts. HW can already display/edit the field scripts in some extent (it's hard to decipher but you could retrieve the things you asked with some patience ^^'). Besides that, the caps are related to the byte length of the datas.
We are on making the japanese charmaps for now, then I'll do 2/3 things like editing images directly inside HW and then I'll try to organize and improve the script editing tool.
Title: Re: [FF-IX] Hades Workshop
Post by: aladore384 on 2014-07-04 11:31:37
Thank you for these answers. I'll give you feedback about those matters as soon as I got a chance to follow your instructions :)
Title: Re: [FF-IX] Hades Workshop
Post by: Xinlus on 2014-07-04 17:35:43
This is the same patch for spanish PAL version: https://drive.google.com/file/d/0B8Zi6lNUy7RwSE1ITDBFNlU4VGs/edit?usp=sharing

(http://4.bp.blogspot.com/-7UW-QKsJw3g/U7ban_5SklI/AAAAAAAAETE/Iw519QnsVSQ/s1600/ff9si.png)

Thanks for you great work!
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-06 02:26:15
Say, I see you got text color support going! I like it!

Sorry that I'm plying you with problems, then...

I find it always places the opcode at the beginning of the field and I sure haven't got using those arrows down to precision. What I do is cut all the text above the last character where I need an opcode, put in that opcode, and paste the rest of the text in front of it. Repeat.

Is there a better way?


Also, in game, the red text I put in seems to be shadowed.  Is that something I'm doing?

I have a screenshot, and I see buttons to Insert Image (it puts in html codes?) and "Attachments and other options" (nothing about attachments there?), but I haven't worked out how to post it.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-06 10:06:58
@ Xinlus : Thank you for your spanish fellows ^^

@ Vir : Yeah, you can just remove the µ that is created at the beginning of the text and write another one where you want it, then click on "Apply" (if there are missing µ when you click on it, the last opcodes will be removed ; if there are too many of them, the last of them are removed).
I'm thinking of making it a bit more convenient.

For the shadowed red, I'll test it. There are 2 opcodes for each color, so I guess the other one is the best suited. I guess the one you have to choose depends on weather you are editing a "help" message or a generic text, but I'll figure it.

I can't add attachments either. I guess you have to upload your image somewhere else and put the into the IMG tag.
Like 【img】http://YourImage.png【/img】

Also, I added some few dialogs in the first post. The Burmecia's one is not present in the french version ; that's the only one I found that is in that case (usually, there are more translated text in the french version than the US one).
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-06 22:19:19
Hey ! Sorry for double-posting, but I have a request.
I found another unused dialog in Cleyra that is only in the japanese version. It seems to be the dialog between Freya, the king and the high priest in Cleyra's temple.

Could someone nice and motivated translate it?
Quote
フライヤ
「ブルメシア王、ごぶさたしております

ブルメシア王
「おお、フライヤ、よくぞ来てくれた

ブルメシア王
「クレイラ大祭司と共に歓迎するぞ

クレイラ大祭司
「フライヤ殿

クレイラ大祭司
「この度のこと、もはや、ブルメシアだけの問題では無くなってきました

フライヤ
「承知いたしております

フライヤ
「ですが……

フライヤ
「私の力ではなんともならぬやもしれませぬ

ブルメシア王
「フライヤ……、あの時のことを言っておるのだな?

ブルメシア王
「あの時のことは、あやまる

ブルメシア王
「どうか、許してくれぬか?

ブルメシア王
「いや!許せぬのは分かっておる

ブルメシア王
「だが、いまは、わずかとなったブルメシアの国民の命がかかっておるのだ

Thanks in advance !
Title: Re: [FF-IX] Hades Workshop
Post by: luksy on 2014-07-07 01:31:57
Quote
Freya
It has been some time, Your Majesty.

King of Burmecia
Ah, Freya, well met.
The High Priest and I welcome you.

High Priest of Cleyra
My Lady.
It would appear that this predicament no longer concerns Burmecia alone.

Freya
I understand, Your Holiness.
And yet...
I fear my strength alone may not suffice.

King
Freya...I know what troubles you.
I must apologize for earlier.
Can you ever forgive me?
No! Of course you cannot.
But the fate of the people of Burmecia now hangs by but a thread.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-07 11:11:07
Great job  ;)
I added it to the list, as well as the balloon mini-game.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-07-10 13:52:26
I finished the Kanji table for disc 3 today.
Hope a new version will be released soon  :P

By the way, has disc2,4 done yet? If not, I'll take the job done.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-10 16:23:55
Disc 4 is done, there is only disc 2 left then (minus Cleyra) :D
Title: Re: [FF-IX] Hades Workshop
Post by: aladore384 on 2014-07-10 21:50:49
Thank you so much ! I'll upload it ASAP !

http://aladore3viii4.free.fr/patches/

(http://aladore3viii4.free.fr/files/FF9/Screen%20Fix%20Card%20Rank%20Glitch%20FR.png)
Title: Re: [FF-IX] Hades Workshop
Post by: gledson999 on 2014-07-11 02:47:52
how codes to make all card with all arrow and complete attributes like this Nova dragon?
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-07-11 10:34:29
I'm done with Disc 2, too.
For me, Hades Workshop is perfect but one litte thing discribed below.
An example here, you can see the dialogue window (bubble) fit the text length perferctly.

(http://i.imgur.com/bH0AAWw.jpg)

But in game it looks like this

(http://i.imgur.com/qA678lv.jpg)

It means dialogue bubble lenght doesn't displayed exactly. Since it already knew the lenght (how many pixels) of each characters, so the whole text lenghth calculating and displaying is a piece of cake. Pleas correct if I'm wrong  ;D

Hope to see this get fixed along with the kanji table in the next version.  :wink:
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-11 10:59:39
Yeah, the bubble's length is inaccurate. You're right when you say that calculating the text's length is a piece of cake, but that means displaying the text with the extracted charmap images. I was thinking of doing that eventually, but that's a totally different way to do it (I basically have to rewrite the whole "WriteText" feature of a text editor ^^).
I don't think it'll come in the next version, but I'll try to do it soon still.

@ gledson999 : You'd like to check out this other awesome program (http://forums.qhimm.com/index.php?topic=11494.0) :P
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-07-11 11:04:19
Oh I didn't know that it's complicated.
By the way, can I paste the Kanji tables to config file ? Or I have to do something special to read proper Japanese?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-11 11:23:36
The program is not configured yet to read several external charmap at once. It'll also come in the next version.
Title: Re: [FF-IX] Hades Workshop
Post by: LetCreativityPlay on 2014-07-11 15:52:52
wow awesome idea!
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-12 19:57:03
Thanks, I guess. Not sure which idea you're talking about :p

Update to 0.24c. Not a lot of new things here, mainly the support of japanese extended dialogs. Tell me if you find errors in kanjis.
Also, you can now edit textures and images pixels by pixels inside the program. It's not so easy to draw letters but that's better than exporting/importing. You can also make some good stuff with item icons and other UI images. You can zoom in/out using the wheel, but you can't modify the color set in the palettes yet.

And that's quiet all, if I recall well.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-12 22:14:58
I just tested my issue and the second "[RED" (heh, putting that in brackets works on this forum, too) does not shadow, for everyone's future reference. I don't know if that second Red was there in the last version and I overlooked it, but in this version it works fine for sure. Maybe I misunderstood when you said there were two versions; I thought you meant available to code so I didn't check.

Either way, thanks for the great and consistent support!

I'm going to add the colored text to my moddings be in line with the game and probably change the MP cost on Six Dragons. Odd ability, that.
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-07-13 01:28:33
I don't know why, but there's still some Kanji missing, which is replaced with ?
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-13 09:15:04
Where? Which place?
Thisguyaresick2 told me that there was some for enemies' name. I didn't find out how those are handled.
If it is in dialogs, I just checked in everyone of them from disc 1 and didn't find any. You're sure that's not regular ? ? ^^
Title: Re: [FF-IX] Hades Workshop
Post by: Yugisokubodai on 2014-07-13 13:30:34
Oh it's strange that after resetting my PC, the field message is OK now. But there's stell some missing Kanji in the enemies tab.
For example, disc 1, enemy いただきキャット
(http://i.imgur.com/kwMsCpU.jpg)

I don't know what is the fist character, but the second one is 滅 (metsu) for sure.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-14 20:35:52
Say, I just noticed many items' Battle Help text is messed up in my modded discs. I did not do this. The clean ISOs are okay. All the Battle Help entries before Ice Brand are long strings of 0s, fragments of unknown text, computer gibberish. The actual entries start with Ice Brand: i.e., Ice Brand is "Cinna's Hammer," Coral Sword is "Weapon used by thieves" [Dagger].

Everything looks okay in-game, though, so I thought it might be something with the workshop's reading? If it had been something I'd done... I almost certainly would have asked you anyway ;) Battle Help is the tooltip that comes up for Amarant's Throw menu, right? I downloaded a save GameFAQs (that's how I have been doing my testing) and checked some tooltips in the Throw menu and none of the daggers appeared off.

Thought of doing some further testing for you:

My clean ISOs, which are the basis for my most recent modded discs (the ones I mention here) do not have this issue. Patched disc 1 at least of the previous version of my mod also looks fine. Now this is interesting: if I open the clean ISO and then open the most recent mod (the only one with the symptom), there is no issue. I also looked at the Menu Help tips all the way down the list in case maybe they got offset later (though the erroneous Battle Help doesn't appear to have anything to do with the Menu Help), but it's all in alignment. So it's just something about how Hades Workshop reads this particular patched disc, evidently.

Fyi, the only differences between this mod and the previous versions are that I deleted a little Menu Help text in order to put in the properly colored Elem Atks which I modded and I adjusted Steiner's base magic stones because evidently I had not actually done that in the version I uploaded.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-14 21:02:22
Yes, Amarant's throw menu and also item's menu (ores and potions have a slightly different help).
That's not normal and it will bug if you attend to save.

I guess that's because it scanned the discs wrongly, because it was already patched. It should only scan clean ISO, otherwise that can happen.

Try to do that :
1) Make a scan of a clean ISO (simply open it with HW), you end up with a file (eg. : FFIX_Disc1.hwf) in the directory of your ISO,
2) Rename that .hwf file so it matches the name of your modded ISO (eg. : FFIX_Disc1_Modded.hwf) - replace the old one if needed -,
3) Open your modded ISO with HW.

It shouldn't do a scan of your modded ISO (otherwise you messed up something) and it should work well (otherwise I messed up something ^^).

If that doesn't work, please send me the patch you used and the .hwf file.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-14 21:58:17
It's all straight when loaded that way. It's no problem for me even if it reads it funny as long as it works in the game, of course. Just trying to help if I found a bug :)
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2014-07-15 13:21:32
Tirlititi, is the change/defend able to fully edit now? i wanna make "change" a custom movelist called "killer" with desc. "Kills and Heals"
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-15 22:05:14
Na, the command pannel hasn't been improved, sorry.
I never had the chance to get the datas related to it. I hope that's not too deeply hardcoded but I fear it is.

I saw there was a patch for improving the ATB speed in-battle. I'll check about it ; maybe that'll give me informations on how commands are handled. I'll see that before getting into the script.
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-16 23:01:18
When you say you saw a patch to speed the ATB, do you mean someone has made one or you see a way in game to do it? Because that'd be the #1 wish of the majority who could want a mod for FF9, I reckon.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-17 00:18:22
Someone has made one ^^
http://www.romhacking.net/hacks/1799/

I didn't test it yet, though.
Title: Re: [FF-IX] Hades Workshop
Post by: itoikenza on 2014-07-17 00:18:40
whenever i save a mod as hws. i get this strange oddity, it gives the following weapon status attacks as follows.
for example: if i choose "all bad" i get "confuse+blind+mini+slow" when i reimport.

all bad= confuse+blind+mini+slow
bad breath= venom
confuse+blind+mini+slow= gradual petrify
petrify+gradual petrify= virus
vemon+poison= zombie
Death= defend
doom= regen+autolife
zombie= trouble
trouble= auto-life
blind= heat
silence= freeze
virus= bad breath
venom= shell+protect
petrify= doom
gradual petrify= vanish
mini= ko+zombie+petrify+virus
freeze= petrify
heat= death
sleep= poison
slow= stop
poison= slow
stop= sleep
beserk= all good + stop
confuse= float
all good + stop= blind
shell+ protect= beserk
regen+autolife= confuse
defend= reflect
reflect= mini
vanish= silence
protect= haste
shell= protect
float= shell
haste= all bad
regen= petrify+gradual petrify
Auto-life= venom + poison
ko+zombie+petrify+virus= ko
ko= regen
Title: Re: [FF-IX] Hades Workshop
Post by: Vir on 2014-07-17 00:32:19
WOW! Neat! How haven't I heard of this, you know??

Is there any reason it wouldn't be compatible with the stuff we do, Tirlititi? Thanks again!


Edit:
I did some testing to see what difference it made. I started the watch when lv1 Zidane's bar emptied after completing an attack and stopped it when it seemed to first flash ready.

Sped up:
Fast ~3 seconds
Medium ~5 seconds
Slow ~12 seconds

Normal
Fast ~7 seconds
Medium ~9 seconds
Slow ~12 seconds

So the lowest setting doesn't appear to have been changed, and the other two are sped up approximately twice over.
Title: Re: [FF-IX] Hades Workshop
Post by: Tirlititi on 2014-07-17 12:05:15
@ Vir : For now, I'm quiet confident it is compatible. It may be not in the future but then you'll be able to change the ATB speed using HW.

@ itoikenza : Ah, yes -_- Actually, that happens as soon as you change the field. If you select another weapon and select back the weapon of which you edited the status' field, you'll have the bug happens.
I fix it for the next version, thanks a bunch.
Title: Re: [FF9] General editor - Hades Workshop
Post by: Vir on 2014-07-17 18:09:18
Thanks.

About modifying the ATB with HWS.

I wanted to pass along a suggestion Atomos199 (Excalibur II Perfect Game Guide author over at GameFAQs, you know?) made. To paraphrase, it would be great if there were a mode where the ATB stopped during animations, like the Recommended mode in VII. One hitch in FF9, as you may know, is that as the ATB continues to fill during animations and the animations typically take some time, the game becomes effectively turn based. Even the slowest creature will fill its turn bar and practically input its turn in the same order since all the bars will queue up during the animations, you know?
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: itoikenza on 2014-07-18 19:58:28
hey Tirlititi, one more thing while i'm at it! how is it moves are instantly available without being learnable? can that be changed?
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-07-19 21:52:54
@ Vir : Yeah, I got what you mean. I'll see what I can do.

@ itoikenza : You also have to add those spells in the "Ability list" of the character, in the "Stats" panel. You'll be able to adjust the AP needed there.
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Vir on 2014-07-19 21:59:41
Just if you're already going to work on that sort of thing already, that'd probably be a neat approach. Your program is already beyond satisfactory, so don't feel put upon or anything ;)
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Isidore on 2014-07-30 15:44:37
Hi Tirlititi !
First I have to say thank you for great work on Final Fantasy IX :)

Sadly, since the latest versions of hades workshop, several problems appears to me.
Here's a little list

- When i try editing stuff like supporty abilities, some names will be messed up in the menu (but appears correctly in the editor)
Ex : "Niv+" --> ".+"
"Galenterie" --> "ure"
"Orphee" --> "e"

- Editing items seems to be pointless as the changes won't appear in game (but it does in the editor) (like getting swords usables by Djidane, or changing effects of some items)

- Changing abilities in "Stat" > "Ability list" doesn't seem to work either, as the changes won't appear ingame. 

I've tried many ways, like editing the .bin file directly in the editor, or with applying a .ppf file, but it sill doesn't work... I'm playing on the French version, and I've already tried your program last summer and everything worked perfectly ...
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-07-30 16:10:00
I think the answer to all your problems is that you use the editor's save states. You must save at a mog, reload and modifications should work fine.
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Isidore on 2014-07-30 16:39:43
Unfortunately I don't think it's the problem, because I only save at the mog and never use the save states  :|
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-07-30 17:31:59
Humhumhum...
Then try to solve it the way I describe here (http://forums.qhimm.com/index.php?topic=14315.msg215330#msg215330). That's strange though... It shouldn't display right in the editor either if that's the problem.

I just tested the things you told me for the french version and it works fine for me.

If that still doesn't work, please send me your .hwf file and the patch you get when you export as a .ppf.
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Isidore on 2014-07-30 19:07:08
Humm
I tried your method but still the same problems...

Here's the .hwf & .ppf files

http://www.partage-facile.com/R7TQBJW1IX/patch_ffix_disc1.ppf.html (http://www.partage-facile.com/R7TQBJW1IX/patch_ffix_disc1.ppf.html)

http://www.partage-facile.com/QTJ908TBE3/final_fantasy_ix__disc1_.hwf.html (http://www.partage-facile.com/QTJ908TBE3/final_fantasy_ix__disc1_.hwf.html)
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-07-30 21:30:23
I'm sorry but your .ppf works fine for me...
You have renamed "Pluriche" into "Gils +", for example, and it displays well in game, as well as "Niv. +" or "Orphée". As for getting items available to other characters, you added some daggers to Marcus's weapons.

Apply your .ppf to a clean ISO, since it was created from a clean ISO (as recommended). But other than that, I don't see how you can end up with a problem of any kind :/

No problem either from the file scanning. It's all fine.
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Isidore on 2014-07-30 23:20:00
So the problem should be the iso. Okay I will try again with another one.
Anyway, thank you for your help ;)
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Lubdar on 2014-07-31 08:09:51
This doesn't by chance have the capability of viewing the summon models does it?
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-07-31 10:01:52
No, it doesn't. That's not something that should be available before long. For now, the only models the program can extract are the battle scenes.

But model ripping is something that interested quiet a few people. I think you'll find some interesting things if you search for Zerox's work on the internet about that. As far as I know, Zerox has retired and doesn't rip models anymore, but she have left an incredible amount of resources - sometimes reboned/reanimated by her or other fans -. Maybe FFIX's summons are amongst them. At least I know there are summons from FFVIII.
Title: Re: [FF9] General editor - Hades Workshop (0.24c)
Post by: Tirlititi on 2014-08-02 15:43:48
Update to 0.25 :
• Added some fields to edit in the "Stats" panel :
└─> you can now edit the commands of the characters (both normal and transe).
└─> there are also the commands temporary available, such as the theater's spells.
└─> you can change the attack boost of the trance (50% or 200%). Zidane seems to have a special trance attack modifier but I don't know what it does.
└─> you can change the initial equipment sets, the equipments characters begin with. For Beatrix and Marcus, there are two sets because they change it during the game.
• Added the last charmaps for the japanese version (so the configuration file has been updated) : kanjis of the Enemy, Field and World Map sections are now displayed properly.
• More opcodes have been identified in the script (party handling opcodes for most of them). The text and battle arguments in scripts are also displayed more accurately.
• Renamed a 【RED】 text opcode to differentiate the one for helps only and the other one.
• Fixed few bugs.

I found some other things about commands but, as I thought, these are hardcoded. I'm afraid it won't be possible to change the fixed commands "Change" and "Defend" to commands using a panel (they can be related only to instant non-targeting commands).
But I've not find everthing yet about that and that's about isolated bytes. I'd largely prefer to learn about the big picture before making it editable.

I've not found a way to manipulate the way the ATB fills. The patch didn't help me at all in fact ^^'

Also, there is a bug when editing scripts (it was already in 0.24) : it randomly makes the program crash sometimes when you click on "Edit script" in the Field panel. Editing scripts is still very limited and I have a big work to do on that so I didn't bother yet, but don't go wandering in the Field panel if you have are on an unsaved mod  :P
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: xenokain on 2014-08-03 05:55:11
Thanks a lot for working on this Tirlititi. The program keeps improving.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Vir on 2014-08-03 20:44:32
Ditto!
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Napha on 2014-08-04 22:28:50
Hey, this tool is amazing! The option to change de character commands was a great plus.

I have three questions though:

1. Is it possible to lower the item limit? Like having a maximum of 50 potions instead of 99?

2. Is it possible to cap the maximum level at, let's say, 60? I can just make the exp needed to level 61 very high, but just capping at 60 would be better.

3. Is it possible to make other summons work like Madeen, getting stronger as the summoner levels up? They use the same formula on the tool, but Madeen's way is much better IMO, it would be awesome to transfer it to the other ones.

Those are just ideas, no need to rush to it ^^

And I don't know if you know it, but some animations are in the wrong category. For example, there is an animation called "Aera (multi)" but it works just like the regular single target aera animation, just saying in case you didn't know.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-08-05 01:14:20
Hey, thanks.

1. I don't really know how to make that. Everytime you get an item in the script (in chest, during dialogs, during mini-games, etc...), there are actions to check if you have already 99 items and it displays "Can't carry more" instead of giving it. So if you want to raise or lower the limit, you have to change it everytime in the script and that would be a huge work (not to mention you can't do that until the script editor is improved).
Additionaly, that doesn't take care of items stole to enemies or dropped by them. I don't know how to change the limit for those.

2. Same for the level, I don't know how to change the limit. It should be much easier to find it, though, I guess.

3. The subtilities of summons' power is also an unknown for me. They are specially handled by the game ; Meteor is also in this case, since there is a chance for it to fail and to display the 2nd spell animation and that is persistent even if you totally change its effect.

Anyway, I'm more motivated for other things for now. I'll keep your ideas in mind, though, if I find something related to that. The level cap might be really easy if we're lucky ^^ I'll test about it.

As for the "multi" suffix, it just tells that the animation can be used for a multi-targeting spell but it can also for a single-targeting spell. The only difference between "Aera (multi)" and "Aera (single)" is that the later can't be used for a multi-targeting spell (if I recall well, but maybe I'm mistaken).
One day, I'll rewrite the spell animations' categories. There are some distinctions I should make (for instance, there are animations that are "consecutive strikes", such as Death Lvl. 5 or trance Aquarius, that can be used for global targeting but will only be launched on 4 targets maximum).

______________________________________________________________________

So, I have begun to make a patch (english version (http://www.romhacking.net/hacks/2112/)/french version (http://www.romhacking.net/hacks/2113/)) that enables some of the unused dialogs. Some of them have been scripted so it takes few things to unlock them. For now, I've unlocked 4 :

1) Steiner's bitterness [1/3] : there are 3 lines of dialogs here. The script and the lines themselves suggest that Steiner should only say one of them. I chose the 1st one because that's the 1st one ^^ Also, it's more substancial than the others. I don't know if it'll be possible to ever know what action you had to do to unlock whichever line ; I'm afraid it won't.

2) Good and Evil with Grampa Morrid : this one was simple to unlock. Story-wise, I think the king can't be Dagger's father because the dates don't match (Lindblum instored the peace in the era of Cid's father around 30 years before the game while Dagger's father died 6 years before). Plus Cid and Dagger's father were friends.

3) Meeting with the King and the High Priest : this one is an ATE. The game names it "The Treetop Town of Cleyra". I had to put back the dialogs and I used luksy's translation (the ATE name was already translated).

4) Reaching Cid : the game phase that comes with it is also enabled  :D

I've looked for the others too. I've found no trace of Over the roofs, Entering Burmecia (it would be hard to put it back anyway since you're not supposed to leave Lindblum before all the Hunt events) and The 2 worlds' fusion.
The Ancient World Map is actually a part of an alternate dialog when you have reached Cid in which Artania is present. I'll see if we can do something for this one latter.
The Balloon Mini-game is also present in a certain extend. I didn't find a way to properly enable it but I'm afraid it'd be full of bugs (the japanese text for it also mention that it bugs and is not very entertaining). It would have taken place on the main square of Alexandria, at the same place that the rop jumping from disc 1 (the girls scatter over the square and the boy stays on the little wood platform).

As a side note, I learned that the dialogs in the Desert Palace I thought unused are actually used ^^
The "hopeless situations" are shown when you are catched by the hedgehog pie with less than 4 or 2 minutes left. So I removed thosed dialogs from the list.

If someone wants to make a patch like this one for other langages, it will be easier once Hades Workshop can fully edit the game's script (I hex-edited it, personally). I'll share technical informations at that time.

I also plan on making a video... I'll see about it.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Napha on 2014-08-05 17:59:24
Oh, I thought changing the summons' formula would be hard, but I actually thought the item cap would be the easiest. I asked more as a matter of curiosity, as those changes would be very useful I believe, no need to worry about them ^^

And about the "Aera (multi)" animation, I guess I didn't express myself well (I'm not a native english speaker, you might have noticed)
I tried to say that even multi-targeting the enemy using the "Aera (multi)" animation I couldn't target all enemies, it just hit the rightmost enemy, just like it would happen with a single target animation. But I may just have swapped the "single" and "multi" animations, I'll check this later and edit this post to tell you what happens.

EDIT: Yes, the "Aera (multi)" animation hits only one enemy, even multi-targeted

I think the animations' tab is very well done btw, I specially like how it has some animations that wasn't even present in the game if I recall, like the "Trine" animation
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Isidore on 2014-08-07 10:14:56
Hello Tirlititi
I'm so sorry to bother you again with that, but as you can see in the pictures, there's still the same problem  :|

I've done several tests, using three different ISOs (including one made from the original FFIX disc), and on two different computers, but I still got the same problems : missing names and letters of supporting abilities, and changes in the inventory section that don't appear in the game. (and it also seem that changing the starting equipment set make the game crashes when you select the new game option)

The rest (changing effect/names of combat skills, commands, editing enemies, texts..) seems to work right.

(http://s29.postimg.org/bpevyme5j/10431673_10152616869179819_2170632130852954872_n.jpg)

(http://s29.postimg.org/6o7hx96p3/10511339_10152616869104819_6046561553189103048_n.jpg)

That's a mystery to me as I don't understand what i could have done wrong...
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-08-09 09:20:18
@ Napha : Ah, ok. I'll check to see what are the differences between those Aera, then. Maybe there are none but usually, there's at least a difference about the camera movements (like in the different versions of Aerial Slash).

@ Isidore : Please check your private messages.

@ everyone : I made the youtube video, it's available here (https://www.youtube.com/watch?v=ZFvdrD0jmms). Sorry for the slowdown ; I tried to fix it but I'm really running on an old laptop at the moment ^^'
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Vir on 2014-09-16 05:37:57
Hey, Tirlititi, I am making another mod. I wonder, if I make it as a second ppf and don't change any of the same value (no conflict?), can I make it as two optional mods which work together no problem? Or should I just plan for it to be part of the same mod?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-09-16 18:10:56
It may have a conflict even if you don't change the same values in these case :
1) You change the name or help text of a spell/command/item/etc... in both mods, even if it is not the same object for both mods (let's say you change the help of "Thunder Slash" in one mod and the help of "Thievery" in the other : it will make a conflict).
2) You edit an enemy (or a text block) in both mods. As long as it's the same enemy (or text block) that is edited, it won't really matter which field (or text line) you changed in both.

If you really don't change things that are not in the same panel, it shouldn't make a conflict.

Anyway, you can simply make two separate mods and save them as two .hws files. Then you import both one after another and create a .ppf patch from then. So you'll have 3 versions : 1 for each mod and 1 for their fusion.


By the way, I'm not working on the program anymore since few weeks. I'm slowly getting used to my new job but that's really time consuming for me :/
I don't know when I'll be back on business here.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Vir on 2014-09-16 23:53:07
Fair enough. I won't expect you necessarily to answer as immediately, then. Thanks for the answer this time, too.

Best of luck with your new job!
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: demeterf on 2014-09-24 21:04:13
Hy Tirlititi!

I know that I asked before, that you could make an importing feature for the text, but you said that is not your priority.

We have started translating the game by exporting the texts, but it is hard and takes a long time, to copy paste every line one by one
and to resize the text bubble. It would be much faster if you could make an importing feature only for the texts.

But if you don't have time for it, could you please write a little instruction on how to make it, so we could search for
someone who could make ii

Thanks!
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-09-26 13:59:46
I'll see what I can do once I got back to work, but don't expect much... Also, it would only work with µ-written opcodes (so you had to disable the flag "Use extended opcodes").

As for the instruction, the program is open-source. Have fun.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: shikulja on 2014-10-07 00:51:54
what about extented space for text? (progress)
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: eXistenZe on 2014-10-19 08:37:04
Is it possible to convert a ppf to hwf format?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-10-19 16:14:43
@ shikulja : you mean the extended space text opcode? I'll display those properly once I rewrite the text displaying feature (so it uses the characters directly from the game).

@ eXistenZe : Not fully. You can patch a game, then open it with HW and save as .hws, but it won't save everything. It saves properly everything in the "Party" and "Item" panels but it won't save the enemy datas (even if you enable the corresponding flag) since, from the program's perspective, they haven't been modified. Same for the "Environment" panels.
That's on my todo list to add a solution to that.


I've some time to spare on the program these days. Editing scripts shouldn't be too far away from now.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: shikulja on 2014-10-19 17:33:42
not. I wanted to say. to be able to write more text. i.e. disable limit
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-10-19 18:07:43
Ah...
Not yet either I'm afraid ^^'

I have yet to find the pointers to this kind of datas. Not that I actively search for them but it's been an unknown for me since a long time.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: eXistenZe on 2014-10-21 17:16:13
Hey guys...

Another run through FF9 and having some fun with this tool...
Since I don't actually like any of the current mods available (way many abilities broken or badly implemented), I'm kinda cheating and removing some abilities from my least used chars to boost my preferred ones...

Since this will most likely break the difficulty of the game, is there anyone who has actually created a difficulty mod where I can import the monster data from? Like HP + 100% to all enemies and other boosts?

Best regards,
xz

[edit]
When I add a blue magic to a char pool and the respective item/weapon, they can equip it, use it, learn it, but the learn % never shows the actual numbers, just the progression bar. Any idea why?

[edit2]
More bugs found.
When I add Might to a char like zidane or steiner, no matter what animation I give them, it will never show.
Some changes with abilities apparently bug other ones. I never changed the cure spell or anything related to it, but dagger is unable to cast it in battle(it does not show in battle menu, despite being learned and cast through main menu...
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: eXistenZe on 2014-10-24 15:45:16
Vacation time, I guess...
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-10-24 22:49:11
Haha ^^
Yes I'm in vacation, but I'm still around. I just didn't see your edits.

About the blue magics, I didn't notice it. I have no solution for that but using other spell slots instead of making a blue magic learnable. Thanks for warning, though. I add it to my todo list ^^'

About Might and Cure, I never had this problem. Might works fine for me if it's used by Zidane or Steiner and Cure should be usable by Dagger as long as it remains in her "White Magic" command and she keeps that command in her command list.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: eXistenZe on 2014-10-25 12:09:03
Blue magic % is a minor bug...

Might is a weird one. Zidane takes a step forward and nothing happens, no matter the animation I choose...

Cure is the problematic bug... I never touched the spell, it's place in the command list or it's "learnable" position... She can learn it and use it by main menu, just not in battle.

When you return from vacation can I send you my hws for you to check?

[Edit]
It's not only cure. It also affects cura, curaga and regen. And it's not about their position in the command list. Cure in the bottom of the list does not show and protect in the begining works.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-10-28 21:56:24
@ eXistenZe : Yes, send me your .hws. I'll check it.

Update to 0.26 !
What's new :
- You can fully edit the game scripts. Also, you now have access to the World Map's script except for the japanese version which I have troubles with. The syntax ressembles to the C syntax with some significiant differencies (see below),
- Added an option for displaying texts in a nicer way (without the opcode symbols) in previews.
- Added a button in the text editing window to automatically compute the size of the dialog box. It's not 100% reliable but it's still fairly accurate.

About the game script, here is what I added in the "Help" window :

Code: [Select]
The game script handles scripted events, enemy AIs and other related stuffs.

The script is presented with a kind of C-like syntax. There are several differences though.

[General]
The language accepts only one instruction per line.
Lines are not terminated by any punctuation character.
For flow control statements, the braces are mandatory.
You can't use braces out of a flow control statement.
There is no such thing as real values. Everything is done using integers (sometimes signed).

Once you have modified a function's script, you must parse it to check eventual errors.

[Flow Control]
The different keywords for controlling the script's flow are described here.

if : usual If/Then statement with an optional Else. The syntax is

if ( CONDITION ) {
    CODE
}

or

if ( CONDITION ) {
    CODE_A
} else {
    CODE_B
}

Note that the opening braces must be on the same line as the keywords "if" and "else".

ifnot : opposite control of if. It works similarly though. The syntax is

ifnot ( CONDITION ) {
    CODE
}

while : usual While statement. You can use the keyword "break" to leave the control but there is no such thing as a "continue" instruction. The syntax is

while ( CONDITION ) {
    CODE
}

do/while : usual Do/While statement. You can also use the keyword "break" to leave the control. The syntax is

do {
    CODE
} while ( CONDITION )

switch : a Switch statement with consecutive cases only. The first case's value is specified in the control, as well as the maximal amount of cases. The syntax is

switch NB ( VALUE ) from FIRST {
case +INC:
    CODE_A
case +INC ; +INC:
    CODE_B
default:
    CODE_C
}

where
NB is the maximal amount of cases,
VALUE is the control expression,
FIRST is the "+0" case,
INC are numbers strictly lower than NB.
Note that, like in C, you have to use the keyword "break" if you want only one branch to be run and that the "default" case is optional.
The semicolon allows to make several values lead to the same code branch.

switchex : a more usual Switch statement. The exact amount of cases (default case excluded) must be provided in the control. The syntax is

switchex NB ( VALUE ) {
case X:
    CODE_A
case Y ; Z:
    CODE_B
default:
    CODE_C
}

NB being the amount of cases and X, Y and Z representing numbers. The keywords "break", "default" and the semicolon have the same purpose than for the "switch" statement.

loop : rerun the whole function. It works as an alternative to a last "RETURN" instruction and can only be used out of any other control block.

[Variables]
You can not declare variables. There is a limited amount of them, some being globals shared accross different field scripts, some being locals initialized to 0 when the script code is loaded.
For what I know,
- local variables are the ones named "VAR_A" "VAR_B" followed by 2 numbers. The second number works as an array operator,
- usual globals variables are the ones named "VAR_D",
- global variables that are saved in a memory card save are the ones named "VAR_C",
- "MV" and "SV" variables are special globals that are also shared by the game's mechanics (such as the battle code or the deplacement code).
- There are also Getters to retrieve values from the other game's mechanics that can't be directly modified (such as the player's gils amount).

In order to manipulate variables, you must use the instruction "SET" followed by a series of operations over the variables. Some of those operations are still unknown.
Besides the usual operations, you have "^" that marks the binary XOR operation and "#" that is an unary operator counting the amount of active bits.
The brackets are more of a structure's field accesser than a real array operator. They will be displayed differently in a next version.
Note that the minus operator can't be read as an unary operator yet. Only positive integers can be used in variable manipulation codes.

WARNING : at the moment, the operation priorities are not respected. By default, the operations will be executed from right to left. It is advised to write all the parentheses.

Variable manipulation codes can also be used in most of instructions's arguments.

You can change quiet a lot of things now. The content of the chests, the game dialogs, mini-game mechanics, etc... The scripting language may be a bit ascetic :/ I guess I would have had way more work if I wanted to make it more flexible.

Here is an example I made (a patch for the Disc 1 of the US version - just start a new game once patched) :
download patch example (https://dl.dropboxusercontent.com/u/98687557/Resources/ScriptTest.zip)
It took me some time, though. It's still tedious. But way way less than editing the thing with an hexadecimal tool ^^

There is a limitation I'm willing to remove for the next version : you are limited for using only preloaded datas. You can't use a model if it is not present (hidden or not) in the original game in the field you want to use it. That also goes for model animations or fields (you can't jump from any field to any other field) or for battles.
In fact, I already passed by this limitation in the "hidden dialogs" patch I made. I need to work just a little bit more to automate the process. I guess I'll make available the choice of which datas are preloaded in a field (and a battle -> you'll finally be able to change an enemy's model).

Ah yes, something I forgot to mention in the help : the array of variables (the second number in "VAR_A10_10" for example) is of size 256 for variables of type A, B and SV and is 65536 for C, D and MV. I also forgot to throw an error if you enter something higher... You'll end up with an array re-ajusted between 0 and 255 without being noticed of that.

Also, here is a list of the fighter structure fields I know (If you see "SV_FunctionEnemy[38]", for instance, that refers to the enemy's current MP). They appear only as raw number in the program :
Code: [Select]
[32] : Enable back presence flag
[33] : Disable presence flag
[35] : max HP
[36] : current HP
[37] : max MP
[38] : current MP
[39] : max ATB
[40] : current ATB (Only player characters maybe)
[41] : level
[42] : status immune (Heat - Gradual Petrify)
[43] : status immune (Petrify - Protect)
[44] : auto status (Heat - Gradual Petrify)
[45] : auto status (Petrify - Protect)
[46] : current status (Heat - Gradual Petrify)
[47] : current status (Petrify - Protect)
[48] : elemental immune
[49] : elemental absorb
[50] : elemental half
[51] : elemental weakness
[54] : shadow flag?
[55] : model size
[59] : Disable model flag
[60] : Enable back model flag
[65] : line position (not to confuse with "row position" ; that's the ordering of the fighters from 0 to 3)
[73] : magic power
[74] : defence
[75] : evade
[76] : magic defence
[77] : magic evade
[78] : marthym order flag (change its value to cast Marthym !)
You can totally modify them in battle script (the game does that for turning Ozma's darkness absorbtion into a weakness, for instance).
By the way, the reason why I display integer values as a base 64 numbers (among other display modes) is that most of enemy AIs use this base for the setup of their spell (how them casting is randomized is quiet complicated ^^). It has importance for the values in the AI setup.

I would be surprised if there isn't any bug, but not with the most common opcodes and stuff.
If you find one or if you have any question, please tell me.

I would like to thank yaz0r, a french fellow who works on a script dumper and who helped me for this (if you have convenient names for some functions, it's thanks to him for instance ^^).
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Baby5 on 2014-11-24 12:16:03
MP Multiplier of Spells:
0 = Nothing special
1 = Can be used in menu(such as Cure). Does nothing & waste mp if you allow some commands(such as Flare) to be used on a party member in menu.
2 = Blue Magic(this skill may be obtained by Eat/Cook). Character must have skill available in Ability set.
3 = No idea, havent tested. Not used for anything by the game though.
4 = Makes MP cost 4x the amount. Used on Garnet's Eidolons.

For example, if i swap Ifrit's MP Multiplier from 4 to 1, Ifrit's MP cost becomes 26(the regular amount) and becomes usable from the menu. Since Ifrit does nothing in terms of "Heal/Status/Revive", the character just wastes 26 MP.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-11-24 17:52:33
Oh my god, thank you so much for this point :O

I think I just tested the value 3 on Garnet's eidolons and saw the multiplication went down to 3 times the MP amount.
The flag 2 may be the fact that you don't see figures when you are learning the ability. That's not something that can be seen in regular games but the Blue Magics don't display the AP on the learning bar ("35/40" for instance ; it's replaced by 3 stars when you have fully learned the ability). eXistenZe was having this problem : I think you just gave him the way to fix it ^^
Indeed, there are few effects that can be used in menu.

I'll investigate that more thoroughly. Thanks a bunch again !
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ZackNeji on 2014-12-18 11:17:57
I have a problem.
I want to make the same as hidden dialogs patch in the spanish version.

But in Steiner in Prima Vista scene (Prima Vista/Storage -> Function func_0_1) gives me this error:  "- Not enough space : data is 21636 bytes too heavy."

This error apears without changing anything, and if I change a value, the program don't make any real change when I save it.

Any solution?

Sorry for my english.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-12-18 16:58:58
Indeed, the script editor has a kind of bug (harmless but it sometimes screw the data space required by a function) : some switch/ex control cases have redundant operations.

In this case, you have switches in this function that ressemble to this :
Code: [Select]
switchex 14 ( VAR_B9_239 ) {
case 206:
    some_code_A...
    FIELD( 206 )
    some_code_B...
case 200:
    same_code_B...
The code B is redundant in the first case because the "FIELD" opcode should be handled like a "RETURN"...

I'm aware of the problem and hopefully it will be fixed in the next version.

I'm in holidays tomorrow ; I'll have a bit more time for the program so I guess the next version will come out soon. It will also enable the edition of preloading datas, which is compulsory for making a patch like "Hidden dialogs" (for the Linblum's part).

So I can only tell you to wait a bit 'till I fix the problem, sorry. You're looking at the very right place for Steiner's dialog, congrats ^^
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ZackNeji on 2014-12-18 17:32:30
Thanks, I keep waiting ;). You are doing a great great work.

I have another question (less important).
I already added the dialogs between Vivi and Puck. All gone well, but when Puck talks (not Vivi beacuse his texts are in his function) the new text boxes appears over Puck and cover him. I don't know why this happends. Can you tell me why?

(http://usuaris.tinet.cat/zackneji/mopok/uploads/sin_titulo_1_copia.jpg)

Thx.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-12-18 19:04:18
I didn't even see that dialog was still in the script ! It's not in my Hidden Dialogs patch ^^"
I'll look into it. It might be related to the window's flag UI argument in the "WINDOW" or "DIALOG"s opcodes.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ZackNeji on 2014-12-18 23:12:02
I didn't even see that dialog was still in the script ! It's not in my Hidden Dialogs patch ^^"
I'll look into it. It might be related to the window's flag UI argument in the "WINDOW" or "DIALOG"s opcodes.

The dialog is not in the script, only text. I added it into the script. I'll look the UI options, thx.

If you want the script modifed to add the conversation, here you have it:
viviPuckDialog.rar (http://usuaris.tinet.cat/zackneji/mopok/uploads/vivipuckdialog.rar)

The both goes in "Alexandria/Rooftop"

The script is the spanish one, but I thing that works in USA or french ver. as well ;)
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2014-12-19 21:55:30
Ah ok, I wondered ^^

I guess the dialog was initially meant to be placed after they reach the castle's wall, since the texts are after the “After this wall, we'll be inside the castle!”. That's why I didn't add them in Hidden Dialog.
Though it makes sense to have the dialog here.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ZackNeji on 2014-12-20 00:02:25
You're right. I look to add there to see how it looks^^
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: itoikenza 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...
(https://dl.dropboxusercontent.com/u/50488782/models/itoikenzaFF9Change.PNG)

@Tirlititi, Remember that?

have you ever fixed the change/defend not being changeable into a moveset yet?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Yugisokubodai 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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 func_0_1" : 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 "WINDOWS" and "DIALOGS" opcodes to guide yourself in the script.
You'll find these lines :
Code: [Select]
        if ( VAR_C5_2439 == 1 ) {
            WINDOW_EX_SYNC( 13, 1, 128, 346 )
        }
        if ( VAR_C5_2438 == 1 ) {
            WINDOW_EX_SYNC( 13, 1, 128, 347 )
        }
        if ( VAR_C5_2437 == 1 ) {
            WINDOW_EX_SYNC( 13, 1, 128, 348 )
        }
The variables VAR_C5_243x seems to be not 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 Morrid_1", specifically these lines.
Code: [Select]
    case 12:
        WINDOW_SYNC( 6, 128, 118 )
        SET VAR_B10_28 = 17
        0x47( 2 )
        SET VAR_B6_31 = 96
        RUN_SHARED_SCRIPT( 7 )
        break
This function and the "SteinerB_2" one are responding each other using the variable "VAR_B10_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 func_0_0" :
Code: [Select]
    if ( VAR_D5_484 == 0 ) {
        SET VAR_B14_30 |= 2
    }
    if ( VAR_D5_484 == 2 ) {
        SET VAR_B14_30 |= 8
    }
    if ( VAR_D5_483 == 0 ) {
        SET VAR_B14_30 |= 1
    }
    if ( VAR_D5_483 == 2 ) {
        SET VAR_B14_30 |= 4
    }
    if ( VAR_C5_3857 == 0 ) {
        SET VAR_B14_30 = 0
    }
You need to add these lines in the list of "if" statement (before the last one, that's better) :
Code: [Select]
    if ( VAR_C5_3856 == 0 ) {
        SET VAR_B14_30 |= 16
    }
The variable "VAR_C5_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 (http://forums.qhimm.com/index.php?topic=14315.msg214793#msg214793) 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_1", you'll find something like this :
Code: [Select]
            PRE_FIELD( 5, 1363 )
            SET VAR_B10_21 = 1363
            if ( VAR_B6_17 == 255 ) {
                SET ( GetData_12 - 160 ) Op66 ( GetData_13 - 112 )
            }
            0xA9( -6 )
            FILTER( 6, 24, VAR_B6_17, 255, 255, 255 )
            WAIT( 25 )
            if ( VAR_A6_167 == 1 ) {
                MODEL_2( 9, 1, 65535 )
                SET VAR_A6_167 = 0
            }
            if ( VAR_A6_162 == 0 ) {
                if ( VAR_B5_13 < 9 ) {
                    SET VAR_B5_13 = 3
                }
                MODEL_3( 20864, 2297, 0 )
            }
            if ( VAR_A6_163 == 0 ) {
            }
            SET VAR_B9_2 = 2
            FIELD( 1363 )
You must use the field to 1364 (Lindblum Airship Dock) instead of 1363 (Lindblum Hallway). Modify it in both the "PRE_FIELD" and the "FIELD" opcodes. You also need to set the variable "VAR_B9_2" 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 ^^).
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Yugisokubodai 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?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Yugisokubodai 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.

(http://i.imgur.com/bMbScgC.png)

(http://i.imgur.com/3Yjzffd.png)

Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Yugisokubodai 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?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Yugisokubodai 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
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ste459 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!
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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 ^^).
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: ste459 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.

Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: tasior2 on 2015-02-23 11:12:42
Just want to say, GREAT WORK Tirlititi!!!
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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 (https://www.youtube.com/watch?v=as9CP9Sm7c8).

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).
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: DanTsukasa 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: DanTsukasa 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka 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?

(http://oi59.tinypic.com/12196ap.jpg)

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

Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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).
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka 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?

(http://oi59.tinypic.com/108a0cx.jpg)
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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
    }
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka 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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka 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.

(http://oi60.tinypic.com/2ppgh1i.jpg)

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.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi 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?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: DanTsukasa 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
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-04-01 10:29:03
Thanks DanTsukasa (I copied/pasted yours, that was easier :p).

I still plan on tons of things actually.
• Correcting bugs. I saw there was still some bugs with the preloading thing (it can totally mess up with your file because the check of the data size is wrong) and with scripts (I saw Cactuar's IA are surely wrong).
• Walkmesh viewer/editor, as well as making backgrounds editable. I think it will be more simple to make walkmeshes editable directly from the tool, as there may be some features specific to FF9's format.
• Making the file size modifiable. It will allow more changes to be made. However, I'll make it in a separate module because PPF patches won't work anymore with that. You'll have to use .hws files to share the mods then.
• Completing things already there. There are tons of datas about enemies that are currently unknown or uneditable, for instance. The command panel and the supporting abilities panel are also my shame for now and since a long time ^^'
• Making spell animations editable. tasior2 is looking for the models, but there's also the sequencing that can be modified. For instance, it will allow to make spells deal damage several times in one cast, like Cloud's Omnislash and such.
• Speaking of models : importers and exporters of more model files (that was hella tedious for me with battle scenes so that's why I'm not motivated a lot to do the others)
• A Tetra Master panel.
• A menu UI panel.
• Editing the other texts that can't be edited yet.
• Sound and Music exporter/importer.
• A damage calculator, to display conveniently what would be the damage dealt by spells, plus the accuracy of hitting/inflicting statuses.
• Add more flexibility about everything : be able to move an enemy from an enemy formation to another (I'm thinking of making a Garland + Silverdragon fight, for instance ^^), be able to add text lines and not only modify them, same for fields, enemy formations and such...

Actually, I'm not sure to have enough of a life to make everything I would like ^^"
Plus, I'm quiet busy with my job right now.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: DanTsukasa on 2015-04-01 12:23:37
Ah those are some great sounding features.

For the model importing/exporting it might be a smart idea to team up with the guy who made the online viewer, your implementation would be quite different but I'm sure it might save some time and headaches to go over the wiki documentation he's written once he's learned all there is to know about formats.

The walkmesh editor I find interesting, an exporter would be interesting too (though I guess I could use Zidanes tool for that, or his his just editor only, I bet it is...).

How would you even go about the file size modification? I'd understood that to be the ceiling as it were, with no real passable point.

A Tetra Master panel sounds super interesting, what with the possibility of editing the card data along with the card graphics, could change the tide of the game a fair bit (square enix are doing a phone release of Tripple Triad, I wonder if Tetra Master will get the same treatment?), and at the very least make it interesting to have HD cards.

Model data editing is interesting for possible model replacements, especially texture wise, could make the game look real nice, of course the biggest limitation is still the field scenes, since those can only be upscaled really.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: tasior2 on 2015-04-01 12:50:28
Hi Tirlititi,

I just posted some information about directory 13 (spells), hope that will be helpful somehow.

http://forums.qhimm.com/index.php?topic=13840.0
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-04-01 13:16:31
I saw that. Thanks :D

@ DanTsukasa : It should be possible to expand the binary image, though it requires more knowledge about .img format. I downloaded documentation about it.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka on 2015-04-01 14:37:16
These additional features look very promising, I'm looking forward to them. I don't know if this is helpful to you, but I've made an excel file for some of the damage calculation formulas which I'm using for my modding. For those who are interested, here it is:

Code: [Select]
http://speedy.sh/PYtGD/FF9-Damage-Formulas.xls
By the way, I tried your suggestion with placing the counter script in Function_func_1_1, but it didn't seem to work. Although I have to admit, I didn't test it very thoroughly yet. I will experiment some more with it.

On another topic, your to do list reminds me about something else that I've always wanted to play around with, but since I don't know anything about programming, you need to tell me whether the following 2 things are impossible, or whether you could include them in a future version of the editor.

1.) The first one is about the duration of temporary status effects, which are way too short I think. When you’re playing the game with the ATB on active mode and the battle speed set to fastest, no negative status lasts longer than 2 rounds at most if your spirit stat is decent. This becomes especially obvious near the end of the game, when most party members have spirit stats of around 40 even on moderate levels. For example, Mustard Bomb will hardly ever have a chance of killing a character even if it inflicts Heat, because if just a single attack with a decent animation time is in between Mustard Bomb and the targeted character’s turn, the Heat status will have already expired by then. And with ‘decent animation times’ I’m not even talking about summons, as the length of any normal spell or other technique is already sufficient to make Heat wear off. This makes the Body Temp ability more or less obsolete in the late game, even when going up against enemies that use Mustard Bomb or Freeze.

I have found some info on the duration times of status effects in this document here.

http://www.gamefaqs.com/ps/197338-final-fantasy-ix/faqs/44329 (http://www.gamefaqs.com/ps/197338-final-fantasy-ix/faqs/44329)

It’s a very in-depth analysis of FF9’s battle mechanics, which leads me to believe that the author (Rebirth Flame) must have located these data by looking directly at the code. After all, the only way to obtain that knowledge is by actually hacking the game, isn’t it? Now as I said I am no programmer, so what I’m saying now might be completely wrong, but the duration time seems to be one fixed number for each temporary status (both positive and negative ones), like 160 for Heat or 240 for Poison. This counter decreases continually, and when it reaches 0, the status wears off (at least that's what the author claims). So my question is, if you know where these duration counters are located, would it be possible to make them editable in Hades Workshop to prolong status duration? That would be great.

2.) The second point is about the Poison and Regen stats. One thing that I believe needs to be changed in order to make the game more challenging is to break the power of the Auto-Haste & Auto-Regen Combo. With these 2 abilities activated, you’ll never need to manually heal your party ever again. No matter how powerful the enemy’s attacks are, with Haste status the Regen healing will come so fast that it easily heals you back to full health before the enemy gets his next turn. Add Auto-Life into the mix and your party becomes nigh invincible, eliminating any level of difficulty from late disc 3 onward.

I was thinking that one way to weaken this combo would be to increase the time span between Regen healings. According to the same battle mechanics guide, there seem to be secondary counters for Poison and Regen which determine the time span between two Poison damages / Regen healings. Would it be possible to make these counters editable?

Anyway, these are just some ideas floating around in my head, and I don't know how difficult it would be to change them. But I would like to hear your thoughts on those.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Vir on 2015-04-01 16:34:10
Kefka, it sounds like you might be interested in the Poison and Regen tables I have on the Statuses sheet of my mod's spreadsheet. They show how many hits and what % of HP each status moves at each value of Spirit.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka on 2015-04-03 07:06:56
Thanks, Vir, your tables give a nice overview of how the spirit stat influences the time span and the amount of damage/healing that comes from regen and poison. Now all I would need to know is how to edit that. As for now, the only way to lower Regen healing is by lowering the Spirit stat, but I don't wanna do that, as Spirit is important for so many other things as well.

By the way, your tables also gave me some nice ideas for my own mod.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: gledson999 on 2015-04-25 03:40:04
@Tirlititi I have 2 question:

1º: Could be possible disable randon battle over the field and World map? if yes, how i do this?

2º: will be possible allow extract insert video (*.str) in the future?

EDIT:

1º: I found the Preload option on Environment tab/Field and i removed this monster.
(http://i.imgur.com/oB8eOmm.png)

2º: I changed script and changed the Opcode RANDOM_BATTLE to NOTHING parsed and saved
(http://i.imgur.com/v0Cxy9e.png)

3º: but when i enter in game scenario the game crashes like this
(http://i.imgur.com/i8tTrx9.png)
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-04-26 11:05:30
Hey ! I'm sorry, I'm having some problems with my computers so I can't check or test things right now.

@ Kefka : that's a pitty for the counters :/
I would have thought it should work at least in the looping function. Did you check if it was actually looping? The function should end with those two lines :
Code: [Select]
    WAIT(1)
    loop
If there is a RETURN instead, it won't loop anyway so it may be why it didn't work.
About the statuses : no, I don't plan to go that far in the battle mechanics. I wish I could, but the figures controlling these kind of things are really spread over the file and it will be too difficult for me to draw the big picture of the battle mechanics.
However, I've progressed in the spell animation editing feature ; without giving false hope (this feature was full of them for my concern), there might be a way to stop the ATB progression during spell animations, making the combo regen+booster lighter. That also needs checks.

@ gledson : I would have advise you to do exactly what you did....
There is no need to remove the battles from the preloading list, though, and it is the thing that most likely made the bug.
In order to take no risk : simply remove the line RANDOM_BATTLE (remove it, don't change it to "NOTHING" though if that was the problem, then I made a terrible mistake ^^"), parse and save and that should be all about it.
Save states should work fine for a script edition like this. The changes will be effective as soon as you (re)enter the field. However, when changing the preloading files, I think the field needs not to have been preloaded first, so the save state must be at least 2 fields away from the modified field (for the entrance of the Gargan Roo, the save state should be in Tot's tower stairs, for example).

Also, keep in mind that there may be the "RANDOM_BATTLE" opcode somewhere else than in the main function. For instance, the random battles of the fire room in the Desert Palace are activated only once all the fires have been lightened up. So there is a conditionnal execution of "RANDOM_BATTLE" in the main function but there is also another one in another function running when the last fire is lightened.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: gledson999 on 2015-04-26 19:21:05
@ gledson : I would have advise you to do exactly what you did....
There is no need to remove the battles from the preloading list, though, and it is the thing that most likely made the bug.
In order to take no risk : simply remove the line RANDOM_BATTLE (remove it, don't change it to "NOTHING" though if that was the problem, then I made a terrible mistake ^^"), parse and save and that should be all about it.
Save states should work fine for a script edition like this. The changes will be effective as soon as you (re)enter the field. However, when changing the preloading files, I think the field needs not to have been preloaded first, so the save state must be at least 2 fields away from the modified field (for the entrance of the Gargan Roo, the save state should be in Tot's tower stairs, for example).

Also, keep in mind that there may be the "RANDOM_BATTLE" opcode somewhere else than in the main function. For instance, the random battles of the fire room in the Desert Palace are activated only once all the fires have been lightened up. So there is a conditionnal execution of "RANDOM_BATTLE" in the main function but there is also another one in another function running when the last fire is lightened.

Thanks Tirlititiworked perfectly on field battle :D

other questions, I could not find where the value disables battles on the world map ?, as it does to disable because I did not find any opcode called Random Battle, is to remove battles for some monsters.

Ex: no battle will be read with Armstrong data Desert, only be read data Adamantoise

It's Possible?


OBS: I'm trying to make a patch to perfect Excalibur guide ;)
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka on 2015-04-27 10:03:09
@ Kefka : that's a pitty for the counters :/
I would have thought it should work at least in the looping function. Did you check if it was actually looping? The function should end with those two lines :
Code: [Select]
    WAIT(1)
    loop
If there is a RETURN instead, it won't loop anyway so it may be why it didn't work.

Ah, that could be why it wasn't working, I was always using RETURN at the end. I'm gonna try again with a loop function then.

About the statuses : no, I don't plan to go that far in the battle mechanics. I wish I could, but the figures controlling these kind of things are really spread over the file and it will be too difficult for me to draw the big picture of the battle mechanics.
However, I've progressed in the spell animation editing feature ; without giving false hope (this feature was full of them for my concern), there might be a way to stop the ATB progression during spell animations, making the combo regen+booster lighter. That also needs checks.

Interesting, that might be a solution to both of my status-related questions. It would make Auto-Regen far weaker while at the same time prolonging the duration of all status effects. If that is indeed possible it would be great.

Another question regarding the random battles: If it is possible to remove random battles from a certain field, the opposite should be possible, too, right? Because I was considering adding random battles to fields that currently have none. So all I would need to do would be to add the RANDOM_ENCOUNTER function to a field file, plus the four random battles that I want in brackets, like this:

Code: [Select]
RANDOM_BATTLE( 0, 306, 306, 310, 310 )
Or is there something else that needs to be done?
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-04-27 13:00:45
@ gledson : Yeah, the random battles are not handled by the script in the world map (except for Ragtime mouses and Antlion, IIRC). You can't remove the battles from the world map for now :/

@ Kefka : You got it right, but you also need to add the battles in the preloading datas. There is a bug that should be corrected in the next version for preloading datas, but you can try now nonetheless.
Add those battles to the preloading datas, add the "RANDOM_BATTLE" opcode inside the script and test : it will crash in-game if the bug occured and should work fine if not ^^
The corresponding battle scene for the battles must be preloaded as well but I think I made it automatic (if you add a battle, the battle scene is added too if it weren't there).

Note that the 1st argument of "RANDOM_BATTLE" has unknown effect. It might be about the frequency of random encounters.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Kefka on 2015-04-30 12:31:52
@ Kefka : You got it right, but you also need to add the battles in the preloading datas. There is a bug that should be corrected in the next version for preloading datas, but you can try now nonetheless.
Add those battles to the preloading datas, add the "RANDOM_BATTLE" opcode inside the script and test : it will crash in-game if the bug occured and should work fine if not ^^
The corresponding battle scene for the battles must be preloaded as well but I think I made it automatic (if you add a battle, the battle scene is added too if it weren't there).

Note that the 1st argument of "RANDOM_BATTLE" has unknown effect. It might be about the frequency of random encounters.

Ah, ok, thanks for the tip. I'll play around with that for a while.

I've got another question for you, and maybe it can already be done in the current version, but I'm not quite sure how. Is it possible to change the contents of treasure chests on the World Map? I already know how to do it in the Field files, but I'm not sure about the World Map. There is a section called Chocobo Treasures in the World Map tab, but the ITEM ADD Opcode in its script contains only variables, not absolute item IDs like in the field files. Where exactly are the items in the chocobo treasures located?

The reason I’m asking is because I'm mainly working on rebalancing the game's difficulty (not an extreme hardcore mod, just a bit more challenging than normal) because I find that it’s way too easy. Rebalancing the first two discs was easy, but early disc 3 is where the problems start. This is the point when you can find some of the game's most powerful equipment way too early, like Dragon's Hair, Ragnarok, Kaiser Knuckles, High Mage Staff, Light Robe, Shadow Robe, Circlet and Genji Armor. So I was planning on swapping some of these items to later treasure chests, when their stats are more appropriate for the point in the game.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-04-30 17:19:16
According to my memories :
The variables that set the items for the Chocobo chests are located in one of the "chest" function. There is a switch with several variable settings.
The first "SET" is about marking the treasure as found,
the second "SET" is about the first item given,
the third "SET" is about the amount of that item,
the fourth "SET" is about the second item given,
etc... for 4 items
Note that a special variable is used for smoke-evolving chocographs. Also, the script is written so only the 4th item can be a card (but I think you can also give a regular item in the 4th slot).

To see the corresponding item when in the "SET" lines, you need to go to the "Inventory" panel before editing the script. Then the corresponding item will be displayed when you select a number. You need to be quiet familiar with the item sorting by ID if you want to modify it, though :/
Alternatively, you can also write a dummy line "ITEM_ADD" only to have the menu on the right that automatically puts the corresponding number. You remove that line once you're done.
Title: Re: [FF9] General editor - Hades Workshop (0.25)
Post by: Tirlititi on 2015-05-29 18:16:22
Finally update to 0.28 after some break.

I didn't do what I initially planned... That happens too often ^^"
- You can now edit the animation sequencing for both spells and enemy attacks,
- Fixed script bugs and made it a bit more comfortable to read,
- Improved the UI some bit (images no longer twinkles, for instance),


The good news : editing the enemy animation sequencing allows to choose which spell they can cast (SFX-speaking). You can also add several damage points in a spell animation so the spell effect is activated several time (you can use it for making an enemy double-casting or dealing more than 9999 in one attack, for instance).
Enemy animation sequencing and spell animation sequencing are alike, but not totally the same. There are a lot of opcodes related that are unknown. The ones the game doesn't use at all are called "Unused XXXX" but some of them actually do have an effect.

The bad news is that I didn't find a spell animation opcode that halts the ATB, as I wished. I think the chances such an opcode exist are thin.
There is also much less control in spell animation sequencing that I thought. The "Play model" opcodes are kinda bad named because it doesn't only display the spell model but also has some control over the sequencing (Death lvl 5's "Play model" defines the damage point and Ultima's last "Play model" is the thing that loops forever and freeze the battle).

About the script's improvement, you have more translations available in the left of the screen (if an integer corresponds to an attack list, a spell ID or a button list, you can read it conveniently) and the battle properties are also displayed better.

As always, I also found the use of some more script opcodes... But the animation sequencing ones have been added so I'm not near to see the end ^^"
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-05-30 07:19:49
Great work, man! Thanks for the update! It's even working for me, don't know why I had problems and crashes with version 0.27, but 0.28 is running flawlessly again.

Anyway, I've got two questions regarding monster formations that I hope you can shed some light into:

1.) I've noticed that in some monster formations, there are additional slots checked as Targetable even when they don't contain an enemy (see pic). Do you know why this is the case or whether it serves a purpose?

(http://oi62.tinypic.com/hte9gn.jpg)

2.) I've tried adding additional monsters to some battle formations (I also did check the Targetable flag in the new slots that were filled). For example, I wanted to add 2 Goblins to a fight that normally only has 2 Fangs. But then in battle something wierd happens: the new monsters are only visible for a couple seconds,  then they disappear. I suppose it happens when their turn comes up, because the new enemies also cannot perform any attacks. The funny thing is that they still remain targetable, but they're just invisible and cannot act. Any ideas about what's going on?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-05-30 08:11:59
1) The "targetable" flag isn't actually used by the vanilla game, but disabling it can be used to make things like the Bomb-Steiner battle. The vanilla game must be doing that using the script to do that.

2) For adding more enemies, you need to go to the script too and add "INIT_OBJECT" lines to the main function. The first argument of this opcode is the related AI and the second may be related to the enemy slot in the "Groups" section (just check how it is coded in other battles and you'll understand ^^).
Be aware that, for bosses, adding more enemies can be handled weirdly by the script : the battle is usually automatically won when the boss reach 10000 HP, for instance.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-05-30 12:46:00
Ah, thanks a lot, it's working now! Don't worry, I don't plan on messing with boss formations, just wanted to add more enemies in random battles. I find it kinda lame that in most battles there's only 1-2 enemies, and the maximum of 4 is hardly ever used.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Ragna on 2015-05-30 16:07:03
I find it kinda lame that in most battles there's only 1-2 enemies, and the maximum of 4 is hardly ever used.
That's certainly due to the limited PlayStation VRAM space for enemy textures during battle.
Remember there's already a fixed space for the stage's textures and up to four characters and character
weapons texture space, and a certain amount of space must be free for attacks/magic/summons textures too.

There could be a problem if you put more than 3 different enemies in the same battle depending on their specific texture data.
I guess they put thought on balance for texture data for each enemy formation.

the battle is usually automatically won when the boss reach 10000 HP, for instance.
What do you mean by that? Is it maybe that healing an enemy for above 65535 (HP overflow) automatically kills it or something?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: JBedford128 on 2015-05-30 18:13:10
Most bosses don't die by their HP being reduced to 0. Instead, if HP < 10000 trigger death script. This is why Ozma has 55535 HP -- he actually has 65535 but he dies when going below 10000 so he effectively only has 55535. You can't scan so you wouldn't know either way. If the boss's HP did reach 0 the battle just wouldn't end/would hang, which isn't a problem since bosses are immune to instant death attacks and other damage doesn't exceed 9999.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Ragna on 2015-05-30 21:54:15
Most bosses don't die by their HP being reduced to 0. Instead, if HP < 10000 trigger death script. This is why Ozma has 55535 HP -- he actually has 65535 but he dies when going below 10000 so he effectively only has 55535. You can't scan so you wouldn't know either way. If the boss's HP did reach 0 the battle just wouldn't end/would hang, which isn't a problem since bosses are immune to instant death attacks and other damage doesn't exceed 9999.
WTF?! That's so bizarre... :-o
Any idea on why they did that? :?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-05-31 06:27:35
Most bosses don't die by their HP being reduced to 0. Instead, if HP < 10000 trigger death script. This is why Ozma has 55535 HP -- he actually has 65535 but he dies when going below 10000 so he effectively only has 55535. You can't scan so you wouldn't know either way. If the boss's HP did reach 0 the battle just wouldn't end/would hang, which isn't a problem since bosses are immune to instant death attacks and other damage doesn't exceed 9999.
WTF?! That's so bizarre... :-o
Any idea on why they did that? :?

The "death if HP drops below 10000"  script is used by all enemies that have a special death animation, be it a spectacular explosion or just talking to you (Baku, Lani, Kuja, for example). The funny thing is, for all bosses that have less than 20000 HP total you can actually verify that in game by throwing a tent at them (which heals exactly 50% of HP and MP in battle). For example, the Masked Man from the game's beginning has acutally 10188 HP, and when you throw a tent at him it heals him for 5094, that's how you know it.

The only enemy in the game that has a "true" final attack is Maliris with her Raining Swords. This is the only attack that is performed when the bosses HP reach indeed 0, so we know that true final attacks must be possible.

I have no idea why they did that, but it's been bugging me too for a while now. I've always wondered if it might be possible to make these special boss deaths behave like Maliris (change them from "perform special death if HP is less than 10000" to "perform special death if HP is 0"). This would allow us to give most disc 4 bosses an additional 10000 HP. But so far I've been unsuccessful with that.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-05-31 08:14:10
^this

That's really strange indeed. I didn't even see Maliris's final attack code. I thought it was also using the "under 10000 HP" way.
So they indeed made 2 different systems for handling the end of the boss battles...

You can't use the "perform special death if HP is 0" system with HW for now. I'll look into it but if that works as I think it does, it shouldn't be too hard to enable.

However, you can already give more HP to enemies using the script : when an enemy goes under 10 000 HP, heal him.
See this post for a detailled way to go : http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: DanTsukasa on 2015-05-31 12:52:39
This is an awesome update, and that information about Boss HP going under 0 is really interesting too, so that means boss battles have a different ending script to the normal random battles, interesting.

Are there any plans to add Gif support, lots of the backgrounds have nice animations going on and its not really possible to show the animations right now without exporting each frame individually and stitching them together in photoshop. A better method could be layered Tifs, with each frame being its own layer within the tif. I'm not sure how difficult that might be though.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-05-31 14:23:26
I thought about making it GIF exporting instead of TIFF exporting, but that wouldn't work because there is not only 1 animation per scene but several independant ones. Or there is a GIF feature I'm not aware of?

Personally, when I want to get a GIF from the scene, I use either one of the 2 solutions :
1) using a program, Screen2Gif and capturing the animation(s) in the editor,
2) check all the tile blocks in the editor, then export, then open the TIFF with GIMP, then "Copy visible" -> "Paste" in a new image for each frame of the animation.

The second solution is cleaner but a little more tedious. I find it less tedious than exporting each frame from the editor though.
I'm not aware of photoshop's subtilities but I guess it would work pretty much the same with it.

I hope I helped.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: DanTsukasa on 2015-05-31 16:14:33
Yeah the gif exporter would have that issue, so I thought the layered .tiff would probably be smarter, people can just remove the layers they don't care for.

Capturing the animations from the editor is actually an idea I had in mind, though I'm not sure if perhaps they play a little too fast in the editor.
The main issue with the editor view is that its upscaled, and though its not a huge upscale, its pretty noticable in some scenes.

Example here: http://puu.sh/i7ffo/c75c1d2fa3.jpg the viewer is roughly 1/5th larger than the export and it can be seen in the quality too.

Your second suggestion however, doesn't work in Photoshop for some reason, If I export all the layers it only see's it as a single layered .tiff file, but I tried in Irfan view and it can see all the separate layers correctly, so I'm not sure whats happening there. Whats odd is that I can save a multi-layer .tif (not .tiff though) from Photoshop and Photoshop can then open it fine. I would say is it possible to add PSD support in this case, but common sense tells me its not exactly an open source/easily research able format.

One thing that could work though is that it exports all layers to separate tiff or png images, keeping size and transparency (so the actual frame size stays correct, copy and paste is easy then, no need to manually line things up).

Bit peeved at that Photoshop thing though, that rather sucks. Thanks for replying so fast, its much appreciated.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-06-01 06:35:20
^this

That's really strange indeed. I didn't even see Maliris's final attack code. I thought it was also using the "under 10000 HP" way.
So they indeed made 2 different systems for handling the end of the boss battles...

You can't use the "perform special death if HP is 0" system with HW for now. I'll look into it but if that works as I think it does, it shouldn't be too hard to enable.

However, you can already give more HP to enemies using the script : when an enemy goes under 10 000 HP, heal him.
See this post for a detailled way to go : http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426

Ah, ok thanks, that's one possibility to artificially increase an enemy's HP.

About Maliris, there's really nothing special to her Raining Swords final attack other than that it's located in function_func_4, which is the death function according to you. All bosses that use the "10000 HP death" usually have that located in function_func_1 (the looping function). I've been playing around with the idea of giving final attacks to certain enemies, but in order to do so I guess one would need to add a function_func_4 to their script. Most enemies don't have such a function by default, and currently the editor doesn't allow to add additional functions to a script. Do you think this will be possible in a future version?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-01 17:14:29
Yes, that's how I think I can make it possible.
However, the function number as it is now is not 100% relevant to "when it is triggered". I think there is some other flag telling if a function is ran on death or on ATB or whatever. I'd just need to decipher it.
For instance, there are few enemies with no looping function. For them, the ATB function is "func_1" and not "func_2". The fact they are mostly sorted is not something 100% reliable.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-06-19 07:04:15
Hullo thar, I've been using the editor and it's been better than I ever thought something like this could ever be. But I've been having an odd issue.

For whatever reason, some enemies after being edited in certain ways seem to have an odd glitch happen where that enemy will no longer be defeated when their HP reaches 0, the death animation happens but then they just go back to normal.

Any attacks afterwards also play out the death animation since their HP probably stays at 0, and I don't know what I'm doing that's causing this. The only thing that seems consistent is that it happens after I edit an enemy's attacks.

Any thoughts on what could be causing this?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-20 12:37:48
Hold everything, there are some nasty bugs with the enemy animation editing :/

First bug happens when you export the PPF. It is quiet rare and random but mess up the whole battle.
Second bug happens if you save your changes as .hws file then reload it. The program reads it bad but the save itself is not corrupted (it becomes corrupted if you save again after reloading though).

Both bugs are related to enemy animation editing. There shouldn't be any problem if you didn't use that feature (or at least not those problems ^^").

Dogshrapnel, it may be tricky to fix the changes you made if your files are corrupted and if you didn't have a backup. Send me your corrupted file (.ppf or .hws) and I'll try to fix it.
Sorry for the fail :/

Program updated : I fixed those 2 bugs and added a way to add/remove functions in scripts. You can right-click on the function list for that.
When you add a new function, you're asked 2 numbers, the entry type and the function type. The entry type shouldn't be changed (it says if the script is attached to an object, to a region or to nothing). The function type can be any number but :
1) some numbers means the function is special and it will be run at some points (for AI script, this is what the previous posts in this page was about) ; the "looping function" number can be seen as a secondary "main function" as it is run when the script is initialised.
2) there will be unknown results if you use the same number for 2 different functions of the same entry. The normal version used the types 10 and followings for regular functions that can be called somewhere else in the script.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-06-20 15:51:25
I'll just put the links here. These are my current back-ups. I want the later version working if possible.
To be honest, I forget when exactly I started having this problem, thanks for the help.

I never realized how scripted this game was, the most in-depth edit I've done is to the power and properties of AI attacks thinking it wouldn't be a problem.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-20 17:48:12
Ok. Your file is not corrupted and you didn't have the bugs I just fixed ^^"

It seems that you can't give the "death" status immunity to enemies or else you can't kill them at all, lol.
To give an enemy the immunity against death, I know no other solution than giving the "Easy kill" status as initial status (It should rather be called "Easy Kill Proof"). However, it will also give immunity against "Magic Matra" and similar moves, and against "Scan"...

EDIT : However, "Easy Kill Proof" doesn't immune against "Death Lvl 5". Nothing can immune against that spell if the level matches. I think that's the only one in that case.

Anyway, be it Mimics or Gizamaluke, the spell animation changes you made didn't corrupt your file at all.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-06-20 19:44:38
Oh my gosh, really? I feel like an idiot now. Thanks for the help!

That's an interesting thing to know.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-21 00:19:47
Why would you? That should have been normal to be able to use a death immunity.

Since we are in weird things that comes from nowhere and can make battles bug, I just ran into one. When you add an enemy to a battle group, you sometimes also need (in addition to editing the script and increasing the enemy amount in the group) to uncheck then check back the "Targetable" flag. Some enemies that you'd add are invisible and bug if you don't do it.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-06-21 01:37:33
All it takes is someone making an editor to realize how weird and quirky a game is.

Well, "all" as if making one is easy.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-06-21 08:32:37
Program updated : I fixed those 2 bugs and added a way to add/remove functions in scripts. You can right-click on the function list for that.
When you add a new function, you're asked 2 numbers, the entry type and the function type. The entry type shouldn't be changed (it says if the script is attached to an object, to a region or to nothing). The function type can be any number but :
1) some numbers means the function is special and it will be run at some points (for AI script, this is what the previous posts in this page was about) ; the "looping function" number can be seen as a secondary "main function" as it is run when the script is initialised.
2) there will be unknown results if you use the same number for 2 different functions of the same entry. The normal version used the types 10 and followings for regular functions that can be called somewhere else in the script.

Wow, nice update, improved enemy AI editing is what I've been eagerly awaiting! Does that mean we can now give counter scripts and death scripts to enemies that didn't have them before?

Since we are in weird things that comes from nowhere and can make battles bug, I just ran into one. When you add an enemy to a battle group, you sometimes also need (in addition to editing the script and increasing the enemy amount in the group) to uncheck then check back the "Targetable" flag. Some enemies that you'd add are invisible and bug if you don't do it.

What a coincidence! I ran into that same bug yesterday! I was adding more enemies to battles (because a battle against a single Carve Spider is kinda lame), but I didn't bother with the targetable flag because it was already checked. I somehow managed to fix it by carefully going through everything again (including unchecking and re-checking), but I didn't know why it was fixed afterwards, since I didn't really change anything. That's good to know.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-06-25 14:35:16
Sorry for double-posting, Tirlititi, but I've got a few questions regarding the different AI functions.

1.) The death function doesn't seem to work for me, and the editor also says that it's "not working well". If you had the same problem, was it a specific enemy or a specific attack that caused the trouble? Is there anything specific that needs to be done/written in the script to make it work?

2.) There are also some other functions that I haven't heard of before, like "running on speak button", "running on card button", and "running on collision", what exactly do they do?

By the way, I was wrong in my earlier post about Maliris being the only enemy that uses a death script. I just witnessed a Cactuar using 1000 Needles as a final attack when it died.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-25 14:57:27
1) I tried to use the "death" function with an enemy (I don't remember which one) but it didn't work. I didn't investigate much more though, and you can use the usual way "+10000 HP and run the death script in the looping function". Maybe there is some flag or thing to know for using that type.

2) Function types are not limited to IA scripts : they are also used for field scripts. The 3 examples you gave are of that kind : they are used for NPC dialogs or interactions (I'm not sure about the type 18 though ; it is used by Puck running on Vivi but also for a bunch of other functions not particulary special).

I think the Black Waltz 1 also uses a death function for his last dialog.

As a side note, the "counter enemy" type is not really what I thought it was. I need to check things but it seems to be running anytime a spell takes effect (be it casted by the enemy or the party). It also triggers on counter-attacks or returned spells, unlike the "counter party" type.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-06-28 09:52:57
1) I tried to use the "death" function with an enemy (I don't remember which one) but it didn't work. I didn't investigate much more though, and you can use the usual way "+10000 HP and run the death script in the looping function". Maybe there is some flag or thing to know for using that type.

2) Function types are not limited to IA scripts : they are also used for field scripts. The 3 examples you gave are of that kind : they are used for NPC dialogs or interactions (I'm not sure about the type 18 though ; it is used by Puck running on Vivi but also for a bunch of other functions not particulary special).

I think the Black Waltz 1 also uses a death function for his last dialog.

As a side note, the "counter enemy" type is not really what I thought it was. I need to check things but it seems to be running anytime a spell takes effect (be it casted by the enemy or the party). It also triggers on counter-attacks or returned spells, unlike the "counter party" type.

Ah, I see, thanks for clarifying that. The "counter enemy" function seems to handle stuff like enemy model size or other enemy-related parameters, while the "counter party" function is the one that carries out actual counter-attacks.

On a side note, do you think it will theoretically be possible to add more attacks to an enemy's attack list? Right now, when we want to give an enemy a new attack we have to replace an existing one, but what about extending the list by 1-2 attacks? Is there enough room for that?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-06-28 10:04:31
Yes, that's on my to-do list and I think I'll implement it on the next version.
Right now, I'm working on my own mod though, so the program is on stand by until I finish a proper version.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: jounatsi on 2015-07-12 15:41:54
Is it possible to edit the speech bubbles "shadows" with this tool?

I would like to make them fully transparent or remove them completely because i am using a "GTE Accuracy hack" that causes a small glitch with speech bubbles, but it also reduces polygon shaking and not using it is not an option as characters jitter like crazy without it.

Here is a picture what I meant:
(http://i.imgur.com/LAnfrz3.jpg)

Anyway this is a very fun tool to mess around with, i hope you continue working on it.  :)
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-12 16:19:04
When you edit scripts, look at the "WINDOW_SYNC" opcodes and such. There's an argument called "flags".
Though I don't know it well, here is the purpose of some flags :
3 -> Disable the tail in dialogs
4 -> Mognet dialog
5 -> Hide Window
7 -> ATE dialog
8 -> Usual dialog

Check the 5th box then and it should be ok.

I didn't fully understand what you were trying to do, so maybe I answered wrong. Sorry if that's the case.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: jounatsi on 2015-07-12 17:05:58
I am trying to get rid of those shadow textures/sprites that are on the right side and on the bottom of the speech bubbles, i am not trying to hide the whole window.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-12 17:11:09
Ah okay...
I don't know any solution, but I think the answer resides in the UI textures (in the "Text" panel).

However, I would bet this glitch is caused by emulators subtilities and that it works perfectly on PSX.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: jounatsi on 2015-07-12 17:27:58
I had a feeling it might be there somewhere, now I just have to find it which seems like a impossible task  :|

And yes, the glitch is caused by an emulator.

Anyway, thanks for the help  :)
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-07-18 03:20:03
Just found an interesting glitch.

I set up Nova Dragon so that its multi-target shockwave was Attack Type 8 instead of Enemy Attack since it seemed less random.
When it got used, Zidane, Quina, and Freya all countered since it was a physical attack, but after that, Zidane and Quina were glitched and their animation kept trying to do their last action, if they did anything other then countering, the game would soft-lock and their turns would never happen.

Very Interesting, speaking of which, what is it about the Enemy Attack effect that seems to make it so random? The damage seems to vary from doing 40 damage to over 1000.

*Edit: After looking at the formula, it seems the Random Mod is only divided by 4 for Enemy Attack rather than 8 for party skills. They tried a little too hard to make this game random, jeez.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-18 11:44:12
That's strange... Most of Enemy Attacks are counterable and I'm pretty sure Shockwave is counterable by default.

When doing my mod, I had another tedious bug about counters. The game was not ready to use spells that deal damage several times.
If you add several effect points to a spell animation (both in the "Spell animation" panel and in the "Enemies" panel), you need to make sure no one will ever have a counter action twice for the same spell since that freezes the game.

Counter actions are either the enemy reacting to your action (counters, obviously, but also things like Tantarian opening itself) or you reacting to an enemy action (counter, return magic and, most importantly, auto-potion).

To avoid an enemy reacting twice to your action, you have no other choice than to disable the counter (at least more than once) in the IA scripts for the specific spell animations that damage several times.
Code: [Select]
    // Those lines are always in the counter functions already
    if ( ( GetAttackCommandId == 25 ) && ( GetAttackId == 103 ) ) {
        return
    }
    //  Those lines need to be added, replacing the numbers by the spells IDs
    // of the spells with several damage points in their animation
    if ( ( GetAttackId == 100 ) || ( GetAttackId == 101 ) ) {
        return
    }

Here is a list of enemies that can react to your attacks. It's tedious but you would need to add some few lines in their AI to avoid bugs.
I didn't put the enemies that already have a "counter only once" system or those that counter only the "Attack" command.

Code: [Select]
// Disc 1
Yan
Friendly Yan
Armstrong
Ghost
Gizamaluke
Grimlocks (both of them)
Jabberwock
Mimic
Cactuar
Lamia
Sand Scorpion
Bomb (counter fire spells only)
Black Waltz 2 (counter the elemental Black magics only)

// Disc 2
Soldier
Zuu
Sand Golem
Tantarian (put the script after HP update)
Zorn & Thorn
Sand Scorpion (more of them)
Soulcage (counter fire spells only)
Stroper
Zemzelett

// Disc 3
Amdusias
Shell Dragon (only the random encounters)
Epitaph (magic disbled for these battles)
Grimlocks (more of them)
Drakan
Ring Leader
Tonberry (put the script after HP update)
Mover (optionnal : they don't crash the game but don't pass from 2 of them to 1 of them)

// Disc 4
Ash
Kraken (when he's on crystal shape only ; he already has a "counter once" system as a boss)
Trance Kuja

I might add a feature that automatically adds those anti-bug lines inside the AI of these enemies.

Now, about the spells that the enemies can cast and trigger a reaction from you, I see only 2 solutions :
- Make sure the party doesn't have the access to counter abilities by the time those enemies are met...
- Make sure that the enemies use the concerned abilities only as a counter attack : you can't react to a counter so it won't be a problem.


That's unfortunatly another deception from spell animations editing... That begins to make a lot of them  :-\
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-07-18 20:29:53
Haha, shouldn't be surprised that a game as complicated as this has lots of bugs when you start to edit things.

Lots of interesting quirks too, I've been messing around with attack effects to see what happens, certain weird things I've noticed is that editing certain enemy attacks to be "Physical Attack" seems to place some kind of element with that attack depending on the enemy. For example, Nova Dragon was healing some of my characters with Shockwave when it was set to "Physical Attack", yet it's non-elemental by default and no element was set up. Very interesting.

Also, the only reason I can see why counter was glitching earlier is that "Attack Type 8" seems to only be set up for single target attacks, another interesting quirk.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-18 20:37:00
:o
Nice catches.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-07-20 06:41:55
Very Interesting, speaking of which, what is it about the Enemy Attack effect that seems to make it so random? The damage seems to vary from doing 40 damage to over 1000.

*Edit: After looking at the formula, it seems the Random Mod is only divided by 4 for Enemy Attack rather than 8 for party skills. They tried a little too hard to make this game random, jeez.

One thing to note about the Enemy Attack formula is that the formula given in the editor must be wrong, or I'm reading it incorrectly. The formula given is:

Damage = (Attack * power/10 - Defense) * strength

(to keep it simple, I only calculate it for the minimum damage now, not considering the range).

But whenever I do the math I end up with way higher damage numbers than are actually dealt in game. Let's take Abadon and his High Wind attack for example:

Abadon has an Attack stat of 75, a strength stat of 22, and High Wind has a power of 60.
As for the target's defense, let's assume a value of 45, which is pretty much the best that you can have at this point (Genji-Armor, the best Robes and such).

So we fill in:

Damage = (75 * 60/10 - 45) * 22 = 8910

So even with a top defense, Abadon's High Wind attack should deal a minimum of almost 9000 damage to the party! And we know that it's far from that. The formula must be incorrect, or missing a bracket or something. My guess is that it's really pretty much the same as the "Attack type 8" formula, only with a somewhat higher range, as you said.

However, I did notice one (more or less important) difference in my observations: it seems that attacks that use the "Enemy Attack" formula cannot miss, ever (can tirlititi confirm this?). This gives it an advantage over the "Attack type 8" formula, especially in late game where your evasion is usually around 30-35, rendering enemy physical attacks that use "Attack type 8" almost useless due to the way the hit % calculation works.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-20 11:29:51
So much for the formula (I don't remember where I picked it).

Indeed, "Enemy Attacks" can't miss. They can also inflict status aliments and they can take their element in account (though it is strange about it because I think they don't always do and Dogshrapnel just discovered they can have another element, maybe related to the enemy's element).
Actually, the only drawback I found about it is that it doesn't trigger trouble's spreading damage even when using a single target.

There are so many tests to make their to figure out all the subtilities of the different effects... There are even some flags I still don't know anything about.
However, I don't think it is in the last release I made, but I recently figured out the purpose of one flag, the 7th one (left to "Returnable") : it disables the "Hit" or "Death" animation on strike (even though that it's mostly used with spells that don't deal damage and therefore won't trigger it anyway).

EDIT : The right formula for "Enemy Attack" is
Damage = (Power - Defence) * Random[Strength, Strength + (Level + Strength) / 4]
It's exactly the same as "Attack 8" actually, judging from my tests... There shouldn't be more variance in one or in the other.

Note that the "Attack" statistic of the enemy is not used... I begin to think this field as nothing to do with an attack statistic.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-07-20 17:57:53
That's the feeling I got, otherwise the damage enemies do with some attacks would be waaaaay higher.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-07-21 09:31:58
EDIT : The right formula for "Enemy Attack" is
Damage = (Power - Defence) * Random[Strength, Strength + (Level + Strength) / 4]
It's exactly the same as "Attack 8" actually, judging from my tests... There shouldn't be more variance in one or in the other.

Note that the "Attack" statistic of the enemy is not used... I begin to think this field as nothing to do with an attack statistic.

Yeah, that formula looks more like it, and that was also my impression after testing it a bit. The bugs observed by Dogshrapnel still confuse me, though.

It's kinda strange that the Attack stat went completely unused. But then again, it's not the first time in the FF series that an entire stat serves no purpose at all, though in previous games it was always one of your party characters' stats. In FF1, the Intelligence stat was unused, in FF6 it was the Evade stat, and in FF7 it was Magic Defense. It seems every game has its share of bugs, lol.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-07-27 03:46:01
One thing I'm curious about is the other attack types, all the basic physical attacks used by enemies are of the "Attack Type 8" class, so what the heck are the other 7?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-27 10:24:32
I think some of the others matches the weapon's formula.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-07-27 16:10:00
That sounds useful for a few things...
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-07-28 11:22:38
While we're at the subject of attack formulas, I got a couple random questions about some:

1) Is it possible to make other attack types never miss just like "Enemy attack"? Because I'd like that for Flare Star and Blue Shockwave, but increasing their accuracy seemed to do nothing at all.

2) Is there a difference between the "Matra Magic" formula and the "Roulette" formula that for example Ark's Photon is using?

3) How exactly do Tiamat's "Absorb Magic" and "Absorb Strength" skills work? Like by how much do they reduce the target's stat, and does it increase his own stat by the same amount? I think I've read somewhere that he drains half of the target's stat and adds that to his own, but I don't remember where I read that.

4) I've noticed that several attacks which use the "Bad Status" formula also have a spell power (Grand Dragon's Venom Breath or Ark's Propeller Wind, for example), even though it's useless because attacks using the "Bad Status" formula don't use the power byte. So I was wondering: were these attacks actually meant to deal damage in addition to causing the status effect? Maybe they just used the "Bad Status" formula by mistake, when they should be using the "Magic Attack" formula?

Sorry for the many questions, those were just some things that I've been wondering about for a while now.

Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-28 14:12:07
No probl. As said, there are lots of details like these.

1) Not for now. The accuracy formulas are hardcoded in the spell's effect (except for Vivi's Meteor and Comet which are linked to the spell slot).

2) The only difference I would see for Matra Magic and Roulette is the accuracy formula. Roulette always succeed while Matra Magic can miss.
They both don't use the Status field so I use Maelstrom if I ever want a similar effect adding a status.

3) I checked it and it does that :
- Doubles the stat of the user,
- Divide by 2 the stat of the target.

4) I think the programers kind of copy-pasted the spells and changed what needed to be changed, leaving unused fields (such as the power for those "Bad Status" spells) unmodified. I've noticed that the power is usually the same as another spell in the enemy's spell list.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: uzoko1 on 2015-07-28 14:42:20
Hey I sent you a pm last night but I guess you didn't see it, but I actually understand how to apply patches and stuff to the game, but I do not know how to add Blank to the party. I tried asking Leroche when emailing him, but his description was also confusing :/ I do not see an add party function in Hades, but I really am trying to learn how this all works...I just really want blank in my party. whether its adding him in or switching him out with someone else like steiner. sorry for the long post, just really eager to know how.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: uzoko1 on 2015-07-29 04:15:19
So I did tweaking and everything around the tool and notice some things with the skills and weapons. I can get everything working, but again like I said...Blank...also trying to add marcus now too. its confusing, but I really am trying..I tried looking at scenes in the fields when marcus or blank is actually in the party...but I dont see anything that is them. Like when you click on some numbers it says an item ex: 1 is dagger 21 is I think gladius..and so on. I was trying to figure out what will actually get them in my party permanently or what this Initializing thing you were talking bout before. Party_Reserve(2303) won't work until It actually gives me the option to swap party members right? I am getting the hang of some things, but would really like you input. I also looked at your post on qhimm, but I could not figure out where you were talking bout adding models except one part, but you don't go into how to do it, or how to add or remove certain models(party members) like beatrix, cinna,blank, marcus. What I am actually trying to do, is do these 4 people: Zidane,Blank,Marcus, and Beatrix(its okay if not her because complications like fighting her as a boss or just too many different code inputs.
Sorry just posting this if you did not get my Email :/
Or if we can use some type of IM so it can go by quicker..heh
Edit: oh I just noticed you said something about adding him in at a certain time? or removing someone beforehand. So lets say in Evil forest the first area its just Zidane, is it possible to have him there? and when I go to fight the prison cage boss he will be that 4th character? Or should I use this code after I finish evil forest cuz he comes in the last battle of it. So whatever number Steiner is at ice cavern i would remove him from party and then add blank? Can I just load from a save game or have to start over each time to test this?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-07-29 07:47:57
No probl. As said, there are lots of details like these.

1) Not for now. The accuracy formulas are hardcoded in the spell's effect (except for Vivi's Meteor and Comet which are linked to the spell slot).

2) The only difference I would see for Matra Magic and Roulette is the accuracy formula. Roulette always succeed while Matra Magic can miss.
They both don't use the Status field so I use Maelstrom if I ever want a similar effect adding a status.

3) I checked it and it does that :
- Doubles the stat of the user,
- Divide by 2 the stat of the target.

4) I think the programers kind of copy-pasted the spells and changed what needed to be changed, leaving unused fields (such as the power for those "Bad Status" spells) unmodified. I've noticed that the power is usually the same as another spell in the enemy's spell list.

Ah, I see. Too bad about 1, but I guess it can't be helped. I think I'll just lower the evade and magic evade of armlets and gauntlets then, which are a bit too high in my opinion anyway.

The other things are nice to know. That explains why the damage from Tiamat's attacks will sky-rocket after draining the same stat twice. Copy-Pasting of the "Bad Status" spells makes sense, I didn't think of that.

One more question if you don't mind:

I've noticed that the Death and Mini spells used by some enemies don't use the "Bad Status" formula, but have their own "Death" and Mini" formulas, respectively. However, since the same result could be achieved by using the "Bad Status" formula, is there any point to having separate formulas for death and mini? Do they have any advantages/disadvantages over the "Bad Status" formula?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Tirlititi on 2015-07-29 10:48:15
I've figured the Death effect difference quiet recently : if the target is under Zombie, it totally heals him instead of applying the status effect (whatever this status is). The effect Death is the only one to do that (Lv5 Death, for instance, kill the zombies like the others).

There may be a similar thing for Mini but I recall having checked that a long time ago and it seems that "Bad Status" also removes Mini if the target is already under Mini and if that's the status of the spell.

@ uzoko1 : I answer you by e-mails.
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Kefka on 2015-07-31 13:33:35
I've figured the Death effect difference quiet recently : if the target is under Zombie, it totally heals him instead of applying the status effect (whatever this status is). The effect Death is the only one to do that (Lv5 Death, for instance, kill the zombies like the others).

There may be a similar thing for Mini but I recall having checked that a long time ago and it seems that "Bad Status" also removes Mini if the target is already under Mini and if that's the status of the spell.

Ah, interesting, I didn't think of the Zombie status. Thanks. Yeah, Lv5 Death works differently, according to the formula you gave in the editor it doesn't really inflict a status, but rather sets the enemy's HP to a certain value (in this case 0). That's why death resistance cannot protect against it.

I still don't see a difference with Mini, however. It's been a while, but I swear I saw Quale's Mini spell enlarge my already mini'd party again, and it's using the "Mini" formula.

On another subject, I've noticed that Trance-Kuja deals 1.5 times damage with Holy when compared to Flare, even though both spells have the same power. I've made sure that none of my party members wears any equipment that changes Holy damage (and I don't think there is any equipment that makes you weak to it, anyway), yet still all 4 party members took 50% more damage from Holy than from Flare. This leads me to believe that there must be something that allows enemies to boost the damage from a certain element by 50%, similar to how some equipment pieces grant you a damage boost for some elements. Do you know anything about that?
Title: Re: [FF9] General editor - Hades Workshop (0.28)
Post by: Dogshrapnel on 2015-08-05 01:15:34
So I just found out something very interesting.

I removed "Add Status" from Zidane's ability list planning to make it so that he would just use "Soul Blade" for all of his status effects. However, after doing that, I randomly got the Silence effect from the Mage Masher even though it didn't exist for him anymore. So the trigger for weapon status effects might be locked from working due to the ability rather than the other way around. I haven't done any more testing with other characters but it doesn't seem to be a fluke or anything like that.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Dogshrapnel on 2015-08-13 03:13:00
Okay, Gizamaluke is weird...

The editor displays him as having a normal amount of health, so I let the the player be able to poison him since he's fairly hard in the mod I'm working on.

So when I poisoned him...he took over 4000 damage and ended the fight instantly. Tents also heal him for 9999 HP if you use that tactic...

So what gives? Other "Heavy" bosses who die when under 10000 are shown in the editor right? Why is Gizamaluke and perhaps other bosses as well have weird HP values not shown?
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-08-13 15:49:18
The Max HP of Gizamaluke is rewritten at the beginning of the fight.
Code: [Select]
        SET VAR_B15_1 = ( 65535L - Op2B(SV_FunctionEnemy[HP]) )
        SET VAR_B15_3 = ( ( ( 65535L - VAR_B15_1 ) / 3 ) + VAR_B15_1 )
        SET SV_FunctionEnemy[MAX_HP] =$ 65535L
        SET SV_FunctionEnemy[HP] =$ 65535L
It is set to 65535 and "VAR_B15_1" keeps memory of the initial HP gave to him. When Gizamaluke's HP gets under "VAR_B15_1", he does his death stuff.

"VAR_B15_3" is a threshold for his Water attack. Under 1/3 of his HP (as seen from the player's perspective), he casts Water on the team instead of 1 target.

As an example, let's say you set his Max HP to 10000 in the editor.
After the start of the battle, the variables will be set like these :

Code: [Select]
// Actual Max HP
SV_FunctionEnemy[MAX_HP] -> 65535
SV_FunctionEnemy[HP] -> 65535
// Death threshold
VAR_B15_1 -> 55535
// Multi-Water threshold
VAR_B15_3 -> 55535 + 10000 / 3 = 58868

So yeah, Gizamaluke has the same kind of system than the other bosses but it is more hidden in the script (Kraken and his tentacles also use this kind of system).
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Dogshrapnel on 2015-08-14 05:54:48
Oh really? That's pretty interesting...but also raises the question of why do it differently for these creatures while others are more standard? It just seems weirdly inconsistent to me.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-08-14 13:46:17
I guess that's because they didn't need it to be consistent. They only needed it to work.
Some smart guy told me you could roughly guess how many developpers worked on this game by looking differences like this in the code.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-21 18:06:06
can u add an option for ap after battle on monsters?

also is there a way to change battle music on certain battles?
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-08-22 14:37:35
can u add an option for ap after battle on monsters?

That option is already there, in every entry in the enemy list below the attack list there's a list of the "groups" (or enemy formations, if you prefer), and there you can edit the AP reward for each group of enemies.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-22 17:40:40
with this little bit of info is it possible to make new battles or custom battles?
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-08-22 18:45:43
There's no way to change the music for now. About making new/custom battles, it won't be possible after some time (there are several steps separating us from that). However, it should be possible quiet soon to add some new abilities to enemies instead of having to recycle the old ones.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-24 00:33:07
any chance of the ability to change passive abilities of characters cuz i notice some have more than others. would be cool to make a mod that enables more of them on more chars.

btw i found a way to customize the battles sorta, i was able to add more monsters. now need to learn how to add different kinds of monsters to a battle
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-08-24 07:22:07
If I recall correctly (I can't remember where I've read it, it's been a while), the game allows every character to have exactly 48 abilities in total, both action abilities and support abilities combined. This means that if you want to give more support abilities to a character, you have to remove some of his action abilities to make room for that.

Edit: that's right, it was here, Zande has found some info on it a while ago:

http://forums.qhimm.com/index.php?topic=12648.msg176131#msg176131 (http://forums.qhimm.com/index.php?topic=12648.msg176131#msg176131)

I don't know how difficult it would be to prolong the list of abilities for any character, at least it's not possible right know.

But that leads me to a related question, Tirlititi: I tried to give some support abilities to Beatrix (mainly offensive ones that would be fitting for a master swordswoman like Long Reach, MP attack, Counter, or the various Killer-Abilities), however, there’s an issue with that. While she does now possess these abilities, I’m unable to make use of them because Beatrix doesn’t have access to the support ability menu (see picture).

(http://oi58.tinypic.com/2yv08s1.jpg)

Is there any way to enable the four temporary party members to have access to the support ability menu?

Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-25 02:12:09
what i wanna know is how can enable beatrix to be addable after disc 3 XD

i wouldnt enable passives cuz if u level her, shes quite OP almost too OP lol esp if u go in and add support for other swords to be used by her
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-08-25 08:15:47
@ Kefka : I don't know how to solve this problem. It needs investigations but there's a chance that it won't be possible to add supporting abilities without messing with the regular characters' ability learning progress.

@ resinate : You can add Beatrix at disc 3 by editing the game script. You need to add Beatrix with a "PartyAdd" opcode or a "PARTY_RESERVE" opcode. You should change the ones that are already present (in the Hilda Gard 3 scenes, for instance).
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-08-26 07:10:09
@ Kefka : I don't know how to solve this problem. It needs investigations but there's a chance that it won't be possible to add supporting abilities without messing with the regular characters' ability learning progress.

@ resinate : You can add Beatrix at disc 3 by editing the game script. You need to add Beatrix with a "PartyAdd" opcode or a "PARTY_RESERVE" opcode. You should change the ones that are already present (in the Hilda Gard 3 scenes, for instance).

Hm, too bad about the support abilities. However, I'm surprised that adding Beatrix as a permanent party member seems to be that easy. Does the rest of the script really support that? I've heard that wierd bugs happen when you add Aerith in FF7 in later stages of the game because she doesn't have dialogue for those story events to come. Isn't that also an issue with Beatrix? What would happen if you come to an event where your current party members have something to say?

But then again, maybe she DOES have dialogue for later events (I haven't looked yet). I don't know the details of the game's development, but there are a couple of hints that she was originally meant to join the party permanently, like Hades offering the Save the Queen in his shop, or the Memoria savegame editor allowing you to edit Beatrix along with the other 8 permanent party members, proving that Beatrix enjoys a permanent slot in the party, unlike Blank, Marcus and Cinna.

If it's really that simple to add her to the party without causing bugs during the rest of the game, then I might seriously consider doing that.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-08-26 08:34:17
Ah, you made a point indeed. I was thinking of adding her in CD 4 where it won't be a problem anyway since dialogs don't depend on your current team. But in the CD 3, there are a lot of places with that kind of thing.

No, she doesn't have any dialog for those events, and yes it will bug if you don't do anything (from my experience, limited to Oeilvert events, it soft locks if a line of dialog should be said but there's no one to say it).
Here is what is likely to happen with Beatrix in your team :
You get to a cutscene involving your 4 party members (they appear on the field),
However, Beatrix doesn't appear so you see 3 characters instead of 4,
At a point when the missing character should say something, the game soft locks.

A simple (yet tedious) way to fix it is to go to every field with that kind of cutscene and replace Beatrix with a regular party member at the beginning of the "main_Init" function then put her back at the end of the same function.
For fixing it so Beatrix appears, not only would you have to add dialogs and movements for her, but you would also need to add a Beatrix model to the field and I never succeeded in doing it (adding a Beatrix model in the model preloading list is not enough). So it's not possible for the moment.

I'm curious : how do gameshark codes handle those problems? People just take the habits not to run it at problemous moments?
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-26 20:06:55
is there a way to add another tab/panel for ALL abilities in game like monster spells, and item spells? aka dead pepper, tents.

also is there a way to use an item in menu that can cause bad statues i see a way to heal them but im not able to add them

how do u set how many targets of a spell, from being single or multi when using enemy spells
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-08-28 07:37:15
I imagine it would be very difficult to sum up all enemy abilities in one huge table, mainly because they are all assigned to one specific entry in the enemy list, and the enemy's AI has to tell each enemy exactly which entries in the ability list can be used by that respective enemy (and for this, the abilities must have a specific "place" in the ability list). Also, every enemy ability is essentially unique, in that it has its own separate properties. A Dracozombie for example uses a different Thundara spell than Vivi, and also a different one than let's say an Ironite, or an Armstrong. In fact, even those repeating entries in the enemy list that only differ in terms of battle background use their own ability lists each. In theory, you could have a Dracozombie on the world map use different attacks than a Dracozombie inside the Iifa Tree, if you wanted. I'm not sure that a single huge list of all abilities could even work, because in the end, you'd have like 50+ Thundara spells in that list with no way of knowing who uses which one. That's why the current approach of having individual ability lists for every enemy entry is actually much more overseeable.

Whether an enemy attack is single-targeting or multi-targeting is defined in that enemy's respective AI script, and which function it is in depends on when the enemy uses the ability. Most are in the "running on full atb" function, but those that are used as counterattacks or final attacks are used in the "counter party" function or "death" function, repsectively. The targeting information of an ability is displayed like this:

For single-target attacks it is: ( SV_Target = RandomInTeam(SV_PlayerTeam) )

For targeting the whole party it is: ( SV_Target = SV_PlayerTeam )

There are also other targeting codes, for example when the enemy is targeting himself or another enemy and such. If you want to change the targeting of an attack you simply have to overwrite that attack's targeting information with the one you'd like to have.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: resinate on 2015-08-29 01:08:32
if anyone here is REALLY good with scripting, i wanna do a mod on chocobo forest where the timer is set to 10 mins and u spend the time farming unlimited items until time runs out is this possible to code using for loops?

so after playing with items following do not work at all - i think there needs to be a field for accuracy for bunch of stuff to work aka lv? death on items crashes game cuz of missing accuracy

anything with bad status effects will always miss/guard
gravity magic will always deal 0 damage

any chance of fixing these?

i also found a bug when u use an item with multi targeting it consumes entire stack of items lol
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Yugisokubodai on 2015-09-03 22:06:12
I finished translating FF9 without using Hades.
But yesterday, I downloaded the latest version and give some try, then I realize that in the Japanese version:

1. Hades calculated wrongly the pointers for place name in World maps.
2. Hades calculated wrongly the dialogue box width. All box have width 0, even if I change to 3,4, some box still remains 2.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kuroda Masahiro on 2015-09-10 07:17:44
Hm, so for the time being, not enough is known for doing something like replacing a character for another one successfully?

Curses, and here I was willing to invest 50+ hours into changing every single instance of Zidane, Vivi and Steiner with Blank. Cinna and Marcus. xD

I made a little mod though that turned Zidane into a swordsman and Sarah into a hybrid thief and white mage and let Vivi use Cinna's hammer as a physical weapon. (I lowered Zidane's stats so that he's quick, but nowhere near as strong as the proper fighters and he looks pretty good with a sword.)

I didn't get alot of time to look around into what could be done with it yet, but this really looks like it can renew my interest greatly in FF9.

Years ago, I knew someone who was making something similar to this, but they just seemed to drop off the face of the Earth.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: uzoko1 on 2015-09-11 03:12:55
Hey, I have emailed you because I got back on the project of making my Script work and I got everything working perfectly fine..even found out how to switch party members out that are supposed to be mandatory..except for ones like zidane evil forest and vivi Waltz no.3 cuz they have to do their beginning trance, but I switched the other remaining members. I have two problems left..exclusing the support abilities on Blank and Marcus because I just gave up on that, but Beatrix's support abilities work...with a price seeing how she has zidanes ability set even thought I didnt put a party_battle_data on her...which wasn't much of a problem, until I noticed at lindublum she has a trance bar...I was like sweet...but when she tranced it stayed in that mid trance animation...so that also means I cannot flee from battles. I can't get rid of her trance bar...also I forgot that when you overwrite as a binary you cannot re-open it again in Hades...Feedback?
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: shikulja on 2015-09-26 10:20:49
Hello Tirlititi, whether added to the import \ export text scripts. for a long time waiting for this function. and it is so still and no.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-10-27 15:43:14
Hi Tirlititi, I've encountered a problem with a specific battle that I hope you (or anyone here) can help me with. I spent weeks adding more enemies to most battles, so all of the small-and medium-sized enemies appear in groups of 3 or 4, and during playtesting all of them worked quite well, except for the battles with the Hecteyes. For some reason, the game always crashes when I enter a battle with 3 Hecteyes, and and on my old computer I've also experienced a major slowdown during this particular battle.

First I thought that my old and outdated computer was the problem, but I have recently aquired a new and technically up-to-date netbook. The game runs much faster now, and even in the 3 Hecteyes battles there's no more slowdown, however, the game crashes still remain. Any idea what might be causing this? I've been wondering because all other battles with increased enemy numbers (and those were a lot!) work just fine.
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Tirlititi on 2015-10-31 18:31:27
Hey, long time I didn't post anything here !

I've updated the tool to v0.30 (yes, I passed from 0.28b to 0.30 because I'm totally crazy :evil:), you can read the changelog at the end of the post.

@resinate : About Hot & Cold, I'll try to decipher the script and make it a bit more readable. The way it is coded doesn't allow to just "loop for an infinite amount of items" though, so you'll have to get creative to find a way to do it.
About the items incompatible effects, that unfortunatly can't be fixed : there are indeed missing fields, but that's not that I didn't find them, that's because they simply don't exist. Adding an accuracy field for items or such requires knowledge I don't currently have.

@Yugisokubodai : Thank you, but that's strange... The 1st bug you mentioned, I thought I fixed it a while ago and when I check, it's fine. The 2nd bug is different though : the height of windows seems to be calculated automatically in the japanese version. I adjusted the text preview to fit a bit more with that.

@Kuroda Masahiro : It is perfectly possible (though tedious) to replace a character by another, minus the well-known fact that Cinna, Marcus and Blank share some data (the levels in particular) with Quina, Eiko and Amarant respectively. You can't have both Cinna and Quina in the team either, for instance. To replace a character, you can put the following lines inside scripts, at points before you can change your party (in the Hildaguard 3, for instance) :
Code: [Select]
PARTY_RESERVE( 4095 ) // Adjust this argument if you want fewer people
PARTY_BATTLE_DATA( 8, 1, 255, 22, 15 ) // Beatrix
PARTY_BATTLE_DATA( 9, 1, 255, 21, 8 ) // Cinna
PARTY_BATTLE_DATA( 10, 1, 255, 21, 10 ) // Marcus
PARTY_BATTLE_DATA( 11, 1, 255, 21, 12 ) // Blank
NAME( 8, 75 ) // Rename Beatrix (shouldn't be important)
NAME( 9, 72 ) // Rename Cinna (or else he's called "Quina")
NAME( 10, 73 ) // Rename Marcus (or else he's called "Eiko")
NAME( 11, 74 ) // Rename Blank (or else he's called "Amarant")
You'd need to add that kind of script anywhere the party is somehow modified to make it persistant ; or use a similar script to revert the changes if you want Quina, Eiko or Amarant back in the team.
There are bugs that can happen at some point of the game, however. I don't know if the Oeilvert part will be ok, for instance, because the script looks for your party members to see which character should be present in the cutscenes. Also, things that heal the whole party on the fields (regenerative springs...) will likely not work on Cinna, Marcus and Blank because the script misses the healing code for those particular characters.

@uzoko1 : I don't understand what you said... What was the questions?

@shikulja : Ok, I'll try to make that feature. Maybe not for the next update, but likely the next one (once all the texts of the game can be edited).

Kefka's bug is serious and I can't find any way to solve it. Hecteyes' model animations are handled through script and spell sequencer and it seems to make it impossible to have more than 2 hecteyes models in the same battle. For 2 hecteyes, strangely, it seems to work fine.



Ok. For the v0.30, I added few more things. The .hwf files will update so be sure to create it with an unmodified version of the game (and then change the .hwf file name if needed). If it updates well on a modded version, that's fine though.

- Added a "Party Special" panel. It will contain special list of spell and command-related things, that are handled specially by the game. For now, it only contains the Magic Sword requirements (the spells Vivi needs to learn in order to unlock the related Magic Sword) but it should also contain things like Meteor's accuracy formula or Roulette randomness script in the future.

- Added a "Tetra Master" panel. You can modify the name and the random range for the statistics of cards (not pictures yet). You can also modify the card decks used by the NPC. The naming rules for decks are the following :
-- For decks used by NPC in Treno Stadium, Memoria or by the Fat Chocobo, the name of the NPC is used,
-- For the others, the name of the town where you can first meet a NPC playing that deck (provided you don't change the script for that) is used,
-- If decks are used by NPC of several towns, a dot dot dot is added.
Thanks to Froggy25 who totally cracked the Tetra Master deep mechanics btw.

- Added an "Interface" panel. For now, it contains all the menu and special texts that were not available yet, including the casting names of Eiko's Eidolons and a bunch of other things.

- Enhanced several features :
-- Spells : you can decide of the "casting name" of spells. For instance, Fira Sword's name is only "Fira" but a " Sword" is appended at the casting time. You can decide of that.
-- Enemies : you can define the default attack used by the enemies under the Berserk and Confuse status ailments (it will always target 1 random character). Also added the "Link enemies" flag in the groups submenu : it is, by default, used exclusively by the Sand Golem, Movers and Kraken to make several targeting parts for 1 enemy. When enabling that flag, the scripts for all the linked enemies but 1 must be deleted and the remaining one will handle all the attacks and counter-attacks (See Kraken's AI script (https://dl.dropboxusercontent.com/u/98687557/Resources/KrakenScript.txt) for an example).
-- Text editing : in the japanese version, the height of the preview window is properly displayed. It is also displayed (instead of being of infinite size) in all the game versions for menu texts and such, where you can't modify the size of the text window.
-- Script editing : you can determine how many local variables you need in each entry of scripts. Local variables seem to be recognized by the fact the 1st number in their name is odd (such as "VAR_B7_0" or "VAR_A11_0"). You need to make the local variable amount strictly higher than the 2nd number of the name of every local variable you use in an entry. For example, in this post (http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426), I explain how to add more than 65536 HP to Trance Kuja but I make use of "VAR_B7_60". It works by miracle but it would need to set the local variable amount to 61 or higher to properly be done. Note that VAR_B7 are 1 byte-long, VAR_B5 are 2 bytes-long and VAR_A11 are 3 bytes-long. I'll go in details for the next version and use that to make the final version of the script editing window.
The function names are a bit more meaningful now.
Also, the scripts for exiting to the world maps are properly un-parsed now. I think that was the last case of script problems.

Next time, if I'm not distracted by something else, you should be able to modify the name of locations on the World Maps (that'll conclude the non-picture texts tour) and a better script editing window should be available (with the feature to name variables, that'll at last look like something).

Tell me if you find problems ^^
Title: Re: [FF9] General editor - Hades Workshop (0.28b)
Post by: Kefka on 2015-11-01 09:02:07
Hey man, good to see that this program is still getting updates. (After the long break now, I was beginning to worry.)

- Added a "Tetra Master" panel. You can modify the name and the random range for the statistics of cards (not pictures yet). You can also modify the card decks used by the NPC. The naming rules for decks are the following :
-- For decks used by NPC in Treno Stadium, Memoria or by the Fat Chocobo, the name of the NPC is used,
-- For the others, the name of the town where you can first meet a NPC playing that deck (provided you don't change the script for that) is used,
-- If decks are used by NPC of several towns, a dot dot dot is added.
Thanks to Froggy25 who totally cracked the Tetra Master deep mechanics btw.

That's quite interesting, I've always wanted to achieve the highest rank in Tetra Master, but I never bothered trying because getting all different arrow combinations is a pain in the a**. The ability to modify the decks of all opponents will definitely allow for huge improvements, I'll certainly take a look at that.

Also added the "Link enemies" flag in the groups submenu : it is, by default, used exclusively by the Sand Golem, Movers and Kraken to make several targeting parts for 1 enemy. When enabling that flag, the scripts for all the linked enemies but 1 must be deleted and the remaining one will handle all the attacks and counter-attacks (See Kraken's AI script (https://dl.dropboxusercontent.com/u/98687557/Resources/KrakenScript.txt) for an example).

Now this is most intriguing. I've already tried several times to make all three Movers act independently from each other (so that they can attack three times per round instead of just once), but no matter how much I tweaked their battle script, it just wouldn't work. Now I know the reason, and I'll give it another go. By removing that Link flag and giving additional AI scripts to the other two Movers it should work, right?
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-01 12:06:35
Well, yes you can do that. But the movers won't move 3 by 3 anymore when attacking and it will be tricky to reproduce their Delta Attack counter system.
You also have to do few more things about the AI than what you said :
1) Remove (or empty, or write new ones) the "Counter" and "CounterEx" functions, since it messes up with each other mover's HP
2) In the function "Init" of the 1st mover, remove the following lines :
Code: [Select]
        SET VAR_B15_0[MAX_HP] =$ 65535L
        SET VAR_B15_2[MAX_HP] =$ ( 65535L - ( Op2B(SV_FunctionEnemy[HP]) / 2 ) )
        SET VAR_B15_4[MAX_HP] =$ 65535L
        SET VAR_B15_0[HP] =$ 65535L
        SET VAR_B15_2[HP] =$ Op2B(VAR_B15_2[MAX_HP])
        SET VAR_B15_4[HP] =$ 65535L
And insert those instead :
Code: [Select]
        SET VAR_B15_0[MODEL_OFF] =$ 60
        SET VAR_B15_2[MODEL_OFF] =$ 51
        SET VAR_B15_4[MODEL_OFF] =$ 15
You'll see their purpose if you don't do it ;)

3) Also, the Delta Attack is engaged in the "ATB" function. When Movers cast the "Continue1" attack, they normally stop bouncing and form a triangle. It won't work anymore unless all the movers cast that attack. Alternatively, you can put those lines in the script to force that triangle formation instantatly :
Code: [Select]
        SET VAR_B15_0[STAND_ANIMATION] =$ 1
        SET VAR_B15_2[STAND_ANIMATION] =$ 1
        SET VAR_B15_4[STAND_ANIMATION] =$ 1
Set it back to 0 to remove the formation.

Other than that, you can try not to disable the "link" flag and put more useful counters in the "Counter" function ; that doesn't give more turns to movers but that's about the same effect without modifying the IA too much (but that's if you are concerned about having the same IA as in the vanilla game).
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Kefka on 2015-11-01 17:26:48
Wow, thanks a ton man! Those are some really useful tips. I'll try them out right away, and who knows, if it works I might even try the same for Kraken and his tentacles.

Yeah, I was worrying about the Delta Attack, too, so I'm glad that you found a solution for that one.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: gorildo on 2015-11-04 14:48:32
Hey Tirlititi, thanks for this program. FF9 is one of my favorite games but sadly, there are many things I would like to change. So far I have made a simple .ppf with just 255 accuracy for stat mags and changed steal slots from some bosses like Hilgigars.

It already made the game a whole lot better!!

I look forward to stuff like editing treasures, hot and cold list, and most importantly more items and harder enemies. And that's what I would like to ask.

- Is it possible to have enemies with more than 65000 or so HP? More than 254 items? Removing the damage limit cap? I'm sure it involves some pretty complex stuff but just wanted to know.

But again thank you very much, this is some extremely quality stuff.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-04 21:31:59
Hey gorildo, glad you enjoy modding the game ;)

Actually, you can already modify few things you ask for. You can modify chest contents by script editing. Chest treasures are not something that are listed in some place, but rather spread around in the fields' scripts. See the "Field" panel and check the script to find the chest functions that give the items.

Somewhat removing the damage limit cap can be easily done in the "Spell Animations" panel : you only need to add several "damage point" and "figure point" to the spell animation sequence. However, there are bugs that may happen then due to counter attacks (explained here (http://forums.qhimm.com/index.php?topic=14315.msg230211#msg230211)).

You can also cheat with the script and add artificialy more than 65535 HP to one ennemy ; an example is given here (http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426) for Trance Kuja.

However, you can't add more than 254 items unfortunatly... You can change the purpose and most aspects of existing items but you have to sacrifice something old for that ^^

Good luck !
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: gorildo on 2015-11-06 00:52:43
Hey thanks, I spent some 2 days trying to figure it out and I finally got something.

On the first field of the list there is this part of the code "Function Code8_Loop"

Code: [Select]
}
                0x27( 127 )
                SET VAR_B9_220 = 600
                SET VAR_B9_222 = 1700
                SET VAR_B5_226 = VAR_C5_7175
                SET VAR_B9_224 = 236
                TEXT_VARIABLE( 0, 236 )
                RUN_SCRIPT_SYNC( 2, 250, 12 )
                if ( 1 ) {
                    SET VAR_C5_7175 = VAR_B5_226
                }

I figured 236 was the code for Potion. I substituted it for "12" on "SET VAR_B9_224" and I got a Sargatanas, as expected.
But what does "TEXT_VARIABLE( 0, 236 )" means? Does it have anything to do with that potion? If not, then is this all there is to it, just substitute that number as in this case and it's okay?

I plan on changing a few chests, but just a few of them.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-06 09:55:17
Congrats ;)

In short : yes you should replace it with the right number. The following explains why.

The "TEXT_VARIABLE" code has the purpose to replace variable part of the texts to one that makes sense.
If you look for the texts, you'll find things like :
Code: [Select]
Received µ!With µ corresponding to the text opcode "[VAR_ITEM]". That "TEXT_VARIABLE" is used in the script to tell which item's name should be written in place of that µ.
That same "TEXT_VARIABLE" is also used for the other text opcodes of the same kind :

Now, if you got it well, you should wonder why, when you picked up the item, not only you got a Sargatanas, but the game also displayed to you "Received Sargatanas" while it should still display "Received Potion" because you didn't change the "TEXT_VARIABLE" argument.
That is because the script then calls the function "Zidane_12" and that's the function in charge of adding the item and displaying the related text (and few other things, such as making Zidane face in the right direction, saving in a variable the fact that this item has been took, ...). The function "Code8_Loop" you modified is in charge of setting it up. In the "Zidane_12", another "TEXT_VARIABLE" opcode is present :
Code: [Select]
                if ( ( GetItemCount(VAR_B9_224) < 99 ) && ( VAR_B9_224 < 512 ) ) {
                    SOUND_2( 53248, 108, 0, -128, 125 )
                    SET VAR_B5_226 = 1
                    TEXT_VARIABLE( 0, VAR_B9_224 )
                    ITEM_ADD( VAR_B9_224, 1 )
                    WINDOW_SYNC( "Received [VAR_ITEM]!" )
                } ....
Since you updated the variable "VAR_B9_224" well, it all works fine as intended : check if the right item is not owned 99 times already, display the right item's name and add the right item to the inventory.
Note that regular items have an ID between 0 and 255, the key items have an ID between 256 and 511 and the cards have an ID between 512 and 611. So it also checks whether the item received is a card (in which case, it does slightly different things) or not.

I tell you to modify the number in the "TEXT_VARIABLE" opcode because, while it is totally useless here, the same system is not used for every treasure of the game. Most of the time, this system is used for treasures not contained in a chest (and thus not related to any 3D model) and a different system, where there is no "SET VAR_B9_224 = some number" setup and you have to change all the numbers in the script, is used for treasures contained in a chest.

For instance, this is a part of the script found in the "ChestA_Range" function for an ether found in a chest in the ruined Prima Vista :
Code: [Select]
                if ( ( ( GetItemCount(238) < 99 ) && 1 ) || ( 0 && ( GetCardAmount < 100 ) ) ) {
                    WAIT( 2 )
                    if ( VAR_C5_7243 == 0 ) {
                        SOUND_2( 53248, 108, 0, -128, 125 )
                        SET VAR_C5_7243 = 1
                        TEXT_VARIABLE( 0, 238 )
                        if ( 1 ) {
                            ITEM_ADD( 238, 1 )
                            WINDOW_SYNC( "Received [VAR_ITEM]!" )
                        } else {
                            if ( 1 ) {
                                ITEM_ADD( 238, 1 )
                                WINDOW_SYNC( "Received [VAR_ITEM] Card!" )
                            } else {
                                ADD_GILS( 16776454 )
                                SET VAR_B9_224 = 64774
                                TEXT_VARIABLE( 0, VAR_B9_224 )
                                WINDOW_SYNC( "Received [VAR_NUM] Gil!" )
                            }
                        }
                    }
Here, you have to modify the number 238 into whatever item you want 3 times :
You can see that there is a good portion of the script that is utterly useless ("if ( 1 )" will always trigger). I can say for sure that Square's developpers used some macros, which is a programming thing that may generate script codes like this.

tl ; dr : change the value in the "TEXT_VARIABLE" and in the "GetItemCount" lines as well if you find those.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: GARDIN on 2015-11-11 11:43:02
I do not know how to thank Tirlititi The best game in my life is ff9 And I achieved my dream Amendment to the ff9 Very wonderful your program HadesWorkshop Can not imagine my happiness very thx Tirlititi And I hope in the next release We can edit the songs (I am bad in English sry :-P)
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-11 16:50:26
Glad you enjoy it ^^
Songs are not going to be editable before long though. It's a huge thing and I don't want to throw myself in it before finishing the other stuff.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Kuja Flarestar on 2015-11-14 18:56:52
Hey! Thank u guys for these awesome programm u created. i recently found a video of zidane casting ultima without crashing/freezing the game. i dont know if its fake or not. So i hoped u guys can help me out a little bit. I`m a huge ff9 fan and admire ur work :). Here ist the YT link of the video: https://www.youtube.com/watch?v=Iwh9X8EMA-I

Best regards
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-15 19:53:55
That's not a fake at all. However, it doesn't totally prevent the game from freezing : casting this Ultima would freeze the game if it didn't kill all the enemies and brought victory.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: EditorMaster on 2015-11-15 21:06:44
Good job Tirlitit,i  you have team members... I envy you, I wonder which program use for found Offset address ? :)
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-11-21 18:07:11
Thanks EditorMaster.
In the early development, I used a little program I made myself to search for a few of data patterns regular hex editors can't search. I don't use it anymore because, mainly thanks to qhimm's wiki, I have the offsets of pretty much every "data directory" and know better how to search things using a regular hex editor.


Attention to everyone : someone warned me about a compatibility issue.
You should never import the "Stats" datas of mod files (.hws) from previous versions (before 0.30). It would mess with all of these datas inside the "Stats" panel.
Only "Stats" datas are concerned, the rest of the mod files is fine.
If you already did that and updated your mod without noticing the stats were totally screwed, that's not a problem : just uncheck the "Stats" box the next time you save your mod and it should work fine.
Modifications made to that "Stats" part, however, are lost ; you'll have to do it again by hand. If that's too much of a work, you can send me you .hws file (or even one that contains only the corrupted "Stats" modifications) and I should be able to fix it pretty easily by hand.
I won't fix this compatibility issue since that would make 0.30 stat datas incompatible with the next releases :/
Sorry to everyone bothered by that.
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: resinate on 2015-12-07 14:37:29
RIP my mod to pieces :( soo much work to make that stat system i did lol
Title: Re: [FF9] General editor - Hades Workshop (0.30)
Post by: Tirlititi on 2015-12-07 17:47:27
If that's too much of a work, you can send me you .hws file (or even one that contains only the corrupted "Stats" modifications) and I should be able to fix it pretty easily by hand.
I'm overly busy these few days, but it'd most likely be done by the end of the week.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2015-12-19 20:57:25
Update to 0.31 :
- You can now fully choose which statuses are inflicted (or healed) by spells,
- World Maps have 2 more sub-panels : they allow to modify the name of the different places and modify the random encounters in the different areas. However, you can only use random encounters with the proper battle scene or the game will crash. Also, you can't see where are placed those areas on the World Map yet.
- Improved the script edition a lot :
--- Added a way to declare and use local variables. More details below.
--- Added a list of different known functions and variables, with their descriptions.
--- You now easily generate the value corresponding to different things, such as an attack list for enemy IA, or a button list to get the player's inputs.
--- Added a preview of the field walkmesh when editing a field script. The positions in the code are viewed on this preview.
--- Same thing for the world map. The preview can't be zoomed tough.
--- Improved the argument helpers for several data types, such as positions or colors.

About the local variables, the syntax is this one :
Code: [Select]
local [type] [name] [Default Name]

// example
local uint8 foo VAR_B7_10

[type] can be one of the following (for now) : int8, int16, int24, uint8, uint16.
They're integers (int) or positive integers (uint). The number is the size in bits, so int16 is 16 bits (= 2 bytes) long.

[name] is the name you want for your local variable.

[Default Name] is optional and is the name of the variable you want to replace. It should have a compatible size. Note that this default name can still be used to refer to your variable.
If you don't specify it, a default one will be attributed. However, it will likely mess with the local variables already used in the script and not declared.

Usually,
int8 are of the form VAR_B3_##
int16 are of the form VAR_B11_##
int24 are of the form VAR_A11_##
uint8 are of the form VAR_B7_##
uint16 are of the form VAR_B15_##

Local variable settings can be saved in .hws files independantly of the rest.
I'm planning to create a .hws file containing all the local variables used by the game by default. Once it'll be done, you can import it and declare local variables without fear of collision with the ones existing (not to mention it will largely increase the readability).

A local variable declaration needs to be parsed to take effect. It can't throw an error but if there's a problem, you'll get a warning and the problematic line will be ignored.


The most immediate and practical use is that you can rename a variable which you understood the purpose :
- Check this variable's name. If it is in the list above (B3, B11, A11, B7 or B15), then it's a local variable and you know the corresponding type.
- If it's not in the list above, then it probably may be not a local variable. That's not a problem because you can declare it local and still use it as a global variable provided you use the right [Default Name]. You can say it's a int8 by default if you don't figure more.
- Declare the variable anyway ; the only thing left is to choose its name, which should be feasible since you understood its purpose.
- Parse, close the script window and open it back. The cryptic variable's name has been replaced by the name you've chosen.

Example : for some treasures, the variables "VAR_B9_220" to "VAR_B9_224" serve as settings the treasure's position and item.
If you find a script looking like this :
Code: [Select]
Function Zidane_13
    Turn( Angle(VAR_B9_220, VAR_B9_222), 16 )
    WaitTurn(  )
    RunAnimation( 2607 )
    WaitAnimation(  )
    SetStandAnimation( 2605 )
    if ( VAR_B5_226 == 0 ) {
        if ( VAR_B9_224 == 29999 ) {
            WindowSync( 7, 0, 59 )
        } else {
            if ( VAR_B9_224 >= 1000 ) {
                Sound2( 53248, 108, 0, -128, 125 )
                set VAR_B9_228 = ( VAR_B9_224 - 1000 )
                if ( ( VAR_B9_228 + GetGil ) > 9999999L ) {
                    set VAR_B9_228 = ( 9999999L - GetGil )
                }
                AddGil( VAR_B9_228 )
                SetTextVariable( 0, VAR_B9_228 )
                WindowSync( 7, 0, 59 )
                set VAR_B5_226 = 1
            } else {
                if ( ( GetItemCount(VAR_B9_224) < 99 ) && ( VAR_B9_224 < 512 ) ) {
                    Sound2( 53248, 108, 0, -128, 125 )
                    set VAR_B5_226 = 1
                    SetTextVariable( 0, VAR_B9_224 )
                    AddItem( VAR_B9_224, 1 )
                    WindowSync( 7, 0, 57 )
                } else {
                    if ( ( VAR_B9_224 >= 512 ) && ( GetCardAmount < 100 ) ) {
                        Sound2( 53248, 108, 0, -128, 125 )
                        set VAR_B5_226 = 1
                        SetTextVariable( 0, VAR_B9_224 )
                        AddItem( VAR_B9_224, 1 )
                        WindowSync( 7, 0, 58 )
                    } else {
                        SetTextVariable( 0, VAR_B9_224 )
                        if ( VAR_B9_224 < 512 ) {
                            WindowSync( 7, 0, 61 )
                        } else {
                            WindowSync( 7, 0, 62 )
                        }
                    }
                }
            }
        }
    }
    RunAnimation( 2591 )
    WaitAnimation(  )
    SetStandAnimation( 200 )
    return
Then you can declare these :
Code: [Select]
local int16 TreasurePositionX VAR_B9_220
local int16 TreasurePositionY VAR_B9_222
local int16 TreasureItem VAR_B9_224
local uint8 TreasureTaken VAR_B5_226
Parse, ignore the allocating warning (since those are globals, you don't need to allocate them), close and reopen and find this instead :
Code: [Select]
Function Zidane_13
    Turn( Angle(TreasurePositionX, TreasurePositionY), 16 )
    WaitTurn(  )
    RunAnimation( 2607 )
    WaitAnimation(  )
    SetStandAnimation( 2605 )
    if ( TreasureTaken == 0 ) {
        if ( TreasureItem == 29999 ) {
            WindowSync( 7, 0, 59 )
        } else {
            if ( TreasureItem >= 1000 ) {
                Sound2( 53248, 108, 0, -128, 125 )
                set VAR_B9_228 = ( TreasureItem - 1000 )
                if ( ( VAR_B9_228 + GetGil ) > 9999999L ) {
                    set VAR_B9_228 = ( 9999999L - GetGil )
                }
                AddGil( VAR_B9_228 )
                SetTextVariable( 0, VAR_B9_228 )
                WindowSync( 7, 0, 59 )
                set TreasureTaken = 1
            } else {
                if ( ( GetItemCount(TreasureItem) < 99 ) && ( TreasureItem < 512 ) ) {
                    Sound2( 53248, 108, 0, -128, 125 )
                    set TreasureTaken = 1
                    SetTextVariable( 0, TreasureItem )
                    AddItem( TreasureItem, 1 )
                    WindowSync( 7, 0, 57 )
                } else {
                    if ( ( TreasureItem >= 512 ) && ( GetCardAmount < 100 ) ) {
                        Sound2( 53248, 108, 0, -128, 125 )
                        set TreasureTaken = 1
                        SetTextVariable( 0, TreasureItem )
                        AddItem( TreasureItem, 1 )
                        WindowSync( 7, 0, 58 )
                    } else {
                        SetTextVariable( 0, TreasureItem )
                        if ( TreasureItem < 512 ) {
                            WindowSync( 7, 0, 61 )
                        } else {
                            WindowSync( 7, 0, 62 )
                        }
                    }
                }
            }
        }
    }
    RunAnimation( 2591 )
    WaitAnimation(  )
    SetStandAnimation( 200 )
    return



I hope you enjoy the changes  ;)
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Dogshrapnel on 2015-12-20 18:49:44
Ugh, I don't know why but after editing a ton of monster data to balance their stats better and saving it, it seems like most of it is gone, which considering how long it took sucks. The really weird thing is that some of that data did get saved, but only the basic stats it seems, all of the status effects and HP/MP stats don't seem to exist. Is that a problem or did I just mess something up somehow?
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2015-12-20 19:26:15
That bites :/
I just tried few tests and it seems to work fine for me. Can you tell me :
1) which datas were saved and which datas were not saved exactly,
2) the save process you had (if you saved as mod, then overwrote the binary data or things like that).

I did change a tiny bit of the saving routine in this version, but I can't see how it would have affect that.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Kefka on 2015-12-20 20:48:28
I downloaded the new version, but when I try to start it I get the message that I'm missing the following dll:

wxmsw30u_gl_gcc471TDM.dll

It's not included in the zip folder.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2015-12-20 21:29:32
Fixed, thx for warning Kefka.
Here is also a temporary link (https://dl.dropboxusercontent.com/u/98687557/Resources/wxmsw30u_gl_gcc471TDM.dll) for the .dll only.

You'd also need glu32.dll (https://dl.dropboxusercontent.com/u/98687557/Resources/glu32.dll) and opengl32.dll (https://dl.dropboxusercontent.com/u/98687557/Resources/opengl32.dll). They are much more standard but if I don't know if they are included in Windows by default.
If that's not the case and most of people need them, please let me know so I'll also put them in the archive.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Dogshrapnel on 2015-12-20 21:46:07
As far as I can tell, I would save as a mod mostly, only saving directly to the file when I was testing. It seems like the monster stats were saved as many defense values are different from the originals. It's weird since everything else is still changed, I remember running into this problem before too, so I don't know what the heck I'm doing that's causing this.

Edit* Now I'm noticing that a few enemies DID have their proper stats saved, usually the ones at the start of the list, but the majority didn't, why would it save some but not all?
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2015-12-20 22:06:49
When you save directly to the file, the modifications are cleared and won't be saved by further "Save Mod" calls.

Now that I think about it... it's a really bad choice that I made it work this way... It's been so long that I don't remember why I've chosen it in the first place. Making the modifications persistents would also bring problems though.

Anyway, when you begin to overwrite the binary file, you should keep doing exclusively it and then create a .ppf file using makeppf or something like that.
Or you do like I do : you use 1 file for which you save only using "Save Mod" and another one for which you import the changes and apply them directly.
I also sometimes use only 1 file and create an undoable PPF patch when I want to test. You need to be careful to unapply this patch before creating a new one though. The first method is safer.

In the next version, I'll add a feature that allow to choose which datas exactly you want to save in .hws files, alongside file batching. This way you'll be able to get a .hws file even if you used the "Overwrite binary" feature before.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Dogshrapnel on 2015-12-20 23:05:26
That's unfortunate, it seems I'll have to redo all that work I did due to some problems that caused my binary files to become unusable. Thanks anyways.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Kefka on 2015-12-21 14:19:48
Fixed, thx for warning Kefka.
Here is also a temporary link (https://dl.dropboxusercontent.com/u/98687557/Resources/wxmsw30u_gl_gcc471TDM.dll) for the .dll only.

Thanks a lot, it's working fine now.

Edit: the possibility to modify and create entirely new sets of status effects seems very promising. Am I right in assuming that the various ''No Status'' sets at the end of the list are currently unused? Because all abilities that don't inflict a status use the ''No Status'' set at the top.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2015-12-21 14:46:08
Yes you're right by assuming that.

I didn't test all the possibilities it offers yet. I can tell that :
• "Curing the Trance status" is possible. It empties the Trance gauge and turn the character back to normal (no effect if the character was not in Trance),
• "Curing the Low HP status" doesn't work. At least it doesn't increase the HP nor it writes the HP figure in white.

I guess there are rooms for discovers here.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: R51 on 2016-01-05 16:25:46
This newest version looks pretty great. I've messed around with it some in the past but I was way out of date with my version. :)

I just downloaded 0.31 to play with the world map a bit, but I don't see anything populating in any of the World Map tabs. See the screenshot below:

(http://i.imgur.com/JDHclYP.jpg)

Is this something I've done wrong?
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2016-01-05 17:31:13
Hum... I'm able to reproduce the bug with the japanese version (the World Map panel doesn't work perfectly with that version, though it shouldn't bug like this). I'm not sure, but I think I failed there : I should have make the .hwf file update itself for this version.

Anyway, try deleting the ".hwf" file in your game's folder and force Hades Workshop to scan the file again (you must scan a non-modified version, always). It fixed the thing for me.

Everyone should check if the World Map panel works correctly and do the same if it doesn't. It won't be a problem if you never access to that panel, but it may loose your modifications if you go to it and it bugs and you didn't save.

Thanks for warning, R51. And sorry for the problem.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: R51 on 2016-01-05 17:48:26
That helps a lot, though the Global Map panel no longer has a preview. Does the current version actually show the Global Map visually or did I misunderstand what it's meant to be doing? Thanks for the fast reply.

(http://i.imgur.com/6UAT3E1.jpg)
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2016-01-05 19:04:04
The world map preview is for the script edition. It's just the minimap but it may show the position when it is explicitely written.

(http://img15.hostingpics.net/pics/824032WorldMapPreview.jpg)

That's nowhere as nice as tasior's viewer, but that's a first ^^"
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: R51 on 2016-01-05 19:15:20
Yep, that's why I was checking this out, was for an alternative to tasior's viewer. Looks like this one won't do what I was wanting to look at, but HadesWorkshop is still flippin' awesome. Thanks again for all the hard work on it. :)
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Kefka on 2016-01-10 20:04:29
I've got another question about enemy AI, and was curious whether you, tirlititi, or someone else could help me out here:

Is there a way for an enemy to check if a specific character is in your current party? Because I've been playing with the thought of making Trance-Kuja use Reflect only if either Eiko or Vivi (or both) are in the current party, since they are the only two characters that have reflectable spells. Reflect doesn't bother any of the other six party members, so if Kuja uses it if neither of the two is in your party, he is essentially just wasting a turn.

I've only found one enemy that uses a party member's MODEL_TYPE when targeting, and that's the Doppelgangers created by Epitaph who always use their 9999 damage attack against their corresponding counterpart. However I'm unsure how to incorporate the Model Type check in an 'if condition' (I'm assuming that's what I'd need for Trance Kuja; to check if model type Vivi or Eiko is present, then use reflect, otherwise use a different attack). Could you give me a hint on how to write such a condition properly? My first attempt has been unsuccessful and lead to a crash.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2016-01-10 20:19:10
It would be this :
Code: [Select]
if (#(SV_PlayerTeam[MODEL_TYPE] ==$ 2)) {
  // Vivi is in the team
}
if (#((SV_PlayerTeam[MODEL_TYPE] ==$ 10) | (SV_PlayerTeam[MODEL_TYPE] ==$ 11))) {
  // Eiko is in the team
}
The list for model types is this one (I don't think I've included it in the help yet, I should do it) :
Code: [Select]
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

That's strange you got a crash though. What was your try?
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: froggy25 on 2016-01-11 11:27:07
Is there a way for an enemy to check if a specific character is in your current party? Because I've been playing with the thought of making Trance-Kuja use Reflect only if either Eiko or Vivi (or both) are in the current party, since they are the only two characters that have reflectable spells. Reflect doesn't bother any of the other six party members, so if Kuja uses it if neither of the two is in your party, he is essentially just wasting a turn.
The AI also uses it to circumvent auto-Reflect, by casting offensive spells on its own Reflect.
There is a quirk with this subroutine: if the reflected spell doesn't find any valid target, it will reflect the spell on the caster (https://youtu.be/fCJUhIG1ESw?t=1m40s).
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Kefka on 2016-01-11 18:19:49
It would be this :
Code: [Select]
if (#(SV_PlayerTeam[MODEL_TYPE] ==$ 2)) {
  // Vivi is in the team
}
if (#((SV_PlayerTeam[MODEL_TYPE] ==$ 10) | (SV_PlayerTeam[MODEL_TYPE] ==$ 11))) {
  // Eiko is in the team
}
The list for model types is this one (I don't think I've included it in the help yet, I should do it) :
Code: [Select]
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

That's strange you got a crash though. What was your try?

That was a while ago already, but I believe I made it way more complicated than it needed to be. I remember I was looking at Ozma’s AI for comparison, because Ozma uses Lv4 Holy and Lv5 Death only if they hit at least one party member, and that’s a condition similar to what I want for Trance-Kuja and Reflect. Since Ozma has these checks in his looping function, I figured I’d put it in the same place in`Kuja’s AI, and then change his ATB function accordingly, but I guess I messed something up during this (seemingly unnecessary) huge change. Afterwards I suspected that maybe including it in the ATB function as an ‘if condition’ instead might be a better choice.

So what do you suggest would be the best place to insert this in Trance-Kuja’s AI?

The AI also uses it to circumvent auto-Reflect, by casting offensive spells on its own Reflect.
There is a quirk with this subroutine: if the reflected spell doesn't find any valid target, it will reflect the spell on the caster (https://youtu.be/fCJUhIG1ESw?t=1m40s).

That's a nice video, never knew about this bug. And you're right, I forgot completely about auto-reflect! I guess Trance-Kuja's use of Reflect does still make some sense afterall, even without Vvi or Eiko. Then I'd need to make it so he checks for auto-reflect in addition to those two little mages.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2016-01-11 20:18:28
Well yes, Ozma has some checkings in his "loop" function, but that's a bit different. The "loop" function really often serves as a secondary "Init" function that only init things that needs player's and enemy's datas to be loaded.
The game can't check party's level too soon in the fight, because the party is not loaded yet ("SV_PlayerTeam" and "SV_EnemyTeam" are 0 before they are loaded). Hence the checks for party's level is delayed until everything is loaded.

However, besides the fact you can't check for party's level or status or whatever too soon, you can decide to put those checks wherever you want. Here are some possibilities :

1) Put the check in the ATB function : I'd say that's the default choice. When Kuja's ATB bar is full, he checks if it is relevant to cast Reflect on himself. Devs tended to use an additionnal variables here, like "CuragaTarget" (see one of Necron's dummy for this example, but there are a lot of them, starting with Ozma's LV spells target which use a slight variation of that system).
However, nothing prevents you to do the check in the "set SV_Target" line :
Code: [Select]
        case +2:
            if (#(SV_PlayerTeam[MODEL_TYPE] ==$ 2)) {
                set #( SV_Target = SV_PlayerTeam )
            } else {
                set #( SV_Target = 0 )
            }
            break

2) Put it in the "loop" function, in the initializing part of the function. That's what Ozma does for the checks of the party's level. Since those lvls won't change during the fight, you can perform the check once and keep the result all over the fight. That's a good way to do it for things like lvl, model type or auto-status, but that's kinda irrelevant for current statuses, HP and such. Note that you always need at least an additionnal variable here for storing the result, and maybe another one if there is no "initializing part" of the function (that's not so common though). It could look like this :
Code: [Select]
    if ( !VAR_B7_0 ) {
        set VAR_B7_0 = 1
        while ( !( GetData_40 & 16 ) ) {
            Wait( 1 )
            set VAR_B5_206 = GetRandom
        }
        // you can do it with a boolean like this :
        set myreflectflag = (#(SV_PlayerTeam[MODEL_TYPE] ==$ 2))
        // or, more like what devs usually did :
        if (#(SV_PlayerTeam[MODEL_TYPE] ==$ 2)) {
            set myreflecttarget = SV_FunctionEnemy
        } else {
            set myreflecttarget = 0
        }
        while ( GetBattleState != 4 ) {
            Wait( 1 )
        }
    }
Then, in the ATB function (or Counter function if you want to use Reflect as a counter), you use "myreflecttarget" as your target when casting Reflect, or check the "myreflectflag".

3) Put it at the top-level of the "loop" function (out of any "if" block). This way you can perform the check every frame and add the ability to cancel the casting if it's not relevant anymore at that point. That's more complicated and I won't give an example here, but that's a system used by Black Waltz 2 or Steiner, for instance : if their target dies before the attack is performed, they cancel it and choose another valid (non-Dagger) target. That way they don't take the risk to redirect their attack on Dagger.

I'll make a small update soon. I'll fix that bug with the World Map and improve a bit script readability. I'll also join a file for the naming of variables in all the AI scripts.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Kefka on 2016-01-12 18:51:48
I see, I'll try out your suggestions. Thanks again for your help.
Title: Re: [FF9] General editor - Hades Workshop (0.31)
Post by: Tirlititi on 2016-01-16 13:48:31
Update to 0.31b :
- Fixed that World Map bug ; the config file will update consequently.
- Enabled script edition of World Maps for the japanese version but for the two dummied World Maps.
- You can now declare "global" variables the same way you declare "local". There is no need to allocate them but, by default, they are initialized to 0 at the beginning of the script's execution (when entering a Battle, a World Map or a Field).
- Added a .hws file containing names for all the variables used in the battles. Use "Open Mod" to import it ; it won't mess with any of your modifications besides your own variable naming if you had one.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gledson999 on 2016-01-17 00:46:44
I'm on a project with a translation with friends to portuguese, and was separated by cities using the "Extract Script Dialog" option being that is already 80% completed, and my question is "Do you have plans to implement the Import Script Dialog option?"


Note: you tool is very precious, congratulation
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-01-17 10:34:41
Yes Gledson, that's what I'll call "file batching". Next main version will be focused on that, promise ^^"
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gledson999 on 2016-01-17 14:00:28
Oh thanks Tirlititi, you're the best ;)
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Vir on 2016-01-17 17:13:28
Tirlititi, I am thinking of making a mod that fixes stat growth for people who want to do without the variable stats. Probably I'll do this by confining stat bonuses to weapons, with a given set of bonuses per weapon class leading up to each toon's max stats. This does leave the question of missing stat bonuses on joining. Can I make all characters join at lv1 in the field scripts somewhere?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-01-17 18:24:23
Yes I saw your topic.
I just made some tests : contrary to what I thought and wrote, the characters whose levels are taken in account are not the ones in the reserve (the ones available when you're asked to choose your party members) but rather seem to be the 4 party members only.

So, in order to do what you want, you need to locate the scripts that initialize the main cast the first time they join the player. It always look like this :

Code: [Select]
set VAR_B13_21 = 0
SetPartyReserve( VAR_B13_21 )
set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
set VAR_B10_8 = 0
while ( VAR_B10_8 <= 11 ) {
if ( IsInParty(VAR_B10_8) ) {
set VAR_B10_10 |= ( 1 << VAR_B10_8 )
}
set VAR_B10_8++
}
if ( 1 ) {
set VAR_B10_12 |= 1
}
if ( 1 ) {
set VAR_B10_12 |= 4
}
if ( 1 ) {
set VAR_B10_12 |= 2
}
if ( 1 ) {
set VAR_B10_12 |= 64
}
set VAR_B10_14 = ( VAR_B10_10 ^ VAR_B10_12 )
set VAR_B10_8 = 0
while ( VAR_B10_8 <= 11 ) {
if ( ( VAR_B10_14 >> VAR_B10_8 ) & 1 ) {
RemoveParty( VAR_B10_8 )
}
set VAR_B10_8++
}
if ( IsInParty(0) == 0 ) {
set VAR_A6_147 = PartyAdd(0)
}
if ( IsInParty(2) == 0 ) {
set VAR_A6_147 = PartyAdd(2)
}
if ( IsInParty(1) == 0 ) {
set VAR_A6_147 = PartyAdd(1)
}
if ( IsInParty(6) == 0 ) {
set VAR_A6_147 = PartyAdd(6)
}
set VAR_D5_303 = 0
set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 99 ) ) )
if ( 1 ) {
set VAR_D5_303++
set VAR_B10_8 = 0
}
if ( 1 ) {
set VAR_D5_303++
set VAR_B10_10 = 2
}
if ( 1 ) {
set VAR_D5_303++
set VAR_B10_12 = 1
}
if ( 1 ) {
set VAR_D5_303++
set VAR_B10_14 = 6
}
set VAR_A6_148 = ( VAR_A6_149 = ( VAR_A6_150 = ( VAR_A6_151 = 0 ) ) )
if ( VAR_B10_8 != 99 ) {
if ( GetHP(VAR_B10_8) == 0 ) {
set VAR_A6_148 = 1
}
}
if ( VAR_B10_10 != 99 ) {
if ( GetHP(VAR_B10_10) == 0 ) {
set VAR_A6_149 = 1
}
}
if ( VAR_B10_12 != 99 ) {
if ( GetHP(VAR_B10_12) == 0 ) {
set VAR_A6_150 = 1
}
}
if ( VAR_B10_14 != 99 ) {
if ( GetHP(VAR_B10_14) == 0 ) {
set VAR_A6_151 = 1
}
}
if ( ( ( ( VAR_A6_148 + VAR_A6_149 ) + VAR_A6_150 ) + VAR_A6_151 ) == VAR_D5_303 ) {
if ( ( VAR_B10_8 != 99 ) && ( VAR_A6_148 == 1 ) ) {
SetHP( VAR_B10_8, 1 )
}
if ( ( VAR_B10_10 != 99 ) && ( VAR_A6_149 == 1 ) ) {
SetHP( VAR_B10_10, 1 )
}
if ( ( VAR_B10_12 != 99 ) && ( VAR_A6_150 == 1 ) ) {
SetHP( VAR_B10_12, 1 )
}
if ( ( VAR_B10_14 != 99 ) && ( VAR_A6_151 == 1 ) ) {
SetHP( VAR_B10_14, 1 )
}
}
SetStatus( 0, 127 )
SetStatus( 1, 127 )
SetStatus( 3, 127 )
SetStatus( 2, 127 )
SetStatus( 4, 127 )
SetStatus( 5, 127 )
SetStatus( 7, 127 )
SetStatus( 6, 127 )
SetStatus( 8, 127 )
if ( IsInParty(5) ) {
set Setting_OptionalQuina = 1
} else {
set Setting_OptionalQuina = 0
}
if ( ( ( VAR_B13_19 >> 0 ) & 1 ) == 0 ) {
SetCharacterData( 0, 1, 255, 9, 0 )
set VAR_B13_19 |= 1
}
if ( ( ( VAR_B13_19 >> 1 ) & 1 ) == 0 ) {
SetCharacterData( 1, 1, 255, 5, 1 )
set VAR_B13_19 |= 2
}
if ( ( ( VAR_B13_19 >> 2 ) & 1 ) == 0 ) {
SetCharacterData( 2, 1, 255, 6, 2 )
set VAR_B13_19 |= 4
}
if ( ( ( VAR_B13_19 >> 6 ) & 1 ) == 0 ) {
SetCharacterData( 6, 1, 6, 6, 6 )
set VAR_B13_19 |= 64
SetRow( 6, 0 )
}

What you need to do is to cut that last part with the "SetCharacterData" and paste it a little before, between the "RemoveParty" loop and the "PartyAdd" calls.
Tell me if you can't find these initializing scripts. The ones for Eiko and Amarant are found in the entrances of Conde Petie Mountain Path and of Madain-Sari respectively, in the functions "Main_Loop" and "Zidane_Loop" respectively.

However, I don't think it will fix the "Marcus/Eiko ; Blank/Amarant" stat glitch.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Vir on 2016-01-17 18:48:42
By the last part you mean that all characters will join at lv1 if I cut and paste as you say, except Amarant won't if Blank's level is higher than the average party level (only a problem in lv1 games). But Eiko will still gain Marcus' stat bonus, even stat bonus he gained through auto-leveling when joining your party? So we must make Marcus join at lv1 and the player must not let him level to keep Eiko's stats "clean"?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-01-17 18:57:24
I got Amarant lvl 2 by doing this, so I guess Amarant's level will always be the same as Blank's level, regardless of the levels of the rest of the crew.
Otherwise, yes.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Vir on 2016-01-17 19:04:03
Ok, so always kill Plant Brain, Blank, and Plant Spiders in that order. Got it.

Thanks!

I was confused by "contrary to what I thought and wrote." Am I missing a post of yours?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-01-17 19:29:21
I wrote that wrong thing in SetPartyReserve's description inside the editor.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Vir on 2016-01-17 19:44:52
Ok. Thanks again for your help!
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: DarkDemon on 2016-01-17 20:23:08
Thanks for this man.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-01-25 09:42:38
I took Eiko on Lv1 editing Field scripts at Conde Petie Mountain Path in the function "Main_Loop" (Marcus' level was 21)
Code: [Select]
Function Main_Loop
    if ( Global_FieldEntrance == 65535 ) {
        set VAR_B13_21 = 103
        SetPartyReserve( VAR_B13_21 )
        if ( IsInParty(5) ) {
            RemoveParty( 5 )
            set VAR_D5_303 = 0
            set VAR_B1_60 = ( VAR_B1_61 = ( VAR_B1_62 = ( VAR_B1_63 = ( VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 65535 ) ) ) ) ) ) )
            set VAR_B10_14 = 0
            while ( VAR_B10_14 <= 11 ) {
                if ( IsInParty(VAR_B10_14) ) {

to

Code: [Select]
Function Main_Loop
    if ( Global_FieldEntrance == 65535 ) {
        set VAR_B13_21 = 64
        SetPartyReserve( VAR_B13_21 )
        if ( IsInParty(5) ) {
            RemoveParty( 5 )
            set VAR_D5_303 = 0
            set VAR_B1_60 = ( VAR_B1_61 = ( VAR_B1_62 = ( VAR_B1_63 = ( VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 65535 ) ) ) ) ) ) )
            set VAR_B10_14 = 0
            while ( VAR_B10_14 <= 11 ) {
                if ( IsInParty(VAR_B10_14) ) {
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-01-25 16:14:51
Also this works with Amarant at  Madain-Sari in the function "Zidane_Loop" (I took Amarant at lv9 because of  Blank was Lv9 )
Code: [Select]
        set VAR_B13_21 = 199
        SetPartyReserve( VAR_B13_21 )
        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
        set VAR_B10_8 = 0
        while ( VAR_B10_8 <= 11 ) {
            if ( IsInParty(VAR_B10_8) ) {
                set VAR_B10_10 |= ( 1 << VAR_B10_8 )
            }
            set VAR_B10_8++
        }
        if ( 1 ) {
            set VAR_B10_12 |= 1
        }
        if ( 1 ) {
            set VAR_B10_12 |= 4
        }
        if ( 1 ) {
            set VAR_B10_12 |= 2
        }
        if ( 1 ) {
            set VAR_B10_12 |= 64
        }
        set VAR_B10_14 = ( VAR_B10_10 ^ VAR_B10_12 )
        set VAR_B10_8 = 0
        while ( VAR_B10_8 <= 11 ) {
            if ( ( VAR_B10_14 >> VAR_B10_8 ) & 1 ) {
                RemoveParty( VAR_B10_8 )
            }
            set VAR_B10_8++
        }
        if ( IsInParty(0) == 0 ) {
            set VAR_A6_147 = PartyAdd(0)
        }
        if ( IsInParty(2) == 0 ) {
            set VAR_A6_147 = PartyAdd(2)
        }
        if ( IsInParty(1) == 0 ) {
            set VAR_A6_147 = PartyAdd(1)
        }
        if ( IsInParty(6) == 0 ) {
            set VAR_A6_147 = PartyAdd(6)
        }
        set VAR_D5_303 = 0
        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 99 ) ) )
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_8 = 0
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_10 = 2
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_12 = 1
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_14 = 6
        }
        set VAR_A6_148 = ( VAR_A6_149 = ( VAR_A6_150 = ( VAR_A6_151 = 0 ) ) )
        if ( VAR_B10_8 != 99 ) {
            if ( GetHP(VAR_B10_8) == 0 ) {
                set VAR_A6_148 = 1
            }
        }
        if ( VAR_B10_10 != 99 ) {
            if ( GetHP(VAR_B10_10) == 0 ) {
                set VAR_A6_149 = 1
            }
        }
        if ( VAR_B10_12 != 99 ) {
            if ( GetHP(VAR_B10_12) == 0 ) {
                set VAR_A6_150 = 1
            }
        }
        if ( VAR_B10_14 != 99 ) {
            if ( GetHP(VAR_B10_14) == 0 ) {
                set VAR_A6_151 = 1
            }
        }
        if ( ( ( ( VAR_A6_148 + VAR_A6_149 ) + VAR_A6_150 ) + VAR_A6_151 ) == VAR_D5_303 ) {
            if ( ( VAR_B10_8 != 99 ) && ( VAR_A6_148 == 1 ) ) {
                SetHP( VAR_B10_8, 1 )
            }
            if ( ( VAR_B10_10 != 99 ) && ( VAR_A6_149 == 1 ) ) {
                SetHP( VAR_B10_10, 1 )
            }
            if ( ( VAR_B10_12 != 99 ) && ( VAR_A6_150 == 1 ) ) {
                SetHP( VAR_B10_12, 1 )
            }
            if ( ( VAR_B10_14 != 99 ) && ( VAR_A6_151 == 1 ) ) {
                SetHP( VAR_B10_14, 1 )
            }

to

Code: [Select]
        }
        set VAR_B13_21 = 128
        SetPartyReserve( VAR_B13_21 )
        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
        set VAR_B10_8 = 0
        while ( VAR_B10_8 <= 11 ) {
            if ( IsInParty(VAR_B10_8) ) {
                set VAR_B10_10 |= ( 1 << VAR_B10_8 )
            }
            set VAR_B10_8++
        }
        if ( 1 ) {
            set VAR_B10_12 |= 1
        }
        if ( 1 ) {
            set VAR_B10_12 |= 4
        }
        if ( 1 ) {
            set VAR_B10_12 |= 2
        }
        if ( 1 ) {
            set VAR_B10_12 |= 64
        }
        set VAR_B10_14 = ( VAR_B10_10 ^ VAR_B10_12 )
        set VAR_B10_8 = 0
        while ( VAR_B10_8 <= 11 ) {
            if ( ( VAR_B10_14 >> VAR_B10_8 ) & 1 ) {
                RemoveParty( VAR_B10_8 )
            }
            set VAR_B10_8++
        }
        if ( ( ( VAR_B13_19 >> 0 ) & 1 ) == 0 ) {
            SetCharacterData( 0, 1, 255, 9, 0 )
            set VAR_B13_19 |= 1
        }
        if ( ( ( VAR_B13_19 >> 2 ) & 1 ) == 0 ) {
            SetCharacterData( 2, 1, 255, 6, 2 )
            set VAR_B13_19 |= 4
        }
        if ( ( ( VAR_B13_19 >> 1 ) & 1 ) == 0 ) {
            SetCharacterData( 1, 1, 255, 5, 1 )
            set VAR_B13_19 |= 2
        }
        if ( ( ( VAR_B13_19 >> 6 ) & 1 ) == 0 ) {
            SetCharacterData( 6, 1, 255, 6, 6 )
            set VAR_B13_19 |= 64
        }
        if ( ( ( VAR_B13_19 >> 7 ) & 1 ) == 0 ) {
            SetCharacterData( 7, 1, 7, 5, 7 )
            set VAR_B13_19 |= 128
            SetRow( 7, 1 )
        }
        if ( IsInParty(0) == 0 ) {
            set VAR_A6_147 = PartyAdd(0)
        }
        if ( IsInParty(2) == 0 ) {
            set VAR_A6_147 = PartyAdd(2)
        }
        if ( IsInParty(1) == 0 ) {
            set VAR_A6_147 = PartyAdd(1)
        }
        if ( IsInParty(6) == 0 ) {
            set VAR_A6_147 = PartyAdd(6)
        }
        set VAR_D5_303 = 0
        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 99 ) ) )
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_8 = 0
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_10 = 2
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_12 = 1
        }
        if ( 1 ) {
            set VAR_D5_303++
            set VAR_B10_14 = 6
        }
        set VAR_A6_148 = ( VAR_A6_149 = ( VAR_A6_150 = ( VAR_A6_151 = 0 ) ) )
        if ( VAR_B10_8 != 99 ) {
            if ( GetHP(VAR_B10_8) == 0 ) {
                set VAR_A6_148 = 1
            }
        }
        if ( VAR_B10_10 != 99 ) {
            if ( GetHP(VAR_B10_10) == 0 ) {
                set VAR_A6_149 = 1
            }
        }
        if ( VAR_B10_12 != 99 ) {
            if ( GetHP(VAR_B10_12) == 0 ) {
                set VAR_A6_150 = 1
            }
        }
        if ( VAR_B10_14 != 99 ) {
            if ( GetHP(VAR_B10_14) == 0 ) {
                set VAR_A6_151 = 1
            }
        }
        if ( ( ( ( VAR_A6_148 + VAR_A6_149 ) + VAR_A6_150 ) + VAR_A6_151 ) == VAR_D5_303 ) {
            if ( ( VAR_B10_8 != 99 ) && ( VAR_A6_148 == 1 ) ) {
                SetHP( VAR_B10_8, 1 )
            }
            if ( ( VAR_B10_10 != 99 ) && ( VAR_A6_149 == 1 ) ) {
                SetHP( VAR_B10_10, 1 )
            }
            if ( ( VAR_B10_12 != 99 ) && ( VAR_A6_150 == 1 ) ) {
                SetHP( VAR_B10_12, 1 )
            }
            if ( ( VAR_B10_14 != 99 ) && ( VAR_A6_151 == 1 ) ) {
                SetHP( VAR_B10_14, 1 )
            }
        }

This method works with Quina, games going on and you taking Quina at lv1 but it also makes tiny glitch at armor shop and synthesis shop if you come back to Lindblum, stats for buying item will be displayed only for Quina, instead displaying stats for all party.

Now I am thinking how edit scripts to obtain Blank at lv1 during battle with Plant Brian at Evil Forest  no mater what is your party's level.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-01-25 18:36:23
I found method how obtain Blank on lv1. Soon I will post code how made it.
By the way, I can post scripts for obtaining  Freya and Quina at lv1. If someone interested, please send a message.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-01-26 02:01:58
Tirlititi
There is Russian translation of Final Fantasy IX made by RGR studio, it has all 33 letters of Russian ABC (main difference between US translation and Russian translation). Current Hades Workshop doesn't support it. It will be nice if future revisions would have comparability with Russian translation from RGR studio.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-01-26 08:03:18
Hey vivigix. Congrats for your script edition.

I added a support for a russian version. When I made the charmaps, I've been given 2 for the russian version though (KUDOS and RGR).
What's the difference between them? Are there any official russian translation or are they both fan-made? Is there one clearly better than the other?

If both versions are equally useful, I'll add back both version supports...
For now, you can copy-paste this line in your "HadesWorkshop.conf" file and it should add RGR support (go in "File -> Preferences" to change the charmap).
Code: [Select]
Charmap[RussianPirateRGR]=0123456789+-=*% АBСDEFGНIJКLМNOPQRSТUVWXYZ(!?“:.аbсdеfдhijкlтпорqrstиvwxyz),/+~&БДЖЗИЙЛУÍÌГПФШЩЬЭЯЮÜбвжзмнцйíìглшщэчыùюüЦяфьЫЧ'”_}{∴∵♪→∈×♦§<>←∋↑△□∞♥?????????????«»↓―°★♂♀☺?„‘#※;¡¿
Thanks for telling me about this.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: itoikenza on 2016-01-28 16:13:39
Tirlititi is there any way to make Beatrix replace Quina in menus and battle only? have you ever thought of this? Quina would stay on screen during cutscenes but Beatrix would be everywhere else in its place.

Edit: https://www.youtube.com/watch?v=mBjGozSt_fM check this out! there's also a Steam ver. in the works. Tirlititi, it would be awesome if Hades could edit these versions. i doubt for IOS. but maybe Steam & Android?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-01 07:13:16
Both of them are unofficial pirate translations, both of them biased on US region game.
RGR Studio made better translation they insert 30 letters of Russian ABC, also 4th disk has full translation
Game have no glitches because of translation.

RGR Alphabet
Spoiler: show
(http://i66.fastpic.ru/big/2016/0201/9a/f66b99276a9446e42203e4a0a42ebd9a.jpeg)


Kudos also made  translation, but translation is partial. They just redraw  26 letters of English ABC to 26 letters of Russian ABC, 4th disk has partial translation.
Game has some glitches because of translation.

KUDOS Alphabet
Spoiler: show
(http://i67.fastpic.ru/big/2016/0201/0b/f18f62b0d87b1f4ea6b95fb03484b00b.jpg)


Here is Original US ABC used in the game

Original Alphabet
Spoiler: show
(http://i67.fastpic.ru/big/2016/0201/ad/df53e0a03b7f17e9e67fae766379a8ad.jpeg)

Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-01 13:01:34
Tirlititi, I tried add this line but it doesn't work.

Code: [Select]
Charmap[RussianPirateRGR]=0123456789+-=*% АBСDEFGНIJКLМNOPQRSТUVWXYZ(!?“:.аbсdеfдhijкlтпорqrstиvwxyz),/+~&БДЖЗИЙЛУÍÌГПФШЩЬЭЯЮÜбвжзмнцйíìглшщэчыùюüЦяфьЫЧ'”_}{∴∵♪→∈×♦§<>←∋↑△□∞♥?????????????«»↓―°★♂♀☺?„‘#※;¡¿
Could you please show where exactly I should add this line?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-02-01 18:32:19
@vivigix : Thanks for the deails.

You need to open the file "HadesWorkshop.conf" with a text editor. The text is written using UTF-8 and most text editors can read it perfectly. However, if that's not the case (for instance, if you see no kanjis in front of the "Japanese" charmap, something is wrong), try with another text editor. Notepad++ or Notepad2 can read it for instance.

Once opened, add the line I gave you under the "[Text]", among the other Charmap declarations.
You end up for instance with a file like this :
Code: [Select]
# Hades Workshop configuration file
# Comment lines begin with #

[Preferences]
Charmap=Latin
OpcodeCharacter=µ
MenuColor=0
TextPreview=2

[Text]
Charmap[Latin]=0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ(!?“:.abcdefghijklmnopqrstuvwxyz),/+~&ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜáàâäéèêëíìîïóòôöúùûüÇÑçñŒß'”_}{∴∵♪→∈×♦§<>←∋↑△□∞♥?????????????«»↓―°★♂♀☺?„‘#※;¡¿
Charmap[Latin][A]=?
Charmap[Latin][B]=?

Charmap[RussianPirateRGR]=0123456789+-=*% АBСDEFGНIJКLМNOPQRSТUVWXYZ(!?“:.аbсdеfдhijкlтпорqrstиvwxyz),/+~&БДЖЗИЙЛУÍÌГПФШЩЬЭЯЮÜбвжзмнцйíìглшщэчыùюüЦяфьЫЧ'”_}{∴∵♪→∈×♦§<>←∋↑△□∞♥?????????????«»↓―°★♂♀☺?„‘#※;¡¿

Charmap[Japanese]=0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ(!?゛:。abcdefghijklmnopqrstuvwxyz)、/・〜&「」…、。ーあいうえおぁぃぅぇぉかきくけこがぎぐげごさしすせそざじずぜぞたちつてとだぢづでどなにぬねのはひふへほばびぶべぼまみむめもぱぴぷぺぽやゆよゃゅょっらりるれろわをんアイウエオァィゥェォカキクケコガギグゲゴサシスセソザジズゼゾタチツテトダヂヅデドナニヌネノハヒフヘホバビブベボマミムメモパピプペポヤユヨャュョッラリルレロワヲンヴ
Charmap[Japanese][A]=『』'城魔南場艇劇村道山洞窟宮砂街黒樹火幹法士森装用地備族下沼古氷輪術体祠性帽鉄属子門使武器石駅剣車馬畑号撃敵腕与専攻定薬全回白指効拳設動金雷師源町果単一数竜大技手黄宝変風鏡剤珠盗板得防頂目更北毒態状中死水見発暗無消列力気避取入精皮秘豆賊氏聖服生天炎切復在現味御加追人率色事赤複返費前闇冷投減桃針線神当路橋角髭月羽爪枯心瑚胸光鎧衣内郷司祭本妖後珊忍憩呪斬女吸方蘇孔理波青上値能収黙化沈倍自調乱半喚相迷眠召混先惑分実必制通験瀕改逃経反治万空原導利止隠固牙象鯨星右育持長鍵形面解意極者教触戒区熱満統免許射貫知熟警日緑
Charmap[Japanese][B]=替要決刀告宣運画江庭園部夢食着三付根束飽興帯転柔尾草奮円頭巾髪野菜銀左棒八閃Ⅱ兜猫飾嘯雑鳴息突章絞狂華六咲命桜海裁獄放魚魂夜戦所最闘個選獣種険冒初作幻確義奥移並誰絶物不受了的弱点終字常猛買名覚同々異未処文削除編成元屋造店鍛冶売書※択認箇具操否位置視世行出即土守殺身今何脱恐睡時好代高湿谷押諸岬漠岸脈盆平島瀬霧去東西陸浅忘外側閉夕川辺近浜血絵対重可向系正期記憶進階段退各合小遠距離速別表示間枚類以補助騎港王国裏徐

#more stuff below...

Save the file and then open Hades Workshop. Go to "File -> Preferences" and change the field "Game Alphabet" to "RussianPirateRGR".
1) If you don't see any other option than "Default", then your text editor probably messed up with the configuration file. Change your text editor.
2) If you see "Default", "Latin", "Japanese" and "Russian" but not "RussianPirateRGR", then you didn't add the line correctly inside the .conf file.

In the case you successfully selected "RussianPirateRGR", it should work.


@itoikenza : There's unfortunatly no way to replace Beatrix inside the menus and battles and not on the field, besides doing what I described several times (replace Beatrix by a normal character at the beginning of the field's "main" function and replace her back in the party at the end of that same function).

I plan to make HW compatible with the Steam version (actually, if everything goes well, the space limitation should be removed, enabling a bunch of cool stuff), but I can't tell before I see it ^^"
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-01 19:07:28
Tirlititi, I added code to configuration, "RussianPirateRGR" appeared at Alphabet. I chose it. But bin file doesn't open as FF9 bin file. Could you check it yourself?

I have a question, if I will edit Spell animation, would it affect to enemies spell animations too or just foe parties spell animation?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-02-01 19:12:08
For your question, yes it'll apply both for the enemy and the party uses of a spell animation.

For the binary file, I can't say... Can you provide me a link with the RGR translation patch? I'll look into it this week.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gorildo on 2016-02-02 19:42:30
I was wondering a few things:

1 - Is it possible to fix the Marcus/Eiko glitch?

2 - The first time you meet a new char, his level will be higher than 1 unless you're on level 1. This makes it impossible to max mag stones for that char if you level up. Is there a way to disable this check and simply have the character begin at level 1?

3 - Is it possible to disable equipment stat boosts so the stat growth is fixed to its minimum value?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Kefka on 2016-02-02 21:07:09
3 - Is it possible to disable equipment stat boosts so the stat growth is fixed to its minimum value?

Yes, that can be done right in the item section of Hades Workshop. Each weapon or armor has a Stat Set that can be modified to your liking.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gorildo on 2016-02-02 21:53:36
Yes, that can be done right in the item section of Hades Workshop. Each weapon or armor has a Stat Set that can be modified to your liking.

Yes, but I don't mean the stat boost when equipped, I mean the bonus pool that adds extra stats when you level up depending on what equipment you're using.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-03 05:34:00
2 - The first time you meet a new char, his level will be higher than 1 unless you're on level 1. This makes it impossible to max mag stones for that char if you level up. Is there a way to disable this check and simply have the character begin at level 1?

Yeah,  there is possibility. You should Edit Field scripts where characters fist time join your party.
Also I took Eiko at lv1 when Markus was lv 22

Scroll up all messages and you will find what Scripts you should edit to obtain Eiko and Amarant at minimal levels.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-03 05:38:48
Gorildo
If you want take Freya and Quina at Lv1 you should edit Lindblum Square field scripts and Qu's Marsh Pond scripts.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: itoikenza on 2016-02-03 16:00:24
@itoikenza : There's unfortunatly no way to replace Beatrix inside the menus and battles and not on the field, besides doing what I described several times (replace Beatrix by a normal character at the beginning of the field's "main" function and replace her back in the party at the end of that same function).

I plan to make HW compatible with the Steam version (actually, if everything goes well, the space limitation should be removed, enabling a bunch of cool stuff), but I can't tell before I see it ^^"
 
Too bad about Beatrix, Tirlititi, thanks for considering making steam ver. compatible.

Remember this?!
(https://dl.dropboxusercontent.com/u/50488782/models/itoikenzaFF9Change.PNG)
How about that editing "Change" into any other movelist, or even a custom one called "Killer"
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-04 06:10:09
Remember this?!
Spoiler: show
(https://dl.dropboxusercontent.com/u/50488782/models/itoikenzaFF9Change.PNG)

How about that editing "Change" into any other movelist, or even a custom one called "Killer"
Is this type of Modding works?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-02-04 09:52:31
No, it still doesn't work and I can't give any more answer that I gave at the time itoikenza :/
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Dogshrapnel on 2016-02-05 23:36:24
Just a quick question to ask, I noticed that Lai Strike has its own status formula, does anyone know what the difference between its and bad status's formula is?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gorildo on 2016-02-07 16:02:29
Yeah,  there is possibility. You should Edit Field scripts where characters fist time join your party.
Also I took Eiko at lv1 when Markus was lv 22

Scroll up all messages and you will find what Scripts you should edit to obtain Eiko and Amarant at minimal levels.

I see now, thanks.

If you have the Freya and Quina scripts please post them too. Also, what exactly is the Quina glitch? Does it affect anything else? Please inform us if you can figure out a fix.

I can't make much sense out of those scripts, so thanks again.  :-D
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-09 16:15:27
Script edition for Blank LV1

Find field "Evil Forest/Nest" CD 1 -function -  Function Main_Loop
Swap this part of script
Code: [Select]
    case +0:
        MoveCamera( 160, 112, 1, 8 )
        Wait( 45 )
        MoveCamera( 256, 224, 30, 8 )
        Wait( 15 )
        RunScript( 2, 15, 12 )
        Wait( 10 )
        RunScript( 2, 18, 12 )
        Wait( 10 )
        RunScriptSync( 2, 16, 12 )
        WindowSyncEx( 16, 3, 128, 137 )
        WindowSyncEx( 15, 1, 128, 138 )
        WindowSyncEx( 18, 2, 128, 139 )
        WindowSyncEx( 18, 2, 128, 140 )
        WindowSyncEx( 18, 2, 128, 141 )
        WindowSyncEx( 15, 1, 128, 142 )
        WindowSyncEx( 18, 2, 128, 143 )
        0xBD( 9, 2798 )
        Music1( 25089, 65535, 50 )
        Model2( 40960, 12, 128, 1 )
        Wait( 15 )
        WindowAsyncEx( 15, 1, 128, 144 )
        Wait( 45 )
        set VAR_B13_21 = 2059
        SetPartyReserve( VAR_B13_21 )
        RemoveParty( 0 )
        RemoveParty( 1 )
        RemoveParty( 2 )
        RemoveParty( 3 )
        RemoveParty( 4 )
        RemoveParty( 5 )
        RemoveParty( 9 )
        RemoveParty( 6 )
        RemoveParty( 10 )
        RemoveParty( 7 )
        RemoveParty( 11 )
        RemoveParty( 8 )
        set VAR_A6_147 = PartyAdd(11)
        set VAR_A6_147 = PartyAdd(0)
        set VAR_A6_147 = PartyAdd(1)
        set VAR_A6_147 = PartyAdd(3)
        if ( IsInParty(5) ) {
            set Setting_OptionalQuina = 1
        } else {
            set Setting_OptionalQuina = 0
        }
        if ( ( ( VAR_B13_19 >> 14 ) & 1 ) == 0 ) {
            SetCharacterData( 11, 1, 14, 21, 12 )
            set VAR_B13_19 |= 16384
            SetRow( 11, 1 )
        }
        SetHP( 11, 9999 )
        SetMP( 11, 999 )
        SetStatus( 11, 127 )
        if ( ( ( VAR_B13_19 >> 0 ) & 1 ) == 0 ) {
            SetCharacterData( 0, 1, 255, 9, 0 )
            set VAR_B13_19 |= 1
        }
        if ( ( ( VAR_B13_19 >> 3 ) & 1 ) == 0 ) {
            SetCharacterData( 3, 1, 255, 5, 3 )
            set VAR_B13_19 |= 8
        }
        if ( ( ( VAR_B13_19 >> 1 ) & 1 ) == 0 ) {
            SetCharacterData( 1, 1, 255, 5, 1 )
            set VAR_B13_19 |= 2
        }
        SetName( 11, 96 )
        set Setting_OptionalQuina = 0
        set Setting_DaggerDepresses = 0
        set Setting_MPx4 = 1
        Battle( 1, 303 )
        break
to
Code: [Select]
    case +0:
        MoveCamera( 160, 112, 1, 8 )
        Wait( 45 )
        MoveCamera( 256, 224, 30, 8 )
        Wait( 15 )
        RunScript( 2, 15, 12 )
        Wait( 10 )
        RunScript( 2, 18, 12 )
        Wait( 10 )
        RunScriptSync( 2, 16, 12 )
        WindowSyncEx( 16, 3, 128, 137 )
        WindowSyncEx( 15, 1, 128, 138 )
        WindowSyncEx( 18, 2, 128, 139 )
        WindowSyncEx( 18, 2, 128, 140 )
        WindowSyncEx( 18, 2, 128, 141 )
        WindowSyncEx( 15, 1, 128, 142 )
        WindowSyncEx( 18, 2, 128, 143 )
        0xBD( 9, 2798 )
        Music1( 25089, 65535, 50 )
        Model2( 40960, 12, 128, 1 )
        Wait( 15 )
        WindowAsyncEx( 15, 1, 128, 144 )
        Wait( 45 )
        set VAR_B13_21 = 2048
        SetPartyReserve( VAR_B13_21 )
        RemoveParty( 0 )
        RemoveParty( 1 )
        RemoveParty( 2 )
        RemoveParty( 3 )
        RemoveParty( 4 )
        RemoveParty( 5 )
        RemoveParty( 9 )
        RemoveParty( 6 )
        RemoveParty( 10 )
        RemoveParty( 7 )
        RemoveParty( 11 )
        RemoveParty( 8 )
        if ( IsInParty(5) ) {
            set Setting_OptionalQuina = 1
        } else {
            set Setting_OptionalQuina = 0
        }
        if ( ( ( VAR_B13_19 >> 14 ) & 1 ) == 0 ) {
            SetCharacterData( 11, 1, 14, 21, 12 )
            set VAR_B13_19 |= 16384
            SetRow( 11, 1 )
        }
        SetHP( 11, 9999 )
        SetMP( 11, 999 )
        SetStatus( 11, 127 )
        if ( ( ( VAR_B13_19 >> 0 ) & 1 ) == 0 ) {
            SetCharacterData( 0, 1, 255, 9, 0 )
            set VAR_B13_19 |= 1
        }
        if ( ( ( VAR_B13_19 >> 3 ) & 1 ) == 0 ) {
            SetCharacterData( 3, 1, 255, 5, 3 )
            set VAR_B13_19 |= 8
        }
        if ( ( ( VAR_B13_19 >> 1 ) & 1 ) == 0 ) {
            SetCharacterData( 1, 1, 255, 5, 1 )
            set VAR_B13_19 |= 2
        }
        set VAR_A6_147 = PartyAdd(11)
        set VAR_A6_147 = PartyAdd(0)
        set VAR_A6_147 = PartyAdd(1)
        set VAR_A6_147 = PartyAdd(3)
        SetName( 11, 96 )
        set Setting_OptionalQuina = 0
        set Setting_DaggerDepresses = 0
        set Setting_MPx4 = 1
        Battle( 1, 303 )
        break
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-09 17:33:02
Script edition for Freya LV1

Find field "Lindblum/Square" CD 1 -function -  Function Main_16 (there is two square areas at Lindblum you need business district's square)
Swap this part of script
Code: [Select]
        if ( GetTimerTime > 3 ) {
            if ( !VAR_B6_56 ) {
                set VAR_B13_21 = 17
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                    }
to
Code: [Select]
        if ( GetTimerTime > 3 ) {
            if ( !VAR_B6_56 ) {
                set VAR_B13_21 = 16
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )

This script would work if only you will fight with Zaghnol during Hunting Festival

Otherwise you should edit other field script at "L. Castle/Conf. Room" - Function Main_Loop, but I didn't edit this script before and don't know could it cause glitches or not.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-09 17:57:19
Script edition for Quina LV1

Find field "Marsh/Pond" CD 1 - Function Main_Loop
Swap this part of script
This script edition would work if you take Quina on 1 CD after Hunter Festival before Gizamaluke if you will refuse join him to the party at Quans House
Code: [Select]
                        }
                        0xA9( -6 )
                        FadeFilter( 6, 24, VAR_B6_17, 255, 255, 255 )
                        Wait( 25 )
                        set VAR_B13_21 = 39
                        SetPartyReserve( VAR_B13_21 )
                        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                        set VAR_B10_8 = 0
                        while ( VAR_B10_8 <= 11 ) {
                            if ( IsInParty(VAR_B10_8) ) {
                                set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                            }
to
Code: [Select]
                        }
                        0xA9( -6 )
                        FadeFilter( 6, 24, VAR_B6_17, 255, 255, 255 )
                        Wait( 25 )
                        set VAR_B13_21 = 32
                        SetPartyReserve( VAR_B13_21 )
                        set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                        set VAR_B10_8 = 0
                        while ( VAR_B10_8 <= 11 ) {
                            if ( IsInParty(VAR_B10_8) ) {
                                set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                            }

Find field "Marsh/Pond" CD 2 - Function Main_Loop
Swap this part of script
This script edition would work if you take Quina on 2 CD when you start searching the entrance to Fossil Roo if you will refuse join him to the party at Quans House
Code: [Select]
                            }
                            0xA9( -6 )
                            FadeFilter( 6, 24, VAR_B6_17, 255, 255, 255 )
                            Wait( 25 )
                            set VAR_B13_21 = 51
                            SetPartyReserve( VAR_B13_21 )
                            set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                            set VAR_B10_8 = 0
                            while ( VAR_B10_8 <= 11 ) {
                                if ( IsInParty(VAR_B10_8) ) {
                                    set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                                }
to
Code: [Select]
                            }
                            0xA9( -6 )
                            FadeFilter( 6, 24, VAR_B6_17, 255, 255, 255 )
                            Wait( 25 )
                            set VAR_B13_21 = 32
                            SetPartyReserve( VAR_B13_21 )
                            set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                            set VAR_B10_8 = 0
                            while ( VAR_B10_8 <= 11 ) {
                                if ( IsInParty(VAR_B10_8) ) {
                                    set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                                }

I gathered these scripts into one, and made them same for 1cd and 2cd.

The first script edition cause tiny glitch at displaying shops stats for party, if you come back to Lindblum before visiting Gizamaluke.
But don't worry glitch doesn't affect on game play and story line, it will fix after battle with Gizamaluke   


Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-09 18:20:23
Tirlititi
I have a question, and want ask you.
There is a script in the game for Dagger at field Evil Forest/Exit - Function Main_Loop
Code: [Select]
        LearnAbility( 2, 49 )
        LearnAbility( 2, 51 )
        LearnAbility( 2, 55 )
        LearnAbility( 2, 58 )
        LearnAbility( 2, 62 )
As I understood this code made for learning eidolons.

Where I can find script for unlearn eidolons on the CD2?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-02-09 18:56:29
There are two of them, for some reason. During the escape from Alexandria's Castle, the game unlearn those abilities both times Dagger is added to the party.

1st one (story-wise) is found in "A. Castle/Staircase" (1st one) at the end of "Zidane_Init".
2nd one is found in "A. Castle/Underground", still at the end of "Zidane_Init".

I also found one in Zidane's script of "Pinnacle Rocks/Path" (1st one), but I don't think it's ever ran because Zidane can't be controlled in these screens (judging from the "Main_Init" function, it would be ran if the player went in these screens before the Castle escape).

The setting about the eidolons' magic cost is redefined everytime the party is modified, but it's set to 0 the first time in the function "Main_19" of the field "Pinnacle Rocks/Hole" (this function runs once when the dialog with Ramuh is done ; it handles the screen change).

Thank you for the lvl1 scripts :)

@Dogshrapnel : I don't know for Iai Strike. It may be the accuracy that uses another formula. It may be to handle very specific effects ("Death" heals the target if it's under Zombie instead of adding the status for instance).
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-10 06:06:45
Tirlititi thank you for reply.
Final Fantasy IX realised on Android today.
Congratulations folk.

Tirlititi,  do you think it is possible to make Hades Workshop comparable with Android version of FFIX?
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Kivikaki on 2016-02-14 11:13:33
Tirlititi,  do you think it is possible to make Hades Workshop comparable with Android version of FFIX?

I'd like to know this too, because the Android Version looks gorgeous, but i'd really like to play it with some of the great mods that got released.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: gorildo on 2016-02-14 12:27:54
Tirlititi thank you for reply.
Final Fantasy IX realised on Android today.
Congratulations folk.

Tirlititi,  do you think it is possible to make Hades Workshop comparable with Android version of FFIX?

Thanks for the scripts. I believe the first time you meet Freya at the bar in Lindblum, when you get to the name screen, there isn't a script for setting her level right?

By the way, this new version is coming to PC eventually, but the REAL FF IX is on PS1  8-)
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-14 17:40:25
gorildo.
Yeah. You are right. There is no scripts for lv calculation at bar.
Perhaps,  I forgot about another Script edition for Quina LV1.
There might be  another script for modding. I will check it, and if I find it I will post it here.


Script edition for Quina LV1 part 2

Marsh/Master's House" CD 1 - Function Main_Loop
Swap this part of script
This script edition would work if you take Quina on 1 CD after Hunter Festival before Gizamaluke if you will join him to the party at Quans House
Code: [Select]
        }
        switch 2 ( GetDialogChoice ) from 0 {
        case +0:
            RunScript( 6, 12, 17 )
            RunScript( 6, 2, 18 )
            if ( Global_ScenarioCounter < 5690 ) {
                RunScriptSync( 6, 12, 19 )
                set VAR_B13_21 = 51
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                    }
to
Code: [Select]
        }
        switch 2 ( GetDialogChoice ) from 0 {
        case +0:
            RunScript( 6, 12, 17 )
            RunScript( 6, 2, 18 )
            if ( Global_ScenarioCounter < 5690 ) {
                RunScriptSync( 6, 12, 19 )
                set VAR_B13_21 = 32
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                    }

Find field "Marsh/Master's House" CD 2 - Function Main_Loop
Swap this part of script
This script edition would work if you take Quina on 2 CD when you start searching the entrance to Fossil Roo if you will join him to the party at Quans House
Code: [Select]
            } else {
                RunScriptSync( 6, 12, 20 )
                set VAR_B13_21 = 39
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                    }
to
Code: [Select]
            } else {
                RunScriptSync( 6, 12, 20 )
                set VAR_B13_21 = 32
                SetPartyReserve( VAR_B13_21 )
                set VAR_B10_8 = ( VAR_B10_10 = ( VAR_B10_12 = ( VAR_B10_14 = 0 ) ) )
                set VAR_B10_8 = 0
                while ( VAR_B10_8 <= 11 ) {
                    if ( IsInParty(VAR_B10_8) ) {
                        set VAR_B10_10 |= ( 1 << VAR_B10_8 )
                    }
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-14 17:42:56
Unfortunately I have bad news, Android version has multiple bugs. Soon I will post several examples of bugs, what I found in the game.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: shikulja on 2016-02-18 20:22:29
Tirlititi, I added code to configuration, "RussianPirateRGR" appeared at Alphabet. I chose it. But bin file doesn't open as FF9 bin file. Could you check it yourself?

I have a question, if I will edit Spell animation, would it affect to enemies spell animations too or just foe parties spell animation?
Сконвертируй .bin в .iso например UltraISO. Поидее я так делал. ну или образ тем же UltraISO открой, и достать от туда FF9.img и уже его открывать в программе.
Кудос, хоть была плохая реализация, но зато переведено более живо. Я думал от туда шрифт от RGR вставить и текст переконвертировать под RGR формат таблицы, Но если заниматься, то в шрифте от RGR я тогда парочку косяков с тенью находил, и хотя бы упорядочить их.
Самая большая проблема пока что это импорт\экспорт  надеюсь Tirlititi все таки сделает.
хотя по мне самая важная вещь это увеличить количество букв под текст в PSX образе, к тому же я думаю версия steam далеко не всем понравиться. (мне например не понравились  upscaled  задники, еще со звуком не известно что будет)
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: Tirlititi on 2016-02-20 16:40:45
Update to v0.32 :
- Added a file batching feature ; it allows to extract or import a lot of things in 1 shot :
-- Can export/import texts and UI texts (see below for more informations about the importation process),
-- Can export scripts (no importation yet),
-- Can export field backgrounds.
- Added a Mod Manager tool ; it allows to define which datas should be overwritten when you save (using any of the 3 save methods). Its main purpose is to allow you to create a Mod file (.hws) from an already modded version of the game : just check all the features that differ from the original game.
- Improved the Dialog box automatic resizing. I didn't test it thoroughly, but from what I saw, it seems to calculate the box size for the best result (it always fits the default size when you don't change the text).
- Deciphered quiet a few script opcodes. Some of them have been slightly renamed ("WalkEx" -> "WalkXZY" for instance, for the opcode that makes a character walk to a destination given by 3 coordinates).
- Fixed some UI text opcodes ; it was not normal to have figures in the middle of some UI texts. The figures in battle's UI texts are normal though (it might be the display time of the text).
- Fixed a bug making global declaration always giving the same base variable slot when the base variable was not specified.
- Added Russian RGR charmap in the .conf file. Hades Workshop can't scan the translated version directly though ; I guess shikulja's post was about that ^^"


So, in order to properly import text files, you need some formatting :
The .txt file must start with the following line. Everything before that will be ignored :
Code: [Select]
#HW filetype TEXTFor UI texts, it must be this instead :
Code: [Select]
#HW filetype UITEXTAfter that, you need to specify to which text block corresponds your file using a line like this one :
Code: [Select]
#HW fileid [ID]replacing [ID] by the number corresponding to the text block in the following list :
Code: [Select]
0 : Generic UI
1 : Debug Room
2 : Prima Vista
3 : Alexandria Castle (1)
4 : Evil Forest
7 : Cleyra Trunk
8 : Ice Cavern
18 : Red Rose
22 : Lindblum Castle (Disc 2)
23 : Mist Gates
30 : Terra
31 : Mountain Path
32 : Conde Petie
33 : Alexandria (Disc 1)
37 : Black Mage Village (Disc 2/3)
38 : Mognet Central
40 : Ruined Prima Vista
42 : Quan's Dwelling
44 : Cleyra
47 : Dali
50 : Dali Underground
51 : Gizamaluke Grotto
52 : Bran Bal
53 : Observatory Mountain
63 : Cargo Ship
70 : Treno (Disc 2)
71 : Qu's Marsh
74 : South Gate
77 : Burmecia
88 : Alexandria Castle (3)
89 : Alexander
90 : Alexandria (Early Disc 3)
91 : Alexandria By Night
121 : Shrines
124 : Oeilvert
134 : Pinnacle Rocks
166 : Daguerreo
186 : Hilda Garde III
187 : Ending
189 : Invincible
223 : Treno & Supersoft
276 : Lindblum (Disc 1)
289 : Alexandria Castle (2)
290 : Stormless Cleyra
344 : Pandemonium
358 : Madain Sari (Disc 2/3)
359 : Gargan Roo
360 : Madain Sari (Disc 4)
361 : Fossil Roo
484 : Mount Gulug
485 : Occupied Lindblum
525 : Occupied Lindblum Castle
595 : Lindblum (Disc 3/4)
694 : Memoria
738 : Iifa Tree Roots
739 : Ipsen Castle
740 : Desert Palace
741 : Treno (Disc 3/4)
754 : Ruined Alexandria Castle
908 : Esto Gaza
943 : Lindblum Castle (Disc 3/4)
944 : Iifa Tree
945 : Chocobo Places
946 : Ruined Alexandria
1073 : Black Mage Village (Disc 4)
Then, before each text, you need to write a line :
Code: [Select]
#HW newtext [POS]replacing [POS] by the text's position in the text block.

If you used the "Export Text Block" feature, you only need to replace all the strings "// New Text :" by "#HW newtext" and add the right filetype and fileid at the start of the file.
I thought that it would be better to use "#HW" for the importation's syntax instead of just "//" because those slashs could be found inside the texts you'd want to import.

If you use the File Batching feature, everything is already formatted.

Note that you need to have texts with their opcode marks (the 'µ'). It'll throw a warning if the amount of µ mismatch from the default text's.
Also, dialog boxes can be automatically resized when you import your texts.



Fiou... Next version will likely be about making the program compatible with the Steam version. I don't know if I'll add an Android/iOS support but I don't think so. Steam version should allow to bypass the size limitations though ; I guess the priority after that will be about editing the backgrounds  8-)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Blankamarant on 2016-02-20 21:58:10
Thank you very much for making such a wonderful tool, together with Memoria I feel again 11 years old playing FFIX  :-)

Update to v0.32 :
- Added a Mod Manager tool ; it allows to define which datas should be overwritten when you save (using any of the 3 save methods). Its main purpose is to allow you to create a Mod file (.hws) from an already modded version of the game : just check all the features that differ from the original game.

Question:
This means that it is possible to patch a patched game file with an other additional mod?
So for example I could patch the game file with the FFIX: Alternate Fantasy mod and then apply over it the modifications of God Save the Queen and Hidden Dialogs hacks?

Sorry if this is a stupid question or has been already addressed, I am using this tool since few days.

By the way, nice to see FFIX is out on PC and Android but still I prefer the original PS1 version.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-02-21 00:01:58
Thanks !

Well, there are the mods that are compatible between each others and those which are not.

Mods are compatible with each other if they don't modify the same aspect of the game. These could already be used together before that update ; you can just apply the .ppf patches one after the other.

Mods that are not compatible with each other likely change the same things in different manners. So they can't be applied both at the same time. However, with this update, it is indeed possible to choose what you take from each mod and mix them together.
You simply need to open the modded binary files (or use "Open Mod" if you have it in a .hws format) and check/uncheck things in the "Mod Manager" tool. Export them as .hws and then re-open a normal game file and apply all the .hws one after the other.

However, Hidden Dialogs is basically included in Alternate Fantasy so there's no need to mix them.
The other example you gave shows that you can't go in the details because God Save the Queen change 2 things : the items and the (synthesis) shops. If you do this method, you'll have to remove all the other items/shops modifications of Alternate Fantasy. It's better in this case to see how God Save the Queen is made and do the changes directly with the program.

Here are (from memory) what each mod modifies, to check compatibility :
Code: [Select]
Hidden Dialogs : Texts (Cleyra) and Field scripts.
God Save the Queen : Items and Shops.
Vir's mods : Items, Stats, Texts (for some typo mistakes), Spells (Thunder Slash), Enemies (only the Pandemonium trio and Tantarian for the forced exp, I think).
Unleashed : Spells, Stats, Items, Shops and Enemies. Maybe also Commands and Supporting Abilities (I don't remember that being changed).
Alternate Fantasy : All those plus World Maps, a few Fields and Spell Animations.
ATB Speedup : not something modifiable in HW. Compatible with everything else.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Vir on 2016-02-22 15:38:29
I think you were just speaking for example, but for our information, on top of what you mention my mod alters most active abilities and the stone price of most support abilities, characters, a few other monsters than the force exp (to make you fight proper dragons to up Dragon Crest), and text for that sort of thing in addition to fixing typos.

https://docs.google.com/spreadsheets/d/1bQaj0zRxfw6l-nkJRXMssWN9ZosvTZdpm_fVKEnaE0c/edit?pli=1#gid=330958072



I came by to say I'm all for being able to mod one or other of the new versions, esp. PC! Let me know if I could do something to help down that line.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: vivigix on 2016-02-25 07:52:57
These who hoping for compatibility of Hades Workshop with Android version. I have bad news, second cache file - patch.22.com.square_enix.FFIXww.android_googleplay.obb is encrypted with key.
I tried decrypt/extract files with WinRAR and 7Zip but it didn’t work out.
I searched for info in the internet how to decrypt encrypted files with key, but don’t find anything useful.

Currently I know this things:
1 . There is a tool named “JOBB” build in android sdk, with this tool we can decrypt encrypted obb files with key, but we still need the key and tool works under “cmd” what made it hard for use.
2. Cache of the game is 3 nearly Gb. Obb file cannot exceed 2 Gb limit, that is main reason why Final Fantasy’s cache consists of 2 files.
They are:    main.22.com.square_enix.FFIXww.android_googleplay.obb – 1.11 Gb
                   patch.22.com.square_enix.FFIXww.android_googleplay.obb – 1.92 Gb
3. Adaptation for Android and iOS developed under Unity 3D game engine, perhaps Steam version of the game also developing under Unity 3D.
4. The version for iOS size – 1.84 Gb and it isn’t encrypted with key, but it has different data structure.

If someone knows how extract encrypted obb files with key please send a massage.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-25 08:06:59
Сконвертируй .bin в .iso например UltraISO. Поидее я так делал. ну или образ тем же UltraISO открой, и достать от туда FF9.img и уже его открывать в программе.
Кудос, хоть была плохая реализация, но зато переведено более живо. Я думал от туда шрифт от RGR вставить и текст переконвертировать под RGR формат таблицы, Но если заниматься, то в шрифте от RGR я тогда парочку косяков с тенью находил, и хотя бы упорядочить их.
Самая большая проблема пока что это импорт\экспорт  надеюсь Tirlititi все таки сделает.
хотя по мне самая важная вещь это увеличить количество букв под текст в PSX образе, к тому же я думаю версия steam далеко не всем понравиться. (мне например не понравились  upscaled  задники, еще со звуком не известно что будет)

Я у него спрашивал о том что Hades Workshop не сканирует образы с переводом от RGR и не создает hwf файлы, на что получил ответ что по неизвестным причинам вышла такая ошибка в программе и легче заимствовать hwf от образов региона US и все пойдет.
В новой версии 0.32 появился импорт/экспорт.
Насчет количества букв в RGR версии ее увеличили до 30 символов вместо 26. В японской версии количество букв еще больше, в теории существует способ увеличить количество букв, но будет ли такой вариант совместим с Hades workshop не известно.
Title: Re: [FF9] General editor - Hades Workshop (0.31b)
Post by: vivigix on 2016-02-25 08:11:23
Update to v0.32 :
- Added Russian RGR charmap in the .conf file. Hades Workshop can't scan the translated version directly though

Hades Workshop can't scan the translated version directly. Perhaps it is because of increased Charmap. RGR version has for 8 character more than original US vesion.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: gorildo on 2016-03-20 20:33:27
In the game, there are 4 mini figures, 3 of which you can pick up (Cid, Burmecia and Brahne). I always thought it was stupid that you couldn't pick up the last one, it just sits there in the Tantalus hideout. In the key items tab, there seems to be enough blank spots to fill one with the mini Prima Vista Theater Ship, but I had no luck trying to make a script to pick up the ship and give some random key item just to test it.

Do you think it's possible? Also, is there a text limit in the game? Would it be impossible to create an NPC, for example?
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-03-20 23:13:17
Yes it is possible to make the Mini-Prima Vista catchable.
1 ) Go edit Hideout's script and seek the functions "Theater_Ship_Miniature" (any one of those),
2 ) Right-click on the function's name and choose "Add" to add a new function related to Prima Vista's entry,
3 ) In the properties, let the Entry Type to 2 and change the Type to 3 (for a Speak button event),
4 ) Copy-paste the following script in the newly created function :
Code: [Select]
Function Theater_Ship_Miniature_SpeakBTN
    set VAR_A6_158 = 0
    if ( VAR_A6_159 == 1 ) {
        DisableMove(  )
        if ( VAR_A6_144 == 0 ) {
            DisableMenu(  )
        } else {
            Wait( 1 )
        }
    }
    0x27( 127 )
    HideObject( 255, 0 )
    SetTextVariable( 0, 326 )
    AddItem( 326, 1 )
    WindowSync( 7, 0, 61 )
    set VAR_A6_158 = 1
    if ( VAR_A6_159 == 1 ) {
        if ( VAR_A6_156 == 0 ) {
            EnableMove(  )
            0x27( -1 )
            if ( VAR_A6_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    TerminateEntry( 255 )
    return
5 ) Change the "326" figures to your item ID ; 326 is the ID of the first unused Key item so you may use that slot to create your Mini-Prima Vista as well,
6 ) Go to the "Main_Init" function : you need to make it so the Ship won't appear again upon re-entering the field. Change these lines :
Code: [Select]
    if ( VAR_C5_2419 == 1 ) {
        InitObject( 3, 0 )
    }
into these :
Code: [Select]
    if ( ( VAR_C5_2419 == 1 ) && ( GetItemCount(326) == 0 ) ) {
        InitObject( 3, 0 )
    }
7 ) There's no 7th step,
8 ) Profit !

However, for adding NPCs, there are several difficulties. First, you can't add more texts yet (it's on my ToDo list). You need to find unused ones and change them into your desired dialogs. Second, you can't use 3D models that are not already present in the field (in the preloading list actually). That's also on my ToDo list but there it could take some time ^^"
And third, you can't add more entries in the script. It's also on my ToDo list ^^" There are however ways to use an already created entry and add your own NPC's script to it without modifying the one in place. It's unpleasant though so I don't recommend trying it.
So no, you can't really add a new NPC on the field yet ^^"
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: gorildo on 2016-03-21 11:49:49
Nice! Thanks.

Unfortunately, the text space on those extra key items is minimal. I guess you could replace other key items only used in Disc 1 and 2. Any save files would still be compatible, there would be no difference. It's just flags telling you either got something or not, right?

One addition to the script, that nice sound when you get treasure, "Sound2( 53248, 108, 0, -128, 125 )", I put it right before " AddItem( 326, 1 " in the script, works fine. I assume the 108 is the ID of that sound, the other numbers are identical in chests script for example. Any idea what they are?

A simple tool for playing music/sfx inside HW would be cool to help identify those sounds. I wonder if there are any unused tracks or sfx in the game data.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-03-21 19:39:07
Congrats for the sound, I didn't think of it ^^
108 indeed seems to be the sound ID. I don't have a clue for the other arguments but I suppose you'd expect the volume, pitch and maybe delay to be parameters. I won't add a tool for playing sounds and musics simply because I would need to convert their format (they are so-called "AKAO files", from the sound programmer's name) and I don't know of it.

However, I may do a list to easily identify them. It's only a matter of testing there.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-24 03:27:29
Hey Tirlititi, first, brilliant work on HW so far. I've messed with it for a while, in a lurky fashion.

Second, I've done a lot of stuff with the file structure of FFIX... or at least enough to be familiar with what's where in a few cases.
That's where my question comes in:
Main character field models are stored globally on the disc... or at least separately from the models cached in the fields themselves.
With that in mind, I'm confused as to why I can't add Freya or Beatrix(characters who are in the party model folder) to the Preload list and load them up in script.
I understand with NPC models, as they're stored in the field itself.

The option to add models to the Preload list is present, but does nothing.
I guess my question most directly is "Is the preload list just a placeholder feature?"
Changing it doesn't actually do anything, except in the editor's internal memory?

Preloading an NPC from a different field, would obviously take a lot of work... but preloading a party member seemed like it should be something that works.
I'm just trying to find out if I'm misunderstanding something, or if the feature really does nothing at all yet.



On a slightly different note, do you have any theories (its listed as unknown, but I'm curious about conjecture) on what the second argument to SetModel does? the argument generally appears to be the same for party characters (that is, Zidane is usually given 93 as the second arg, and Vivi is given a different one, but its usually the same for the same character).

It occurs to me that the parameter might be a radius for the collision area, so models don't clip into each other.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-03-24 08:08:02
Thanks Satoh !

About preloading models, yes, that's kind of strange. The preloading list does exist in the game's data and you really modify it by adding another model. However, it seems to be not sufficient... It might have to do with this 2nd parameter though, as I don't have a clue about what it does. It might be what you say, but the Moogle on the World maps actually have a 200 value, which is quiet large if it's a collision size...
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-24 18:30:24
I did some testing, I have an answer on the second parameter of setModel.
It determined the height adjustment for message windows, the 'player is here' pointing cursor, and probably some other 2D UI elements.

That's why the moogle's is so high, it's already a flying model.
Incidentally, you see similar things in pigeons, which fluctuate between 93 and 37, which I assume is for the ones that fly versus sitting on the ground.

It also seems to affect the head's up and down tilt for head-look operations. When I set Zidane's to 255 his speech bubbles appeared nearly at the top of the screen, and he looks up into the sky instead of straight ahead when talking to Blank, who is about the same height, right in front of him.

Hope that helps in some way.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-27 10:10:42
This is very cool, love that you can edit the battle scene models. Will you make it possible to export and edit the character models too in the future? I was looking at the backgrounds and noticed some of them have animations, how exactly do these animations work. Are tiles being animated? I really wish I knew how they made those pre rendered backgrounds, it's so neat to be able to put unlimited amount of detail into an enviroment like that, I have tried to replicate it in various programs and it always ends up being a major hassle.

But looking at the backgrounds in this editor confuses me, anyone know how these work Textures on planes?

EDIT: I tried to add a sign to the first battle scene, when you fight the fat man. Exported the textures and the obj file then imported it into blender and added the sign, I edit one of the textures and applied that texture to the sign. Reimported it but it seemed to not work, is it even possible to edit the battle scene models/textures?

It broke, I see the parts of the texture is from my custom made texture but the uv's are messed up. I had a custom model but it seems to not have been loaded. I don't understand what the palettes are for, also there are so many texture slots, could anyone who understand how the scene editor works make a small video tutorial showing the process of replacing or editing the battle maps?
(http://i.imgur.com/Y7W2kUA.png)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-27 17:50:28
HW doesn't truely need the option to export character models, as there are programs that do that already, and exporting them into a usable format would require a lot more effort than, say, making the preloading work.

In theory preloading would source a model and its animations from an existing field, and inject them into the archive that holds the field you're trying to change.

Which would of course be a complicated undertaking, but it wouldn't involve any format alteration. (I'm currently contemplating that issue myself)

That's not to speak for Tirlititi directly or anything. I'm just stating how I see it. There are more important features, and there's a lot of scripting opcodes which are indecipherable...

As for battle scene import, I think its likely that it doesn't work perfectly (as I said before, converting between model formats is no simple process), and possibly you may not have handled the textures correctly... I've never tried it myself. The textures the game uses are a specific 256 color palettized image format, so they can be recolored multiple times, while remaining very small on the disc. This means most images will not work, as they will be in raw 16million color formats.

Of course it's also just as likely that the feature is simply buggy, not for lack of effort, but just because PSX games are pretty strict about what they can and can't load, so any seemingly benign tweak may simply be impossible without better understanding the format.

Some games can only load vertices that fit in an area that is no more than 127 integer divisions away from 0 in any direction. Other games may go as high as 32767. It could simply be that whatever you tried to change, wasn't something the game could load, or possibly, wasn't something the conversion function could handle. There's a lot of possible points of failure with things like this.

It seems likely to me, that adding new vertices, probably won't work without first deleting an equal number from some other area in the scene, as well as counting triangles in the same way. The disc has limited space for storing these things (very very limited) The game also has specifics on what it can and can't do with UVs (some programs can't handle one vertex having multiple sets of UVs).

And as I said, you probably used the wrong kind of image.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-28 06:01:35
Yes I'm just an amateur, programming isn't my thing. I prefer creating stuff, so all this is really nothing I can comment on. But still I think it's a very nice tool you've made, mostly because you can see how they made the backgrounds, something I would be very interested in knowing. The elements that are being animated in the backgrounds seem to act like gifs. I don't understand the technical stuff of how the they made the backgrounds work.

As far as I understand it to not mess up the perspective on the backgrounds the camera is static and it's the background textures on the plane that is being animated as the character moves around? But what about the collison mesh, it's so confusing anyone who knows how they made that prerendered stuff work? I think it might be a lost art, unlimited detail in a background is something that with the higher resolution that games can be run in today could look really neat.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-28 08:07:39
First: I in no way intended to imply that I had anything to do with developing Hades Workshop. I'm just a technically minded guy who kinda understands how the game works.

Second, the backgrounds are static images, and there's a script function that replaces some of the tiles with other tiles stored in the same field map, waits a number of frames, and then replaces them with another tile. I don't comprehend 100% how that works yet, but I am quite certain I can spot it when I see it.

You're mostly right on how the camera works, except that it can be changed and moved in the game for specific things. There are a few scenes where the camera moves during a cutscene where the video replaces the background, like in the Evil Forest just after escaping Alexandria at the start of the game.
The camera also moves when looking at different angles of the same room in a map... this happens rarely, but is first seen when Baku (in a dragon mask) jumps from the door. That door is not a new room, just a different camera angle, with a different background image applied to it.

To properly comprehend how that works, I should explain that the walls of a map are actually determined by the shape of the floor... or in other words, you can walk anywhere there is floor, and you can't walk where there is no floor. This theoretical floor is called the walkmesh, and is a 3D model.... just an invisible one. You can actually view a map's walkmesh in HW by opening the script editor and switching the tabs down in the lower left corner.

I'm not sure on the practical side of replacing images, as I said I haven't tried it, but in theory, all you need to do is make a render or painting of the area you want to replace, cut out portions of that picture that need to layer on top of the character in the foreground, and probably some stuff with chopping the image into tiles... I don't think HW handles that yet... for the same reasons it doesn't do preloading models correctly: It would involve a lot of shuffling data around in a messy complicated way.
background images are stored as a collection of 16color palettized tiles that are 32x16 and there can be... I'm not sure exactly how many palettes for a full map. Part of me wants to say 32 per tile package... and some fields have multiple tile packages... The game is kind of a mess looking at it from a 'I want to make changes' standpoint. It was all done for hardware limitations of course, and it performs admirably as a game... but its certainly not user friendly for mods. I'm honestly astonished HW has so many working features.

About character models and such, most of that can be viewed by a program called noesis. You can look that up on your own, as I'm not totally sure how Qhimm handles that topic these days. Last time I came around it was kind of a hotbutton.

As for 'how they made the backgrounds' themselves... They did it in a 3D modeling program, put in loads of detail, rendered a high quality image, then shrunk it until it was small enough to fit in the game. No big mystery really. And actually, some of the stuff you see in the scene may actually be lower in actual quality than the models you see in realtime in modern games... even as old as early PS3 games. They only look nicer most of the time because you don't see them up close. A lot of them have really terrible texturing (there are a few original high definition renders floating around the internet, but only a few), but it looks nice enough when its pixelated. Its kind of like looking at 1990's 3D cartoons... they were amazing at the time, but you look back and realize how awful they really looked up close.

For an example of how the animated tiles work, you can look at Environment Tab > Field Tab > Prima Vista/Engine Room > Edit Script > Function Code1_Loop.
In Code1_loop you should see a number of SetTileAnimationFrame(...) calls. That's where I'd look to start understanding it.
It also helps to be able to run the game with the patch automatically loaded, rather than having to actually patch a copy of the game every time you edit something. I find frequently changing, exporting a PPF patch, and using an emulator that automatically loads the patch while running the game, is an effective way to learn how code works.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-28 11:40:11
Even on the PS4 today it would be difficult to achieve as much detail as is in this scene for example.
(http://i.imgur.com/NgD8NGF.jpg)
Rendered scenes today can look fairly realistic, look at this for example, digitally created.
(https://img-new.cgtrader.com/uploads/blog/large_9ff1f249-e5d4-4f13-9879-07f4ff7f3877.jpg)
Compare the two above to what the playstation 4 can do.
(https://i.ytimg.com/vi/AvEXgG04j_U/maxresdefault.jpg)
The thing with pre rendered backgrounds is that they don't even have to be rendered, they could be photos.
(http://www.wallpaperstunnel.com/wp-content/uploads/2016/03/Download-Landscape-Forest-Path-HD-Wallpapers.jpg)
Creating the pictures isn't hard, even animating parts of it isn't hard. I could easily make the branches in the photo above wave or have it rain or simulate a river. If the camera is static it wouldn't even be so hard creating a walkmesh and have a character run through the picture, you would have to know the lens the camera used but it could all be done fairly easily. For perfect accuracy you would ideally have to put out two paralell lines in the photo so you can figure out the perspective lines and where the vanishing points are.

The problem is understanding how the pictures are layered on top of each other and how the cameras are panning through the picture. As far as I know there is no engine that does this automatically today, what would be even more interesting than being able to rip out models and put them into the game again would be someone implementing a pre rendered background feature in unity or unreal or some other engine. This Hades program could maybe give hints on how to program such a feature?
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-28 18:00:58
Oh, I see, you want to replicate the functionality of FFIX, in another game engine?
I can respect that, I've wanted to do something similar for a while, but lack the experience to make a robust engine like FFIX.

I don't know that its exactly how FFIX does it, but the you can make a camera pan by altering the width and height and offset parameters of the frustum in any engine that lets you alter the camera matrix. This would keep the perspective vanishing point locked in one place,(in 3D) while moving the rendered image around on the screen.

Does that help?

As for the layering, unity allows for rendering layers, such that even if an object is behind another, it gets rendered later, and thus on top of everything else.
I suspect the hardest part about replicating FFIX in Unity would be the battle stuff.

As for using the models... that's a tricky subject. I have them, but because of the way they export, one model only supports one animation, so in order to use them one would need to export a duplicate of each model, for every animation. I'm strategizing how to get around that.

For now, I think the best option would be to try to work around the problems you might face in HW, as some cool things can be done with it, if not everything you might wish.

For example, beginning the game in the Festival of the Hunt (which is my pet project for HW. End goal: have a choice in playable character, more enemies and getting into scraps with the other participants.)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-28 23:27:20
The rendered scene that would be moved around by the width and height offset parameteres would consist of several layers of background, also the "walk mesh" and the character would be in perspective, but how would those move around as the textures on the planes are panning around. I think this is by far the most difficult thing to do, harder than creating a battle system. No doubt they didn't use planes like in the image below when they made the FF games, they had figured out some easy pipeline for creating these backgrounds.

Something as simple as:
1. Setup camera
2. Place objects.
3. Render out scene.
4. Create walkmesh.
5. Send the stuff away to someone else who would put them into the game within 2 min with a few clicks.

There are other 3d objects in the scene other than the player too. I think creating those pre rendered backgrounds might be harder than a battle system. A static camera is easy, an animated camera that is lined up with the perspective of all the 3d elements in the scene, mind boggling. Good luck on your mods. ;)
(http://i897.photobucket.com/albums/ac172/DarkSpydaIV/UpdateII.jpg)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-29 00:43:52
When the camera pans around a scene in FFIX, the camera position does not change. Only the edges of the frustum are altered. It's easy to manipulate cameras in that way in Blender, and the same kind of matrix is used in Unity, though it does require some scripting to alter the camera matrix in that way...but its not really difficult.

The background images aren't rendered anywhere in the scene at all, they're UI elements that have a layer number, which represents a 'distance from camera', and is used to determine when the image is rendered. Closer imaged to the camera get rendered later, so they appear on top of other images and objects.

What I'm trying to say is, its not as difficult as you seem to think it is. Unity already has all the functionality you'd need to do it, probably in only a small number of lines of code, using generous amounts of Camera.ScreenToWorldPoint(...)

You're thinking about the maps as though they're 3D scenes, when really the only 3D part about them is the walkmesh and character model. Everything else is done through 2D layering the same way as menus and speech windows.

As for the camera moving around the scene, it doesn't happen, except in a select few places, and that uses prerendered video with characters dropped on top of it. Those scenes don't support objects overlapping the character models at all, and you can see them actually in front of the foreground in some of those scenes, if only for a few frames, because of that limitation.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-29 01:10:43
But if not all of the walkmesh is seen in the camera view and you run to the right, the background image is scrolling but the walkmesh remains static or is it the walkmesh that moves around while the character is being static. Because when you reach the edge of the camera view and the walkmesh goes beyond the camera view, how are you suppose to see the character if he walks off camera. The walkmesh and the characters would have to "scroll" with the background picture no? I'm no doubt missing something.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-29 04:30:22
What I'm trying to say is, computers can render cameras "off center", which is to say, you can move the portion of what is being rendered around, without changing the focal point of the lens, only the edges what it sees. This is what FFIX does. (You'll note in a few places, the character models seem to stretch ever so slightly at different places in the map, that's because they're past the part of the camera lens that would normally be clipped off, and the perspective calculation has become unrealistically drastic....It's hard for me to describe it, but I may be able to show you with a picture.

(http://i.imgur.com/XjWSqYn.png)
Here we see two cameras. the pointed part on the bottom is where the camera is, and the rectangular part is 'what it can see'. On the left is a normal camera. Its focal point is directly in front of where it is in space, and what it can see is equal on the left and right of that focal point.
The right camera also has its focal point directly in front of it, but what it can see, has been shifted far off center, to the right, with anything to the left of the focal point being cut off completely, but much more being visible to the right of it.

(http://i.imgur.com/JckZ5bR.png)
Here we see the camera on the left, looking at a cube that is slight off center from it.

(http://i.imgur.com/E021mVg.png)
And here we see the what the camera on the right sees when looking at the cube from the same location and pointing in the same direction as the first.

Note that the cube looks exactly the same, but appears in a different region of the render area. This is because the camera's position and angle never moved. Only the edges of its periphery were changed.

You can imagine it like being able keep your eyes pointed forward, but shifting your brain's attention to the things in the corner of your eye, instead of what they're pointed at.

That's what I mean by "changing the frustum matrix"
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-03-29 05:10:02
Can the frustrum size be animated in blender, or do you have to animate the camera with scripts. Can the frustrum size track an object through the viewport. I want to try to recreate one of the pre rendered backgrounds in the blender game engine. Do you have the code or would it be difficult to type out?

We could use this as our background, since you can walk under that bridge it'll really sell the effect. Let me know if you could do the code, then I'll start recreating the walkmesh in sketchup and create an updated final fantasy character to run around in the scene. Because we're in a modern engine the character will be able to cast shadows, if you're interested let me know.

By the way I appreciate the explanation.
(http://i.imgur.com/aErJRKN.jpg)(http://i.imgur.com/jmkalFt.jpg)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-03-29 08:16:07
I honestly don't know anything about the blender game engine. There is an addon that allows you to animate just about everything in blender, called AnimAll. Turn it on and you should be able to keyframe any property by hovering and pressing I. The property you want for the frustum will be in the Camera settings (with the camera itself selected that is, not the regular render settings) and its called "Shift" there will be one for X and one for Y. I don't know anything about object tracking. I know blender has it but I don't know if it has the features needed for FF style panning.

I honestly don't have the time to do any coding for it in either Unity or Blender though, otherwise I'd probably have shown an example... Also finally, lets not get too far off track, this is a thread for Hades Workshop.
Recreating the functional engine of FFIX would probably be best discussed in its own dedicated thread... though I've never had luck actually recruiting coders who had more experience than myself, which is probably what you'd need to do, if you don't know how to code...

Also, worth noting, FFIX for PC will be out soon enough, and may open the door for a lot more modding possibilities.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-04-02 16:56:50
Ok Hades related question, when I try to export the field backgrounds, I want to keep the layers but when I export the background it seems to only export half of the background. Shouldn't there be many tiff files that you could layer in photoshop.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-04-02 18:37:53
Thanks for the SetModel parameter Satoh, and for the interesting explanations ^^

Battle Scene importing (and even exporting) is not working well indeed. That's a part of the program I started a long time ago and I didn't got back fixing things there, mainly because they're quiet messy to begin with. Actually, I think the best I've ever done with that is exporting a scene, modify the position of 1 vertex and import back the model. The fact that it worked was a big success for me ^^"
I don't think you can use another amount of materials than the default one (and maybe you can't use another amount of vertices either).
Also, the exportation is partial because some scenes have animations (such as Trance Kuja's battle scene, where the crystal is seen floating behind him).

About the field backgrounds, you can export them :
1) Either one by one using the "Background: Manage" button and then "Export". This way, all the checked tile blocks will be exported as different layers of the .tiff image (unless you merge them). I don't know for Photoshop, but Gimp asks about using those layers as new images or using them as normal layers when I open the .tiff image with it.
2) Either by file batching. This way, all the tile blocks will be exported.

As Satoh said, field backgrounds are composed of tiles, which are 16x16 little images (potentially transparent). Those tiles are then packed into tile blocks, which is what you see in HW.

By the way, if you happen to know about image format and have an idea for a better one than .tiff, let me know ^^
.tiff seemed to me the most standard format that supports multiple layers, but if photoshop can't read them as layers, that's a problem.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Lein on 2016-04-03 04:29:34
Yes tiff doesn't seem to have any layers when you open it up in phtoshop. Might be a problem in the future if you'll ever make it possible for people to reimport pictures. But I doubt anyone will ever do that, you can't make the backgrounds higher resolution anyway. I'm trying to recreate the pre rendered effect in another engine and I thought I'd use one of the backgrounds from ff9, if I could export a character model from the game and it's animations too. I could basically recreate a scene exactly as it is from ff9. It's not a big deal, but if you want it to work you could maybe make it work somehow. ;)
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Satoh on 2016-04-04 01:21:18
Yes tiff doesn't seem to have any layers when you open it up in phtoshop. Might be a problem in the future if you'll ever make it possible for people to reimport pictures. But I doubt anyone will ever do that, you can't make the backgrounds higher resolution anyway. I'm trying to recreate the pre rendered effect in another engine and I thought I'd use one of the backgrounds from ff9, if I could export a character model from the game and it's animations too. I could basically recreate a scene exactly as it is from ff9. It's not a big deal, but if you want it to work you could maybe make it work somehow. ;)

I had every plan to reimport new backgrounds at some point. Not everyone cares about a higher resolution.
As I stated Lein, there are other programs that already export the character models and animations to usable formats.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Tirlititi on 2016-04-04 23:21:04
From my point of view, Photoshop is faulty there, cause I found the .tiff layer format in some official .tiff documentation. I don't see why Photoshop doesn't support that feature (as said, Gimp does).

Well then, since SE decided to keep the release of the Steam version for later, here is the v0.33 :
 - Added a MIPS editing feature. MIPS is the coding language shared by all the PSX games. It's the deepest level of game modifications and shouldn't be used carefree. More infos below.
 - You can now add and remove several things, so you don't need to recycle another item to create a new one :
 --- Add/Remove texts in text blocks and battles,
 --- Add/Remove enemy groups,
 --- Add/Remove enemy spells.
 - Completed the list of spell effects, though I only know the effect of "Defless" among the new ones : it unconditionally divides both defences by 2.
 - You can now use the field models of most of the playable characters. Indeed, the problem was that you don't only need to add the character's model in the preloading list, but also link it to a script's entry. The related "InitObject" call is a necessary step to preload the 3D model.
 - Added a background artwork image. It was made by Maxa' (http://maxa-art.deviantart.com/art/Hades-Workshop-598604129) and I'm really glad of it :D
(http://pre13.deviantart.net/be8f/th/pre/f/2016/084/8/a/hades__workshop_by_maxa_art-d9we5wh.jpg)

Here is the step-by-step method to use one of the playable character's model on the field :
1) In the target field's script, choose an object's entry. You'll replace that object by your playable character's model, so you need to choose one you won't use anymore. Modify the scripted events and whatever you want in that object's script ; don't touch the "Init" function yet.
Note : in some future version, you'll be able to add new entries, so you won't have to dummy one. You may also keep the old entry's script and thus use both objects (the old one + the new character's) using a trick : use a global variable and increment it in the object's "Init" function. This way, you'll be able to identify different instances of the same entry and give them different models. See the script of Linblum Soldiers in "Brahne's Fleet/Event" in disc 2 for an example of that system : there's only 1 entry for 2 different soldiers.
In any case, the important thing there is to note the chosen entry's ID (the number used in the related "InitObject" call).
2) Change the Preloading stuff of that field and add your character's model. Here is the list of the ones that can be used for now :
Code: [Select]
Vivi (8)
Dagger_Bis (76)
Zidane (98)
Dagger (185)
Freya (192)
Beatrix (204)
Quina (273)
Eiko (443)
Amarant (509)
Steiner (5489)
I don't think you can use battle models ; there seems to be a problem when using them.
When you add the model, you're asked for a number : enter the ID of the previously chosen entry.
If you don't have enough space, you need to remove some other object.
3) Return to the field's script and modify the "Init" function of your character's entry. Here are the different setups for the animations and sizes :
Code: [Select]
    // Vivi
    SetModel( 8, 61 )
    SetStandAnimation( 148 )
    SetWalkAnimation( 571 )
    SetRunAnimation( 419 )
    SetLeftAnimation( 917 )
    SetRightAnimation( 918 )
    SetObjectLogicalSize( 20, 30, 44 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 65, 57 )

    // Dagger Bis
    SetModel( 76, 91 )
    SetStandAnimation( 2089 )
    SetWalkAnimation( 2086 )
    SetRunAnimation( 2091 )
    SetLeftAnimation( 2088 )
    SetRightAnimation( 2084 )
    SetObjectLogicalSize( 20, 26, 42 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 89, 4 )

    // Zidane
    SetModel( 98, 93 )
    SetStandAnimation( 200 )
    SetWalkAnimation( 25 )
    SetRunAnimation( 38 )
    SetLeftAnimation( 40 )
    SetRightAnimation( 41 )
    SetObjectLogicalSize( 20, 24, 40 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 97, 61 )

    // Dagger
    SetModel( 185, 91 )
    SetStandAnimation( 2089 )
    SetWalkAnimation( 2086 )
    SetRunAnimation( 2091 )
    SetLeftAnimation( 2088 )
    SetRightAnimation( 2084 )
    SetObjectLogicalSize( 20, 26, 42 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 89, 4 )

    // Freya
    SetModel( 192, 94 )
    SetStandAnimation( 2556 )
    SetWalkAnimation( 2553 )
    SetRunAnimation( 2558 )
    SetLeftAnimation( 2555 )
    SetRightAnimation( 2551 )
    SetObjectLogicalSize( 26, 34, 48 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 105, 53 )

    // Beatrix
    SetModel( 204, 100 )
    SetStandAnimation( 2978 )
    SetWalkAnimation( 2975 )
    SetRunAnimation( 2981 )
    SetLeftAnimation( 2980 )
    SetRightAnimation( 2974 )
    SetObjectLogicalSize( 20, 20, 30 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 104, 48 )

    // Quina
    SetModel( 273, 92 )
    SetStandAnimation( 3228 )
    SetWalkAnimation( 3237 )
    SetRunAnimation( 3230 )
    SetLeftAnimation( 3235 )
    SetRightAnimation( 3227 )
    SetObjectLogicalSize( 40, 48, 60 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 65, 45 )

    // Eiko
    SetModel( 443, 63 )
    SetStandAnimation( 7503 )
    SetWalkAnimation( 7518 )
    SetRunAnimation( 7506 )
    SetLeftAnimation( 7516 )
    SetRightAnimation( 7514 )
    SetObjectLogicalSize( 20, 24, 38 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 65, 5 )

    // Amarant
    SetModel( 509, 122 )
    SetStandAnimation( 8307 )
    SetWalkAnimation( 8316 )
    SetRunAnimation( 8312 )
    SetLeftAnimation( 8310 )
    SetRightAnimation( 8314 )
    SetObjectLogicalSize( 30, 35, 50 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 65, 0 )

    // Steiner
    SetModel( 5489, 104 )
    SetStandAnimation( 2001 )
    SetWalkAnimation( 1996 )
    SetRunAnimation( 2005 )
    SetLeftAnimation( 1986 )
    SetRightAnimation( 2010 )
    SetObjectLogicalSize( 30, 35, 50 )
    0x86( 14, 16, 18, 20 )
    SetHeadAngle( 97, 32 )
You can unfortunatly only use those 5 animations each time. The other character animations are field-dependant.


Now, about MIPS.

The available MIPS code is the one from the battle system. Every time you're in battle, that's the code running in the background and processing everything. A convenient part of it handles the spell effects and that's the main modifiable thing for now. You can modify the different assembly-like instructions and they are displayed a bit more readably on the right. The spell effect scripts are called at the "Effect Point" of spell animations. Be sure to check the help ; though it is far from complete, it's still a first introduction to it.

Let's start with a relatively simple example : the effect of "Pure Damage". It consists of these lines.
Code: [Select]
$2 = $29[51] & 0xFF
nothing
$2 = $2 | 0x1
$29[51] = $2 & 0xFF
$4 = $17[8]
nothing
$3 = $4[5] & 0xFF
nothing
$2 = $3 << 1
$2 = $2 + $3
$2 = $2 << 3
$2 = $2 + $3
$3 = $4[7] & 0xFF
$2 = $2 << 2
jump 0xB4CC0
$3 = $3 + $2

// What lies at 0xB4CC0 :
jump 0xB7918
$29[54] = $3 & 0xFFFF
The $ things are placeholder for variables (RAM registries actually). There are 31 of them, most of which that have special purposes.
The brackets are used to retrieve or store a data from the memory. While non-brackets can be seen as temporary variables, for calculation purpose, the brackets ones are used to communicate with the whole system.

Let's get a closer look :
Code: [Select]
$2 = $29[51] & 0xFF
nothing
$2 = $2 | 0x1
$29[51] = $2 & 0xFF
These lines are adding the bitflag 0x1 to $29[51]. That "$29[51]" is a special data that will be used latter by the "jump 0xB7918" call. Note that a lot of spell effects (all I think) end with a "jump 0xB7918" call : it resolves the effect by applying the damage, the statuses, checking if the target should die or change state, run the "hit" animations, etc...
The bitflags "$29[51]" are flags about the effect on the target. The bitflag 0x1 is the one saying "This spell deals damage" so now all you have left to do is to set the amount of damage dealt.

The following lines :
Code: [Select]
$4 = $17[8]
nothing
$3 = $4[5] & 0xFF
nothing
are used to retrieve the spell's power. "$17[8]" is the casted spell's data offset and the 5th data is the spell power (its written in 8 bits, just like the "$29[51]" flags, hence the 0xFF). Now the variable $3 holds the spell power.

Next are those lines :
Code: [Select]
$2 = $3 << 1
$2 = $2 + $3
$2 = $2 << 3
$2 = $2 + $3
$2 = $2 << 2
You can translate them by "$2 = (($3 * 2 + $3) * 8 + $3) * 4" or, shortly, by "$2 = $3 * 100". Since the raw multiplications are slow operations (or were at the time), the devs prefered to use shifts and sums instead.
Next to it, there's also :
Code: [Select]
$3 = $4[7] & 0xFF
$3 = $3 + $2
$29[54] = $3 & 0xFFFF
The spell's accuracy is stored into $3, then added to $2  and stored into "$29[54]", which is the memory place where you need to store the damage number before the "0xB7918" call. Note that the line following a jump call is always executed before the jump actually occurs (there's a delay of one instruction).

To sum up, this code explicitely does that :
1) Add a flag "deals damage" to the effect,
2) Set the damage to 100 * Spell Power + Spell Accuracy,
3) Run the "Apply Effect" code (0xB7918 ; note that it can differ depending on your version of the game).

Check the help to have a list of useful known data addresses. You'll know how to retrieve data such as caster's or target's stats. If you're interested in modifying raw spell effects, I encourage you to check out how most simplest are done. Namely, you should check out these spell effects :
Minus Strike, Lucky Seven, Thievery, Frog Drop, Dragon Crest and Grudge (other "Pure Damage" like effects, with more complex damage formulas),
Defless, Absorb Magic/Strength (another effect than damage, but quiet simple),
Darkside, Drain and Osmose (damage/heal on the caster and use of the different flags),
Chakra (HP and MP heal, and also an example of an effect using a supporting ability),
Curse (change the elemental weakness of the target and display a special text. I suspect the element of the spell Curse to be specially randomized the same way that Roulette's target is randomized ; that's something specially handled by the battle script, but not at the "spell effect" place).

Note that there are a lot of "jump" calls that lead out of the spell effect's range - sometimes to another spell effect's function part, sometimes to another part of the battle script and even sometimes to another part of the RAM script, not battle-related -. You can try to guess what's their purpose (mainly : they do the standard damage and dodge calculations) and treat them as black boxes. You can also copy the address offset and paste it in the "Full Code" area to see the target code.

Since that's complicate even to understand the code (and even more to write one), I'll do samples of custom spell effects and post them here. If you have ideas, you can ask and I'll see if it's reasonably easy to make ^^"


Fiou, I hope some of you will find interests in this version. I'm both glad to be able to modify spell effects and disappointed to have it so complicated ^^"
By the way, to add to the masochism, that MIPS coding thing will surely be useless for the Steam version ; that's one of the first thing they'll have updated for sure.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: gorildo on 2016-04-05 16:21:44
Wow, amazing work with those MIPS codes, it must be possible to do some crazy stuff with it. As an idea for spell effects, is it possible to turn off EXP/Gil gain (like the Break spell) with the Death spell or make an enemy nontargetable while Petrified?

Also, do you think it would be possible to figure out the codes on the game mechanics, to permanently remove the damage limit or use a bigger integer for HP values? What purpose could there be to using just 16 bits for that?

By the way, it's cool that you can add spells now, but then you must manually edit each enemy script. It would be nice to have some samples of scripts for casting a spell randomly or under certain conditions. But that would take a lot of space along with the other scripts, and this thread is getting crazy big. We need somewhere to collect and organize those scripts.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Lein on 2016-04-05 18:08:31
Something that my little brother would appreciate would be a much harder version of ff9. That's something I think you guys should start working on, harder bosses and enemies.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Satoh on 2016-04-06 03:15:16
This brings me a significant step closer to the kind of mods I wanted to make! Awesome, Tirlititi. I didn't expect the model loading to be done so quickly.

I'm curious as to where you found the model IDs (Zidane 98, Beatrix 204). One of my end goals would be to archive all of the NPC models in the same spot as the player models. Hexediting can do that of course, but it won't mean much unless I can begin to understand how the models are organized and labeled.

The models themselves don't seem to have a label anywhere... or not one I've found.

EDIT:
I do realize adding more things to the player model archive with push other data somewhere else on the disc, meaning I'd have to modify HW to look in a new place for it too. But the question is still 'how to better understand why those models are different'
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: froggy25 on 2016-04-06 15:36:42
Excellent job for the MIPS editor, I'll be sure to use it someday :P
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-06 17:26:09
Thanks Froggy. I'll implement the Tetra Master MIPS code someday, since you documented pretty much everything important about it already ^^
But it was tedious enough to implement only the battle code, so I've let that be for another version.

@ Lein : Yeah, someone should totally do that x)
Actually, there are already several (difficulty) mods. I don't think someone will ever bother to make a mod even more difficult than Unleashed.

@ Satoh : I've a list of all the cluster datas and I can easily check the objects' ID. That way I know which model IDs are field-dependant and which are not. For naming them, I looked at the game's script and listed them when I could identify them (there are still a lot of unnamed model IDs btw). I don't think they have any label indeed.

@ gorildo : About manually editing the enemy script, I'm afraid that can't be avoided. Maybe I'll add a few macros that will automatically generate some standard code (Squaresoft's devs had some) but that's not for now.

About what can be edited using MIPS code...
1) Making the max HP a data using more than 16 bits : no you can't. I mean, it would require huge changes and not only in the battle MIPS code but also in the other MIPS codes, not to mention messing up the data tables for enemies and updating all the codes refering to one of the enemy's stats. Besides, you can already kind of increase the HP limit by healing the enemies when they reach a certain limit (http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426).
2) Removing the damage limit : actually, you see that Pure Damage's formulas cap the damage to 9999. If you remove these lines (change them to "nothing" for instance), you can deal more than 9999 damage in one shoot. However, the damage display won't follow and you will still see the 9999 figures, even though the actual damage are more than that. I don't know how it is possible to make the display works properly for that :/
3) Make an enemy non-targetable : it's surely possible, but not easily and not in the "Spell Effect" part of the MIPS code. One would need to search through the full code to see if and where the targeting is handled and add a check for petrified foes. Not possible without a harsh work.
4) Disable reward for Death-dealt enemies : I don't know. That's surely the easiest thing to do, but it depends on how the rewards are calculated. I know that the Exp gain is updated everytime an enemy dies (it's not calculated in 1 shoot at the end of the battle), so maybe you just need to avoid updating that figure if the enemy dies from a Death spell. That's a bit further than the Spell Effect part of the code, though.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Satoh on 2016-04-07 21:03:56
@ Satoh : I've a list of all the cluster datas and I can easily check the objects' ID. That way I know which model IDs are field-dependant and which are not. For naming them, I looked at the game's script and listed them when I could identify them (there are still a lot of unnamed model IDs btw). I don't think they have any label indeed.
It is strange that they would use the same index to refer to each model every time, when they are in different places in each field's data. It seems like there must be a master list somewhere that tells the game why [192] is Freya and [74] is Erin...

Also, there seems to be a problem with adding new preloads to a field in some cases. For example, adding a preload to the list in Lindblum Shopping Area, breaks the model loading in Lindblum Church Area. Adding two causes the game to break altogether with an error of [unknown opcode 0x3F]

Second:
I don't understand what preload list does to the data, but I suspect it may be overwriting part of the RAM or ROM data from the other field. You may want to add a size check and warning/error if this happens. Just a suggestion.
Title: Re: [FF9] General editor - Hades Workshop (0.32)
Post by: Kefka on 2016-04-07 21:10:18
Well then, since SE decided to keep the release of the Steam version for later, here is the v0.33 :
 - Added a MIPS editing feature. MIPS is the coding language shared by all the PSX games. It's the deepest level of game modifications and shouldn't be used carefree. More infos below.
 - You can now add and remove several things, so you don't need to recycle another item to create a new one :
 --- Add/Remove texts in text blocks and battles,
 --- Add/Remove enemy groups,
 --- Add/Remove enemy spells.

Wow, I'm not checking the thread for a couple days, and look what I missed! Amazing update man, I'll be sure to check it out immediately! Adding in additional enemy spells was something I've craved to do for a long time now.

Quote
- Completed the list of spell effects, though I only know the effect of "Defless" among the new ones : it unconditionally divides both defences by 2.

Now this is a very interesting new ability, kinda like Steiner's Armor Break and Mental Break combined, right? And more reliable than LV3-Defless because the reduction is not random. I'll make sure to put this new skill to good use. I've always liked the idea of certain enemies having either pretty high defense (Adamantoise, Iron Giant, enemies made of stone) or magic defense (magical creatures like Agares, Goblin Mage,Magic Vice, all types of Black Mages and such), thus requiring you to use debuffs as a tactical combat element before you can truly hurt them. Likewise, certain enemies should be able to do the same to you, adding another twist to battles.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-08 15:22:57
It is strange that they would use the same index to refer to each model every time, when they are in different places in each field's data. It seems like there must be a master list somewhere that tells the game why [192] is Freya and [74] is Erin...
Not necessarily. It may be some ID chosen by Square's compiler. It was decided which index refers to which model at the game's compilation time and the "master list" doesn't exist anymore.

Also, there seems to be a problem with adding new preloads to a field in some cases. For example, adding a preload to the list in Lindblum Shopping Area, breaks the model loading in Lindblum Church Area. Adding two causes the game to break altogether with an error of [unknown opcode 0x3F]
Arf, that's a problem of Hades Workshop then, not of the game's preloading datas.
There was a bug like this in the past and I thought I solved it, but it seems I didn't. I'll check and fix that bug.

@ Kefka : Yes, that's like Steiner's abilities, but the main difference (besides the fact it reduces both defences) is that it can never miss.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Satoh on 2016-04-09 08:18:41
if it helps, Tirlititi, to reproduce the error, I added Beatrix and then Freya to the preload list in [Lindblum Shopping Area], and after that, even if I remove them again, the game presents an unknown opcode error immediately after starting a new game.

With only Beatrix added, the game made the player object disappear in [Lindblum Church Area]. No changed were ever made directly to [Lindblum Church Area].
Both Freya and Beatrix were loaded into [function_Zidane] index in [Lindblum Shopping Area], and the Zidane_init code was changed to Beatrix's appropriate animation and model IDs.

I don't think I changed any other data anywhere near that part of the game.

How many models can the preload list hold? I think the game supports up to 0x25 individual function calls (I read that somewhere in a hacking note related to a codebreaker code)
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Kefka on 2016-04-09 11:56:03
Those MIPS codes sure look interesting, although quite complicated, and I honestly can't quite make sense of them right now. Does that allow one to basically modify all of the damage formulas in the game? If so, then the first one I'd like to change is Tonberry's Grudge, which has the basic formula:

Damage = 4^(number of Tonberries killed)

Now that damage formula is very awkward in my eyes: The first time you encounter Tonberries it will be all but useless because you haven't killed any Tonberries yet, so it will always deal 0 damage. However, once you've won 2-3 battles against them, they'll start wrecking you, as that formula ensures you'll take 9999 damage once you've killed at least 7 Tonberries. Even 6 dead Tonberries result in 4096 damage, which will more than likely be too much to handle for your average party at this point in the game.

I was thinking of changing the formula to:

Damage = Number of enemies killed by that party member * 10

as it is used in most other FF games. This would result in a more stable damage range for a longer time. However, I'm unsure of how to do that or if it's even possible to make the game count every enemy killed. It would depend on how the game counts the number of killed Tonberries (does it look for the enemy ID each time an enemy dies to check if it's a Tonberry?).

It's also questionable if the number of kills of each party member individually is even counted at all, seeing as even Freya's Dragon Crest simply counts the total number of dragons killed, not just the ones killed by Freya herself. So I'm kinda sceptical about my plan, but hey, maybe someone surprises me by finding a solution?

By the way, nice new artwork for the main page of HW, fits perfectly!
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-09 13:46:02
The counter for Tonberries is not the same as the counter for dragons or steals. You can see the counter increase in Tonberries' AI.

At battle initialization :
Code: [Select]
            if ( !General_TonberryCounter ) {
                set General_TonberryCounter = 1
            }
When a Tonberry dies :
Code: [Select]
        if ( General_TonberryCounter < 254 ) {
            set General_TonberryCounter += 2
        }

The MIPS code, by itself, use the formula :
Damage = 1 << (General_TonberryCounter - 1)
or, equivalently
Damage = 2 ^ (General_TonberryCounter - 1)

That formula is meant for Tonberry's spell only, not for a party's spell, since you encounter Tonberries only at Ipsen's Castle and not that frequently.

Here is a MIPS code that change the damage formula to :
Damage = General_TonberryCounter * Spell Power
              = (2 * NbTonberryKilled + 1) * Spell Power

Code: [Select]
0xB771C: $2 = 32776 << 16
0xB7720: $4 = $2 + 44784
0xB7724: $3 = $4[192] & 0xFF
0xB7728: $2 = $17[8]
0xB772C: $2 = $2[5] & 0xFF
0xB7730: $LO = $2 * $3
0xB7734: $2 = $LO
0xB7738: jump 0xB7748
0xB773C: if ($2 < 10000) $1 = 1 else $1 = 0
0xB7740: jump 0xB7918                                    // Offset of "Apply Effect"
0xB7744: $29[54] = $2 & 0xFFFF
0xB7748: if ($1 != $0), jump 0xB7754
0xB774C: $1 = $29[51] & 0xFF
0xB7750: $2 = $0 + 9999
0xB7754: $1 = $1 | 0x1
0xB7758: jump 0xB7740
0xB775C: $29[51] = $1 & 0xFFFF
On the left part, it looks like this :
Code: [Select]
lui 2 32776
addiu 4 2 44784
lbu 3 4 192
lw 2 17 8
lbu 2 2 5
multu 2 3
mflo 2
j 187858
sltiu 2 10000 1
j 187974
sh 29 54 2
bne 1 0 2
lbu 1 29 51
addiu 2 0 9999
ori 1 1 1
j 187856
sh 29 51 1
I've let the lines "jump 0xB7918" and "$29[54] = $2 & 0xFFFF" untouched because they are used by other spell effects, such as Frog Drop. Because of that, the code fits dead on the allowed space of Grudge's spell effect.

If you use a non-US version, you need to adjust the jump offsets.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Cacahuete on 2016-04-09 15:27:57
Wow Thank you a lot Tirlititi for all this incredible stuff!
I'm amazed with how much work you put into this... seriously, great work!

I've been working on a fighting module, and I have found out there is a "problem" when you add some status effect to most weapons:
when I try to add some status effect to a weapon which originally had none, it just won't work. I guessed it is because weapons don't just use the field from the "status effect" but also some kind of percentage which varies on each weapon (for example, poison knuckles has originally a 40% chance to inflict poison, while avenger has a 5% chance of causing death), and that these weapons I've been trying to change must have a 0% rate of inflicting the status effect.

Am I right when I think this way? If that's the case, do you see this being improved any time soon? I've also been thinking that it might be possible through battle scripting but I know almost nothing about scripting and this seems to be quite a callenge for me.

I've also been searching how the Healing Rod works(so it heals instead of dealing damage), but found nothing. Is this some extra feature inherent to all weapons but only used with this Rod? (Since there is the Healer ability I know this feature may have little use... but I was trying to create some kick ass Rackets that could only heal you and cast some beneffit effects while attacking (: )

And since I've already wrote a lot I'd like to ask if is there any possibility (among the game standards) to make items cast negative values... like a piece that could lower your Magic stat, for instance.


Well, congratulations once again to you and all the people who helped you. I know I've come out with some issues on which you might haven't even thought, but the priority remains in thanking you for making all this possible, I love to see Dagger wearing a dagger, Vivi with a deadly claw... FF9 is my favourite game in the world and the only thing I got to find boring were the repetitive, sometimes meaningless, battles. If I accomplish this changes in a satisfactory manner I hope to show you all what I've been working on!
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: gledson999 on 2016-04-09 19:09:10
Congratulation for this excellent tool, Tirlititi, one question:

Is possible enable beatrix in the group, without replace or swap any character?
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Kefka on 2016-04-09 21:36:45
The counter for Tonberries is not the same as the counter for dragons or steals. You can see the counter increase in Tonberries' AI.

At battle initialization :
Code: [Select]
            if ( !General_TonberryCounter ) {
                set General_TonberryCounter = 1
            }
When a Tonberry dies :
Code: [Select]
        if ( General_TonberryCounter < 254 ) {
            set General_TonberryCounter += 2
        }

Thanks for the quick reply. So this means that I could in theory have the game count every defeated enemy by simply adding that code into the AI scripts of all enemies, right? However, doing that manually for hundreds of AIs would be VERY tedious... I guess I'll try out your suggestion instead.

However, tirlititi, I've just noticed a different problem: it seems that the newest version reads some offsets of the German version incorrectly. In disc1, everything looks fine, but on discs 2-4, there are several panels that show rubbish, even when loading the unmodified vanilla game. As an example, here's acomparison of disc 1 (how it should be) and discs 2-4:

(http://oi63.tinypic.com/24vlflc.jpg)     (http://oi66.tinypic.com/afj1n5.jpg)

(http://oi67.tinypic.com/2din9jb.jpg)(http://oi68.tinypic.com/2z8avev.jpg)

In all 3 discs, its the same panels that are affected: Items, Key Items, Spells, Commands, and Stats (even though in the Spells and Items sections the names are not off, only their description texts). Do you have any idea what's going on or how to fix it?
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-10 12:59:44
Ahah, another version full of bugs, I missed them ^^"

@ Cacahuete : You're assuming right ! I don't know how I did to miss that field, but there's indeed a number for the status accuracy. You'll be able to change it in the next version. And weapons without statuses (plus thief swords) have a status accuracy of 0% as you thought.
About the healing rod's feature, however, I can't find it and it may be hardcoded in the battle code... It doesn't seem to be in the weapon's data.

@ gledson : It's coming closer ^^ For now, you can only add her to the party without adding dialogs or explanation to that (gameshark-style).
Once I find a way to add her properly in the party and verify it works bug-free, I'll add infos and an example in the 1st post of this topic.

@ Kefka : About the enemy counter, there might be a way. There's a counter for dragon-type enemies killed so maybe there's also a counter for all the enemies killed. There might be counters for the other monster types, which could be used as an estimate of the enemy killed amount, but seeing the data offsets (1384 for Frog catching, 1386 for successful steals and 1388 for dragon-type kills) I wouldn't bet those counters exist. It needs investigations...

About the text offsets, I just tried the disc 1 and 3 of the german version and it worked perfectly :/
I'm afraid your discs 2-4 are not really vanilla games. I don't think that can happen, but tell me if you verify the fact that it was non-modified and it still doesn't work.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: gorildo on 2016-04-10 13:59:10
I'm aware of that "hack" to make the enemy have more than 65k HP, it's just that it would be a more "elegant" solution.

1- By the way, seeing how people are interested in changing parties and stuff (Beatrix) I was wondering if it is actually possible to have more than 8 characters at any time. Probably not, but if it were, it would be fun to also have Blank, Marcus and Cinna (there's a portrait of him in the game, but he has no victory pose and I think the game crashes because of it).

2- Speaking of characters, is it possible to enable Zidane to be switched in the party change screen? It would be stupid to have his model walking everywhere but not have him in battle, but I suppose some patience editing scripts could fix that too.

3- When I last tried changing the number of opponents in a group, it didn't work so well.  :-P I believe this feature still doesn't work, any idea how to fix it?

4- Do you think it would be eventually possible to edit and reuse spell animations without having them screw everything up? Hooray for casting Ultima.  ;D

5- Now this one is just about those useless things for compulsive FFIX fans. In the Lindblum castle, in that room you go through to get to the bedroom w/ the moogle, there is a stair where you meet the sailor Erin. I forgot what is the name of the room in the Fields list, I'm on my linux partition right now, but there is an animation of the stair moving, which is never triggered in the game. Is there a switch to get it moving?
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Cacahuete on 2016-04-10 17:51:01
Thanks a lot for the quick reply Tirlititi! I'll be looking forward the new version then! :D

I've been trying to get how does the "Soul blade" technique checks your weapon, but gave up haha  those mips codes seem sweet but by now it's too much for me ^^U  thanks for checking the Healing Rod thing, guess I'll try again to track its effect next time I get some "serius" free time.

You didn't answer about those "negative" stats I asked though... guess it will be difficult to get there without some scripting knowledge since the game is clearly not thought to count on values lower than 0 for the main stats.

Well, thanks a bunch!! I'll be arround to see how it keeps going!

Btw it feels so good having Tetra Master on Hades!
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-10 23:32:27
@ gorildo :
1 - It's possible to add up to 9 characters in the team selection menu. Zidane, Vivi, Dagger, Steiner, Freya and Beatrix + 3 others (not all of them because of compatibility). If you want Cinna, Marcus and Blank, you'll have to remove Quina, Eiko and Amarant for that.
Also, I don't know where you have been told that Cinna had no victory pose. That's false (http://finalfantasy.wikia.com/wiki/Cinna#Gallery) ^^

2 - Yes it is possible. It requires changing the script of all the fields where you are given the choice to change team (Hildaguard 3 and Invincible mainly), but that's not an hard modification. Search for the line "Party( 4, 1 )" and change it to "Party( 4, 0 )". This way, Zidane won't be locked anymore. Those lines can surely be found (I didn't verify but I'm quiet confident) :
- in the Hildaguard 3, it should be in one of the Sailor's functions (not Erin, the other one), perhaps in the SpeakBTN function,
- in the Invincible, it should be in one of the non-model related functions, that is either a "Code" function or a "Region" function.

3 - You also need to modify script there. You only need to change the "Main_Init" function of the enemy's script. If, by default, you have a "switch ( GetBattleGroupId )" line, you can mimic the script there and adjust it to your group set. Else replace the "InitObject" functions by such a switch (with several cases and the "InitObject" inside each case). It looks like this :
Code: [Select]
Function Main_Init
    switch 5 ( GetBattleGroupId ) from 0 {
    case +0:
        InitObject( 1, 128 )
        break
    case +1:
        InitObject( 1, 128 )
        InitObject( 1, 129 )
        break
    case +2:
        InitObject( 1, 128 )
        InitObject( 2, 129 )
        break
    case +3:
        InitObject( 2, 128 )
        break
    case +4:
        InitObject( 2, 128 )
        InitObject( 2, 129 )
        break
    }
    return

4 - Besides Ultima, I don't really know what kind of bugs you're talking about ^^"
There are a bunch of animations with problems when you try to use them for some other purpose than their default one, but that's quiet specific to each one. There's not an unique answer for all of them.
For Ultima, it is not possible to fix the bug and it won't be as long as the spell animation edition stays at its current state. I'll eventually complete that part, but that's not in my nearest projects.

5 - That's a script thing again. There are several solutions for this one, but a good start would be to follow Satoh's advice and look for some code concerning the tile animations (he gave the example of "Prima Vista/Engine Room > Function Code1_Loop").
You should also display the function list and search for the "TileAnimation" functions : that's the ones handling this kind of thing.
For the movements of the characters on the stairs, you should use some "Slide" function, though it won't be easy to make the whole thing stands (you'll need to practice scripting a bit for that :p ).


@ Cacahuete : Ah, I forgot for the negative stats. But as you think, it'd be difficult, even with scripting knowledge. Besides, I don't know if the code calculating the character's stats by the mean of his equipment's stats can be found in the battle script. It may be a code present in another part of the game's datas (as said, there are other MIPS codes in the game : one for the Tetra Master, one for the Field's code, one for the menus... even the PSX bios has a MIPS code). And even if that code was present in the battle MIPS script, there would be a duplicate for the menu's script and you can't access to it so the player would never see the negative effect.

However, since I'd bet on the existence of such a code that calculates the character's stats, I think it can be feasible to implement that feature once we know where it is located. That's not like the HP change that would require huge changes scattered all over the scripts.

I don't understand the Sould Blade effect yet myself (as well as the other status-inflicting effects actually). I just watched at the Physical attack effects and I'll document about them. But the main problem is that the offsets of jumps are highly version-dependant and I don't see a neat way to speak of them.
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Kefka on 2016-04-11 14:59:52
About the text offsets, I just tried the disc 1 and 3 of the german version and it worked perfectly :/
I'm afraid your discs 2-4 are not really vanilla games. I don't think that can happen, but tell me if you verify the fact that it was non-modified and it still doesn't work.

I got it working now by simply deleting the old configuration files and having Hades Workshop create completely new ones. I remember that I had a similar issue with older versions of HW some time ago, and it could be solved just like that.

However, I'm having problems using the new feature of adding/removing enemy attacks. When I try adding 2-3 new enemy attacks, HW crashes pretty often. Has this happened to others, too? Is there a limit as to how many attacks can be in one attack list? Is it a question of available space for each enemy entry?
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: id104335409 on 2016-04-14 12:28:24
Soooo, I'm back. I've been here before in 2011. Why am I here? Because Square Enix finally launched Final Fantasy 9 for PC in the Steam store. Minutes after that CODEX hackers distributed a torrent (naturally). Sooooo, FF9 is on PC now.. Will there be a Hades Workshop for the PC version?
Title: Re: [FF9] General editor - Hades Workshop (0.33)
Post by: Tirlititi on 2016-04-14 13:45:35
Update to v0.33b. It fixes the bugs :
 - The preloading list no longer bypass its size limit,
 - Adding an enemy spell now works fine : it sometimes didn't copy properly the animation sequence,
 - MIPS instructions sometimes created 2 number controls for the same registry ID ; it doesn't do that anymore,
 - Added a few fields to weapon modifications, mainly the status accuracy.

I don't know what's the purpose of the other added weapon fields... I modified them and saw no change in-game but I've let them in case someone figure that out.

Working on making the tool compatible with the Steam version next.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: eXistenZe on 2016-04-14 15:10:47
Steam compatibility would be awesome.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Kefka on 2016-04-14 21:31:11
Thanks for the update, adding enemy spells works perfectly fine now. Indeed, many newly added attacks had no animation sequence, and it was impossible to add one later. Glad to know I wasn't the only one with that problem.
Title: FF9 PC version Released on STEAM
Post by: Lyrithus on 2016-04-16 16:13:18
There has been a release for ff9 on steam for the pc. Could Hades Workshop be adapted for it? or at the least, a tool exactly like it that can do the same things?
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Lyrithus on 2016-04-16 16:14:53
ignore my last post, Tirlititi is already working on it!!!!! WOOO HOOOOO
Title: Path of Souls - by Chronoslither
Post by: Lyrithus on 2016-04-16 16:49:32
https://www.youtube.com/watch?v=pOQkp4YIAGc        <<  the link to the demo video
http://www.insanedifficulty.com/board/index.php?/topic/5412-testers-wanted-final-fantasy-9-path-of-souls-edition-formerly-remix/                << link to the mod and changes

I would Love for this mod to be applied to all four disks. but i have no idea how to do this, althought i know how to use the workshop, i feel its impossible to note or write down all of the disk one changes, and then try to apply them manually 1 by 1 to the other disks. and i couldnt apply the same patch to the other disks, that doesnt work.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Satoh on 2016-04-21 07:46:50
Tirlititi do you have any idea how much flexibility there is in changing the size of a field script? (That is, mow many more instructions can be added to a script before it gets corrupted)

There has to be some limit in theory. Some scripts are already nightmarishly long, and I'm afraid to hazard increasing them with things like switches. (Since my goal tends toward having a choice of characters to play on a lot of different maps, that means changing the preloads on many, and adding switches in place of what would normally be init_Zidane.

I suppose there may be some clever way I could store an array of information at the start, and call up whatever the value is that way... but I'd have to know where there's free space in RAM... and probably a lot of it...
I suppose I should also ask if there's a way to find unused RAM, or a global list of known RAM positions that should never be touched or something.
Those might be useful to have.

Good luck with the Steam port.

EDIT:
Unknown weapon flag 1 (the one left of Ignore Row), is seemingly a [Melee] flag--meaning it explains whether the weapon is ranged or not. It seems to work in correlation to the [Ignore Row] flag.
I have not yet tested the effects of this. It could be damage related, statistical, pseudo-elemental (as in, this attack counts as magic, or something) or something else entirely. I can confirm though, that on disk 1 any weapon that has one flag set, does not have the other.

Still pondering the 4th flag and the two mystery values. I think the two unknown integers are likely 4 unknown bytes, just by the correlation in the ranges I'm seeing. They always tend to be greater than 0x0100, meaning the 0x01 part may be part of a different value altogether.
This is just speculation, but maybe it'll give you an idea you didn't have already. *shrug*
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-04-23 22:31:23
Thanks Satoh, but the unknown integers are displayed properly ; the values are too round to be 2 splitted numbers and the Steam code source name them "offsets" (as signed shorts).

There are usually sufficient free space to add a bit of code (in general, a good big entry would fit in). The problem is that the exact free space is quiet random and can indeed cause trouble if you need to add some constant code to all the scripts ; there are surely several for which you'll be unlucky and there won't be enough space... For now, and for long, the only solution will be to be inventive and grab some space elsewhere in the script (either by shortening the code, either by cutting unneeded lines).
The length by itself will never "corrupt" the script. You'll get bugs if the script that you added is in conflict with the normal script (or if you do things like dividing by 0 :evil: ), but that's all.

It would be really useful to have a list of unused variables, indeed. I know there are a few gaps in the "chest-opened" flags, but I don't know if there are large ranges of unused (and memory card-saved) variables. I don't have time to investigate it for the moment though :/

I updated my Hidden Dialogs (https://www.youtube.com/watch?v=paxguJo6AqA) video with the Steam version ; t'was a good practice to see what problems arise with the Steam version when trying to import the modification patterns from the PSX version.

I have a clearer idea of how Hades Workshop could be made compatible with the Steam version now. Don't expect it to come out before 2 weeks (that's my target time, but I know from experience I always pass it because of technical problems I didn't expect ^^"). You won't be able to use the most basic features of HW with the Steam version at the beginning. Oddly enough, the modification of party's spells and items will be more difficult than the enemies spells and AI, or Field scripts.

EDIT : I've had even more technical difficulties than I thought, and I'm just at the stage of reading datas (after that, I'll need to create modded files). And overall, I'm fed up of this steam version...
I'll definitely make a compatibility update next, but it'll take more time than expected.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Satoh on 2016-04-24 09:21:28
I don't know if it helps or is new information to you, but as the steam version is built from Unity, the Mono disassembler in Cheat Engine can crack open what appears to be the full code library in use by the game... I've yet to decipher exactly how to get at the runtime values of the variables and code I found there.

Also, the character models and world map data are stored in the streaming assets/p0data* files. Had only moderate success handling them since those files seem to be a slightly modified form of the Unity raw asset packages, rather than a normal use which could easily be unpacked and repacked at will.

It seems like the UI stuff is in the maindata, resources.assets, and sharedassets.assets files inside [x86|x64]/ff9_data folder.

All in all, once the mono code is figured out, I wouldn't be surprised if the steam version was 10x more moddable, immediately. (Since everything would be coded in one place, in assembled C# from the look of it.)

Welp. I hope that's useful. This is all just outside my normal range of modding skill, but fascinating nonetheless.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-06 04:07:19
Hey so how is the Steam compatibility coming along? I can't wait to dig into it so I can Change party members :D
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-05-06 22:14:42
Hum... here is my progress so far (expect a bunch of errors terminating the program when you look at it) :
HadesWorkshop_ProgressVersion (http://forums.qhimm.com/index.php?topic=14315.msg241705#msg241705)

- I've made some file mapping about the assets and all.
- Most of the texts are readed (the accent/ponctuation errors, I'll take care of it soon ; the opcodes will remain displayed like this for a moment).
- Several Chunk datas are readed (enemy stats and scripts).

[UPDATE 16/05] : Link updated. It can now read Fields, World Maps and Tetra Master related datas. The field background are messed up because I need to find out how the tiles are sorted.
[UPDATE 21/05] : Link updated. It can now read all the datas except MIPS code, Battle Scenes and Spell animations (shared ones ; the enemies' ones can be seen).

Needless to say you can't have a practical use for this version ^^"
Even the PSX files won't be loaded correctly for the time I do the compatibility changes.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-08 13:18:33
Awesome thank you for the feed back bud, I wish there was something I could do to help you with this...Also when I tried opening HW just now i got this error.
"This program can't start because wxmsw30u_core_gcc471TDM.dll is missing from your computer. Try reinstalling to fix this problem."
What is that? Can't even google it.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Fraggoso on 2016-05-08 17:14:58
I also receive that error message (and also 4 times with another DLL which is missing).
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: vivigix on 2016-05-09 00:22:58
uzoko1, Fraggoso you should place HadesWorkshop_ProgressVersion.exe in Hades Workshop 33b version folder, there wxmsw30u_core_gcc471TDM.dll file located and other dlls, and program will run.
Tirlititi, I tried open bins in assets folder, but program creashes every time when I am trying open any file named p0data. Perhaps I am doing something wrong. What file can open HadesWorkshop_ProgressVersion?
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-05-09 07:21:37
Open the Launcher.exe file. You're not supposed to know in which file whichever data is : the program does it for you ^^"

I don't put the .dll inside the download link to avoid potential misunderstandings. This is not a working version of the tool, only a way to respond to the "how the progression goes" question by a sample.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Fraggoso on 2016-05-09 20:35:00
uzoko1, Fraggoso you should place HadesWorkshop_ProgressVersion.exe in Hades Workshop 33b version folder, there wxmsw30u_core_gcc471TDM.dll file located and other dlls, and program will run.
Tirlititi, I tried open bins in assets folder, but program creashes every time when I am trying open any file named p0data. Perhaps I am doing something wrong. What file can open HadesWorkshop_ProgressVersion?

Thanks for that and also thanks for Tirlititi to point out that you need to open the launcher.exe ^_^
Seem preatty good so far. Random crashes here and there, but that should be obviouse. ^^
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-11 01:31:38
HadesWorkshop 33B version where is that at??? Sorry if I am being blind.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Kefka on 2016-05-11 16:34:49
HadesWorkshop 33B version where is that at??? Sorry if I am being blind.

At the front page of the thread, the big bold "Hades Workshop" right above the list of older versions.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-18 22:00:02
Okay so what things are we able to really do right now? I can't alter the scripts in the Field menu of enviornments cuz Hades will just shut down on me. Can I change skills still? Sorry if you said this before, but I am reading and confused haha.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-05-18 22:30:37
Needless to say you can't have a practical use for this version
It seems it was needed in the end...
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-20 08:23:10
What do you mean bud? Also how is the hades workshop coming along?
EDIT: Also if I was to configure everything on the old Hades and you get the new one up and running, will I be able to transfer the modded on onto that?
And to add onto that, any key new features that may appear in the new one for steam because it will open a lot more than the psx ver.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-05-21 10:11:43
@uzoko1 : That means you can't mod the game with this version of HW. Only see the datas (and enjoy the program's crashes :p ).
About transferring mods from the PSX version to the Steam version : yes it will be possible minus a few things :
1) MIPS code and Battle Scene model changes won't be importable,
2) Maybe the Spell Animations won't be either for the first versions,
3) All the texts will likely be in that case as well (moreover, Steam's datas have 7 different languages ; you'll need to modify the texts in each one to have a proper mod),
4) It might be that the script importation will be buggy, as there is also 1 script per language. Though they are mostly the same among the different versions, there are few differences (the only one I noticed is the Ragtime Mouse's way of talking : in the US, the dialogs are split in 2 windows while in the french version, the dialogs are in a 2-lines window).

Also, I hope to have more features for the Steam version. Most of the data size limitations will be removed in the next release (they'll still be there for the PSX versions). Later, I think I'll add an IL code modifier looking like the PSX's MIPS code and an Unity Archive editor, to have something a bit more adapted to FF9's assets files.


I updated the WIP link ; most of the datas can be properly viewed now (the field scripts can sometimes crash the program... I think it's a RAM capacity problem, but that's kinda weird). The field backgrounds and texts are still badly displayed.

I'm also planning to create a github project for this, as it's getting bigger and bigger. I'll finish that version first, but tell me if you're interested in coding the tool with me.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-21 13:13:44
I am definitely interested in coding, but as you know through our emails, i am no pro...but I also can donate to you if you actually need money for this project, unless its absolutely free, just time consuming. I of course want to be able to do at least these 2 things as soon as things get working: Add and remove people to the party, as you know my Blank, and also be able to allow them to hold whatever they want, I would allow Zidane to hold spears and swords. So those things are the major things I would love to get working personally. Other than that idk what you would want me to help with or how to start. You also know my email, I have been checking constantly everyday these forums and my email for updates about HW, this is all I want, I love FFIX.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-05-22 06:22:30
Also, I am working on the epsxe ver again, For the Evil Forest, I am setting Blank in, how do I set the pluto Blank again? Another question, For the first boss fight, how can I code them into there? it keeps "hard coding" steiner into the battle and no one else. Any ideas? I know it can be done cuz ive seen on youtube but idk how :/
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: froggy25 on 2016-05-29 14:24:11
I'll be sure to contribute if you create a GitHub project for hw :)
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-06-04 09:26:18
Tirlititi have you given up on the mod too...? You haven't been on in a while...
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Pelig on 2016-06-07 19:27:23
Tirlititi have you given up on the mod too...? You haven't been on in a while...

I hope he's still working on it. I'm waiting the steam version of HW sooo much.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: IzzacSturnburg on 2016-06-08 15:34:58
I hope he's still working on it. I'm waiting the steam version of HW sooo much.

He might have some life things to do, so I'll be patient. Doing the same stuff for long periods of time will burn out a person. So I completely understand.

He will come back to it eventually sometime.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Pelig on 2016-06-08 21:42:09
Sure, his life things have priority. No doubt.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-06-09 17:22:37
Actually, I do have an important work to do in the following month and I neglected it too much, so I won't work on HW for some time (unless there's a incredibly bad bug that can be fixed without too much effort).

Also, I lost my magic stick that makes modding games a piece o' cake  :'(

I let another WIP here, more interesting though, cause you can mod a bunch of things with it. I call it a beta release, because there will be much more bugs than usual.

Link removed ; the program has been updated in the first post

Special Warnings

Everything else should work fine, unless it is disabled, like MIPS code edition. Also, contrary to the last WIP, it should still work after a SquareEnix update.

Saving Instructions
As said, you have to backup your files yourself. The program reads a "FF9_Launcher.exe" file and ask you a folder where you want to save your modded files. In any case, never choose the folder in which the selected "FF9_Launcher.exe" lies, either create a new folder either save it in a folder containing another "FF9_Launcher.exe".

Here are the 2 safest possible choices :
1) Start by creating a backup of your "FINAL FANTASY IX" folder. When you use HW, only open the backup files and choose the non-backup "FINAL FANTASY IX" folder when you save (it's important that you keep that default name). As that's the game launched by Steam, you'll have your game directly modded.
2) Start by creating a backup of your "FINAL FANTASY IX" folder and use that backup for HW, but create a new folder somewhere else for the saving. To apply the mod, you need to replace manually the files in the "FINAL FANTASY IX" folder by the modded ones.

In any case, a 3rd backup is not a bad idea, unless you don't mind downloading the game again in case of problems.

For the wisest of you, I'll see you when I release a stable version  :P
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: IzzacSturnburg on 2016-06-09 18:05:26
Heeey nice move there Tir, That should keep people composed awhile on the wait. Sorry to hear you lost your magic stick, hopefully you find it.  Thank's for the beta release and your time. Can't wait to see it evolve in the future.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Albeoris on 2016-06-11 00:53:46
Good job! Do you change Assembly-CSharp.dll? If you don't - yes, you can apply Memoria after HW. But items and abilities data will be loaded from external CSV-tables. Otherwise, you get a checksum error.
Any ideas about integration? (:
https://github.com/Albeoris/Memoria
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: itoikenza on 2016-06-13 00:30:13
Tirlititi i can't figure out scripts. I took a look and couldn't find Starting inventory in Cargo Room/Prima Vista's script. can you show me what it looks like? it looks too much like code to me. i wish it were menu driven, but oh! well!  Finally, You said before that changing starting equips, makes the game glitch up. Is this true for psx or just steam. Now REALLY finally, can Blank,Cinna, & Marcus be given Beatrix's moveset? and Beatrix's moveset be given support abilities? Heck! even the equip ability option be enabled for her?
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-06-13 01:07:21
All of what you said is possible, even making their movesets completely customizable, except marcus bugs at treno with garnet. Problem is, as far as I know on HW I cannot get the equip for beatrix or the other 3 to be available and all skills are automatically learned..That is what I have ran into and I have no fix to it.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: itoikenza on 2016-06-13 01:12:12
oh? Marcus bugs? I can do without starting equips and custom abilities, then. Forget that! Now I wanna have a few items available from the beginning in inventory. Can you help. Tirlititi told me it's in the script, for Cargo Room/Prima Vista.

Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-06-13 07:35:31
I didn't say it was in the script (it's not). I said that it was easy to write lines in the code to replace them :
Code: [Select]
    RemoveItem( 236, 7 )
    RemoveItem( 237, 2 )
    RemoveItem( 238, 2 )
    RemoveItem( 240, 2 )
    RemoveItem( 247, 2 )
    RemoveItem( 249, 1 )
    RemoveItem( 253, 1 )
    AddItem( .... )
Put them in the main function of the first Prima Vista's Cargo Room, it's fine (out of any "if" block).

The starting equipements are in the "Party -> Stats" panel, search harder :p

As for temporary characters' abilities, uzoko stated the problem : the game doesn't allow the Supporting Abilities menu to be enabled for temporary characters. A fix for that would require to modify the equip menu's MIPS code (which is not accessible using HW yet).

Here is the fix to have Beatrix & co equip supporting abilities using an hex-editor :
1) Search for the hexadecimal sequence : 00 00 00 00 01 00 42 2c 21 28 40 00 21 20 80 02
2) The following bytes should be something like 8c d2 00 0c     (the 00 0c is important ; the 8c d2 is an offset and changes from disc to disc)
3) Replace those 4 bytes by 01 00 02 20
4) Repeat for all the discs

This allows all temporary characters to get in their "Equip Abilities" menu. However, they still automatically learn any supporting abilities you give to them (I think you'd have to corrupt the memory card saving process to fix that). Also, a few tooltips will be wrong in-game (when you press "Select" on the "Equip Abilities", the moogle tells you that you can't use them ; and the 3-stars mastery icon is not displayed on supporting abilities).
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: itoikenza on 2016-06-13 11:25:34
Thanks, Now i saw something about how if one were to link Dagger's Eidolons & Beatrix's Seiken, one would get 12 free slots to put spells anywhere? is this still true?
Here's the quote:
- Commands spell lists are also limited. You may link 2 commands to increase the limit (they would share the same spells). White Magic and White Magic+ are linked by default, as well as Black Magic and Black Magic+ but you can link Dagger's eidolons (trance and normal) and the 2 Beatrix Seikens (dunno why there is 2 of them) so you win 12 spells to put anywhere for free.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-06-13 15:25:41
[...] you can link Dagger's eidolons (trance and normal) and the 2 Beatrix Seikens (dunno why there is 2 of them) [...]

How many commands am I describing here?

No, linking Dagger's commands with Beatrix's commands is not a good idea. And yes, what I said about linking Dagger's summoning commands together and linking Beatrix's Seikens together to gain 12 spell slots still holds.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: uzoko1 on 2016-06-25 03:40:38
Hey any updates on HW for steam? I have been trying to work with Alberos on his thing, but I love your layout much better haha.
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: GARDIN on 2016-06-28 18:27:35
there is a special issue for stream HadesWorkshop_beta But the problem if you ran the program then the program shut down Then if you tried to open the game ff9  through a program HadesWorkshop_beta will not be able Except If deleted a file (hwf) and here download hades work shop beta for stream    http://forums.qhimm.com/index.php?topic=14315.msg241705#msg241705
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Tirlititi on 2016-07-22 19:57:28
This is the day !

Update to v0.34 :
 - Hades Workshop is now compatible with the Steam version of the game.

You can also use the .hws files created by HW for a PSX file and apply it to the Steam version.

Pretty much everything has been tested and works fine. However, there are the following limitations :
 - MIPS code and Battle Scenes models can't be modified,
- The battle scene of the different battles can't be changed,
 - Text opcodes are displayed raw ; that's not so different from the text tags you can find in any forum,
 - The texts may be imported from a .hws file created for the PSX version, but that's not recommended as the opcodes are not handled,
 - The fields' preloading datas are not the same as for the PSX and can't be imported,
 - Contrary to the PSX version, the spell lists in the "Command" and the "Stats" panels must match (if a character has a command, he must be able to learn all the spells inside it). The exceptions are the temporary characters' commands and Steiner's Sword Magic which don't need to be learnable,
 - The two unused item shops can't be used for now,
 - There's some bug with the fields : I think that's a RAM problem, as fields need a lot of memory to be read. If you look at too many fields without closing/reopening the program, it will likely crash. Same problem for the background batching : you shouldn't be able to export all the background images in one shot.

I write the saving instructions again as they are still valid.

Saving Instructions
You have to backup your files yourself. The program asks for the "FF9_Launcher.exe" file when opening the game, and then for a folder where you want to save your modded files. In any case, never choose the folder in which the selected "FF9_Launcher.exe" lies, either create a new folder either save it in a folder containing another "FF9_Launcher.exe".

The files created this way are intended to replace the files in the sub-folders of your "FINAL FANTASY IX" folder.

Here are the 2 safest possible choices :
1) Start by creating a backup of your "FINAL FANTASY IX" folder. When you use HW, only open the backup files and choose the non-backup "FINAL FANTASY IX" folder when you save (it's important that you keep that default name). As that's the game launched by Steam, you'll have your game directly modded.
2) Start by creating a backup of your "FINAL FANTASY IX" folder and use that backup for HW, but create a new folder somewhere else for the saving. To apply the mod, you need to replace manually the files in the "FINAL FANTASY IX" folder by the modded ones.

In any case, a 3rd backup is not a bad idea, unless you don't mind downloading the game again in case of problems.

About texts
The support for texts (in the Steam version) is quiet minimal, as the formatting is displayed as it is in the game's files. In particular, you have to write the size of the text box yourself in the 【STRT】 tag when needed, as well as the hexadecimal code to add color, etc...
As said, you shouldn't import the texts from PSX-saved .hws (just unckeck the related boxes), as only the text will be imported and the opcodes will be lost. This is particulary important for text blocks as the game bugs if the texts there don't start by the 【STRT】 tag.

The text preview window doesn't display the opcodes' effect either for now.

Also, there's a special UI text block, called "Localization", which contains generic texts of all the languages available. I let you guess how to properly modify them, but know only that the texts here must be single-line (use the escape character '\n' if you want to add a new line). Also, the format is so easy that the devs themselves messed up with it and there are a few help texts that don't work the intended way :p (I'm thinking of the "OrderTargetHelp" field, which doesn't work in languages other than english and japanese).

About localization
You're asked to choose language when you open the game files. In general, your mod will work only for the chosen language.
More precisely, there are files that are shared by all the languages and files that are not. In this second category, there are all the texts, off course, but also the game's script (AI of enemies, World Map scripts and Field scripts). If you either change a text or a script, it will be ok only for the chosen language.

Handling several languages at once will surely be possible in the future.


What's next?
I'll upload the program's source code on github and create a community project for that. I'll also import my mod Alternate Fantasy to Steam. Don't hesitate to ask if you have troubles importing your own mod to Steam.

I also have a project idea of a Boss-rush mode. It's an idea I've had since a long time, but the 4 discs of the PSX and the preloading system was problematic.

I'll also soon improve a bit the script editor (again) and allow to add entries (and not just functions) ; you'll then have full control over the NPC and so a real mod including Beatrix as a playable character (consistent story-wise) will become possible.
A CIL code editor, similar to the MIPS editor, is also planned. I don't think I'll implement a "CIL <-> C Sharp" converter, but since there are other tools doing that, it'll undoubtly be more simple and more efficient to use.

Fiou, I think I said everything I wanted... Enjoy and see you soon !  8)

EDIT : I forgot to say that there's no check about the file access rights. Verify that HW has the write to read and/or write the files you're manipulating with it or it may crash (or worse, it may bug without telling you anything !).
Title: Re: [FF9] General editor - Hades Workshop (0.33b)
Post by: Vir on 2016-07-22 21:08:39
Congratulations, Tirlititi, and thanks!
Title: Re: [FF9] General editor - Hades Workshop (0.34)
Post by: Pelig on 2016-07-23 08:55:52
Best day of my life ;)
Title: Re: [FF9] General editor - Hades Workshop (0.34)
Post by: vivigix on 2016-07-23 16:54:05
Thank you very much for your job, Tirlitity!!!!!

I have a questions. Are limitations still works? I mean 192 spells total and 48 ability slots for one character or now we can exceed them?
Title: Re: [FF9] General editor - Hades Workshop (0.34)
Post by: Tirlititi on 2016-07-23 17:51:22
The limitations of texts, scripts, number of enemy attacks or groups are no more.
The others are still there. The ones you're talking about are hardcoded in the game, and I mean really hard coded. It would require to rewrite a big part of the game's engine and the game's script to change these numbers. I don't think that'll ever be possible :/
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Gine on 2016-07-24 16:57:08
I'm very glad that it works very well even in thai language.

A big thanks to you. :)
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-07-24 16:59:29
You're welcome, Gine :)

Update to v0.34b :
- Fixed the crash that occured sometimes when you are writing texts or when you use incomplete tags,
- Fixed a bug with the .hws saving of item texts, resulting in loss of data inside the .hws,
- Fixed a crash when editing the preferences (they are not useful for the Steam version yet however),
- Fixed various other minor bug,
- You can now add/remove script entries, thus NPC on the field.

When adding/removing entries, the script will be updated so that functions still refer to the right entries. If an entry is deleted but was still used in the script (if it was initialized in the "Main" function, for instance), the reference changes to the "Main" entry and a warning will be prompted.

So, how do you handle NPCs and the PC with this?

A model on the field is linked to an entry. I will only discuss of the case when there is only 1 model per entry, but using the UID, one can have several models on the field handled by only one entry.
An entry linked to a model must be of type 2 and initialized with an "InitObject" call in the main function.

To create a new NPC (not for Beatrix, see below), you must create a new entry for it. In the field panel, choose "Edit Entries" and add a new one with the entry type 2. By default, the created entry will have the ID number 1 (and the entries that were already there are displaced except for the Main entry). Its ID is its position in the list.

Then, to create functions for this NPC, choose "Edit Script", right-click on the list in the left, then "Add", then choose the created entry and set the function type to a number depending on the function's purpose (let the mouse on the "Function Type" field to have a list of specially handled function types).

It can have several useful functions.
1) The Init function
This is the one defining the object's 3D model as well as its position on the field, animations and such... A standard Init function looks like this for an object's entry :
Code: [Select]
Function ManA_Init
    set VAR_B10_0 = 58
    set VAR_B10_4 = 65163
    set VAR_B10_6 = 192
    set VAR_B10_2 = 65518
    SetModel( 111, 100 )
    CreateObject( VAR_B10_0, VAR_B10_4 )
    TurnInstant( VAR_B10_6 )
    SetStandAnimation( 555 )
    SetWalkAnimation( 599 )
    SetRunAnimation( 598 )
    SetLeftAnimation( 597 )
    SetRightAnimation( 601 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 64, 1 )
    EnableHeadFocus( 0 )
    SetObjectLogicalSize( 1, 40, 150 )
    return
The first numbers are the object's initial position (the coordinates X, Y, the facing angle and then the Z coordinate respectively). For the "SetModel" code, a list of known model IDs is available ; note that the model gives its name to the entry, so the model 111 is "ManA".
Unlike the PSX version, the Steam version can use any model any time. The animations, however, must match with the model. As there is no list of animations yet (if you want to help doing one, that would be cool ^^), you'll have to grab the animation ID from other field scripts, where you know that the animations you seek are used.
It seems that there's no need to add the animation in the "Preload" list of the field. I don't actually know that list's purpose then.

2) The SpeakBTN function
This one is executed when the player approches the model and speaks to him. A standard SpeakBTN function looks like this :
Code: [Select]
Function ManA_SpeakBTN
    ifnot ( IsMovementEnabled ) {
        return
    }
    set VAR_A6_158 = 0
    if ( VAR_A6_159 == 1 ) {
        DisableMove(  )
        if ( VAR_A6_144 == 0 ) {
            DisableMenu(  )
        } else {
            Wait( 1 )
        }
    }
    0x27( 127 )
    TurnTowardObject( 250, 32 )
    WaitTurn(  )
    WindowSync( 0, 128, 199 )
    set VAR_A6_158 = 1
    if ( VAR_A6_159 == 1 ) {
        if ( VAR_A6_156 == 0 ) {
            EnableMove(  )
            0x27( 255 )
            if ( VAR_A6_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    return
If the player is in a cutscene, we don't want him to be able to speak with the NPC that he's facing, thus the "IsMovementEnabled" check. The following 10 lines are standard for everytime the game removes the control from the player, and the last ones are their counterpart to give it back. The "TurnTowardObject( 250, 32 )" forces the NPC to face the player's character, and the "WindowSync" displays a bubble of dialog.

The same kind of function can be made with the CardBTN function but using a "TetraMaster" line of code instead of the "WindowSync" line. For chests, the SpeakBTN function is perfect to allow the player opening the chest and taking the item inside.

3) The other functions
The other functions are used for the rest of the NPC's behavior. The Loop function often ends by the two following lines.
Code: [Select]
Wait(1)
loop
Which means that the function is executed every frame. There's a Range function that runs when the player's character comes in range of the NPC but don't necessarily speaks to him.
And all other, numbered, functions can be used by the previous ones or by other part of the field's script. They may be used for a tiny part of a cutscene, or a special movement such as a jump, non synchronised dialog (ie. dialog bubbles that are displayed while the player still has the control on his character), or one-time walks...
Note that the cutscene scripts are often writen in a Loop function :
- Either the Main_Loop function is used, manage the cutscene's progression and calls parts of the NPC's script,
- Either the Loop functions of NPC and/or PC are used and comunicate with each other using variables.

NPC models corresponding to a Party's member

There is a special case of entries that normally are present in all the scripts of the game (even if most of them don't have any function and thus are invisible). Indeed, the last 9 entries are each assigned to a potential member of the party, namelly
Zidane,
Vivi,
Dagger,
Steiner,
Freya,
Quina or Cinna,
Eiko or Marcus,
Amarant or Blank,
Beatrix

These entries have nothing special - you can use any model you want, for instance - but one thing : they can be refered to with special entry IDs and be used if they are in the player's team.
For instance, if the following lines are present in Main_Init function, then up to 3 of these entries will be initialized accordingly to the characters in the player's team :
Code: [Select]
InitObject( 252, 0 )
InitObject( 253, 0 )
InitObject( 254, 0 )
They can then be refered using the same special entry IDs for cutscenes and such. An example of use can be found in the script of the field "Oeilvert/Planetarium". In the function "Zidane_17" of this field, there's the cutscene when Zidane reads terran letters and the present characters are amazed. The different calls of "RunScriptAsync( ..., 252, ... )" are used to handle the reactions of the 2nd party member, whoever he is, at the different points of the cutscene.

So, in order to implement Beatrix in these cutscene, you need to create functions for her. Add a new function of type 0 chosing the last of the entries, then write the Init function :
Code: [Select]
Function Beatrix_Init
    set VAR_B10_0 = 364
    set VAR_B10_4 = 63977
    set VAR_B10_6 = 252
    set VAR_B10_2 = 65456
    SetModel( 204, 100 )
    CreateObject( VAR_B10_0, VAR_B10_4 )
    TurnInstant( VAR_B10_6 )
    SetStandAnimation( 2978 )
    SetWalkAnimation( 2975 )
    SetRunAnimation( 2981 )
    SetLeftAnimation( 2980 )
    SetRightAnimation( 2974 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetHeadAngle( 104, 48 )
    return
Replace the first numbers by coordinates (or you can remove those 4 lines and put the coordinates inside the "CreateObject" and "TurnInstant" lines).

With this, Beatrix will be created for this kind of cutscene if and only if she is in your party. You may also need to hide her in the Init function because she shouldn't appear before the cutscene. The line "SetObjectFlags( 14 )" does that.
Then you need to create other functions corresponding to her behavior during the cutscene. Look at the numbered functions for the other characters and create functions for Beatrix with the same ID (type) and with a similar pattern (adapt the dialogs and animations, off course).
By the way, you can add a new text in the corresponding text block beforehand with a right-click on it.

Once everything's done, don't forget to parse your functions and save. Congratulations : you have created cutscene elements for Beatrix !


PS. : contact me if you want to be part of the Github project.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: GARDIN on 2016-07-26 22:12:42
wooooow amazing i love you Tirlititi really thank you
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: IzzacSturnburg on 2016-07-27 15:04:12
Woah nice update Tirlititi~ i missed quite a bit this month it seems. Welcome back from your hiatus, So close to editing skills all the way through! I am impressed with your work as always, tried to edit skill in the ability branch of party and it crashed. But in do time!  I appreciate all your efforts and hardwork~ Love that i can finally add accessibility to the weapons finally to~
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: vivigix on 2016-07-29 16:19:49
Tirlititi, I have a question. I hope you can help me. Steam version has all 4 discs’ data, that means we have all data for access. Could we create mod witch make possible take access places we couldn’t visit after events at Branbal at Terra (the 4th disk)?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Gine on 2016-07-30 09:25:30
I got crash when import environment text but perfectly fine with UI text.

It occur with untranslated text to.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-07-30 12:48:41
Thanks Guardin & IzzacSturnburg :)

@Gine: Ok, thanks for reporting the problem. I'll see what it is (I also plan on making a more complete text support in the next version).
However, I have a few other projects related to FF9 before updating Hades Workshop. I don't think a new version will come out so soon.

@vivigix: You can indeed make those places available in disc 4. For most of them, that's in the World Map's script of the disc 4 you have to unlock things.
But there are two problems:
1) The Iifa roots will still be there, apparently blocking the access. You can't remove them (it would require changing the world's 3D model and pathing).
2) It seems that the event positions allowing you to enter places are also coded in the pathing. The positions where the "!" appears to enter the Observatory Mountain, for instance, is not present in the disc 4 World Map (I mean there's nothing special here).

To solve this 2nd problem, you have to code your own "place entering script". Here is how I would do it:
● At the end of the "Main_Loop" function (before the Wait) of the World's script, add some lines like those:
Code: [Select]
if (( VAR_B6_24 == 100 ) && (World_CurrentTransport==0) && ((MV_WorldPositionX12 - POS_X) <= 30000L) && ((POS_X - MV_WorldPositionX12) <= 30000L) && ((MV_WorldPositionY12 - POS_Y) <= 30000L) && ((POS_Y - MV_WorldPositionY12) <= 30000L)) {
    set VAR_B6_39 = PLACE_ID
    RunScriptAsync( 6, 1, 11 )
}
where (POS_X, POS_Y) is the place's position (that's the hard thing to get) and PLACE_ID is the corresponding ID in the following table:
Spoiler: show
IDPlace NameRelated Function
1Alexandria HarborMain_38313
2AlexandriaMain_38301
3Evil ForestMain_38809
4Ice CavernMain_39061
5Quan’s DwellingMain_40109
6TrenoMain_40353
7South GateMain_39829
8South GateMain_40085
9South GateMain_39825
10South GateMain_40077
11South GateMain_40333
12Ice CavernMain_39569
13Observatory MountainMain_39049
14DaliMain_39305
15North GateMain_38789
16North GateMain_38781
17Gizamaluke’s GrottoMain_39289
18BurmeciaMain_38521
19CleyraMain_38765
20Chocobo’s ForestMain_40329
21Gizamaluke’s GrottoMain_39801
22Qu’s MarshMain_40309
23Pinnacle RocksMain_41589
24Lindblum Dragon’s GateMain_40817
25LindblumMain_41330
26Lindblum HarborMain_41581
27Earth ShrineMain_35729
28Desert PalaceMain_34965
29Mognet CentralMain_33669
30Qu’s MarshMain_35197
31Black Mage VillageMain_35705
32Fossil RooMain_35953
33Conde PetieMain_35697
34Madain SariMain_34417
35Conde Petie Mountain PathMain_34669
36Conde Petie Mountain PathMain_34921
37Iifa TreeMain_35169
38Chocobo’s LagoonMain_41801
39Wind ShrineMain_40001
40DaguerreoMain_41005
41Qu’s MarshMain_40229
42OeilvertMain_39217
43Landing SiteUnused (For Hilda Garde 1 landing)
44Water ShrineMain_37661
45Ipsen’s CastleMain_36377
46Qu’s MarshMain_36649
47Shimmering IslandMain_35385
48Esto GazaMain_34605
49Fire ShrineMain_33601
50Chocobo’s ParadiseMain_33029
51  ? 
52  ? 
53  ? 
54MemoriaMain_35169
55Chocobo’s Air GardenWorld_Chocobo_20
56Chocobo’s Air GardenWorld_Chocobo_20
57Chocobo’s Air GardenWorld_Chocobo_20
58Chocobo’s Air GardenWorld_Chocobo_20
59Chocobo’s Air GardenWorld_Chocobo_20
60Gizamaluke’s GrottoMain_39553

When I say that the "place entering script" is not present in the 4th disc WM, I mean that the related function in the table above doesn't exist and creating one won't work (I just tested that). So you can't use the related function unfortunatly.
● The rest should be handled fine by the script system in place (setting "VAR_B6_39" launches the machinery).
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: rhadamants on 2016-08-06 22:30:47
I have an old patch that did for the PSX version and now that released the STEAM version I want to extract the text of this patch to review and put in STEAM version. But it is giving error when I click Environment to extract the text.
Can someone help me?

Patch PPF to PSX version:
https://drive.google.com/file/d/0B-L82uP4sSErdVczVW4tYTBtLU0/view?usp=sharing (https://drive.google.com/file/d/0B-L82uP4sSErdVczVW4tYTBtLU0/view?usp=sharing)
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: BaconCatBug on 2016-08-10 13:29:15
Yo, this tool is amazing. Just wanna get that out first. :)

Is there any chance of being able to make certain UI elements manually resizable? I have a lot of screen estate to work with and having it all bunched up in the top left corner doesn't help. :( http://prntscr.com/c3yrjh Even just being able to expand the name list sideways and the field picture diagonally would be a huge increase in usability.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: uzoko1 on 2016-08-14 16:01:33
Hey, so noob question. When I open HW.. what file am I opening in steam? I went to the steam folder of FFIX but cannot find anything to open  :/
woops kept opening the old HW...now im just figuring out how to change Blanks skills again
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-08-17 20:34:33
Tirlititi, how the heck does one make a ppf outta Hades' edits? An "ALL CHANGES" .ppf. not just what is edited after last save?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-08-18 07:49:08
@ rhadamants: I'll check the file batching for the next release. Thx to point out the problem.

@ BaconCatBug: hopefully it will also be doable in the next release. I'm not sure yet how you'll be able to do that (either you'll have to modify the IL script, which is kinda like assembly, either you'll have a more practical tool for that).

@ Itoikenza: you have two options for that. Both of them require the original (non-modified) binary file.
1) Using HW : Open your modified binary file with Hades Workshop and go to all the panels so that data is loaded. After that, replace your modified binary file (which is still opened in HW) by the original game file. Finally, go to "Tools -> Mod Manager" and tick all the boxes you find necessary. Exporting the changes as .ppf will then create a .ppf with all the changes done from the original game.
2) Using MakePPF : download this tool (http://aminet.net/package.php?package=util/misc/makeppf_aos4.lha) (created by the guy who invented .ppf) and create a .ppf with the original file and the modded one. It is a command-line program so you need to open a cmd window (there are plenty of documentation about command-line programs on the web).
IIRC, the command's syntax is
makeppf.exe c -u -d "description here" [original bin] [modified bin] [created ppf name]
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-08-18 09:11:52
Quote
After that, replace your modified binary file (which is still opened in HW) by the original game file...
I don't have HW in front of me now, can you elaborate via a video or gif? Or more details? I just simply go to File then Open? Then it'll open vanilla right next to modified?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-08-18 09:20:18
Nop, you replace the file on your hard drive.
Let's say your original game is named "FFIX.bin" and modded game is "FFIX_Mod.bin":
1) You open "FFIX_Mod.bin",
2) You do all the stuff with panels and Mod Manager,
3) You rename "FFIX_Mod.bin" to something else and rename "FFIX.bin" to "FFIX_Mod.bin",
4) You export the PPF.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-08-18 09:26:52
I see, Thanks! I had a sneaking suspicion that HW, would be more likable for ppf makin'... Nao! if only you'd make my dreams come true and make HW able to mod ff8 and Chrono Cross?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-08-18 09:45:32
Haha lol

Unfortunatly, I'm afraid that will never happen out of your dreams ^^"
There are other tools to edit FF8 (dunno about the Chrono series) ; it would be strange to use only 1 program to modify all of Square's games.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-08-18 09:48:42
No, do it! Nao!
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: BaconCatBug on 2016-08-20 23:43:53
Is it possible to get a Hades Workshop steam mod and Memoria to work together? I'd really like to be able to make the speed boost 2x instead of 5x but also to use a rebalancing mod. :( If it's not possible, obviously that's fine and i'll live with it. :P
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-08-22 16:13:47
No, it's not possible at the moment.
Hopefully it will be possible someday ; or at least include Memoria's features (all of them) in HW.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: resinate on 2016-08-24 07:16:10
hey Tirlititi, can u make a beta version, can u set the Max hp above 65k, i think steam version can bypass this limit. i found this when using a tent on a boss it heals above 9999

also tool crashes when u load up steam version and click on stats tab.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: IzzacSturnburg on 2016-08-24 14:58:51
Heya Tirlititi just checking in~  I'm anticipating the next release so i can go further into skill editing.   Again i thank you for your hardwork~ looking forward to it. Big fan
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: dclem on 2016-09-27 02:42:51
Hi! I'm am trying to edit the Battle spots of enemies locations in the Environment section, but it doesn't seem like its working. does each battle spot correspond to each section of gaia and include dungeons? Can't tell, the text to the right only says: "Alexandria Castle, Hidden passage's lower level" on the steam version.
Also, can Hades workshop export model data along with battle scenes? Models like monsters, eidolons etc. on the psx version?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: miruss89 on 2016-09-27 02:46:47
hey Tirlititi, can u make a beta version, can u set the Max hp above 65k, i think steam version can bypass this limit. i found this when using a tent on a boss it heals above 9999

also tool crashes when u load up steam version and click on stats tab.

Yup happen to me also, steam version crash when on stats tab
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-10 12:44:18
Hi.
I just moved to a country I don't know the language yet, so I don't work on HW so much these times. I have a sparse internet also.

I'll check about this crash. Since v0.33 or so, I experience random crashes at times and I don't know the reason (one of them is the extensive use of RAM the field panel asks, but that doesn't explain everything).

@ dclem : The battle spot isn't working on the Steam version yet ; it did on the PSX version but Steam has another way to handle that, not so convenient for me.
HW can't export the models other than the Battle Scenes (and then, it misses a few stuff like the Crystal in the related scene). However, there's this tool (http://forums.qhimm.com/index.php?topic=15957.0) that can do that (about spell effects, only a few are handled, not eidolons). You need to extract the .img for the PSX version but that's not a big deal and it worths it.

@ Resinate : no, the Steam version can't bypass this limit. I don't think I'll ever make it so it can be enabled : though it is in the horizon of possible things to make the HP a 4-bits number (if you look very very focused to the horizon), the technical obstacles are really annoying (the Steam version doesn't help there).
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-10 20:01:27
Any news about extracting and inserting the backrounds, Tirlititi?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: gledson999 on 2016-10-11 00:20:45
It's possible extract text from ppf files?

I want extract to fix something from that PPF?, because the translation was finished in 2006.

link: http://romhackers.org/modules/PDdownloads/singlefile.php?cid=25&lid=258 (http://romhackers.org/modules/PDdownloads/singlefile.php?cid=25&lid=258)
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-11 07:10:58
@ Fraggoso : You can already export the backgrounds, you can't import them back. It won't be ready for the next release but maybe for the one after that (or if someone else does that ; the project is on GitHub !).
But since you can export them already, someone can start reworking them. I didn't see anyone doing that yet.
Also, Aelrobis seems to be making some work about it currently (Export/Import). I don't know whether he'll be able to change the resolution or how his solution will be conflicting with HW though.

@ gledson999 : That's likely not possible to do that directly on the .ppf as the text are not stored very consistently in those files. You can try a search using an hexadecimal editor but you are not guaranteed to find the text and you can't change it to a text with another size.

Here is a solution that should always work :
1) Make a .hwf scan on a non-modded game (or surely you have one already),
2) Apply your .ppf to a game,
3) Rename your .hwf scan with the same name as your modded game,
4) Open HW and your modded game with it ; there should be no scan (since you provided it) and it should display the modded datas,
5) Fix your text stuff,
6-Optionnal) You can take the opportunity to go to the "Mod Manager" tool, check all the boxes corresponding to modded aspect of the game, and then use "Save Mod" to have a .hws version of the mod.
7) Save as a .ppf, then close HW, then apply the .ppf to the modded file,
8) Now that you have the modded game with all the right modifications, you can use makeppf.exe (http://aminet.net/package.php?package=util/misc/makeppf_aos4.lha) to create a .ppf file.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-11 19:58:46
@ Fraggoso : You can already export the backgrounds, you can't import them back. It won't be ready for the next release but maybe for the one after that (or if someone else does that ; the project is on GitHub !).
But since you can export them already, someone can start reworking them. I didn't see anyone doing that yet.
Also, Aelrobis seems to be making some work about it currently (Export/Import). I don't know whether he'll be able to change the resolution or how his solution will be conflicting with HW though.

I can't seem to find the exporter for it. Can you pinpoint me into any directions (i presumed it's in HW directly but also I can't find it)?

Edit: Found it!

Edit 2:
After exporting a BG I noticed that a lot of alliasing is going on around some objects.
e.g.
(http://fs5.directupload.net/images/161011/temp/rc2ssepg.jpg) (http://www.directupload.net/file/d/4505/rc2ssepg_jpg.htm)

Is there any way around this?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-12 07:42:05
I saw that too. This alliasing is in the image's data and appears in-game :
(http://img110.xooimage.com/files/9/e/a/lol-4f23eac.png)
For some reason that I don't really understand, it's much less visible in-game than there. The file format of images have a documentation, so I'm pretty confident that, color and transparancy-wise, I export the right images. Either Steam's version uses a slightly different file format, either it improves the rendering when it displays the layers.
If you remove those alliasing, that can only improve the quality.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-12 20:37:22
What you're referring to is normal if you work with layers and transparency especially in an old PSone Game.
The export suffers from some weird artifact patterns which is not present in game. Like I said, what you describe is normal transparency issues.

The PSone doesn't have those artefacts:
(http://fs5.directupload.net/images/161012/temp/25dyxim3.jpg) (http://www.directupload.net/file/d/4506/25dyxim3_jpg.htm)
I don't know how to remove those artifacts in a reasonable manner. We're talking 817 pictures. ^^

On a quick note: On the PSX File you can select which pattern to export. In the above these are the bells for an instance. In this example all bells are layered on top of each other.
I couldn't find such an option on the steam version. Is it missing? ^^

Edit:
The Steam Pictures seems to be 2x the size of the PSX File.
If I double the size from the PSX backgrounds and apply my filters, they look way better then applying the filters to the Steam background.
http://screenshotcomparison.com/comparison/187711

Of course this is only a test as I need to adjust the filters.
Would it be possible to export all PSX Files, filter them and use those to insert later on? If yes I would gladly to the whole thing.

Edit 2:
What would be the best way to work on the images so we/you can easily import them later on?
I extracted the PSone Image, scaled it x2 and applied my filter and saved every layer individually. I did this because I think it's crucial later on that the layers from the import match those 1:1 from the export?
If I have the answer I can start right away as I have setup my pipeline the last night.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-14 15:48:10
One question Tirlititi:
Do you think it's possible to find the flag to alter the FPS on the FMV's?
I've several FMV's in beautiful 30 FPS here (interpolated but still it looks in my opinion way better then the 15 FPS >.<) but after switching them out, the engine still forces them to play at 15 FPS.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-14 16:15:04
Well, I don't know about these artefacts. I'll look into it but don't hope for a fix too soon :/
You don't have access to the "background viewer" in the Steam version, thus you can't choose which layers (called Tile Blocks in the program) you can export at one time.

It will be possible to import to the Steam version upscaled backgrounds that you got from the PSX version.

I don't know in what format the images will be best for importation. As said, either 1 file per layer or 1 file per background (with all the layers inside). The problem is that I'm not an expert in the image formats. Most of them don't seem to support multi-layered images. I found the .tiff which could do that (but it's not supported very well by Photoshop from what I heard) and I don't know about the others. I would like to avoid editor-specific formats : I know that .xcf supports several layers and a bunch of other features, but it's Gimp-specific for instance.

To be more precise about the format of the Steam background images (I'm writing that from memory, so there might be inaccuracy) :
- Each file contains a bunch of tiles, that is a 36x36 pixels square (compared to 16x16 for PSX).
- However, there is a border of 2 pixels on each side of the square that seem unused (maybe they correct that alliasing thing?), so the used tiles are of actual size 32x32.
- All the pixels are not fully specified with a RGBA value : the 36x36 square is split into 4x4 squares which share a RGB value with possible variations on each pixel (but restricted).
- The tile sorting/layering into Tile Blocks are done in other files, which were extracted from the PSX version and were not modified at all.

So the format is a bit compressed compared to a full specified bitmap file of the same size/resolution (because of those 4x4 squares). I didn't try nor dig anything yet about where those are handled in the game's code. I don't know :
1) If I can remove that compression,
2) If I can enable other resolutions.
Ideally, I can do both, but one of them only will be sufficient to import your upscaled files from the PSX version without loss of quality.

EDIT : About FPS, there's a limit set in the game's code (one limit for menu, one for World Map, etc...) that can easily be raised to 30 or 60 FPS. I don't know if it will need changes at other places but eventually, I'm quiet confident that it won't be too difficult.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-15 13:50:05
For the time being I wouldn't stress that much about those artifacts.

The export from the PSX is way better. The steam backgrounds were only upscaled using an interpolation filter, which really worsens the filtering I use on them.
My main “struggle” is, that I don't know how you plan to do the reimport. ;)

I can extract either one image with ALL layers intact (even the ones which are moving) and get them filtered nicely and save them as a tiff again so we retain all layers in one image.
Memory wise it would be maybe better to use the extension ORA. It’s very convenient as it saves as one file but if you open it with 7 zip all Layers are saved as a png in a Data subdirectoy.
This is not manageable by Photoshop (although a converter could be used I guess) and it could lead to problems as the layers don’t have names but numbers like 001 – 013.png

Okay here goes the final question:
If I need to rearrange all Layers from the import 1:1 to match the export (also by name?) then I'll start right away. I will rip the backgrounds with all moving tiles (doors, flags etc…) in one image with a bunch of Layers. The problem here is that my Gimp shows the Layers as German names like Seite 1 which is Site 1 in US. This is confusing to me as I used my US/NTSC FFIX to rip the background.
But I don't know if things get too complicated…? ^^

You could also implement the import as a psd. The file format is afair well documented and Gimp can load psd files as well, so the coverage is very good.
If you have anything to mention further, please do so as at the moment this will be a really big task as it is and I don’t want to break anything or in the worst case wasted time on both ends. ^^

Maybe it would be good if we could test one background before so we/I can use that as a basis and get the things off the table which hinders the import.

The images vary in size: ORA has the best with 2.76 MB, Tiff with 4.28 MB opposed to a whopping 6.7 MB PSD.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-16 12:15:14
I've finished ripping all backgrounds into separate folders containing one tiff with all layers.
But something doesn't look right in some backgrounds:
(http://fs5.directupload.net/images/161016/temp/x8tnc7fl.jpg) (http://www.directupload.net/file/d/4510/x8tnc7fl_jpg.htm)

This is taken directly from disc 1 "Burmecia/Palace" the third of them.
The rain really looks broken to me. These instances don't happen as often.

I only saw it on 2-3 images so it's not big a deal but still, something must be done or else those can't be filtered properly all tough I could filter the base image (without the moving broken rain of course ^^
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: resinate on 2016-10-16 20:38:44
btw guys for the higher fps, just use CE and scan for 15 fps in world map or 30 in town. scroll all the way down to bottom u should see XXXXXXXX-XXXX 16 numbers/letters set it to 60 check box.

also any word on the ability for higher than 65k hp on steam version.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-18 20:28:23
Quick update: I've finished more than 40 Backgrounds with all the filtering and separating the Layers etc... and I got my process really down.
I'll work further on it after Tirlititi finished the import so I can know if this works and/or need tweaks at my end. But I'm very confident that all the filtering really shouldn't take that long. :)

Keep up the fantastic work, Tirlititi. ^^
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: blahitzmunchii on 2016-10-29 02:48:50
hey is there any reasons for,the steam version freezes when i click on the stats tab?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-10-31 00:30:41
hey is there any reasons for,the steam version freezes when i click on the stats tab?

I just tried it and it works on my end.
Did you try with version 0.34?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-31 08:38:07
Hi everone, version 0.35 is now available :
- You can now poorly modify the IL script code (more details below),
- In the same panel, the feature called "Macro" allows to do pre-generated IL script modifications. For now, only two are availables :
--- Unlock Ability Learning for Beatrix : allows Beatrix to learn abilities like a regular character and to use supporting abilities (more below),
--- Disable Cheats : remove the booster features of the Steam version. The speedup is still available but it also speeds up timed game phases, like Hot & Cold or the 30 minutes Alexandria event.
- Fixed the export/import text batching,
- Fixed several bugs in scripts edition (when I say "script" alone, I mean the field/World and enemy AI scripts).

Two notes about IL scripts :
1) It is an assembly-type script, so it will be very very hard to decipher (plus, as said, the way HW displays it is not the best...). I can't imagine someone doing proper things if he doesn't have the source/decompiled C# code to compare with.
2) The list of IL instructions can be found here for instance :
https://en.wikipedia.org/wiki/List_of_CIL_instructions
IL and CIL are synonymous.

One of the most useful IL type to look at and modify must be "btl_calc" : every methods of this type are useful. It contains the same battle mechanics as the available MIPS code in the PSX version : damage calculations, status adding, special spell requirements... I modified a bit a version of the these methods to make it a bit more convenient (I changed the names of those "CalcSub" methods). You can find it here :
https://dl.dropboxusercontent.com/u/98687557/Resources/BtlCalc.cs

About IL Macros, they modify one or several methods ; if you modify those methods yourself aside of that, the related macro will not be available anymore. I'm planning on adding options for them also, so you can decide if you want to disable all the cheats or just some of them for instance. One of their point is also that they will be updated and the bugs (if any) will be fixed without for you to change everything if a bug is found for a macro.

About the "Unlock Ability Learning for Beatrix", you need to do two things so that it works : apply the macro and give to Beatrix AP requirements to her abilities (and optionnally supporting skills). She then will be like a normal character, which also means that her abilities won't be available from the start. You can make her learn her standard abilities by adding this code inside the field scripts when you recruit her for the first time :
In "A. Castle/Queen's Chamber" (the 3rd one when the fields are not sorted alphabetically ; there are functions with "Queen_Brahne" and "Bandersnatch" in the list on the left),
In the function "Beatrix_Loop", go at the very bottom of the function, there is a line "Battle( 0, 916 )" which is the battle against Bandersnatch.
Add these lines right before that battle :
Code: [Select]
        LearnAbility( 8, 149 )
        LearnAbility( 8, 150 )
        LearnAbility( 8, 151 )
        LearnAbility( 8, 152 )
        LearnAbility( 8, 2 )
        LearnAbility( 8, 5 )
        LearnAbility( 8, 6 )
        LearnAbility( 8, 10 )
        LearnAbility( 8, 14 )
        LearnAbility( 8, 16 )
        LearnAbility( 8, 19 )
        LearnAbility( 8, 24 )
Then parse and confirm.

Also, I checked and you can use this macro for the same purpose on Marcus, Blank and Cinna (if you give them abilities to learn). Their ability AP progression will even be conserved if you save/load the game, but, judging from the source code (maybe gjoerulv can confirm that, or someone tests it), they will be saved on the ability AP slots of the corresponding regular character : If Marcus learn abilities in disc 2, Eiko will have abilities learned as soon as you recruit her.
The script opcodes "LearnAbility" and "UnlearnAbility" should do the trick for that.
Beatrix has not this kind of problem since she doesn't share her character slot with someone else. Her ability learning progression is saved properly.

About the "Stats" panel bug now...
I wasn't able to reproduce it, but I think I know where it comes from : you somehow don't have the same Assembly-CSharp.dll as me.
You may try to reinstall FFIX to fix that problem (don't forget to copy your saves and such). I will need to fix it anyway because I don't want HW to be dependant on having the exact same files as the normal ones. I spent quiet some time trying to fix that already, though...
If one of you three who have the bug can check something for me :
- Check that you can go to the "CIL code" panel and that if you apply the CIL macro "Unlock Ability Learning for Beatrix", there's no bug (the tool doesn't crash, can save the Steam mod and the works will run fine (check up to the Main Menu screen)).
- However, if you apply the other macro "Disable Cheats", then check that it won't work (either HW crashes when you save the Steam mod, either the game crashes when you launch it afterward).

If both checks goes how I think, then I know why the stats panel bugs.

About field backgrounds, I've tried to adjust the alpha channel (despite it was adjusted according to the standard picture format, which is called DXT5 btw). I think it's a bit better now but it's still far from clean. I couldn't find why it's not the same as the in-game pictures, but that may be related to how they draw it. Each tile is actually, unlike for the PSX version, used for UV mapping and the background is rendered as a 3D model composed of planes one behind the others.

I think the next release will be a bug-fix for this stat panel thing. I will try to add a few more macros as well : if you have ideas, toss them at me !
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-10-31 10:04:17
I have a idea/request? Remember how I wanted to edit "Change"? To be a custom movelist? Have at it! Macro Style! Please Tirlititi? PSX ver. Of Course!
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: vivigix on 2016-10-31 11:56:28
itoikenza you are asking too much,  Tirlititi already took maximum of PSX version.

Tirlititi Thank you for your job.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-10-31 15:48:45
Thanks Vivigix.

Well, that's a valid point, even for the Steam version. It will require to modify the btl_cmd types only, I think.
If you're lucky, I can find out where the related MIPS code lies (I'm sure it is in the editable MIPS code somewhere... I only got to find it in an assembly code of 78710 instructions :D). Then I can give you a .hws file (I'm not planning to make macros for MIPS, no ^^").
Which PSX version are you using again? The US?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-10-31 15:56:14
the US one, Tirlititi. Thanks for considering!
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Baby5 on 2016-10-31 19:45:48
Hi everone, version 0.35 is now available :
- You can now poorly modify the IL script code (more details below),
- In the same panel, the feature called "Macro" allows to do pre-generated IL script modifications. For now, only two are availables :
--- Unlock Ability Learning for Beatrix : allows Beatrix to learn abilities like a regular character and to use supporting abilities (more below),
--- Disable Cheats : remove the booster features of the Steam version. The speedup is still available but it also speeds up timed game phases, like Hot & Cold or the 30 minutes Alexandria event.
- Fixed the export/import text batching,
- Fixed several bugs in scripts edition (when I say "script" alone, I mean the field/World and enemy AI scripts).

Two notes about IL scripts :
1) It is an assembly-type script, so it will be very very hard to decipher (plus, as said, the way HW displays it is not the best...). I can't imagine someone doing proper things if he doesn't have the source/decompiled C# code to compare with.
2) The list of IL instructions can be found here for instance :
https://en.wikipedia.org/wiki/List_of_CIL_instructions
IL and CIL are synonymous.

One of the most useful IL type to look at and modify must be "btl_calc" : every methods of this type are useful. It contains the same battle mechanics as the available MIPS code in the PSX version : damage calculations, status adding, special spell requirements... I modified a bit a version of the these methods to make it a bit more convenient (I changed the names of those "CalcSub" methods). You can find it here :
https://dl.dropboxusercontent.com/u/98687557/Resources/BtlCalc.cs

About IL Macros, they modify one or several methods ; if you modify those methods yourself aside of that, the related macro will not be available anymore. I'm planning on adding options for them also, so you can decide if you want to disable all the cheats or just some of them for instance. One of their point is also that they will be updated and the bugs (if any) will be fixed without for you to change everything if a bug is found for a macro.

About the "Unlock Ability Learning for Beatrix", you need to do two things so that it works : apply the macro and give to Beatrix AP requirements to her abilities (and optionnally supporting skills). She then will be like a normal character, which also means that her abilities won't be available from the start. You can make her learn her standard abilities by adding this code inside the field scripts when you recruit her for the first time :
In "A. Castle/Queen's Chamber" (the 3rd one when the fields are not sorted alphabetically ; there are functions with "Queen_Brahne" and "Bandersnatch" in the list on the left),
In the function "Beatrix_Loop", go at the very bottom of the function, there is a line "Battle( 0, 916 )" which is the battle against Bandersnatch.
Add these lines right before that battle :
Code: [Select]
        LearnAbility( 8, 149 )
        LearnAbility( 8, 150 )
        LearnAbility( 8, 151 )
        LearnAbility( 8, 152 )
        LearnAbility( 8, 2 )
        LearnAbility( 8, 5 )
        LearnAbility( 8, 6 )
        LearnAbility( 8, 10 )
        LearnAbility( 8, 14 )
        LearnAbility( 8, 16 )
        LearnAbility( 8, 19 )
        LearnAbility( 8, 24 )
Then parse and confirm.

Also, I checked and you can use this macro for the same purpose on Marcus, Blank and Cinna (if you give them abilities to learn). Their ability AP progression will even be conserved if you save/load the game, but, judging from the source code (maybe gjoerulv can confirm that, or someone tests it), they will be saved on the ability AP slots of the corresponding regular character : If Marcus learn abilities in disc 2, Eiko will have abilities learned as soon as you recruit her.
The script opcodes "LearnAbility" and "UnlearnAbility" should do the trick for that.
Beatrix has not this kind of problem since she doesn't share her character slot with someone else. Her ability learning progression is saved properly.

About the "Stats" panel bug now...
I wasn't able to reproduce it, but I think I know where it comes from : you somehow don't have the same Assembly-CSharp.dll as me.
You may try to reinstall FFIX to fix that problem (don't forget to copy your saves and such). I will need to fix it anyway because I don't want HW to be dependant on having the exact same files as the normal ones. I spent quiet some time trying to fix that already, though...
If one of you three who have the bug can check something for me :
- Check that you can go to the "CIL code" panel and that if you apply the CIL macro "Unlock Ability Learning for Beatrix", there's no bug (the tool doesn't crash, can save the Steam mod and the works will run fine (check up to the Main Menu screen)).
- However, if you apply the other macro "Disable Cheats", then check that it won't work (either HW crashes when you save the Steam mod, either the game crashes when you launch it afterward).

If both checks goes how I think, then I know why the stats panel bugs.

About field backgrounds, I've tried to adjust the alpha channel (despite it was adjusted according to the standard picture format, which is called DXT5 btw). I think it's a bit better now but it's still far from clean. I couldn't find why it's not the same as the in-game pictures, but that may be related to how they draw it. Each tile is actually, unlike for the PSX version, used for UV mapping and the background is rendered as a 3D model composed of planes one behind the others.

I think the next release will be a bug-fix for this stat panel thing. I will try to add a few more macros as well : if you have ideas, toss them at me !

Hmm...I have the stat panel crash problem every single time, and I still get it with a fresh copy of FF9 Steam. In the meantime, could you please provide a copy of YOUR Assembly-CSharp.dll so I can try replacing with that and see if the crash still happens? I think it's a small enough file. Thanks.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-11-01 07:33:36
Hold everything ! A new problem has just popped.
It seems that if you modify something in the "Items/Key Items" panels and export the mod to Steam, then the battle won't start properly in-game (either a black screen either you can see enemies with very few luminosity).

The saving/loading of .hws files seems to work fine still. Nothing's lost as long as you use that saving method.

Fixing that asap.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: itoikenza on 2016-11-01 07:50:27
Tirlititi, does the macro for giving Beatrix learnable skills work for PSX?
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Baby5 on 2016-11-01 10:20:22
Hold everything ! A new problem has just popped.
It seems that if you modify something in the "Items/Key Items" panels and export the mod to Steam, then the battle won't start properly in-game (either a black screen either you can see enemies with very few luminosity).

The saving/loading of .hws files seems to work fine still. Nothing's lost as long as you use that saving method.

Fixing that asap.

I also noticed some issues with loading .hws files from PSX version.

If I load a full Spells list from PSX into Steam, my cutscenes get messed up(they slow down extremely even under superspeed F1 and the camera does not focus on the scene, as well as weird objects appearing). For example, in the Vivi puts Garnet's white mage cloak on fire scene in disc1, Vivi and the 2 knights of pluto get into T-Position(default standing position with arms widespread) and move around weirdly.

If I load a Command list from PSX to Steam, my Sword Magic list gets completely emptied on Steiner with no way to remedy that. All save files also show as "corrupted" if I load Command list(but not Spell or other list). If I save a file with the new Command list it works fine, but then shows "corrupted" in-turn if I restore the original Command list(while my original save files get reverted to non-corrupted).

If I load a full Shop list from PSX into Steam, my shops also get messed up. For example, Cinna is supposed to sell Potions, Phoenix Downs and Tents(normal item shop) but is now selling some really advanced stuff(Diamond Sword and other Oeilvert Shop items).

Also want to mention that the "list of Status" in the Spells panel shows really weirdly when opening a FF9 Steam. For example, the first one in the list should show No Status but is actually showing Petrify+Venom+Trouble. However it acts correctly in-game and applies No Status. I copied to the status list from PSX down to note which number refers to what status for the time being...

Can someone who does not have the Stats panel Freeze bug please upload me their copy of Assembly-CSharp.dll so that I can test if the freezing problem really comes from that? Thanks.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Tirlititi on 2016-11-01 17:19:50
Check your PMs, Baby (I didn't think I would write that someday).

Yes, importing the .hws mods from PSX has issues because of the text formatting which is totally different and I don't make the conversion. If you untick the boxes "including texts", you should have no problem though (I did that for my Alternate Fantasy).

The "list of status" bug should have been fixed also.

@ Itoikenza : No, those CIL Macros don't work for the PSX version.
The PSX's basic language is MIPS : it's a set of instructions and every single PSX game uses them to communicate with the PSX machine.
For computers, there is a lot of those basic languages and CIL is one of them.
So you can't use MIPS in computers and you can't use CIL for PSX : they don't understand these languages. It's like speaking greek to a french guy, he just won't understand :D
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Baby5 on 2016-11-01 19:27:32
Okay so from testing
On a fresh copy of FF9 that was just installed with no mods(that I got from Steam)
1. HW 0.35 did not crash my Stats tab when clicked on it(compared to 0.34b which completely froze the program and Windows would say stopped working close it), but there was nothing displayed on the Stats tab at all. I could go back and forth to Spells and Stats tabs without it freezing/crashing.
2. The Status list still shows as Petrify+Venom+Trouble for No Status.
3. Both CIL Macros apply perfectly fine. There is no crash, they save just fine, they can be applied individually or one after the other(they can also be unapplied). Running the game with it just fine as well(I only loaded one save quickly so I have not checked for bugs with no cheats, but the game loads fine).

After modifying a fresh FF9 with the Assembly-CSharp.dll that I received(replacing the old file that came originally with FF9)
1. HW 0.35 finally loads the Stats tab correctly with the names and all.
2. The Status list now correctly shows No Status as the first option.
3. Both CIL Macros apply perfectly fine too, no crash.
EDIT: HW0.35 works fine with the new copy of Assembly-CSharp.dll that I received but the game does not load. It stays stuck on black screen.
Also note that my Assembly-CSharp.dll is 3967KB while the one I received is 3923KB.
EDIT again: After comparing the two files side by side in a hex editor, the content looks different. The last address in my copy of Assembly-CSharp.dll is 003DF9F0 while the one in the file I received is 003D49F0. This is probably the reason for all the freezes and weird things happening, the contents of the addresses dont match. It seems there are 2 kinds of Assembly-CSharp.dll for FF9 Steam out there.

Another bug that I get often:
There is also a crash that occurs occasionally for me right after selecting the language when opening FF9 in HW, but it does not occur every time(Windows says program has stopped running). This happens with both versions 0.34, 0.34b, 0.35(I have not tested older versions) and regardless of FF9 fresh or modded.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Ignotus on 2016-11-01 20:37:47
1. I just downloaded the latest version, 0.35, and whenever I choose to open a bin file, I get a message that hadesworkshop.exe has stopped working and it closes. I am on Windows 10 x64.
2. Is it possible to replace the in-game world map used for navigation using Hades Workshop? I mean the map that is shown when you press the [back] (xbox controller) button on the overworld areas.
The in-game map is horrendous. I can barely navigate with it because it is such low quality.
Title: Re: [FF9] General editor - Hades Workshop (0.34b)
Post by: Fraggoso on 2016-11-01 23:14:23
1. I just downloaded the latest version, 0.35, and whenever I choose to open a bin file, I get a message that hadesworkshop.exe has stopped working and it closes. I am on Windows 10 x64.
2. Is it possible to replace the in-game world map used for navigation using Hades Workshop? I mean the map that is shown when you press the [back] (xbox controller) button on the overworld areas.
The in-game map is horrendous. I can barely navigate with it because it is such low quality.

You have to open the FF9_Launcher.exe in Hadesworkshop. ;)

@Tirlititi Is it really 0.35? I can only find 0.34b on the 1st Page.
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: Tirlititi on 2016-11-02 07:57:44
@ Fraggoso : It is 0.35, I only forgot to change the thread's title (to check the version, go to "about" (F1)).

@ Ignotus : If you use the Steam version of Final Fantasy IX, then do as Fraggoso said. If you use a binary image of the PSX version, then it is corrupted because it still works (for those, at least, I'm sure there are not 50 different official versions floating around).

@ Baby5 : Thank you for the report.
The occasional crash when you select the language is troublesome ; I had this regularly, for a lot of different versions of the tool, and everytime I think I've fixed it, then another one pops up somewhere else...
In 0.35, I fixed a few of them so maybe that won't happen anymore there. However, I know for sure that the program crashes if you're browsing the "Fields" panel too long (after looking at ~120 different fields on my PC, but that should vary depending on the PC). I didn't succeed at fixing it.
The difference in size is normal. As long as there are different versions of Assembly-CSharp.dll, their file sizes will likely not match. The offsets are all internal though. There is no other file that have offsets pointing in Assembly-CSharp.dll, so that's strange your game crashes.

As a reminder : Hades Workshop can read only non-modded files. For the Steam version, only Assembly-CSharp.dll needs to be clean : the resources file and p0dataN and such can be modded as long as they still contain the normal files (they are archives). That means :
1) HW does not work if Albeoris's Memoria was applied on your game (the mods that don't change Assembly-CSharp.dll, like the Audio Fix, works fine),
2) HW does not work if you give it to read a modded Assembly-CSharp.dll even if it was generated by HW. That's why there are those saving instructions and that's why you should make .hws files ("Save Mod"), which are light files created very fast and that contain all your modifications and are portable if ever FF9 gets officially updated.

It might happen that HW successfully reads and modifies modded games, but it's luck-based and if the modded file don't differ too much.

Since Baby5 just re-installed the game from Steam and it didn't work, then either Steam distributes different versions of the game depending on something (you don't have a Japanese version, right?), either I missed an update or such. I'll re-install the game as well to check.
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: Baby5 on 2016-11-02 09:01:03
Here is a copy of the Assembly-CSharp.dll that I have
https://ufile.io/14c13

This is not modded.

If you load this one in your FF9, do you see the Status list get messed up too?
(No Status shows as Petrify+Venom+Trouble) etc.

I think this is why many people are getting the Stats panel to crash/freeze/not-load as well, we have a different version of FF9. It's not the japanese version and has no japanese language option either. It has English US UK, French, Italian, Spanish.
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: blahitzmunchii on 2016-11-02 18:13:31
hey i dont know if anyone asked this yet but is there a way to mod it so you can add blank into the party i was able to find anything.
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: resinate on 2016-11-02 19:36:44
can u add in break damage to steam version. cuz tents have break damage on heals. you tent on a boss with 65k hp ull see what im talking about its possible now
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: Tirlititi on 2016-11-03 08:24:07
Yes it is possible to add break damage limit. For tents (I also experienced it with Chakra and Pumpkin Head when I gave those skills to bosses), that's a non-intended bug. I don't know what it does in the Steam version, but in the PSX one, it displays a green 9999 even though it damages the target.
The new damage cap should be at 32767, or maybe 65535. The Max HP limit can't be increased as said.

@ blahitzmunchii : You can do the same as for Beatrix minus the fact that you need to remove Amarant from the party for that. Depending on what you want to do exactly, it may be easier with CheatEngine or such. I copy/paste a post I made a while ago :
It is perfectly possible (though tedious) to replace a character by another, minus the well-known fact that Cinna, Marcus and Blank share some data (the levels in particular) with Quina, Eiko and Amarant respectively. You can't have both Cinna and Quina in the team either, for instance. To replace a character, you can put the following lines inside scripts, at points before you can change your party (in the Hildaguard 3, for instance) :
Code: [Select]
SetPartyReserve( 4095 ) // Adjust this argument if you want fewer people
SetCharacterData( 8, 1, 255, 22, 15 ) // Beatrix
SetCharacterData( 9, 1, 255, 21, 8 ) // Cinna
SetCharacterData( 10, 1, 255, 21, 10 ) // Marcus
SetCharacterData( 11, 1, 255, 21, 12 ) // Blank
SetName( 8, 75 ) // Rename Beatrix (shouldn't be important)
SetName( 9, 72 ) // Rename Cinna (or else he's called "Quina")
SetName( 10, 73 ) // Rename Marcus (or else he's called "Eiko")
SetName( 11, 74 ) // Rename Blank (or else he's called "Amarant")
You'd need to add that kind of script anywhere the party is somehow modified to make it persistant ; or use a similar script to revert the changes if you want Quina, Eiko or Amarant back in the team.
There are bugs that can happen at some point of the game, however. During the Oeilvert part, for instance, the script looks for your party members to see which character should be present in the cutscenes. I think Eiko will be on the field instead of Marcus and so on... but for Beatrix, you need to add script animations and such specially for her.

Instructions on how to modify the scripts can be found in the following post. It is needed for Beatrix inside those problematic fields like at Oeilvert (otherwise the game softlock), and it is optionnal for Marcus, Blank and Cinna (without it, you see the corresponding regular party member on the field).
http://forums.qhimm.com/index.php?topic=14315.msg242890#msg242890

For completeness, I put below the typical "Init" functions for Beatrix, Blank, Marcus and Cinna. I add a "jump" animation in case you want them to jump because, in the Steam version, there can be a "bug" which makes those jumps unavailable under certain conditions.
For the record, that "bug" works like this :
1) An animation has to be loaded in the RAM before it can be used by a character/model,
2) In the PSX version, the only animations loaded in the RAM are the very basic ones for all the party cast + the ones specified in the "Preloading" datas,
3) In the Steam version, an animation is loaded in the RAM (if it weren't there already) most of the time at the moment it is required,
4) The opcode "SetJumpAnimation" is buggy in the sense that it won't load the corresponding animation ; I think it's the only one doing that,
5) Animations can also be loaded in the RAM when entering the field using the "Preloading" datas ; it is less convenient and it needs to be linked to a model for that.
Code: [Select]
Function Beatrix_Init
    SetModel( 204, 100 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 8566 )
    SetStandAnimation( 2978 )
    SetWalkAnimation( 2975 )
    SetRunAnimation( 2981 )
    SetLeftAnimation( 2980 )
    SetRightAnimation( 2974 )
    SetJumpAnimation( 8566, 4, 23 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 104, 48 )
    return

Function Cinna_Init
    SetModel( 107, 87 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 9889 )
    SetStandAnimation( 470 )
    SetWalkAnimation( 761 )
    SetRunAnimation( 105 )
    SetLeftAnimation( 104 )
    SetRightAnimation( 107 )
    SetJumpAnimation( 9889, 5, 22 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 96, 61 )
    return

Function MarcusA_Init
    SetModel( 109, 100 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 12011 )
    SetStandAnimation( 474 )
    SetWalkAnimation( 367 )
    SetRunAnimation( 365 )
    SetLeftAnimation( 368 )
    SetRightAnimation( 364 )
    SetJumpAnimation( 12011, 9, 24 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 96, 61 )
    return

Function Blank_Init
    SetModel( 5467, 87 )
    CreateObject( 0, 0 )
    TurnInstant( 0 )
    SetStandAnimation( 5041 )
    SetStandAnimation( 462 )
    SetWalkAnimation( 5225 )
    SetRunAnimation( 5222 )
    SetLeftAnimation( 5223 )
    SetRightAnimation( 5224 )
    SetJumpAnimation( 5041, 9, 25 )
    SetObjectLogicalSize( 20, 20, 30 )
    SetAnimationStandSpeed( 14, 16, 18, 20 )
    SetHeadAngle( 96, 61 )
    return
Title: Re: [FF9] General editor - Hades Workshop (0.35)
Post by: blahitzmunchii on 2016-11-03 15:34:00
thanks!!
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Tirlititi on 2016-11-07 07:25:30
Version 0.35b is up. All the changes apply only to the Steam version :
- Fixed the black screen bug in battles when you modified an item,
- Improved the reading/modding of Assembly-CSharp.dll,
- Added a "Break damage limit" macro, be careful that it will bug with certain bosses,
- You can now change the model of the enemies.

So, for the reading/modding of Assembly-CSharp.dll, it should allow people like Baby5, who has slightly different version of the game, to use Hades Workshop without problem (Baby5, you can use the file that you uploaded : stats panel and status lists and other things should work fine now).

The "Break damage limit" has a problem which is not related to the game's engine but with the AI of several bosses : they have 10000 more Max HP than normally and are not supposed to die, ever (they terminate the battle before they reach 0 HP). For these bosses, if you hit them so hard that they reach 0 HP without passing through the 1HP-9999HP range, they will die for real and, from my experience, the game will sofltlock.
I don't know how to fix that... Any fix will be AI script related anyway.

The enemy model feature is all fresh. I just figured out this week-end that it shouldn't be too hard to be done with the Steam version. To properly modify the model (you can only choose models of enemies btw), you need to change the model in the 1st page of an enemy's data and then modify that enemies' attacks spell animation sequences. Indeed, in the spell animation sequences, there are lines like "Play Animation" ; since the animations of the previous model and the animations of the new ones will likely not match, you need to change the numbers of these lines (check the spell animations of the default enemies that have the chosen model).
In the future, I will make it so you can add/remove different kinds of enemies in an battle, and I hope the "Battle Scene" field will work soon as well. This way you can take out the full potential of choosing an enemy's model.

I looked about modifying Defend/Change abilities, but that's a bit more complex than I thought. They are specially handled at various points in the code and I need to see which ones to modify and how.
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: itoikenza on 2016-11-07 09:48:41
Thanks for looking into Defend/Change for me, Tirlititi! i'm prob the only dude looking forward to that kinda edit
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Gine on 2016-11-07 17:02:53
Thanks for update :)
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Baby5 on 2016-11-08 17:35:05
Thanks for trying to make the workshop compatible with our different version of FF9. :)

I tried the 0.35b, and indeed it did not crash at the start anymore(i can see the Final Fantasy IX Logo) so that's an improvement! But then I tried to modify something in the Commands menu(I replaced Medeo in SFX into Firaga) and saved. Weird things happened the moment I got into a battle. All my characters were showing at 9999 HP and 999 MP(which was definitely not the case on the save I loaded), full trance and ATB bar, but could not get a turn(the Commands do not show up in battle). Then an enemy did 4 damage infinitely to Quina and it kept showing 4 damage over and over(without Quina's HP ever decreasing)...

I am sticking to version 0.34b for now. Even though I cannot have access to modifying Commands and Stats, at least the game does not crash. I am hoping the workshop becomes fully compatible with all versions of FF9 at some point.

Thanks again!

Edit: Okay, after further testing with version 0.35b
Spells panel works just fine, and the Status panel has been completely fixed. I can create new Status sets completely.

Shops panel has also been fixed(it used to show Daguerreo's inventory as Ipsen Castle and I had to go to each location one by one to track which was which). Now Daguerreo's list is showing as Daguerreo correctly.

Commands panel works fine now. Before, the workshop would crash the moment I clicked on any Commands(such as Summon) probably because that was linked to the Stats panel(which crashed when clicked) and I would have to force it to close through Task Manager. I have not tried modifying Commands much yet since it seem the Stats panel must match(according the post about the Steam version), which brings us to the next point

Stats panel does not crash in the workshop. You can edit it. But if you edit anything at all, the problem mentioned above occurs. I tried something simple such as replacing Garnet's Healer support ability with Restore HP instead. Anything of the sort completely messes the game up and all battles freeze in an infinite loop of damage or heal numbers. (Also Reflect's red sparkles somehow weirdly get frozen in place)
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Gine on 2016-11-12 16:54:23
I found small bug with editing UI Texts.

If edit or translate in UI Texts. It cannot skip cut scene in game.

It just appear with notice box with no text.
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Tirlititi on 2016-11-12 17:43:45
Thank you both for reporting those bugs.
I'll try to fix them but now I'm on a small pause for HW.
Title: Re: [FF9] General editor - Hades Workshop (0.35b)
Post by: Tirlititi on 2016-11-24 20:44:24
Update !
I wondered whether I should call it v0.36 or not, because there is some cool new stuff. But I finally opted for 0.35c (that gives an excuse for not working on backgrounds... plus 0.36 would make it sound as if I was almost over with it).

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


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

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

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

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

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

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

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

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

I'll be off for work next week ; when I return, I'll see what can be done about field backgrounds.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: vivigix on 2016-11-26 11:56:53
Tirlititi I just watched video on YouTube,  it is amazing.
Thank you for your job. You are the best.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Fraggoso on 2016-11-30 23:18:45
Backgrounds, Backgrounds, Backgrounds ;D
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Baby5 on 2016-12-07 13:22:00
Thank you for this update! It works like a charm now, I have not encountered any bugs yet with the most recent version.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: itoikenza on 2016-12-11 00:29:14
 Wow. Tirlititi, you are a saint! A god among Programmers... Please don't forget my silly request of modding "Change" & "Defend"?!

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

Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Epiphoskei on 2017-01-19 00:25:00
Thank you, this is tremendous. In 3 hours I managed to do what I have wanted for ten years. I managed to hard-code the growth cap of Tetra Master cards at 255.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: resinate on 2017-01-25 12:11:00
is there a way to change the starting consumable items? or change items on a field map?
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-25 12:42:07
Yeah, the "simple" way to choose the starting item is by giving them through the script of the first "Prima Vista/Cargo Room".
Code: [Select]
AddItem( 236, 10 ) // Give 10 potions to the playerYou remove the default starting items with these lines :
Code: [Select]
RemoveItem( 236, 7 )
RemoveItem( 237, 2 )
RemoveItem( 238, 2 )
RemoveItem( 240, 2 )
RemoveItem( 247, 2 )
RemoveItem( 249, 1 )
RemoveItem( 253, 1 )
I think you can put these lines in the "Main_Init" function as it should run once at the start (I don't think it runs again after the Masked Man fight, but it should be checked).
The best place to put them is in the "Zidane_Loop" function though, next to the "Sure is dark..." line ("WindowSync( 2, 128, 34 )").

The starting items are defined in the CIL method "ff9item::FF9Item_Init". You might change the values there as well, but I don't recommend it as it could be a feature in a future version of HW to have a panel for automatically changing these starting items.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: resinate on 2017-01-25 12:53:02
yea i cant find the scripts ur talking about. are u using a different tool?

also any chance of adding in for steam version, higher than 65k hp it is possible to go above max in pc version. found this by messing with cheat engine
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-25 13:55:47
You have to write those lines in the script.
The scripts themselves are found in the panel "Environment -> Fields" which is present in HW since a long time.

Also, you can't go above 65 535 HP in PC version. HP and max HP are ushort. I don't know what you made with Cheat Engine, but you certainly did not set the HP to more than 65 535. Maybe you did change a temporary buffering of the HP, but that can't be used in the long run.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: resinate on 2017-01-25 22:33:30
but this will blow ur mind, use a tent on a end game boss
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: gorildo on 2017-01-29 20:31:37
I was thinking of trying something: addind an NPC to, say, Daguerreo's Library that can reset your characters stats, maybe charging a price. It sounds doable, but I'm unsure what to do. Could text limits be an issue? Because some dialog would be necessary...

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

In the future, I plan to add custom functions available in scripts, so you could do what you want with the stats, but that's not for now.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: gorildo on 2017-01-29 21:49:47
I was thinking of a function that "introduces" the character to the party, like the first time you meet them.

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

But thanks. Btw, I meant PS version, Pc version is ew. :o
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-29 22:39:18
Nice catch :D

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

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

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

    // Go back to a standard animation and turn back to its previous facing angle
    WaitAnimation(  )
    SetStandAnimation( XXX )
    RunAnimation( XXX )
    set VAR_A6_158 = 1
    if ( VAR_A6_159 == 1 ) {
        if ( VAR_A6_156 == 0 ) {
            EnableMove(  )
            0x27( 255 )
            if ( VAR_A6_144 == 0 ) {
                EnableMenu(  )
            }
        }
    }
    TimedTurn( VAR_B6_16, 16 )
    WaitTurn(  )
    return

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

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

EDIT : Warning. To use a large number in a script (more than 32767), you need to append 'L' to it most of the time.
For instance, use "100000L" and not "100000". It will bug otherwise (that makes me think that I should throw a warning there...).
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: gorildo on 2017-01-30 18:44:42
A quick question, when editing enemy attacks, are the attacks identified by IDs or variables in the script? For example, an enemy that casts Thundaga, does the script explicitly refer to that spell, or to the ID (or slot) "occupied" by the list of attacks in each enemy entry?

Say, if you replaced such a spell with any other, would the enemy refuse to cast that spell?
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-30 19:17:17
It refers to the ID, which is indeed the slot of the attack. If you replace a spell by another one, he will try to cast the new spell in place of the old one (what might happen is that the targets are not compatible with the new spell animation, and so not all the targets are affected).
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: gorildo on 2017-01-30 19:34:10
I thought so. I guess as long as you substitute a single targeting spell for a single targeting and a multi for a multi, it ought to work.

Another thing, when adding scripts to heal an enemy (to simulate more than 65k HP), isn't it better to set it to heal x amount y times when it is below 20,000 instead of 10,000? That way, the lowest it can get is 10,001, not triggering <10,000 conditions.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-30 19:49:25
The best is to use the < 10 000 condition in the sense you'll need to heal less times. If there is that "HP less than 10 000 => end the battle" system, you can use it and make an alternate branch that heals the enemy instead of ending the battle.

That's what I did there (http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426).

If you use a < 20 000 condition, that's all ok though.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: resinate on 2017-01-31 08:45:14
is there any method to enabling these
*debug moggle shop
*save in menu
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-31 14:51:09
The debug moogle shop can be enabled field by field. It has no point though since it doesn't do anything.
In each of Moogle's scripts, specifically near the beginning of the functions "Moogle_Make_SpeakBTN", you have those lines :
Code: [Select]
            set VAR_B7_9 &= 127
            set VAR_B7_10 = ( 71 | ( VAR_C6_372 << 4 ) )
            if ( VAR_B3_1 >= 0 ) {
                set VAR_B7_10 |= 8
            }
            while ( VAR_B7_9 < 128 ) {
                RunSoundCode3( 53248, 1362, 0, -128, 125 )
                EnableDialogChoices( VAR_B7_10, VAR_B7_9 )
                WindowAsync( 2, 8, 3 )
Replace the line "set VAR_B7_10 = ( 71 | ( VAR_C6_372 << 4 ) )" by "set VAR_B7_10 = ( 103 | ( VAR_C6_372 << 4 ) )" to enable the debug choice. You can also replace it by "set VAR_B7_10 = 127" to enable all the choices (since the mogshop will be invalid, trying to use it in-game will bug though).

There is no leftovers of a "Save in menu" option. It might be a hoax.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: JBedford128 on 2017-01-31 15:38:18
I assume he refers to enabling the Save option in the menu (which was used for debug purposes). At the very least the menu name and description are left in the data.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-01-31 16:22:49
Ok, I suppose I didn't search enough.
Anyway, in the MenuUI.cs source file, there is no "Save" option.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: aidolu12 on 2017-02-02 13:08:28
Hi Tirlititi, seems the tool has really advanced since i used (Final Fantasy Formula IX).

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

Thank you for all your work.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: Tirlititi on 2017-02-02 16:26:58
Hi Aidolu ! Welcome back :D
Unfortunatly, while it is surely possible to do it, I don't know how... The MIPS code could certainly access to the AP and exp of the characters (in battle - it wouldn't be usable in menu anyway -), but it would require the expertise of a good person who does RAM analysis to find which sequences to use to retrieve these values.

There's a list of known fields in the MIPS help that you can access in the spell effect codes. There are HP, stats, trance gauge, level and activate supporting abilities, among others, but there's no exp nor AP (and I think it's not in the same structure so you wouldn't find them even by trying every possible figures).

In order to increase the level, that's this sequence :
lbu:     $1 = $19[122] & 0xFF
addiu: $1 = $1 + 1
sb:      $19[122] = $1 & 0xFF

However, I would bet that it would have only a twisted effect to directly change the level value :
1) Max HP/MP will most likely increase, but not the other stats (strength...),
2) The exp doesn't change so it will need more time to level up once again after that,
3) It may even be possible that the level gets reverted back to normal at the end of the battle. In this case, the only noticeable difference will be the effectiveness of spells like Lvl 5 death or so...

Sorry, I kind of deserted the PSX version for the Steam version now... Well, when something can be done for both, I do it (copy/paste the spells of enemies, for instance), but MIPS is just too related to the PSX version to get improved.
Title: Re: [FF9] General editor - Hades Workshop (0.35c)
Post by: aidolu12 on 2017-02-03 07:48:14
Hi Aidolu ! Welcome back :D
Unfortunatly, while it is surely possible to do it, I don't know how... The MIPS code could certainly access to the AP and exp of the characters (in battle - it wouldn't be usable in menu anyway -), but it would require the expertise of a good person who does RAM analysis to find which sequences to use to retrieve these values.

There's a list of known fields in the MIPS help that you can access in the spell effect codes. There are HP, stats, trance gauge, level and activate supporting abilities, among others, but there's no exp nor AP (and I think it's not in the same structure so you wouldn't find them even by trying every possible figures).

In order to increase the level, that's this sequence :
lbu:     $1 = $19[122] & 0xFF
addiu: $1 = $1 + 1
sb:      $19[122] = $1 & 0xFF

However, I would bet that it would have only a twisted effect to directly change the level value :
1) Max HP/MP will most likely increase, but not the other stats (strength...),
2) The exp doesn't change so it will need more time to level up once again after that,
3) It may even be possible that the level gets reverted back to normal at the end of the battle. In this case, the only noticeable difference will be the effectiveness of spells like Lvl 5 death or so...

Sorry, I kind of deserted the PSX version for the Steam version now... Well, when something can be done for both, I do it (copy/paste the spells of enemies, for instance), but MIPS is just too related to the PSX version to get improved.


Oh though MIPS where for both, I was thinking on passing to STEAM version when you just released the tool for it, but I had these problems with the tags for the colors and text filling, then I move from my country to another so until now I did not have time for it. Is it possible to edit the effects for the STEAM version, I will download it again (I bought it but it was installed on my PC from my hometown.)

Further than that, just to thank you again, this tool has improvised to impressive levels, and my mind to, to make better mods.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-10 23:28:44
Update to v0.36:
- Added a Background Editor Tool. It allows to convert images into Steam background format files and then import them. More on that below.
- Added a CIL Macro to make the engine accept the converted backgrounds (in particular, for changing the resolution).
- Added support for the backgrounds that contain titles (Ice Cavern entrance, Qu's Marsh entrance, etc...).
- Fixed the CIL Macro "Unlock Ability Learning": it made the few stage battles at the start of the game bug.
- Improved the Script Editor (replaced the default variable names, added a few safety checks when parsing functions, added support for single-lines comments, ...).

So, the big new thing is the background editor. Thanks to it, upscaling and modifying backgrounds is possible. There are still a few flaws with the quality (people noticed seam lines or black pixels in-game). With a bit of work on the images, it can be perfected though.

A big hurray to Fraggoso who started to upscale and fix the images.

If you want to import custom backgrounds, you should first go to "CIL Code -> Macros", apply the "Custom Backgrounds" macro and save the Steam mod: it will make the engine compatible with the custom backgrounds (in particular if you change the resolution). If you don't do it first, do it last :p

So, the background editor gets available once you got to the "Environment -> Fields" panel. It has 3 panels itself :
- Converter -> From a few images (1 image per layer), create a Steam formatted file (.tex) of the background that can replace the default files in the game's assets.
- Mass Converter -> Same as converter, but it can do several fields consequently. Hopefully, the program doesn't run out of memory too soon (backgrounds are very RAM consuming).
- Mass Importer -> Take the .tex files and import them in the game's assets (in the StreamingAssets folder, p0data11.bin to p0data19.bin).

The converter lets you verify that the images are loaded correctly and that they match with the tilesets. There are several parameters:
1) Background Image: Select one of the layers of the background. All the layers must be in the same directory and be named
SomeName0.bmp
SomeName1.bmp
SomeName2.bmp
etc...
For multi-background fields (such as the Prima Vista's Cargo Room, that has 2 cameras and thus 2 images), it must be
SomeName0_0.bmp
SomeName0_1.bmp
...
SomeName1_0.bmp
...
Each of the bmp (or tga or tiff) must contain a layer which correspond to one of the field's tile block.
The Gimp add-on save-layers-tiff-24 (http://wiki.panotools.org/Multi-Layer_TIFF_editing_with_the_Gimp) is perfect for generating each layers with the right name from the .tiff images exported by HW.
2) Destination Folder: Where to save the Steam formatted file. The name of the .tex file is generated to match the background and should not be modified.
3) Use Game Tiling/Custom Tiling: Unavailable for now. In the future, this will allow to import entirely custom backgrounds, but for now, they need to match the normal ones (same number of layers, each of them placed at the same place in the whole image...).
4) Field: Choose the field corresponding to your background image.
5) Sort Layers by depth: The layers can be sorted either by their ID (the ID is used in the scripts, for instance) or by depth. Hades Workshop export the layers of the backgrounds by depth so you can usually let it checked.
6) Revert Layer Order: When checked, the foreground-most image is numbered "0" while it's the background-most image when unchecked. With the Gimp add-on, the order is reverted.
7) List of Tile Blocks: Select a few of them to verify that the layer match with the tile block. A greyed area is drawned where the layer is expected to be.
8) Resolution: By default, resolution is 32, meaning 32 pixels per tile. If you use upscaled images, modify this (resolution can go up to 123 for now, which is a bit less than 4x the Steam resolution and is already huge files ; a resolution of 64 seems honest for me).
9) Compression Quality: Select the compression algorithm to use. High quality is slower while low quality is faster. In any case, it doesn't change the file size of the output, only the time required to convert it.

Finally, there's also the case of backgrounds containing a title. Since those titles are present for every languages in the Steam version, you need to have layers for them in every languages as well (usually, it's 2 layers per language). The English (US) title layers should be at their usual places, and the other title layers must come after all the others in this order :
English (UK), Japanese, German, French, Italian, Spanish.
Again, the layers as they are exported by HW are in the correct order.

In the Mass Converter panel, you find the same parameters but the image file names are also indexed by the field ID (or are inside a folder indexed by the field ID). With the default settings, "Field0\Background1_2.tif" corresponds to the 3rd layer of the 2nd background of the 1st field (Prima Vista/Cargo Room). You may also use the indexing of the real IDs of the fields (used in the scripts among other places) instead of their order. With that option, Prima Vista/Cargo Room has an ID of 50 and thus should be placed in the folder "Field50" instead.
A window displays how many backgrounds were spotted and converted and whether there was a problem.

In the Mass Importer, you select a FF9_Launcher.exe. You can choose the one that is currently opened in HW, but the program may crash then after leaving the background editor (that's quite harmless if you weren't making a mod besides the backgrounds though).


One last thing, I've been told that this version crashes on start (when opening a game). But it works just fine for me, so can anyone confirm that it crashes or that it works correctly? Thank you.

I'll soon write a post about the current status of FF9 modding. What has been done and what can be done next.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-11 00:36:55
Hey, Tirlititi, one of the WiP builds crashed. One that is made sometime after 2017-02-03. This 0.36 release seem to be working.

Anyway, thanks for all your work! I have a lot of stuff to do now. Expect me to bother you with "artifacts" again :D

Edit: I spoke too soon. This version does crashes, but after reading fields from PSX disc1 (US version), not steam version.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-11 12:05:52
Updated to fix that. There was indeed a weird behavior in the compiler that I didn't know. Thanks Meru :)
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-11 15:05:42
Update works past that point, but there seem to be another problem:
Open FFIX PSX -> Environment -> fields -> open synthesyst's "Manage" dialog and close it, switch to weapon shop (or possibly any field) then back to synthesyst -> crash.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-11 17:34:36
The newest Version still doesn't work for me... the older one still working. :/
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-11 19:42:56
Hey, Tirlititi, I seem to found a problem with the most recent HW.
Alexandria/Main street 1
It exports (and expects on import) 2 new tileblocks (page14-15) that look like this
(https://i.imgur.com/SuyAlGE.png)
This is the one that has a title. Selecting single language or all makes no difference. In wip build it wasn't the case though.
And judging by in-game results they are being used...???
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-11 20:37:52
Hum... those are the English (UK) tiles. It seems that I don't handle them correctly.
The thing is, they are not used in-game: the US tiles are used instead of the UK for nearly all the titles (all except South Gate).

I'll try to fix that (and the other problems) but you can bypass it for now by copying the English (US) layers and replace those ill tiles by the US ones. If I understand correctly, what happens now is:
- The title is not present for UK so I export something incorrect (I meant to export a duplicate of the US but I made a mistake),
- When converting, the US title is imported and then the UK title is imported over it, so this fuzzy title is used in place of the US (the others should be correct).
So yeah, replacing the UK title with a duplicate of the US title should be ok. The only field for which it matters is exporting the title correctly.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-11 21:18:18
Tirlititi, okay then I have a surprise for you. Here is what happens if I replace those layers as you said  :mrgreen:

(https://i.imgur.com/J9x6YZN.png)
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-11 22:29:34
Pft.
That no good surprise.

Remove the problematic images then. Just delete (or rename) the "Backgrounds10.tif" and "Background11.tif" and do it again. In the Mass Converter, there are warnings if a few images are missing, but I forgot to throw a warning in the Converter so it will tell you it did just fine without them (and it will be right, I tested, period, no more bad news about that  :-X ).
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-12 15:38:50
The program works fine on my working laptop (from the company with Win 7). On my normal PC (win 10) it refuses to open neither the psx binarys nor the Launcher from the steamversion...
Is there any way I can give you and error log of some sorts?
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-12 17:05:45
Tirlititi
About these black dots: https://i.imgur.com/cDpUCJT.png
I'm not sure this is something I can work out on my side...
This is how HW's tileset looks like: https://i.imgur.com/QEY1WNv.png

Edit: also, I just noticed that this particular (green) layer has a clear signs of antialiasing. This could be the reason why these squares are slipping-in -> by being averaging with nearest pixels.
In that case the question is, why this layer gets scaling and/or antialiasing while other (tickets tent) - don't? Can we enforce that for all layers to (possibly) get a smoother picture?
My original layer does not have any half-transparent/antialiased pixels. Whatever opaque color or full transparency.

On a side note, I wasn't able to process this particular image fully with the errors "can't allocate memory" for a couple of last (biggest) layers. HW wasnt using more than 300megs of ram though.
The problem seem to be went away after I patched executable with largeaddressaware flag. Maybe just a coincidence... dunno.

Edit2: also any idea what would happen if we'll patch texture to be processed with trilinear mode instead of bilinear? (if anything). Also maybe patching it for point filtering mode may remove this processing of the green layer?
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-12 17:21:48
Maybe it has something to do with premultiplied alpha...
The way FF9 handles the alpha is pretty bizarre ; they kind of still use the PSX way to do things in that regard. The best is to use image with only 2 alpha values: fully transparent and fully opaque (or half-opaque for the semi-transparent layers). I'm not saying it will fix the problem, but it worths the try. It's also a big argument for reworking entirely the engine about it, and get rid of the tiled format (this way, any alpha value could be used for any layer).

EDIT: About the "can't allocate memory" error, I also got it once and, by trying again right after, without even closing the program, it worked. I don't really know why it sometimes throws that error (maybe when requesting too much RAM space at once, it can be refused?).
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-12 17:24:16
Thats what I do. I only have fully transparent and fully opaque. Also pls see my edits above.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Tirlititi on 2017-02-12 17:44:36
I don't know why this layer is green. I thought you colored it on purpose... It's not green in the Steam version, right?

I don't know about trilinear filtering, you're the one doing tests about it. Here are the different modifications done on the images:
1) As I explained to you, the tiles in the atlas are 36x36 instead of 32x32 and the 33x33 center region will be used by the 3D engine. So when importing the backgrounds, I need to somehow expand the 32x32 tiles into 36x36 tiles ; the center region is kept and the borders are averaged with the color of the tile next to it. In the mean time, I also gives color to the transparent pixels because they will have an impact on the DXT5 compression. Currently, I average the transparent pixels with the opaque pixels belonging to the boundary of the object near to it, but I tried a lot of other methods, and the default atlas doesn't do it like that.
2) The atlas gets DXT5-compressed. All the pixels are packed into 4x4 blocks with a few color variations in them. I use an external library for that (Squish) that is quite efficient. The compression quality parameter is used at this point to compute more fitting color variations in those 4x4 blocks.
3) The atlas is rendered by the game's 3D engine: the 33x33 square at the center of the tiles are used as textures for 3D quads (couple of triangles in fact) and the whole thing forms a kind of flat 3D model.
4) The rendering is scaled depending on the resolution. I have no idea of which algorithm is used there and I can't help you if you want to change it at this step.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-12 17:55:49
I did colored it on purpose. Here is exact layer i used https://dl.dropboxusercontent.com/u/110558786/Report/Square28.7z

The rendering is scaled depending on the resolution:
what i am saying is, game has different approaches for different layers. Or at least it looks like it. "Tickets" tent and most of the textures looks like scaled with "point" method. They show hard edges and no artifacts. While some layers, like this green one seem to be processed differently. You can see it is "blended" into the background. These half-transparent green edges is not my doing nor it is related to DXT because it is not present in decompressed HW's output as I've shown on 2nd image.

So my theory is, these black dots are slipping in because of that "other processing" game does for this layer.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-12 19:17:55
Here is what i mean:

I create all layers like so - hard edges, no antialiasing:
(https://i.imgur.com/ubVUs9V.png)

Some layers look in game just like that even after adjusting to my resolution.

Some layers, on the other hand, start to look like this all on their own:
(https://i.imgur.com/NM9t4Cb.png)

Now I have not checked all the layers out there, but incidentally layers that look like so also have a black dot issue.

Also as I described before, issues appear even on exporting and re-importing the same thing without modifications (grid issue being one of that)
There probably is a weird behavior in-engine, or even a bug, but original textures don't make it apparent because their tile paddings are precisely a copy of the tile's edge-pixel. (Or it could be Silicon's workaround for Unity's crappy tiling)

It is up to you of course what to do about that, but I think it is easier to create textures in a compatible way instead of figuring out what engine does there.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 09:48:21
Hi Meru, are you creating all layers from scratch?
The engine is really nitpicking on the Layers. Slight variations done to the background layers opposed to all other layers can yield very bad results like gray/black seams and/or the dot's you're mentioning.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Kaldarasha on 2017-02-14 11:26:19
A reason why those filtering does happen is probably that a few parts of the backgrounds are in fact 3D objects and the games filtering (bilinear or trilinear) does affect these objects.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 12:07:46
A reason why those filtering does happen is probably that a few parts of the backgrounds are in fact 3D objects and the games filtering (bilinear or trilinear) does affect these objects.

Nope, FFIX doesn't use any kind of 3D realtime models. Some 2D alpha effects like smoke is used but they not part of the static backgrounds and thus can't be filtered.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Kaldarasha on 2017-02-14 16:16:26
Nope, FFIX doesn't use any kind of 3D realtime models. Some 2D alpha effects like smoke is used but they not part of the static backgrounds and thus can't be filtered.

There are some realtime models, but that's not what I meant. When I'm correct the problem does only occur on the layers, which can hide an object/character. I remember, that someone wanted to make a similar engine as FF7 by using Blender and encountered a problem with these layers, because he couldn't easily copy the way as Square did it for the game. So he placed the layers in the 'room' similar as an object. And that is what I assume the port team did with the BG's of FF9. That would explain why the texture filter is working on these layers.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-14 16:32:37
Hi Meru, are you creating all layers from scratch?
The engine is really nitpicking on the Layers. Slight variations done to the background layers opposed to all other layers can yield very bad results like gray/black seams and/or the dot's you're mentioning.
Not sure what do you mean by "from scratch". You mean layer edges? Sometimes yes, sometimes no, but this doesn't matter. BTW the problem can be seen on some of your older screenshots of synthesist too.
Edit: of course for the final product all the layers must be redone. Leaving them as is and simply swapping backgrounds just makes things different kind of ugly from what it used to be with default backgrounds.

The dots are there because this is how HW creates textures. The problem is that these dots are outside of the range that must be shown on screen. I think that instead of trying to fix the engine, it is better mimic the way Silicon created textures. I dunno what the engine does there, nor I want to know, but these dots (and probably grid as well) look like a product of averaging with nearest pixels, like bilinear or better resampling or fxaa-style antialiasing (unlikely in this case since I think it works in screen-space only). When it happens that the nearest pixel is a black dot - sometimes we can see it on screen, when it happens to be imperfectly mirrored edge pixel - we see grid. The grid is very hard to spot if you deal with 64x64 tiles but quite easy with default ones.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 18:09:32
Not sure what do you mean by "from scratch". You mean layer edges? Sometimes yes, sometimes no, but this doesn't matter. BTW the problem can be seen on some of your older screenshots of synthesist too.
Edit: of course for the final product all the layers must be redone. Leaving them as is and simply swapping backgrounds just makes things different kind of ugly from what it used to be with default backgrounds.

The dots are there because this is how HW creates textures. The problem is that these dots are outside of the range that must be shown on screen. I think that instead of trying to fix the engine, it is better mimic the way Silicon created textures. I dunno what the engine does there, nor I want to know, but these dots (and probably grid as well) look like a product of averaging with nearest pixels, like bilinear or better resampling or fxaa-style antialiasing (unlikely in this case since I think it works in screen-space only). When it happens that the nearest pixel is a black dot - sometimes we can see it on screen, when it happens to be imperfectly mirrored edge pixel - we see grid. The grid is very hard to spot if you deal with 64x64 tiles but quite easy with default ones.

I just wanted to know if you're doing the layer edges by hand instead of using a template (either PSX or Steam).
And yes, I also have these dots. It doesn't distracted me too much but they're there. :/
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-14 18:19:52
Fraggoso
Heh, I was too focused on the problem we were discussing ^^
The templates you are talking about I am using of course, but only for now. They will have to be redone by hand at some point. Maybe with vector masks (https://i.imgur.com/zeeepfQ.png) maybe something else, not sure yet.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 18:22:44
Fraggoso
Heh, I was too focused on the problem we were discussing ^^
The templates you are talking about I am using of course, but only for now. They will have to be redone by hand at some point. Maybe with vector masks (https://i.imgur.com/zeeepfQ.png) maybe something else, not sure yet.

I found it easier editing them via a new alphamask and just adding or deleting. That way you can instantly see if there're some problems.
But yes, they CAN look nice and it's a shame that Silicon Studio did that weird upres of the images as the seams aren't 1:1 anymore like they used to be on PSX. Now they look a little bit Frankenstein. >.<
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-14 18:51:07
Speaking of layers, I am curious about different thing. For each of the moving objects in PSX version, HW creates only a single layer. This includes everything: doors, flags, water, clocks... how they were animated then? PSX engine was distorting and moving the layers in various ways? But for example that fan from a picture I posted above (that is on the disabled layers). You can not create all these layers by moving or distorting the fan on PSX layer.

Edit: in addition to that. It is known that all the moving objects and most of the scenes even were originally created in 3D by various artists. So instead of distorting a layer they should have made a few "shots", the same way we see in PC version? So does the HW output for PSX really complete?
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 19:18:10
Speaking of layers, I am curious about different thing. For each of the moving objects in PSX version, HW creates only a single layer. This includes everything: doors, flags, water, clocks... how they were animated then? PSX engine was distorting and moving the layers in various ways? But for example that fan from a picture I posted above (that is on the disabled layers). You can not create all these layers by moving or distorting the fan on PSX layer.

Edit: in addition to that. It is known that all the moving objects and most of the scenes even were originally created in 3D by various artists. So instead of distorting a layer they should have made a few "shots", the same way we see in PC version? So does the HW output for PSX really complete?

I don't understand what you mean exactly. ^^;
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-14 19:25:21
I mean that in PC version animation is done by swapping layers at a right time. But in PSX, textures contain only a single layer, so there is nothing to swap. There are 2 possible outcomes. Whatever PSX engine generates extra frames on-the-fly based on that single layer, or HW's texture output is not complete.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 19:29:20
I mean that in PC version animation is done by swapping layers at a right time. But in PSX, textures contain only a single layer, so there is nothing to swap. There are 2 possible outcomes. Whatever PSX engine generates extra frames on-the-fly based on that single layer, or HW's texture output is not complete.

Are you sure?
If I use HW to rip the psx tiles they're animated and are only tiles, so I suppose those are layers themself. But of course, I'm no technican. :/
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Meru on 2017-02-14 19:41:19
Are you sure?
If I use HW to rip the psx tiles they're animated and are only tiles, so I suppose those are layers themself. But of course, I'm no technican. :/
I see. Now that you say it. It turns out to get a complete output I must check all the checkboxes 1st for that particular animation. Never bothered with that >__<
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-14 19:44:21
I see. Now that you say it. It turns out to get a complete output I must check all the checkboxes 1st for that particular animation. Never bothered with that >__<

Yes you have to check the tiles or else you'll not get all the layers but only the base backgrounds +, if there're moving tiles, only the first aniamtion cycle.
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-15 22:29:02
I can confirm that hw now operates with win 10. :)
I'll update tomorrow after I spend some more time testing it but for now I could load, convert and import as well as do the macro for the highres backgrounds.

Thanks!
Title: Re: [FF9] General editor - Hades Workshop (0.36)
Post by: Fraggoso on 2017-02-16 11:10:05
Okay everything seems to work.
I also tested the multi name fields and they also work and after deleting 10 as well as 11.tiff the behaviour of the field and seams are normal again.

As I also tested to Waifu the title I get this result: http://screenshotcomparison.com/comparison/200783

Aren't the titles half alpha instead of full or opaque? I don't know why I have those blacks in it. ;P
Still the background for the names benefits from a better gradient.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-16 14:03:40
Updated to v0.36b to fix that crash at the beginning. That surely was the dumbest error I ever made in a release...

I also tested other algorithms to convert the background into the atlas, but without better result, so I kept the last one. I won't go back to it for now ; next time I'll tackle the problem by the "remove the tiling concept" approach.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Meru on 2017-02-16 20:14:24
BTW I still have a crash issue with PSX
Quote
Open FFIX PSX -> Environment -> fields -> open synthesyst's "Manage" dialog and close it, switch to weapon shop (or possibly any field) then back to synthesyst -> crash.
These exact steps crash it 100% of times.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-16 20:41:54
Ah yes, I was able to reproduce that bug (the PSX backgrounds are not displayed correctly in the viewer also). I forgot to check where it comes from, sorry :/
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Meru on 2017-02-17 07:12:55
Tirlititi
I keep forgetting to ask. Are there any plans to support 32bit version? Or it is already supported and I didn't noticed?
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-17 08:34:17
It is already supported, you just copy the outputs of HW into the x86 folder instead of the x64.
The two folders are, with the exception of few files ignored by HW, carbon copy of each other.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Fraggoso on 2017-02-17 10:44:55
Hey Tirlititi, we talked about the FMV's in one of our sessions.
I've interpolated them from the choppy 15 FPS to a more fluider 30 FPS

https://onedrive.live.com/?authkey=%21AHBfnOAR4A5MdCU&cid=C52FE2188BAD82E8&id=C52FE2188BAD82E8%21422&parId=C52FE2188BAD82E8%21421&o=OneUp

When I just put them in the folder they play as 15 FPS.
Maybe, because you want to move away from the backgrounds, you could give it a try? ^^
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Meru on 2017-02-18 14:33:35
Tirlititi
I just realized that you mentioned "seam lines" along with black pixels when posted HW 0.36. I feel like there was a little confusion. In case with "seam lines" you was right. They appear because of doing things incorrectly or taking shortcuts/sacrificing quality for the sake of doing things faster. I wouldn't try to fix these things though. Better not to make them to begin with. Black dots, on the other hand, are a totally separate thing. Too bad I realized this just now.

Anyway, I wanted to ask a different thing. It would probably be a good idea if files in texture output folder will not be overwritten before checking for image compliance with a selected item in dropdown list. Would prevent losing textures to accidentally selecting a wrong item. (Using .tmp file may work too.)

Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-18 17:21:37
@Fraggoso: yeah, i'll do some test to see if it can be modified easily. I'll probably need a FMV as well, not MBG (they may use a different FPS parameter). You're sure you can replace the FMV with .mp4 files? The normal format is .ogg for FF9 FMV.

@Meru: Yeah, all those tiny defects suck, but I gave up trying to fix them with hand-made twisted solutions. They'll surely go away once we change the engine to non-tiled backgrounds.
I'll think about making a .tmp file and rename it only if the process was successful (no error thrown).
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-18 17:24:56
So, I've been developping Hades Workshop for a bit more than 5 years now. I accumulated quite a lot of knowledge about Final Fantasy IX, a game I love, and about its in-depth functioning. Now the Steam version is out and the possibilities it allows in the long-term are enormous. I'm not planning to give to HW more time than I currently give - I have a full-time work besides that - so I feel that either HW's development should involve more people, either it will just keep going at this rate, that can be slow sometimes. I made the github project (https://github.com/Tirlititi/Hades-Workshop) page some time ago in that perspective and I hope people will get interested in contributing.

This post serves several purposes:
1) It's a list of what I currently believe to be feasible in terms of FF9 modding. I tried to make it exhaustive but I excluded what I think should never be related to HW (a save editor -> gjoerulv already made a good one ; Messing with the aspect ratio -> it's better done with an external program...).
2) It shows what you can do to participate to this program. You don't necessarily need to know programming to help: a lot of things can be done only with patience and/or different computer skills. What you surely need though, is a certain amount of passion for this game.

If you want to contribute to the project, the best ways to contact me are either send me a PM here, either send me an e-mail at:
laroche.clement1 at gmail.com

I color each of the points depending on what kind of skill it requires to be done.
Blue: You need to know how to use some aspects of HW.
Red: You need to know C++ programming.
Brown: You need to know C++ programming and get to know the source code of HW.
Green: You need another specific skill, like 3D modelling or Unity coding.
Of course, I plan to do them myself if nobody comes and propose his help. I'm usually focusing on the brown points and I'll most likely keep doing that.
EDIT: I started to strike out what has been done already.

MODDING THE ASSETS
'Assets' are the name that Unity gives to the game's resources, including 3D models, textures, interface aspect (UI), musics, sounds. I'll focus on these but maybe you'll think of something else as well.

The files p0data1X.bin with X ranging from 1 to 9 contain Field related data (backgrounds),
The file p0data2.bin contains Battle related data (3D models of the battle scenes),
The file p0data3.bin contains World Map related data (3D models),
The files p0data4.bin and p0data5.bin contains the other 3D models and their animations respectively (3D models of enemies and player characters in battles and 3D models on the field),
The files p0data6X.bin with X ranging from 1 to 3 contain the musics and sounds,
The files levelX (in particular level1 and level2) seem to contain the UI datas,
The file mainData contains a 'ResourcesManager' file needed for authentifications of most of the other assets.

The assets are not in the same formats in PC as their PSX counterparts. Also, those formats are not custom to FF9 and thus it would be way better to export/import them rather than adding a feature in HW for modding them directly.

The textures are mostly DXT5 compressed. I already use a library to compress/decompress them (Squish) so I can add a feature in HW to convert them into more usual formats (bmp, tga, tiff...).
The 3D models seem to be .mesh files, rather common. There are also materials .mat and animations .anim.
The UI data format is some kind of Unity based binary format. I don't know if it's a standard binary, but it represents things like GameObject, MonoBehavior, Transform, etc... It shouldn't be hard to figure out how to mod them for anyone who knows a bit about Unity.
Musics and sounds are all in the .akb format, which is also easy to read (Audacity does that). It seems that it's not so easy to export files in the .akb format but FF4 modders also encounter this format and they found there way out (for what I understood, .akb is only .ogg with a different header).


ADDING FEATURES TO HW
There are two kinds of features that can be added to HW: adding tools and adding panels.
A panel is an aspect of the game or of the gameplay that could be modded in HW. It usually allows to modify datas that are very specific to FF9 and so adding a panel requires getting to know the binary format of the aspect you want to mod.
A tool can be made for simplifying the life of the modder. They could also be standalone programs, but using the capacities of HW would surely be simpler for most of them.

Here are examples of tools that would be nice to have:
A Damage Calculator: Allowing to get the ranges of damage done by spells/attacks against specific monsters, under specific circumstances. Also useful for the chances to hit and the chances to add a status. All the precise formulas are now known things, so it would only require to code the tool and give it a nice UI.
A Unity Assets Viewer: There are already Assets viewers. Not all of them work correctly with FF9's assets, but some of them does (UnityEx 1.1.5 for instance). The use of a Unity Assets Viewer specific to FF9 would be to be able to find the assets more easily (most of the time, the names of the assets are opaque and they're not their real file names). It would also be useful to make converters to common file formats (like DXT5 <-> .bmp converter for images).
A Randomizer: I made a randomizer for the PSX version, but porting it to the Steam version would require to use more of the power of HW for reading the FF9 Steam datas.

And here is a list of new possible panels to add:
Walkmesh Editor: With the possibility to import custom backgrounds, it would be nice to be able to edit or create the walkmeshs as well. Walkmesh are the paths on which the characters can walk, so making new areas requires being able to make walkmeshes. Their format is not too complicate (and is already readed by HW) and so the work there would be to implement a convenient way to modify them in 3D. It could also be a possibility to import 3D models (untextured, unanimated...) to use as walkmeshes, but there will be parameters to adjust in HW anyway, as a walkmesh is not only a 3D model. The best solution may be to add a walkmesh support to the Background Editor tool.
Camera Editor: Also needed along with walkmeshes to create new fields, but there are also the battle cameras that should be editable. As of now, the only camera movements available in each battle are the ones already there. Being able to add new cameras make the variety of the enemies' attacks stand out. It'd also be a great tool for making dialog moves in battles.

There's also the possibility to make the tool compatible with the Android and iOS versions. Most of the datas should be the same for what I know, only packed differently.


IMPROVING HW CURRENT FEATURES
There are some features in HW that are currently only partial or missing some database.

Listing the IDs of the resources:
3D Models: Most of them are already listed. Listing them all is very useful because it makes the field scripts way more readable: you know which entry is associated to which object through its model ID. That's how you can easily spot the entry of Zidane, for instance. There are a few of them missing, though, and the list should be completed.
Animations: That will already be a longer job. Fortunatly, there is already a list of the field's model animations, but it's a bit imprecise for my tastes: it only links the ID and the file name of the animations. A better list would link the ID with the name of the animation and the model that uses that animation. Fortunaly, the file name kinda contains these informations already (for instance, there is "ANH_MAIN_F0_VIV_LAUGH.anim") but not all are explicit. Also, the same kind of list exists for battle animations, but none of the file name is explicit there.
Musics: Listing the musics and find their ID shouldn't be too hard for someone who knows the game well and which music is played at which occasion. That would be useful for the script editor.
Sounds: Same as for musics, but there are more and it will need more precision and/or testing to accurately identify the sounds. Also, you have to come up with simple and adapted names for those sounds, which won't be an easy task.

Overall, listing the IDs of the resources is useful for making the script editor better. It will also come in handy for exporting/importing the assets if HW gets a Unity Assets Viewer.

Completing the modding features:
Spell Animations: For now, there are a lot of unknown instructions in the spell sequencing. You can effectively make multi-hit attacks (great thing they removed a few of the potential bugs in the Steam version) but the possibilities given by this feature is limited. One thing to do is to complete the instructions (and the arguments), but it won't be enough: a lot of the useful stuffs are hidden in what are currently called the "Play model on target" instructions. Without talking about the 3D models of the SFX, it would be nice to, let's say, make a spell that consecutively launch a Thunder SFX and a Fire SFX. A lot of things need to be learned about the Spell Animations file formats.
Enemy Spell Animations: I've worked on this one pretty recently so it is more complete. It should be perfected by displaying convenient informations about the instructions' arguments: for now, the animations, cameras, sound, etc... that you want to run are only identified by a number. Being able to import more sounds usable here should also be done.
Character Progression: I had some fun to make the Curve editor, to see how the HP/MP/Exp progressions were climbing and how to *comfortably* move those progression curves. It was kind of like coding a pencil tool for an image editor. However, it never has been my priority to complete that, so it was left in a state that is quite unconvenient. By the way, if I recall correctly, the default progression curves are piecewise quadratic functions. It could be useful to add a way to input the function instead of drawing them (or even import them from a spreadsheet).
World Maps: Aside from the 3D model, a better grasp of how the different locations are placed could be worked out. A few of the locations are given their coordinates directly in the scripts (chocobo treasures), but not all of them (the towns/dungeons, the topography and different battle areas). Not much to do here besides that, because a lot is coded in the game's script ; a World Map viewer would come in handy in the script.
Text Editor: Surely one of the most useful part of HW that needs big improvements. The text opcodes are handled by HW for the PSX version, maybe not fully but still quite well. However, for the Steam version, the text opcodes are all displayed raw. One thing to do is to display correctly the in-game text we get in the Text Editor window. It is standard work but I haven't done it yet. Another thing would be to convert the PSX text opcodes into Steam text opcodes, and vice versa. That won't be of huge use, but that would allow translations and mods to be compatible both for the Steam and the PSX versions at once. Last but not least, it should be possible to switch languages in HW at any time, as well as being able to add pieces of text for all the languages at once.
Multi-language scripts: Speaking of multi-language, the scripts (enemies' AI, field and World Map scripts) are also language-dependent. The script modifications should expand to the script of all the languages, as much as possible, and notify when it can't be the case because of the differences.
Background Editor: It is a young feature of HW and has a room for improvements. There seems to be some seams left when importing images and that should be fixed. Also the background file format, as they are handled (exported mainly) is the worst possible in term of memory management (each layer is of the size of the full image, usually transparent on 90% of its surface, and saved as uncompressed RGBA format). Finally, creating new fields from scratch requires algorithms for computing the tileblocks, their depth, the walkmesh, the camera position, etc... I would say that it could be automatized with few to no user adjustments if we ask for a 3D model and are able to convert it to the structures mentioned above.

The Script Editor can be improved further, in many many ways. Here are a few possible improvements that were not already mentionned:
Figuring out the purpose of each of the local and global variables in each of the World Maps/Fields scripts, and renaming them. I did that already for the enemies' AI, and it shouldn't take too long to do it for the World Maps, but it is a big task for doing it for all the fields. However, the mini-games, the cutscenes, the progression, the treasures and a few dozens of other things are written in these field scripts. Making them more readable and exhibit how they are coded will make their modding much easier. It's a work that should definitely be done on the long-term and we should only focus on a few fields to begin with that are of primary interest (the chocobo places, the World Maps, the Airships...).
Making macros, automatically generated script, would come in handy too. They used some for sure during the development of FF9 and it would save quite a few copy/paste when coding the script. A few possible macros would be:
- Generating the default script for a talkable NPC or a moogle,
- Generating the default AI (with the random attack picking system),
- Generating the default script for item picking (in a chest or on the ground),
- Generating the script for a ladder,
- Generating the script for leaving a field (opening a door as an option)...

Modding the engine:
What I call the game's engine is basically the CIL code. It can be tweaked a bit, but that's all but satisfying. A big improvement would be to reverse engineer the CIL code into C#. There are a few tools that can do that already (.NET Reflector, JetBrains dotPeek, ...) so it's not like we should rediscover the wheel ; hopefully there is or there will be some library that we can use to do that. Albeoris's Memoria does that already better than HW, but it completely screw the format by delegating a lot of the classes to an external .dll, making it impossible to come afterwards and mod something else on top of it...

For the time being, and because it can make things way simpler, the CIL macros are a good option to mod the engine, so we should add more. For instance:
- Changing the FPS limit: It has been asked a lot, and it's definitelly feasible, but a few things have to be changed there and there. The model animation factory seems to be adjusted for a particular FPS limit, and the walking speed is also dependant on the FPS if I recall correctly.
- Modifying the Supporting Abilities: This one is tougher than it looks. The supporting abilities really are melted with the battle system, and it wouldn't be easy to make an automatic way to mod them. It's not an impossible task either.
- Making the base commands moddable: The commands like "Defend", "Item"... are specially handled by the engine so changing the spell(s) linked to them is ineffective and/or buggy. There is also a few spells specially handled by the engine and it would be nice to have a simple way to configure that.
- Removing the tiled background system: This was an idea for easing the background image importation, but it turns out to be less simple than expected. Each 32x32 tile has a different depth, which makes the rendering of one big image instead of plenty of little tiles complicated. Currently, I don't think it's feasible without creating more problems.
- Maybe adding analog support: I don't know why all the types/keys of controllers are not supported. It may be because of Unity's engine, or it may be because of FF9's engine. If it's the latter, fixing it shouldn't be such a problem. There is a list of input codes in the class NGUITools, with "KeyCode.JoystickButton" from 0 to 19. Maybe there are more to add, or maybe they are not handled well...
- Being able to add new things to fixed lists: It's quite vague, but it would be nice, for example, to add more possible battles, or fields, instead of needing to change the existing ones. There are things for which it is highly improbable that we can add more, because the engine is calibrated for it. What we may hope to be able to add are battles, fields, world maps, text areas, 3D models, animations, shops, levels (increase the max), battle scenes... What will unlikely be possible to add are spells, commands, supporting abilities, items, spell animations...
- Implementing new functions to the game's script: That is something unavoidable at some point. For now, the enemy AI, field and world map scripts are limited by the features decided by the developers. It is for instance impossible to get access to a character's strength from the field's script, or to give exp or AP, or to have any information about the Tetra Master cards (except for the number the player has). There are rooms for adding more functions, it only needs to be done and make HW compatible with it.
- Same thing for spell effects: Increasing the variety of effects a spell can have will definitely be a plus for most mods. I'm thinking of a spell that can turn an ally to trance that can be used only if the trance gauge is already up to a certain pourcentage for instance. Also, the only effects that can decrease the MP are MP Hammer and Ryuken for now, which is quite poor.
- Make the encounter rate the same as for the PSX version.
- Allow for more languages: There are russian and portuguese translations out of there, maybe more. I guess they replace an existing language with the translation, which is fine, but will likely ask for workaround when playing mods. Adding languages to the game engine can make it easier. Also unlock the japanese language in the main menu.


FIXING HW'S CODE
I started coding Hades Workshop a long time ago and it would need some reworking here and there. There are memory leaks to fix (I start with the most boring thing so you stop reading this paragraph now :D), some structures could replace list of arrays, for some reason, I was reluctant to use std::vectors for a long time and they could also find their place...
There are also a few things to complete or code better. Usually, I comment them with the words "TODO" or "DEBUG". Someone told me the other day that he couldn't stand a final release of a program that has those words in its source code. So you know what we need to do if we want to see the birth of a v1.0 ^^


MAKING NEW MODS
Well, yes, that's the point of the whole thing in the end ^^"
Difficulty mods or those that refresh the abilities are the natural mods made by HW. But it can of course do much more. Here are random suggestions.

Boss Rush: I wanted to make one, but I can't really handle developing HW + improving AF from time to time + making a boss rush. I don't have a clear idea on how the characters should progress, be it their levels or their abilities available. Still, a boss rush could refresh the game a lot, making tactical battles and faster playthrough than usual.
Kuja mod: Well, the battle model(s) need to be replaced (as well as a lot of icons and images), and it will be a huge work about the cutscenes, but that is in the range of doable things: tell the story from Kuja's point of view.
New Game +: If correctly balanced, it could be pleasant to be able to run the game with all the abilities from previous playthroughs unlocked. If the levels are re-initialized to 1, it can be made possible to max the stats with several playthroughs.
Importing the mods from PSX to Steam: currently, except for the texts, it is quite easy to do that. Either the mod was already in .hws format and can be imported with HW, either it was a .ppf or modded .bin and a trick can convert them into .hws (using the Mod Manager). The most obvious one is Unleashed. I contacted LandonRay a few years ago to ask him the permission to convert his mod into .hws (the point was to be able to translate it more easily) and he never answered... So I'm not porting it now, as a revenge :D But it can be done.
A Bug Fix: There are a few bugs left in the Steam version. I don't recall them all, but there's the Thunder Slash glitch, the Marcus/Eiko stat glitch, Ozma's AI, Necron's return magic guard, the Tetra Master rank bug, the fact that the last card of a Tetra Master deck is never used by the opponent (to be confirmed), for some reason the rope in the well of the Mount Gulug doesn't display correctly (speaking of which, Eiko is clearly standing with her HD model a few screens later, while she should be lying down ^^), people say there are still sounds missing even though I thought it was fixed, correct the few typos mistakes (I know only one in french, the description of the Cid VIII statue in Lindblum ; also, a few have been fixed for the port, in english). For those who really can't stand any bug, there's also the Puck skip, the Mistodon skip, the Madain Sari moogle skip, the World Map stuttering... I must forget some, but that's a little list already. Of course, some of them may be fixed by Silicon Studio in the future.


GROWING THE COMMUNITY
Qhimm is a great forum. I received a lot of help and feedback here from people knowing their stuff. However, because Final Fantasy VII is so overwhelmingly represented here, there's little room for a big community about another game (I might be wrong though, but neither FF8 nor FF10 modding had a piercing impact here for now). Also, when it comes to FF9 mods, it seems to me that people have a hard time finding us. It's my fault as well, because I don't actively spread the words and I don't even have any social network activity.
Nevertheless, I feel that more people could be interested in FF9 mods than those who seriously search about it.

Additionally, there's basically one topic now about HW, and considering the variety of questions one can have about it, I don't think it's enough.

The obvious place to speak about FF9 modding is the FF9 Steam forum, I guess. There's also the FF9 sub-forum of the FF Modding community on Steam ; it is more clear. The thing is, there are mods to be played and for that it is easy to make a topic listing all the available mods (there are not a tons of them). But it would be nice to also have tutorials and demonstrations about HW. Even a proper shapping of all the tips, suggestions and procedures people gave in this topic (mostly me, but also a few others) would be very useful. And it would tell people that modding can be easy if you have the will to do it. I'm the kind of guy that consider everyone should have the possibility to play a game his own way (that's why I give myself the right to mod to begin with) and that goes with a correct documentation about the available tools.

Also, the more different mods there are, the bigger the community is, that's about sure. It however needs a proper place to sort them out.

- -- --- ---- ----- ------ ------- -------- --------- ---------- ----------- ------------ ------------ ----------- ---------- --------- -------- ------- ------ ----- ---- --- -- -

Well, that's just about everything about that.
I have no idea of how far FF9 modding will go, but I hope I gave an overview about where it could go. The rest is up to us.

Keep enjoying this game, it deserves it  ;)
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Fraggoso on 2017-02-18 17:52:44
@Fraggoso: yeah, i'll do some test to see if it can be modified easily. I'll probably need a FMV as well, not MBG (they may use a different FPS parameter). You're sure you can replace the FMV with .mp4 files? The normal format is .ogg for FF9 FMV.

@Meru: Yeah, all those tiny defects suck, but I gave up trying to fix them with hand-made twisted solutions. They'll surely go away once we change the engine to non-tiled backgrounds.
I'll think about making a .tmp file and rename it only if the process was successful (no error thrown).

Yeah it's ogg. The uplaoded from googledrive was just a wip to see the difference in FPS. ^^
I can upload one mbv as well as an fmv to test out if you want.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Albeoris on 2017-02-20 16:10:56
Tirlititi
Now the source code of Assembly-CSharp.dll is available on GitHub.
https://github.com/Albeoris/Memoria

What about working together? :)
I can invite you as colaborator.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Pelig on 2017-02-21 15:52:10
Hi guys. I need help. I'd like to remove the stat growth from the characters. I think it's a simple thing to do, but i'm a total newbie with script editing.
If you can help me, i'll be very grateful.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-21 16:47:10
There is a possible solution with HW, but it will be easier to do it with Albeoris's Memoria.
Also, you need to be a bit more specific: you want the stats to remain the exact same from lvl 1 to lvl 99 or you want to remove the system that "equiping stat boosting equipments increases the stat growth" ?
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Pelig on 2017-02-21 17:32:13
Both of them.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-21 18:02:02
Go to CIL Code, then search for "ff9level" in the list on the left, then "FF9Level_GetDex", then Edit Code.
Spot the following lines near the bottom of the code and remove them:
Code: [Select]
ldarg.1
ldc.i4.s 10
div
add
ldloc.2
ldfld 0x4000885 // FF9LEVEL_BONUS::dex
ldc.i4.5
shr
add

Then do the same for the "FF9Level_GetStr", "GetMgc" and "GetWpr". The codes are pretty similar and you always have to delete the lines between that "ldarg.1" and the second "add" below it.

With that, characters will keep their default stats whatever their level. Their max HP/MP still increase a bit ; see the "Party" -> "Stats" panel for that.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Pelig on 2017-02-21 18:20:28
Thank you so much! You made my day!
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Lenthyan on 2017-02-23 00:56:42
Hey Tirlititi, would it be a lot harder to just remove the stat growth from equipment stat bonuses?

This is a great tool, thanks for the hard work!  :)

Go to CIL Code, then search for "ff9level" in the list on the left, then "FF9Level_GetDex", then Edit Code.
Spot the following lines near the bottom of the code and remove them:
Code: [Select]
ldarg.1
ldc.i4.s 10
div
add
ldloc.2
ldfld 0x4000885 // FF9LEVEL_BONUS::dex
ldc.i4.5
shr
add

Then do the same for the "FF9Level_GetStr", "GetMgc" and "GetWpr". The codes are pretty similar and you always have to delete the lines between that "ldarg.1" and the second "add" below it.

With that, characters will keep their default stats whatever their level. Their max HP/MP still increase a bit ; see the "Party" -> "Stats" panel for that.
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-25 12:25:40
Hi Lenthyan, sorry for the late reply.
It's not harder to only remove the stat growth from the stat equipment boost. You only need to delete fewer lines.
Only delete these ones:

Code: [Select]
ldloc.2
ldfld 0x4000885 // FF9LEVEL_BONUS::dex
ldc.i4.5
shr
add
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Lenthyan on 2017-02-25 21:29:11
Awesome, thank you very much!
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Pesmerga on 2017-02-26 23:41:44
hello  Tirlititi,  can you confirm this if its a bug or not because when i try to replace roulette then make a new spell, set target type on
enemy (single) only, then i save my mod, patched into my iso then play on emulator when i play game then using quina abilities (the one i replace the roulette) sometimes is quina is facing on my party then using the skill in my party . i think there is a  bug in there.


quina abilities
goblin punch
lvl5 death
lvl4 holy
lvl3 defless
doom
roulette ---------- this one i was talking about whatever i do, same result quina is using abilities to my party, i set target type enemy (single only).
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-02-27 08:49:18
It's not really a bug, but yes, it's normal. Roulette, like a few other spells, is specially handled by the battle engine.

Roulette's target is randomly chosen among the fighters (50% for an enemy, 50% for a player character),
Amarant's Curse element is randomly chosen among all the elements,
Amarant's Spare Change reduces the gil of the party (the damage calculation doesn't depend on the spell slot),
Meteor has a special random check that can make it use its second spell animation instead of the 1st one,
Comet has a special random check for a miss,
The spells under the commands "Summon" (x2) and "Eidolon" can randomly get flagged "short_summon" that reduces the damage and swap the spell animation,
The spells under "Swd Mag" verify Vivi's availability,
etc... there are a few other minors things like that.

The best way to bypass that is to use another spell slot (one of the "None" spells) instead of changing the spells like Roulette or Meteor (unless you want to keep that special treatment).
Also, most of the time, that treatment happens only if the spell is in its original command (if you make Roulette a command of Black Magic, it won't be random anymore).
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Pesmerga on 2017-02-27 20:22:08
Thanks for advice, btw this tool is awesome  :)
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Tirlititi on 2017-03-01 22:46:29
Thanks :)

Update to v0.37:
- Added a tool, the "Unity Assets Viewer". It allows to open the asset files of the Steam version and export them - not import yet -. It is a stand-alone tool in the sense that you don't need to open the game with the main frame for it (actually, it will recommended not to open both the assets and the game's datas of the same game at the same time),
- Fixed a few bugs, the field backgrounds should work fine with the PSX version now, and I added a few of the things asked (the background converter now starts with .tmp files, you can choose to export the backgrounds with their internal ordering...).

As said, the assets viewer can't import files yet, but that won't take long. What makes it stand out as an Asset Viewer is that it goes fetch the real name and hierarchy of the files, making them more easy to identify. It also gives a few additional informations about some files for the same purpose. Also, it can automatically convert the images extracted to a standard format (.png, .tga, .tiff or .bmp).

The files are exported in the folder "HadesWorkshopAssets" from the game's root directory. They'll likely be re-imported from there as well.

With this, it will not only be easy to complete the lists of IDs I wrote about, but also to use one's custom assets and import them in the game.
See the kind of things (http://imgur.com/a/kPrh6) you can find in the "sharedassets2" file for instance :D

Isn't that neat?

For now, only images are auto-converted. In the future, it would be great to have a converter for the sounds/musics and the 3D models ^^
If anyone volunteers !

EDIT: There seems to be a few bugs with the last patch of the Steam version. I haven't look at it yet but make Steam mods with cautious (.hws files are independant so they're a safe way to save mods anyway).
Title: Re: [FF9] General editor - Hades Workshop (0.36b)
Post by: Fraggoso on 2017-03-02 07:39:45
Wow, those are big changes for the mod community!
Nice tirlititit! :D

Edit:
Okay, so we basically can also start on upscaling the textures now! :D
Do you know how the textures are compressed? With mipmaps, without (or does the engine generate them on the fly?)?
Or are they really stored as png's for example?
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Shinryu on 2017-03-07 01:55:08
Hello, I'm new by there and I just discovered some great mods (fullscreen, alternate difficulty..) and your editor for the great FF9 ! :D
Thank you all for your hard work ;) I also wanted to try and create some mod for this lovely game but I am unfortunately not that skilled by now..
Well, I just want to create some simple (I guess) mod actually. Well, I have some nice idea that could be great if it's was possible to bring them to the game.. 

So, firstly, it's about the exclamation mark and card icon when you approach an NPC.. I know that this stuff, the card icon specially, is coming from the mobile version of the game for gameplay convenience. And in the end it's also help those who want to play with the keyboard and mouse but when you want to play the game with the gamepad only it's become more useless.. so I was thinking to add some option for makes it to appear or to disappear depending on how you want to play or if you need it. In another hand, I'm aware that thanks to that we can now clearly see if a NPC wants to play card as there is no card icon for other NPC. But it could also help those who want to play the game in the old fashion way by spamming the square button :D So an option for this icon would be nice I think. 

Or at least, I wanted to reduce those icons.. the fact is that in some small area with a lot of NPC, the screen is full with lot of those icons popping up when you walk past someone.. xD
So a way to reduce them with the option to make the card icon to disappear or not would be a perfect addition for the game.

Finally, a nice idea that can help those who want to get the Excalibur 2 weapon while speedrunning the game without leaving any items behind on the way there.. anyone knows that when you come closer of any interactive stuff (chest, hidden item, for climbing up..) each time there is an exclamation mark that appears. Also, anyone knows about the (pretty useless ?) hand that appears pointing to your character when you are standing there for a while.. So my idea would be to makes some or all of the exclamation mark to appear when you are standing there (like for the pointing hand) showing you all the hidden items around you. That way you can clearly see all the items that you can grab without wondering if you missed any in a house or elsewhere.. ;) Of course it's could be a waste of time by standing there waiting for the items to appear so we could either make an option to always make them visible or even better just tweaking the standing time needed to showing up the exclamation mark so that way the icons don't always fill up the screen and we would lost less time for grabbing items. In the game, there is already the option for activate or deactivate the pointing hand so we just have to mod this option by allowing hidden items to appear that way the hand option become more usefull too :D

Well, don't know how hard it could be and if it's even really possible doing that but would be great if someone can give me some thought about which of my ideas is possible to realise or how to better use the Hades Worshop if it's could help for that.. I already tried searching in the CIL Code and other function but no dice for now.

Also, I have checked some of the pages but not all of them so I don't know if someone else have already proposed same ideas as me so sorry about that if it's was already asking.

Hoping for some answer ;)
Thank you ! :D
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Pesmerga on 2017-03-07 02:51:02
@Shinryu actually u can easily remove the time limit in getting the  excalibur 2 using this tool so u dont need to rush your game. ;)  go to
environment---->fields-->memoria gate to space and edit script:


 if ( GetTime <= 43200L ) {
        InitCode( 3, 0 )

remove the [ if ( GetTime <= 43200L ) { ]

and this one

 if ( ( ( ( IsMovementEnabled == 1 ) && ( VARL_GenBool_7730 == 0 ) ) && ( VAR_GlobBool_145 == 0 ) ) && ( GetTime <= 43200L ) ) {

remove this line : && ( GetTime <= 43200L ) ) {

Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Fraggoso on 2017-03-07 21:16:59
As soon as tirlititi finish the import on the texture the exclamation bubbles as well as the card bubbles can be replaced by a dummy texture without any data in it. 
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Shinryu on 2017-03-08 03:58:28
Hello, well as I thought my request was more a daydreaming I guess.. xD
Will also check some other workaround but I am waiting for the work of tirlititi if it's could make the trick for that part :D

>Pesmerga Thank you but there is really more simple method for doing this and I have already changed the timer on my PS1 version for this weapon in my long play.. now I wanted to play on the steam version with some mod like I had imagined for fun or challenge.. not just changing the timer for excalibur 2 ^^ but I will remember that kind of modification in the script to see if I can use it for other stuff in another way :D

Well, thank you all ;)
Hope some news soon !
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Meru on 2017-03-08 08:39:47
Removing textures by replacing them with dummies is a bad approach.
Hiding card icon this way is probably possible, but that will still leave the exclamation mark in a displaced state.
(https://i.imgur.com/qxLeNCN.png)
And hiding exclamation mark may remove it even in places you don't want.

As for hand icon, that one can be disabled in settings.
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Tirlititi on 2017-03-08 09:23:55
Yes, replacing the bubbles with empty textures would not be a very satisfying solution.

Both your questions are best done with engine modification. I guess you can remove the bubbles with HW, modifying the CIL code but I don't know which methods take care of them ; I'll check this evening if I can find something.
Showing the treasures is way more tricky. There are two kinds of treasures: those placed in a chest (linked to a 3D model) and those on the floor (not linked to a 3D model) and I don't know if it's reasonably feasible to show the position of the second kind.
Albeoris's Memoria is more suited for that kind of stuff (it can already spot the objects linked to a 3D model and wrap a box (https://imgur.com/zGyHt3g) around them).
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Fraggoso on 2017-03-08 09:34:00
Why the heck the exclamation bubble got shifted?
Well I don't mind the both bubbles to be honest, but as long as there maybe a solution on the horizon that's always welcome.
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Meru on 2017-03-08 09:37:42
Why the heck the exclamation bubble got shifted?
Well I don't mind the both bubbles to be honest, but as long as there maybe a solution on the horizon that's always welcome.
Icons are centered on a character. Be it one or two. So making one invisible does not remove the shift. One must hack the engine to take care of that =(
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Fraggoso on 2017-03-08 09:39:46
So not even a full alphasmasked texture wouldn't work? :/
What a bummer. ^^
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Meru on 2017-03-08 09:41:32
Well it would look exactly as my screenshot, that's not a photoshop (except the red question mark), I tried it before posting  :mrgreen:
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Fraggoso on 2017-03-08 09:43:52
Thanks for the info Maru. :)
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: Tirlititi on 2017-03-08 18:13:38
Ok, those bubbles (exclamation and card) are handled by the class "EIcon".
The easiest way to disable the card bubble is to replace a "2" by a "1" in the method "EIcon::PollCollisionIcon".

Code: [Select]
ldc.i4.2 // Replace this 2 by a 1
call 0x600091F // EIcon::PollFIcon
ldc.i4.1
stloc.0
That's near the middle of the method.

In order to remove both bubbles (for NPC only, treasures still have their own bubble), I think you can remove those four lines + the four lines that are a bit below them:
Code: [Select]
ldc.i4.1
call 0x600091F // EIcon::PollFIcon
ldc.i4.1
stloc.0

There are also bubbles in the World Map (Chocobo, airships and beach bubbles). For disabling all of them, the best is to "return false" at the start of the method. The two first lines can be changed into these:
Code: [Select]
ldc.i4.0
ret
Title: Re: [FF9] General editor - Hades Workshop (0.37)
Post by: dclem on 2017-03-09 02:10:18
Its Sharon DaSilva from Steam.
http://steamcommunity.com/app/377840/discussions/0/353915953249510749/?ctp=20

I actually just tried the "EnableMove()" command (placed right underneath the Random battle command) and Garnet was still locked up.
The random battle command can go anywhere in the MainInit section, right?

Okay, here's what I got in A.Castle/Hallway MainInit:
Now you can see what's missing.

Code: [Select]
Function Main_Init
    set VAR_GlobBool_159 = 0
    set VAR_GlobUInt8_17 = 255
    set VAR_GenBool_191 = 0
    if ( VAR_GenBool_184 == 1 ) {
        set General_FieldEntrance = 10000
    }
    set VAR_GenBool_184 = 0
    set VAR_GenInt16_9 = 65535
    if ( VAR_GenUInt8_13 == 9 ) {
    } else {
        if ( ( VAR_GenUInt8_13 == 2 ) && ( VAR_GenInt16_9 < 0 ) ) {
            set VAR_GenUInt8_13 = 9
        } else {
            if ( VAR_GenInt16_9 < 0 ) {
                set VAR_GenUInt8_13 = 0
            } else {
                set VAR_GenUInt8_13 = 1
            }
        }
    }
    set VAR_GenInt16_11 = 65535
    if ( VAR_GenUInt8_14 == 9 ) {
    } else {
        if ( ( VAR_GenUInt8_14 == 2 ) && ( VAR_GenInt16_11 < 0 ) ) {
            set VAR_GenUInt8_14 = 9
        } else {
            if ( VAR_GenInt16_11 < 0 ) {
                set VAR_GenUInt8_14 = 0
            } else {
                set VAR_GenUInt8_14 = 1
            }
        }
    }
    SetControlDirection( -10, 0 )
    SetRandomBattleFrequency( 150 )
    SetRandomBattles( 1, 915, 915, 915, 915 )
    InitCode( 1, 0 )
    InitCode( 2, 0 )
    SetDialogProgression( 0 )
    if ( General_ScenarioCounter < 8500 ) {
        if ( General_ScenarioCounter <= 7060 ) {
            set VAR_GlobInt16_30 = 308
        }
        if ( General_ScenarioCounter >= 7100 ) {
            set VAR_GlobInt16_30 = 5
        }
        if ( General_ScenarioCounter >= 8000 ) {
            set VAR_GlobInt16_30 = 305
        }
        if ( General_ScenarioCounter >= 8200 ) {
            set VAR_GlobInt16_30 = 306
        }
        switchex 4 ( VAR_GlobInt16_30 ) {
        case 308:
            set VAR_GlobUInt8_24 = 1
            InitObject( 14, 0 )
            InitObject( 31, 0 )
            InitObject( 13, 0 )
            MoveCamera( 166, 190, 1, 8 )
            break
        case 5:
            set VAR_GlobUInt8_24 = 0
            InitObject( 25, 0 )
            InitRegion( 17, 0 )
            InitRegion( 18, 0 )
            InitRegion( 19, 0 )
            InitCode( 24, 0 )
            break
        case 305:
            set VAR_GlobUInt8_24 = 10
            InitObject( 27, 0 )
            InitObject( 33, 0 )
            InitObject( 28, 0 )
            InitObject( 4, 0 )
            InitObject( 5, 0 )
            InitObject( 6, 0 )
            InitObject( 7, 0 )
            InitObject( 8, 0 )
            InitObject( 9, 0 )
            InitObject( 10, 0 )
            InitObject( 11, 0 )
            MoveCamera( 180, 180, 1, 8 )
            ShowTile( 14, 0 )
            ShowTile( 24, 0 )
            break
        case 306:
            set VAR_GlobUInt8_24 = 24
            InitObject( 27, 0 )
            ShowTile( 14, 0 )
            ShowTile( 24, 0 )
            InitRegion( 22, 0 )
            InitRegion( 23, 0 )
            InitRegion( 21, 0 )
            InitCode( 24, 0 )
            SetFieldCamera( 1 )
            SetControlDirection( -6, 0 )
            RunSPSCode( 0, 130, -1, 0, 0 )
            RunSPSCode( 1, 130, -1, 0, 0 )
            RunSPSCode( 2, 130, -1, 0, 0 )
            RunSPSCode( 3, 130, -1, 0, 0 )
            RunSPSCode( 4, 130, -1, 0, 0 )
            RunSPSCode( 5, 130, -1, 0, 0 )
            RunSPSCode( 6, 130, -1, 0, 0 )
            RunSPSCode( 7, 130, -1, 0, 0 )
            RunSoundCode( 1792, 124 )
            while ( SyncSounds != 0 ) {
                Wait( 1 )
            }
            RunSoundCode1( 16903, 124, 31 )
            RunSoundCode1( 16897, 124, 0 )
            set VAR_GenUInt8_8 = 25
            RunSoundCode2( 34305, 0, 180, VAR_GenUInt8_8 )
            set VAR_GlobBool_167 = 0
            break
        }
    } else {
        if ( General_ScenarioCounter < 8600 ) {
            set VAR_GlobUInt8_24 = 100
            set General_FieldEntrance = 309
            InitObject( 25, 0 )
            InitObject( 15, 0 )
            InitObject( 26, 0 )
            InitObject( 29, 0 )
            InitObject( 32, 0 )
            InitObject( 16, 0 )
            MoveCamera( 320, 224, 1, 8 )
            RunSoundCode( 0, 98 )
            while ( SyncSounds != 0 ) {
                Wait( 1 )
            }
            set VAR_GenUInt8_8 = 125
            RunSoundCode1( 16897, 98, VAR_GenUInt8_8 )
            set VAR_GlobBool_167 = 0
        } else {
            set VAR_GlobUInt8_24 = 0
            InitObject( 25, 0 )
            RunSoundCode( 0, 98 )
            while ( SyncSounds != 0 ) {
                Wait( 1 )
            }
            set VAR_GenUInt8_8 = 125
            RunSoundCode1( 16897, 98, VAR_GenUInt8_8 )
            set VAR_GlobBool_167 = 0
        }
        InitRegion( 20, 0 )
        InitRegion( 18, 0 )
        InitRegion( 19, 0 )
        InitCode( 24, 0 )
    }
    if ( General_ScenarioCounter >= 8000 ) {
        ShowTile( 14, 0 )
        ShowTile( 24, 0 )
    }
    if ( VAR_GlobBool_158 == 0 ) {
        0x27( 127 )
    } else {
        0x27( 255 )
    }
    Wait( 2 )
    Wait( 2 )
    if ( VAR_GenUInt8_13 == 9 ) {
        SetTextVariable( 2, 0 )
        WindowAsync( 6, 0, 56 )
        RaiseWindows(  )
        WaitWindow( 6 )
        set VAR_GenUInt8_13 = 0
    }
    if ( VAR_GenUInt8_14 == 9 ) {
        SetTextVariable( 2, 1 )
        WindowAsync( 6, 0, 56 )
        RaiseWindows(  )
        WaitWindow( 6 )
        set VAR_GenUInt8_14 = 0
    }
    set VAR_GlobBool_159 = 1
    if ( VAR_GlobBool_158 == 1 ) {
        set VAR_GlobBool_158 = 1
        if ( VAR_GlobBool_159 == 1 ) {
            if ( VAR_GlobBool_156 == 0 ) {
                EnableMove(  )
                0x27( 255 )
                if ( VAR_GlobBool_144 == 0 ) {
                    EnableMenu(  )
                }
            }
        }
    }
    if ( VAR_GlobUInt8_17 == 255 ) {
        set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
    }
    0xA9( 250 )
    FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
    return
[/CODE}
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-20 10:06:23
what is the script command to change which music plays during a battle? I've searched endlessly, and can't find a code.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-21 21:47:46
Now if someone else asks a question, you'll hope right on it.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Tirlititi on 2017-03-21 22:10:14
I already answered that music question, the first time you asked me.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-22 14:13:01
no...?
that was about adding a timer and random battles to Alexandria disc 3- after Beatrix and Steiner montage fights.
I don't remember asking about music until now.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-24 07:07:56
Tirlititi, please answer my question, I've searched, scanned every possible function list, can't find it.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-26 10:56:49
Okay, if you're certain I asked you this question the first time, PLEASE link me where I said that, cause I can't find it.
But I know of a fact I did not ask such before; just lying so you don't have to help me with your tool?
The "help tab" doesn't tell me in anyway how or what each function (in this case: MUSIC) is and what it does. So who else am I to turn to when no help is given?
If I had such a tool, I would help anyone who had a question how to do something with it, regardless of what kind of "beef" I may have with them.
I ain't asking you nothing more than a simple question, which for you, would take like, what? Few seconds to answer? Given you are the master of Final Fantasy IX's script. The only person in the world who literary knows how everything works in the game.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Fraggoso on 2017-03-26 11:01:14
You jump the gun real quick ain't you?
Maybe he's out of town attending other business...really get some patience if you need help.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-26 13:56:53
will you please leave me alone? i didn't ask for your words.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Fraggoso on 2017-03-26 16:32:41
Oh Jesus here we go again huh?
I just gave you a nice advice. If you don't care that's you problem.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Tirlititi on 2017-03-26 16:54:14
Okay, if you're certain I asked you this question the first time, PLEASE link me where I said that, cause I can't find it.
But I know of a fact I did not ask such before; just lying so you don't have to help me with your tool?
If that makes you happier...
http://steamcommunity.com/app/377840/discussions/0/353915953249510749/?ctp=20#c133258593400587717

You're lucky though, I found the file where you can determine which music plays for which battle a few days ago. It's the files "BtlEncountBgmMetaData.txt" and "WldBtlEncountBgmMetaData.txt" that are in the resources.assets.
For each field, there's a list of the ID of the battles that are used in this field and the ID of the music that plays for it. If a battle is not preset, the music doesn't change. I didn't test anything though, just guesses.

And yes, I'm not at home and I have less time than usual for FF9 related things.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-26 23:31:44
Oh Jesus here we go again huh?
I just gave you a nice advice. If you don't care that's you problem.

there ain't no "here we go again". its a simple leave me alone don't talk to me.

If that makes you happier...
http://steamcommunity.com/app/377840/discussions/0/353915953249510749/?ctp=20#c133258593400587717

You're lucky though, I found the file where you can determine which music plays for which battle a few days ago. It's the files "BtlEncountBgmMetaData.txt" and "WldBtlEncountBgmMetaData.txt" that are in the resources.assets.
For each field, there's a list of the ID of the battles that are used in this field and the ID of the music that plays for it. If a battle is not preset, the music doesn't change. I didn't test anything though, just guesses.

And yes, I'm not at home and I have less time than usual for FF9 related things.

okay, so i'm blind af. totally did not see that. I'm sorry i did ask about the music just said it as "battle theme".
and it was still unclear to you to...
but good to hear you found its location at the start. i'll see what i can do.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-27 09:29:24
Okay,
what a headache...
got it to work.
figured out:
0 - normal battle theme
61- friendly theme
35- boss theme.
111- hunter's chance theme.
that last one's replaced in the sound mod

battle not present had the 'don't stop music' flag checked.
got it.

side question:
will a font customizer come to HW anytime soon? Be nice to change the ugly Arial font, and make some longer text fit with text size.
can you change freya's spell animation sequence, so if you change one of her native skills to like Curaga, she doesn't glitch and perform the "jump" animation?
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Tirlititi on 2017-03-31 17:05:22
I'm not planning to make a font customizer ; Memoria is surely more fitted for that. For Freya's spell animation, it seems to be specially handled in the FF9SpecialEffectPlugin.dll so we don't have control of it. A workaround could be to swap the two animation files (in p0data5.bin, I guess).
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-03-31 23:20:21
so sad...

any idea where the font the game uses is located, which file?

going back to the random encounters. Have you ever got a lockup after adding random battles to a field (like Quan's dwelling) that never had it before?
Cause that's what's happening now.

EDIT: will there be a model extractor/importer in the future?
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: iamthehorker on 2017-04-05 06:43:25
I was trying to use your tool to create my own mod, but I'm having some issues. When I attempt to export a .ppf file with HW and patch the game with ppf-o-matic I get the binblock error. Why is that? I know I'm using v1.0 (not v1.1) of FF9 and I'm not applying the patch to the wrong disc. Is there something I'm missing? Applying your Alternate Fantasy patch works fine, it seems to only be with my .ppf files exported from HW that I get this issue.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: iamthehorker on 2017-04-07 18:07:56
I think my problem may be different than what I originally thought it was. Moving ppf-o-matic, HW, and my .bin files all into the same folder has made the binblock error disappear for some reason. However, if I start a new game after applying my mods the game goes black during the first fight with Baku.

I originally thought Alternate Fantasy was applied correctly because I received no binblock error when applying the .ppf, but the game also goes black at the same place when I tried to play it. The battle music is played but no visuals are shown. What could cause that error?

Edit: So, this is weird. It turns out patching the original FF9 images using ppf-o-matic gave each file some bad sectors. In some emulators this is apparently okay, but with the one I was using (Mednafen/Retroarch) it made the game unplayable. I found some similar complaints about this same issue on the Retroarch forums. I used the program CDmage to scan for bad sectors and repair them. Now everything runs fine. Might be useful information for anyone using this tool, thought I would give this update.

Edit #2: If you use CDmage to fix bad sectors DO NOT use the Repair Corrupted Sectors option. Use Rebuild Sector Fields option with only the ECD and ECCP/ECCQ options selected or else it won't work.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: vomitrocious00 on 2017-04-08 23:08:22
Hi, just curious as to how you can edit the items you receive as rewards or found in the world?

Like for example in the alternate fantasy mod you find a Dragon's Hair in the spot where you would typically find Kain's Lance and at the end of the Mognet Central quest your reward is an Orichalcon instead of the usual Protect Ring
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: Tirlititi on 2017-04-09 07:11:04
@dclem: I worked on a partial model converter. With the next release, you will be able to export the models as .obj (Wavefront) format.

@Iamthehorker: Ok, so there are two things there I think:
1) The sectors are not updated properly. I have no idea of how I should update them: there is periodically a block of data (0x130 in size) that has informations about the sectors. I never cared to touch them as they have no impact when using ePSXe and Psx. I guess there is a checksum in those blocks of datas ; if you can link me to a description of that checksum (on Retroarch maybe?), I can try to implement a sector repairing for "Export as PPF" and "Overwite Binary".
2) The bin/block fail is another problem. What "Export as PPF" does is looking at the file on your hard drive and create a PPF from the differences of the hard drive file and the modifications done in HW. That's why it is important to use it only on files that were not modified previously ; it's always a patch "Current version you have -> Current version you have + modifications done in the editor or imported via .hws". I don't really know why it gave you that error though, but that's not because of the sectors.

@Vomitrocious00: These items are set in the Field and World scripts. First go to the "Items" panel just to load them up, then go to the "Fields" panel, search for the field where the treasure or reward is and click on "Edit Script".
It may be different from cases to cases, but usually:
- For items found in a chest, you have (on the left of the window) a few functions called "Function Chest_Init" or "Function Chest_Something". In one of them, there is what happens when you open it, including the item you receive (since you went in the "Items" panel, you can click on the number defining the item and see the corresponding item's name).
- For items found on the ground (no 3D model related to it), it's usually the same kind of things, but with a "Function EntryX_Something" instead and they are a bit more difficult to spot as there are also other "EntryX" that are not related to items.
- For rewards and items given, that's in the midst of the dialog cutscene where the reward is given. If Stilzkin is the one giving you the reward, search in the "Function Stilzkin_...", if it's Artemicion, try "Function Artemicion_..." etc... The cutscenes are also sometimes handled by a "Main_..." function so you can search in those as well.
- For chocographs, bubbles and cracks, there are 3 functions defining the rewards (one for chocograph, one for bubbles and one for cracks). If I recall correctly, they are "Chocobo_..." functions.

Once you found the number defining the item, change it to what you want (there may be a couple of lines where you need to change them, but they are always next to each other), then Parse the function and then Ok.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: iamthehorker on 2017-04-09 23:20:03
@Tirlititi
I did not see any documentation on the checksums itself, only that it was recommended to use an ECC correcting tool on the RetroArch forum:
https://forums.libretro.com/t/bad-sector-836-on-mednafen-psx/6354

I'm sure the documentation exists somewhere I just haven't found it. Maybe for now just include a message about it? It seems somewhat common for people to recommend using a program like CDmage to fix this problem.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: resinate on 2017-04-11 19:56:16
whenever i mod the game and save it im not able to reopen the game in the editor i have to keep redoing it from orginal file.

also any way to change what the auto abilities can do? like i wanna change auto float to auto trance and stuff

also any chance of adding in magic stones on level up?
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-04-11 21:48:33
I worked on a partial model converter. With the next release, you will be able to export the models as .obj (Wavefront) format.

Good to hear!

Is there a way to increase the enemy's HP above 65535? Making a harder challenge, but spells that can automatically hit 9999 damage (ex. Climhazzard, Dragon's crest etc.), makes it easy to defeat enemies with only 65535 hp, never mind 32767.
If its possible to increase enemy HP, how did you increase the damage limit as well? I see the methods involved, but what to place to increase it?

And the eidolons,
are these hard codded to a specific spell slot?
If I make an eidolon (say Bahamut) out of Vivi's spell slots, and use the effect "Eidolon common" The spell will only perform animation 1 regardless if Boost is equipped or not. Yet, Dagger and Eiko's default summon spell slots don't.

I've tried to set Vivi's abilities with Dagger's summon abilities (from the Stats panel) but that only made the battles lockup with glitches, so I had to physically replace Vivi's current spells with Dagger's eidolons.
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: resinate on 2017-04-12 00:14:36

dclem  just add regen to the bosses lol thats what i did

also i saw that we can add any monster to any battle how do we do this?
Title: Re: [FF9] General editor - Hades Workshop (0.37b)
Post by: dclem on 2017-04-12 02:51:39
Did it before, doesn't work too well in the end.
besides, FFIV & TAY bosses go over 65535. I think the max went to 200000... 250000. And the limit damages go over 32767, (I've seen 49167 damage).
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-12 19:40:30
Thanks iamthehorker.

Update to v0.37c. Since I didn't put a changelog for v0.37b, I also state what was added for it:
- Improved the Unity Assets Viewer
--- Can now import the files back,
--- Can automatically remove the AKB headers from audio files to have proper .ogg (re-importing them put that header back),
--- When importing the images, they are converted back (you can choose the format),
--- Can export 3D models.
- Tweaked the way the background images are exported/imported in order to keep the alpha informations. You can also now import them without compression (RGBA format - the files are 4x bigger).
- Fixed a few bugs, completed the list of 3D model names.

For importing the images (including backgrounds), not all the formats could work. I saw a few textures that are "Alpha only" and should be kept as it. Usually though, converting into RGBA is fine, 32bpp but without quality loss, and DXT5 is 8bpp with a bit of quality loss.

The exporting of 3D models is far from perfect. You can export most models from p0data4 (NPC, characters, enemies, accessories...), models from p0data2 (battle scenes and weapons) and a handle of effects in p0data3 (World Map) but not the whole World Map. What is exported is the geometry and texture information, but not the animations. Also, other (unknown) informations are lost during conversion, so these models will likely have a few problems for importing them back when an imported will be there.
You need to export the related file ".fbx" of type "GameObject" and the related textures in the Viewer. It generates a .obj (and .mtl) that can be used by Blender for example. It happens sometimes that the related textures are not properly linked, so in that case you need to open the .mtl with a text editor and replace the "TextureNotFound" by the name of the textures yourself. I also saw a few models (Amarant, Earth Guardian...) that are a bit fragmented (maybe that normal and the animations fix it though).
All in all, I don't guarantee that all the models are exported properly. I've tested a lot of them, but the format is still full of unknowns.

For the background exporter/importer, I changed the alpha format to fit more the format of the internal files. In these, most layers (lights, candles...) are fully opaque but made transparent using their blend mode (Substractive usually). In order to see them properly in a texture editor, you need to setup the blend mode of these layers manually (maybe I'll export them in the future if I find how to).

@dclem: Increasing the max HP can be done with a trick that I describe here:
http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426
It is not possible to just increase the possible max HP. It would require huge changes. For the Damage limit, I replace all the 9999 in these methods by the new value (only Tonberry's Grudge is limited by another mean).
For the eidolons, it is linked to the spell slot and the command slot IIRC.

@Resinate: you right-click on an enemy then copy -> paste it in another battle.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-13 04:26:16
im using ur newest version and theres no right click option anywhere in ur tool

is this steam part of the tool only? cuz im modding psx one
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-13 08:37:56
Awesome update to HW! And nice alternative to increase map HP!
The bug with increasing damage limits...
Could I just remove the if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) { from all bosses that use it, and not make the game soft lock?

And about importing.
I right click on the file in the assets viewer and import selection is always grayed out.

If I wanted to change a sprite image, (ex. FaceAtlas) Could I use any size png image, or does it have to be the exact size of the original sprite image?
FaceAtlas size is 1024x512, would I have to keep my custom sprite at this size to import it working?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-13 09:37:54
@resinate: Oh yes, I forgot you were on PSX, sorry. Adding enemies is not available for the PSX version unfortunatly (only adding spells/groups are).

@dclem: No, if you remove that "if" block, the game will softlock because you'd kill the bosses and it's not intended.
You can import images of any size. The UV coordinates being scaled, the textures of 3D models will fit nicely if they are upscaled. For some other textures, changing the size could bug (I think the "SquareEnix/Silicon Studio" and the opening screen must be of fixed size). You should check for the Atlas textures, but I'd guess they will be fine.
You can't import assets if the same game files are opened in the main Hades Workshop frame. You have a warning about this...
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Fraggoso on 2017-04-13 09:43:29
Dclem you have to open HW and navigate to the asset viewer without loading anything.
I did the same mistake.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-13 10:17:38
Oh, so, with increasing damage limit that's a natural bug. In these events I'd have to only defeat the bosses with abilities that don't cross over 10000.
Usually, (like battling trance kuja) I would defeat him by hitting 14734 damage, and the game didn't soft lock. Does it only soft lock if the player hits exactly the damage limit 32767?

Thanks for pointing out the assets viewer, you two.

for the eidolons, where is this IIRC spell and command slot?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-13 13:04:34
the importing feature...
working like a charm!
replaced the game over sprite, and it worked out fine and perfect!
I had to keep the original size intact though, or else it wouldn't fit the whole game frame screen.
my sprite was 640x480, and the original was 1543x1080. I imported mine the way it was, tested it, and the sprite appeared in the lower left hand corner of the game screen.
Resized my sprite to the original size "1543x1080". Fits screen perfectly.

If this can work as smooth, so can replacing the models.
I exported weapons (finally) and get to finally boast them from their original low poly state. If the charm continues, I could import weapons from FFXII here too.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-14 06:05:53
have u been able to find any ways to hot swap monsters in certain battles?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-14 17:59:06
About the models importing...
looks like I can't import models back in the game. It crashes anytime a battle loads/inits.
Or the model replaced comes into scene.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-14 19:51:57
IIRC = If I Recall Correctly. I said that eidolon's jewel powerup was linked to the spells and commands slots ("Ramuh"'s spell slot and "Summon"'s command slot for instance).
No, you can't swap monsters in certain battles in the PSX version.
There's no model importer yet.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-14 23:58:42
whoops, here I am, searching HW for an abbreviation.
If I add Dagger's spells to Vivi's spells from the "Stats" panel, will that guarantee battle lockups and glitches?

No model importer? Explains everything.
I want that now, cause FFIX is about to become "Unleashed", so far off the leash, it won't be called Final Fantasy anymore. I'm excited.
Tirlititi, you are literary a god, making all these dreams come true.

The audio importing is 1000% more efficient, and a whole lot faster and convenient.
Hopefully, some gray areas like renaming characters from stats panel could be possible, like psx.

Do you by chance know where the game engine find/handles the font used? Maybe I can replace on my own.


Thanks to you,
anything's possible.

https://gaming.youtube.com/watch?v=v0puOOJit4M&feature=share
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-17 05:14:45
is there any way to change how often they can earn ability stones on levelup?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: flumpy on 2017-04-17 21:09:50
hey there is there a patch for the pc version to restore the Hidden Scenes? the link on the first page is for the PlayStation version
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-17 22:13:13
Yep, the hidden scenes are included in my mod (Alternate Fantasy) but I forgot to make a stand-alone for it. Thanks for pointing this out.
So here it is: a link for the Hidden Scenes (https://www.dropbox.com/s/ejifo5amf4kkcyc/PC_HiddenScenes.zip?dl=1) patch for PC.

The Magic Stone progression is defined in the CIL Code, so it's a bit tedious to change. It's the method "ff9level::FF9Level_GetCap" :
Code: [Select]
public static int FF9Level_GetCap(int slot_id, int lv, bool lvup) {
PLAYER pLAYER = FF9StateSystem.Common.FF9.player[slot_id];
FF9LEVEL_BONUS bonus = pLAYER.bonus;
FF9LEVEL_BASE fF9LEVEL_BASE = ff9level._FF9Level_Base[ff9play.FF9Play_GetCharID((int)pLAYER.info.menu_type)];
if (lvup) {
int num = (pLAYER.cur.capa != 0) ? 0 : 5;
int num2 = 0;
FF9LEVEL_BONUS expr_53 = bonus;
expr_53.cap += (ushort)(num + num2);
}
int num3 = (int)fF9LEVEL_BASE.cap + lv * 4 / 10 + (bonus.cap >> 5);
if (num3 > 99) {
num3 = 99;
}
return num3;
}
In term of CIL Code, the main operation ("int num3 = ...") is those lines:
Code: [Select]
ldloc.3 // fF9LEVEL_BASE
ldfld 0x4000890 // FF9LEVEL_BASE::cap
ldarg.1 // lv
ldc.i4.4 // Multiply by 4
mul
ldc.i4.s 10 // Divide by 10
div
add
ldloc.2 // bonus
ldfld 0x400088B // FF9LEVEL_BONUS::cap
ldc.i4.5 // Right-shift by 5 ( = Divide by 32)
shr
add
stloc.0

I have no idea of where the font used is defined.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: flumpy on 2017-04-17 23:27:47
thanks a bunch
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: flumpy on 2017-04-17 23:50:50
i followed your instructions in the read me after overwriting the files  when i launch the game it doesn't go past the splash screen with ff9 logo..

edit - its all good i wasn't running the latest build
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-18 01:39:11
oh i see now CIL coding is only for steam man it sucks PSX version has so much limits....

LMAO!!! in ur mod did u really do this? Thievery has been replaced by Transcend : bring Zidane to Trance cuz i did this LONG LONG time ago lol
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-18 02:53:37
I have no idea of where the font used is defined.

:(
I'll ask Albeoris.

Tirlititi
something's going wrong with HW, anytime I try and save the mod .hws, it creates this huge 1.63 GB file, and 2.78 GB resources.assets when saving steam mod. why?
If I try to play the game with that big file, it will freeze the pc, by using up all the system RAM.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-18 11:42:39
what are u editing cuz u could be editing more files than normal if ur doing really adv stuff
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-18 12:18:41
I'll ask Albeoris.
Yes, do that. Now that I think of it, I think that Memoria can already change the text font.
For your other problem, you need to be more specific indeed, as Resinate said.

@Resinate: yeah, I saw that you made a spell like this also, but Transcend was already in the first (english) release of my mod and therefore I was the first of us to have the idea  :evil:
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-18 12:21:49
I don't think I did anything more advance than before.
The only thing I did differently this edit was import that LocalVariableSettings_v1.hws, then my mod after it.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-18 12:47:11
now this makes no sense.
I just reinstalled the game, an opened an older .hws that always worked, and now it doesn't. Still does the same thing.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-18 12:50:43
LocalVariableSettings should have no impact at all on the Steam modded files. It's only used for displaying the local variables properly (in AI scripts only for v1).
If resources.assets is the huge file, then it is most likely some corrupted texts. Verify the names and helps of the different things and the dialogs (in HW, after you import your mod). You may find a fuzzy one.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-18 13:01:07
Does that also explain the huge .hws file too? I don't create steam mods without first save the .hws, and if the .hws is a huge file like now, resources.assets will be too.
I just tried a backup .hws on all original non-modded files of the game, and yet it did the same thing.

could you test my mod .hws file and see if anything's wrong with it?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-18 13:26:06
okay, so I took so some benadryl, and took things slowly, using the modification manager through each save. and came to a conclusion, it was something in the world map section...
the section "common data", I had edited the world map/Places texts, probably had too long of a text, resulting in a oversized .hws and resources.assets.

I had this problem a long time ago, forgot how I fixed it, now I see how. I never touched, World Map/Places texts, cause it always corrupts something!

Thanks as always, Tirlititi!
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-18 22:08:20
Tirlititi can u make a video tut of how to use the steam script system like ones u found for magic stones? i dont know how to edit them lol.

also is there any way to change in battle menus to be ALOT smaller? like 50% to 75% smaller?

also i noticed in the steam version when i modded the shops no changes were applied in the game even tho files say they were changed.

also for psx side of the tool if u rename a monsters spell it crashes the tool instantly
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-19 22:40:16
last question to finalize another game,

Tirlititi,
I still have this weird bug when adding random encounters to an area that never had it. (ex. Quan's Dwelling)
After the battle ends, the player will become frozen and so will any background animations. Even if I add/had EnableMove() function, it still freezes/locks in place
How do you fix this? There have to be more commands to add than just SetRandomBattleFrequency()

And, how do I prevent the title intro area text from displaying the first time you access a new field, like Quan's dwelling?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-19 22:57:23
Ah, maybe you need to add a function "Main_Reinit" to the script for those fields. That's a function that runs at that point (when the game returns to the field after a battle).

Check out the script of a field in which there are random battles (or even non-random battles), they usually have this function ; I won't test now, but I guess you can simply copy the script from it and paste it into a Reinit function that you add in your modified field (right-click -> Add function -> choose function ID to be 10).

Also, maybe you'd need a "Zidane_Reinit" as well ; IIRC ( :p ) there is one most of the time in order to setup the footstep sounds again after a battle.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-20 00:50:21
I'm testing this right now...
And is it possible to change which enemies is encounters in the world map?



side note:
found a bug,
It seems if I put a battle from field to another, the battle music will not play, instead it "acts" like if the "Don't stop music" flag is checked (which it isn't)
example:

the Mandragoras are only found on the world map, right; so if I put them on a field (like Iifa Tree) the battle music will not play, and the "don't stop music" flag is oddly applied.
Then, of course, after winning the battle, the music will go dead silent until the player enters another field background that calls to play the IIfa Tree's bgm again.
A weird bug, yes.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-20 04:28:43
I tested it, and it looks like I do need the Zidane_reinit; footsteps did not play.

while the control over the player was regained, other glitches happened:
see video after battle:

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

And of course the battle music not playing bug, which is a no go. Need that battle bgm playing!

EDIT: looked through some fields, don't see a "Zidane_renit" function. Just Zidane_11 and such...
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: kenichi on 2017-04-22 15:56:56
is this tool support that characters;
İ-Ö-Ü-Ç-Ğ-Ş-ı-ş-ç-ö-ü-ğ.

Same ı wrote it. and anyone tell me how to use this. Please just basic information detailed miex my mind.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-04-23 05:06:04

Tirlititi  is there any way to enable use of stones/abilities on off chars on psx side of the tool? if u have the patch for it?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-23 20:58:31
UPDATE: I found the how to add Zidane_renit function, but have yet to see any other field that have Zidane_reinit naturally.
What goes in this function...?
I tested around, I added random battles to the entrance of Daguerreo (which already came with a Main_reinit) function but no Zidane_renit function, and the footstep sounds (and background image) was perfectly working after the battle.

I'm guessing the other fields that have random battles don't exactly use the term "Zidane_reinit" but is one of those...Zidane_17, Zidane_11 functions?

And the battle audio only playing for enemies set in there native fields,
Do the fields backgrounds have ID's like enemies have ID's? Cause maybe I have to mod the BtlEncountBgmMetaData.txt.txt for this bug to be fixed...
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-23 23:25:25
I solved the battle music not play bug!
My details, served as a tutorial:

for battle music not playing:

if you add an enemy to a field where the enemy isn't originally located.
You have to edit the BtlEncounterBGMMetadata.txt
find the field your adding this enemy too's ID number,
and add that enemy's original
    "107": "125"

to the field slot.

Example:
I have Hilgigars as random encounter in Memoria Ruin,
to make the battle music play, do this:

Find an enemy that is oringially from the Memoria/Ruin field, get their ID number. Find this ID number in BtlEncounterBGMMetadata.txt
now you see the ID number of the field: Memoria/Ruin.
(Its 2909)

And you see underneath "2909" Two enemy id numbers:
Iron Man(929) and Chimera(955). This is correct, because originally these are the only two enemies fightable in the Memoria/Ruin field.

So now, we just simply add Hilgigars enemy ID to this section:

Original:

  "2909": {
    "929": "0",
    "955": "0",

to:

  "2909": {
    "929": "0",
    "955": "0",
    "107": "125"

"107" is Hiligars's ID number and 125 is the BGM audio ID number. (In my case, its "Protecting my Devotion" song changed to: "The Eidolons Shackled" from FFIV.

The World map is the same thing:
it has ID's to certain locations on the WOrld Map (ex. Bentini Heights/Donna Plains etc.)

How I find field ID numbers that don't already have enemies, I count up the list from a field that does.

video result:

https://www.youtube.com/watch?v=5rtU3rhqars
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-24 15:10:52
@resinate: I thought I had a patch for that, but I can't find it anymore...

@ddclem: yep, fields have ID, like pretty much everything.
You can also get the ID from the Script Editor: write a line "Field( 0 )" anywhere in a script and you'll have the list of fields displayed on the right. Selecting a field there will write the appropriate ID instead of the "0".

For the "Zidane_Reinit", yes it sometimes doesn't exist and there's a "Zidane_11" or whatever instead. But then that function "Zidane_11" is called from the "Main_Reinit" (there's a line "RunScriptAsync( 0, 250, 11 )" ). Using directly a function Reinit, there's no need to call it from "Main_Reinit".
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-24 17:01:24
thanks for the info! More convenient! Fixed a problem error I had in Eidolon's Cave before.

and progress update;
will there be a proper model importer in HW? I don't think saving the new model i want imported back as a .fbx is working... then again, there are lot of export options for .fbx...
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-24 20:13:12
the Zidane_reinit, do you know exactly what I can copy and paste into this field, I'm not getting anywhere with getting the footsteps sound back.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-24 20:21:30
It usually looks like this:
Code: [Select]
Function Zidane_Reinit
    RunSoundCode( 4616, 914 )
    RunSoundCode( 4616, 923 )
    RunModelCode( 16, 25, 4, 914 )
    RunModelCode( 17, 25, 4, 923 )
    RunModelCode( 18, 25, 4, 1 )
    RunSoundCode( 4616, 914 )
    RunSoundCode( 4616, 923 )
    RunModelCode( 16, 25, 13, 914 )
    RunModelCode( 17, 25, 13, 923 )
    RunModelCode( 18, 25, 13, 1 )
    RunSoundCode( 4616, 914 )
    RunSoundCode( 4616, 923 )
    RunModelCode( 16, 38, 0, 914 )
    RunModelCode( 17, 38, 0, 923 )
    RunModelCode( 18, 38, 0, 1 )
    RunSoundCode( 4616, 914 )
    RunSoundCode( 4616, 923 )
    RunModelCode( 16, 38, 8, 914 )
    RunModelCode( 17, 38, 8, 923 )
    RunModelCode( 18, 38, 8, 1 )
    return
However, the sound IDs change from field to field (as the footstep sound changes). Check out the "Zidane_Init" function to get those.

There will be a model importer eventually. You won't be able to re-import the currently exported models though.
But I said that already.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-24 21:22:58
Excellent! I was on the right track! Now that you mention the sound ID, that's why it still isn't playing! makes sense.

Okay,
For the finale, what is the script command to the end with game? Ending the game with the "The End" sprite, and skipping the final two FMVs?
Ex.: the game to ends after the final boss.
Oh and also, how do I make the "Quan's Dwelling" title not show when you first enter it?

Thank god the model importer, tho!
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: DanTsukasa on 2017-04-25 11:10:39
Progress on this program is fantastic! Amazing work here Tirlititi!
1 step closer to possibly having an exportable FF9 world map (with UV's), really looking forward to this.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: livegood118 on 2017-04-25 22:09:34
Hi,

Thanks for this great tool - great to see twenty years after release that FFIX is getting the attention it deserves.

I've been trying to install the fixed stats mod by Vir with Hades Workshop on the Steam version of the game (http://forums.qhimm.com/index.php?topic=16703.0)

Unfortunately I'm getting a crash when the game loads up and I'm wondering if you'd be able to help me with it.

When I download the Steam version of the fixed stats mod there's four separate files ("FF9 Fixed Stats D1 - D4"). This is what I do:

1. Load up the FFIX launcher (located in the folder where x86 and x64 is) in HW
2. Click on Open Mod
3. Load in each of the four files after one another, unticking each time (I've checked the item browser and the stats seem to be changed properly)
4. Click on Save Steam mod and save the files in the hades workshop mod folder
5. The two files created as a result of this process are a resource file and a C sharp file.
6. I drag and drop the files from the Hades workshop mod folder so that they replace the existing files

However, when I boot the game, I get the White FFIX Title and then absolutely nothing afterwards  :-\

Verifying the integrity of the game cache gets it working again so it'd definitely something I'm doing wrong with HW that's causing the issues.

Thanks for any insight you can provide.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: livegood118 on 2017-04-25 22:41:51
Hmm - I read a few more forum posts and I did it without moving over the C-sharp file.

It seems to have worked!

But will I run in to problems further down the line if I don't include it?

Edit: Hmmm - I did the cheat to give me level 99 and my stats only reached vanilla levels without equipment. Does the Lvl 99 cheat on the steam version bypass the MAG/STR/SPD/SPR bonus you get each level? Also were the resources files produced supposed to be the exact same size, down to the byte?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-04-26 17:51:33
@livegood118: The Assembly-CSharp.dll is important for Vir's mod. I'll take a look at it.
However, you'd only need to import 1 file, not 4.

@dclem: The titles are background tiles. You manage them in the script with functions such as "ShowTile" or "SetTileColor". For Quan's dwelling, it happens in the first half of the "Main_Loop" function.
For ending the game, it's a special call to "Field( 16000 )". It triggers the ending cinematics though (based on the the CIL Code of "EndingMain").

@DanTsukasa: I don't know about the World Map model. I surely went a step further for it, but it may still be a long way. Plus that's not my personnal priority.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-26 20:13:16
I see that field(2934) in Field: last/cw mbg 1
Can I simply put the Field(16000) in Necron's (Loop) function after his death animation?
And for canceling the trigger o f the cinematics, in the CIL code do I just remove all the commands:

callvirt 0x6000A79   // MBG::LoadMovie

callvirt 0x6000A7B   // MBG::Play


If I can't remove the cinematic for this ending field(16000)

How can I make a MUsic BGM play during Necron's death?
I've tested so far, trying to run a sound code to trigger Music with ID 41, but that didn't work.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: livegood118 on 2017-04-27 07:47:43
@livegood118: The Assembly-CSharp.dll is important for Vir's mod. I'll take a look at it.
However, you'd only need to import 1 file, not 4.

Yeah, unfortunately the patch didn't apply correctly after only moving the resource file over (Observable by items still giving +1 to stats). Maybe it'll wreck my save if I try to do anything mid-game?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-27 12:19:11
yeah, i want the ending set after the death of final boss, literary right after; somewhere I can put this ending script command in Necron's script, and not one the fields backgrounds.
how do I trigger a music track to play during battle? this only for an alternative I'm testing.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Fraggoso on 2017-04-27 12:58:53
Dclem when do you will release your sfx patch?
Are you not going to add any sfx like the ones you used from FFXII?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-27 19:40:04
I never added any sfxs, I used some from FFXII as tests, then replaced with FFIX afterwards.
the sfxs is done -  with only an exception:
The eidolon summons sfxs could not be found; but that's mostly due to the fact that it's like composed of like, 26 different sfxs ranging from all different types of sounds no one could recognize, not even an id to identify them. They also play at different timed intervals, which gave me major problems when attempted to fix the squeal of some of the sounds they make.

Menus:
I can't find the FFIX psx menu sounds, after replacing it with my testing ones, not that these sound any different than what came with steam.
I also fixed sound bugs that occurred with events like: the lightning not properly playing during the Prima Vista theater stage fight:

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

compare that to the vanilla version's sound. That's one among many.

the patch will be available after I find those menu sounds again.
if you can't do with the new menu sounds.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-04-30 21:54:31
yeah, i want the ending set after the death of final boss, literary right after; somewhere I can put this ending script command in Necron's script, and not one the fields backgrounds.
how do I trigger a music track to play during battle? this only for an alternative I'm testing.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-01 22:04:51
hey Tirlititi is there a way to make a psx patch to expand number of auto abilties on chars so i can use all of them on every char?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-02 08:42:31
Something is wrong with the Disc 1 first entrance Alexandria Main Street title tile block.
It won't remove even if I remove the ShowTile and SetTileColor commands! It just sits there permanently on the screen every time this field is accessed by the player!
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-02 22:37:03
@livegood118: Indeed, the .hws provided by Vir are not working for now. Use this one instead (I compiled it from his .ppf):
https://www.dropbox.com/s/14ger23aouudy9p/FF9%20Fixed%20Stats.hws?dl=1

@dclem: In battle, the script line is "RunBattleCode( 37, 2929 )" for running the end-game cutscenes, starting right after Necron's battle. Put it in the "Main_Init" function, next to the InitObjects.
I don't know for playing a music during a battle, other than modifying the BgmEncounterData thing.
In Alexandria's Main Street, you probably removed the lines "ShowTile( 11 and 12, 0 )" in the "Main_Init" function, which isn't good. Those lines are here to hide them. The code used to display it once is in the "Code14_19" function (which is called in the "Alexandrian_GirlA_Loop" function since the title appears the same instant as her).

@resinate: Not really. It might be possible to increase that limit on Steam but not on PSX. What you can do is transforming learnable spells into learnable auto-abilities in the "Stats" panel (you have the learnable ability lists). However, the total of "learnable spells + auto-abilities" can not exceed 48. You can only trade-off.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-03 07:33:05
What about editing the CIL code for the Field (16000) not trigger those ending cinematics? What do I remove to not make the FMVs play, just skip right to the THE END sprite?
(Assuming the "Prologue FFIX music will play regardless).
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-03 07:49:06
Tirlititi is there any word on being able to modify the auto abilities like changing auto haste to auto trance? or changing them into auto protect/shell? and change stuff like 20% hp to like 80%? stuff like that. we can mod spells and all that. just asking
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-03 07:55:35
nope, says in HW help, cannot change the effects of supporting abilities.
one would hope to have an supporting ability that prevents zombie or mini.
i called it, "Faith" and "thinking big".  :?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-03 08:19:08
What about editing the CIL code for the Field (16000) not trigger those ending cinematics? What do I remove to not make the FMVs play, just skip right to the THE END sprite?
(Assuming the "Prologue FFIX music will play regardless).

Nothing happens after putting the Field(16000 next to (InitObject) in Main_Init section of Necron script.
Just sits there with a blank screen
and this in the output_log.txt

Code: [Select]
  at HonoBehaviorSystem.Update () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

InvalidProgramException: Invalid IL code in EndingMain:HonoUpdate (): IL_009c: stfld     0x0400179d

and wasn't there a tutorial somewhere on to create new enemies? or least modify an existing one to my preference?

I'm tying to make series of bosses, with at least 22 spells, and 8 dummy objects to cast most of it for the enemy, much like Necron.

Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-03 10:33:43
@resinate: It is possible, but on Steam version only, and it requires editing the CIL code, again.
Since Memoria Engine will allow to do it more conveniently, I stoped developping CIL macros for that. However, changing a HP +20% into a +80% is quite simple and can be done like this:
1) Find the method "ff9play::FF9Play_GetSkill",
2) In the second half of the method, spot these lines:
Code: [Select]
ldarg.1
ldind.ref
ldarg.1
ldind.ref
ldfld 0x40008AB // FF9PLAY_SKILL::max_hp
ldarg.1
ldind.ref
ldfld 0x40008AB // FF9PLAY_SKILL::max_hp
ldc.i4.s 10
div
add
conv.u2
stfld 0x40008AB // FF9PLAY_SKILL::max_hp
There is a similar code 4 times in a row, for HP+10%/20% and then for MP+10%/20%.
3) Replace the two lines.
Code: [Select]
ldc.i4.s 10
div

// Replace it by:
ldc.i4.s 80
mul
ldc.i4.s 100
div
This changes it into +80%

@dclem: First, I would like you to stop double-posting like that. You have a button to edit your messages ><
It makes it difficult for me to answer cause I have to browse the page, and besides it makes you ask the same question several times for nothing.

Secondly, you could read what I told you: it's "RunBattleCode( 37, 2929 )" in battle, and not "Field". If you tried that, you would have seen that 2929 is the field ID and so can be replaced by 16000 for your purpose.
And for the CIL code of the cinematics, I don't know. But I suspect it will be difficult to remove those steps like that. You'd better replace the cinematics by some black screen cinematic during 0.1 second or something similar.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-03 19:37:55
let me just stop,
I'm better than this.

take my pill and just.

The script:
Still doesn't work either way, but if you can't figure it out, I've got an alternative.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-04 21:30:14
its fine im sticking to the psx version for now, im not able to port the mod to steam it breaks the game if u load an auto save
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-11 00:10:58
is there a way to make a global variable that can be called upon on every battle. i wanna use a life system where certain bosses have x amount of lives when it hits 0 then battle is won.

pretty much like this: var life = 10: if (HP == 0 && life == 0) {end battle} else {if (HP == 0 ) {Restore HP to full: life =-1}}
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-11 13:45:30
It's the same trick as artificially increasing the max HP limit of bosses. You can find a very detailed example of how to do it for Kuja here (http://forums.qhimm.com/index.php?topic=14315.msg224426#msg224426). It's similar for any boss (in particular those who have this kind of system "when under 10 000 HP -> dies").
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-12 00:19:45
u sir thanks soo dam much for that script. i did some tweaks of my own and my god its amazing lol

i have found that it cant be applied to all bosses tho sadly but ones i needed were able to do so
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Kefka on 2017-05-13 14:58:03
@Tirlitit: on the topic of Enemy AI editing: this may seem like a dumb question, but is there a way to make it so that Zorn and Thorn don't immediately lose their charged magic after every single attack? I'm looking for ways to make this battle at least a little bit harder, but simply boosting the power of their spells won't really be sufficient considering that it's so easy to prevent them from using them in the first place. I was thinking of maybe making it so that you'd need 2-3 attacks on a charged clown to cancel their spell instead of just one. But my efforts so far didn't really accomplish anything. Thanks in advance for any help.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-13 16:31:18
It's is possible to do that without a lot of changes.

Zorn and Thorn both have a flag stating whether there spell is available or not. It's "VAR_GlobUInt8_28" of Zorn (or "zornpoweron" if you imported the LocalVariables.hws, which is recommended for AI modding), and it's "VAR_GlobUInt8_29" for Thorn (or "thornpoweron").

When their spell becomes available, that flag is set to 1, and when it's not available anymore, it's set back to 0. What you need to do is turn those variables into counters instead of flags: you set it to 3, for instance, and you decrease it at each attack, canceling the spell only if it reaches 0.
CounterEx becomes like this:
Code: [Select]
Function Zorn_CounterEx
    if ( GetAttacker == SV_FunctionEnemy ) {
        if ( GetAttackId == 7 ) {
            set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
        }
        return
    }
    if ( GetAttacker == thorn ) {
        if ( ( GetAttackId == 13 ) || ( GetAttackId == 14 ) ) {
            set zorn[PREVENT_ATTACK] =$ 1
            set thorn[PREVENT_ATTACK] =$ 1
            set SV_FunctionEnemy[ATB] =$ 0
            set zornpoweron = 3                                         // HERE: setup the number of attacks required to cancel the spell
        }
        return
    }
    if ( #( SV_FunctionEnemy[HP] <$ hp ) ) {
        set hp = FirstOf(SV_FunctionEnemy[HP])
        if ( ( GetAttackCommandId == 18 ) || ( ( GetAttackCommandId == 27 ) && ( GetAttackId == 122 ) ) ) {
            return
        }
    } else {
        set hp = FirstOf(SV_FunctionEnemy[HP])
        return
    }
    if ( zornpoweron ) {
        set zornpoweron--                                         // HERE: decrease the counter instead of directly set it to 0
        if ( zornpoweron==0 ) {
            BattleDialog( 24 )
        }
    }
    set SV_FunctionEnemy[STAND_ANIMATION] =$ 0
    set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
    return
And in the counter:
Code: [Select]
    case +2:
        if ( zornpoweron ) {
            set zornpoweron--
            if ( zornpoweron==0 ) {
                BattleDialog( 24 )
                set SV_FunctionEnemy[STAND_ANIMATION] =$ 0
                set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
            }
        } else {
            set SV_FunctionEnemy[STAND_ANIMATION] =$ 0
            set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
        }
        return
    case +3:
        if ( zornpoweron ) {
            set zornpoweron--
            if ( zornpoweron==0 ) {
                BattleDialog( 24 )
                set SV_FunctionEnemy[STAND_ANIMATION] =$ 0
                set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
            }
        } else {
            set SV_FunctionEnemy[STAND_ANIMATION] =$ 0
            set SV_FunctionEnemy[PREVENT_ATTACK] =$ 1
        }
        if ( ( !zornpoweron ) && ( !thornpoweron ) ) {
            set #( SV_Target = thorn )
            Attack( 6 )
            set waitingpowerthorn = 1
        }

And you do the same for Thorn. They have a symmetric script.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Kefka on 2017-05-13 18:53:06
Yay, I've just tried it out and it works like a charm! Thanks a ton! Now it's finally possible to make the Zorn and Thorn battle more challenging. After a bit of testing I can say that when you need 3 hits on a clown it's still possible to knock them out of the charged state, but you need to be real quick, and they will get off their attacks quite frequently now.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: resinate on 2017-05-14 04:42:16
hey Tirlititi whats max value of a variable in a script like ur HP life counter. how many "lives" can a boss have lol
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-14 10:03:59
It depends on the type of the variable actually.
Code: [Select]
UInt8 -> contains a value between 0 and 255
UInt16 -> contains a value between 0 and 65535
UInt24 -> contains a value between 0 and 16777215
Int8 -> contains a value between -128 and 127
Int16 -> contains a value between -32768 and 32767
Int24 -> contains a value between -8388608 and 8388607
Bool -> contains 0 or 1
The more the max value is, the more the variable takes of memory in the RAM. The following infos are important when you declare variables or use new variables in the script:
 - A variable of type "Int8" or "UInt8" takes only 1 byte of RAM, meaning that you can use both VAR_LocUInt8_0 and VAR_LocUInt8_1 without problem, for instance.
 - A variable of type "Int16" or "UInt16" takes 2 bytes of RAM, so if you use one, you can't use a variable that directly follows its numbering and is of the same type: you can use both VAR_LocUInt16_0 and VAR_LocSometype_2, but not VAR_LocUInt16_0 and VAR_LocSometype_1.
 - A variable of type "24" takes 3 bytes of RAM, so you need to let a gap of 2 in the numbering of variables that you use.
 - A variable of type "Bool" is special: it takes only 1 bit = 1/8 byte and has a special numbering. The number specifies the bit position in the RAM, not the byte position like the ones above. So VAR_LocBool_8 corresponds to the first bit of the second byte, meaning that you can't use both VAR_LocBool_8 and VAR_LocInt8_1 at the same time. More generally, you can't use AR_LocBool_N and VAR_LocSometype_[N/8] at the same time without conflict.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Kefka on 2017-05-15 16:44:25
Tirlititi, another question regarding enemy AI, mainly about certain symbols used: what exactly is the difference between:

"if ( GetRandom % 2 ) {"     and     "if ( GetRandom & 2 ) {"

I've always assumed they're pretty much the same ( a 1 in 2 chance), or how does the difference between the "%" and the "&" affect propability? Like for example in the Tantarian ATB function, it contains a switch that goes like this:

            switch 2 ( GetRandom % 4 ) from 0 {
            case +0:
                set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
                Attack( Edge )
                break
            case +1:
                set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
                Attack( Doom )
                break
            default:
                set #( SV_Target = SV_PlayerTeam )
                Attack( Paper Storm )
                break

Now the Random Number selected is a 1:4 chance, however the switch only has 2 possibilites (0 and 1), so half of the time the default attack is used instead of the switch (meaning that Tantarian has a 25% chance of using Edge, a 25% chance of using Doom, and a 50% chance of using Paperstorm, right?). Now If I were to increase the GetRandom to % 5 or % 10 or such, it would increase the chances for selecting Paperstorm and lower the chances for the other two attacks, correct? Just to make sure I'm reading things correctly.

And the other question: some enemies (Trance Kuja in this case) use HP-related conditions like this:

    if ( ( FirstOf(SV_FunctionEnemy[HP]) - 10000 ) < ( ( FirstOf(SV_FunctionEnemy[MAX_HP]) - 10000 ) >> 1 ) ) {

I'm unsure of how to read this, what's the meaning of the ">>1" at the end? All I can say from observation is that Trance-Kuja never counterattacks when his HP are near max, but does so quite frequently when his HP drop below a certain point (about half his max HP, roughly).
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi on 2017-05-15 17:05:56
% is the modulus operator, it gives the remainer of the euclidean division. You nailed it right (all your assumptions about Tantarian's AI are correct).
& and >> are bitwise operators, in the sense that they have a meaning on the bits rather than numbers.
https://en.wikipedia.org/wiki/Bitwise_operations_in_C

What you need to remember most of the time, it's that "GetRandom % 2" and "GetRandom & 2" are indeed equivalent, but it's not the case anymore with larger numbers.
"(GetRandom % N)==0" is a 1/N chance to occur.
"GetRandom % N" is a (N-1)/N chance to occur.
"GetRandom & 1", "GetRandom & 2", "GetRandom & 4" are all 1/2 chances to occur.
"GetRandom & 3" is a 3/4 chance to occur (it's the independant probability of having either "GetRandom & 1" or "GetRandom & 2").

For >>, you can see it as divisions.
"A >> 1" is the same as A/2,
"A >> 2" is the same as A/4,
"A >> 3" is the same as A/8,
etc...
The result is always truncated (5 >> 1 = 5/2 = 2 for instance). There exists only integral numbers in FF9.

For Kuja's AI, it indeed connects the counter-attack only if Kuja's HP are below half of his Max HP without counting the extra 10 000 HP (so it's half of his in-game visible Max HP, not the number that appears in the datas).
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Kefka on 2017-05-15 18:32:10
Thanks for the quick reply, it starts to make more sense now. So "GetRandom & 3" is basically like "GetRandom & 1" and "GetRandom & 2" in succession, resulting in 75% chance total (two 50% chances).

And for example, "GetRandom & 7" would then be like "GetRandom & 1" plus "GetRandom & 2" plus "GetRandom & 4", resulting in 3 x 50% chances = 87,5% final chance, right?

I'm gonna read that wikipedia page thoroughly sometime, I guess it'll be really helpful to non-programmers like me.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-15 22:34:38
Thanks for the quick reply, it starts to make more sense now. So "GetRandom & 3" is basically like "GetRandom & 1" and "GetRandom & 2" in succession, resulting in 75% chance total (two 50% chances).

And for example, "GetRandom & 7" would then be like "GetRandom & 1" plus "GetRandom & 2" plus "GetRandom & 4", resulting in 3 x 50% chances = 87,5% final chance, right?

I'm gonna read that wikipedia page thoroughly sometime, I guess it'll be really helpful to non-programmers like me.

You look like you pretty much understand how things work here.
Unfortunately people just think everyone is supposed to know this stuff.
thanks for reminding me how much i suck at math.
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-16 20:04:45
now what you gonna do?

keep being silent?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Fraggoso on 2017-05-16 20:07:11
If he replies I highly doubt you'll understand anything so why asking?
Are you that eager to get slammed with mathematics?
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: dclem on 2017-05-16 20:13:01
I'm not playing with you no more. don't f*ucking talk to me anymore.

*talkin' about "ain't attackin my illness". get yo lyin' ass outta here!
Title: Re: [FF9] General editor - Hades Workshop (0.37c)
Post by: Tirlititi