Jump to content

Hydrocraft Mod


Hydromancerx

Recommended Posts

20 hours ago, lekechinskas said:

Dear developer. The game has no tongs. And that they do need tongs. I was looking for from rosenwood to gigamoll. They are not anywhere else. With the latest update to Russian version of the game they were called "Клещи". I apologize for the mistakes, google translator.

I think Build 35 Vanilla tongs overwrote Hydro tongs.  Good news is that the Vanilla base game tongs are working with the Hydro recipes for now. 

Link to comment
Share on other sites

On 12/28/2016 at 1:56 PM, Paul Redeker said:

I think Build 35 Vanilla tongs overwrote Hydro tongs.  Good news is that the Vanilla base game tongs are working with the Hydro recipes for now. 

Has anyone found vanilla tongs in 35? I found a dog whistle of all things (never could find it before) and some other rare things, but never tongs.

 

I have heard you can still find tongs with a metal detector, but I have not confirmed this. If ANYONE can confirm finding tongs via detector or in a crate somewhere, that would be excellent to know.

Link to comment
Share on other sites

11 hours ago, sadpickle said:

Has anyone found vanilla tongs in 35? I found a dog whistle of all things (never could find it before) and some other rare things, but never tongs.

 

I have heard you can still find tongs with a metal detector, but I have not confirmed this. If ANYONE can confirm finding tongs via detector or in a crate somewhere, that would be excellent to know.

I found Tongs using the Metal detector! 

Yay! I came across this issue a few days back and gave up. I was actually looking for Dog whistles and found Tongs instead! lol 

 

-TG

Link to comment
Share on other sites

16 hours ago, The Googlator said:

I found Tongs using the Metal detector! 

Yay! I came across this issue a few days back and gave up. I was actually looking for Dog whistles and found Tongs instead! lol 

 

-TG

Ah, that is great news, thanks. I wonder if they got deleted from the other loot lists by accident.

Link to comment
Share on other sites

Spoiler

--[[
Injury Detection And Armor Based Injury Blocking
By Nolan Ritchie


]]

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

function getBodyPartDisplayName(TypeIn)

    BPType = tostring(TypeIn);
    if(BPType == "Foot_L") then return "Left Foot";
    elseif(BPType == "Foot_R") then return "Right Foot";
    elseif(BPType == "ForeArm_L") then return "Left Fore Arm";
    elseif(BPType == "ForeArm_R") then return "Right Fore Arm";
    elseif(BPType == "Hand_L") then return "Left Hand";
    elseif(BPType == "Hand_R") then return "Right Hand";
    elseif(BPType == "LowerLeg_L") then return "Left Lower Leg";
    elseif(BPType == "LowerLeg_R") then return "Right Lower Leg";
    elseif(BPType == "Torso_Lower") then return "Lower Torso";
    elseif(BPType == "Torso_Upper") then return "Upper Torso";
    elseif(BPType == "UpperArm_L") then return "Left Upper Arm";
    elseif(BPType == "UpperArm_R") then return "Right Upper Arm";
    elseif(BPType == "UpperLeg_L") then return "Left Upper Leg";
    elseif(BPType == "UpperLeg_R") then return "Right Upper Leg";
    else return BPType;
    end

end

function ExamineArmor(items, result, player)
    
    for i=0, items:size()-1 do
        Armor = items:get(i);
    end
    
    loadArmor(Armor);
    
    local out = "Remaining Durability: " .. tostring(Armor:getModData().Durability) .. "\n";
    local BPs = player:getBodyDamage():getBodyParts();
    for i=0, BPs:size()-1 do        
        
        if(Armor:getModData().ScratchRes ~= nil) and (Armor:getModData().ScratchRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out .. tostring(Armor:getModData().ScratchRes[tostring(BPs:get(i):getType())]).. "%" .. " chance to block Scratches on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().DeepWoundRes ~= nil) and (Armor:getModData().DeepWoundRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().DeepWoundRes[tostring(BPs:get(i):getType())]).. "%" .. " Chance to block to Deep Wounds on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BiteRes ~= nil) and (Armor:getModData().BiteRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().BiteRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Bites on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().GlassRes ~= nil) and (Armor:getModData().GlassRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().GlassRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Glass on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().FractureRes ~= nil) and (Armor:getModData().FractureRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().FractureRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Fractures on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BurnRes ~= nil) and (Armor:getModData().BurnRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out .. tostring(Armor:getModData().BurnRes[tostring(BPs:get(i):getType())])  .. "%".. " Chance to block to Burns on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BulletRes ~= nil) and (Armor:getModData().BulletRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().BulletRes[tostring(BPs:get(i):getType())]).. "%" .. " Chance to block to Bullets on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
    end
    out = Armor:getDisplayName() .. "\n" .. out;
    ArmorWindow:setText(out);
    ArmorWindow:setVisible(true);
    --player:Say();
end

function ArmorSaveBodyDamage(player)
    
    ArmorTempBodyDamage = {};
    local BD = player:getBodyDamage();
    --local InjuryTypes = {0 = "Scratch",1 = "DeepWound", 2 = "Burn", 3 = "BulletRes", 4 = "Fracture", 5 = "Glass"};
    
    ArmorTempBodyDamage["IsInfected"] = BD:IsInfected();
        
    local BPs = BD:getBodyParts();
    for i=0, BPs:size()-1 do
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())] = {Splint= false, Bandage = false, Bite = false, Scratch = false, DeepWound = false, Burn = false, Bullet = false, Fracture = false, Glass = false};
        
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Splint"] = BPs:get(i):isSplint();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bandage"] = BPs:get(i):bandaged();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Scratch"] = BPs:get(i):scratched();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["DeepWound"] = BPs:get(i):deepWounded();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Burn"] = BPs:get(i):getBurnTime();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"] = BPs:get(i):haveBullet();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Fracture"] = BPs:get(i):getFractureTime();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"] = BPs:get(i):haveGlass();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bite"] = BPs:get(i):bitten();
        
    end
    ArmorBDamageSaved = true;
