I “borrowed” a script from Vordan’s Hero Creator to enhance weapons on a workbench. There are a couple of scripts to do this but the one I’m trying to change is the item check which makes sure the weapon is valid for crafting.
It’s fine for melee weapons but I want to make it for ranged weapons too. It’s going to put an enhancement bonus on the weapon and I checked that you can do that in the item properties ( you can ) but I can’t remember ever seeing an enhanced bow. Do they exist ? They seem to only have attack bonuses.
Anyway if you can do this ( and it works ) where do I put this ?
if((IPGetIsRangedWeapon(oItem) == TRUE
In this script ?
#include "x2_inc_itemprop"
int StartingConditional(string sWorkbenchTag)
{
object oWorkbench = GetObjectByTag(sWorkbenchTag);
object oItem = GetFirstItemInInventory(oWorkbench);
if(oItem != OBJECT_INVALID)
{
if((IPGetIsMeleeWeapon(oItem) == TRUE
)
&& GetNextItemInInventory(oWorkbench) == OBJECT_INVALID)
return TRUE;
}
return FALSE;
}
I put it straight under the melee weapons part but it didn’t work, put in an or, then an if and an else, but that didn’t work either. Then I copied the whole bit in the { brackets about melee weapons and stuck that below it in more brackets but that didn’t work either. I’m completely guessing here and it’s not working which isn’t very surprising ! If anybody knows how to add this so my anvil will allow bows to get an enhancement bonus then please let me know.
I wasn’t going to bother but it’s not really fair on the archers when everybody else has enhanced weapons.