On the subject of applicable settings (eg. weight) to Creature Armour

Hey! Good evening!

I, uh, am trying to simulate a thing. In so doing, I decided the best way to achieve said simulation was by adding encumbrance to a creature armour, then applying it/equipping it to protag-chan.

It does not seem to affect the carry-weight of the creature in question. However, upon removing the creature skin to inventory, I can see that, yes, indeed, the weight has been added to the skin.

So, silly question: can skin be heavy, y/n? I’m guessing not from my feeble experimentation. Second question: any way to disable run? I’ve already slowed down the affected object, but I want it to no longer be capable of running.

Total question: am I just being roundabout? Is there an Occam’s Razor somewhere staring me in the face?

Thanks for your time!!

You might find the information on effect EffectMovementSpeedDecrease(int nPercentChange); in the lexicon to be of use here. You can find links to the lexicon (and loads more beside) in this pinned thread.

TR

Thanks, Tarot_Redhand, for your reply! The lexicon is a super-helpful archive, and I’ll definitely be returning to it going forward.

Problem is, I’ve already been using EffectMovementSpeedDecrease(int nPercentChange); in my little code snippet. It does what it says on the tin, and I love it, but the “running” animation still occurs when the PC is moving a great distance. Lemme see if I can’t post some of my embarrassingly amateur code and show a little of what I’m attempting.

// all the effects that make up exhaustion
effect eStrDec = EffectAbilityDecrease(ABILITY_STRENGTH, 6);
effect eDexDec = EffectAbilityDecrease(ABILITY_DEXTERITY, 6);
effect eMovDec = EffectMovementSpeedDecrease(50);

int GetEncumberedL(int nStr){
    int nEncumberedL;

switch (nStr){
    case 1:
        nEncumberedL = 6;
        return nEncumberedL;
        break;
    case 4:
        nEncumberedL = 26;
        return nEncumberedL;
        break;
    case 10:
        nEncumberedL = 86;
        return nEncumberedL;
        break;
    default:
        return nEncumberedL;
        break;
}

return nEncumberedL;
}

// make object's skin "heavy" to stop running
void EffectEncumber(object oTarget, object oSkin){
    int nInvWeight = GetWeight(oTarget)/10;

int nStrScore = GetAbilityScore(oTarget, ABILITY_STRENGTH, FALSE);
int nLeftover = (GetEncumberedL(nStrScore) - nInvWeight);

int nWeight;
if (nLeftover <= 5)
    nWeight = IP_CONST_WEIGHTINCREASE_5_LBS;
else if (nLeftover <= 10)
    nWeight = IP_CONST_WEIGHTINCREASE_10_LBS;
else if (nLeftover <= 15)
    nWeight = IP_CONST_WEIGHTINCREASE_15_LBS;
else if (nLeftover <= 30)
    nWeight = IP_CONST_WEIGHTINCREASE_30_LBS;
else if (nLeftover <= 50)
    nWeight = IP_CONST_WEIGHTINCREASE_50_LBS;
else
    nWeight = IP_CONST_WEIGHTINCREASE_100_LBS;

AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyWeightIncrease(nWeight), oSkin, -1.0f);
}

void main(){
object oTarget = OBJECT_SELF;
object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oTarget);

if (GetHasFeat(1117, oTarget)){
    ExecuteScript("cond_fatigued", oTarget);
    return;
}
else{
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eStrDec, oTarget, -1.0f);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDexDec, oTarget, -1.0f);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMovDec, oTarget, -1.0f);
}

EffectEncumber(oTarget, oSkin);
}

In this case, I’m using switches to test out little miss Darkstar’s strength, light-encumbrance capacity, and add weight according to what will fill up her light-encumbrance. The question might be “???” at this point, but it is indeed the thing I’m trying to do. It works. Kind of. I mean, it sets all the variables to the right values, changes the weight of the skin and everything, but her actual inventory weight does not change.

I know, my code is horribad. This isn’t something I do professionally. I just thought this “weight-gain” would work.

(Also, bad code is so bad it broke post formatting. Nice.)

Psh. :slight_smile: Plenty of fellow amateurs here, and this is far from horrible. Hold yer head up high.

Testing it by switching oSkin to target the chest slot instead, I’m not getting the weight increase item property in the first place. Tried to write own scenario and apply it manually, but it’s the same thing - like the item property doesn’t even exist.

Could you post the setup where the item property is visibly being applied and an item’s weight changes? I’ve tried to do something similar with weight increases applied to items in the past, but couldn’t get it working either. A solution to this problem would interest me very much.

  • Don’t the values between 1-4 and 4-10 go to the default block in the switch case statement? That doesn’t look right. :thinking: Can’t be what’s up with the item property, but might be another issue.

  • If you increase the movement speed decrease effect a bit more, they’ll stop using the running animation altogether. Try it at 65 or 70 percent.

  • You can leave out the float parameter in ApplyEffectToObject and AddItemProperty if the duration type is either permanent or instant. Just end it after the target object.

  • Contributing to the spread of pretty code-formatting:
    [code] text here [/code]

Thanks for the encouragement. :blush: I’ll try not to give up so quickly next time.

  • I made the test values 4 and 10 because Darkstar’s strength is 10 at its base, and is reduced to 4 upon entering exhaustion. Right now I don’t need to catch any other values, but I will change the switch case to account for more values going forward, I promise.
  • I will try that! The only reason I’m not 100% behind that is because of my fanatical devotion to emulating 3e rules, haha. I want to see if I can reduce to 50% speed and stop running, and not a percentile more, but if I cannot do that I can be flexible. Also, fatigue simply removes the option to run, and I’d really dig implementing that eventually. I will not force it if it’s impossible, though. :wink:
  • Oh, okay. I don’t know where I got the idea that -1.0f was something I had to do, haha.
  • Thank you! My web-formatting is shoddy at best, haha. :sweat_smile:

I think chest is the way to go for this one. Only thing that worries me is this: hoops to jump through on the removal of exhaustion. Player can remove chest-piece. Then I have to find it again to remove the weight, slash what if they put it in a cupboard or something. :stuck_out_tongue: I will play around with implementation and report back. Thank you for your responses! This has been very helpful!!

1 Like

UPDATE: Looks like, upon applying 100 lbs. of weight to the skin, unequipping the skin, and then removing the skin from inventory, inventory weight is decreased by 100 lbs.

I’m like “???”, but at the same time, I think, logically, this might be important. More testing required!!

UPDATE2: Okay: for weight increase to take effect, the item must exit inventory and re-enter, otherwise it does not take effect! Created a copy of the heavy skin on Darkstar, and automatically got a complaint that “This is way too much! I can’t take all this!” which, other than being super annoying to listen to, means that weight has increased. Double checked, inventory registers weight.

So, in case anyone wants to follow in my (unnecessary) footsteps, here we go:

  1. Add weight to skin
  2. Copy skin into inventory
  3. Equip new skin
  4. Delete old skin

Weight should increase accordingly.

1 Like

Since it looks like you are trying to simulate fatigue/exhaustion, have you tried a temporary strength decrease to see if it emulates all that you want? In addition to decreasing the load a character can carry, it would also affect to-hit and damage rolls though so it may do more than you’re looking for.

Thanks, Pstemarie! You know, I actually have applied a STR and DEX decrease along with the weight increase. Not a bad way to go, though. :smile: I just don’t want to go outside of the bounds of 3e descriptors, for my own reasons.

But your way is totally valid! It reduces carry-weight at the same time, so it would totally work. I’m just, y’know, complicated, haha. Thanks for the feedback! :smiley:

1 Like