Aller au contenu

Silvered/cold steel weapon material vs. DR?


  • Veuillez vous connecter pour répondre
16 réponses à ce sujet

#1
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
Has anyone implemented silver and cold steel weapons (using the Material item property) in conjunction with a DR or some comparable property on the respective creatures (lycanthropes, vampires, etc.)?  If so, exactly how did you do it, and why did you choose that particular approach versus other options?

I understand that there are several ways to script this, and I'm not really asking for a scripting tutorial here from people who haven't tried this themselves. I'm instead looking for input from people who actually do have experience with implementing systems using the Material item property, regarding what they found to be the best technique.

For the record, I also did not find any system on NWVault which uses the Material item property. That strikes me as strange, since this is apparently one of the main reasons why Brian Chung added the Material item property. I also suspect quite a few PWs use something like what I'm asking about here. Info pointing me to any existing and available systems that already use item Material in this way would also be helpful here.

Thanks in advance!

Modifié par invisig0th, 25 août 2010 - 04:50 .


#2
Shadooow

Shadooow
  • Members
  • 4 470 messages
I am skeptic about material property. I dont know why it was added, but the material can be recognize from name or description, builder only had to add variable to the item. So why bother with itemproperty?

The Quality itemproperty is mostly the same... You can just add variable and declare the item as masterwork in name which I would recommend even if you would bother to add it as itemproperty.

EDIT: Also its less efficient to check if the item has itemproperty than to check local variable

Modifié par ShaDoOoW, 25 août 2010 - 09:35 .


#3
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
As I said, I understand that there are several ways to script this, and I'm not really asking for a scripting tutorial here from people who haven't tried this themselves.

The item property was added so that the player can see this special item property in the item description, listed alongside any other item properties. You personally may not prefer to do it this way. If that is the case, this thread is not for you. I do wish to do it this way, and this thread is for discussing how to do it this way.

Modifié par invisig0th, 25 août 2010 - 08:27 .


#4
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Now I know you are asking for comments from people who have implemented this. But I just want to say that I would like to hear comments on this too. I also like the idea of seeing the material in the item description by adding the item property.

The only way I thought to implement it was to check for the weapons material item property in the creatures OnDamaged script and add/take extra damage there. If there are other methods I'd like to know about them too.

#5
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
Yes, that's definitely the most likely starting point. It's fairly easy to add damage there. In this particular case, using racial group "shapechanger" might work well also.

The real problem is the Damage Resistance. As far as I know that is all hard coded. And onDamaged does not allow you to intercept the initial damage done, since that damage is applied before the event fires. It only lets you add more damage after the fact.

In other systems (prior to 1.69), people have gotten around this by giving a weapon a +1 damage bonus (I think) against racial type, and then given the creatures a DR. The race-based bonus apparently tricks the game engine into disregarding the damage resistance which would otherwise be used. But that's where practical knowledge from someone who has actually tried this would be very useful, because that isn't well documented.

Modifié par invisig0th, 25 août 2010 - 09:41 .


#6
Shadooow

Shadooow
  • Members
  • 4 470 messages