end

function tryBlock(BodyPartType, InjuryType, ArmorType, player)
    local Armor = player:getInventory():getItemFromType(ArmorType);
    if(InjuryType == "Scratch") then
        if(Armor:getModData().ScratchRes ~= nil) and (Armor:getModData().ScratchRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().ScratchRes[BodyPartType] );
        end    
    elseif(InjuryType == "DeepWound") then
        if((Armor:getModData().DeepWoundRes ~= nil) and Armor:getModData().DeepWoundRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().DeepWoundRes[BodyPartType] );
        end
    elseif(InjuryType == "Bite") then
        if(Armor:getModData().BiteRes ~= nil) and (Armor:getModData().BiteRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BiteRes[BodyPartType] );
        end
    elseif(InjuryType == "Fracture") then
        if(Armor:getModData().FractureRes ~= nil) and (Armor:getModData().FractureRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().FractureRes[BodyPartType] );
        end
    elseif(InjuryType == "Burn") then
        if(Armor:getModData().BurnRes ~= nil) and (Armor:getModData().BurnRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BurnRes[BodyPartType] );
        end
    elseif(InjuryType == "Glass") then
        if(Armor:getModData().GlassRes ~= nil) and (Armor:getModData().GlassRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().GlassRes[BodyPartType] );
        end
    elseif(InjuryType == "Bullet") then
        if(Armor:getModData().BulletRes ~= nil) and (Armor:getModData().BulletRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BulletRes[BodyPartType] );
        end
    end

end
function EquipAsShield(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);        
        if (player:getSecondaryHandItem() == player:getPrimaryHandItem()) then
            player:setPrimaryHandItem(nil);
        end
        player:setSecondaryHandItem(items:get(i));
        player:getModData().ShieldArmor = items:get(i):getType();            
    end
