Show Posts

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.


Messages - Kefka

Pages: 1 2 [3] 4 5 6 7 8 9
51
I've just checked again to make sure: the new enemy has his InitObject in the Main function, and the enemy is not linked. Maybe I'll tweak the AI a bit more and see if I can solve it.

Or could you perhaps take a quick look at my hws file if you have time? I'm sure you can see any potential mistakes better than me.

52
Hi tirlititi, I need your help again it seems. For some reason that I can't seem to figure out, when I add a new enemy to a battle, it doesn't perform any actions, even though its AI script is the same as in its original battle.

When I tried adding an enemy from one battle to another, I followed all the steps you posted on page 25:

I copy-pasted the enemy and its attacks from its original battle, and I kept the order of first having all attacks from the first enemy, then all attacks from the (newly added) second enemy.

Then I changed the default attack and made sure that the Animations field of each attack uses the proper enemy.

I added the new enemy to a group and wrote a very basic AI script (and to make sure that the AI script works, I've also used it in the enemies' original battle, and there it works flawlessly). The init_function is just a simple "return", but that should be fine, right? Here's the ATB function for your information:

Code: [Select]
    if ( !VAR_LocUInt8_31 ) {
        set VAR_LocUInt8_31 = 1
        if ( GetRandom & 1 ) {
            set #( SV_Target = SV_FunctionEnemy )
            Attack( 8 )
            return
        }
    }
    switch 4 ( GetRandom % 4 ) from 0 {
    case +0:
        set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
        Attack( 3 )
        break
    case +1:
        set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
        Attack( 4 )
        break
    case +2:
        set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
        Attack( 5 )
        break
    case +3:
        set #( SV_Target = RandomInTeam(SV_PlayerTeam) )
        Attack( 6 )
        break
    }
    return

Now to sum it up: the battle loads correctly and the new enemy is there, but it doesn't do anything (the other enemies that were in this battle by default attack like normal).

One thing I've noticed though: I've added another Entry for the enemy via "Edit Entries" to have a second "Object" (entry type 2) entry, but when I open that same hsw file later the entry is changed to "Unknown" (entry type 255). Have you ever witnessed something similar?

53
Thanks, you're the best! You really know the game's workings inside and out.

