1
Releases / Re: [FF8PC-Steam] BattleFieldPack v2.0 [NEW]
« on: 2020-07-26 18:28:35 »
Adding onto Steve's post, I tried to download as well and it won't start, keeps saying Temporary Error, retrying and doesn't download
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Interesting. I was wondering about adding trance to "guest" characters. I bet there's an animation call that it's missing when you activate trance and that's why it freezes, just a hunch. I haven't looked at this games data too hard yet.
Would it be possible to switch the character the temporary characters are tied to? I like Eiko, but I also want to use Marcus. Can I place him over someone else instead? Better yet, can we add character slots? I know Beatrix is a special case and seems to actually have her own slot, so I'm sure it would be complicated.
Has anyone tried to swap assets such as Zidane with his Pluto Knight gear, or Garnet with her dress or whitemage hood?
Lastly, is there something I can use to preview .fbx models?
Oh?
Either it's a bug, either you don't have the latest version of the tool. I hope it's the latter ^^
You can see the version in the "About" window (F1). If it's not v0.37c, get the newest version in the opening post of the thread.
If it is v0.37c, then I guess it's a bug. Maybe try to open only the Steam version? (You have to select the FF9_Launcher.exe.)
@sutebenukun: You access to the CIL Code using Hades Workshop, there's a panel "CIL Code", the list of classes (including "btl_calc") is on the left and the classes' methods ("CalcMain", "CalcSub_203", etc...) appear next to it once you selected a class.
You may also see the C# and CIL code using programs like JetBrains dotPeck, but it can only display it, not modify it. I don't know any free tool that allows to inject CIL code in a dll.
@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.
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
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:
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);Code: [Select]ldarg.0
"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.
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
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
If the 0x..... numbers are different, you need to update your game beforehand (in Steam, "FF9 -> properties -> Verify the integrity of local game file").
ldfld 0x40007F0 // CALC_VAR::at_pow
ldarg.0
ldfld 0x40007F1 // CALC_VAR::df_pow
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) {
In CIL:
// Do you stuff
}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
(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.)
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
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.