end
function EquipOnHead(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().HeadArmor = items:get(i):getType();            
    end
end
function EquipOnHands(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().HandArmor = items:get(i):getType();            
    end
end
function EquipOnArms(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().ArmArmor = items:get(i):getType();            
    end
end
function EquipOnLegs(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().LegArmor = items:get(i):getType();            
    end
end
function EquipOnChest(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().ChestArmor = items:get(i):getType();            
    end
end
function EquipOnFeet(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().FootArmor = items:get(i):getType();            
    end
end

function DamageArmor(Armor, player, InjuryType)

    local Damage = 1;
    
    if(InjuryType == "Scratch") then
        Damage = 1;
    elseif(InjuryType == "DeepWound") then
        Damage = 3;
    elseif(InjuryType == "Bite") then
        Damage = 2;
    elseif(InjuryType == "Fracture") then
        Damage = 3;
    elseif(InjuryType == "Burn") then
        Damage = 2;
    elseif(InjuryType == "Glass") then
        Damage = 2;
    elseif(InjuryType == "Bullet") then
        Damage = 5;
    end

    local isBroken = false;
    Armor:getModData().Durability = Armor:getModData().Durability - Damage;
    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
        player:getInventory():Remove(Armor);
    end
    return isBroken;
end

function wasDamagedBlocked(BodyPartType, InjuryType, player)

    if(ArmorTempBodyDamage[tostring(BodyPartType)]["Bandage"] == true) or (ArmorTempBodyDamage[tostring(BodyPartType)]["Splint"] == true) then
    return false;
    end

    if(player:getSecondaryHandItem() ~= nil) then
        if(player:getModData().ShieldArmor ~= nil) and (player:getSecondaryHandItem():getType() == player:getModData().ShieldArmor)  then
            if(tryBlock(BodyPartType, InjuryType, player:getModData().ShieldArmor, player) == true) then
                if(DamageArmor(player:getInventory():getItemFromType(player:getModData().ShieldArmor),player,InjuryType) == true) then
                    player:setSecondaryHandItem(nil);
                end
                return true;
            end
        end
    end
    if(player:getModData().HeadArmor ~= nil) and (player:getInventory():contains(player:getModData().HeadArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().HeadArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().HeadArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().HandArmor ~= nil) and (player:getInventory():contains(player:getModData().HandArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().HandArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().HandArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().ArmArmor ~= nil) and (player:getInventory():contains(player:getModData().ArmArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().ArmArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().ArmArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().ChestArmor ~= nil) and (player:getInventory():contains(player:getModData().ChestArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().ChestArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().ChestArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().LegArmor ~= nil) and (player:getInventory():contains(player:getModData().LegArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().LegArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().LegArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().FootArmor ~= nil) and (player:getInventory():contains(player:getModData().FootArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().FootArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().FootArmor),player,InjuryType);
            return true;
        end
    end

    return false;
    
end

function healBodyPart(bodyPart, player, BD)

    bodyPart:SetInfected(false);
    bodyPart:setInfectedWound(false);
    bodyPart:setWoundInfectionLevel(0);
    bodyPart:SetFakeInfected(false);
    if(ArmorTempBodyDamage["IsInfected"] == false) and (BD:IsInfected() == true) then
        BD:setInf(false); -- remove infection if did not have before the blocked scratch
        BD:setInfectionLevel(0);
    end
    bodyPart:RestoreToFullHealth();
    bodyPart:DamageUpdate() ;
    player:Say("!");
    sendClientCommand(player, "Armor", "Say", {saythis = "!"});
    
end

function ArmorCheckForDamage(player)
local ArmorbInjuryDetected = false;
    if(ArmorBDamageSaved ~= nil) and (player ~= nil) then
        
        local BD = player:getBodyDamage();
        --local InjuryTypes = {0 = "Scratch",1 = "DeepWound", 2 = "Burn", 3 = "BulletRes", 4 = "Fracture", 5 = "Glass"};
        
        --ArmorTempBodyDamage["IsInfected"] = BD:IsInfected();
            
        local BPs = BD:getBodyParts();
        for i=0, BPs:size()-1 do
            if(BPs:get(i):bandaged() == false) then
            
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Scratch"] ~= BPs:get(i):scratched()) and (BPs:get(i):scratched() == true) then
                    --player:Say("Scratch Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Scratch", player)) then
                        healBodyPart(BPs:get(i), player, BD);                        
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["DeepWound"] ~= BPs:get(i):deepWounded()) and (BPs:get(i):deepWounded() == true) and (BPs:get(i):haveBullet() == false) and (BPs:get(i):haveGlass() == false) then
                    if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"]) or (ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"]) then
                        ArmorbInjuryDetected = true;
                    else                        
                        if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "DeepWound", player)) then
                            healBodyPart(BPs:get(i), player, BD);    
                        end
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bite"] ~= BPs:get(i):bitten()) and (BPs:get(i):bitten() == true) then
                    --player:Say("Bite Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Bite", player)) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Burn"] ~= BPs:get(i):getBurnTime()) and (BPs:get(i):getBurnTime() ~= 0) then
                    --player:Say("Burn Detected on ".. tostring(BPs:get(i):getType()) );
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Burn", player)) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"] ~= BPs:get(i):haveBullet()) and (BPs:get(i):haveBullet() == true) and (BPs:get(i):deepWounded() == false) then
                    --player:Say("Lodged Bullets Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Bullet", player)) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Fracture"] ~= BPs:get(i):getFractureTime()) and (BPs:get(i):getFractureTime() ~= 0) and (BPs:get(i):isSplint() == false) then
                    --player:Say("Fracture Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Fracture", player)) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"] ~= BPs:get(i):haveGlass()) and (BPs:get(i):haveGlass() == true) and (BPs:get(i):deepWounded() == false) then
                    --player:Say("Logged Glass Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Glass", player)) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
            end
        end
        
    end
    
    if(ArmorbInjuryDetected) then
        ArmorSaveBodyDamage(player);
    end
    
    return ArmorbInjuryDetected;
end

function ArmorupdateThePlayer(player)
    ArmorCheckForDamage(player);
    player:getInventory():Remove("HCEquiparmor");
end

function ArmorInit()
    ArmorSaveBodyDamage(getPlayer());
