mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added check for sfall version for gl_partycontrol and gl_npcarmor.
Changed version string because sfall 4.0 will be released in 'beta' stage first. Minor edits to some documents.
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
To install each mod, copy *.int file into your <Fallout Dir>\data\scripts\ folder.
|
||||
To install each mod, copy *.int file into your <Fallout Dir>\data\scripts\ folder.
|
||||
For gl_npcarmor.int, you also need to copy npcarmor.ini to your Fallout directory.
|
||||
|
||||
Reference in New Issue
Block a user