diff --git a/artifacts/mods/gl_npcarmor.int b/artifacts/mods/gl_npcarmor.int index 2af91c20..3006723a 100644 Binary files a/artifacts/mods/gl_npcarmor.int and b/artifacts/mods/gl_npcarmor.int differ diff --git a/artifacts/mods/gl_npcarmor.ssl b/artifacts/mods/gl_npcarmor.ssl index 2543ea3b..f73298e5 100644 --- a/artifacts/mods/gl_npcarmor.ssl +++ b/artifacts/mods/gl_npcarmor.ssl @@ -1,14 +1,14 @@ -/* +/* NPC Armor Appearance mod - + Used to replace the scripted part of B-Team mod. Appropriate graphics are required for this mod to work. Can be adopted to any mod by adjusting armor PIDs, NPC PIDs and NPC FIDs in INI file. - + NOTE: this script requires compiler from sfall modderspack with -s option (short circuit evaluation) - + version 1.0 */ @@ -48,12 +48,12 @@ procedure invenwield_handler begin item := get_sfall_arg; slot := get_sfall_arg; isWorn := get_sfall_arg; - + if (critter and item and slot == INVEN_TYPE_WORN) then begin fid := check_armor_change(critter, item, isWorn); if (fid != -1) then begin art_change_fid_num(critter, fid); - end + end end end @@ -72,16 +72,16 @@ end procedure start begin variable sect, sects, armorTypes, armorType, npc, pid, pids, i; - if game_loaded then begin + if game_loaded and (sfall_ver_major >= 4) then begin register_hook_proc(HOOK_INVENWIELD, invenwield_handler); register_hook_proc(HOOK_ADJUSTFID, adjustfid_handler); - + defaultFids := get_ini_section(modIni, "Default"); fix_array(defaultFids); foreach (armorType: i in defaultFids) begin defaultFids[armorType] := atoi(i); end - + armorPidMap := create_array_map; armorTypes := get_ini_section(modIni, "ArmorTypes"); foreach (armorType: pids in armorTypes) begin @@ -90,9 +90,9 @@ procedure start begin armorPidMap[atoi(pid)] := armorType; end end - + npcMap := create_array_map; - + i := 1; sect := get_ini_section(modIni, ""+i); while (sect.PID) do begin @@ -101,14 +101,14 @@ procedure start begin foreach (armorType: pids in armorTypes) begin if (sect[armorType]) then begin npc[armorType] := atoi(sect[armorType]); - end + end end npcMap[atoi(sect.PID)] := npc; - + i += 1; sect := get_ini_section(modIni, ""+i); end end - + end diff --git a/artifacts/mods/gl_partycontrol.int b/artifacts/mods/gl_partycontrol.int index 1c4415f6..6e70b76d 100644 Binary files a/artifacts/mods/gl_partycontrol.int and b/artifacts/mods/gl_partycontrol.int differ diff --git a/artifacts/mods/gl_partycontrol.ssl b/artifacts/mods/gl_partycontrol.ssl index 40bfa82f..49f446c5 100644 --- a/artifacts/mods/gl_partycontrol.ssl +++ b/artifacts/mods/gl_partycontrol.ssl @@ -1,12 +1,12 @@ -/* +/* NPC Combat Control - + Allows to take control of your party member or other NPCs during combat - + NOTE: this script requires compiler from sfall modderspack with -s option (short circuit evaluation) - + version 1.0 */ @@ -17,18 +17,18 @@ variable configSection := "CombatControl", controlMode, pidList; - + procedure combatturn_handler begin variable status := get_sfall_arg, - critter := get_sfall_arg, + critter := get_sfall_arg, arg3 := get_sfall_arg, pid; - + // display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + ", arg3: " + arg3); pid := obj_pid(critter); - if (status == 1 + if (status == 1 and (len_array(pidList) == 0 or scan_array(pidList, pid bwand 0xFFFFFF) != -1) and (controlMode == 1 or party_member_obj(pid))) then begin set_dude_obj(critter); @@ -38,13 +38,13 @@ procedure combatturn_handler begin end procedure start begin - if game_loaded then begin + if game_loaded and (sfall_ver_major >= 4) then begin controlMode := GetConfig("CombatControl", "Mode", 0); if (controlMode > 2) then controlMode := 0; if (controlMode > 0) then begin pidList := GetConfigListInt("CombatControl", "PIDList"); fix_array(pidList); - + register_hook_proc(HOOK_COMBATTURN, combatturn_handler); end end diff --git a/artifacts/mods/readme.txt b/artifacts/mods/readme.txt index bcfa2240..ce09d696 100644 --- a/artifacts/mods/readme.txt +++ b/artifacts/mods/readme.txt @@ -1 +1,2 @@ -To install each mod, copy *.int file into your \data\scripts\ folder. \ No newline at end of file +To install each mod, copy *.int file into your \data\scripts\ folder. +For gl_npcarmor.int, you also need to copy npcarmor.ini to your Fallout directory. diff --git a/artifacts/scripting/hookscripts.txt b/artifacts/scripting/hookscripts.txt index 9131a020..f70144ca 100644 --- a/artifacts/scripting/hookscripts.txt +++ b/artifacts/scripting/hookscripts.txt @@ -19,9 +19,9 @@ procedure tohit_hook_handler begin end procedure start begin - if game_loaded then begin - register_hook_proc(HOOK_TOHIT, tohit_hook_handler); - end + if game_loaded then begin + register_hook_proc(HOOK_TOHIT, tohit_hook_handler); + end end @@ -427,7 +427,7 @@ HOOK_INVENWIELD (hs_invenwield.int) Runs before wielding or unwielding an armor or a weapon by a critter (except when using inventory by PC). An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations. -NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed. +NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed. If you need to rely on this, try checking if armor/weapon already equipped when wielding hook is executed. Critter arg1 - critter @@ -437,7 +437,6 @@ int arg4 - 1 when wielding, 0 when unwielding int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED - ------------------------------------------- HOOK_ADJUSTFID (hs_adjustfid.int) @@ -451,7 +450,6 @@ int arg1 - the vanilla fid calculated by the engine according to critter bas int ret1 - overrides the calculated FID with provided value - ------------------------------------------- HOOK_COMBATTURN (hs_combatturn.int) @@ -464,7 +462,6 @@ int arg3 - unknown boolean argument int ret1 - pass 1 at the start of turn to skip the turn, pass -1 at the end of turn to force end of combat - ------------------------------------------- HOOK_CARTRAVEL (hs_cartravel.int) @@ -476,5 +473,3 @@ int arg2 - vanilla fuel consumption (100 and below) int ret1 - car speed override (pass -1 if you just want to override fuel consumption) int ret2 - fuel consumption override - - diff --git a/sfall/version.h b/sfall/version.h index 1c81d685..d37f5f8d 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -28,9 +28,9 @@ #define VERSION_REV 0 #ifdef WIN2K -#define VERSION_STRING "4.0 win2k" +#define VERSION_STRING "4.0 beta1 win2k" #else -#define VERSION_STRING "4.0" +#define VERSION_STRING "4.0 beta1" #endif #define CHECK_VAL (4)