end
function ArmorKeysUp(keynum)
    --getPlayer():Say(tostring(keynum));
    if keynum == 25 then
        local player = getPlayer();
        local armorstring = "Currently Equipped Armor \n";
        if(player:getModData().ShieldArmor ~= nil) and (player:getSecondaryHandItem() ~= nil) and (player:getSecondaryHandItem():getType() == player:getModData().ShieldArmor) then
        armorstring = armorstring .. "Shield: " .. player:getInventory():getItemFromType(player:getModData().ShieldArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().HeadArmor ~= nil) and (player:getInventory():contains(player:getModData().HeadArmor)) then
        armorstring = armorstring .. "Helmet: " .. player:getInventory():getItemFromType(player:getModData().HeadArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().HandArmor ~= nil) and (player:getInventory():contains(player:getModData().HandArmor)) then
        armorstring = armorstring .. "Hands: " .. player:getInventory():getItemFromType(player:getModData().HandArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().ArmArmor ~= nil) and (player:getInventory():contains(player:getModData().ArmArmor)) then
        armorstring = armorstring .. "Arms: " .. player:getInventory():getItemFromType(player:getModData().ArmArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().LegArmor ~= nil) and (player:getInventory():contains(player:getModData().LegArmor)) then
        armorstring = armorstring .. "Legs: " .. player:getInventory():getItemFromType(player:getModData().LegArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().ChestArmor ~= nil) and (player:getInventory():contains(player:getModData().ChestArmor)) then
        armorstring = armorstring .. "Chest: " .. player:getInventory():getItemFromType(player:getModData().ChestArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().FootArmor ~= nil) and (player:getInventory():contains(player:getModData().FootArmor)) then
        armorstring = armorstring .. "Feet: " .. player:getInventory():getItemFromType(player:getModData().FootArmor):getDisplayName() .. "\n";
        end
                
        ArmorWindow:setText(armorstring);
        ArmorWindow:setVisible(true);
    end        
end

Events.OnKeyPressed.Add(ArmorKeysUp);
Events.OnPlayerUpdate.Add(ArmorupdateThePlayer);
Events.OnGameStart.Add(ArmorInit);

 

 

fixed armor code.

 

fixes a few exploits such as removing glass or bullet with armor healing the wound.

Link to comment
Share on other sites

i got scratched while wearing riot armor, the ! above my head appeared signalling it blocked it and the health panel didn't show any damage but later that day i got a fever and turned into a zombie. So i think the armor blocked the scratch itself but not the zombie virus?

Link to comment
Share on other sites

1 minute ago, Jason132 said:

i got scratched while wearing riot armor, the ! above my head appeared signalling it blocked it and the health panel didn't show any damage but later that day i got a fever and turned into a zombie. So i think the armor blocked the scratch itself but not the zombie virus?

 yeah that was a known problem for a while.  And i think it will also be addressed with this update.  I let myself be attacked by 4 zombies for a number of minutes with 100% block and then afterwards i waited for 24 hours in game and hp was not going down and i was not sick so, my testing went well anyway. we\ll see how it goes after next update.

Link to comment
Share on other sites

8 minutes ago, nolanri said:

 yeah that was a known problem for a while.  And i think it will also be addressed with this update.  I let myself be attacked by 4 zombies for a number of minutes with 100% block and then afterwards i waited for 24 hours in game and hp was not going down and i was not sick so, my testing went well anyway. we\ll see how it goes after next update.

cheers! :)

Link to comment
Share on other sites

Bug in armour mod:

 

I burnt myself on the head using the Blast furnace, bandaged the wound, then equipped a welding mask on head, removed the bandage and ! wolla! the wound was healed. 

 

Not sure if this would also apply with other types of damage, but this effectively gives you as many opportunities as you need to block (magically heal) the wound.

 

-TG

Edited by The Googlator
Link to comment
Share on other sites

6 hours ago, The Googlator said:

Bug in armour mod:

 

I burnt myself on the head using the Blast furnace, bandaged the wound, then equipped a welding mask on head, removed the bandage and ! wolla! the wound was healed. 

 

Not sure if this would also apply with other types of damage, but this effectively gives you as many opportunities as you need to block (magically heal) the wound.

 

-TG

That's was one of the errors that was back in when the recent code was updated. It should be re-fixed next update.

Link to comment
Share on other sites

9 hours ago, Hydromancerx said:

That's was one of the errors that was back in when the recent code was updated. It should be re-fixed next update.

 

Yeah this should be fixed with update today.  This happened because removing the bandage made it seem like the injury appeared the moment your removed the bandage.  Now it will not heal if the previous state of the body part was bandaged or splinted before the injury was detected.  This means however that even real injuries will not be blocked on body parts that are bandaged.  For example. if your chest is bandaged, and your wearing riot armor. you cannot block any injury to the chest. because this system has no way to tell the difference between an injury appear from "bandaged body part being injured" or from "removing a bandage and exposing an injury".  Without a proper injury event, it's not possible to tell the difference. 

 

so in short the exploits will be gone, BUT your already injured body parts are STILL vulnerable even if you have armor blocking them.  which ..kind of makes sense in a small way, because an injury does make you more sensitive and vulnerable then compared to not having an injury.

Link to comment
Share on other sites

Hydrocraft v8.5 has been released!

 

Which includes ...

 

- Can Use Salad Tongs to make Tongs.

- Fixed Safes

- New Art for various large items such as potted plants and lumber stack.

- Tongs and Ball-Peen Hammer now spawn.

- Added Loot to Mail Boxes

