[PSX/PC] General editor - Hades Workshop (0.50b)

  • Thread starter Thread starter Tirlititi
  • Start date Start date
Status
Not open for further replies.
Your error is perfectly understandable: that's because of me.
I decided to automatically name several functions with "XXX_Loop" (the functions with ID 1) because that's what they do most of the time. However, it's not because they are called like that that they loop: they loop because they have the lines "Wait(1)" and "loop" at the end most of the time.

In this case, "Lich_Loop" doesn't have those lines but simply returns at the end. You don't want to just replace the "return" by a "Wait(1) + loop" either because it would run the dialog again everytime.
The easiest solution there is to put the looping part in an infinite "while" loop:
Code: [Select]
Code:
    // ...    RunBattleCode( 35, 0 )    while ( GetBattleState != 4 ) {        Wait( 1 )    }    while ( 1 ) {        if ( #( SV_FunctionEnemy[HP] <$ 10000 ) ) {            if ( VAR_LocUInt8_60 < 1 ) {                set VAR_LocUInt8_60++                set SV_FunctionEnemy[HP] =$ 40000            }        }        Wait( 1 ) // If you forget that, the game will freeze    }    return
More generally:
‣ The "XXX_Main" function runs as soon as the entry is initialized; the script level is set to 0 until it returns, which means that you shouldn't use any RunSync or similars inside the main function that would run a script of the same entry (you can use a RunSync on another entry though, provided that entry was initialized and its main function already returned),
‣ The "XXX_Loop" function runs right after the main function ends; the script level is defaulted to 7 so you can use RunSync codes inside. It runs only once.

In Field and World Map scripts:
‣ The "XXX_Reinit" function runs after returning to the field from a battle. Several datas are flushed when a battle triggers and this function set them back.
‣ The "XXX_Range" function runs every frame when the player's character is close to an object (determined with the collision radius set by SetObjectLogicalSize) or inside a region. It should only be used with entries initialized by InitRegion or InitObject.
‣ The "XXX_SpeakBTN" function runs when pressing the "confirm" button while the player's character is next to the object and facing it (the radius is determined with the talk radius set by SetObjectLogicalSize) or inside a region. In Steam, its presence adds an icon over the player's character. It should only be used with entries initialized by InitRegion or InitObject.
‣ The "XXX_CardBTN" function works the same as "XXX_SpeakBTN" except that it's triggered by the "card/moogle" button.
‣ The "Main_Unk" function runs when a menu opens on a World Map (either the player opens the main menu or the script issues a Menu code).

In Battle scripts:
‣ The "XXX_ATB" function runs when the enemy's ATB gets full. Attacks issued inside are added as "Enemy Command" at the end of the command queue. It has to issue an attack command.
‣ The "XXX_Counter" function runs when the enemy has been affected by an attack from a player character that was not a counter-attack or a Charge!, etc... and if it still has more than 0 HP. Attacks issued inside are added as "Enemy Counter" commands and take priority over most of the other commands.
‣ The "XXX_Death" function runs when the enemy has been affected by an attack from a player character, if it has 0 HP and if the related flag is enabled. Attacks issued inside take priority over most of the other commands. Attacks issued inside are added as "Enemy Death" commands and take priority over most of the other commands.
‣ The "XXX_CounterEx" function runs when the enemy has been affected by any attack.
 
Last edited:
This is great, thanks. All I need to do now is refit a few of the other bosses with this method and I should be just about ready to get this whole thing out there.

Also thanks for the rundown on what the different functions do, especially the field scripts. I've got it in my head to eventually make a couple of bonus fights in Memoria but I had no idea where I would even start with that. I think I'm going to get this project out there before I get going on that though, I think it's going to get fairly complicated as the enemy scripts go assuming I really run with what I have in mind.
 
Hey Tirlititi, I've got a quick question regarding the normally enemy only Easy Kill status: would anything go horribly wrong if the player were to have access to this status in any way? Specifically I'm wondering if it persists outside of a fight, I'd assume that if it does it'll never wear off, which presents a bit of a problem if I wanted to try to turn it into a buff.

The main reason I'm asking is because I've been messing around with this concept a little bit just to see how it works and unless there are a number statistically unlikely things happening in a row during my testing I'm getting the distinct impression that the status doesn't ever wear off. It doesn't seem to wear off after a character is killed, which is good,  but it seems as though it's lasting forever on top of that.
 
