Toolset Item Property - Cast Spell: Poison Weapon - where is the BW script for this?

So, I got into making herbalism bushes for Druids, Rangers, Elves, Gnomes, and Halflings to have a wis check to deforest. And I made things like Kingsfoil and Saint’s Sage, and then I was looking at the “Bellasdonna” item, which is a misnomer as Aconite is the actual wolfsbane - but that’s beside the point. It led me to making poison herbs as well. And well, I had it so you could just eat the kingsfoil and get a cure minor wounds, or a protection from evil from saint’s sage… And it doesn’t work the same (I think) with inflict minor wounds - so I spot “Poison Weapon” on the list.

“Well!” I think to myself, “That sure is a nice theme for assassin types who are say, elves or whatever.” And all the stuff about assassin poison nerfs aside - since I know you can flag a module so that you need the use poison feat to use poisons - I sure do think this would be good for my module.

But! Im pretty sure the spell: poison weapon is tied into the vials like the centipede and spider things. I’m guessing the tag and or resref are involved. There sure isn’t a way to set the parameters for poison weapon, and looking at a vial of centipede poison from the standard pallette contains no variables.

So, its probably tagbased and there is probably a bioware script somewhere I can reference.

The way I was planning the herbs was to have the bush/fern placeable have a tag identical to the tag of the item related to it and then use that default script that destroys a placeable on used and creates an item with the same tag in the player’s inventory. There’s probably a script package out there that does this already, because I’m mimicking stuff I’ve seen in other PW’s with this method. But I can script okay enough to maybe work the thing out on my own and get better at scripting in the process.

So, if anyone knows where I can find the script that does the tagbased functions for the centipede, spider, and whatnot vials I can probably handle the rest. Ive done some web searching but Im mostly just finding discussions on assassins and blackguards or script packages for poison systems.

I find the answers to these questions by going into the toolset, copying the Tag of the item in question, opening the Script Editor and doing a search for the tag in “all files”.

If that one doesn’t work, I’ll go to the modules “OnUse” script and see what I can find.

I’m not near a computer right now, or I’d just do that and tell you what I found. Sorry.

1 Like

Seems the Centipede poisons cast the spell Poison Weapon “x2_s2_poisonwp”

Oh, okay. You generated another question for me.

I tried to do a search in the script editor, the only thing I found was find text and there was an option to search all files but when I pressed okay it did nada. But it may have just been the tag I used got no result. Did I do that correctly? For future reference.

Ah: this makes it so easy THANKS!

" The exact details of the poison are loaded from
a 2da defined in x2_inc_itemprop X2_IP_POSIONWEAPON_2DA
taken from the row that matches the last three letters
of GetTag(GetSpellCastItem())

Example: if an item is given the poison weapon property
         and its tag ending on 004, the 4th row of the
         2da will be used (1d2IntDmg DC14 18 seconds)"

NICE!

On that particular search, I had looked at the item itself, and it said “Cast Spell” so I looked for a spell script with “pois” in it. Sometimes you gotta get creative in reverse engineering this stuff. Everybody has their own way of naming and coding, and sometimes it’s hard if you get too used to one way.

1 Like

EDIT NEVERMIND I FOUND THE ) after halfling right when I posted this

Ok, I am trying to use the include for transforming one object into another here so I can make a trigger spawn a bush if the character is an elf, halfling, gnome, druid, ranger, or harper. Any of those being true will make it work. So I used the || operand and for some reason my brain cant work this out. What the heck am I missing here? The error is in the line checking all the Or possibilities with ||

///666trig_herbs
// on enter of a trigger with the same tag
// as the resref of the placeable bush
// that creates an herb item in the PCs inventory
// part of the crafting system for the PW Terth


#include "x0_i0_transform"

void main()
{

object oPC = GetEnteringObject();
if ( ! GetIsPC(oPC) )  return;
if (! GetAbilityScore(oPC, ABILITY_WISDOM) >= 12 ) return;

int nFaeRace = GetRacialType(oPC);

int nNaturClss1 = GetLevelByClass(CLASS_TYPE_DRUID, oPC);
int nNaturClss2 = GetLevelByClass(CLASS_TYPE_RANGER, oPC);
int nNaturClss3 = GetLevelByClass(CLASS_TYPE_HARPER, oPC);


if (nFaeRace == RACIAL_TYPE_ELF || nFaeRace == RACIAL_TYPE_GNOME || nFaeRace == 
RACIAL_TYPE_HALFLING) || nNaturClss1 >= 1 || nNaturClss2 >= 1 || nNaturClss3 >= 1)
 {
object oOrigin = GetNearestObjectByTag(GetTag(OBJECT_SELF));
string sPlaceable = GetTag(oOrigin);

TransformObjectToPlaceable(oOrigin, sPlaceable);
object oBush = GetNearestObjectByTag(sPlaceable, OBJECT_SELF, 1);
DestroyObject(oBush, 240.0); //bush hangs around for a while after discovery
}
else return;
}

ALSO EDIT: I included the fixed script for the heck of it

///666trig_herbs
// on enter of a trigger with the same tag
// as the resref of the placeable bush
// that creates an herb item in the PCs inventory
// part of the crafting system for the PW Terth

 #include "x0_i0_transform"

void main()
{

 object oPC = GetEnteringObject();
 if ( ! GetIsPC(oPC) )  return;
if (! GetAbilityScore(oPC, ABILITY_WISDOM) >= 12 ) return;

int nFaeRace = GetRacialType(oPC);

int nNaturClss1 = GetLevelByClass(CLASS_TYPE_DRUID, oPC);
int nNaturClss2 = GetLevelByClass(CLASS_TYPE_RANGER, oPC);
int nNaturClss3 = GetLevelByClass(CLASS_TYPE_HARPER, oPC);


if (nFaeRace == RACIAL_TYPE_ELF || nFaeRace == RACIAL_TYPE_GNOME || nFaeRace == 
RACIAL_TYPE_HALFLING || nNaturClss1 >= 1 || nNaturClss2 >= 1 || nNaturClss3 >= 1)
{
object oOrigin = GetNearestObjectByTag(GetTag(OBJECT_SELF));
    string sPlaceable = GetTag(oOrigin);

TransformObjectToPlaceable(oOrigin, sPlaceable);
int nObj = 1;
object oBush = GetNearestObject(OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nObj);
  string sBush = GetTag(oBush);
  while (sBush != sPlaceable)
    {
    nObj ++;
    object oBush = GetNearestObject(OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nObj);
    sBush = GetTag(oBush);
    }
DestroyObject(oBush, 240.0); //bush hangs around for a while after discovery
}
else return;
}
1 Like