Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.4.4 #50

Merged
merged 15 commits into from
Dec 21, 2023
2 changes: 1 addition & 1 deletion loc/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"eclipse_menu_ponr_assault_text_desc": "Assault banner flavor edits. Incompatible with mods that edit assault banner.",


"menu_pro_warning": "This is a pro job!\n\nFriendly fire is enabled.\nYou're only granted one Team AI.\nVarious heists have points of no return enabled.\nEach consecutive down decreases bleedout timer and revive health.",
"menu_pro_warning": "This is a pro job!\n\nFriendly fire is enabled.\nYou're only granted one Team AI.\nEnemies are more agile, snappy and aggressive.\nVarious heists have points of no return enabled.\nEach consecutive down decreases bleedout timer and revive health.",
"menu_difficulty_easy_wish": "Eclipse",
"menu_risk_easy_wish": "Operation 'Eclipse'.\nFor you, action is the juice.",
"menu_risk_special": "Overkill.\nMaximum Force Responders inbound.",
Expand Down
270 changes: 270 additions & 0 deletions loc/ru.txt

Large diffs are not rendered by default.

51 changes: 29 additions & 22 deletions lua/charactertweakdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ end
local _presets_orig = CharacterTweakData._presets
function CharacterTweakData:_presets(tweak_data, ...)
local presets = _presets_orig(self, tweak_data, ...)
local is_pro = Global.game_settings and Global.game_settings.one_down