- Many Hydrocraft recipes now give Smthing xp.

- Armor Code Fixes

- Cigars and Smoking Pipes should now be influenced by Smoker Trait.

- Added 10 new Minerals

- Added Body Bag (Admin Spawn Only)

- Thanks to everyone who helped!

 

Enjoy!

Link to comment
Share on other sites

Couple bugs:

 

Slicing pizza does not result in a pizza stone, making them a one time use item unless you just eat the whole pizza straight.

 

Additionally, boring pizza results in a positive gain on boredom and unhappiness, whereas cheese pizza is a negative (penalty) of boredom and unhappiness

Link to comment
Share on other sites

Hi. im new to this mod.

Can someone please tell me how to work with Masonry ? I have been trying to create wall using brick but not sure what are needed. I am not even sure if we can create brick wall. I have read through http://undeniable.info/ but only found recipe. 

Is there any other wall that is better than metal wall ? 
I tried to make some wire barricade but it does not deal damage to zombie. Is there other structure ?

Thanks. 

Link to comment
Share on other sites

Spoiler

--[[
Injury Detection And Armor Based Injury Blocking
By Nolan Ritchie


]]
ArmorTempBodyDamage = {};
function loadArmorToPlayer(Armor, player)
    ArmorSaveBodyDamage(player);
    loadArmor(Armor);    
end

function getBodyPartDisplayName(TypeIn)

    BPType = tostring(TypeIn);
    if(BPType == "Foot_L") then return "Left Foot";
    elseif(BPType == "Foot_R") then return "Right Foot";
    elseif(BPType == "ForeArm_L") then return "Left Fore Arm";
    elseif(BPType == "ForeArm_R") then return "Right Fore Arm";
    elseif(BPType == "Hand_L") then return "Left Hand";
    elseif(BPType == "Hand_R") then return "Right Hand";
    elseif(BPType == "LowerLeg_L") then return "Left Lower Leg";
    elseif(BPType == "LowerLeg_R") then return "Right Lower Leg";
    elseif(BPType == "Torso_Lower") then return "Lower Torso";
    elseif(BPType == "Torso_Upper") then return "Upper Torso";
    elseif(BPType == "UpperArm_L") then return "Left Upper Arm";
    elseif(BPType == "UpperArm_R") then return "Right Upper Arm";
    elseif(BPType == "UpperLeg_L") then return "Left Upper Leg";
    elseif(BPType == "UpperLeg_R") then return "Right Upper Leg";
    else return BPType;
    end

end

function ExamineArmor(items, result, player)
    
    for i=0, items:size()-1 do
        Armor = items:get(i);
    end
    
    loadArmor(Armor);
    
    local out = "Remaining Durability: " .. tostring(Armor:getModData().Durability) .. "\n";
    local BPs = player:getBodyDamage():getBodyParts();
    for i=0, BPs:size()-1 do        
        
        if(Armor:getModData().ScratchRes ~= nil) and (Armor:getModData().ScratchRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out .. tostring(Armor:getModData().ScratchRes[tostring(BPs:get(i):getType())]).. "%" .. " chance to block Scratches on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().DeepWoundRes ~= nil) and (Armor:getModData().DeepWoundRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().DeepWoundRes[tostring(BPs:get(i):getType())]).. "%" .. " Chance to block to Deep Wounds on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BiteRes ~= nil) and (Armor:getModData().BiteRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().BiteRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Bites on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().GlassRes ~= nil) and (Armor:getModData().GlassRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().GlassRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Glass on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().FractureRes ~= nil) and (Armor:getModData().FractureRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().FractureRes[tostring(BPs:get(i):getType())]) .. "%".. " Chance to block to Fractures on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BurnRes ~= nil) and (Armor:getModData().BurnRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out .. tostring(Armor:getModData().BurnRes[tostring(BPs:get(i):getType())])  .. "%".. " Chance to block to Burns on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
        if(Armor:getModData().BulletRes ~= nil) and (Armor:getModData().BulletRes[tostring(BPs:get(i):getType())] ~= nil) then
            out = out  .. tostring(Armor:getModData().BulletRes[tostring(BPs:get(i):getType())]).. "%" .. " Chance to block to Bullets on the " .. getBodyPartDisplayName(BPs:get(i):getType()) .. "\n";
        end
    end
    out = Armor:getDisplayName() .. "\n" .. out;
    ArmorWindow:setText(out);
    ArmorWindow:setVisible(true);
    --player:Say();
end

