• 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

An Item (not a material) that lowers MaxDex of worn Armor? And Set Item?

ancient

Member
---
Q1

I thought of somethink like this:

if (field[gIsEquip].value <> 0) then
>>field[arMaxDex].value<<
endif

But what is the field that stores the final arMaxDex for the character, i need to modify this value.
To better explain: The item are "arm greaves".

---
Q2

Another question: Any chance to add a bonus if another item is equipped? Something like "set items"?!


Thanks a lot!
 
Hi, i really need help from a "pro" if this is possible.

Idea: An Item that can be worn and adds a penalty to the MaxDex Bonus of the Armor that is worn (if an armor is worn). It is some kind of an additional armor piece.
 
Only advice I can give on this is to look at the Mithral material in the editor to see how it adjusts Max Dex value. As I have never done this myself so I can't give any good advice without digging through HL myself.

Often the best way to find stuff is to try and find another Thing that does something even similar and copy its script.

Have you looked at the fields associated to armor to find the field name? Hmm going to assume here you have not actually. In that case do the following: So to find the correct field add a suit of armor to a character and then Right click on the "?" to get a list of choices. Take the one called something like "Show Debug Fields...".

If you don't see that you have to go to the develop menu, make sure the first option, "Enable Data File Debugging" is checked. This way you can start seeing the name of the fields on Things and their values. Really helpful. Plus this lets you do a Ctrl-R which does a quick reload of the data set. Also very helpful when making changes.

As for Q2 yes you can. You simply need to try and reference the other item to see if it exists and then if it is equipped. So lets assume your item is called Shadow1:
Code:
~ see if we are live first
If (hero.childlives[Shadow1] <> 0) then
  ~ see if the item is equipped
   If (hero.childfound[Shadow1].field[gIsEquip].value <> 0) then
      ~ Do what ever you want now that we found the 2nd item and it is equipped.  
   Endif
Endif

Hope that helps.
 
Thanks at first, the 2nd part is already clear than.

Mithril was my first dig, however, the problem is that it manipulates the "arMaxDex" of its "parent container", because it is a material that is attached to an item. Because I have another item this isn't possible. I would need to check if an armor is worn and then lower its MaxDex Bonus.
 
Thanks at first, the 2nd part is already clear than.

Mithril was my first dig, however, the problem is that it manipulates the "arMaxDex" of its "parent container", because it is a material that is attached to an item. Because I have another item this isn't possible. I would need to check if an armor is worn and then lower its MaxDex Bonus.
Ok so now have part of the script you need then. The missing piece would be to be able to Read through all the Armors on a character and affect those that are equipped.

So that would be similar to the Fighter Class feature that lowers armor ACP. So may wish to check their for a script that reads through all armor on a character. Changing it from the ACP field to your arMaxDex field instead.
 
Last edited:
i currently ended up with some two steps, which seems to work:

phase: first (user) 12000
~eliminating armor class, so that the item (bracers) can be worn in addition to other armor without a validation error
perform delete[ArmorClass.Light]
~ but require at least "Light Armor" Proficiency to be worn at all
perform assign[Helper.Prof1Step]

phase: post-levels 2000

~only if equipped...
if (field[gIsEquip].value <> 0) then
~worsen maxDex of worn armor by 1. this worsens maxdex of itself, but that doesn't matter because we removed ArmorType
foreach pick in hero from BaseArmor where "EquipType.Armor"
if (eachpick.field[gIsEquip].value<>0) then
eachpick.field[arMaxDex].value -= 1
endif
nexteach
endif
 
Last edited:
Back
Top