PS: Since the last HW update, you can select "Unused XXX" in the list of spell effects. This allows you to code a completely new spell effect (deals damage to the target and heals caster's MP, to give a random example) without replacing any other. You just need to add a "case XXX" to this method in dnSpy.

Now this part is certainly interesting, good to know! This opens up possibilities for up to 18 cool new attack types! I'll have to take my time to get some ideas. Hmm, maybe another MP damaging attack, but not as random as Hammer? Or perhaps a Gravity-type spell that uses current HP instead of max HP (like it does in most other FF games)... or maybe a spell that empties the trance gauge (is that possible? Just playing around with ideas)... Hmmm, I think this will be fun to play around with, hehe...

54
Quote
@Kefka: No problem. Well done going this far (you did most of the job).
For the errors, they are caused by dnSpy but they are not problematic: you just need to write the type conversion yourself when these errors pop. For instance, if the line "byte x = 5;" gives an error, change it to this:
Code: [Select]

byte x = (byte)5;

It's sometimes a bit more complicated, like "byte x = intvalue1 + intvalue2;" in which case you must also add parentheses around what needs to be converted:
Code: [Select]

byte x = (byte)(intvalue1 + intvalue2);

What I personally do is that I create a .txt file in my mod's folder named after the class/method I edit and I put the code (and its modifications) in that file. This way, I only have to "Select All + Copy + Paste" when I change it (otherwise, I'd need to write these type conversions everytime because dnSpy doesn't register them after compilation).

For the Darkside and Lancer effects, you need to add the line after the "at_pow" variable is set (it's usually in the "Setup..." call but sometimes it's directly in the "case" code) and before it is used (again, it's usually in the "DoSetDamage..." but sometimes it's directly in the "case" code). So for Lancer and Darskide, you need to add "btl_calc.CalcSub_15E(cALC_VAR);" before that one:
Code: [Select]

if (cALC_VAR.at_pow - cALC_VAR.df_pow > 0)


Did it like you suggested, and after some playtesting I can confirm... it works like a charm now! I'm very pleased with the results, I've always liked the idea of such 'special conditions' within dungeons that force the player to stray from the standard fighting methods and think a bit outside the box. Oeil Vert was pretty good at that with its magic sealing, but Ipsen in vanilla was never all that spectacular. Now that it affects all damage formulas which somehow reference a weapon's attack power, this should make this portion of the game more interesting. Thanks again for your help!

dnSpy looks really promising I must say, from what can tell it should allow us to edit even those last bits of gameplay that Hades Workshop can't edit (yet). Just another quick question, if I want to make Flarestar hit always (it being unable to miss, that is), then I would simply have to delete the first 3 (or 4?) lines in its routine that deal with accuracy, right? This is Flare Star's formula from your document:

Code: [Select]
case 99: // Flare Star
            btl_calc.SetupAccuracyMagic(cALC_VAR);
            btl_calc.ApplyShellAccuracy(cALC_VAR);
            btl_calc.ApplyMultiTargetAccuracyPenalty(cALC_VAR);
            if (btl_calc.CheckRawAccuracyEvasionMiss(cALC_VAR))
            {
                CALC_VAR expr_29D6 = cALC_VAR;
                expr_29D6.tg_flags |= this.CALC_FLAG_MISS;
                cALC_VAR.tg_hp = (short)(target.level * cmd.aa.Ref.power);
            }
            break;

I'm unsure about deleting the fourth line since it's the start of an 'if' condition. Basically I want Flarestar to behave much like regular attack magic, in that it shouldn't miss (and it misses A LOT in vanilla, as I'm sure you've noticed already).

55
@Kefka: Yes, it is possible with dnSpy again. In the "btl_calc::CalcMain", you need to put the line "btl_calc.CalcSub_15E(cALC_VAR);" a bit everywhere ^^'
Again, having a look at this file makes it easier to read the spell effects before editing the real thing (that has idiotic names and is harder to read).

For example, go to the "case 19" (Physical Strike effect) and change it to this:
Code: [Select]
case 19:
btl_calc.CalcSub_13A(cALC_VAR);
btl_calc.CalcSub_141(cALC_VAR);
btl_calc.CalcSub_143(cALC_VAR);
btl_calc.CalcSub_159(cALC_VAR);
if (btl_calc.CalcSub_152(cALC_VAR))
{
btl_calc.CalcSub_15E(cALC_VAR);
btl_calc.CalcSub_203(cALC_VAR);
btl_calc.CalcSub_270(cALC_VAR);
}
break;
You should put the line before the "CalcSub_20X" ("DoSetDamage_..." in the readable version).

Hi Tirlititi, sorry for the late reply to the Ipsen Curse topic, but it took me a while to play up to that point in the game (my first playthrough with the Steam version). Plus, I've never used dnSpy before so I also had to learn debugging and stuff (still more of a beginner, lol..).

Anyway, I've found the btl_calc::CalcMain and tried to edit it like you told me (thanks for the easier to read version of the Btl_calc function, by the way), however afterwards when I click on 'compile' I get several entries of the following message:

"CS0266: Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)"

and in one case also the following:

"CS1503: Argument2: Cannot convert type 'int' to 'byte'."

The strange thing is, these error messages refer to places in the code that I didn't even edit. It also happens when I try to compile again without editing anything, so these errors must be in the vanilla code already. And because of this I can't seem to save my changes. Do you know what's going on?

On a related note, you said to always insert the line "btl_calc.CalcSub_15E(cALC_VAR);" right above the "DoSetDamage..." line. This works for Physical Strike, Magic Weapon, Throw, Spear & Trance Spear, and Sword Magic. However, there are other physical skills like Dark Side and Lancer which don't have a "DoSetDamage..." line, so I'm unsure of where I should add the "btl_calc.CalcSub_15E(cALC_VAR);" in these cases.

56
WOw, thanks a ton for your answers, guys. It was indeed the lack of a Main_Reinit function that caused the problems! Now everything is running smoothly, I get my battle theme, and afterwards the field theme starts playing again and I regain movement control of my character. Thanks again, I'm finally getting the grip of this!

57
No: as you can see from the format of the "BtlEncountBGMMetaData.txt", the battle musics are not linked by "1 Battle -> 1 Music" but rather by "1 Field + 1 Battle -> 1 Music". So you need to add a line for your new battle (or, more precisely, to your new use of a battle inside a field) inside this .txt file.

No sound code needs to be added in the field script.

Hi tirlititi, I've done a bit of playtesting in the last few days, but it seems the desired changes to the battle theme won't take effect. Here's what I did:

I've exported the BtlEncountBGMMetaData.txt, opened it with a text editor and made the required changes, and then I imported it again using the "import selection" function in Hades Workshop. I've done this with both resource.assets files (the x64 and the x86) to be sure. However, I still don't get any music changes in my new random battles. Both resource.assets files are updated according to the fiel change date. Is there anything else I'm missing?

Also, I've encountered another problem: When adding random battles to a new field, after such a battle the field music doesn't resume and I can't move my character anymore. I've noticed that all fields that naturally have random battles also have a main_reinit function in their scripts, while fields without random battles don't. So I'm guessing I need to write a main_reinit function for the fields that I've added random encounters to, right? I'm just unsure what exactly I need to put there, as these scripts seem to differ from field to field. From what I see it's something similar to each respective field's main_init function, but before I resort to (potentially fruitless) trial and error I was hoping that you could give me some general tips as to what I can copy/paste from the main_init script.

58
Quote
Battles have the music ID "0" (for normal encounters), "35" (for bosses) and "111" (for Hunter's Chance). Some battles are not registered in these files, when they don't stop the music played in the field (the "Don't Stop Music" battle flag is also checked for them in the "Enemy" panel).

Thanks, I really appreciate it.

On a related note, I tried adding random encounters to a field that previously didn't have them by copying the following lines to the Main_Init script:

Quote
    SetRandomBattleFrequency( 60 )
    SetRandomBattles( 2, 859, 849, 854, 854 )
Now I get proper random encounters in that field, but the music doesn't change to the battle theme. Instead, the normal field music keeps playing. Is there any sort of SoundCode that I have to add somewhere in the field script for that?

59
Hello tirlititi,

just wondering if it is possible to change the battle music for certain story battles? For example, the boss battles against Scarlet Hair and Tantarian have the normal battle theme playing, and I'd like to change that to the boss battle theme. Is this determined somewhere in the scripts of their respective field files?

60
Gameplay / Re: [FF8-PCSTEAM] Stats mod?
« on: 2018-07-07 06:50:04 »
EDIT:
How can I change the enemies stats as well? HP, STR and others?

For this you need another tool, Ifrit. It can edit the various com.dat files inside the battle.fs (don't remember if you need to extract them first, though, it's been a while since I last used it). Anyway the files com000.dat to com143.dat each contain one enemy from the game.

61
Which string and which tutorial? What I did for Alternate Fantasy is a lot like what is described there.
For the Ipsen Curse, it's only a flag in the battles: you see that all the enemies of the Ipsen castle have this "Ipsen Curse" flag enabled.
It's a bit different for the Oeilvert Curse because that one also has an effect out of battles (you can't use magics). For this curse, there's the flag in the battles but also a general variable that is changed in the "Entrance" field of Oeilvert (I don't remember if it's turned off in the field where Ark is or if it's in one of the Desert Palace fields). The general variable is "Setting_MagicOff": as long as it's 1, magic is disabled in the player's menu.

