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

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #825 on: 2017-05-30 17:45:38 »
I was sent here regarding the chat/card icons issue, when you remove the lines from hades workshop and approach a NPC in the game it freezes the game. I'm trying to get rid of cheats/chat/card icons and fixing the music. I'm also waiting for a mod that modifies the UI of the battle system.

gorildo

  • *
  • Posts: 21
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #826 on: 2017-05-30 18:01:24 »
I ask because when you get Amarant, for example, you have that flag active for all chars

Code: [Select]
  }
        if ( ( ( VAR_GenUInt16_19 >> 0 ) & 1 ) == 0 ) {
            SetCharacterData( 0, 1, 255, 9, 0 )
            set VAR_GenUInt16_19 |= 1
        }
        if ( ( ( VAR_GenUInt16_19 >> 2 ) & 1 ) == 0 ) {
            SetCharacterData( 2, 1, 255, 6, 2 )
            set VAR_GenUInt16_19 |= 4
        }
        if ( ( ( VAR_GenUInt16_19 >> 1 ) & 1 ) == 0 ) {
            SetCharacterData( 1, 1, 255, 5, 1 )
            set VAR_GenUInt16_19 |= 2
        }
        if ( ( ( VAR_GenUInt16_19 >> 6 ) & 1 ) == 0 ) {
            SetCharacterData( 6, 1, 255, 6, 6 )
            set VAR_GenUInt16_19 |= 64
        }
        if ( ( ( VAR_GenUInt16_19 >> 7 ) & 1 ) == 0 ) {
            SetCharacterData( 7, 1, 7, 5, 7 )
            set VAR_GenUInt16_19 |= 128
            SetRow( 7, 1 )
        }

Why all chars have the "update level" flag checked? Their level doesn't change, only Amarant  :-o

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #827 on: 2017-05-31 08:40:04 »
Ok question, is it possible to change the font in the hades workshop for steam version of the game?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #828 on: 2017-05-31 16:28:46 »
@Lein: For icons, if the CIL mod I proposed doesn't work, then there's no solution with HW as of now.
For font, it can't be done with HW (or it is a CIL code that I don't know about), but it can be done with Memoria for sure.

@gorildo: Actually, these codes are not executed because the "if" conditions are not satisfied, except for the 1st time the character enters the team.
You can see that, for Marcus/Eiko replacement and the other replacements of the same kind, that "SetCharacterData" is out of an "if" block in order to let the (already initialized) character to get re-initialized.

Either these "if" blocks are here because they used macros, either they wrote it because it was useful for debugging purpose (they surely had a debug room that could move them to an advanced place in the game, skipping the normal initialization of the characters).

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #829 on: 2017-05-31 17:12:17 »
Yes your method did work, not removing the lines but putting ret at the top solved the problem. As for the font, memoria isn't very compatible with hades workshop. You either have to choose to be able to change the font or do all the changes that you're able to do by using hades workshop. I prefer using hades workshop since with that you don't have to install anything. You simply drag some files into the game folder. I want to use these mods for a friend of mine and I wouldn't want him to have to perform the modding himself, hades workshop is preferable which is why I think it's a shame that whenever you've not got something figured out you tell people to use memoria. Your program is better! Create more of them macros, they're very nice.
« Last Edit: 2017-05-31 17:15:09 by Lein »

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #830 on: 2017-05-31 20:36:48 »
That's because Albeoris worked hard to make the engine moddable and his way of doing things is better than mine in that regard (he has more "macros" and allows to recompile the whole engine while you can only tweak a few things with HW). It's much better to wait for a Memoria-HW compatibility than re-inventing the wheel twice. Since you care about organizing FF9 modding efficiently, you should know it's better not to do that.

Congrats on the icon script :)
« Last Edit: 2017-05-31 20:39:06 by Tirlititi »

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #831 on: 2017-05-31 23:02:11 »
It's much better to wait for a Memoria-HW compatibility than re-inventing the wheel twice.

Yaasss!
The time will come we'll see Memeoria+HW together!

