I am writing a homebrew weapon damage system based on variables placed on creatures so that some creatures can damage weapons with acid, or flame, or just trauma due to high AC hides (admantium golems,etc) simply by setting a variable called 'DAMAGE_ACID,DAMAGE_FIRE,etc' to '1' on creature with resistance
its quick, efficient and handy for me, the only thing missing is I would like to modify it a little more and make percentages based on the + value of the weapon, so if its say a +5 weapon it would have less of a chance to break then a +2 or +1 weapon.
I can totally write the code if I knew how to find that value on an item
is there a function? or way to determine roughly what attack/dmage bonus is of an item?
I did a search on old and new forum but I guess I dont know how to 'word' it so I end up with no results found.
Thanks!!!!
is there a way to find + values of weapons?
Débuté par
lordofworms
, avril 13 2011 06:13
#1
Posté 13 avril 2011 - 06:13
#2
Posté 13 avril 2011 - 06:27
Ok, no sooner do I post this that I try a google search and voila!
thanks to our good friend mr. lightfoot.
//////////////////////////////////
//code by Lightfoot///////
/////////////////////////////////
int GetItemAttackBonus(object oItem)
{
itemproperty ipSearch=GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipSearch)== TRUE)
{
if(GetItemPropertyType(ipSearch)==ITEM_PROPERTY_ATTACK_BONUS)
{
return GetItemPropertyCostTableValue(ipSearch);
}
ipSearch=GetNextItemProperty(oItem);
}
return 0;
}
thanks to our good friend mr. lightfoot.
//////////////////////////////////
//code by Lightfoot///////
/////////////////////////////////
int GetItemAttackBonus(object oItem)
{
itemproperty ipSearch=GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipSearch)== TRUE)
{
if(GetItemPropertyType(ipSearch)==ITEM_PROPERTY_ATTACK_BONUS)
{
return GetItemPropertyCostTableValue(ipSearch);
}
ipSearch=GetNextItemProperty(oItem);
}
return 0;
}
#3
Posté 13 avril 2011 - 06:38
#4
Posté 14 avril 2011 - 11:23
once again...you have made life easier for me.





Retour en haut






