Conditional Equipment

8 posts / 0 new
Last post
Conditional Equipment

Ahoy. I am wondering, is it possible to forbid the equipping of items or add conditions based on other conditions or attributes?

You are trying to equip "Heavy Armored Vest." If you have the "Strong" ability, you can equip it normally. If you don't, then you can equip it but it adds a "Weighed Down" condition that increases stamina consumption. If you have the "Weak" trait, it unequips it and informs the player they are too weak to use it.

I vaguely recall there being something added where conditions can cause other conditions, but I don't remember details. I'm also not sure if it can make that many checks through the XML file alone (for example, it can maybe check for Strong, or it can check for Weak, but not both).

Anyone know if this is currently possible?

It is possible. Kind of. You may want to take a look at the Thresholds system - the "aThresholds" part of the condition. It sets after how many stacks of said condition another one needs to be applied, and which. So you can, for example, make a condition called "encumbered by equipment" which does nothing but has:

<column name="aThresholds">2=65</column>

If that condition is stacked once, nothing happens. If it is stacked two times, a condition ID 65 is automatically applied. So you can make it so a heavy equipment adds one instance of this condition and Feeble flaw also adds one, making those two combined (but not any single one of them) cause some penalty.

Keep in mind that you also have to set a situation in which the condition added by threshold is removed:

<column name="aThresholds">1=-65;2=65</column>

In that situation, once one instance of the threshold condition is removed (dropping it back to 1) the condition it was previously adding gets removed (otherwise it would stay infinitely).

If all the above sounds confusing it is probably due to the fact that it is rather complicated and also because I am sick right now and talking nonsense, quite possibly :D

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

It kind of makes sense, but would that allow for the equipment to be automatically unequipped? It doesn't seem to be the most elegant way to do what I was hoping to, but I wonder if there's a way to jerry-rig it with the tools at hand. Is there a way to use conditions to force only the item you just attempted to put on (rather than everything on that slot, such as is the case with the Shirt slot) to be removed? I know flip-flops can remove themselves, and I vaguely recall seeing a condition that removes what is on that slot, but I don't have the XML right in front of me so not sure if other slots for the behavior exists.

Not sure on 100%, but from what I can remember, one can only dump stuff from a slot, not a particular item.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

I think Kaaven's covered your question, but I wanted to offer a suggestion for an alternative approach.

In a situation like the one you're describing, I often prefer to let the player "hang themselves," so to speak. Namely, if the heavy vest is too heavy for a weak person to wear, it may be best to give it an appropriately heavy weight and just let the encumbrance system deal with the consequences. They'll put the vest on, and either be penalized or not based on their stats (including being unable to move, which forces them to remove it again).

I think this would make it more realistic (since it accounts for non-strong/weak conditions that affect encumbrance), and also make your mod easier to maintain.

Dan Fedor - Founder, Blue Bottle Games

The above example was just to explain the mechanics I'm looking for. I could have as easily said "A knife that gives a bonus to accuracy if Weak, gives no bonus to Normal, and cannot be equipped by Strong." It's not the actual item I plan to make. Ultimately, I have other plans for the mechanic.

If it isn't available, though, I may have to go with the "hang the player" approach, or find some other alternative.

What I am planning on doing is partially using thresholds and adding a few hidden conditions to the skills making say Athlete immune to "stiff movements" penalties, and strong can be immune to "Bulky" penalties, while their opposites take a much heavier hits to the penalty, normally it would be minor inconveniences, but frail with bulky items would make things even harder to function and move properly.

And when the world has come to an end, I shall remain.

I do mod requests, just leave a comment or PM me.
Mod requests: Here

the essence of the reply's in this thread should be incorperated into

i think i can use this to keep two similiar but different conditions from stacking correct?

such as a tarp that increases concealment on a campsite and a coat that makes the players concealment higher

update: the two conditions are not the same condition, and i'd like condition A to take precidence over condition B. possible?

say the tarp has a .30 increase to concealment and the coat has a .25, id like the .30 to be applied but not both

OverHaul Mod
DevKit is an upgraded BBC mod.
Improve your mods.