Two men working together to make one unique, --- I can't wait!  ;D

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #832 on: 2017-06-01 03:09:59 »
What I would want to see with memoria is for it to be possible to make the mods produced with memoria something you can upload online and have some other person put into the game without having to do any modding of their own. Yes for the hardcore gamer/modder it's not much to ask to download memoria and install the program and then edit the ini file yourself. But for those who aren't aware of what kind of mods they're looking for, maybe someone who plays the game for the first time, this is a bit too much to ask of them. It would be nice to just tell someone, hey download this zip and throw the files into the game folder and it fixes all the flaws that exist in the port.

That's a nice feature of your program Tirlititi, that the mods are portable. The way I see it, ideally you would want to literally merge hades workshop with memoria. Hades workshop has a nice interface, memoria has an ini file. How about somehow implementing memoria's features into the UI of hades workshop and through hades workshop make the mods portable. Make one super modding program, what are your plans in the future regarding this Tirlititi?

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #833 on: 2017-06-03 06:41:44 »
Tirlititi,
You know the bug with the Back attack, how the ATB doesn't halt for 5 seconds like in the PSX?
Is there a fix to this?

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #834 on: 2017-06-03 13:43:01 »
I can't believe it another thing that needs fixing in the port, the encounter rate. I was able to walk through the evil forest and the ice caverns without a single random encounter. Were the philippino boys who made this port dropped on their head at birth, wtf. Is there some mod that enables random encounters again? Also there's another problem, autosaving, I know people might like it but what's the point of the savepoints then? The game was easy as it was already, now when there are no random encounters and if you die at a boss you can try immediately again, did they turn this into a interactive comic book?

Is there some way to fix this?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #835 on: 2017-06-03 14:05:01 »
@dclem: I didn't think of it, nice catch (I don't know how easily it could be fixed though... it's also an engine thing).

@Lein: I think Memoria can increase the encounter rate. It's not about "fixing it so it's the same as the PSX", but rather "enable high encounter rate cheat just like there is a no encounter cheat".
One of the problems for making this rate the same as the PSX is that I don't know exactly what was modified. See here for some details:
https://www.gamefaqs.com/boards/197338-final-fantasy-ix/75389893

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #836 on: 2017-06-03 14:40:10 »
@Tirlititi: I found the entry in your program hades workshop, every encounter rate seems to be at 20 while the max encounter rate is 255. Which means you're not likely to ever encounter random battles. I went through some of the ice cavern scripts and raised the encounter rate to 200, I assume this will fix the encounter rate. Problem is that there is like 700+ scenes and the encounter code thingy isn't at the same location in every script, in some I couldn't even find it like at the end of the ice cavern I found no encounter rate at all. Makes sense since at that point in the game you're with zidane alone, but still I know that when you return to the cave later in the game there are random encounters. It would be nice if there was some value somewhere that affected the encounter rate of all scenes. So you can just change that to 200 and you'll have a fight every 10 steps or so.

It doesn't have to be exactly the same as the ps1 game, just a lot more. To be able to run through evil forest and ice caverns without a single random encounter is stupid, what's the point of all those enemies if we never get to fight them. As for memoria, Tirlititi with hades workshop I managed to remove the icons when you chat, I don't think memoria can do that.

Man I just want to play a pc version of the same game that was on the ps1. I'm just gonna throw this out there in case someone would be able to do this with memoria without much effort.

•Disable cheats
•Disable autosaving
•Remove card/chat icons
•Increase encounter rate so it's similar to the ps1


•Change the font
•Resize the battle UI

So much that needs fixing and I've only been able to disable cheats and removed icons, new problems pop up as you keep playing the game. There are even some problems I'm ignoring such as:

•Wacky sounds when you walk
•Wacky sounds in general when doing certain stuff, just sounds too loud or off somehow
•No mist at the world map

And I've heard while reading on the forums that while you fight there are some issues too, issues I haven't encountered yet, pun not indended. When there's a mod that fixes the first 4 we release it as a mod on the steam forum and on here, so people can play the game as it was meant to be played. Tirlititi you're the master modder, I'm willing to help you anyway I can, I added you on steam so just send me orders and I'll do my best to help you achieve a pure/restoration mod.

EDIT: As for testing if Memoria can fix any of these issues, nope can't install it. Some kind of compatibility issue.
« Last Edit: 2017-06-03 16:19:57 by Lein »