presets.weapon.base = based_on(presets.weapon.expert, {
focus_delay = 0.35,
aim_delay = { 0, 0.2 },
focus_delay = (is_pro and 0.25) or 0.35,
aim_delay = (is_pro and { 0, 0.1 }) or { 0.15, 0.2 },
melee_dmg = 10,
melee_speed = 1,
melee_retry_delay = { 1, 2 },
Expand Down Expand Up @@ -63,7 +64,7 @@ function CharacterTweakData:_presets(tweak_data, ...)
presets.weapon.base.is_shotgun_pump.RELOAD_SPEED = 1.5
presets.weapon.base.is_shotgun_pump.range = { close = 500, optimal = 1000, far = 2000 }
presets.weapon.base.is_shotgun_pump.FALLOFF = {
{ dmg_mul = 17.5, r = 300, acc = { 0.8, 1 }, recoil = { 0.8, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 15, r = 300, acc = { 0.8, 1 }, recoil = { 0.8, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 10.5, r = 1000, acc = { 0.7, 0.9 }, recoil = { 1, 1.4 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 2.5, r = 2000, acc = { 0.6, 0.8 }, recoil = { 1.2, 1.8 }, mode = { 1, 0, 0, 0 } },
}
Expand Down Expand Up @@ -92,7 +93,7 @@ function CharacterTweakData:_presets(tweak_data, ...)
presets.weapon.base.is_smg = deep_clone(presets.weapon.base.is_rifle)
presets.weapon.base.is_smg.autofire_rounds = { 3, 8 }
presets.weapon.base.is_smg.FALLOFF = {
{ dmg_mul = 5, r = 0, acc = { 0.4, 0.7 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 5, r = 0, acc = { 0.35, 0.6 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 5, r = 3000, acc = { 0.1, 0.3 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
}

Expand Down Expand Up @@ -123,24 +124,24 @@ function CharacterTweakData:_presets(tweak_data, ...)
}

presets.weapon.gc = based_on(presets.weapon.base)
presets.weapon.gc.is_rifle.autofire_rounds = { 1, 3 }
presets.weapon.gc.is_rifle.autofire_rounds = { 1, 1 }
presets.weapon.gc.is_rifle.FALLOFF = {
{ dmg_mul = 9, r = 0, acc = { 0.45, 0.7 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 9, r = 3000, acc = { 0.2, 0.45 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 9, r = 0, acc = { 0.45, 0.6 }, recoil = { 0.33, 0.66 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 9, r = 3000, acc = { 0.15, 0.3 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
}
presets.weapon.gc.is_smg.FALLOFF = {
{ dmg_mul = 7.5, r = 0, acc = { 0.45, 0.7 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 7.5, r = 3000, acc = { 0.2, 0.45 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
}

presets.weapon.elite = based_on(presets.weapon.base, {
focus = 0.15,
aim_delay = { 0, 0.1 },
focus_delay = (is_pro and 0.15) or 0.25,
aim_delay = (is_pro and { 0, 0.05 }) or { 0.1, 0.1 },
})

presets.weapon.elite.is_rifle.autofire_rounds = { 1, 3 }
presets.weapon.elite.is_rifle.autofire_rounds = { 1, 1 }
presets.weapon.elite.is_rifle.FALLOFF = {
{ dmg_mul = 8.5, r = 0, acc = { 0.6, 0.9 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 8.5, r = 0, acc = { 0.6, 0.9 }, recoil = { 0.33, 0.66 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 8.5, r = 3000, acc = { 0.25, 0.6 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
}

Expand All @@ -153,7 +154,7 @@ function CharacterTweakData:_presets(tweak_data, ...)
presets.weapon.elite.is_shotgun_pump.RELOAD_SPEED = 1.5
presets.weapon.elite.is_shotgun_pump.range = { close = 500, optimal = 1000, far = 2000 }
presets.weapon.elite.is_shotgun_pump.FALLOFF = {
{ dmg_mul = 17.5, r = 300, acc = { 0.8, 1 }, recoil = { 0.75, 0.75 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 15, r = 300, acc = { 0.8, 1 }, recoil = { 0.75, 0.75 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 10.5, r = 1000, acc = { 0.7, 0.9 }, recoil = { 0.9, 0.9 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 2.5, r = 2000, acc = { 0.6, 0.8 }, recoil = { 1, 1.2 }, mode = { 1, 0, 0, 0 } },
}
Expand All @@ -165,18 +166,18 @@ function CharacterTweakData:_presets(tweak_data, ...)
range = { close = 500, optimal = 1000, far = 2000 },
})
presets.weapon.elite_shield = based_on(presets.weapon.shield, {
focus = 0.15,
aim_delay = { 0, 0.1 },
focus_delay = (is_pro and 0.15) or 0.25,
aim_delay = (is_pro and { 0, 0.05 }) or { 0.1, 0.1 },
})

presets.weapon.shield.is_smg.autofire_rounds = { 3, 8 }
presets.weapon.shield.is_smg.FALLOFF = {
{ dmg_mul = 3, r = 0, acc = { 0.4, 0.7 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 3, r = 0, acc = { 0.35, 0.6 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 3, r = 3000, acc = { 0.1, 0.3 }, recoil = { 1, 2 }, mode = { 1, 0, 0, 0 } },
}

presets.weapon.elite_shield.is_pistol.FALLOFF = {
{ dmg_mul = 7, r = 0, acc = { 0.6, 0.9 }, recoil = { 0.3, 0.45 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 7, r = 0, acc = { 0.5, 0.75 }, recoil = { 0.4, 0.6 }, mode = { 1, 0, 0, 0 } },
{ dmg_mul = 7, r = 3000, acc = { 0.1, 0.4 }, recoil = { 0.5, 1 }, mode = { 1, 0, 0, 0 } },
}

Expand All @@ -193,7 +194,7 @@ function CharacterTweakData:_presets(tweak_data, ...)

presets.weapon.sniper = based_on(presets.weapon.base, {
focus_delay = 0.5,
aim_delay = { 0, 0.25 },
aim_delay = (is_pro and { 0, 0.15 }) or { 0.1, 0.25 },
range = { close = 5000, optimal = 10000, far = 15000 },
})

Expand All @@ -208,8 +209,8 @@ function CharacterTweakData:_presets(tweak_data, ...)
})
presets.weapon.elite_tank = based_on(presets.weapon.tank, {
melee_dmg = 20,
aim_delay = { 0, 0.1 },
focus_delay = 0.15,
focus_delay = (is_pro and 0.15) or 0.25,
aim_delay = (is_pro and { 0, 0.05 }) or { 0.1, 0.1 },
})

presets.weapon.tank.is_shotgun_pump.FALLOFF = {
Expand Down Expand Up @@ -270,8 +271,8 @@ function CharacterTweakData:_presets(tweak_data, ...)
presets.move_speed.escort_slow = deep_clone(presets.move_speed.slow)

-- Tweak dodge presets
presets.dodge.heavy.occasions.preemptive.chance = 0.25
presets.dodge.athletic.occasions.preemptive.chance = 0.5
presets.dodge.heavy.occasions.preemptive.chance = 0.25 * ((is_pro and 1.25) or 1)
presets.dodge.athletic.occasions.preemptive.chance = 0.5 * ((is_pro and 1.25) or 1)

presets.dodge.ninja.speed = 2
for _, occasion in pairs(presets.dodge.ninja.occasions) do
Expand Down Expand Up @@ -903,6 +904,7 @@ end)

local function setup_presets(self)
local diff_i = self.tweak_data:difficulty_to_index(Global.game_settings and Global.game_settings.difficulty or "normal")
local is_pro = Global.game_settings and Global.game_settings.one_down
local f = ((diff_i ^ 2) / (diff_i * 3))
self:_multiply_all_hp(3, 1.75)

Expand Down Expand Up @@ -962,7 +964,7 @@ local function setup_presets(self)
if diff_i == 6 then
self.spooc.spooc_sound_events = { detect_stop = "cloaker_presence_stop", detect = "cloaker_presence_loop" } -- cloakers are silent on eclipse

self:_multiply_all_speeds(1.15, 1.075)
self:_multiply_all_speeds(1.12, 1.06)
self.tank.move_speed.stand.walk.cbt = { strafe = 196, fwd = 218, bwd = 174 }
self.tank.move_speed.stand.run.cbt = self.tank_elite.move_speed.stand.walk.cbt
self.tank_elite.move_speed.stand.walk.cbt = { strafe = 216, fwd = 238, bwd = 194 }
Expand All @@ -974,6 +976,11 @@ local function setup_presets(self)
self.zeal_shield.move_speed.crouch.walk.cbt = { strafe = 290, fwd = 320, bwd = 270 }
self.zeal_shield.move_speed.crouch.run.cbt = { strafe = 320, fwd = 360, bwd = 290 }
end

-- pro job speed increase
if is_pro then
self:_multiply_all_speeds(1.05, 1.05)
end
end

CharacterTweakData._set_normal = setup_presets
Expand Down
10 changes: 0 additions & 10 deletions lua/elementspawnenemygroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ group_mapping.tac_shield_wall_ranged = group_mapping.tac_shield_wall
group_mapping.tac_shield_wall_charge = group_mapping.tac_shield_wall
group_mapping.tac_tazer_charge = group_mapping.tac_tazer_flanking

-- Level specific group mappings to fix issues with nav link access flags
local mission_script_elements = StreamHeist:mission_script_patches()

Hooks:PostHook(ElementSpawnEnemyGroup, "_finalize_values", "sh__finalize_values", function(self)
if not self._values.preferred_spawn_groups then
return
Expand Down Expand Up @@ -102,12 +99,5 @@ Hooks:PostHook(ElementSpawnEnemyGroup, "_finalize_values", "sh__finalize_values"
end
end

local element_mapping = mission_script_elements and mission_script_elements[self._id]
if element_mapping and element_mapping.groups then
for group, enabled in pairs(element_mapping.groups) do
new_groups[group] = enabled or nil
end
end

self._values.preferred_spawn_groups = table.map_keys(new_groups)
end)
17 changes: 5 additions & 12 deletions lua/groupaistatebesiege.lua
Original file line number Diff line number Diff line change
Expand Up @@ -622,27 +622,20 @@ function GroupAIStateBesiege:_chk_group_use_grenade(assault_area, group, detonat

-- If players camp a specific area for too long, turn a smoke grenade into a teargas grenade instead
local use_teargas
if grenade_type == "smoke_grenade" and assault_area.criminal_entered_t and table.size(assault_area.neighbours) <= 2 then
if grenade_type == "smoke_grenade" and not assault_area.hostages and assault_area.criminal_entered_t and table.size(assault_area.neighbours) <= 2 then
local teargas_chance_times = tweak_data.group_ai.cs_grenade_chance_times or { 60, 240 }
local teargas_chance = math.map_range(self._t - assault_area.criminal_entered_t, teargas_chance_times[1], teargas_chance_times[2], 0, 1)
if math.random() < teargas_chance then
local teargas_pos = managers.navigation:find_random_position_in_segment(assault_area.pos_nav_seg)
mvec_lerp(teargas_pos, teargas_pos, assault_area.pos, 0.75)
mvec_lerp(detonate_offset_pos, teargas_pos, assault_area.pos, 0.75)

local c_key = table.random_key(assault_area.criminal.units)
if c_key then
mvec_lerp(teargas_pos, teargas_pos, assault_area.criminal.units[c_key].m_pos, 0.5)
mvec_lerp(detonate_offset_pos, detonate_offset_pos, assault_area.criminal.units[c_key].m_pos, 0.5)
end

mvec_set(detonate_offset, math.UP)
mvec_mul(detonate_offset, 1000)
mvec_add(detonate_offset, teargas_pos)

if World:raycast("ray", teargas_pos, detonate_offset, "slot_mask", managers.slot:get_mask("world_geometry"), "report") then
assault_area.criminal_entered_t = assault_area.criminal_entered_t - teargas_chance_times[2]
detonate_offset_pos = teargas_pos
use_teargas = true
end
assault_area.criminal_entered_t = assault_area.criminal_entered_t - teargas_chance_times[2]
use_teargas = true
end
end

Expand Down
21 changes: 14 additions & 7 deletions lua/groupaitweakdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1774,10 +1774,11 @@ function GroupAITweakData:_init_enemy_spawn_groups_level() end
Hooks:PostHook(GroupAITweakData, "_init_task_data", "eclipse__init_task_data", function(self, difficulty_index)
-- difficulty scaling
local f = ((difficulty_index ^ 2) / (difficulty_index * 3))
local is_pro = Global.game_settings and Global.game_settings.one_down

-- Assault Data
-- AI Tickrate
self.ai_tickrate = 1 / (30 * f)
self.ai_tickrate = 1 / (50 * math.sqrt(f) * ((is_pro and 1.15) or 1))

-- BESIEGE --

Expand Down Expand Up @@ -1822,19 +1823,19 @@ Hooks:PostHook(GroupAITweakData, "_init_task_data", "eclipse__init_task_data", f

-- GRENADES --
-- global
self.min_grenade_timeout = 20 / f
self.min_grenade_timeout = 20 / f / ((is_pro and 1.25) or 1)
self.no_grenade_push_delay = 8 / (math.sqrt(f))

-- flash
self.flash_grenade.light_color = Vector3(255, 255, 255)
self.flash_grenade.light_range = 500
self.flash_grenade_timeout = { 30 / f, 40 / f }
self.flash_grenade_timeout = { 30 / f / ((is_pro and 1.25) or 1), 40 / f / ((is_pro and 1.25) or 1) }
self.flash_grenade.timer = 2 / f

-- smoke & gas
self.smoke_grenade_timeout = { 40 / f, 50 / f }
self.smoke_grenade_timeout = { 40 / f / ((is_pro and 1.25) or 1), 50 / f / ((is_pro and 1.25) or 1) }
self.smoke_grenade_lifetime = 10 * f
self.cs_grenade_timeout = { 110 / f, 150 / f }
self.cs_grenade_timeout = { 110 / f / ((is_pro and 1.25) or 1), 150 / f / ((is_pro and 1.25) or 1) }
self.cs_grenade_chance_times = { 120, 240 }
self.cs_grenade_lifetime = 10 * f

Expand Down Expand Up @@ -1889,7 +1890,10 @@ Hooks:PostHook(GroupAITweakData, "_init_task_data", "eclipse__init_task_data", f
fbi_lights = { 1.5, 1.5, 1.5 },
fbi_heavies = { 0.3, 0.5, 1 },
fbi_shields = { 0.2, 0.2, 0.3 },
fbi_tanks = { 0, 0.02, 0.1 },
fbi_tanks = { 0, 0.04, 0.125 },
gensec_cqc_lights = { 0, 0.1, 0.25 },
gensec_ranged_lights = { 0, 0.1, 0.25 },
gensec_flankers = { 0, 0.1, 0.2 },
spoocs = { 0, 0.03, 0.06 },
}
self.besiege.recon.groups = {
Expand Down Expand Up @@ -1989,7 +1993,10 @@ Hooks:PostHook(GroupAITweakData, "_init_task_data", "eclipse__init_task_data", f
fbi_lights = { 1.5, 1.5, 1.5 },
fbi_heavies = { 0.3, 0.5, 1 },
fbi_shields = { 0.2, 0.2, 0.3 },
fbi_tanks = { 0, 0.02, 0.1 },
fbi_tanks = { 0, 0.04, 0.125 },
gensec_cqc_lights = { 0, 0.1, 0.25 },
gensec_ranged_lights = { 0, 0.1, 0.25 },
gensec_flankers = { 0, 0.1, 0.2 },
spoocs = { 0, 0.03, 0.06 },
}
self.ponr.reenforce.groups = {
Expand Down
Loading
Loading