logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Material and quality in 1.69

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Uranos



Joined: 12 Nov 2009
Posts: 1

PostPosted: Thu Nov 12, 2009 12:26    Post subject: Material and quality in 1.69 Reply with quote

Hi

1.69 has added 2 new properties that can be added on items: material and quality. Two specific values for material that I'm interested are "silver" and "cold iron". I would like to make special weapons with this parameter so that they are the only weapons that can deal phisical damage to specific monsters (silver - ghosts/wraiths/spectre; cold iron - demons and few outsiders). Any weapons without these properties are to deal 0 phisical dmg against those creatures even if a weapon is +20 (energy and elemental damage will apply though).

At first there was an idea to set dmg reduction at 50/+6 and giving silver and cold iron weapons a +6 attack bonus (normal weapons have max +5 - with spells), but it doesn't fix the issue with Arcane Archer - which is intended that he used silver/cold iron arrows as well to do any harm)

I would appreciate some help on solving the above matter.

Please note that I am a beginner with nwnx Rolling Eyes though I do use C/C++.

Many thanks for your support

Uranos
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Nov 13, 2009 13:11    Post subject: nwn events? Reply with quote

Its just a thought, but perhaps the nwn_events plugin might be the way to work on this?


It has, I believe, an Attack event, which you can hook onto.


It might be possible to perform your own verification within the Attack hook, so you can verify the weapon being used for the attack, and depending on whats being used, either negate the damage, or increase it etc.


Just a guess though.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Nov 13, 2009 13:59    Post subject: Re: nwn events? Reply with quote

Baaleos wrote:
Its just a thought, but perhaps the nwn_events plugin might be the way to work on this?


It has, I believe, an Attack event, which you can hook onto.


It might be possible to perform your own verification within the Attack hook, so you can verify the weapon being used for the attack, and depending on whats being used, either negate the damage, or increase it etc.


Just a guess though.
thats not possible

My thought is to use No Melee Damage item property and then add physical damage, or/and enhancement as new itemproperty vs race

Not sure how no meelee damage work though
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Squatting Monk



Joined: 28 Jun 2007
Posts: 76

PostPosted: Mon Nov 16, 2009 1:55    Post subject: Re: nwn events? Reply with quote

ShaDoOoW wrote:
thats not possible

Err... why not? Sure, there's no way to be sure which weapon is being used if the player is dual-wielding, but for normal attacks you can just use GetItemInSlot() and check the item properties.

I'd suggest a more low-tech solution, though: give the creatures immunity to all the physical damage types, then give items made of cold iron or silver a magical damage bonus (equal to the base damage type of the item) versus those races. No NWNX required.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Nov 16, 2009 2:22    Post subject: Re: nwn events? Reply with quote

Squatting Monk wrote:
ShaDoOoW wrote:
thats not possible

Err... why not? Sure, there's no way to be sure which weapon is being used if the player is dual-wielding, but for normal attacks you can just use GetItemInSlot() and check the item properties.

I'd suggest a more low-tech solution, though: give the creatures immunity to all the physical damage types, then give items made of cold iron or silver a magical damage bonus (equal to the base damage type of the item) versus those races. No NWNX required.
its not possible from the nature how OnAttack works. It fire script when you click on enemy nothing more. You can change your weapon after it.

As for your idea, not very possible too because there is strenght factor too.

Squatting Monk wrote:
So, by "not possible" you mean "not optimal". Wink

kind of Wink
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect


Last edited by ShaDoOoW on Mon Nov 16, 2009 16:54; edited 1 time in total
Back to top
View user's profile Send private message
Squatting Monk



Joined: 28 Jun 2007
Posts: 76

PostPosted: Mon Nov 16, 2009 6:20    Post subject: Reply with quote

So, by "not possible" you mean "not optimal". Wink
Back to top
View user's profile Send private message
kucik



Joined: 11 Feb 2009
Posts: 19
Location: Czech Republic

PostPosted: Thu Nov 26, 2009 15:37    Post subject: Reply with quote

Why don't You add OnHitItem* property to theese weapons? Then make script which deals damage to creature if creature and weapon meets specific criteria. Then make damage reduction for creature.

Of course, this solution have some weakneses, but it should work.
Back to top
View user's profile Send private message Visit poster's website
kucik



Joined: 11 Feb 2009
Posts: 19
Location: Czech Republic

PostPosted: Wed Jan 13, 2010 23:10    Post subject: Re: nwn events? Reply with quote

ShaDoOoW wrote:
its not possible from the nature how OnAttack works. It fire script when you click on enemy nothing more. You can change your weapon after it.


I don't think it's true. I made some archery targets yesterday (target is creature) and OnAttacked event fired on every attack.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group