Skip to content

Commit

Permalink
Option to disable Steal tweaks altogether
Browse files Browse the repository at this point in the history
- E.g. to combine with other mod that also changes stealing
  • Loading branch information
phobos2077 committed May 20, 2024
1 parent 64c6bdf commit f280f4c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extra/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[Setup]
#define MyAppName "Fallout 2: EcCo Gameplay Overhaul"
#define MyAppVersion "0.9.5"
#define MyAppVersion "0.9.6"
#define MyAppPublisher "phobos2077"

#define DocsDir "..\docs\"
Expand All @@ -17,7 +17,7 @@
AppName={#MyAppName}
AppID=pbs_fallout2_economy_and_combat
AppVerName={#MyAppPublisher} {#MyAppName}
OutputBaseFilename=pbs_fo2rpu_ecco_mod_v0-9-5
OutputBaseFilename=pbs_fo2rpu_ecco_mod_v0-9-WIP
DefaultDirName={sd}\Games\Fallout2\
AppendDefaultDirName=no
;UsePreviousAppDir=no
Expand Down Expand Up @@ -71,6 +71,7 @@ en.CThrowingMeleeDmg=Apply Melee Damage stat to Throwing weapons
en.CStimpakRadiation=Stimpaks slightly irradiate on use
en.CStimpakSkillScaling=Stimpaks & Healing Powders heal amount scales with First Aid skill
en.CCarTravelTweaks=Car Travel changes (25% slower)
en.CStealTweaks=Steal changes

en.WFalloutNotFound=Fallout not detected in selected directory (fallout2.exe), mod won't work. Install anyway?
en.WRPNotFound=Restoration Project not detected in selected directory! This mod is only compatible with RPU 2.6 or above. Are you sure you want to continue?
Expand All @@ -92,6 +93,7 @@ ru.CThrowingMeleeDmg=Применять урон ближнего боя к ме
ru.CStimpakRadiation=Стимпаки слегка облучают при применении
ru.CStimpakSkillScaling=Эффективность стимпаков и лечебных порошков зависит от навыка первой помощи
ru.CCarTravelTweaks=Изменения параметров автомобиля (25% медленнее)
ru.CStealTweaks=Изменения воровства
ru.WFalloutNotFound=По указанному пути не найдена установленная игра (fallout2.exe), мод не будет работать! Все равно установить?
ru.WRPNotFound=Restoration Project не обнаружен в указанной папке! Данный мод совместим только с RPU 2.6. Все равно продолжить?
Expand All @@ -108,12 +110,14 @@ Name: "custom"; Description: "{cm:InstallCustom}"; Flags: iscustom
[Components]
Name: "main"; Description: "{cm:CMain}"; Types: full custom; Flags: fixed
;Name: "option"; Description: "{cm:COptions}"; Types: full
Name: "carry_unspent_ap"; Description: "{cm:CCarryUnspentAP}"; Types: full
Name: "remove_bonus_rof"; Description: "{cm:CRemoveBonusRoF}"; Types: full
Name: "throwing_melee_dmg"; Description: "{cm:CThrowingMeleeDmg}"; Types: full
Name: "stimpak_skill_scaling"; Description: "{cm:CStimpakSkillScaling}"; Types: full
Name: "stimpak_radiation"; Description: "{cm:CStimpakRadiation}"; Types: full
Name: "car_travel_tweaks"; Description: "{cm:CCarTravelTweaks}"; Types: full
Name: "steal_tweaks"; Description: "{cm:CStealTweaks}"; Types: full
[InstallDelete]
Type: files; Name: "{app}\data\worldmap.dat"
Expand Down Expand Up @@ -160,6 +164,7 @@ Filename: "{app}\mods\ecco\combat.ini"; Section: "THROWING"; Key: "apply_melee_d
Filename: "{app}\mods\ecco\misc.ini"; Section: "ITEM_TWEAKS"; Key: "stimpak_radiation_disable"; String: "1"; Components: not stimpak_radiation
Filename: "{app}\mods\ecco\misc.ini"; Section: "FIRST_AID"; Key: "ini_healing_skill_max"; String: "0"; Components: not stimpak_skill_scaling
Filename: "{app}\mods\ecco\misc.ini"; Section: "CAR_TRAVEL"; Key: "enable_tweaks"; String: "0"; Components: not car_travel_tweaks
Filename: "{app}\mods\ecco\misc.ini"; Section: "STEAL"; Key: "enable_tweaks"; String: "0"; Components: not steal_tweaks
Filename: "{app}\sfall\perks.ini"; Section: "5"; Key: "Level"; String: "15"; Components: not remove_bonus_rof
Expand Down
2 changes: 2 additions & 0 deletions root/mods/ecco/misc.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[STEAL]
; 1 to enable or 0 to disable all steal tweaks
enable_tweaks=1
; Chance % mod based number of successful steals in a row (-1 for vanilla, 0 to disable)
chance_steal_count_mod_mult=-4
; Chance % mod if facing critter (-25 for vanilla, 0 to disable)
Expand Down
4 changes: 4 additions & 0 deletions scripts_src/_pbs_craft/craft_schematics.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ end

/**
* Adds one recipe item for a given crafted item, if it doesn't exist. If recipe is known, deletes the item.
*
* @arg {int} schematicPid - PID of schematic item to create
* @arg {int} craftedItemPid - PID of item to unlock crafting of
* @arg {int} probability - % probability of spawn, if conditions are met.
*/
procedure check_restock_craft_schematic(variable schematicPid, variable craftedItemPid, variable probability := 100) begin
variable item, isKnown;
Expand Down
6 changes: 6 additions & 0 deletions scripts_src/_pbs_main/gl_pbs_steal.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ procedure gamemodechange_hook begin
end

procedure start begin
if (not game_loaded) then return;

if (get_int_from_ini(INI_FILE, INI_SECTION, "enable_tweaks") <= 0) then return;

int_from_ini_file(chance_steal_count_mod_mult, INI_FILE, INI_SECTION);
int_from_ini_file(chance_facing_mod, INI_FILE, INI_SECTION);
float_from_ini_file(chance_size_mod_mult, INI_FILE, INI_SECTION);
Expand All @@ -211,4 +215,6 @@ procedure start begin
//register_hook_proc(HOOK_ROLLCHECK, rollcheck_hook);
register_hook_proc(HOOK_GAMEMODECHANGE, gamemodechange_hook);
register_hook_proc(HOOK_STDPROCEDURE, stdprocedure_hook);

debug_log("Steal tweaks initailized");
end

0 comments on commit f280f4c

Please sign in to comment.