Author Topic: Silvered/cold steel weapon material vs. DR?  (Read 631 times)

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Silvered/cold steel weapon material vs. DR?
« Reply #15 on: August 26, 2010, 04:40:00 am »


               I think the only way is to add a variable. But not via the OnPhysicalAttacked. More like in the OnSpawn event. Or you could make up a spell or potion of material resistance which just adds the variable to the monster. Then use the OnPhysicalAttacked to check for the variable and subtract that much damage? Could also do an OnHit type set up with the weapon too. Checks type of monster and variable on monster to do additional damage? I don't know. Just some thoughts.
               
               

               
            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Silvered/cold steel weapon material vs. DR?
« Reply #16 on: August 26, 2010, 02:47:48 pm »


               There are three parts to this, and only one part is difficult. Checking the material of the weapon in the OnPhysicalAttacked script works fine. And if you need some sort of flag on the creature, that can be done any number of ways -- variable, set the creature's subtype, etc. Those two things are easy. It's easy to verify that weapon X has just been used on creature Y.

The problem is actually managing the damage reduction for that particular attack with that particular weapon. You cannot apply a DR effect to the creature, because that would apply to all opponents. And you can't just subtract damage from what the game automatically applies before it applies it, because that all happens inside the engine. One could theoretically determine how much damage was done and heal the creature as needed, but that's pretty sloppy.

Another thing I considered was adding a damage bonus to the weapon for one round using ItemPropertyDamageBonus(), provided you ensure that this will always be removed. That method, at least, ensures that only the opponent with the appropriate weapon gets the bonus. It's a lot better than applying DR to the creature, but it also has some other minor problems. Attacks of opportunity happen mid-round, for example, so the attacker could theoretically get an undeserved bonus.

The most promising approach is what I mentioned earlier about adding a small Damage Bonus for the race. If that actually does bypass the creature's DR, it's pretty simple to just apply a global DR to the creature and use a specific Damage Bonus to flag certain weapons so they will bypass it. Your total damage would only be off by one point, and the engine would handle the rest. However, if that particular approach does work, then it is an entirely undocumented "feature" of the game engine. Hence my call for people who have actually tried this.

In the meantime, I'll dig further into the (much) older systems that used this trick. I'm still amazed no one has released a system for vampires/werewolves since 1.69 was released. I suspect many PWs are doing something along these lines.
               
               

               


                     Modifié par invisig0th, 26 août 2010 - 02:04 .