Member
Join Date: Feb 2012
Posts: 30
|
Hey, sorry for bothering again, is just I don't know where to find all the scripts so I can look for them by myself, so I have to ask for some scripts...
There is any script like field[gIsEquip].value <> 0 but that only works for the off-hand? like for make a weapon to increase the enhancement bonus just if the hero holds the weapon on the off-hand? Thank you by the way |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Here is a good trick that might help in the future. Go to Develop -> Enable Data file debugging. Now add a weapon to your character, right click the weapon and pick Show debug tags, Now you have a list of the tags on that weapon. Equip it in the main hand, what tags were added? Now equip it in the off hand, which tags are added?
Now you should have enough information to write your script looking for the off hand tag. Does the weapon get a bonus when wielded in 2 hands? If so then you only need to check for the off hand. If not then you need to check and make sure the main hand tag is not also present. |
#2 |
Member
Join Date: Feb 2012
Posts: 30
|
the thing is that I've created a sword (that I will call here customsword) that is just a +2 longsword when wielded, BUT if the custom sword is wielded in the main hand, you get another customsword and wield it in the off-hand, so you have 2 customswords, one in each hand simultaneously, then both swords turn from +2 to +5 holy speed, the weapons are the same so I need just a way that the same weapon hads to be wielded in main and off hand as two weapons.
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
It seems to me that the important thing here is that 2 customswords are equipped, it's not necessary to know which is equipped in which hand, since they both get the same power in either hand. You can create a custom tag to track how many are equipped, for this example I will refer to this new tag as "Custom.SuperSword".
To add a new Custom tag, scroll down to the bottom of any tab in the editor and hit the User Tags button, and choose New Tag at the top. I'd recommend you have 2 eval scripts. 1) In First have it check if the weapon is equipped, if so assign Custom.SuperSword to the hero. 2) Later, use hero.tagcount to count the Custom.SuperSword tags on the hero, if there are at least 2 then do whatever (modify the enhancement bonus and names, most likely) Capisch? |
#4 |
Member
Join Date: Feb 2012
Posts: 30
|
Quote:
Last edited by FaeruN; March 5th, 2012 at 05:03 AM. |
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
When a weapon is equipped in the main hand, it has the Hero.MainHand tag, and when it is equipped in the off hand it has the Hero.OffHand tag.
|
#6 |
Member
Join Date: Feb 2012
Posts: 30
|
and how do I use that? I've tried if the tag is on use, or to tagcount looking for that tag and it stills doesn't work... I don't have any more ideas for this...
|
#7 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
if (tagis[Hero.MainHand] <> 0) then
DO WHATEVER endif if (tagis[Hero.OffHand] <> 0) then DO WHATEVER endif |
#8 |
Member
Join Date: Feb 2012
Posts: 30
|
nothing, still not working :/
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Maybe its just me but I am wondering if you both are on the same page. My advice would be for FaeruN to post your full code that your having problems with including the timing you are using.
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#10 |
Thread Tools | |
Display Modes | |
|
|