For monsters use OnPhysicalAttacked, for PC I have done OnDamaged event which fires 0.1 second before the PC is harmed using custom OnHit spell on armor (and I got special armor which does looks like no armor in case that player has no armor on himself. If you want I can share this approach.

#7
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
The onPhysicalAttack event runs after the attack, even if no damage occurs. So no,that is not the right way to do this.

Modifié par invisig0th, 25 août 2010 - 09:57 .


#8
Shadooow

Shadooow
  • Members
  • 4 470 messages

invisig0th wrote...

onPhysicalAttack runs even if no damage occurs, so it is not the right way to do this. OnDamaged is the event to use here.

This should not affect anything. Just add DR in OnPhysicalAttack for short ammount of time like 0.3 - maybe less - further testing is required. This should be for players thought, shouldn't it? The OnDamaged on players will allow to do it correctly.

Modifié par ShaDoOoW, 25 août 2010 - 10:56 .


#9
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
This is for monsters only, not players.

[Edit: Shadoow is right -- DR is about preventing the damage , not the attack itself. So using the OnPhysicalAttacked event would be the right event to use if someone was inclined to do what he is suggesting. See below for why it won't work.]

Modifié par invisig0th, 25 août 2010 - 11:07 .


#10
Shadooow

Shadooow
  • Members
  • 4 470 messages

invisig0th wrote...

This is for monsters only, not players.

I'll say it again -- BOTH of these events run AFTER the attack has already been processed by the game engine. There is NOTHING you can do to prevent or alter the attack or damage AFTER the game has already processed the attack and applied any applicable damage. Your suggestion above 100% useless because it assuming things work the other way around.

ShaDoOoW wrote...
If you want I can share this approach.

No thank you -- I'd rather you did not. I would like input from people who have tried this and KNOW how it works. You clearly do not.

You should stop echoing the NWN Lexicon and try things on your own ;). OnPhysicalAttacked fires before the damage is given.

Modifié par ShaDoOoW, 25 août 2010 - 10:02 .


#11
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
You are correct, one of my statements above was incorrect.  OnPhysicalAttacked is processed after the attack happens but before the OnDamaged event fires and damage is applied. Since Damage Reduction is about preventing the damage and not the attack, I will admit that considering what can be done during the OnPhysicalAttacked event is very reasonable.

Regardless, the technique you suggested above won't actually work. Applying a momentary DR is a terrible idea. If the creature has one opponent with a silver weapon and several other opponents with normal weapons, the temporary DR would apply to all opponents. Completely wrong.

Even if your technique did what it was supposed to here, I'm certainly not going to implement a solution which involves applying momentary effects based on guesswork regarding the exact timing of game engine events firing. That's just plain sloppy coding.

Based on the questionable quailty of your suggestion above, it is likely that you have a lot to learn before you will have the expertise necessary to tackle anything as complicated as rewriting the entire NWN spell engine. One needs to walk before one can run.

Modifié par invisig0th, 25 août 2010 - 11:21 .


#12
Shadooow

Shadooow
  • Members
  • 4 470 messages

I have to admit, an unworkable suggestion like this
coming from the guy who says he wants to rewrite the NWN spell engine is
a bit distressing.

LOL, said the man who never shared anything with community, just few screenshots of githzerai which he never finished.

Instead you get idea and try it, you spitting anger on only person that want to help you. I would be surprised if anyone else would want to help you with this further.

You should not judge the man based on one his statement, I got many scripts at vault and I helped many peoples. Do you even understand my new spell engine concept?

As I said. If you followed my ideas and hints, instead of damned them, you would know how to do it. Between lines, I suggested you the working solution, now I just tested it and it works. But I won't take effort to repeat it for someone who thinks he knows better.:sick:

#13
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
Your suggestion to apply a momentary DR will not actually work. If you don't want people telling you when your suggestion won't work, then you will need to post better suggestions.

Your posts in this thread do also call into question your general knowledge level of the subject matter, and it is perfectly valid to say that you might have a few things to learn. I know I certainly have things to learn about all this, which is exactly why I started this thread.

You may feel free to share any personal feelings you have towards me via private messages. That sort of thing doesn't belong in a thread.

You have made it quite clear that you have no intention of providing any actual assistance here. Please stop spamming this thread.

Modifié par invisig0th, 25 août 2010 - 11:43 .


#14
Shadooow

Shadooow
  • Members
  • 4 470 messages
deleted, sorry for spamming

Modifié par ShaDoOoW, 25 août 2010 - 11:39 .


#15
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
Getting back to the topic, applying a standard DR effect, even for a very short duration, using the OnPhysicalAttacked script will not be useful here, since other attackers using normal weapons during that period would also have damage reduction applied. Since the built in armor/skin DR item property cannot be selectively applied versus a specific attacker, this is simply not a workable solution for the problem I have described here.

Any other suggestions as to how to apply a DR-like effect using scripting? Using either the OnPhysicalAttacked or OnDamaged event, I don't see any way to *selectively* reduce the damage that the game engine will apply based on the weapon of the attacker.  It may not be possible. Can anyone confirm this?

Modifié par invisig0th, 26 août 2010 - 03:00 .


#16
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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.

#17
Guest_invisig0th_*

Guest_invisig0th_*
  • Guests
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 .