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

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #350 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).

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #351 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #352 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?
« Last Edit: 2015-11-13 11:31:16 by Tirlititi »

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #353 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
« Last Edit: 2015-08-27 21:40:33 by resinate »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #354 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.

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #355 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
« Last Edit: 2015-08-31 07:11:57 by resinate »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #356 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.

Kuroda Masahiro

  • *
  • Posts: 271
  • Stopped modding FF7.
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #357 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.

uzoko1

  • *
  • Posts: 14
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #358 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?

shikulja

  • *
  • Posts: 69
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #359 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.

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #360 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #361 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 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, 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 ^^
« Last Edit: 2015-11-13 11:15:28 by Tirlititi »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.28b)
« Reply #362 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 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?

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #363 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).

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #364 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.

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #365 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #366 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).

You can also cheat with the script and add artificialy more than 65535 HP to one ennemy ; an example is given here 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 !

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #367 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #368 on: 2015-11-06 09:55:17 »
Congrats ;)

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

The "SetTextVariable" 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 "SetTextVariable" is used in the script to tell which item's name should be written in place of that µ. Note: For the Steam version, text opcodes are written more explicitely.
That same "SetTextVariable" is also used for the other text opcodes of the same kind :
  • "[VAR_NUM]", to replace it with the plain number
  • "[VAR_TOKEN]", to replace it with a token of a tokenized string (that's usually a moogle's name)

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 "SetTextVariable" 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 "SetTextVariable" opcode is present :
Code: [Select]
                if ( ( GetItemCount(VAR_GenInt16_224) < 99 ) && ( VAR_GenInt16_224 < 512 ) ) {
                    RunSoundCode3( 53248, 108, 0, -128, 125 )
                    set VAR_GenUInt8_226 = 1
                    SetTextVariable( 0, VAR_GenInt16_224 )
                    AddItem( VAR_GenInt16_224, 1 )
                    WindowSync( "Received [VAR_ITEM]!" )
                } ....
Since you updated the variable "VAR_GenInt16_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 "SetTextVariable" 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_GenInt16_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 ( VARL_GenBool_7243 == 0 ) {
                        RunSoundCode3( 53248, 108, 0, -128, 125 )
                        set VARL_GenBool_7243 = 1
                        SetTextVariable( 0, 238 )
                        if ( 1 ) {
                            AddItem( 238, 1 )
                            WindowSync( "Received [VAR_ITEM]!" )
                        } else {
                            if ( 1 ) {
                                AddItem( 238, 1 )
                                WindowSync( "Received [VAR_ITEM] Card!" )
                            } else {
                                AddGil( 16776454 )
                                set VAR_GenInt16_224 = 64774
                                SetTextVariable( 0, VAR_GenInt16_224 )
                                WindowSync( "Received [VAR_NUM] Gil!" )
                            }
                        }
                    }
Here, you have to modify the number 238 into whatever item you want 3 times :
  • In the "GetItemCount" argument
  • In the "SetTextVariable" argument
  • In the "AddItem" argument
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 "SetTextVariable" and in the "GetItemCount" lines as well if you find those.
« Last Edit: 2017-10-12 19:47:03 by Tirlititi »

GARDIN

  • *
  • Posts: 13
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #369 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)

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #370 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.

Kuja Flarestar

  • *
  • Posts: 1
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #371 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

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #372 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.

EditorMaster

  • *
  • Posts: 53
  • Hex Editor
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #373 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 ? :)

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.30)
« Reply #374 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.