One question about the Ispen Curse, tirlititi: would it be possible to somehow 'expand' this curse to also include other physical abilities like Jump, Throw, or Steiner's sword skills? Because as of yet, it's very easy to circumvent the curse altogether since it only affects the Attack command, so there's little reason to switch to the weakest weapons like the game seems to have intended (why else would you find all the weapons from the beginning in this dungeon?). I've always liked to use each character's respective skills and abilities over plain physical attacks because that's just... uhm, cooler, lol. That's why on my very first playthrough, I honestly didn't even realize that the Ipsen Curse existed! When I later read about it, I just thought to myself 'what're they talking about?', and couldn't remember anything strange about Ipsen. When I paid attention on my next playthrough, I finally discovered the curse, but I'd say it is very poorly implemented if it's that easy to miss. In my opinion, when a whole dungeon is based around such a special circumstance, then that effect should be much more apparent. I don't know how complicated this would be though.

62
Gameplay / Re: FF8 steam editor request
« on: 2018-06-04 15:37:18 »
I've just checked again, they are compatible with the steam version. The only problem I could imagine is not knowing where to find the files that the editors require due to the way FFVIII files are packed. The kernel for example, which is edited by Doomtrain, is inside the main.fs file, and you need to extract it first using Deling. In your FFVIII steam folder, go to data-> lang(your language, in my case lang-de). In this folder you find several .fs files, all of which contain a plethora of other files. Once you've extracted the kernel.bin from the main.fs, you can edit it with Doomtrain, and then you have to again use Deling to re-insert your edited kernel.bin back into the main.fs (always make backups, of course).

