Armor Mod
2 2

16 posts in this topic

Recommended Posts

This Mod adds Certain clothing / armors that you can equip to gain defence against certain kinds of injuries on certain body parts.

The armor type items for now only spawn in zombie corpses.

Right click on a armor type item to equip it or to see what defences it can give you with "Examine Armor" option.

Obviously if you remove the armor from your inventory after Equiping it it will no longer give you defence.
As with shields they will be put in 2nd hand when equiped, removing them from 2nd hand will result it no longer gaining the defence from the shield.

When your equipped armor blocks damage for you, you will know by seeing an exlimation mark above your head (!)
Though Blocking an injury will obviously result in you not taking the injury like a scratch, bite or burn, you may still lose HP / take damage

Armor has durability and will break after a certain number of blocks. And either dissapear or turn into a broken version of the item that cannot be equpped

Though equipping yourself with armor from head to to will significantly reduce your chance of injury, It will add a lot of weight so be careful.

 

Download Link - http://undeniable.info/pz/ArmorMod.php

 

please suggest other commonly found items that could be used as armor or some craft able armor ideas


 

Edited by nolanri

Share this post


Link to post
Share on other sites
1 hour ago, Hicks said:

Great work, has this also been tested online? 

No but I imagine it should be fine, its all client based code.

Feel free to be the first tester for it :)

Share this post


Link to post
Share on other sites

Hello. I have a one litle suggeston - add "pockets" to armor.  Why add pockets to armor? Because jackets and pants have them! Especialy military clothing. For example my military pants have a lot of pockets and allow carry 4 by 0.5 botles of bear,  or even 6...

So I started make this, but not test yet. And how it looks in code:

In armor_defionitions for item with pockets add some small string -> Armor:getModData().PocketSize = 1;

of course PocketSize can be any value.

After edit armor file? where change function loadArmorToPlayer:

 

function loadArmorToPlayer(Armor, player)
    loadArmor(Armor);
    ArmorSaveBodyDamage(player);

    --add additional carryweight
    if(Armor:getModData().PocketSize ~= nil) then
        getPlayer():setMaxWeightBase(getPlayer():getMaxWeightBase() + Armor:getModData().PocketSize);
    end
end 

 

And this

 

function DamageArmor(Armor, player)
    local isBroken = false;
    Armor:getModData().Durability = Armor:getModData().Durability - 1;
    if (Armor:getModData().Durability <= 0) then
        isBroken = true;
        if(Armor:getModData().onBreakTurnInto ~= nil) then
            player:Say("adding broken armor" .. Armor:getModData().onBreakTurnInto);
            player:getInventory():AddItem(Armor:getModData().onBreakTurnInto);
        end
        --remove additional weight
        if(Armor:getModData().PocketSize ~= nil) then
            getPlayer():setMaxWeightBase(getPlayer():getMaxWeightBase() - Armor:getModData().PocketSize);
        end
        player:getInventory():Remove(Armor);
    end
    return isBroken;
end

 

I'm not tested this, so possible it not working,  but i shure it's work.

Also posible create like RPG system, where items give some attributes. For example boots can give additional run speed or military taktical clothing reduse bleeding speed (some clothing have a special inbuilted medical bondage). 

 

Share this post


Link to post
Share on other sites

There is a bug  when removing/applying a fresh bandage on an existing wound, the armor % chance will apply.  If it procs, the wound is 'blocked' and it dissapears

Share this post


Link to post
Share on other sites

Is it mandatory for the armor to be in main inventory of the character, or can i put it in the backpack and still have it working?

A full set of steel armor takes you to over weight right from the start :P

Share this post


Link to post
Share on other sites

the problem is that you should be overweight when you're wearing a full set of armor, but this breaks the game by making you unable to run. a possible solution would be to just enable running when you're overweight because of the armor, but if you then get, let's say, 10.0 more weight worth of items then you won't be able to run again. I can't tell how hard this could be to implement, I have no coding skills, but perhaps this idea could be of some help (or perhaps not, in wich case sorry for the useless post)

Share this post


Link to post
Share on other sites

And there's a reason those fancy metal suits have to be tailored to the individual, take tons of time and skill to make, and cost a fortune . . . Unlike bubblewrap.

Share this post


Link to post
Share on other sites

It doesn't take that much to understand that, but, what's the point of this mod then? Even though it's unrealistic, it needs somehow to be playable to some extents or it won't have a reason to exist

Edited by Livio Persemprio

Share this post


Link to post
Share on other sites

This is a great mod, and working well in MP.

 

Is there anyway to adjust the frequency of the armor that drops as loot? For example, ORGM has an .ini file to adjust loot frequency. Any easy way to adjust that for armor mod?

 

If not, any hints on where to adjust it in the code? 

 

Thanks!

 

Share this post


Link to post
Share on other sites
21 hours ago, milspec said:

This is a great mod, and working well in MP.

 

Is there anyway to adjust the frequency of the armor that drops as loot? For example, ORGM has an .ini file to adjust loot frequency. Any easy way to adjust that for armor mod?

 

If not, any hints on where to adjust it in the code? 

 

Thanks!

 

it would be a file called ArmorLoading.lua in \media\lua\server\

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2