• 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

Conditional Bootstrap issues

AndrewD2

Well-known member
I'm working on an item that if you have a certain witch hex it increases it's damage and if you don't it gives you claws. I setup a script that sets abValue to 1 if the hex isn't there, set at First/450. I then set a bootstrap condition of fieldval:abValue >= 1. And it works, kinda, when you equip the item it's not there, but then when you unequip the item it's there. I've attached some pictures to show what I mean.
 

Attachments

  • initial.JPG
    initial.JPG
    42.2 KB · Views: 8
  • equip 1.JPG
    equip 1.JPG
    44.6 KB · Views: 7
  • unequip1.JPG
    unequip1.JPG
    46.4 KB · Views: 6
  • equip2.JPG
    equip2.JPG
    39.5 KB · Views: 6
I reported a bug as it appears bootstrap conditions using fieldval as a test is not working currently. That's why it's acting strange.
 
Ok, it's funny because it's working fine for a different item, at least how I have it implemented, it only seems to cause problems when the item needs to be equipped first.
 
Ok, it's funny because it's working fine for a different item, at least how I have it implemented, it only seems to cause problems when the item needs to be equipped first.
The issues I found where with the equipped items specifically armor. So maybe it is narrowed down to ONLY fieldval on equipped items.
 
Try First/501. I'm checking if we can get a script moved back to First/499 instead of First/500.
 
Are you talking for the Bootstrap Condition or for Eval script?

The eval script was running at First/450 and the Bootstrap Condition has been tested at First/500 and First/600
 
AndrewD2, please copy the actual code you used. Both the Eval Script and the bootstrap condition.
 
The 2 eval scripts:
First/501
Code:
~if we're not equipped, get out now
doneif (field[gIsEquip].value = 0)

if (hero.childlives[cWitNails] = 0) then
   field[abValue].value = 1
endif

pre-levels/10000
Code:
if (field[gIsEquip].value <> 0) then
  if (hero.childlives[cWitNails] <> 0) then
    perform hero.child[wClaw].assign[Helper.DamageUp]
    perform hero.child[wClaw].assign[Helper.DamageUp]
  endif
endif

The bootstrap condition:
First/502
Code:
fieldval:abValue >= 1

Those changes have worked.
 
I'd do this:

Code:
if (hero.childlives[cWitNails] = 0) then
  field[abValue].value = 1
  endif

And this:

Code:
(fieldval:abValue <> 0) & (fieldval:gIsEquip <> 0)

That way, whether abValue is set or not doesn't rely on whether the item is equipped or not - you're testing the equipped state only in the bootstrap condition. I also always prefer <> 0 and = 0 as my tests for "is on" and "is not on".
 
Back
Top