function ArmorSaveBodyDamage(player)
    --player:Say("Saving body damage");
    local BD = player:getBodyDamage();
    --local InjuryTypes = {0 = "Scratch",1 = "DeepWound", 2 = "Burn", 3 = "BulletRes", 4 = "Fracture", 5 = "Glass"};
    
    ArmorTempBodyDamage["IsInfected"] = BD:IsInfected();
        
    local BPs = BD:getBodyParts();
    for i=0, BPs:size()-1 do
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())] = {Splint= false, Bandage = false, Bite = false, Scratch = false, DeepWound = false, Burn = false, Bullet = false, Fracture = false, Glass = false};
        
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Splint"] = BPs:get(i):isSplint();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bandage"] = BPs:get(i):bandaged();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Scratch"] = BPs:get(i):scratched();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["DeepWound"] = BPs:get(i):deepWounded();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Burn"] = BPs:get(i):getBurnTime();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"] = BPs:get(i):haveBullet();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Fracture"] = BPs:get(i):getFractureTime();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"] = BPs:get(i):haveGlass();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bite"] = BPs:get(i):bitten();
            ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["HasInjury"] = BPs:get(i):HasInjury()
        
    end
    ArmorBDamageSaved = true;
end

function tryBlock(BodyPartType, InjuryType, ArmorType, player)
    local Armor = player:getInventory():getItemFromType(ArmorType);
    if(InjuryType == "Scratch") then
        if(Armor:getModData().ScratchRes ~= nil) and (Armor:getModData().ScratchRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().ScratchRes[BodyPartType] );
        end    
    elseif(InjuryType == "DeepWound") then
        if((Armor:getModData().DeepWoundRes ~= nil) and Armor:getModData().DeepWoundRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().DeepWoundRes[BodyPartType] );
        end
    elseif(InjuryType == "Bite") then
        if(Armor:getModData().BiteRes ~= nil) and (Armor:getModData().BiteRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BiteRes[BodyPartType] );
        end
    elseif(InjuryType == "Fracture") then
        if(Armor:getModData().FractureRes ~= nil) and (Armor:getModData().FractureRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().FractureRes[BodyPartType] );
        end
    elseif(InjuryType == "Burn") then
        if(Armor:getModData().BurnRes ~= nil) and (Armor:getModData().BurnRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BurnRes[BodyPartType] );
        end
    elseif(InjuryType == "Glass") then
        if(Armor:getModData().GlassRes ~= nil) and (Armor:getModData().GlassRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().GlassRes[BodyPartType] );
        end
    elseif(InjuryType == "Bullet") then
        if(Armor:getModData().BulletRes ~= nil) and (Armor:getModData().BulletRes[BodyPartType] ~= nil) then
            return ( (ZombRand(100)+1) < Armor:getModData().BulletRes[BodyPartType] );
        end
    end

end
function EquipAsShield(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);        
        if (player:getSecondaryHandItem() == player:getPrimaryHandItem()) then
            player:setPrimaryHandItem(nil);
        end
        player:setSecondaryHandItem(items:get(i));
        player:getModData().ShieldArmor = items:get(i):getType();            
    end
