Jump to content

Preventing equipment destruction


pro5

Recommended Posts

Heh, I actually didn't know about that. ???

 

Switching off Gore helps with cold death and disintegrate, but does nothing for Imprisonment, though. Also, they (I tested on bandits from BG1) don't scream when dying. :( And overall - no way, I'm not going to play this game if I can no longer chunk my opponents normally. :(

 

I wonder if it works with death from level drain too?

Link to comment

Well, since imprisonment doesn't actually destroy anything....

 

Cold damage you can change by making sure that nothing does more than ten points of cold damage at a time (i.e. the last extended header of Cone of Cold won't be 10d4 + 10d4, it'll be (2d4 + 2d4 + 2d4 + 2d4 + 2d4) + (2d4 + 2d4 + 2d4 + 2d4 + 2d4) and spam your feedback window.

 

Disintegrate and level drain would have to have some horrible scripting kludge where the target is forced to DropInventory() before a fatal blow.

Link to comment

With Desintegrate and Imprisonment it works if you use Effect 0x108: Drop Weapons in Panic, applied 37 times.

 

With cold damage, there's also a better way (meaning, without changing damage), but it involves EXTEND_TOP for most creature scripts in the game.

Link to comment

You'd also have to update every immunity to disintegrate \(spell\|item\|effect\) to grant immunity to drop weapons in panic, and update every item that uses the disintegrate opcode (blakblad.itm) to cast a triggered spell instead, and update every script that makes stuff-that's-droppable-that-the-player-musn't-have (chalslay) so it's still inaccessible, but yes, that works too, aside from the wonky random early termination on the drop routine if there's an undroppable item.

 

You don't want to be EXTEND_TOPing the creature scripts, you'd want something else running them (or else it'll just fail when the creature isn't running its scripts). Checking for STATE_FROZEN_DEATH isn't going to cut it of course ???

Link to comment
You'd also have to update every immunity to disintegrate \(spell\|item\|effect\) to grant immunity to drop weapons in panic, and update every item that uses the disintegrate opcode (blakblad.itm) to cast a triggered spell instead,

Yeah, I'm doing all that.

 

and update every script that makes stuff-that's-droppable-that-the-player-musn't-have (chalslay) so it's still inaccessible

I'm not doing that, and I'm not sure I should. Is there a reason why those items are droppable when they shouldn't be droppable? ??? I'd prefer to change those items present in unmodded game, and hope that modders are sane enough not to add more such things.

 

aside from the wonky random early termination on the drop routine if there's an undroppable item.

Why, I thought item to drop is chosen randomely with this effect? Then if one effect fails, next will choose different item and sequence continues...

 

(or else it'll just fail when the creature isn't running its scripts). Checking for STATE_FROZEN_DEATH isn't going to cut it of course :(

 

Here's how I do it:

 

IF
 Die()
 OR(2)
  StateCheck(Myself,STATE_FROZEN_DEATH)
  HitBy(LastAttackerOf,2)
 Global("P5#ColdDeathDrop","LOCALS",0)
THEN
 RESPONSE #100
DropInventory()
SetGlobal("P5#ColdDeathDrop","LOCALS",1)
Continue()
END

 

Surprisingly, it still worked even after I had successfully cast Hold Person.

Link to comment
Yeah, I'm doing all that.

 

Okies. Didn't know if you were Guest there ???

 

I'm not doing that, and I'm not sure I should. Is there a reason why those items are droppable when they shouldn't be droppable? :( I'd prefer to change those items present in unmodded game, and hope that modders are sane enough not to add more such things.

 

I'm no Dave G., but I'd assume it's to prevent the "Oh look, I've just killed someone in full plate dual-wielding Flails of Ages and their corpse is mysteriously nude except for an Andar Gem loincloth" syndrome that lots of internal-consistency-be-damned modders like to introduce (I'm not a fan of this ;) )

 

Why, I thought item to drop is chosen randomely with this effect? Then if one effect fails, next will choose different item and sequence continues...

 

Unless I'm misremembering, it's always a fixed order starting with amulet, going through equipped, to quiver, to quick item, to inventory, to quickslot. It just flakes out on rare occasions and picks a different order to cycle through - it's probably not frequent enough to be a real concern (and in any case irrepairable).

 

Surprisingly, it still worked even after I had successfully cast Hold Person.

 

Dying should unset all of the various script disabling states (and while I've seen people say Die() is unreliable, I've never had issues with it). My concern was more with when STATE_BRITTLE_POPSICLE is invoked and more damage is already impending during the same action - that the items may be already destroyed by the time the next script pass fires.

 

It also has the disadvantage of not working with creatures who have mod-added scripts, but you know that :(

Link to comment
Dying should unset all of the various script disabling states (and while I've seen people say Die() is unreliable, I've never had issues with it). My concern was more with when STATE_BRITTLE_POPSICLE is invoked and more damage is already impending during the same action - that the items may be already destroyed by the time the next script pass fires.

Yes, maybe it won't be 100% reliable, but it doesn't bother me much. I never said it's going to be perfect. ???

It also has the disadvantage of not working with creatures who have mod-added scripts, but you know that :(

Really, do I? It shouldn't be too hard to look through all CRE files, check what scripts they have assigned and EXTEND_TOP the one of highest priority. Of course, we also must "remember" which scripts we've already extended, but that's an easy problem to solve. Naturally, this would-be mod should come late, after all modded creature scripts have been implemented.

Link to comment

Well, I've tested how the drop effect works by giving Minsc 2 different undroppable items. Both times after disintegrating/imprisoning he dropped all 30 items that he had in inventory and equipped. So looks like this won't be a problem, after all. :p

 

Meanwhile, I've released version 1 of this mini-tweakpack. More information and download available here for anyone who's interested.

Link to comment
Meanwhile, I've released version 1 of this mini-tweakpack. More information and download available here for anyone who's interested.
Is it compatible with/applicable to Tutu/BGT or haven't you tested that yet?

Yes, it should be compatible although Disintegrate and Imprisonment components probably won't be of much use to you in Tutu. :p The spears component optionally updates descriptions for 2 BG1 spear weapons present in Tutu.

Link to comment

Archived

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

×
×
  • Create New...