Jump to content

Various ToB hacks


Recommended Posts

This is just gorgeous stuff, Taimon, really. If I still tampered with this game I'd be very excited; it's exciting enough anyway that I'm tempted to reinstall. The AoE flag is especially pretty.

[v0.4] "Scrollable" mage spellbook
How does this even work? It takes real skill to write code this bad :)
Tried to fix effects #180 and #181.
These were so disappointing when I figured out what they were meant to do - I'd hoped for arbitrary parameters. It's still useful, though, thanks.

Anyway, should you happen to stop by, thank you. It's neat :)

 

Beseeching gnat-people:

 

"I'm female and created a simulacrum, but it has a male voice."
I almost got this to work by binding the casting blabber to the sex stat rather than the gender stat. Sadly, you have to update the checks everywhere else they're used, which is more places than just the sex change opcode. Worse, you have to hack chargen to actually set this stat correctly - and the chargen code is real nasty like. Never finished it, never will.

 

"I cast a spell and now I've turned green because Detectable Spells was using a stat with an unintended side-effect."
The problem is actually that Detectable Æphex needs to stop being circa 2001 codswallop. There are very few truly available stats, and a few more that can be repurposed with negligible repercussions. DÆ traditionally used only the wrong ones and then later started misusing proficiencies (typically trying to decrement them, or use values > 5).

 

and not have to deal with invis .cres with overlays.
You don't like parameter#2 = 2 in the play .vvc opcode? Other than sporadically failing to animate when there're no actors in the area of effect, I was pretty happy with it (and while that's an imperfection to be sure, there are no bug reports from anyone about the visuals failing to play in the BioWare spells that use this - really, only obsessives notice these things). It's a shame the explosion projectile can't do anything useful in persistent spells, though.

 

]A flag in the .pro file format that allows delayed/multiple explosions react to opcode 58 [dispel].
You sure you're not just locking horns with secondary projectile 79 (Gozer the Traveller)? It can be dispelled (if appropriate), but it's slow and usually doesn't catch up for a round or two (same thing happens with Zone of Sweet Air, remove by type, and the rest). Faster projectiles suffer this problem less (they still do have it, sigh) but tend to get blocked by obstructions in the area of effect too easily to be a definitive alternative.

 

]This one caused some headaches for DavidW. Spells cast by traps do not crash the game if they include opcodes creature summoning or cast spell at creature or point.
Right, they do not crash ;) More seriously, the usual implementation of summonings reads the summoners ea specifiers via a layer of indirection so it can feed them to summoned creature's allegiance. The usual implementation for triggered spells passes the caster's level into the triggered spell. Obviously, neither of those parameters exist to be called if the actor is a trap :) There's nothing for an .exe hack to do here, it can't read your mind to glean what you wanted with invalid specs. Cast at a fixed level, don't try to match ea status with target when target is self (actually, don't have target self effects at all). For summonings, though, wouldn't you prefer CreateCreature("MOARBandit66535",[-1.-1],1) to ForceSpell(LastTrigger,WIZARD_CLERIC_SUMMON_MOAR_BANDIT_HOSTILE66535)?

 

Romance handling and imprisonment and petrification.
In ages past I posted a twix/feak changing this for Fixpack. No one was interested, and someone objected that the devs obviously intended that killing your lover and kicking them out of the party must terminate the romance instantly so you can immediately get it on with someone else. Nothing happened with it *shrug* In any case, it's pure baldur.bcs. If the sequester effects don't kick the target out of the party, you won't be able to leave the area where they were immured to go buy Freedom scrolls or whatnot (unless you change that funky "gather your party" code, but there's an awful lot which can go awry if you do). Imprisonment doesn't do nice things whether the target counts as dead or not; I had replaced it locally with Mass Dominate or Weird or something :)

 

I don't think that's true.
Good. Disclaimers concerning my failing memory and accumulated unfamiliarity with the game apply:

They're not bytes in the .cre file on disc. The scripting state opcode sets one byte of a dword and the following three bytes to nulls in the .cre structure in memory - check out dev\baldur\CDerivedStats.cpp in your favorite hex editor for more info. That's where the space needs to be made, rather than the file written to disc (I'm sure Avenger has posted more about this). Some stats (e.g. absorb spell, reflect spell) really would require hardcode to work correctly, though. As of last year people were still bandying them around like they did anything sensible.

Link to comment

Yeah, all the stats through 201 is just an array of stinky dwords that ends up in the internal CRE structure--according to Taimon's research, between inventory nonsense and the lists the engine maintains for the "big" TotSC/BG2 effects (i.e., bounce/deflect/resist and this vs. that and such crap).

Link to comment
You don't like parameter#2 = 2 in the play .vvc opcode?

 

I am obsessive, and I really, seriously don't like parameter 2 = 2, but that doesn't have to do with what I really meant. I am 99% sure, invisible actors still constitute as actors, so opcode 215 will normally play.

 

What I was really going for were the whiffle ball animations, the spell turning disks, and [insert mod animation] animations being disabled on creatures you don't see. This can be turned off with improved invisibility, but almost impossible to code with normal invisibility, unless you are willing to check for STATE_INVISIBLE for every creature in the game almost every second.

 

It can be dispelled (if appropriate), but it's slow and usually doesn't catch up for a round or two (same thing happens with Zone of Sweet Air, remove by type, and the rest).

 

So if I catch that projectile in midair with a dispel magic, it's gone? That's a serious thing to say, or I am not following you. Projectile 79 fails to catch up if you move your actor away from the point it was cast. I am assuming this is intentional, so that you could still evade the expanding flames of the fireball by running away with your hasted character.

 

That still does not address why a web or entangle projectile shouldn't be dispelled normally. There's an invisible creature workaround for this with combinations of opcodes 272 (Apply effect on condition with a nested opcode 146 that kills the invisible creature), and a dispellable protection from spell (206) cast by the original caster, but I don't like it, and you will have to go around messing with other people's mods to get this work.

 

And Zone of Sweet Air rids the entire area from certain projectiles.

 

Obviously, neither of those parameters exist to be called if the actor is a trap :) There's nothing for an .exe hack to do here, it can't read your mind to glean what you wanted with invalid specs. Cast at a fixed level, don't try to match ea status with target when target is self (actually, don't have target self effects at all).

 