In the PSX version, I'm not sure. However, in the Steam version, it shouldn't last after the fight.
Dying indeed doesn't remove that status but being dead prevents from it to be applied.
So the only ways to remove that "Easy Kill" status (which should better be named "Easy Kill Proof" as it prevents different spells to affect the wearer) are (1) to finish the fight and (2) to use a Esuna-like spell that can remove it.

Normally, it is only used as an "Initial status" on the enemies so an Esuna-like spell may also remove it if it can target the enemies or be reflected. Removing it is unsafe as it can softlock the battle if something bad happens to an enemy that normally has that status (if it gets eaten, for instance).
 
Okay, thanks. All of the death misses I had must be due to something else, I'll have to figure out what that is. Truth be told I'm not sure if I'm going to wind up sticking with the status anyway because it seems way too situational to be worth it much of the time. It's kind of fun to play around with though so if I can find a way to make it more practical I might work it in somewhere.
 
Hi Tirlititi,

I have another dumb question. PS1 emulated version.

Is it possible to change the player model in one scene? For example I want to change long haired Dagger into short haired Dagger in Gargan Roo, just for fun. However when I change the model with Hades Workshop, the player becomes invisible. Is there something I am missing, some other value I need to change? Short haired Dagger's model seems to be 76. Thank you for your help in the past. This may be impossible to do?

bfc1cffa4e240b238ae3823f900b08f292a8649a.png

8ca3a3af327f4ba1ac410fd652ab9da5bc1f6430.png
 
Last edited:
There are 2 problems about that when modding the PSX version:

1) Not all the models are available in every field. Most of the time, the models and animations are packed in each field (so there are actually many duplicates in the game's datas) and you can use only the models that are there already.
Fortunatly, there are exceptions and Dagger's models are amongst them: the models of the party members (including the temporary party members) are always available, whatever the field. However, her full set of animations is not available, only the basic ones (stand, walk, run, turn left/right). It might be that the animations of both of Dagger's models (short/long hair) can be used on both models though.

2) You need to register the models and animations that you use in order to have them available. That's probably the problem you have there.
Outside of the script, there's a button "Preloading datas": go there and add Dagger's models and animations to the list of datas to use. You also need to link the model to Dagger's script entry ID there.
 
Thanks so much for the reply! It was really helpful.

Forgive me, I'm really dumb. What is the script entry ID? I'm not sure where to find it.

3cc7328a94b4c8d63e84a309ecda351741f63846.png
 
That's the ID of Dagger's entry in the script.

In concrete terms, you go in the script, in the function "Main_Init" and search for the code line initializing Dagger's model:
"InitObject( ID, [Some other number, surely 0] )"
When selecting those lines, you have the drop-down menu of entries that appear on the right of the window. You know that the line concerns Dagger's entry when it's written there on the right.

The script entry ID is that number given as the 1st parameter of "InitObject".

Alternatively, you can simply write a line "InitObject( 0, 0 )" in any function of the field and search for Dagger's entry in the drop-down menu (it will update the ID automatically in the textual part then). And then exit without parsing.
 
You're an absolute genius, thank you so much!

It's weird but this makes me so happy, I wanted to play as Dagger with short hair since I was a kid lol.
Now I know it's possible I'm going to change more scenes.

So curiously in the previous Gargan roo entrance, her short hair model is fine.
But in this field, the model has odd lighting. Overexposed in parts, and pitch black in some shadows. Not a big deal, but any idea why?

You've already helped me heaps, thanks!

edit: nevermind, it was just a random glitch

35aa28fe1fab1fa9ab59c45a2a433eb6b67d1015.png

6eb6ecc753594d9bb98a5092fdc51b4505fd119e.png
 
Last edited:
just seen a magic bonus formula available for weapons... does it work? and how... just like the spirit and speed ones?
 
Yes, it works correctly and it uses the same kind of formula as the spirit and speed boosts.
Actually... I always thought that these were bonuses... but reading the formula again from the source code and Rebirth Flame's FAQ, it's more like an averaging than a bonus...
Code: [Select]
Code:
Damage = (Atk - Def) * (((Strength + OtherStat) / 2) + Rnd MOD (((Lvl + Str) / 8) + 1))
So it uses (Strength + OtherStat) / 2 for these special weapons instead of Strength for the normal weapons?
I always thought that these weapons used Strength + OtherStat / 2... No wonder why there is not such a difference in the damage outputs.

