mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Merge branch 'develop'
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
; Allows you to configure advanced settings for drugs.
|
||||
; Maximum 50 drugs are allowed
|
||||
; Note: for vanilla drugs, you can only override the values of NumEffect and AddictTime parameters
|
||||
|
||||
[main]
|
||||
; set to 1 to change Jet addiction to be removed after the time expires
|
||||
JetWithdrawal=0
|
||||
|
||||
; total number of drugs in this file
|
||||
Count=0
|
||||
|
||||
; count starts from 1
|
||||
[1]
|
||||
; drug item PID
|
||||
PID=0
|
||||
; set a limit on the count of first and second delayed effects when using the drug, i.e. if the queue has delayed effects from the drug,
|
||||
; and their count is greater or equal to NumEffects, it is not possible to obtain new effects from using the drug
|
||||
; this count is 4 for Buffout/Mentats/Psycho/Jet
|
||||
; set -1 to leave this parameter unchanged
|
||||
NumEffects=-1
|
||||
; the duration of the addiction effect in game minutes (i.e. 1440 = 24 game hours)
|
||||
; set to 0 to use the default time (7 days for all drugs except Jet)
|
||||
AddictTime=0
|
||||
; the number of the global variable from vault13.gam responsible for displaying addiction in the character screen
|
||||
; set to 0 if the addiction is not required
|
||||
GvarID=0
|
||||
; the index number from editor.msg to display the title of the addiction (the description uses the index number of TextID + 100)
|
||||
TextID=-1
|
||||
; the line number (0-indexed) of the corresponding FRM in skilldex.lst
|
||||
FrmID=-1
|
||||
@@ -8,7 +8,7 @@
|
||||
; be used to remove their hardcoded effects, and add new stat/skill effects
|
||||
|
||||
;Name=The name of the perk (max 63 characters)
|
||||
;Desc=The description of the perk (max 1023 characters)
|
||||
;Desc=The description of the perk (max 255 characters)
|
||||
;Image=The line number (0-indexed) of the corresponding FRM in skilldex.lst
|
||||
;Ranks=The number of perk levels
|
||||
;Level=The minimum required level
|
||||
@@ -35,10 +35,18 @@
|
||||
|
||||
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
|
||||
|
||||
;This is a modification to perk 119
|
||||
[119]
|
||||
;You can add simple extra perks with ID numbers from 119 to 255
|
||||
; that do not require using scripting functions to change player stats, and can also be used for Armor perks
|
||||
;These parameters are only for extra perks
|
||||
;Stat1-Stat2 = same as Stat
|
||||
;Stat1Mag-Stat2Mag = same as StatMag
|
||||
;Skill3-Skill5 = The skill to be modified (or -1 for none)
|
||||
;Skill3Mod-Skill5Mod = The increased/decreased value to the modified skill
|
||||
|
||||
;This is a modification to vanilla perk 0
|
||||
[0]
|
||||
Name=Example
|
||||
Desc=This is an example perk~Second line
|
||||
Desc=This is an example perk description
|
||||
Image=72
|
||||
Ranks=1
|
||||
Level=1
|
||||
@@ -57,6 +65,39 @@ INT=0
|
||||
AGL=0
|
||||
LCK=0
|
||||
|
||||
;Example for creating extra perks
|
||||
[119]
|
||||
Name=Extra Perk
|
||||
Desc=This perk can change player stats and skills
|
||||
Image=72
|
||||
Ranks=1
|
||||
Level=2
|
||||
Type=0
|
||||
Stat=-1
|
||||
StatMag=0
|
||||
Skill1=-1
|
||||
Skill1Mag=0
|
||||
Skill2=-1
|
||||
Skill2Mag=0
|
||||
STR=0
|
||||
PER=0
|
||||
END=0
|
||||
CHR=0
|
||||
INT=0
|
||||
AGL=0
|
||||
LCK=0
|
||||
; for extra perks only
|
||||
Stat1=-1
|
||||
Stat1Mag=0
|
||||
Stat2=-1
|
||||
Stat2Mag=0
|
||||
Skill3=-1
|
||||
Skill3Mod=0
|
||||
Skill4=-1
|
||||
Skill4Mod=0
|
||||
Skill5=-1
|
||||
Skill5Mod=0
|
||||
|
||||
;This is a modification to trait 0
|
||||
[t0]
|
||||
NoHardcode=0
|
||||
|
||||
@@ -41,6 +41,7 @@ Mode=0
|
||||
|
||||
;Choose a notification box to display the name of the controlled critter above the interface bar
|
||||
;Must be between 5 and (4 + the value of BoxBarCount in ddraw.ini)
|
||||
;For sfall 4.1.6+ the number for the notification box is set automatically, so just use any value
|
||||
;Set to 0 to disable
|
||||
DisplayName=0
|
||||
|
||||
@@ -52,4 +53,5 @@ DisplayName=0
|
||||
;4 - dark yellow
|
||||
;5 - blue
|
||||
;6 - purple
|
||||
;7 - dull pink
|
||||
DisplayNameColor=0
|
||||
|
||||
+28
-11
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.1.5
|
||||
;v4.1.6
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -8,6 +8,14 @@ UseCommandLine=0
|
||||
;Uncomment and point to a file to get alternate translations for some sfall messages
|
||||
;TranslationsINI=./Translations.ini
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[ExtraPatches]
|
||||
;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game
|
||||
;The priority of read files will be higher than the files in patchXXX.dat. If DataLoadOrderPatch is enabled, the data load order will be:
|
||||
;master_patches > critter_patches > PatchFile99 - PatchFile0 > patchXXX.dat > ...
|
||||
;Paths to folders and Fallout .dat files are supported. The available range for PatchFile option names is from 0 to 99
|
||||
;PatchFile0=mods\RP_data
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Sound]
|
||||
;Sets the number of allowed simultaneous sound effects
|
||||
@@ -84,7 +92,7 @@ FadeMultiplier=100
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through the inventory, barter, and loot screens
|
||||
UseScrollWheel=1
|
||||
|
||||
;The mouse Z position is divided by this modifier to calculate the number of inventory
|
||||
@@ -158,7 +166,6 @@ DebugEditorKey=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Misc]
|
||||
|
||||
;Time limit in years. Must be between -3 and 13
|
||||
;Set to 0 if you want to die the instant you leave arroyo
|
||||
;Set to -1 to remove the time limit, and automatically reset the date back to 2241 each time you would have reached it
|
||||
@@ -200,11 +207,8 @@ WorldMapSlots=0
|
||||
UseFileSystemOverride=0
|
||||
|
||||
;To use a patch file other than patch000.dat, uncomment the next line and add your new file name
|
||||
;If you want to check for multiple patch files, you can include a %d in the file name (sprintf syntax)
|
||||
;By default, only the first patch file found will be used.
|
||||
;If you want to load multiple patch files (up to 1000) at once, uncomment the MultiPatches line and set it to 1
|
||||
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
|
||||
;PatchFile=patch%03d.dat
|
||||
;MultiPatches=0
|
||||
|
||||
;Set to 1 to use the modified data load order for the engine to find game data
|
||||
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
|
||||
@@ -348,6 +352,11 @@ PlayIdleAnimOnReload=0
|
||||
;Set to 1 to prevent corpses from blocking line of fire
|
||||
CorpseLineOfFireFix=0
|
||||
|
||||
;Changes the timer (in days) for deleting corpses on a map after you leave (valid range: 0..13)
|
||||
;The corpses of critters with 'Ages' flag or on maps with 'dead_bodies_age=No' set in maps.txt will not disappear
|
||||
;Default is 6. Set to 0 for a 12-hour timer
|
||||
CorpseDeleteTime=6
|
||||
|
||||
;Set a number of milliseconds to idle each input loop
|
||||
;Set to -1 to disable
|
||||
;Set to 0 to idle only if other processes are waiting for processor time
|
||||
@@ -479,17 +488,21 @@ NPCStage6Fix=0
|
||||
;2 - Restoring the -1 AP bonus for HtH attacks (i.e. Fallout 1 behaviour)
|
||||
FastShotFix=1
|
||||
|
||||
;Set to 1 to boost the maximum number of script names from 1450 to 10000
|
||||
BoostScriptDialogLimit=0
|
||||
|
||||
;Allows you to edit the skill tables
|
||||
;Point the next line at an ini file containing the replacement skill data
|
||||
;SkillsFile=Skills.ini
|
||||
|
||||
;Set to 1 to boost the maximum number of script names from 1450 to 10000
|
||||
BoostScriptDialogLimit=0
|
||||
|
||||
;To change the relationship between SPECIAL stats and derived stats, uncomment the next line
|
||||
;See the Stats.ini in the modders pack for an example file
|
||||
;DerivedStats=Stats.ini
|
||||
|
||||
;Allows you to change some parameters for drugs and their addictions
|
||||
;See the Drugs.ini in the modders pack for an example file
|
||||
;DrugsFile=Drugs.ini
|
||||
|
||||
;These options modify the checks to see if a critter can carry an additional item, changing which items are counted towards the weight limit and adding an additional size check
|
||||
;Set the mode to 0 to disable the size check, 1 to apply to the PC only, 2 to apply to the PC and party members, or 3 to apply to all critters
|
||||
;Only the PC uses CritterInvSizeLimit. Other critters will use the unused stat (STAT_unused = 10) or have the size limit of 100 if the stat is not set
|
||||
@@ -640,7 +653,7 @@ WorldMapFontPatch=0
|
||||
;Set to 1 to keep the selected attack mode when moving the weapon between active item slots
|
||||
KeepWeaponSelectMode=1
|
||||
|
||||
;Set to 1 to display full item description for weapon/ammo in barter screen
|
||||
;Set to 1 to display full item description for weapon/ammo in the barter screen
|
||||
FullItemDescInBarter=0
|
||||
|
||||
;Set to 1 to display experience points with the bonus from Swift Learner perk when gained from non-scripted situations
|
||||
@@ -663,6 +676,10 @@ SkipLoadingGameSettings=0
|
||||
;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows
|
||||
InterfaceDontMoveOnTop=0
|
||||
|
||||
;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
|
||||
;Set to -1 to disable the special death message when the global variable is set
|
||||
SpecialDeathGVAR=491
|
||||
|
||||
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||
CreditsAtBottom=0
|
||||
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,7 @@
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.0
|
||||
version 1.1
|
||||
|
||||
**/
|
||||
|
||||
@@ -67,7 +67,7 @@ procedure KeyPressHandler begin
|
||||
scanCode := get_sfall_arg,
|
||||
scanner, charges;
|
||||
|
||||
if scanCode == highlightKey and not(get_game_mode bwand INTFACELOOT) then begin
|
||||
if scanCode == highlightKey and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
if pressed then begin
|
||||
isHighlight := true;
|
||||
if motionScanner then begin
|
||||
@@ -106,7 +106,7 @@ procedure CombatTurnHandler begin
|
||||
end
|
||||
|
||||
procedure GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand INTFACELOOT) then begin
|
||||
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -96,7 +96,11 @@ procedure invenwield_handler begin
|
||||
if (critter and item and slot == INVEN_TYPE_WORN) then begin
|
||||
fid := check_armor_change(critter, item, isWorn);
|
||||
if (fid != -1) then begin
|
||||
if art_exists(fid) then begin
|
||||
art_change_fid_num(critter, fid);
|
||||
end else begin
|
||||
debug_msg("Error: NPC Armor mod: missing FID.");
|
||||
end
|
||||
end
|
||||
return;
|
||||
end
|
||||
@@ -118,7 +122,13 @@ procedure adjustfid_handler begin
|
||||
armor := critter_inven_obj(dude_obj, INVEN_TYPE_WORN);
|
||||
fid := check_armor_change(dude_obj, armor, armor != 0);
|
||||
if (fid != -1) then begin
|
||||
set_sfall_return(fid);
|
||||
variable weapAnim := get_sfall_arg bwand 0xF000;
|
||||
variable newFid := fid bwand 0xFFFF0FFF bwor weapAnim;
|
||||
if art_exists(newFid) then begin
|
||||
set_sfall_return(newFid);
|
||||
end else begin
|
||||
debug_msg("Error: NPC Armor mod: missing FID.");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.0
|
||||
version 1.1
|
||||
|
||||
*/
|
||||
|
||||
@@ -15,33 +15,52 @@
|
||||
#include "..\headers\command.h"
|
||||
#include "main.h"
|
||||
|
||||
#define OBJ_DATA_LIGHT_DISTANCE (0x6C)
|
||||
#define OBJ_DATA_LIGHT_INTENSITY (0x70)
|
||||
|
||||
variable
|
||||
configSection := "CombatControl",
|
||||
controlMode,
|
||||
noCheckArray,
|
||||
pidList,
|
||||
displayName,
|
||||
displayNameColor,
|
||||
maxBoxCount,
|
||||
lightInt, lightDist, npcControl,
|
||||
displayName, displayNameColor,
|
||||
inControl := false,
|
||||
hasGeckoSkinning := false;
|
||||
|
||||
|
||||
procedure AllowControl(variable pid) begin
|
||||
if (noCheckArray or scan_array(pidList, pid bwand 0xFFFFFF) != -1) and (party_member_obj(pid)) then return true;
|
||||
return false;
|
||||
end
|
||||
|
||||
procedure combatturn_handler begin
|
||||
variable
|
||||
status := get_sfall_arg,
|
||||
critter := get_sfall_arg,
|
||||
arg3 := get_sfall_arg,
|
||||
//arg3 := get_sfall_arg,
|
||||
pid;
|
||||
|
||||
//display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + ", arg3: " + arg3);
|
||||
if npcControl then begin
|
||||
if lightInt then lightInt := round((lightInt / 65536.0) * 100); // calc percent of intensity
|
||||
obj_set_light_level(npcControl, lightInt, lightDist); // restore/off light for NPC
|
||||
end
|
||||
|
||||
pid := obj_pid(critter);
|
||||
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
|
||||
if not(critter == real_dude_obj) then begin
|
||||
if (status == 1 and (AllowControl(pid) or controlMode == 1)) then begin
|
||||
set_dude_obj(critter);
|
||||
if (critter != real_dude_obj) then begin
|
||||
if not(npcControl) then obj_set_light_level(real_dude_obj, 0, 0); // dude off light
|
||||
npcControl := critter;
|
||||
lightDist := get_object_data(critter, OBJ_DATA_LIGHT_DISTANCE);
|
||||
lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY);
|
||||
obj_set_light_level(critter, 100, 4);
|
||||
|
||||
if hasGeckoSkinning then critter_add_trait(critter, TRAIT_PERK, PERK_gecko_skinning_perk, 1);
|
||||
inControl := true;
|
||||
end else if npcControl then begin
|
||||
obj_set_light_level(dude_obj, 100, 4); // set default light
|
||||
npcControl := 0;
|
||||
end
|
||||
if inControl then begin
|
||||
// center the screen on the controlled critter and remove roof tiles
|
||||
@@ -52,14 +71,26 @@ procedure combatturn_handler begin
|
||||
end
|
||||
end
|
||||
end else if inControl then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
if displayName then hide_iface_tag(displayName);
|
||||
if (status == -1 or AllowControl(pid) == false) then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
obj_set_light_level(dude_obj, 100, 4);
|
||||
npcControl := 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure gamemodechange_handler begin
|
||||
if has_trait(TRAIT_PERK, real_dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
|
||||
if not(get_game_mode BWAND COMBAT) then inControl := false;
|
||||
if not(hasGeckoSkinning) then hasGeckoSkinning := has_trait(TRAIT_PERK, real_dude_obj, PERK_gecko_skinning_perk);
|
||||
if (inControl and not(get_game_mode BWAND COMBAT)) then begin
|
||||
inControl := false;
|
||||
if (dude_obj != real_dude_obj) then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
obj_set_light_level(dude_obj, 100, 4);
|
||||
npcControl := 0;
|
||||
end
|
||||
move_to(dude_obj, dude_tile, dude_elevation);
|
||||
end
|
||||
end
|
||||
|
||||
procedure inventorymove_handler begin
|
||||
@@ -73,18 +104,33 @@ end
|
||||
|
||||
procedure start begin
|
||||
if (game_loaded and sfall_ver_major >= 4) then begin
|
||||
variable configSection := "CombatControl";
|
||||
|
||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
||||
|
||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||
if (controlMode > 2) then controlMode := 0;
|
||||
if (controlMode > 0) then begin
|
||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||
|
||||
if displayName then begin
|
||||
variable nameTag := add_iface_tag;
|
||||
debug_msg("NPC control - added new box: " + nameTag);
|
||||
if (nameTag <= 0) then begin // box added?
|
||||
variable maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount");
|
||||
if (maxBoxCount < 0) then maxBoxCount := 9;
|
||||
else maxBoxCount += 4;
|
||||
if (displayName < 5 or displayName > maxBoxCount) then displayName := 0;
|
||||
end else begin
|
||||
displayName := nameTag;
|
||||
end
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
end
|
||||
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
fix_array(pidList);
|
||||
maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount") + 4;
|
||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
if (maxBoxCount < 9) then maxBoxCount := 9;
|
||||
if (displayName < 5 or displayName > maxBoxCount) then displayName := 0;
|
||||
noCheckArray := (len_array(pidList) == 0);
|
||||
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, gamemodechange_handler);
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
variable ini := "sfall-mods.ini";
|
||||
variable translationIni;
|
||||
|
||||
// Gets the integer value from ddraw.ini
|
||||
// Gets the integer value from ini
|
||||
procedure GetConfig(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_setting(ini + "|" + section + "|" + key);
|
||||
if val == -1 then val := def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the string value from ddraw.ini
|
||||
// Gets the string value from ini
|
||||
procedure GetConfigStr(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
||||
if val == -1 or val == "" then val := def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the value from ddraw.ini as a temp array of strings
|
||||
// Gets the value from ini as a temp array of strings
|
||||
procedure GetConfigList(variable section, variable key) begin
|
||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
||||
if val == -1 or val == "" then return [];
|
||||
@@ -32,7 +32,7 @@ procedure GetConfigList(variable section, variable key) begin
|
||||
return string_split(val, ",");
|
||||
end
|
||||
|
||||
// Gets the value from ddraw.ini as a temp array of ints
|
||||
// Gets the value from ini as a temp array of ints
|
||||
procedure GetConfigListInt(variable section, variable key) begin
|
||||
variable arr, i, item;
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
#define RMOBJ_RM_MULT_OBJS 4563866
|
||||
#define RMOBJ_REPLACE_WEAPON 4658526
|
||||
#define RMOBJ_THROW 4266040
|
||||
#define RMOBJ_SUB_CONTAINER 4683191 // search and remove the item from a container inside of an inventory
|
||||
|
||||
// offsets for get_proto_data
|
||||
#define PROTO_PID (1)
|
||||
@@ -348,7 +349,7 @@
|
||||
#define OBJ_DATA_FID (0x20)
|
||||
#define OBJ_DATA_ELEVATION (0x28)
|
||||
#define OBJ_DATA_PID (0x64)
|
||||
#define OBJ_DATA_CID (0x68)
|
||||
#define OBJ_DATA_CID (0x68) // combat id, used for savegame
|
||||
#define OBJ_DATA_SID (0x78)
|
||||
// items
|
||||
#define OBJ_DATA_CUR_CHARGES (0x3C)
|
||||
|
||||
@@ -237,7 +237,8 @@
|
||||
#define party_member_list_critters party_member_list(0)
|
||||
#define party_member_list_all party_member_list(1)
|
||||
|
||||
|
||||
// sfall_funcX macros
|
||||
#define add_iface_tag sfall_func0("add_iface_tag")
|
||||
#define art_cache_clear sfall_func0("art_cache_clear")
|
||||
#define attack_is_aimed sfall_func0("attack_is_aimed")
|
||||
#define car_gas_amount sfall_func0("car_gas_amount")
|
||||
@@ -269,12 +270,14 @@
|
||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
||||
#define lock_is_jammed(obj) sfall_func1("lock_is_jammed", obj)
|
||||
#define loot_obj sfall_func0("loot_obj")
|
||||
#define npc_engine_level_up(toggle) sfall_func1("npc_engine_level_up", toggle)
|
||||
#define obj_under_cursor(crSwitch, inclDude) sfall_func2("obj_under_cursor", crSwitch, inclDude)
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
#define real_dude_obj sfall_func0("real_dude_obj")
|
||||
#define set_can_rest_on_map(map, elev, value) sfall_func3("set_can_rest_on_map", map, elev, value)
|
||||
#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex)
|
||||
#define set_cursor_mode(mode) sfall_func1("set_cursor_mode", mode)
|
||||
#define set_drugs_data(type, pid, value) sfall_func3("set_drugs_data", type, pid, value)
|
||||
#define set_dude_obj(critter) sfall_func1("set_dude_obj", critter)
|
||||
#define set_flags(obj, flags) sfall_func2("set_flags", obj, flags)
|
||||
#define set_iface_tag_text(tag, text, color) sfall_func3("set_iface_tag_text", tag, text, color)
|
||||
|
||||
@@ -242,12 +242,13 @@ int ret1 - overrides hard-coded handler and selects what should happen with
|
||||
|
||||
HOOK_REMOVEINVENOBJ (hs_removeinvenobj.int)
|
||||
|
||||
Runs when an object is removed from a critters inventory for any reason
|
||||
Runs when an object is removed from a container or critter's inventory for any reason
|
||||
|
||||
critter arg1 - the critter the object is being removed from
|
||||
Obj arg1 - the owner that the object is being removed from
|
||||
item arg2 - the item that is being removed
|
||||
int arg3 - a flag, or possibly the number of items to remove
|
||||
int arg4 - The reason the object is being removed. (Actually, the site from which _item_remove_mult was called)
|
||||
int arg3 - the number of items to remove
|
||||
int arg4 - The reason the object is being removed (see RMOBJ_* constants)
|
||||
Obj arg5 - The destination object when the item is moved to another object, otherwise 0
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ The get/set_sfall_global functions require an 8 characters long case sensitive s
|
||||
|
||||
set_pickpocket_max and set_hit_chance_max effect all critters rather than just the player. set_skill_max can't be used to increase the skill cap above 300. set_perk_level_mod sets a modifier between +25 and -25 that is added/subtracted from the players level for the purposes of deciding which perks can be chosen.
|
||||
|
||||
set_fake_trait and set_fake_perk can be used to add additional traits and perks to the character screen. They will be saved correctly when the player saves and reloads games, but by themselves they will have no further effect on the character. For perks, the allowed range for levels is between 0 and 100; setting the level to 0 removes that perk. For traits, the level must be 0 or 1. The image is a numeric id that corresponds to an entry in skilldex.lst. The name is limited to 64 characters and the description to 1024 characters by sfall, but internal Fallout limits may be lower.
|
||||
set_fake_trait and set_fake_perk can be used to add additional traits and perks to the character screen. They will be saved correctly when the player saves and reloads games, but by themselves they will have no further effect on the character. For perks, the allowed range for levels is between 0 and 100; setting the level to 0 removes that perk. For traits, the level must be 0 or 1. The image is a numeric id that corresponds to an entry in skilldex.lst. The name is limited to 63 characters and the description to 255 characters by sfall, but internal Fallout limits may be lower.
|
||||
|
||||
has_fake_trait and has_fake_perk return the number of levels the player has of the perks/traits with the given name.
|
||||
has_fake_trait and has_fake_perk return the number of levels the player has of the perks/traits with the given name or ID of extra perk.
|
||||
|
||||
perk_add_mode, set_selectable_perk, set_perkbox_title, hide_real_perks, show_real_perks and clear_selectable_perks control the behaviour of the select a perk box. set_selectable_perk can be used to add additional items by setting the 'active' parameter to 1, and to remove them again by setting it to 0. set_perkbox_title can be used to change the title of the box, or by using "" it will be set back to the default. hide and show_real_perks can be used to prevent the dialog from displaying any of the original 119 perks. perk_add_mode modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the players traits, if bit 2 is set it is added to the players perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. clear_selectable_perks restores the dialog to its default state.
|
||||
|
||||
@@ -100,11 +100,12 @@ array - array ID to be used with array-related functions (actually an integer)
|
||||
> int game_loaded()
|
||||
- returns 1 the first time it is called after a new game or game load, and 0 any time after. It works on an individual basis for each script, so one script wont interfere with others. Its primary use is for global scripts, so that they know when to call set_global_script_repeat, but it can be called from normal scripts too.
|
||||
|
||||
> void inc_npc_level(string npc)
|
||||
- takes an NPC name as an argument. The NPC must be in your party. This function ignores player level requirements and the minimum 3 player level delay between NPC level gains. It also ignores the random element, regardless of sfall's NPCAutoLevel setting.
|
||||
> void inc_npc_level(int pid/string name)
|
||||
- takes a party member PID or an NPC name (deprecated, for compatibility with sfall 4.1.5/3.8.15 or earlier) as an argument. The NPC must be in your party.
|
||||
- This function ignores player level requirements and the minimum 3 player level delay between NPC level gains. It also ignores the random element, regardless of sfall's NPCAutoLevel setting.
|
||||
|
||||
> int get_npc_level(string npc)
|
||||
- also takes the NPC name as an argument, and returns the NPC's current level. Again, the NPC needs to be in your party.
|
||||
> int get_npc_level(int pid/string name)
|
||||
- also takes the party member PID or NPC name (deprecated, for compatibility with sfall 4.1.5/3.8.15 or earlier) as an argument, and returns the NPC's current level. Again, the NPC needs to be in your party.
|
||||
|
||||
> void set_car_current_town(int town)
|
||||
- changes the current town index for the player's car
|
||||
@@ -498,9 +499,13 @@ Some utility/math functions are available:
|
||||
|
||||
> void sfall_func3("set_iface_tag_text", int tag, string text, int color)
|
||||
- sets the text messages and colors for custom notification boxes to the interface without the need to add messages to intrface.msg and set up the font colors in ddraw.ini
|
||||
- tag value is the same as used in show_iface_tag, hide_iface_tag, and is_iface_tag_active. The valid range is from 5 to (4 + the value of BoxBarCount in ddraw.ini)
|
||||
- tag value is the same as used in show_iface_tag, hide_iface_tag, and is_iface_tag_active. The valid range is from 5 to (4 + the value of BoxBarCount in ddraw.ini) or the number of the last custom box added using the add_ifaca_tag function
|
||||
- The text is limited to 19 characters
|
||||
- available colors: 0 - green, 1 - red, 2 - white, 3 - yellow, 4 - dark yellow, 5 - blue, 6 - purple
|
||||
- available colors: 0 - green, 1 - red, 2 - white, 3 - yellow, 4 - dark yellow, 5 - blue, 6 - purple, 7 - dull pink
|
||||
|
||||
> int sfall_func0("add_iface_tag")
|
||||
- adds one custom box to the current boxes, and returns the number of the added tag (-1 if the tags limit is exceeded)
|
||||
- The maximum number of boxes is limited to 126 tags
|
||||
|
||||
> void sfall_func1("inventory_redraw", int invSide)
|
||||
- redraws inventory list in the inventory/use inventory item on/loot/barter screens
|
||||
@@ -564,6 +569,15 @@ Some utility/math functions are available:
|
||||
> void sfall_func0("art_cache_clear")
|
||||
- clears the cache of FRM image files loaded into memory
|
||||
|
||||
> void sfall_func1("npc_engine_level_up", bool toggle)
|
||||
- enables/disables the engine function that increases the level of party members in the player leveling process
|
||||
- if the engine function is disabled, the process of leveling up party members should be performed by script functions
|
||||
|
||||
> void sfall_func3("set_drugs_data", int type, int pid, int value)
|
||||
- overrides the parameters of drugs set in the configuration file (DrugsFile setting in ddraw.ini)
|
||||
- type: 0 - changes the value of NumEffects for the drug (see Drugs.ini for the description of NumEffects)
|
||||
1 - changes the duration of the addiction effect for the drug (a value of 1 = one game minute)
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
0x81a3 - int eax_available()
|
||||
0x81a4 - void set_eax_environment(int environment)
|
||||
|
||||
0x81a5 - void inc_npc_level(string npc)
|
||||
0x8241 - int get_npc_level(string npc)
|
||||
0x81a5 - void inc_npc_level(int pid/string name)
|
||||
0x8241 - int get_npc_level(int pid/string name)
|
||||
|
||||
0x81a6 - int get_viewport_x()
|
||||
0x81a7 - int get_viewport_y()
|
||||
@@ -185,7 +185,7 @@
|
||||
0x81be - void set_perkbox_title(string title)
|
||||
0x81bf - void hide_real_perks()
|
||||
0x81c0 - void show_real_perks()
|
||||
0x81c1 - int has_fake_perk(string name)
|
||||
0x81c1 - int has_fake_perk(string name/int extraPerkID)
|
||||
0x81c2 - int has_fake_trait(string name)
|
||||
0x81c3 - void perk_add_mode(int type)
|
||||
0x81c4 - void clear_selectable_perks()
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <cassert>
|
||||
|
||||
#include "Functions.h"
|
||||
#include "FunctionOffsets.h"
|
||||
#include "Structs.h"
|
||||
#include "Variables.h"
|
||||
#include "VariableOffsets.h"
|
||||
@@ -107,20 +108,41 @@ bool HeroIsFemale() {
|
||||
return (fo::func::stat_level(fo::var::obj_dude, fo::Stat::STAT_gender) == fo::Gender::GENDER_FEMALE);
|
||||
}
|
||||
|
||||
long CheckAddictByPid(fo::GameObject* critter, long pid) {
|
||||
__asm {
|
||||
mov eax, pid;
|
||||
mov esi, critter;
|
||||
call fo::funcoffs::item_d_check_addict_;
|
||||
}
|
||||
/* keyword 'return' is not needed, the compiler will do everything correctly */
|
||||
}
|
||||
|
||||
void ToggleNpcFlag(fo::GameObject* npc, long flag, bool set) {
|
||||
Proto* protoPtr;
|
||||
if (fo::func::proto_ptr(npc->protoId, &protoPtr) != -1) {
|
||||
long bit = (1 << flag);
|
||||
if (set) {
|
||||
protoPtr->critter.critterFlags |= bit;
|
||||
} else {
|
||||
protoPtr->critter.critterFlags &= ~bit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
//print text to surface
|
||||
void PrintText(char *DisplayText, BYTE ColourIndex, DWORD Xpos, DWORD Ypos, DWORD TxtWidth, DWORD ToWidth, BYTE *ToSurface) {
|
||||
DWORD posOffset = Ypos * ToWidth + Xpos;
|
||||
__asm {
|
||||
xor eax, eax
|
||||
mov al, ColourIndex
|
||||
push eax
|
||||
mov edx, DisplayText
|
||||
mov ebx, TxtWidth
|
||||
mov ecx, ToWidth
|
||||
mov eax, ToSurface
|
||||
add eax, posOffset
|
||||
call dword ptr ds:[FO_VAR_text_to_buf]
|
||||
xor eax, eax;
|
||||
mov al, ColourIndex;
|
||||
push eax;
|
||||
mov edx, DisplayText;
|
||||
mov ebx, TxtWidth;
|
||||
mov ecx, ToWidth;
|
||||
mov eax, ToSurface;
|
||||
add eax, posOffset;
|
||||
call dword ptr ds:[FO_VAR_text_to_buf];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,8 +151,8 @@ void PrintText(char *DisplayText, BYTE ColourIndex, DWORD Xpos, DWORD Ypos, DWOR
|
||||
DWORD GetTextHeight() {
|
||||
DWORD TxtHeight;
|
||||
__asm {
|
||||
call dword ptr ds:[FO_VAR_text_height] //get text height
|
||||
mov TxtHeight, eax
|
||||
call dword ptr ds:[FO_VAR_text_height]; //get text height
|
||||
mov TxtHeight, eax;
|
||||
}
|
||||
return TxtHeight;
|
||||
}
|
||||
@@ -140,9 +162,9 @@ DWORD GetTextHeight() {
|
||||
DWORD GetTextWidth(char *TextMsg) {
|
||||
DWORD TxtWidth;
|
||||
__asm {
|
||||
mov eax, TextMsg
|
||||
call dword ptr ds:[FO_VAR_text_width] //get text width
|
||||
mov TxtWidth, eax
|
||||
mov eax, TextMsg;
|
||||
call dword ptr ds:[FO_VAR_text_width]; //get text width
|
||||
mov TxtWidth, eax;
|
||||
}
|
||||
return TxtWidth;
|
||||
}
|
||||
@@ -152,9 +174,9 @@ DWORD GetTextWidth(char *TextMsg) {
|
||||
DWORD GetCharWidth(char CharVal) {
|
||||
DWORD charWidth;
|
||||
__asm {
|
||||
mov al, CharVal
|
||||
call dword ptr ds:[FO_VAR_text_char_width]
|
||||
mov charWidth, eax
|
||||
mov al, CharVal;
|
||||
call dword ptr ds:[FO_VAR_text_char_width];
|
||||
mov charWidth, eax;
|
||||
}
|
||||
return charWidth;
|
||||
}
|
||||
@@ -164,9 +186,9 @@ DWORD GetCharWidth(char CharVal) {
|
||||
DWORD GetMaxTextWidth(char *TextMsg) {
|
||||
DWORD msgWidth;
|
||||
__asm {
|
||||
mov eax, TextMsg
|
||||
call dword ptr ds:[FO_VAR_text_mono_width]
|
||||
mov msgWidth, eax
|
||||
mov eax, TextMsg;
|
||||
call dword ptr ds:[FO_VAR_text_mono_width];
|
||||
mov msgWidth, eax;
|
||||
}
|
||||
return msgWidth;
|
||||
}
|
||||
@@ -176,8 +198,8 @@ DWORD GetMaxTextWidth(char *TextMsg) {
|
||||
DWORD GetCharGapWidth() {
|
||||
DWORD gapWidth;
|
||||
__asm {
|
||||
call dword ptr ds:[FO_VAR_text_spacing]
|
||||
mov gapWidth, eax
|
||||
call dword ptr ds:[FO_VAR_text_spacing];
|
||||
mov gapWidth, eax;
|
||||
}
|
||||
return gapWidth;
|
||||
}
|
||||
@@ -187,8 +209,8 @@ DWORD GetCharGapWidth() {
|
||||
DWORD GetMaxCharWidth() {
|
||||
DWORD charWidth = 0;
|
||||
__asm {
|
||||
call dword ptr ds:[FO_VAR_text_max]
|
||||
mov charWidth, eax
|
||||
call dword ptr ds:[FO_VAR_text_max];
|
||||
mov charWidth, eax;
|
||||
}
|
||||
return charWidth;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,10 @@ GameObject* GetActiveItem();
|
||||
|
||||
bool HeroIsFemale();
|
||||
|
||||
long CheckAddictByPid(fo::GameObject* critter, long pid);
|
||||
|
||||
void ToggleNpcFlag(fo::GameObject* npc, long flag, bool set);
|
||||
|
||||
// Print text to surface
|
||||
void PrintText(char *displayText, BYTE colorIndex, DWORD x, DWORD y, DWORD textWidth, DWORD destWidth, BYTE *surface);
|
||||
// gets the height of the currently selected font
|
||||
|
||||
@@ -231,6 +231,7 @@ enum ProtoId : long
|
||||
PID_STIMPAK = 40,
|
||||
PID_BOTTLE_CAPS = 41,
|
||||
PID_FIRST_AID_KIT = 47,
|
||||
PID_RADAWAY = 48,
|
||||
PID_ANTIDOTE = 49,
|
||||
PID_DYNAMITE = 51,
|
||||
PID_GEIGER_COUNTER = 52,
|
||||
@@ -253,6 +254,8 @@ enum ProtoId : long
|
||||
PID_NUKA_COLA = 106,
|
||||
PID_RAD_X = 109,
|
||||
PID_PSYCHO = 110,
|
||||
PID_BEER = 124,
|
||||
PID_BOOZE = 125,
|
||||
PID_SUPER_STIMPAK = 144,
|
||||
PID_ACTIVE_FLARE = 205,
|
||||
PID_ACTIVE_DYNAMITE = 206,
|
||||
@@ -264,9 +267,11 @@ enum ProtoId : long
|
||||
PID_CHEMISTRY_MANUAL = 237,
|
||||
PID_JET = 259,
|
||||
PID_JET_ANTIDOTE = 260,
|
||||
PID_DECK_OF_TRAGIC_CARDS = 306,
|
||||
PID_GECK = 366,
|
||||
PID_CAR_TRUNK = 455,
|
||||
PID_JESSE_CONTAINER = 467,
|
||||
|
||||
PID_Player = 16777216,
|
||||
PID_DRIVABLE_CAR = 33555441
|
||||
};
|
||||
@@ -620,6 +625,22 @@ enum AttackType : long
|
||||
ATKTYPE_PIERCINGKICK = 19
|
||||
};
|
||||
|
||||
enum AttackSubType : long
|
||||
{
|
||||
NONE = 0,
|
||||
UNARMED = 1,
|
||||
MELEE = 2,
|
||||
THROWING = 3,
|
||||
GUNS = 4
|
||||
};
|
||||
|
||||
enum BodyType : long
|
||||
{
|
||||
Biped = 0,
|
||||
Quadruped = 1,
|
||||
Robotic = 2
|
||||
};
|
||||
|
||||
#define OBJFLAG_CAN_WEAR_ITEMS (0xf000000)
|
||||
|
||||
#define OBJFLAG_HELD_IN_RIGHT (0x10000)
|
||||
|
||||
@@ -160,6 +160,10 @@ long __stdcall db_get_file_list(const char* searchMask, char* * *fileList) {
|
||||
WRAP_WATCOM_CALL2(db_get_file_list_, searchMask, fileList)
|
||||
}
|
||||
|
||||
long __stdcall db_init(const char* path_dat, const char* path_patches) {
|
||||
WRAP_WATCOM_CALL3(db_init_, path_dat, 0, path_patches)
|
||||
}
|
||||
|
||||
// Check fallout paths for file
|
||||
long __stdcall CheckFile(char *fileName, DWORD *sizeOut) {
|
||||
WRAP_WATCOM_CALL2(db_dir_entry_, fileName, sizeOut)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user