From 5ef6e5f0fdb72b8b6d4f93c665780ec44d9f7560 Mon Sep 17 00:00:00 2001 From: phobos2077 Date: Tue, 28 May 2024 00:19:08 +0200 Subject: [PATCH] Healing skills (another) overhaul - Critical successes fleshed out - Added critical failures - Kits overcome daily limit (reverted limit to 3) - Kit stats rebalanced - Separate skill/critical mods for skill items - Fix Lenny's inability to help with Doctoring on 0 level --- docs/ecco_changelog.txt | 10 +- docs/ecco_readme.txt | 14 ++- proto_src/critters/00000107.json | 116 ++++++++++++++++++ proto_src/items/misc/00000047.yml | 2 +- proto_src/items/misc/00000408.yml | 4 +- root/data/proto/critters/00000107.pro | Bin 0 -> 416 bytes root/data/proto/items/00000047.pro | Bin 69 -> 69 bytes root/data/proto/items/00000408.pro | Bin 69 -> 69 bytes root/data/text/english/game/pbs_combat.msg | 2 +- root/data/text/russian/game/pbs_combat.msg | 2 +- root/mods/ecco/misc.ini | 36 ++++-- scripts_src/_pbs_headers/traps.h | 4 +- .../_pbs_main/gl_pbs_healing_skills.ssl | 93 ++++++++++---- 13 files changed, 232 insertions(+), 51 deletions(-) create mode 100644 proto_src/critters/00000107.json create mode 100644 root/data/proto/critters/00000107.pro diff --git a/docs/ecco_changelog.txt b/docs/ecco_changelog.txt index dedb461..d36fe42 100644 --- a/docs/ecco_changelog.txt +++ b/docs/ecco_changelog.txt @@ -9,13 +9,15 @@ v0.9.6: > Healing: - replaced default FirstAid/Doctor/Repair skill usage with fully-featured scripted implementation -- added critical healing success: restores more HP than normal -- changed first aid kits, doctor bags, etc. will now have a fixed number of uses instead of a 10% chance to remove on every use +- added a fixed number of uses to first aid kits, doctor bags, etc. instead of a 10% chance to remove +- added critical healing success: restores much more HP than normal +- added critical failure: reduces remaining uses of a kit/bag +- added ignoring daily limits when using kits/bags +- increased skill level influence on critical success and failure chances - buffed restored HP amount for all 3 skills -- buffed number of heal actions per day to 4 (from 3) - nerfed rest heal interval to 6 hours (from 3) - nerfed world travel heal interval to 24 hours (was 1 real-time second; requires future sfall update) -- fixed numerious bugs and inconsistencies of vanilla system +- fixed numerious bugs and inconsistencies of vanilla healing system > Crafting: - fixed craft button disappearing when using external HRP diff --git a/docs/ecco_readme.txt b/docs/ecco_readme.txt index 7ac35e6..cab9409 100644 --- a/docs/ecco_readme.txt +++ b/docs/ecco_readme.txt @@ -1,6 +1,6 @@ -====================- -=== EcCo mod ===- --=== v0.9.5 BETA ===- +-=== v0.9.6 BETA ===- -====================- by phobos2077 @@ -70,6 +70,17 @@ - Opening inventory has no cost, but every action (except reload, see below) requires 2 AP (or 1 with Quick Pockets). - Bonus Move perk is now available at level 3 (was 6) and grants 3 Move Points per level (was 2). - Most "Melee" NPC's now get Bonus Move perk to close on their gun-wielding foes and make combat more dynamic. +- Enemy AI will now use aimed shots much more often. +- Critical hits to arms will sometimes make target drop their weapon. + + +> Healing: +- New healing system replaces the original to make First Aid & Doctor skills useful. +- First Aid Kits & Doctor Bags have limited uses (instead of random 10% removal). +- Much more HP is restored per skill use. +- Critical successes restore even more and crit chance depends heavily on skill level. +- Using kits & bags now has clear benefit: this ignores daily usage limits. +- To have more reason for using these skills, all passive healing was considerably nerfed (now it matches in-game Healing Rate description from vanilla). > AMMO: @@ -162,6 +173,7 @@ - Weapon loadouts were adjusted in respect to new weapon balance. - Most new weapons are used by people in the wasteland. - Throwing weapons will be used against you more often. +- Ranged enemies will sure to have some spare ammo. > MISC: diff --git a/proto_src/critters/00000107.json b/proto_src/critters/00000107.json new file mode 100644 index 0000000..b523504 --- /dev/null +++ b/proto_src/critters/00000107.json @@ -0,0 +1,116 @@ +{ + "pid": 107, + "textID": 10700, + "type": 1, + "flags": 536870912, + "lightRadius": 0, + "lightIntensity": 0, + "frmPID": 79, + "frmType": 1, + "extra": { + "actionFlags": 24576, + "scriptID": -1, + "headFID": -1, + "AI": 82, + "team": 1, + "flags": 2, + "baseStats": { + "STR": 4, + "PER": 6, + "END": 5, + "CHR": 2, + "INT": 6, + "AGI": 5, + "LUK": 5, + "HP": 29, + "AP": 7, + "AC": 5, + "Unarmed": 0, + "Melee": 1, + "Carry": 125, + "Sequence": 12, + "Healing Rate": 1, + "Critical Chance": 5, + "Better Criticals": 0, + "DT Normal": 0, + "DT Laser": 0, + "DT Fire": 0, + "DT Plasma": 0, + "DT Electrical": 0, + "DT EMP": 0, + "DT Explosive": 0, + "DR Normal": 0, + "DR Laser": 0, + "DR Fire": 0, + "DR Plasma": 0, + "DR Electrical": 0, + "DR EMP": 0, + "DR Explosive": 0, + "DR Radiation": 10, + "DR Poison": 25 + }, + "age": 25, + "gender": 0, + "bonusStats": { + "STR": 0, + "PER": 0, + "END": 0, + "CHR": 0, + "INT": 0, + "AGI": 0, + "LUK": 0, + "HP": 100, + "AP": 0, + "AC": 0, + "Unarmed": 0, + "Melee": 0, + "Carry": 0, + "Sequence": 0, + "Healing Rate": 0, + "Critical Chance": 0, + "Better Criticals": 0, + "DT Normal": 0, + "DT Laser": 0, + "DT Fire": 0, + "DT Plasma": 0, + "DT Electrical": 0, + "DT EMP": 0, + "DT Explosive": 0, + "DR Normal": 0, + "DR Laser": 0, + "DR Fire": 0, + "DR Plasma": 0, + "DR Electrical": 0, + "DR EMP": 500, + "DR Explosive": 0, + "DR Radiation": 0, + "DR Poison": 0 + }, + "bonusAge": 0, + "bonusGender": 0, + "skills": { + "Small Guns": 45, + "Big Guns": 0, + "Energy Weapons": 0, + "Unarmed": 0, + "Melee": 12, + "Throwing": 0, + "First Aid": 51, + "Doctor": 68, + "Sneak": 0, + "Lockpick": 0, + "Steal": 0, + "Traps": 0, + "Science": 0, + "Repair": 0, + "Speech": 0, + "Barter": 66, + "Gambling": 0, + "Outdoorsman": 0 + }, + "bodyType": 0, + "XPValue": 130, + "killType": 4, + "damageType": null + } +} diff --git a/proto_src/items/misc/00000047.yml b/proto_src/items/misc/00000047.yml index 1d48f10..256e42e 100644 --- a/proto_src/items/misc/00000047.yml +++ b/proto_src/items/misc/00000047.yml @@ -19,4 +19,4 @@ soundId: '0' miscData: powerTypePid: -1 powerType: 0 - charges: 8 + charges: 5 diff --git a/proto_src/items/misc/00000408.yml b/proto_src/items/misc/00000408.yml index db96c7a..1660a06 100644 --- a/proto_src/items/misc/00000408.yml +++ b/proto_src/items/misc/00000408.yml @@ -12,11 +12,11 @@ sid: -1 type: ITEM_TYPE_MISC material: 1 size: 1 -weight: 2 +weight: 3 cost: 400 inventoryFid: 117440763 soundId: '0' miscData: powerTypePid: -1 powerType: 0 - charges: 10 + charges: 8 diff --git a/root/data/proto/critters/00000107.pro b/root/data/proto/critters/00000107.pro new file mode 100644 index 0000000000000000000000000000000000000000..4f56c1e884fbb50a28e2dbc82bbbdd0d4629cac2 GIT binary patch literal 416 zcmZQ%V8~`*&^*J)z~IjS1qxs~f#E+C0J%Xx3{=9v1jH;r%m&1)P(F+e;>!XtJ5&xx zf%Vh^X&xvWq=pi}1=K7F#e~dBA*6sjdB!g|^y#9BgZvBv#z5=>X5l8B(4?Axd{8(u F001f<4rTxV literal 0 HcmV?d00001 diff --git a/root/data/proto/items/00000047.pro b/root/data/proto/items/00000047.pro index 4a7920c58ade43371d45741440d631e2cbae4de2..e0b90590df24e9ad6807553000c9e9bd5480ec67 100644 GIT binary patch delta 6 NcmZ>Do#4XA3IGNW0c8LH delta 6 NcmZ>Do#4XA0RRRQ0cZdK diff --git a/root/data/proto/items/00000408.pro b/root/data/proto/items/00000408.pro index e4ea210bb2544a67a4de6cbfa24d565d952b823d..f6f98ce21debfea964a97e1f353986a4593285cd 100644 GIT binary patch delta 11 ScmZ>DouJRiJkdaekpln_Faj(9 delta 11 ScmZ>DouJRiG|@nWkqZD2ECMY6 diff --git a/root/data/text/english/game/pbs_combat.msg b/root/data/text/english/game/pbs_combat.msg index 1acfa63..67802e6 100644 --- a/root/data/text/english/game/pbs_combat.msg +++ b/root/data/text/english/game/pbs_combat.msg @@ -21,4 +21,4 @@ {301}{}{ Restores %d HP.} # skill booster kits -{310}{}{ It has supplies for %d more uses.} +{310}{}{ It has supplies for %d/%d uses.} diff --git a/root/data/text/russian/game/pbs_combat.msg b/root/data/text/russian/game/pbs_combat.msg index 8cdb141..524b833 100644 --- a/root/data/text/russian/game/pbs_combat.msg +++ b/root/data/text/russian/game/pbs_combat.msg @@ -21,4 +21,4 @@ {301}{}{ Восстанавливает %d ОЗ.} # skill booster kits -{310}{}{ Может быть быть использован(а) ещё %d раз.} +{310}{}{ Может быть быть использован(а) ещё %d/%d раз.} diff --git a/root/mods/ecco/misc.ini b/root/mods/ecco/misc.ini index 602757e..fe8966a 100644 --- a/root/mods/ecco/misc.ini +++ b/root/mods/ecco/misc.ini @@ -45,17 +45,28 @@ skill_max=150 skill_use_mod=1 ; 1 to use charges instead of probability of removal. Max charges can be configured in item prototypes. +; This also circumvents daily limit when using skill boost items. +; Charges are consumed for every successful healing as well as when critical failure occurs (probability depends on game difficulty). use_charges=1 ; If use_charges is 0, determines probability (1 in X) of item removal, as in vanilla kit_remove_freq=10 ; Changes maximum number of successful skill uses per day from default 3. Range: [1; 10] -skill_uses_per_day=4 +skill_uses_per_day=3 + +; Skill roll delta will be multiplied by this value to determine success crit chance. Default: 0.1 (1/10). +crit_success_chance_mult=0.4 ; HP amount multiplier on critical success rolls crit_success_mult=2.5 +; Skill roll delta will be multiplied by (game_difficulty + 1) and this value to determine failure crit chance. Default: 0.1 (1/10). +crit_fail_chance_mult=0.15 + +; Max charges to consume on critical failures. +crit_fail_max_charges=3 + ; First Aid HP restore range. Default: 1,5 first_aid_hp=5,10 @@ -63,31 +74,32 @@ first_aid_hp=5,10 doctor_hp=10,20 ; Healer perk HP restore bonus range. Default: 4,10 -healer_perk_hp=5,10 +healer_perk_hp=7,14 ; Base skill modifiers for healing skill_bias_6=0 -skill_bias_7=0 -skill_bias_13=0 +skill_bias_7=-10 +skill_bias_13=-20 ; You can configure skill boost items in a following format: -; skill_item_=,, +; skill_item_=,,, ; - skill - skill ID (6, 7 or 13) -; - bonus - skill bonus for using the item (also modifies crit success chance by the same amount) +; - skill_mod - skill bonus for using the item +; - crit_mod - critical success chance bonus for using the item (only applies to HP restored) ; - message - ID of text in game/proto.msg to display when item is depleted, omit to make the item non-depletable ; Doctor's bag -skill_item_91=7,20,900 +skill_item_91=7,10,20,900 ; First Aid Kit -skill_item_47=6,20,901 +skill_item_47=6,20,0,901 ; Paramedic's bag -skill_item_409=7,40,910 +skill_item_409=7,30,40,910 ; Field Medic kit -skill_item_408=6,40,911 +skill_item_408=6,30,20,911 ; Multi Tool -skill_item_75=13,20 +skill_item_75=13,20,20 ; Super Tool kit -skill_item_308=13,40 +skill_item_308=13,40,40 [HEALING_REST] diff --git a/scripts_src/_pbs_headers/traps.h b/scripts_src/_pbs_headers/traps.h index 2b23f5c..7f26b05 100644 --- a/scripts_src/_pbs_headers/traps.h +++ b/scripts_src/_pbs_headers/traps.h @@ -134,7 +134,7 @@ procedure create_trap_object(variable type, variable tile, variable elev, variab end -procedure random_roll_ext(variable rollMod, variable critChance, variable successOffset, variable successMult, variable failMult) begin +procedure roll_check_ext(variable rollMod, variable critChance, variable successOffset, variable successMult, variable failMult) begin variable delta := rollMod - random(1, 100), roll; @@ -154,7 +154,7 @@ procedure roll_vs_traps_ext(variable critter, variable rollMod) begin successMult := (5 - diffMult), failMult := (0.2 + 0.1 * diffMult); - return random_roll_ext(skillValue + rollMod, critChance, -50, successMult, failMult); + return roll_check_ext(skillValue + rollMod, critChance, -50, successMult, failMult); end procedure roll_critical(variable critter, variable bodyPart) begin diff --git a/scripts_src/_pbs_main/gl_pbs_healing_skills.ssl b/scripts_src/_pbs_main/gl_pbs_healing_skills.ssl index d0992d5..dbd9088 100644 --- a/scripts_src/_pbs_main/gl_pbs_healing_skills.ssl +++ b/scripts_src/_pbs_main/gl_pbs_healing_skills.ssl @@ -1,9 +1,10 @@ /* First Aid/Doctor/Repair healing tweaks: - Fixes several vanilla bugs and inconsistent behavior around healing crippled limbs and HP at the same time - - Moved some variables to ini for tweaking + - Moved some variables and usable kit items to ini for tweaking - Kits: added charges-based system as alternative to random chance item removal - - Critical success multiplier for HP restored + - Kits usage circumvents daily usage limit (but not EXP gain limit) + - Critical success multiplier for HP restored (with custom critical chances multipliers) */ #define SCRIPT_REALNAME "pbs_healing_skills" @@ -26,8 +27,10 @@ #define COMBAT_STATE_FLEEING (4) #define SKILL_ITEM_SKILL (0) -#define SKILL_ITEM_BONUS (1) -#define SKILL_ITEM_DEPLETEMSG (2) +#define SKILL_ITEM_SKILL_MOD (1) +#define SKILL_ITEM_CRIT_MOD (2) +#define SKILL_ITEM_DEPLETEMSG (3) +#define SKILL_ITEM_COUNT (4) #define obj_is_critter(obj) (obj_type(obj) == OBJ_TYPE_CRITTER) #define critter_max_hp(cr) get_critter_stat(cr, STAT_max_hit_points) @@ -45,7 +48,10 @@ variable begin ini_first_aid_hp; ini_doctor_hp; ini_healer_perk_hp; + ini_crit_success_chance_mult; ini_crit_success_mult; + ini_crit_fail_chance_mult; + ini_crit_fail_max_charges; ini_skill_biases; ini_skill_items; skill_boosters; @@ -74,8 +80,6 @@ procedure kit_pid_is_limited_use(variable pid) begin return itemData[SKILL_ITEM_DEPLETEMSG] > 0; end - - procedure skill_use_slot_available(variable skill) begin variable slot, time, hoursSinceLastUsage, timesUsed; @@ -137,6 +141,25 @@ procedure calc_hp_to_heal(variable user, variable skill, variable isCritical) be return random(healMin, healMax); end +/** + * Similar to roll_check, but allows to customize critical success/failure delta multipliers (in vanilla it is always 1/10). + * @arg {int} rollMod + * @arg {int} critChance + * @arg {int} successMult + * @arg {int} failMult + * @ret {int} + */ +procedure roll_check_ext(variable rollMod, variable critChance, variable successMult, variable failMult) begin + variable + delta := rollMod - random(1, 100), + roll; + + if (delta < 0) then begin + return ROLL_CRITICAL_FAILURE if (random(1, 100) <= -delta*failMult) else ROLL_FAILURE; + end + return ROLL_CRITICAL_SUCCESS if (random(1, 100) <= delta*successMult + critChance) else ROLL_SUCCESS; +end + // 530: damaged eye // 531: crippled left arm // 532: crippled right arm @@ -145,18 +168,20 @@ end #define display_uncrippled_msg(dmgFlagIdx, prefixMsgId) display_msg(sprintf(mstr_skill(prefixMsgId), mstr_skill(530 + dmgFlagIdx))) /** - * A refactored version of skill_use function from the engine, for use with healing skills only. Returns number of healing attempts performed (HP and cripple flag removal). + * A refactored version of skill_use function from the engine, for use with healing skills only. Returns number of healing item charges to consume. * @arg {ObjectPtr} user * @arg {ObjectPtr} target * @arg {int} skill - First Aid, Doctor or Repair * @arg {int} skillBonus + * @arg {int} critChanceBonus - bonus to critical success chance * @arg {int} maxAttempts - if >0, limits how many types of healing can be performed, including healing limbs * @ret {int} */ -procedure use_healing_skill(variable user, variable target, variable skill, variable skillBonus, variable maxAttempts := -1) begin +procedure use_healing_skill(variable user, variable target, variable skill, variable skillBonus, variable critChanceBonus := 0, variable maxAttempts := -1) begin variable curHp, maxHp, isRobot, isRepair, isFirstAid; - debug_log_fmt("use_healing_skill: user = %s, target = %s, bonus = %d, skill = %d", obj_name(user), obj_name(target), skillBonus, skill); + debug_log_fmt("use_healing_skill: user = %s, target = %s, bonus = %d/%d, skill = %d, game_difficulty = %d", + obj_name(user), obj_name(target), skillBonus, critChanceBonus, skill, difficulty_level); isRobot := (critter_body_type(target) == CR_BODY_ROBOTIC); isRepair := (skill == SKILL_REPAIR); @@ -191,7 +216,7 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari end return 0; end - if (skill_use_slot_available(skill) == -1) then begin + if (maxAttempts <= 0 and skill_use_slot_available(skill) == -1) then begin // 590: You've taxed your ability with that skill. Wait a while. // 591: You're too tired. // 592: The strain might kill you. @@ -199,9 +224,10 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari return 0; end - variable skillUseSlotAdded, roll, i, prefixMsg, usedLastSlot, healingAttempts, - skillLevel := has_skill(user, skill) + ini_skill_biases[skill] + skillBonus, - critChance := get_critter_stat(user, STAT_crit_chance) + skillBonus; + variable skillUseSlotAdded, roll, i, prefixMsg, usedLastSlot, usedCharges, healingAttempts, + skillLevel := has_skill(user, skill) + ini_skill_biases[skill], + critChance := get_critter_stat(user, STAT_crit_chance), + critFailMult := (difficulty_level + 1) * ini_crit_fail_chance_mult; fade_out; @@ -222,24 +248,27 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari continue; healingAttempts += 1; - roll := roll_check(skillLevel, critChance); + roll := roll_check_ext(skillLevel + skillBonus, 0, 0, critFailMult); if (is_success(roll)) then begin clear_critter_dmg_flag(target, healable_damage_flags[i]); clear_critter_combat_flag(target, COMBAT_STATE_FLEEING); // 520: You heal your %s. // 521: You heal the %s. display_uncrippled_msg(i, 520 if (target == dude_obj) else 521); - call skill_use_slot_add(skill); - if (user == dude_obj) then + if ((skill_use_slot_add(skill) != -1) and (user == dude_obj)) then call show_skill_use_messages(skill); + + usedCharges += 1; end else begin // 525: You fail to heal your %s. // 526: You fail to heal the %s. display_uncrippled_msg(i, 525 if (target == dude_obj) else 526); + if (is_critical(roll)) then + usedCharges += 1; end // EcCo: fix healing beyond available slots - if ((skill_use_slot_available(skill) == -1) or (maxAttempts > 0 and healingAttempts >= maxAttempts)) then begin + if ((maxAttempts <= 0 and (skill_use_slot_available(skill) == -1)) or (maxAttempts > 0 and healingAttempts >= maxAttempts)) then begin usedLastSlot := true; break; end @@ -250,7 +279,7 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari if (curHp < maxHp and not usedLastSlot) then begin // Restore hit points. healingAttempts += 1; - roll := roll_check(skillLevel, critChance); + roll := roll_check_ext(skillLevel + skillBonus, critChance + critChanceBonus, ini_crit_success_chance_mult, critFailMult); if (is_success(roll)) then begin variable hpToHeal := calc_hp_to_heal(user, skill, is_critical(roll)); @@ -260,15 +289,20 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari display_msg(sprintf(mstr_skill(500), math_min(maxHp - curHp, hpToHeal))); end - // EcCo: use up skill slot for HP healing even after cripple healing - call skill_use_slot_add(skill); - clear_critter_combat_flag(target, COMBAT_STATE_FLEEING); - if (user == dude_obj) then + + // EcCo: use up skill slot for HP healing even after cripple healing + if ((skill_use_slot_add(skill) != -1) and (user == dude_obj)) then call show_skill_use_messages(skill); + + usedCharges += 1; end else begin // You fail to do any healing. display_msg(sprintf(mstr_skill(503), how_much(0))); + + // Remove components on critical failure. + if (is_critical(roll)) then + usedCharges += random(1, math_min(ini_crit_fail_max_charges, maxAttempts - usedCharges)); end end @@ -281,7 +315,7 @@ procedure use_healing_skill(variable user, variable target, variable skill, vari // TODO: not sure if this is needed //exec_map_update_scripts - return healingAttempts; + return usedCharges; end /** @@ -313,6 +347,7 @@ procedure protinst_use_item_on(variable user, variable target, variable item) be variable begin depletedMsgId; skillBonus := 0; + critChanceBonus := 0; skill := -1; maxAttempts; actualAttempts; @@ -320,7 +355,8 @@ procedure protinst_use_item_on(variable user, variable target, variable item) be end if (skillItem) then begin skill := skillItem[SKILL_ITEM_SKILL]; - skillBonus := skillItem[SKILL_ITEM_BONUS]; + skillBonus := skillItem[SKILL_ITEM_SKILL_MOD]; + critChanceBonus := skillItem[SKILL_ITEM_CRIT_MOD]; depletedMsgId = skillItem[SKILL_ITEM_DEPLETEMSG]; end if (skill == -1 or (skill != SKILL_FIRST_AID and skill != SKILL_DOCTOR and skill != SKILL_REPAIR)) then @@ -336,7 +372,7 @@ procedure protinst_use_item_on(variable user, variable target, variable item) be maxAttempts := healing_skill_item_charges(item) if (depletedMsgId and ini_use_charges) else -1; - actualAttempts := use_healing_skill(user, target, skill, skillBonus, maxAttempts); + actualAttempts := use_healing_skill(user, target, skill, skillBonus, critChanceBonus, maxAttempts); if (actualAttempts == 0) then return 0; @@ -425,7 +461,7 @@ procedure descriptionobj_hook begin if (not ini_use_charges or (obj_type(obj) != OBJ_TYPE_ITEM) or (not kit_pid_is_limited_use(objPid))) then return; - str := string_format(mstr_ecco_combat(310), healing_skill_item_fix_charges(obj)); + str := string_format(mstr_ecco_combat(310), healing_skill_item_fix_charges(obj), get_proto_data(objPid, PROTO_MI_CHARGES)); set_sfall_return(proto_data(objPid, it_description) + str); end @@ -467,7 +503,7 @@ procedure load_skill_items begin if (string_starts_with(k, prefix)) then begin variable pid := atoi(substr(k, strlen(prefix), 0)); arr := array_fixed(string_split_ints(v, ",")); - resize_array(arr, 3); + resize_array(arr, SKILL_ITEM_COUNT); ini_skill_items[pid] := arr; end end @@ -498,7 +534,10 @@ procedure start begin load_num_from_ini(kit_remove_freq, 10, 1, 10000); load_num_from_ini(skill_uses_per_day, 3, 1, 10); + load_num_from_ini(crit_success_chance_mult, 0.1, 0.0, 1.0); load_num_from_ini(crit_success_mult, 1.0, 1.0, 1000.0); + load_num_from_ini(crit_fail_chance_mult, 0.1, 0.0, 1.0); + load_num_from_ini(crit_fail_max_charges, 3, 1, 100); load_range_from_ini(first_aid_hp, 1, 5, 0, 10000); load_range_from_ini(doctor_hp, 4, 10, 0, 10000); load_range_from_ini(healer_perk_hp, 4, 10, 0, 10000);