You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ensure_npcs_ammo: count individual bullets instead of whole packs and calculate needed qty based on number of shots or bursts
- critter_loot: add chance to have 0 ammo instead of the given range (to avoid constantly having to unload like 3 bullets)
- critter_loot: reduce loot in deathanim2 instead of ondeath to account for some deaths dropping all loot on ground before it can be reduced!
; A fraction [0..1] of shots in a critical burst attack that will keep armor bypass and critical damage multiplier.
20
20
; For example, if set to 0.5, 10 bullets hit target and attack was a critical, first 5 bullets will retain the full damage and bypass (if any) of the attack. 5 remaining bullets will deal normal damage as if there was no critical.
21
21
; NOTE: first bullet always retains bypass and multiplier.
22
-
;To disable, set to 1.
22
+
;For vanilla behavior, set to 1.
23
23
burst_critical_fraction=0.5
24
24
25
25
; DT affected by ammo DR Adjust value. Set separate modes for positive (JHP) and negative (AP) values. Available modes:
@@ -45,7 +45,7 @@ knockback_div=14
45
45
knockback_perk_div=6
46
46
47
47
; Print detailed log of every damage calculation to debug log.
procedure ammocost_mod_get_cost(variable weaponPid) begin
21
+
return ini_ammocost[weaponPid] or 1;
22
+
end
23
+
18
24
/*
19
25
HOOK_AMMOCOST
20
26
Runs when calculating ammo cost for a weapon. Doesn't affect damage, only how much ammo is spent. By default, weapons can make attacks when at least 1 ammo is left, regardless of ammo cost calculations. To add proper check for ammo before attacking and proper calculation of the number of burst rounds (hook type 1 and 2 in arg3), set CheckWeaponAmmoCost=1 in Misc section of ddraw.ini.
// Reduce loot before all items drop to the ground due to violent death.
65
+
/*if (( animId == ANIM_electrified_to_nothing
66
+
or animId == ANIM_exploded_to_nothing
67
+
)
68
+
and is_critter(critter)
69
+
and not critter_proto_has_flag(obj_pid(critter), CFLG_NODROP)
70
+
and not critter_proto_has_flag(obj_pid(critter), CFLG_SPECIAL))
71
+
then begin
72
+
call try_reduce_loot(critter);
73
+
end*/
74
+
call try_reduce_loot(critter);
75
+
end
76
+
55
77
/*
56
78
HOOK_ONDEATH
57
79
Runs immediately after a critter dies for any reason. No return values; this is just a convenience for when you need to do something after death for a large number of different critters and don't want to have to script each and every one of them.
@@ -68,15 +90,11 @@ procedure ondeath_handler begin
68
90
if (not critter or obj_type(critter) != OBJ_TYPE_CRITTER) then
69
91
return;
70
92
71
-
if (not obj_in_party(critter)
72
-
and (ini_reduce_ammo_percent[1] > 0 or ini_reduce_drugs_percent > 0 or ini_destroy_weapon_percent > 0)) then begin
73
-
call reduce_loot(critter);
74
-
end
75
-
if (ini_weapon_drop_chance > 0 and random(1, 100) <= ini_weapon_drop_chance) then begin
0 commit comments