Skip to content

Commit d3be4f0

Browse files
committed
Heal by travel & rest nerfed
- Heal on rest - 6 hours (matches in-game description of Healing Rate) - Heal on worldmap - 24 hours (in game it says "1 HP at the end of the day", this is good enough approximation)
1 parent 07c6462 commit d3be4f0

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

root/mods/ecco/misc.ini

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ heal_mult_max=2.0
4040
skill_max=150
4141

4242

43-
[HEALING]
43+
[HEALING_SKILLS]
4444
; 1 to enable healing skill use modifications (including skill boost items), 0 to disable
4545
skill_use_mod=1
4646

@@ -56,15 +56,25 @@ skill_uses_per_day=4
5656
; HP amount multiplier on critical success rolls
5757
crit_success_mult=2.0
5858

59-
; First Aid skill Default: 1,5
59+
; First Aid HP restore range. Default: 1,5
6060
first_aid_hp=5,10
6161

62-
; Default: 4,10
62+
; Doctor/Repair skill HP restore range. Default: 4,10
6363
doctor_hp=10,20
64-
; Default: 4,10
64+
65+
; Healer perk HP restore bonus range. Default: 4,10
6566
healer_perk_hp=5,10
6667

6768

69+
[HEALING_REST]
70+
; Rest heal interval, in game minutes. Default is 180 (3h, in-game description of Healing Rate says 6, but it's lying).
71+
heal_time_rest=360
72+
; Worldmap heal interval, in game minutes. In vanilla it heals once per real time second and doesn't use game time.
73+
; Set to 0 for vanilla behavior.
74+
; Set to -1 to disable healing
75+
heal_time_travel=1440
76+
77+
6878
[CAR_TRAVEL]
6979
; 1 to enable or 0 to disable all car tweaks
7080
enable_tweaks=1

scripts_src/_pbs_main/gl_pbs_healing_skills.ssl

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
#include "../_pbs_headers/ecco_log.h"
2424
#include "../_pbs_headers/ecco_msg.h"
2525

26-
#define INI_FILE INI_MISC
27-
#define INI_SECTION "HEALING"
28-
2926
#define COMBAT_STATE_FLEEING (4)
3027

3128
#define obj_is_critter(obj) (obj_type(obj) == OBJ_TYPE_CRITTER)
@@ -443,6 +440,20 @@ end
443440
#define _varstr(var) ("; "#var" = " + ini_##var)
444441
#define _rngstr(var) ("; "#var" = " + debug_array_str(ini_##var))
445442

443+
#define INI_FILE INI_MISC
444+
#define INI_SECTION "HEALING_SKILLS"
445+
#define INI_SECTION_REST "HEALING_REST"
446+
447+
procedure apply_rest_heal_time_tweaks begin
448+
variable
449+
healRest := get_ini_value_def(INI_FILE, INI_SECTION_REST, "heal_time_rest", 180),
450+
healTravel := get_ini_value_def(INI_FILE, INI_SECTION_REST, "heal_time_travel", 0);
451+
452+
set_rest_heal_time(healRest);
453+
set_worldmap_heal_time(healTravel);
454+
debug_log_fmt("Passive healing times set: rest = %d, worldmap = %d", healRest, healTravel);
455+
end
456+
446457
procedure start begin
447458
if (game_loaded) then begin
448459
if (get_int_from_ini(INI_FILE, INI_SECTION, "skill_use_mod") <= 0) then return;
@@ -461,6 +472,8 @@ procedure start begin
461472
register_hook_proc(HOOK_USESKILL, useskill_hook);
462473
register_hook_proc(HOOK_DESCRIPTIONOBJ, descriptionobj_hook);
463474

464-
//set_rest_heal_time(1);
475+
debug_log("Healing Skill mod enabled.");
476+
477+
call apply_rest_heal_time_tweaks;
465478
end
466479
end

0 commit comments

Comments
 (0)