Is this mod compatible with v 1.5? How did you managed to get names of parameters(e.g. mod_data.base_damage)? Have you been able to look into game's code?
While i dislike the so called "balance" mods, because everyone's having a different opinion, i wholeheartedly approve of this mod over here, because it makes sense. Let's say, if 1 bullet from this certain weapon does 50 damage, then logically, a 3 round burst from the same weapon, the same bullets, should do triple the damage., that would be 150 and you're dead.
return { PlaceObj('ModItemGameRuleDef', { description = T(331162156418, --[[ModItemGameRuleDef OverrideAutoFireDamage description]] "Each shot during an automatic burst will have the same damage as a single shot."), display_name = T(322130765199, --[[ModItemGameRuleDef OverrideAutoFireDamage display_name]] "OverrideAutoFireDamage"), id = "OverrideAutoFireDamage", init_as_active = true, msg_reactions = { PlaceObj('MsgReaction', { Event = "GatherDamageModifications", Handler = function (self, attacker, target, attack_args, hit_descr, mod_data) local t_Damage = mod_data.base_damage;
-- AUTO Fire modifiers if mod_data.action_id == "BurstFire" then -- Default x0.5 ->2.0 -- t_Damage = t_Damage * 1.5 t_Damage = t_Damage * 1.5 elseif mod_data.action_id == "AutoFire" then -- Default x0.2 ->5.0 -- t_Damage = t_Damage * 3.5 t_Damage = t_Damage * 1.5 elseif mod_data.action_id == "RunAndGun" then -- Default x0.3 ->3.3 -- t_Damage = t_Damage * 2.5 t_Damage = t_Damage * 1.5 elseif mod_data.action_id == "MGBurstFire" then -- Default x0.5 ->2.0 t_Damage = t_Damage * 1.5 elseif mod_data.action_id == "DualShot" then -- DOES dualshot reeduce damage? -- - I think it's because armor (bug?) -- Default x0.5 ->2.0 -- t_Damage = t_Damage * 1.5 end;
-- Overall modifier t_Damage = t_Damage * 0.75;
-- unconscious modifier if ( ( target and IsKindOf(target, "Unit") ) and ( target:HasStatusEffect("Unconscious") -- or target:HasStatusEffect("Stabilized") or target:HasStatusEffect("Downed") or target:HasStatusEffect("BleedingOut") ) ) then t_Damage = t_Damage * 0.5; end
-- AUTO Fire modifiers if mod_data.action_id == "BurstFire" then t_Damage = t_Damage * 1.5 elseif mod_data.action_id == "AutoFire" then t_Damage = t_Damage * 3.5 elseif mod_data.action_id == "RunAndGun" then t_Damage = t_Damage * 2.5 elseif mod_data.action_id == "MGBurstFire" then t_Damage = t_Damage * 1.5 end
-- Overall modifier t_Damage = t_Damage * 0.75;
-- unconscious modifier if ( ( target and IsKindOf(target, "Unit") ) and ( target:HasStatusEffect("Unconscious") -- or target:HasStatusEffect("Stabilized") or target:HasStatusEffect("Downed") or target:HasStatusEffect("BleedingOut") ) ) then t_Damage = t_Damage * 0.5; end
Here's a modified version of the script in this mod. - Reduced all damage by 25% - Reduced damage taken when unconscious - fixed the .0 showing in the image - Changed the damage numbers for burst auto and such a little bit more - I didn't give 100% damage back - This is because it changed gameplay too much
I don't kn0ow how to make mods, but I'll leave this here for anyone interested. Hopefully it will come in handy for someone else!
Just replace the contents of items.lua in the mod with this version and edit it as you please
Might be cool to add much greater accuracy penalties to burst and auto to offset a damage a bit. SO it becomes more like lottery, but still quite usable on point blank
Thanks for posting it here, was hoping it would come over from steam workshop. Works great (definitely makes the game a lot harder.. which I like as it was already too easy on hardest difficulty.. but also makes my own automatics not feel so darn weak).
7 comments
How did you managed to get names of parameters(e.g. mod_data.base_damage)? Have you been able to look into game's code?
THIS is balance.
return {
PlaceObj('ModItemGameRuleDef', {
description = T(331162156418, --[[ModItemGameRuleDef OverrideAutoFireDamage description]] "Each shot during an automatic burst will have the same damage as a single shot."),
display_name = T(322130765199, --[[ModItemGameRuleDef OverrideAutoFireDamage display_name]] "OverrideAutoFireDamage"),
id = "OverrideAutoFireDamage",
init_as_active = true,
msg_reactions = {
PlaceObj('MsgReaction', {
Event = "GatherDamageModifications",
Handler = function (self, attacker, target, attack_args, hit_descr, mod_data)
local t_Damage = mod_data.base_damage;
-- AUTO Fire modifiers
if mod_data.action_id == "BurstFire" then
-- Default x0.5 ->2.0
-- t_Damage = t_Damage * 1.5
t_Damage = t_Damage * 1.5
elseif mod_data.action_id == "AutoFire" then
-- Default x0.2 ->5.0
-- t_Damage = t_Damage * 3.5
t_Damage = t_Damage * 1.5
elseif mod_data.action_id == "RunAndGun" then
-- Default x0.3 ->3.3
-- t_Damage = t_Damage * 2.5
t_Damage = t_Damage * 1.5
elseif mod_data.action_id == "MGBurstFire" then
-- Default x0.5 ->2.0
t_Damage = t_Damage * 1.5
elseif mod_data.action_id == "DualShot" then
-- DOES dualshot reeduce damage?
-- - I think it's because armor (bug?)
-- Default x0.5 ->2.0
-- t_Damage = t_Damage * 1.5
end;
-- Overall modifier
t_Damage = t_Damage * 0.75;
-- unconscious modifier
if (
(
target
and IsKindOf(target, "Unit")
)
and (
target:HasStatusEffect("Unconscious")
-- or target:HasStatusEffect("Stabilized")
or target:HasStatusEffect("Downed")
or target:HasStatusEffect("BleedingOut")
)
) then
t_Damage = t_Damage * 0.5;
end
-- lua rounding r****
local t_iDamage = 0;
t_Damage = (t_Damage + (2^52 + 2^51) - (2^52 + 2^51));
t_iDamage = tonumber(string.format("%d", t_Damage));
-- print("HCA::Dmg:" .. tostring(t_Damage));
-- print("HCA::iDmg:" .. tostring(t_iDamage));
mod_data.base_damage = t_iDamage;
end,
HandlerCode = function (self, attacker, target, attack_args, hit_descr, mod_data)
local t_Damage = mod_data.base_damage;
-- AUTO Fire modifiers
if mod_data.action_id == "BurstFire" then
t_Damage = t_Damage * 1.5
elseif mod_data.action_id == "AutoFire" then
t_Damage = t_Damage * 3.5
elseif mod_data.action_id == "RunAndGun" then
t_Damage = t_Damage * 2.5
elseif mod_data.action_id == "MGBurstFire" then
t_Damage = t_Damage * 1.5
end
-- Overall modifier
t_Damage = t_Damage * 0.75;
-- unconscious modifier
if (
(
target
and IsKindOf(target, "Unit")
)
and (
target:HasStatusEffect("Unconscious")
-- or target:HasStatusEffect("Stabilized")
or target:HasStatusEffect("Downed")
or target:HasStatusEffect("BleedingOut")
)
) then
t_Damage = t_Damage * 0.5;
end
-- lua rounding r****
local t_iDamage = 0;
t_Damage = (t_Damage + (2^52 + 2^51) - (2^52 + 2^51));
t_iDamage = tonumber(string.format("%d", t_Damage));
-- print("HCA::Dmg:" .. tostring(t_Damage));
-- print("HCA::iDmg:" .. tostring(t_iDamage));
mod_data.base_damage = t_iDamage;
end,
param_bindings = false,
}),
},
}),
}
Here's a modified version of the script in this mod.
- Reduced all damage by 25%
- Reduced damage taken when unconscious
- fixed the .0 showing in the image
- Changed the damage numbers for burst auto and such a little bit more
- I didn't give 100% damage back
- This is because it changed gameplay too much
I don't kn0ow how to make mods, but I'll leave this here for anyone interested.
Hopefully it will come in handy for someone else!
Just replace the contents of items.lua in the mod with this version and edit it as you please
SO it becomes more like lottery, but still quite usable on point blank