Code is placed in critter_p_proc procedure from player obj_dude script. It check few stuff and when test failure replace one item by other. I made it long time ago in Glow mod to replace guns. It was crazy concept, but now i found its great for replace armors.
Not everyone can wear metal armor. Player need required body building to walk with such heavy stuff whole time.
Script could check many things like: strenght, endurance or global variable: someone must teach you how use such armor. Especially for modern power armors, you could learn it in BOS bunker.
Here is short example code which check strenght. It remove metal armor (2) and give similar item (545) But its just misc item: armor which cant be wear!
Ofcourse player could thant that something is broken because he cant wear armors. So this alternate item must have explain description "you are not enough strenght to wear this armor"
Possibilities
STR 1 none
STR 2>4 leather
STR 5>8 combat and metal
STR 9>10 power armor
Its possible that player when use drugs will increase str so script must work also backward by replace armor item into wearing one. Also i must check what will happend when you wear armor and you lost STR.
Not everyone can wear metal armor. Player need required body building to walk with such heavy stuff whole time.
Script could check many things like: strenght, endurance or global variable: someone must teach you how use such armor. Especially for modern power armors, you could learn it in BOS bunker.
Here is short example code which check strenght. It remove metal armor (2) and give similar item (545) But its just misc item: armor which cant be wear!
Ofcourse player could thant that something is broken because he cant wear armors. So this alternate item must have explain description "you are not enough strenght to wear this armor"
Possibilities
STR 1 none
STR 2>4 leather
STR 5>8 combat and metal
STR 9>10 power armor
Code:
// metal armor
if ( (obj_is_carrying_obj_pid(dude_obj,2)) and (dude_strength < 5) ) then begin
remove_pid_qty(dude_obj, 2, 1)
item:=create_object(545,0,0);
add_obj_to_inven(dude_obj,item);
Its possible that player when use drugs will increase str so script must work also backward by replace armor item into wearing one. Also i must check what will happend when you wear armor and you lost STR.