sutebenukun

  • *
  • Posts: 12
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #837 on: 2017-06-03 17:14:00 »
Hiya!

I have a question. I've been using your Alternate Fantasy mod and I'm very happy with it! The only thing is after beating the game once (with Beatrix of course lol) I decided to make Beatrix and Steiner much more different from each other. Specifically I gave Beatrix access to Quadraslash and took away Stock Break from her and made Shock and Climhazzard skills exclusive to her (I also gave her an "ultimate skill" that's locked behind getting the Excalibur II which I made her ultimate weapon to make up for the fact she doesn't get a Trance).

Now that I solidified Beatrix as a Holy Knight/ Paladin I decided to make Steiner the very opposite of that; a Dark Knight. I've changed a lot of his skills to reflect his new status as a dark knight (with a couple as homage to FFT) but was wondering if it were possible with Hades Workshop to create unique damage/effect formulas?

For example, I'd like to have Steiner required to sacrifice some of his hp with most of his skills, including the non-damaging ones. Is this possible to do?

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #838 on: 2017-06-03 22:08:09 »
I prefer to increase random encounters in HW. I went through every single field that has random encounters. (Some were maxed out because of tiny fields) and they all encounter like in the PSX.
With some extra areas though weren't completely maxed because of movability, but that's not a problem.
I also noticed that...(and I dunno if I'm hallucinating, but) if you run with speed boost, the encounter rate is more frequent than just running without speed boost. (Seems to stop you more often, maybe because of more steps???) No lie! Never the matter I tried to make sure it was frequent even without speed boost on.
Some of the SetRandomBattleFrequency are located in the Main_Init, or Main_Loop (I believe). And there's sometimes more than one of them because (of?) different scenarios of the field.
Like with Oeilvert, there are two SetRandomBattleFrequency functions, one that's during the retrieval of the Gulug stone, and the other during Hilda Grade 3 events.
Bottom line, I was able to get that fix no problem.
« Last Edit: 2017-06-04 05:37:14 by dclem »

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #839 on: 2017-06-04 01:23:54 »
Did you set every scene to a reasonable encounter rate, something that is similar to the PS1? And is it a drag and drop hades workshop mod? If it is do you mind sharing that, it's not that I couldn't spend 12 hours editing every scene in the game but since you've already done it maybe you could save me the trouble? But only if the encounter rate is reasonable, if it's too high like once every 3 steps it becomes a problem.

But I bet your mod probably comes with a lot of other bullstrawberries, doesn't it? Meh I just want vanilla FFIX, I'm gonna wait until tomorrow if I have no answer to this question I'll start working on the hades workshop edit to every scene. Multiple encounter rates then. I wish I wouldn't have to wait for these replies from your master programmers. I think we can all agree that the best mod would be a mod that makes the game like the original one on the ps1.

If I get this to work then the green ones are fixed and brown ones still to go before the game is playable:

•No chat icons
•Increased encounter rate
•Disabled cheats
•Sound frequency fix


•Change font
•Sound fixes to certain sounds
•Disable autosaves
•Resize the battle UI

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #840 on: 2017-06-04 04:17:07 »
I went through every scene in hades workshop and increased the encounter rate, I put most values at 175-255, in hard areas such as at the end I put every scene at 255 so you'll be really exhausted at the bosses. But what might happen because of these encounter rates is that the characters become overleved at the bosses. So just to be sure that the game suddenly don't become a grind with easy bosses...how do I increase the difficulty of bosses by say 25%.

I tried increasing Garland's hp by 25000, but it reverted back to his old hp. I read that it has to do with when enemy has x amount of hp left play an event. I'm willing to go through each boss and increase the difficulty on each one by a bit, but I need to know how to increase the hp of enemies which has events in them. Say Beatrix, Kuja, Amarant, Garland etc. Then the game will be balanced out, or be a bit more of a challenge I suppse. Then all that's left is:

•Battle UI
•Font
•Disable autosaving (crucial)
•(Perhaps exchanging some of the sounds for better ones)

I noticed the sounds in particular when they walked into the ice caverns, the footsteps sounded too loud and off. Also when they applauded at Alexandria, it sounds really high pitched, like it's coming out of a radio or something. Anyway it's not a priority, changing boss hp and disable autosaving is next, any ideas?

EDIT: I tried to see if the encounter rate had improved and at a value of 200 I got one fight in all of the ice caverns.  At max value 255 you're likely to have a fight every 7 steps. After 7 running steps you're definitely out of some small area and after you enter the next scene the counter resets right. This means that if it's just a brief scene that you can run through in 10 or so seconds, for example in the tall grass at the marches or pretty much most scenes you're likely to not ever fight a battle even at the maximum encounter rate! What a pain to have spent two hours editing those values only to see it hardly making any difference.

If there was some way to make the maximum value 255 correspond to say 4 running steps you would increase the chance of running into an enemy in a small scene. You think there is some way of making this happen?

EDIT2: Is it possible that the changes to the frequency of battle don't occur because I'm using an old save. Does the changes only take affect after you start a new game, because the changes I made seem to make zero difference. Walked through all of Burmecia without a single encounter, this is truly game breaking.
« Last Edit: 2017-06-04 04:58:08 by Lein »

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #841 on: 2017-06-04 05:12:17 »
Meh I just want vanilla FFIX

that's why you do it yourself.

•No chat icons
•Increased encounter rate
•Disabled cheats
•Sound frequency fix


•Change font
•Sound fixes to certain sounds
•Disable autosaves
•Resize the battle UI


You don't have to keep repeating this, you've said this numerous times already.  :roll:

I wish I wouldn't have to wait for these replies from your master programmers.

well, learn it sometime. We and everybody else is not on here 24/7 to be your constant beck and call; your slave.
patience is of virtue, and wait for such to be done.
« Last Edit: 2017-06-04 13:34:27 by Covarr »

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #842 on: 2017-06-04 05:25:10 »
Yeah personally I don't really care for changing the music to FF4 music, I saw you had done that in your mod you also had changed the window textures and probably other stuff. I just want to fix what's broken not add a bunch of stuff to the game. I keep repeating the things I want to fix hoping that some might be able to point me in the right direction. The ugly chat icons were removed, the sampling rate of the sounds was improved, the cheats were removed. (except the speed up cheat, would love to know how to get rid of that)

dclem I saw you managed to change the font, how did you do that while keeping the changes you made with hades workshop? You also changed the sounds, I would just be interested in changing some sounds that sound really high pitched.

But none of these changes really matter unless the GAME BREAKING stuff is fixed, the encounter rate is bad. I  remember on the ps1 version of the game you would at some places fight enemies every 5 steps. Some areas you actually wanted to get out of fast, like memoria, the root pathway under the ocean and other such places. That needs to be fixed badly, the autosave feature also need to go, it makes the game too easy. It's like adding an autosave feature to dark souls, if you die at a boss, try again immediately, very game breaking.

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #843 on: 2017-06-04 05:33:06 »
That's you, you don't want it, it's whateva, no one's forcing you. Stay away from the sound mod.
It's the ones like you that get me wondering why I bother fixing the sounds.
But like I said before, the sound mod was going with what I was doing overall as a whole.

btw, the sound mod doesn't require to replace p0data61.bin which hosts all the bgm tracks.

>>>For just the sounds fix, replace files p0data62.bin + p0data63.bin. Just don't use the original p0data61.bin file with this, it won't make any sense.
« Last Edit: 2017-06-04 13:34:52 by Covarr »

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #844 on: 2017-06-04 05:46:13 »
Yeah your mod is more about enhancing the look and feel of the game, turn it into something new and fresh. My mod as little as I've managed to achieve on it is just going to restore the game to it's original state and then maybe make it a bit more difficult.

In the original game you could without much difficulty just waltz through the game, maybe grind a bit before entering memoria but no super hard bosses really. To add 25% to the difficulty of all bosses would make the game more of a challenge. But the main goal is just to fix the bugs and game breaking stuff, I would really appreciate it if you guys could help me out, for example how did you dclem change the encounter rate AND the font.

•Change font
•Fix encounter rate
•Disable all cheats
•Increase sampling rate of sounds
•Remove chat/card icons
•Disable autosaving
•Resize battle UI
•Sound fixes to high pitched sounds
« Last Edit: 2017-06-04 13:34:12 by Covarr »

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #845 on: 2017-06-04 05:52:00 »
Yeah your mod is more about enhancing the look and feel of the game, turn it into something new and fresh.
is that what he thinks?

okay then.

two more things:
« Last Edit: 2017-06-04 13:36:55 by Covarr »

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #846 on: 2017-06-04 07:36:24 »
Oh Jesus here we to again...
I'll only ask one thing: why the f u c k does anyone really want a very high encounter rate?
Random encounter are a bad design decision. I hate it how I can't avoid them (in the psx era) unless there's  gf or materia which can prevent it.

Lein

  • *
  • Posts: 70
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #847 on: 2017-06-04 08:07:21 »
Fraggoso in case you're not aware of how games are structured, you play through a level, it's often repeating patterns you engage in. Jump on those platforms or shoot those incoming enemies. Is it really fun, not really but you still do it because you're looking forward to the reward. You endure the tedious task of killing enemies because you're looking forward to the reward which can come in the form of story or a new area to explore, a good game should be frustrating.

If you want an interactive comic book, Final Fantasy IX without any battles and just dialouge, well it sort of takes away from the experience of playing the game. If I want great litterature I'll read the divine comedy, Don Quiote or the classics of antiquity. Not Final Fantasy IX. When you first play through the game a big part of the game is finding out what the story is about and what the new areas look like. How fun is it to run through the iced caverns in 2 min because you have no encounters with enemies. It's supposed to be tedious, same with memoria at the end. You have got to be maxed out on potions before going through that area, same with many areas in the game.

A similar thing is auto saving, you might say why would you want to die and then have to go all the way from the save point? That's part of the punishment/reward, you should be careful when running through an area because you don't want to die and have to do it again. If there are auto saves you can die at a boss and who cares because I respawn right at the boss location and can try again. To take this to the extreme degree would be to use a cheat that maxes out the character levels, I don't even know why they included cheats in the game. Clearly they're not very bright those philippino boys. Anyway the story and the locations are more enjoyable if it's a challenge exploring it/them.

To run from the start of the iced caverns to the end of the iced caverns, that should at least be 7 battles not 1 or 0. That way there's a chance that Zidane will be without potions and weakened before the boss battle. A boss battle that would be 25% stronger because of the mod. The game is very easy right now, no battles in evil forest, no battles in ice caverns. The boss I suppose is a bit more difficult but not by much. The worst thing that happens because of the low encounter rate is that before you encounter a boss you have to grind levels. Why would you want to rush through the game, come to a boss. Oops I better spend 30 min running around outside of town to level up.

It's stupid and I would not want my buddy to experience the game this way which is why we need to increase the encounter rate.

•Increase encounter rate
•Remove auto saves
•Remove chat icons (You can talk to every NPC in the game anyway, why would you need a huge ugly icon?)
•Change the font to something more medieval
•Disable ALL cheats
•Fix the sound
•Resize the battle menu, we're not using our fingers on the pc

What we don't need is to play as a silent Beatrix who says nothing in cutscenes, what we don't need is to rename Fira to Yuzaboda and make it put poison on people. What we don't need is to switch out all the music to high quality music but which lacks melody, what we don't need is to replace the font with a futuristic space font and make the window graphic an eye soring red color. Changing the font and window theme could be done but then do it for something that matches the setting, a medieval fantasy setting.

Anyway as usual when chatting with programmers I find myself struggling trying to convey basic points to people who likely are on the autism spectrum. I have had these talks before, the math boys wanting something and the artist and visionaries responsible for creating pleasant imagery wanting something else. I bought this game for 20 dollars TWICE, once for myself and once for my buddy. Now it turns out it's riddled with stuff that breaks the game in various ways and nobody seems to care to fix it. You guys do realize there are hundreds of people like me on the steam forum and other places that want the same thing, we don't care for your "cool" changes to the game that disables random battles and makes it possible to play as Beatrix.

I spent two hours this morning changing all those encounter rate values, maybe we could engage in some cooperation here or you just gonna post memes of black people saying boi bai. Some decency please, thank you..
« Last Edit: 2017-06-04 08:12:04 by Lein »

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #848 on: 2017-06-04 10:41:37 »
@sutebenukun: Hey, glad to see you enjoy it and want to personalize it :)
Unfortunatly, it is not convenient to modify the spell effects, and you can't go very far. It's in the CIL Code, more precisely the class "btl_calc".
Hades Workshop's CIL Code is quite buggy: it sometimes crashes if the edited methods are too big. It seems that you can't edit the main method related to spell effects ("CalcMain") without crash. You can however edit the sub-methods and put the HP cost in them.