end
function EquipOnHead(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().HeadArmor = items:get(i):getType();            
    end
end
function EquipOnHands(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().HandArmor = items:get(i):getType();            
    end
end
function EquipOnArms(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().ArmArmor = items:get(i):getType();            
    end
end
function EquipOnLegs(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().LegArmor = items:get(i):getType();            
    end
end
function EquipOnChest(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().ChestArmor = items:get(i):getType();            
    end
end
function EquipOnFeet(items, result, player) -- Recipe must only have one ingredient which is the armor, and be set to "keep"
    for i=0, items:size()-1 do
        loadArmorToPlayer(items:get(i), player);
        player:getModData().FootArmor = items:get(i):getType();            
    end
end

function DamageArmor(Armor, player, InjuryType)

    local Damage = 1;
    
    if(InjuryType == "Scratch") then
        Damage = 1;
    elseif(InjuryType == "DeepWound") then
        Damage = 3;
    elseif(InjuryType == "Bite") then
        Damage = 2;
    elseif(InjuryType == "Fracture") then
        Damage = 3;
    elseif(InjuryType == "Burn") then
        Damage = 2;
    elseif(InjuryType == "Glass") then
        Damage = 2;
    elseif(InjuryType == "Bullet") then
        Damage = 5;
    end

    local isBroken = false;
    Armor:getModData().Durability = Armor:getModData().Durability - Damage;
    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
        player:getInventory():Remove(Armor);
    end
    return isBroken;
end

function wasDamagedBlocked(BodyPartType, InjuryType, player)

    if(ArmorTempBodyDamage[tostring(BodyPartType)]["Glass"] == true) or (ArmorTempBodyDamage[tostring(BodyPartType)]["Bullet"] == true) or (ArmorTempBodyDamage[tostring(BodyPartType)]["HasInjury"] == true) or (ArmorTempBodyDamage[tostring(BodyPartType)]["Bandage"] == true) or (ArmorTempBodyDamage[tostring(BodyPartType)]["Splint"] == true) then
    return false;
    end
    
    --player:Say("trying to block:"..tostring(BodyPartType));

    if(player:getSecondaryHandItem() ~= nil) then
        if(player:getModData().ShieldArmor ~= nil) and (player:getSecondaryHandItem():getType() == player:getModData().ShieldArmor)  then
            if(tryBlock(BodyPartType, InjuryType, player:getModData().ShieldArmor, player) == true) then
                if(DamageArmor(player:getInventory():getItemFromType(player:getModData().ShieldArmor),player,InjuryType) == true) then
                    player:setSecondaryHandItem(nil);
                end
                return true;
            end
        end
    end
    if(player:getModData().HeadArmor ~= nil) and (player:getInventory():contains(player:getModData().HeadArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().HeadArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().HeadArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().HandArmor ~= nil) and (player:getInventory():contains(player:getModData().HandArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().HandArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().HandArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().ArmArmor ~= nil) and (player:getInventory():contains(player:getModData().ArmArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().ArmArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().ArmArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().ChestArmor ~= nil) and (player:getInventory():contains(player:getModData().ChestArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().ChestArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().ChestArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().LegArmor ~= nil) and (player:getInventory():contains(player:getModData().LegArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().LegArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().LegArmor),player,InjuryType);
            return true;
        end
    end
    if(player:getModData().FootArmor ~= nil) and (player:getInventory():contains(player:getModData().FootArmor)) then
        if(tryBlock(BodyPartType, InjuryType, player:getModData().FootArmor, player) == true) then
            DamageArmor(player:getInventory():getItemFromType(player:getModData().FootArmor),player,InjuryType);
            return true;
        end
    end

    return false;
    
end

function healBodyPart(bodyPart, player, BD)

    bodyPart:SetInfected(false);
    bodyPart:setInfectedWound(false);
    bodyPart:setWoundInfectionLevel(0);
    bodyPart:SetFakeInfected(false);
    if(ArmorTempBodyDamage["IsInfected"] == false) and (BD:IsInfected() == true) then
        BD:setInf(false); -- remove infection if did not have before the blocked scratch
        BD:setInfectionLevel(0);
    end
    bodyPart:RestoreToFullHealth();
    bodyPart:DamageUpdate() ;
    player:Say("!");
    sendClientCommand(player, "Armor", "Say", {saythis = "!"});
    
end

function ArmorCheckForDamage(player)
local ArmorbInjuryDetected = false;
    if(ArmorBDamageSaved ~= nil) and (player ~= nil) then
        
        local BD = player:getBodyDamage();
        --local InjuryTypes = {0 = "Scratch",1 = "DeepWound", 2 = "Burn", 3 = "BulletRes", 4 = "Fracture", 5 = "Glass"};
        
        --ArmorTempBodyDamage["IsInfected"] = BD:IsInfected();
            
        local BPs = BD:getBodyParts();
        for i=0, BPs:size()-1 do
        
            
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Scratch"] ~= BPs:get(i):scratched()) and (BPs:get(i):scratched() == true) then
                    --player:Say("Scratch Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Scratch", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);                        
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["DeepWound"] ~= BPs:get(i):deepWounded()) and (BPs:get(i):deepWounded() == true) and (BPs:get(i):haveBullet() == false) and (BPs:get(i):haveGlass() == false) then
                    if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"]) or (ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"]) then
                        ArmorbInjuryDetected = true;
                    else                        
                        if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "DeepWound", player) == true) then
                            healBodyPart(BPs:get(i), player, BD);    
                        end
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bite"] ~= BPs:get(i):bitten()) and (BPs:get(i):bitten() == true) then
                    --player:Say("Bite Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Bite", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Burn"] ~= BPs:get(i):getBurnTime()) and (BPs:get(i):getBurnTime() ~= 0) then
                    --player:Say("Burn Detected on ".. tostring(BPs:get(i):getType()) );
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Burn", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Bullet"] ~= BPs:get(i):haveBullet()) and (BPs:get(i):haveBullet() == true) and (BPs:get(i):deepWounded() == false) then
                    --player:Say("Lodged Bullets Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Bullet", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Fracture"] ~= BPs:get(i):getFractureTime()) and (BPs:get(i):getFractureTime() ~= 0) and (BPs:get(i):isSplint() == false) then
                    --player:Say("Fracture Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Fracture", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
                if(ArmorTempBodyDamage[tostring(BPs:get(i):getType())]["Glass"] ~= BPs:get(i):haveGlass()) and (BPs:get(i):haveGlass() == true) and (BPs:get(i):deepWounded() == false) then
                    --player:Say("Logged Glass Detected on ".. tostring(BPs:get(i):getType()));
                    if(wasDamagedBlocked(tostring(BPs:get(i):getType()), "Glass", player) == true) then
                        healBodyPart(BPs:get(i), player, BD);    
                    end
                    ArmorbInjuryDetected = true;
                end
        end
        
        
    end
    
    if(ArmorbInjuryDetected) then
        ArmorSaveBodyDamage(player);
    end
    
    return ArmorbInjuryDetected;
end

local UCount = 0;
function ArmorupdateThePlayer(player)
    UCount = UCount + 1;
    ArmorCheckForDamage(player);
    --if(UCount % 15 == 0) then ArmorSaveBodyDamage(player) end
    player:getInventory():Remove("HCEquiparmor");
end

function ArmorInit()
    ArmorSaveBodyDamage(getPlayer());
end
function ArmorKeysUp(keynum)
    --getPlayer():Say(tostring(keynum));
    if keynum == 25 then
        local player = getPlayer();
        local armorstring = "Currently Equipped Armor \n";
        if(player:getModData().ShieldArmor ~= nil) and (player:getSecondaryHandItem() ~= nil) and (player:getSecondaryHandItem():getType() == player:getModData().ShieldArmor) then
        armorstring = armorstring .. "Shield: " .. player:getInventory():getItemFromType(player:getModData().ShieldArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().HeadArmor ~= nil) and (player:getInventory():contains(player:getModData().HeadArmor)) then
        armorstring = armorstring .. "Helmet: " .. player:getInventory():getItemFromType(player:getModData().HeadArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().HandArmor ~= nil) and (player:getInventory():contains(player:getModData().HandArmor)) then
        armorstring = armorstring .. "Hands: " .. player:getInventory():getItemFromType(player:getModData().HandArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().ArmArmor ~= nil) and (player:getInventory():contains(player:getModData().ArmArmor)) then
        armorstring = armorstring .. "Arms: " .. player:getInventory():getItemFromType(player:getModData().ArmArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().LegArmor ~= nil) and (player:getInventory():contains(player:getModData().LegArmor)) then
        armorstring = armorstring .. "Legs: " .. player:getInventory():getItemFromType(player:getModData().LegArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().ChestArmor ~= nil) and (player:getInventory():contains(player:getModData().ChestArmor)) then
        armorstring = armorstring .. "Chest: " .. player:getInventory():getItemFromType(player:getModData().ChestArmor):getDisplayName() .. "\n";
        end
        if(player:getModData().FootArmor ~= nil) and (player:getInventory():contains(player:getModData().FootArmor)) then
        armorstring = armorstring .. "Feet: " .. player:getInventory():getItemFromType(player:getModData().FootArmor):getDisplayName() .. "\n";
        end
                
        ArmorWindow:setText(armorstring);
        ArmorWindow:setVisible(true);
    end        
end

Events.OnKeyPressed.Add(ArmorKeysUp);
Events.OnPlayerUpdate.Add(ArmorupdateThePlayer);
Events.OnGameStart.Add(ArmorInit);

 

okay. 3rd times the charm. hopfully the final fix for armor.lua
tested and observed fix of bug healing injuries by equipping to body parts already injured

tested and observed fix of bug healing by removing glass or bullets with armor guarding deep wounds on subject body part

tested and observed fix of bug, infection now blocked if armor blocked a injury that resulted in an infection IF there was no infection before the block
AND i made sure i am sending you the file that i edited and not some older random version.

Link to comment
Share on other sites

13 hours ago, Rafiki said:

Hey, do i need to re-download Hydrocraft every new version or its downloaded automatically? Cant check the version in-game or similar, Thanks

It should automatically update if you do it through steam. If it doesn't just unsubscribe and then re-subscribe. IF you look in your steam mods you should be able to find a Hydrocraft read me file which says the current version at the top.

Edited by Hydromancerx
Link to comment
Share on other sites

Ran into a couple of issues, not sure if anyone is having them as well.

 

First, there's the issue with the crafting menu. I've spent much of my early hours in my HydroCraft playthrough gathering books to learn as many recipes as I can. The problem is, after having acquired so many recipes, I fear that it is now causing my game to basically lock up whenever I open the crafting menu. It bogs all the down to 1FPS and takes about 30 seconds to close out the menu so the game returns to normal FPS. I've tested it over and over and it's definitely the menu. Never seemed to give me issues before so I'm only assuming it's the mod and not something in the base game that's causing this.

 

Second, I noticed that, since using this mod, some of the homes have strange occurrences about them... For example, if I walk into a house just down the block from what I initially spawned, check out the cabinets in the kitchen for useful items, I find that each cabinet has been filled with almost identical items and even qtys of said items in each cabinet. I found a house that had 1-3 boxes of shotgun shells, a crap load of canned foods and a shotgun in all 4 cabinets in the kitchen. Even the types of canned food seemed to be identical from cabinet to cabinet. Now, I'm all for giving a player a break, but having 6 boxes of shotgun shells and 3 shotguns so early on seems a bit on the extreme side lol. It seems to me there might be a small issue with item distribution in regards to the sandbox settings. As I recall, I set them to just below the highest abundance.

 

Finally, and this one is highly off-topic, I wanted to know if there was a proper way to disable this mod in the event I want to switch to a vanilla save, without completely ruining everything in the process. Any and all info the subject would be much appreciated!

Edited by AndraeGrind
Link to comment
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
×
×
  • Create New...