Prereq for using a weapon special material
Heya, I've run into a bit of an issue. I'm trying to crate a special material that adds the WOUNDING special property (among other things).
This special material causes any weapon to be made from it to require a new exotic weapon proficiency called "Shard Weapon" For anyone who does not possess the proficiency, the weapon functions as normal except that they take the usual penalty and it disables the wounding quality. Am wondering if anyone could give me a hand with this. |
I would add a new feat for "Shard Weapon Proficiency", then add an eval script to the material which checks for the presence of your feat, and if not found, deletes the Proficient tag on the parent weapon it is inside. You'll need to set the eval script before whatever script calculates the attack bonus for a weapon.
|
Here is a rough example, assuming your feat's unique ID is "fShardWepProf".
Post-Level 10000 Code:
~Do nothing if we have the correct proficiency Usual disclaimer about code being untested and may need tweaking. |
Quote:
So what I have decided to do is a mix of your example and your suggestion. I created a new dynamic tag ShardProf with base values of ProfAll, AllSimple, AllMartial, and AllExotic. I'll use those in the future if I need to expand the functionality. The point is I want to get the idstring from my selection and use that as the value of my tag, then push that to the hero. Then I can check if that exists anywhere I need. The issue is I dont know how to do that, this is my code sofar, but I cant figure out a way to take the usrChosen idstring and pass that into an assign or forward command. Code:
|
First, you cannot, AFAIK assign a tag with a wildcard, so I would expect "perform eachpick.assign[ShardProf.?]" to throw an error. So fix that to assign an actual tag, then confirm that the ShardProf tag you want is being assigned to the weapons you've chosen with the new feat.
If so, then all you need to do is alter the script in the material to run after the feat script which assigns the tag, and have the material script check for any ShardProf tag on the parent weapon before deleting Helper.Proficient. If for some reason your foreach is NOT getting to the correct weapon picks to do that assign, then you need to look into what the fTargetId procedure is outputting for the "id" variable. Also, what is the reason you're doing "eachpick.forward" in that script? Is something supposed to be checking for those tags on the hero for some reason? |
Yeah, my thought process is kinda weird, sometimes I dont really even know what I'm doing half the time. Therefore, I was trying to create a dynamic tag and pull the idstring and use that as the tag id.
What I was looking to try and do, I found on the forums (took a while of searching was assignstr["ShardProf." & id] And then forward that to the hero so I could test for the presence of that tag. Ultimately, it failed. Herolabs just did not like what I was doing. I could assign those dynamically, just not using assignstr[]. After that I kinda relized I was doing this the hard way, and I should just assign ShardProf.IsShard or something like that to whatever weapon matched the user's choice. After that, it works, the code is as follows for those who would like to use in the future: In a Tags.1st file Code:
<!-- Shard Weapon Material Proficiency Tags --> Pre-Levels/5000 Code:
~ If we're disabled, do nothing Final/10000 Code:
field[usrCandid1].text = "component.BaseWep & wCategory.Melee & (wType.P | wType.S) & !wFtrGroup.Natural" As for the material Mirror Shard (m35ShardWep) The relevant portion that marks the weapon as non-proficient is the following: PostLevel/10000 Code:
perform container.parent.setfocus Thanks for the help, and I hope these code snippets help people in the future. |
All times are GMT -8. The time now is 08:53 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.