Member
Join Date: Jul 2007
Location: Tennessee, USA
Posts: 52
|
When I bootstrap a weapon to a creature of Large size or larger, the weapon remains Medium size. How can I specify that the weapon size match the size of the creature when I bootstrap the weapon to the creature. I have assigned the Helper.DamageUp tag, and that did not seem to do anything. Thanks.
|
#1 |
Senior Member
Join Date: May 2016
Posts: 608
|
Depending on the size of your creature, I think you have to simply increase the gSize field value on the weapon by 1 for large, 2 for huge, etc.... Normal size is 0.
Of course, why are you bootstrapping the weapon? If you wanted a creature to have a weapon for the Encounter builder, you can create a .stock file and give them copies of the weapon in the appropriate size. Alternatively, you can bootstrap the Other Melee natural attack and give it the correct name and stats. |
#2 |
Member
Join Date: Jul 2007
Location: Tennessee, USA
Posts: 52
|
Quote:
- Thing 'rxxxx' - Bootstrap value assignment precludes persistence for field 'gSize'. where rxxxx is the creature that I am bootstrapping to. I also realize that I can use the Encounter Builder and the Other Melee natural attack options. However, there are some situations where bootstrapping the weapon would be of benefit to me. Also, after experimenting with this for a bit, I would like to better understand what is required to make it work. Thanks again. |
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Have you tried having an eval script set the field value? Haven't looked into it, just spitballing.
|
#4 |
Senior Member
Join Date: May 2016
Posts: 608
|
Quote:
The following snippet (of working code for an activated "increase weapon size for longsword" ability) could be modified to run on any trigger, like a menu drop or however you want to turn it on and off. Code:
if (field[abilActive].value <> 0) then foreach pick in hero from BaseWep where "thingid.wLongsword" eachpick.field[gSize].value += 1 nexteach endif foreach pick loops are CPU hoggish, but they do get the job done. Last edited by dungeonguru; August 24th, 2017 at 09:43 AM. Reason: corrected grammar |
|
#5 |
Member
Join Date: Jul 2007
Location: Tennessee, USA
Posts: 52
|
Thanks, dungeonguru. That got me on the right track. I had to do a little bit of tweaking to get it to work since clicking the mainhand and offhand check boxes would cause the size to increase by 2 more to 4, which is "guargantuan". I added a check step to only make the change if "gSize" had not already been increased. I also increased the weapon size to automatically match the size of the creature.
Code:
var size as number if (hero.tagis[Size.Large] <> 0) then size = 1 elseif (hero.tagis[Size.Huge] <> 0) then size = 2 elseif (hero.tagis[Size.Gargantuan] <> 0) then size = 3 endif foreach pick in hero from BaseWep where "!wGroup.Natural" if (eachpick.field[gSize].value = 0) then eachpick.field[gSize].value += size endif nexteach Last edited by Gladiator66; September 4th, 2017 at 06:35 AM. |
#6 |
Thread Tools | |
Display Modes | |
|
|