EDIT : Since then, it came to my attention that the tool dnSpy can edit the C# code directly from the DLL. I suggest to use that tool for modding the engine. The following is still useful if you want to make really small changes with HW or just to know where to look at in the C# code.

EDIT 2: Modifying spell effects is now a feature of the Memoria Engine modifier. The best way to proceed is to install Albeoris's Memoria, change the source codes that can be found in "StreamingAssets\Scripts\Sources\Battle" (with a text editor) and then run "StreamingAssets\Scripts\Compiler\Memoria.Compiler.exe", which will generate a "Memoria.Scripts.dll" that will be read by the game. No need of Hades Workshop or dnSpy: only Memoria's user version (though it can be done with the dev version as well) and a text editor.

For instance, the spell effect "Physical Strike" use the sub-method "CalcSub_203", which setups the damage for its target. What you can do is adding a script there that removes HP to the caster only if the caster is Steiner.
The C# script for removing HP to the caster is something like this:
Code: [Select]
// "flag 1" states that the spell will modify the HP (of "ct" = caster, here). Setting both flags 1 and 2 can be used for healing
v.ct_flags |= 1;
// The damage is based on caster's max hp. The operation ">> 3" is equivalent to "/ 8"
v.ct_hp = (short)(v.caster.max.hp >> 3);
But you can't write C# scripts with HW (that's where the Memoria tool is more convenient), so you need to use a CIL code counterpart:
Code: [Select]
ldarg.0
dup
ldfld 0x40007F6 // CALC_VAR::ct_flags
ldc.i4.1
or
conv.u1
stfld 0x40007F6 // CALC_VAR::ct_flags
ldarg.0
ldarg.0
ldfld 0x40007EC // CALC_VAR::caster
ldfld 0x4000229 // BTL_DATA::max
ldfld 0x4000809 // POINTS::hp
ldc.i4.3
shr
conv.i2
stfld 0x40007F8 // CALC_VAR::ct_hp
"ldarg.0" is the object of type CALC_VAR that contains all the information about the damage calculation. It was called "v" in the C# above.