63
Gameplay / Re: FF8 steam editor request
« on: 2018-06-02 19:48:11 »
There are already several editors for FF8 which can do some stuff similar to what Hades Workshop does. Doomtrain is a kernel editor that allows you to modify weapon data, spell data (including junction boosts), limit data, and even enemy attacks data. Then there's Ifrit for editing enemy stats, and Quetzacotl for initial stats, magic and equipment. All of them should also be compatible with the Steam version, as far as I remember (it's been a while since I used them).

64
Thanks for this tool, man! I can't wait until language compatibility and automatic description updating are implemented as well, those would be really helpful.

Quote
I'd also like to extend the oppourtunity to PM me, but am unfamiliar with if or how that works on Qhimm Forums.

I remember it was the same when I was knew to the forum. You must have made at least 5 posts before you can send/receive PMs, so just post a bit in some topics you like. Welcome to the forum, by the way.

65
Troubleshooting / Re: Urgent help needed
« on: 2018-04-29 10:07:28 »
In that case you just need to download the MSVCP120.dll from somewhere. Such dlls are usually needed for Windows to run specific applications. A google seach for this dll should lead you to several pages where you can download it from. Also put it in the same folder as Hyne just to be sure.

66
Quick question though: Since I'm not a programmer and can't really make much sense of the code you posted, could you tell me what I need to change with a hex editor (I'm assuming this is in the exe?) and where exactly?

67
This is most interesting. So does that mean it is now possible to keep any learned enemy skills even after running from a battle? This is something I've been wishing for for a long time, thanks a ton! I'll definitely give this a try soon.

68
Yep, that's for receiving the prizes after the race, although it doesn't seem to differentiate between the various race classes. Not really sure where that information is stored... The pre-race screen is part of the minigame I think (it's not a field file and therefore cannot be edited with Makou Reactor).

69
Is there any documentation to this, or did people just start fiddling and eventually work out how it works?

I am interested in editing the possible chocobo prizes for the chocobo races, and also the enemy spawn chances for battles.

The encounter rates for each field can be seen with Tools -> Encounters. At the top you'll see the Battle Rate. The farther the bar is to the right, the higher the frequency of random encounters.

70
I don't know about a mod, but you can do it with Makou Reactor. In the field crcin_1, go to the 'dic' function. At the bottom of its Main script, you'll find the code for adding the race prizes.

EDIT: Wait, I was wrong. Those are just the ones that Ester gives to you after you win several races in the S-class. The regular prizes are in the Cloud function in Script 4.

71
I guess you're right, it's not necessary to be able to edit the whole method when one multiplier is really all we need. I'll eagerly await the next version, then.

About enemy names and enemy spell names: they all have some numbers in front of them in brackets, like [33,1] or [58,1] and such. Do they have a specific meaning? If I want to change enemy names manually, do I have to change these numbers too, or should I leave them be? Because I just found it strange that item names and regular ability names don't have these numbers in front of them.

72
Thanks a ton, I'll definitely try that out! On another topic that ste459 has mentioned a couple posts ago, the Regen status:

Quote
@ste459: Controlling the ATB that accurately is not possible with Hades Workshop. It is possible with Albeoris's Memoria but you'd need to recode part of the engine for that.
However it is indeed possible to increase the Regen frequency, with both HW and Memoria. In HW, you go to CIL Code, search for the method "btl_stat -> SetOprStatusCount" and remove that part of the code:
Code: [Select]

ldarg.0
ldfld 0x400022A   // BTL_DATA::elem
ldfld 0x400080F   // ELEMENT::wpr
sub

It's the four lines under a "ldc.i4.s 60". The Regen frequency formula is indeed "Frames to wait = (60 - wpr) << 2", which is, in a more standard writing, "(60 - Spirit) * 4". Removing these four lines will remove the spirit part so you will always regen with the same frequency (the overall duration is something else and will still increase though). You may change the number in "ldc.i4.s 60" to adjust it if you think it's too slow (or too fast).

@Incinerator: I was bugged by the task of giving a precise answer but replying to ste459 gave me one : if you use regen on a character with 60 spirit or more, the formula above goes to negative which can either mean regen will never trigger or it will trigger every single frame (having a quick look at the code, I would incline to the latter).

This find is certainly interesting, but does it apply to Regen only, or to Poison and Toxic statuses as well? Seeing as they work kinda similar...

Further, does the CIL code also allow to increase the duration time of temporary status effects (both good and bad)? This has always bugged me about the vanilla game, that if you play with ATB on active mode most statuses would expire within less than one round of combat. What good does it do to cast Protect or Shell on a character when that doesn't even last until the enemy's very next attack? If we could somehow prolong their duration it would certainly make them more useful and open up new tactical possibilities.

ALso, sorry to bother you with so many questions, it's just that I've just begun exploring the steam version, as it seems to offer way more possibilities overall than the PSX version.

73
That sounds good, I'll wait for an update then before I import texts.

Two more questions for you, Tirlititi:

1) In the thread at gamefaqs, you posted the random encounter formula:

Quote
if (sMoveKey && !IsNearlyZero(DistanceFromLastFramePos)) {
. . sEncountTimer += DistanceFromLastFramePos * FieldWorldMapFactor;
. . if (!Cheat.IsNoEncounter && usercontrol != 0 && sEncountTimer > 960) {
. . . . sEncountTimer = 0f;
. . . . sEncountBase += encratio;
. . . . if (random8() < sEncountBase/8) {
. . . . . . sEncountBase = 0;
. . . . . . TriggerRandomBattle();
. . . . }
. . }
}

Since you seem to know where this formula is, is it possible to edit it with the CIL code to increase the encounter rate in general (maybe lower the 960 like you suggested in that thread)? This would be far simpler than going through each field file individually.

2) Is it possible to import save files from the PSX version, or do I have to start over? (Well, I would have started over anyway, but having various saves throughout the game would really help with playtesting certain changes).