Still, there are assumptions that allow the spell to go off with a certain extended header, since they check for levels as well. IIRC opcodes 146 and 148 crash as well.

 

For summonings, though, wouldn't you prefer CreateCreature("MOARBandit66535",[-1.-1],1) to ForceSpell(LastTrigger,WIZARD_CLERIC_SUMMON_MOAR_BANDIT_HOSTILE66535)?

Of course I do, but the game designers didn't. Most of the trap spells are the same ones the player casts. When you start doing stuff with existing spells like nest one spell in another, or summon an invisible creature, they work well when the player casts them, but crash when the trap goes off with the aforementioned .spl.

 

I did a workaround by CreateCreature, and having it cast the spell, but I would have to go around patching existing scripts. I don't like it.

 

-Galactygon

Link to comment
I really, seriously don't like parameter 2 = 2,
De gustibus non disputandum, I suppose. I bring it only because it doesn't require any invisible .cre while still not multiplying the visual effect on everyone in the AoE. New explosion graphics would indeed be fun (especially because splicing together a big spell .vvc takes hours of miserable toil).

 

So if I catch that projectile in midair with a dispel magic, it's gone?
No. You'll dispel the parent spell, and the Traveller will desist thereafter. Eventually. Secondary projectiles can't be directly dispelled (and shouldn't be).

 

It's slow because many of the spells that use it have no duration. If it didn't take its sweet time getting to where it's going, you'd see nothing but a blip for FireBall! © and Horrid Wilting and what not. That's also why it keeps running for a bit after the parent resource gets dispelled. If it doesn't linger, it can't do its job of letting you see the effects.

 

And Zone of Sweet Air rids the entire area from certain projectiles
Yep. Instantly, too. But the payload for Cloudkill (and the other silly fart joke spells) is all in the secondaries, and they'll not be gotten rid of so summarily.

 

IIRC opcodes 146 and 148 crash as well.
They don't crash, I promise.

But hey, I'm rusty, and crazy - so no need to take my word for it.

 

Most of the trap spells are the same ones the player casts.
The devs were pretty good about using TRAP_THIS_AND_THAT (with a Horror once in a while) until Throne of Bhaal, where everything goes out to graze in a plutonium dump and even the tripwires have HLAs. The fix for this is not to play ToB :) or possibly to read the trap scripts out of areas and REPLACE_TEXTUALLY "WIZARD\(_METEOR_SWARM\)" "TRAP\1"

 

for the "big" TotSC/BG2 effects (i.e., bounce/deflect/resist and this vs. that and such crap).
Aka Where the Broken Things Are - is there anything in that list that doesn't have a meltdown when stacked? (rhetorical) I'd better check out Taimon's notes (and the pursuant discussion) - I couldn't make much sense out of that rubbish unaided.
Link to comment

Whoa, sorry guys, too much stuff for me to comment on all posts.

 

Stats are a fixed size structure in memory - there is no easy way to extend this.

 

I guess I'll have a look at that simulacrum voice problem once I actually fix those repeating effects ...

Most other suggestions were either way too high level or too specific for me, sorry.

 

Nythrun, it is good to see you around here!

[v0.4] "Scrollable" mage spellbook
How does this even work? It takes real skill to write code this bad :)

Attempting that was pure madness -- I'm surprised it actually works. (You see: no skill necessary.)

Better don't take a look at the resulting assembler code, though. :)

 

I'd better check out Taimon's notes (and the pursuant discussion) - I couldn't make much sense out of that rubbish unaided.

Uh, I'm afraid you won't find it there. I guess dev was refering to the list of ingame structures that I kept during reversing.

Link to comment
I guess I'll have a look at that simulacrum voice problem once I actually fix those repeating effects ...
If you fix the repeating EFF opcode I'm going to be the happiest modder ever. Item Revisions could use it for more things than you can imagine as I had to discard tons of cool ideas because of that damn broken opcode (aura-like effects, contingency-like effects, ...).
Link to comment
I have heard that the amount of weapon quickslots each class has access too is hard coded. Is there any chance of an EXE hack that gives 4 weapon quickslots to all classes/kits?
That would require the GUI system to be redone, as the problem lies actually in the amount of extra buttons you need for the weapon slots that are already occupied(Paladin has Turn Undead, Ranger has Hide etc.+Casting).
Link to comment

I installed the RaceText hack and Gnomes were switched with Dwarves in the race selection screen. Not a big deal once I realized they were switched. I can have so much fun with this a lone and the scrollable spell books. Brilliant stuff all wrapped up in one neat little package :)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...