Now, if I am telling you about C# code, it's because it is much more easy to read (even though it's still a programing language), and you can see here the whole class of "btl_calc" in C#:
https://www.dropbox.com/s/2k2mkezqx0loe4i/Source_BtlCalc.cs?dl=0
I added a few comments and renamed the methods "CalcSub" with less opaque names there.

The CIL script above can be used to remove HP to the caster in one of those "CalcSub" method. Verify that the hexadecimal IDs are the same with your game, which should be the case if it's up-to-date. For instance, the non-edited method "CalcSub_203" should start like this:
Code: [Select]
ldarg.0
ldfld 0x40007F0 // CALC_VAR::at_pow
ldarg.0
ldfld 0x40007F1 // CALC_VAR::df_pow
If the 0x..... numbers are different, you need to update your game beforehand (in Steam, "FF9 -> properties -> Verify the integrity of local game file").

Now, we need to add the information that only Steiner's attack should remove HP to him (he's not the only one to cast spells using that "CalcSub_203" method). You can do it like that:
Code: [Select]
if (v.caster.bi.slot_no == 3) {
    // Do you stuff
}
In CIL:
Code: [Select]
IL_POS0: ldarg.0
IL_POS1: ldfld 0x40007EC // CALC_VAR::caster
IL_POS2: ldfld 0x400022D // BTL_DATA::bi
IL_POS3: ldfld 0x4000272 // BTL_INFO::slot_no
IL_POS4: ldc.i4.3
IL_POS5: bne.un IL_POSEND
// Do your stuff
IL_POSEND: // After the "if" block