74
Gameplay / Re: Final Fantasy X enemy editor
« on: 2018-01-27 13:40:29 »
I'll second that request right away! This is something I've been waiting for for ages. FFX's battle system has a truly great potential with many tactical and strategic aspects, but sadly these were hardly ever put to use in the vanilla game due to most storyline battles being pretty easy anyway. I'd really love to be able to create a mod with somewhat increased difficulty that would encourage the player to make use of the battle system's tactical possibilities more often.

75
Quote
1) The text still can't be imported properly from PSX to Steam, and it concerns all the texts, not only the ones in the "Texts" panel.
If there is one thing that HW does less well for Steam than for PSX, it's editing and managing the texts... I have been working on multi-language support lately but I will need more time to work on the Steam text opcodes (that's what makes it troublesome).
The best solution for now would be to use file batching for dialogs, I guess, but for the rest, you'll have to copy/paste and write the Steam opcodes yourself (you can have 2 windows/panels of HW opened: one of PSX and the other for Steam).

I see, too bad. I guess I'll just have to redo the changes I made to some enemy, spell and item names by manually going through all of them.

Quote
2) Yes, the encounter rate is definitely lower in the Steam version, but the difference is indeed not in the field script. It is unclear to me what makes this difference... I've said what I saw and what I think of it here (comparing the Steam engine's code with the description of SoftReset of the PSX engine's code, it would really look like they are the same):
https://www.gamefaqs.com/boards/197338-final-fantasy-ix/75389893

I've just googled around and it seems no one knows the reason for the indeed much lower encounter rate of the steam version. Damn, that's an even bigger bummer to my plans. So the only option is to manually go through each field and increase the encounter rate to somehow restore the battle frequency of the original PSX game (more or less)? That'll be quite tedious, but I guess there's no way around it if I don't want to remain constantly underleveled.

Pages: 1 2 [3] 4 5 6 7 8 9