• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Increasing Weapon Size Category When Bootstrapping Weapon

Gladiator66

Well-known member
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.
 
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.
 
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.

Thanks for the response, dungeonguru. I had tried increasing the gSize field value on the weapon as part of the bootstrap, but I was getting the following error:

- 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.
 
Have you tried having an eval script set the field value? Haven't looked into it, just spitballing.
 
Have you tried having an eval script set the field value? Haven't looked into it, just spitballing.

Most of the equipment manipulations need to generally be done in the Final to Render phase and the gSize field is easily manipulated in a script.

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

thingid.wLongsword could be replaced with anything that narrows down the weapon, like if "!wGroup.Natural" to affect all weapons that are NOT natural weapons, etc...

foreach pick loops are CPU hoggish, but they do get the job done.
 
Last edited:
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:
Back
Top