If we put that together at the start of the method "CalcSub_203", we end up with a method like this:
Code: [Select]
ldarg.0
ldfld 0x40007EC // CALC_VAR::caster
ldfld 0x400022D // BTL_DATA::bi
ldfld 0x4000272 // BTL_INFO::slot_no
ldc.i4.3
bne.un IL_003E
ldarg.0
dup
ldfld 0x40007F6 // CALC_VAR::ct_flags
ldc.i4.1
or
conv.u1
stfld 0x40007F6 // CALC_VAR::ct_flags
ldarg.0
ldarg.0
ldfld 0x40007EC // CALC_VAR::caster
ldfld 0x4000229 // BTL_DATA::max
ldfld 0x4000809 // POINTS::hp
ldc.i4.3
shr
conv.i2
stfld 0x40007F8 // CALC_VAR::ct_hp
ldarg.0
ldfld 0x40007F0 // CALC_VAR::at_pow
ldarg.0
ldfld 0x40007F1 // CALC_VAR::df_pow
sub
dup
stloc.1
ldc.i4.0
bgt IL_0055
ldc.i4.1
stloc.1
ldarg.0
dup
ldfld 0x40007F7 // CALC_VAR::tg_flags
ldc.i4.1
or
conv.u1
stfld 0x40007F7 // CALC_VAR::tg_flags
ldarg.0
ldfld 0x40007F3 // CALC_VAR::at_num
ldc.i4.1
bge IL_0077
ldarg.0
ldc.i4.1
stfld 0x40007F3 // CALC_VAR::at_num
ldloc.1
ldarg.0
ldfld 0x40007F3 // CALC_VAR::at_num
mul
stloc.0
ldarg.0
ldfld 0x40007EE // CALC_VAR::cmd
ldfld 0x400028B // CMD_DATA::info
ldfld 0x4000293 // SELECT_INFO::short_summon
brfalse IL_009B
ldloc.0
ldc.i4.2
mul
ldc.i4.3
div
stloc.0
ldloc.0
ldc.i4 9999
ble IL_00AC
ldc.i4 9999
stloc.0
ldarg.0
ldfld 0x40007F5 // CALC_VAR::flags
ldc.i4.8
and
brfalse IL_00C8
ldarg.0
dup
ldfld 0x40007F7 // CALC_VAR::tg_flags
ldc.i4.2
or
conv.u1
stfld 0x40007F7 // CALC_VAR::tg_flags
ldarg.0
ldloc.0
conv.i2
stfld 0x40007F9 // CALC_VAR::tg_hp
ret
(If you copy-paste it, verify that the "IL_POS" numbers are correct: the program tends to update them automatically and not always the right way.)
I tested and it worked wonder for me.