Only the Save the Queen's damage formula can really be considered as a boost then.
The formulae displayed in HW are all wrong :/
 
The formulae displayed in HW are all wrong :/
They are displayed? Also yeah, i assumed the averaging: the wiki at Final_Fantasy_IX_weapons has the same formula you reported.

nice anyway. I can make staves and rods use magic without issues lol.
 
Sorry to bother you again, but i was looking at command formulas and... isn't Jump very weak? Assuming same atk, def and multiplier, multiplying the attack (like shock, free energy etc) is better than multiplying [atk-def] like jump does.

Moreover, Power Jump grants only a minor improvement (x1.33) compared to something like power throw (x1.5 + vs. aerial bonus + berserk bonus) and is acquired similarly late. Also dunno what to think about the increased randomness in Trance Jump but i'll see that later.

What do you think, considering you didn't really change Jump in your mod?
Also, if i were to change it, could you please tell me where to look for among the CIL code section?
 
It is not very weak, no. The "physical strike" (Shock, Free Energy, etc.) formula is exactly the same (it also takes the defence into account) provided that it has a power of 15 (Free Energy is in this case for instance).

Damage Free Energy = (1.5 * Atk - Def) * Bonus
Damage Jump = (1.5 * Atk - Def) * Bonus
Damage Shock = (3 * Atk - Def) * Bonus

The difference is that Jump costs no MP, is available from the start and has the feature of making Freya untargetable for some time.
High Jump raises Jump's damage to "(2 * Atk - Def) * Bonus", which is the power of Scoop Art.
Of course, if you take damage boosts into account, then the attack command can be tremendously better (there's a reason why it's used in speedruns), but it requires a better preparation and being in front row.
However, the trance damage formula is really bad indeed. The added randomness (similar to Quina's attack) makes it very weak and it's not even counter-balanced by the multi-targeting since the damage are spread (so "more enemies = less damage per enemy").

In my mod, Spear has the same damage formula but it takes the properties of the weapon into account (elemental damage, killer abilities...) so it can be useful even in late game for damage. I had to edit the game's source code for that though. I also fixed the trance damage, removing the added randomness.

If you want to modify Jump's damage formula, you may need to edit the game's source code (that's the CIL code section, but I advise you to use an external tool, dnSpy, instead: it allows to modify the source code as well but it's way more advanced) but that depends on what you want:
1) If you want to make jump's damage use a different already existing formula (like Shock, where you control the multiplier), you can simply change it in the panel "Party -> Spells" and look for the abilities "Spear" at the end of the list: the first one holds the normal damage formula, the second one holds the trance damage formula.
2) If you want to use a new damage formula or if you want to modify Jump's "Freya leaves temporarily the field" principle, then you need to change the source code indeed. Specifically, you need the edit the class "btl_calc" (in dnSpy, open the game's "Assembly-CSharp.dll" and search for "btl_calc" inside the folder "-"). Here is what it looks like (I've rewritten the class in order to add comments and readability, but it's still C#). You can see that there is a case 48 and 83 for the formulae of Spear and Trance Spear in the main method CalcMain.
 
Good news then, i was misled by Hades Workshop's effect description. Psysical strikes have a [Atk * Mul - Def] in their formula description, while Spear has a Mul * [Atk - Def] formula (description only).

Issue with solution 1) is that High Jump becomes useless. dnspy sounds exactly like what i need, i had already found spear and trancespear in Memoria Engine's source but with that tool i can even study your changes.
 
Ok I'm dumb ><

Damage Free Energy = (1.5 * Atk - Def) * Bonus
Damage Jump = 1.5 * (Atk - Def) * Bonus
Damage Shock = (3 * Atk - Def) * Bonus

They are not the same indeed. I stand corrected.
So actually, Jump's damage works as if you had 1 damage boost compared to the "attack command without damage modifier".

If you download the Source files of Alternate Fantasy, you'll have a description of the changes I made in the Readme.txt. I think that it can help you understanding what does what. However, the class "btl_calc" was completly changed and there is no details of the changes for that, except the description of the mod in its topic.
 
Last edited:
So i'm right and jump is rendered completely worthless by... anything, like a killer ability. Unless they stack somehow.
Don't worry though, i'm comfortable with comparing changes and with the resources you provided i can change jump however i want. It's pretty easy to figure it out.
 
Last edited:
Still, "Command attack + 1 killer ability + front row" has same damage as "Jump + back row".
 
Status
Not open for further replies.
Back
Top