Now you need to do the same thing for other "CalcSub" methods so that it doesn't apply only to damaging spells.
Modifying the engine is the most tedious feature of HW, sorry. I hope it helped you though ^^"






@dclem and Lein: Maybe you can just stop arguing? You both said that you were over with the other and kept posting just to have the final word... that's ridiculous.
Lein, as it was already said, you can't expect everyone to have the same priorities as you. Besides, modding is something that requires time.
I told you that increasing the encounter rate back to normal means understanding what was changed in the Steam version. Those figures that you increased in the fields' scripts are exactly the same between Steam and PSX: if you want to have an encounter rate consistent and balanced as in PSX, that's not what needs to be fixed. If you want a quick and dirty fix, then you're done.
And yes, keeping repeating a few bullets is not going to make those go faster.

No comment about the trendy "autist" insult... That is a very dumb one.
« Last Edit: 2021-05-25 13:23:47 by Tirlititi »

dclem

  • *
  • Posts: 173
    • View Profile
Re: [FF9] General editor - Hades Workshop (0.37c)
« Reply #849 on: 2017-06-04 10:58:16 »
Lein, as it was already said, you can't expect everyone to have the same priorities as you. Besides, modding is something that requires time.
I told you that increasing the encounter rate back to normal means understanding what was changed in the Steam version. Those figures that you increased in the fields' scripts are exactly the same between Steam and PSX: if you want to have an encounter rate consistent and balanced as in PSX, that's not what needs to be fixed. If you want a quick and dirty fix, then you're done.
And yes, keeping repeating a few bullets is not going to make those go faster.

thank you.  :)

No comment about the trendy "autist" insult... That is a very dumb one.

+1
« Last Edit: 2017-06-04 13:35:30 by Covarr »