mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a196160258 | ||
|
|
55a97a5793 | ||
|
|
3eaa64ee16 | ||
|
|
aa9257ab1c | ||
|
|
81a8fd4863 | ||
|
|
ed260ad7e5 | ||
|
|
9dce3c8d62 | ||
|
|
f28a179c78 | ||
|
|
540abbe273 | ||
|
|
8dda3940d0 | ||
|
|
44b9b24490 | ||
|
|
dafbc357b2 | ||
|
|
02572a5193 | ||
|
|
cab19b5ca0 | ||
|
|
d6952a0c93 | ||
|
|
b996867d65 | ||
|
|
bd18c240f9 | ||
|
|
2ad28e3086 | ||
|
|
ef5ff4e90f | ||
|
|
0a672c1e10 | ||
|
|
01214633f4 | ||
|
|
334e98c4c1 | ||
|
|
78a29ad556 | ||
|
|
e5d14ff845 | ||
|
|
716bfd4156 | ||
|
|
9b67db7208 | ||
|
|
e92ded34e4 | ||
|
|
1689542165 | ||
|
|
2c86201db9 | ||
|
|
d7c9acf713 | ||
|
|
399da0d322 | ||
|
|
774adaa3b0 | ||
|
|
b4d174d91b | ||
|
|
3291f6fe17 | ||
|
|
84f442ca08 | ||
|
|
f5c35eb639 | ||
|
|
514894ed59 | ||
|
|
204810d067 | ||
|
|
ec4ba13a28 | ||
|
|
14a6ef7fc6 | ||
|
|
c3a74070ca | ||
|
|
302fd4bb51 | ||
|
|
c7520c71cf | ||
|
|
45632d6887 | ||
|
|
866c9165c0 | ||
|
|
813abbf452 | ||
|
|
c6864e01f6 | ||
|
|
0eab48932a | ||
|
|
6c3efc5b84 | ||
|
|
cb8d7dc94a |
@@ -1,5 +1,5 @@
|
||||
[sfall]
|
||||
SaveInCombat=Cannot save at this time
|
||||
SaveInCombat=Cannot save at this time.
|
||||
KarmaGain=You gained %d karma.
|
||||
KarmaLoss=You lost %d karma.
|
||||
HighlightFail1=You aren't carrying a motion sensor.
|
||||
@@ -11,4 +11,4 @@ SaveSfallDataFail=ERROR saving extended savegame information! Check if other pro
|
||||
[AppearanceMod]
|
||||
RaceText=Race
|
||||
StyleText=Style
|
||||
MainButtonText=Appearance
|
||||
MainButtonText=Appearance
|
||||
|
||||
+35
-11
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v3.8.6
|
||||
;v3.8.11
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -72,7 +72,7 @@ Use32BitHeadGraphics=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through your inventory
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
||||
UseScrollWheel=1
|
||||
|
||||
;The mouse Z position is divided by this modifier to calculate the number of inventory
|
||||
@@ -107,7 +107,7 @@ SpeedModKey=-1
|
||||
|
||||
;A key to press to toggle the speed tweak on or off
|
||||
;Specify 0 if you don't want a toggle key, or a DX scancode otherwise
|
||||
SpeedToggleKey=0x00
|
||||
SpeedToggleKey=0
|
||||
|
||||
;The keys corresponding to the 10 speed slots
|
||||
;Set to 0 to disable a slot, otherwise specify the DX scancode of the key you want to use
|
||||
@@ -128,6 +128,7 @@ SpeedKey9=0x00
|
||||
WindowScrollKey=0
|
||||
|
||||
;A key to press to toggle the highlighting of all items on the ground on the current map
|
||||
;Set to 0 if you don't want a toggle key, or a DX scancode otherwise
|
||||
ToggleItemHighlightsKey=42
|
||||
|
||||
;Set to 1 to also highlight containers
|
||||
@@ -144,9 +145,15 @@ HighlightContainers=0
|
||||
OutlineColor=0x10
|
||||
|
||||
;A key to press to reload your currently equipped weapon
|
||||
;Set to 0 if you don't want a reload key, or a DX scancode otherwise
|
||||
ReloadWeaponKey=0
|
||||
|
||||
;A key to press to open a debug game editor
|
||||
;A key to hold down to let you move/drop a whole stack of items at once without the 'Move Items' window
|
||||
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
|
||||
ItemFastMoveKey=0x1d
|
||||
|
||||
;A key to press to open a debug game editor (requires FalloutClient.exe from the modders pack)
|
||||
;Set to 0 to disable, or a DX scancode otherwise
|
||||
DebugEditorKey=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
@@ -180,7 +187,7 @@ WorldMapEncounterRate=5
|
||||
|
||||
;The number of slots available in the locations list panel of the world map
|
||||
;Set to 0 to leave unchanged. 17 is default.
|
||||
;Setting this greater than 17 requires a replacement background frm, or you'll get glitched graphics
|
||||
;Setting this greater than 17 requires a replacement background FRM, or you'll get glitched graphics
|
||||
WorldMapSlots=0
|
||||
|
||||
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
|
||||
@@ -200,7 +207,7 @@ WorldMapSlots=0
|
||||
;PatchFile=patch%03d.dat
|
||||
;MultiPatches=0
|
||||
|
||||
;Set to 1 to enable the modified data load order for the engine to find game data
|
||||
;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
|
||||
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
DataLoadOrderPatch=0
|
||||
@@ -304,7 +311,7 @@ SaveInCombatFix=1
|
||||
;Player's level is capped once the highest specified level is reached
|
||||
;XPTable=50,100,200
|
||||
|
||||
;Set to 1 to enable additional weapon animations codes from o-t
|
||||
;Set to 1 to enable additional weapon animation codes from o-t
|
||||
;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10
|
||||
;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corrisponds to 's' and 15 to 't'
|
||||
AdditionalWeaponAnims=1
|
||||
@@ -355,12 +362,19 @@ SkipOpeningMovies=0
|
||||
;Set to 0 to disable
|
||||
NPCsTryToSpendExtraAP=0
|
||||
|
||||
;Set to 1 to fix NPCs not checking weapon perks properly when searching for the best weapon
|
||||
;Note that enabling this option can significantly affect the weapon choice of some NPCs in combat
|
||||
AIBestWeaponFix=0
|
||||
|
||||
;Allows the use of tiles over 80*36 in size. sfall will just split and resave them at startup
|
||||
;Set to 1 to check all tiles on started (slow)
|
||||
;Set to 2 if you provide a XLtiles.lst file in art/tiles/ containing a list of the tile ids that need checking
|
||||
AllowLargeTiles=0
|
||||
|
||||
;Change the Skilldex cursor frm numbers
|
||||
;Set to 1 to boost the maximum number of tile FRMs from 4096 to 16383
|
||||
MoreTiles=0
|
||||
|
||||
;Change the Skilldex cursor FRM numbers
|
||||
;Default is 293 for all skills
|
||||
Lockpick=293
|
||||
Steal=293
|
||||
@@ -373,7 +387,7 @@ Repair=293
|
||||
;Remove window position rounding
|
||||
RemoveWindowRounding=0
|
||||
|
||||
;Set to 1 to add scroll buttons to the pip boy quest list, and remove the quests per area limit
|
||||
;Set to 1 to add scroll buttons to the pipboy quest list, and remove the quests per area limit
|
||||
UseScrollingQuestsList=1
|
||||
|
||||
;Uncomment these lines to control the premade characters offered when starting a new game
|
||||
@@ -382,7 +396,7 @@ UseScrollingQuestsList=1
|
||||
;PremadeFIDs=201,203,202
|
||||
|
||||
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
||||
;Syntax is 'city id : global id', with each city/global pair separated by a comma.
|
||||
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
|
||||
;CityRepsCount=19
|
||||
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
|
||||
|
||||
@@ -396,7 +410,7 @@ ExtraSaveSlots=0
|
||||
;Set to 2 to update the HP/AC counters instantly
|
||||
SpeedInterfaceCounterAnims=0
|
||||
|
||||
;These lines allow you to control the karma frm's displayed on the character screen
|
||||
;These lines allow you to control the karma FRMs displayed on the character screen
|
||||
;Number of KarmaPoints should be 1 less than number of KarmaFRMs
|
||||
;KarmaFRMsCount=3
|
||||
;KarmaFRMs=47,48,49
|
||||
@@ -419,6 +433,9 @@ BonusHtHDamageFix=1
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
DisplayBonusDamage=0
|
||||
|
||||
;Set to 1 to display the range of the second attack mode in the inventory when you switch weapon modes in active item slots
|
||||
DisplaySecondWeaponRange=1
|
||||
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||
AnimationsAtOnceLimit=120
|
||||
|
||||
@@ -550,6 +567,9 @@ StackEmptyWeapons=0
|
||||
;If the amount of ammo boxes in the inventory is less than or equal to the reserve, only one box will be used
|
||||
ReloadReserve=-1
|
||||
|
||||
;Set to 1 to change the counter in the 'Move Items' window to start at the maximum number of items
|
||||
ItemCounterDefaultMax=0
|
||||
|
||||
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
|
||||
DialogOptions9Lines=1
|
||||
|
||||
@@ -563,6 +583,7 @@ DontTurnOffSneakIfYouRun=0
|
||||
CanSellUsedGeiger=1
|
||||
|
||||
;Set to 1 to fix the issue with being able to charge the car by using cells on other scenary/critters
|
||||
;Set to 0 if another mod you're using has custom vehicles
|
||||
CarChargingFix=1
|
||||
|
||||
;Set to 1 to skip weapon equip/unequip animations when performing various actions
|
||||
@@ -575,6 +596,9 @@ InstantWeaponEquip=0
|
||||
;Set to 1 to display numbered dialogue options
|
||||
NumbersInDialogue=0
|
||||
|
||||
;Set to 1 to use Fallout's normal text font instead of DOS-like font on the world map
|
||||
WorldMapFontPatch=0
|
||||
|
||||
;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.
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
Requires sfall 3.7b or higher
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start;
|
||||
procedure map_enter_p_proc;
|
||||
procedure set_door_flag(variable state);
|
||||
procedure combatturn_handler;
|
||||
|
||||
#define PORTAL (0)
|
||||
#define DOOR_FLAGS (0x24)
|
||||
|
||||
variable only_once := 0;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major >= 4) then
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
else
|
||||
set_global_script_repeat(60);
|
||||
call map_enter_p_proc;
|
||||
end else begin
|
||||
if (only_once == 1 and combat_is_initialized) then begin
|
||||
only_once := 2;
|
||||
call set_door_flag(false);
|
||||
end else if (only_once == 2 and not(combat_is_initialized)) then begin
|
||||
only_once := 1;
|
||||
if (sfall_ver_major >= 4) then
|
||||
set_global_script_repeat(0);
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure map_enter_p_proc begin
|
||||
only_once := 1;
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
|
||||
procedure set_door_flag(variable state) begin
|
||||
variable objectMap, obj, objPid, arrayPid, i;
|
||||
|
||||
objectMap := list_as_array(LIST_SCENERY);
|
||||
arrayPid := temp_array(1, 0);
|
||||
|
||||
foreach (obj in objectMap) begin
|
||||
objPid := obj_pid(obj);
|
||||
|
||||
if (proto_data(objPid, sc_type) != PORTAL) or is_in_array(objPid, arrayPid) then
|
||||
continue;
|
||||
|
||||
arrayPid[i] := objPid;
|
||||
i++;
|
||||
resize_array(arrayPid, i + 1);
|
||||
set_proto_data(objPid, DOOR_FLAGS, state);
|
||||
end
|
||||
end
|
||||
|
||||
procedure combatturn_handler begin
|
||||
if (only_once == 1) then
|
||||
set_global_script_repeat(60);
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
|
||||
Requires sfall 3.7b or higher.
|
||||
|
||||
To use, copy gl_autodoors.int to your scripts folder.
|
||||
@@ -3,13 +3,23 @@ This folder contains documentation about sfall scripting extensions.
|
||||
headers\ - folder contains sfall headers that you should #include in your scripts
|
||||
sfall.h - main sfall header, always include it
|
||||
define_extra.h - some additional preprocessor constants for vanilla engine stuff (proto offsets, etc.)
|
||||
dik.h - DX scancodes constants for use with key_pressed function and HOOK_KEYPRESS
|
||||
|
||||
define_lite.h - a lite version of official define.h
|
||||
dik.h - DX scancodes constants for use with key_pressed function and HOOK_KEYPRESS
|
||||
lib.arrays.h - procedures that will help you use arrays in their full:
|
||||
- use them as stacks, sets
|
||||
- easily compare, copy, slice, cut, add arrays
|
||||
- display array contents (for debugging)
|
||||
- save/load two-dimensional arrays to savegame in one command (e.g. arrays of objects)
|
||||
lib.inven.h - fallout items manipulation functions
|
||||
lib.math.h - a few simple functions for calculations
|
||||
lib.strings.h - search in strings, join, repeat, etc.
|
||||
lib.misc.h - misc stuff
|
||||
|
||||
sfall function notes.txt - incomplete reference for new opcodes
|
||||
sfall opcode list.txt - list of all sfall opcodes (w/o descriptions)
|
||||
hookscripts.txt - detailed manual for using hook scripts to modify engine behavior
|
||||
arrays.txt - manual for sfall arrays
|
||||
|
||||
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in ScriptEditor\docs\sslc_readme.txt,
|
||||
|
||||
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in ScriptEditor\docs\sslc_readme.txt,
|
||||
there are numerious new syntax features and extensions to SSL (Star-Trek Scripting language).
|
||||
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
#define PROTO_WP_ANIM (36)
|
||||
#define PROTO_WP_DMG_MIN (40)
|
||||
#define PROTO_WP_DMG_MAX (44)
|
||||
#define PROTO_WP_DMG_TYPE (48)
|
||||
#define PROTO_WP_RANGE_1 (52)
|
||||
#define PROTO_WP_RANGE_2 (56)
|
||||
#define PROTO_WP_PROJ_PID (60)
|
||||
|
||||
@@ -26,15 +26,14 @@ end
|
||||
return intp;
|
||||
end*/
|
||||
|
||||
procedure ceil(variable val) begin
|
||||
/*procedure ceil(variable val) begin
|
||||
variable intp;
|
||||
intp := floor(val);
|
||||
if (abs(val-intp) > 0.0) then begin
|
||||
intp++;
|
||||
end
|
||||
return intp;
|
||||
end
|
||||
|
||||
end*/
|
||||
|
||||
procedure cap_number(variable num, variable min, variable max) begin
|
||||
if (num > max) then num := max;
|
||||
|
||||
@@ -191,8 +191,10 @@
|
||||
|
||||
#define critter_inven_obj2(obj, type) sfall_func2("critter_inven_obj2", obj, type)
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
#define floor2(value) sfall_func1("floor2", value)
|
||||
#define intface_hide sfall_func0("intface_hide")
|
||||
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
||||
#define intface_redraw sfall_func0("intface_redraw")
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define set_ini_setting(setting, value) sfall_func2("set_ini_setting", setting, value)
|
||||
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
||||
|
||||
@@ -30,7 +30,7 @@ end
|
||||
There are script functions available, specific to hook scripts:
|
||||
|
||||
> int init_hook()
|
||||
The hook script equivilent of game_loaded; it returns 2 when the script is first loaded, 1 when the player reloads and 0 otherwise.
|
||||
The hook script equivalent of game_loaded; it returns 2 when the script is first loaded, 1 when the player reloads and 0 otherwise.
|
||||
|
||||
> mixed get_sfall_arg()
|
||||
Gets the next argument from sfall. Each time it's called it returns the next argument, or otherwise it returns 0 if there are no more arguments left.
|
||||
@@ -42,10 +42,10 @@ Returns all hook arguments as a new temp array.
|
||||
Used to return the new values from the script. Each time it's called it sets the next value, or if you've already set all return values it does nothing.
|
||||
|
||||
> void set_sfall_arg(int argnum, int value)
|
||||
Changes argument value. The argument number (argnum) is 0-indexed. This is usefull if you have several hook scripts attached to one hook point (see below).
|
||||
Changes argument value. The argument number (argnum) is 0-indexed. This is useful if you have several hook scripts attached to one hook point (see below).
|
||||
|
||||
> void register_hook(int hooktype)
|
||||
Used from a normal global script if you want to run it at the same point a full hook script would normally run. In case of this function, "start" proc will be execuded in a current global script. You can use all above functions like normal.
|
||||
Used from a normal global script if you want to run it at the same point a full hook script would normally run. In case of this function, "start" proc will be executed in a current global script. You can use all above functions like normal.
|
||||
|
||||
> void register_hook_proc(int hooktype, proc procedure)
|
||||
The same as register_hook, except that you specifically define which procedure in the current script should be called as a hook (instead of "start"). Pass procedure the same as how you use dialog option functions. This IS the recommended way to use hook scripts, as it gives both modularity (each mod logic in a separate global script, no conflicts if you don't use "hs_*.int" scripts) and flexibility (you can place all related hook scripts for specific mod in a single script!).
|
||||
@@ -77,7 +77,7 @@ The defines to use for the hooktype are in sfall.h.
|
||||
|
||||
HOOK_TOHIT (hs_tohit.int)
|
||||
|
||||
Runs when fallout is calculating the chances of an attack striking a target
|
||||
Runs when Fallout is calculating the chances of an attack striking a target
|
||||
Runs after the hit chance is fully calculated normally, including applying the 95% cap
|
||||
|
||||
int arg1 - The unmodified hit chance
|
||||
@@ -94,7 +94,7 @@ int ret1 - the new hit chance
|
||||
|
||||
HOOK_AFTERHITROLL (hs_afterhitroll.int)
|
||||
|
||||
Runs after fallout has decided if an attack will hit or miss
|
||||
Runs after Fallout has decided if an attack will hit or miss
|
||||
|
||||
int arg1 - If the attack will hit. (0 - critical miss, 1 - miss, 2 - hit, 3 - critical hit)
|
||||
critter arg2 - The attacker
|
||||
@@ -110,22 +110,22 @@ critter ret3 - Override the target of the attack
|
||||
|
||||
HOOK_CALCAPCOST (hs_calcapcost.int)
|
||||
|
||||
Runs whenever fallout is calculating the ap cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.
|
||||
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the ap cost of whatever is in the players hands at the time the wrong ap cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
Runs whenever Fallout is calculating the AP cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.
|
||||
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the AP cost of whatever is in the players hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
You can get the weapon object by checking item slot based on attack type (ATKTYPE_LWEP1, ATKTYPE_LWEP2, etc) and then calling critter_inven_obj().
|
||||
|
||||
critter arg1 - The critter performing the action
|
||||
int arg2 - Attack Type (see ATKTYPE_* constants)
|
||||
int arg3 - Is aimed attack (1 or 0)
|
||||
int arg4 - The normal ap cost
|
||||
int arg4 - The normal AP cost
|
||||
|
||||
int ret1 - The new ap cost
|
||||
int ret1 - The new AP cost
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_DEATHANIM1 (hs_deathanim1.int)
|
||||
|
||||
Runs before fallout tries to calculate the death animation. Lets you switch out which weapon fallout sees
|
||||
Runs before Fallout tries to calculate the death animation. Lets you switch out which weapon Fallout sees
|
||||
|
||||
int arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
|
||||
critter arg2 - The attacker
|
||||
@@ -138,14 +138,14 @@ int ret1 - The pid of an object to override the attacking weapon with
|
||||
|
||||
HOOK_DEATHANIM2 (hs_deathanim2.int)
|
||||
|
||||
Runs after fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.
|
||||
Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.
|
||||
When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and target will point to an object with obj_art_fid == 0x20001F5.
|
||||
|
||||
item arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
|
||||
critter arg2 - The attacker
|
||||
critter arg3 - The target
|
||||
int arg4 - The amount of damage
|
||||
int arg5 - The death anim id calculated by fallout
|
||||
int arg5 - The death anim id calculated by Fallout
|
||||
|
||||
int ret1 - The death anim id to override with
|
||||
|
||||
@@ -166,7 +166,7 @@ int arg5 - The special effect flags for the target
|
||||
int arg6 - The special effect flags for the attacker
|
||||
int arg7 - The weapon used in the attack
|
||||
int arg8 - The bodypart that was struck
|
||||
int arg9 - Damage Multipiler (this is divided by 2, so a value of 3 does 1.5x damage, and 8 does 4x damage. Usually it's 2, but with Silent Death perk and the corresponding attack conditions, it's 4; for critical hits, the value is taken from the critical table)
|
||||
int arg9 - Damage Multiplier (this is divided by 2, so a value of 3 does 1.5x damage, and 8 does 4x damage. Usually it's 2, but with Silent Death perk and the corresponding attack conditions, it's 4; for critical hits, the value is taken from the critical table)
|
||||
int arg10 - Number of bullets actually hit the target (1 for melee attacks)
|
||||
int arg11 - The amount of knockback to the target
|
||||
int arg12 - Attack Type (see ATKTYPE_* constants)
|
||||
@@ -181,7 +181,7 @@ int ret5 - The amount of knockback to the target
|
||||
|
||||
HOOK_ONDEATH (hs_ondeath.int)
|
||||
|
||||
Runs immediately after a critter dies for any reason. No return values; this is just a convinence for when you need to do something after death for a large number of different critters and don't want to have to script each and every one of them.
|
||||
Runs immediately after a critter dies for any reason. No return values; this is just a convenience for when you need to do something after death for a large number of different critters and don't want to have to script each and every one of them.
|
||||
|
||||
Critter arg1 - The critter that just died
|
||||
|
||||
@@ -189,7 +189,7 @@ Critter arg1 - The critter that just died
|
||||
|
||||
HOOK_FINDTARGET (hs_findtarget.int)
|
||||
|
||||
Runs when the ai is trying to pick a target in combat. Fallout first chooses a list of 4 likely suspects, then normally sorts them in order of weakness/distance/etc depending on the ai caps of the attacker. This hook replaces that sorting function, allowing you to sort the targets in some arbitrary way. Use sfall_return to give the 4 targets, in order of preference. All 4 must be given if you want to override normal sorting; if you want to specify less than 4 targets fill in the extra spaces with 0's. If you do not give 4 targets, the npcs normal sorting mechanism will be used.
|
||||
Runs when the ai is trying to pick a target in combat. Fallout first chooses a list of 4 likely suspects, then normally sorts them in order of weakness/distance/etc depending on the ai caps of the attacker. This hook replaces that sorting function, allowing you to sort the targets in some arbitrary way. Use sfall_return to give the 4 targets, in order of preference. All 4 must be given if you want to override normal sorting; if you want to specify less than 4 targets fill in the extra spaces with 0's. If you do not give 4 targets, the NPCs normal sorting mechanism will be used.
|
||||
|
||||
The return values can include critters that weren't in the list of possible targets, but the additional targets may still be discarded later on in the combat turn if they are out of the attackers perception or the chance of a successful hit is too low. The list of possible targets often includes duplicated entries.
|
||||
|
||||
@@ -213,7 +213,7 @@ Runs when:
|
||||
2) a critter uses an object from inventory screen AND this object does not have "Use" action flag set and it's not active flare or explosive.
|
||||
3) player or AI uses any drug
|
||||
|
||||
This is fired before the object is used, and the relevent use_obj_on script procedures are run. You can disable default item behavior.
|
||||
This is fired before the object is used, and the relevant use_obj_on script procedures are run. You can disable default item behavior.
|
||||
NOTE: you can't remove and/or destroy this object during the hookscript (game will crash otherwise). To remove it, return 1.
|
||||
|
||||
Critter arg1 - The target
|
||||
@@ -230,7 +230,7 @@ Runs when:
|
||||
1) a critter uses an object from inventory which have "Use" action flag set or it's an active flare or dynamite.
|
||||
2) player uses an object from main interface
|
||||
|
||||
This is fired before the object is used, and the relevent use_obj script procedures are run. You can disable default item behavior.
|
||||
This is fired before the object is used, and the relevant use_obj script procedures are run. You can disable default item behavior.
|
||||
NOTE: you can't remove and/or destroy this object during the hookscript (game will crash otherwise). To remove it, return 1.
|
||||
|
||||
Critter arg1 - The user
|
||||
@@ -271,13 +271,13 @@ int ret1 - the modified value of all of the goods
|
||||
|
||||
HOOK_MOVECOST (hs_movecost.int)
|
||||
|
||||
Runs when calculating the ap cost of movement
|
||||
Runs when calculating the AP cost of movement
|
||||
|
||||
Critter arg1 - the critter doing the moving
|
||||
int arg2 - the number of hexes being moved
|
||||
int arg3 - the original ap cost
|
||||
int arg3 - the original AP cost
|
||||
|
||||
int ret1 - the new ap cost
|
||||
int ret1 - the new AP cost
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
@@ -305,14 +305,14 @@ object* ret1 - 0 if the hex doesn't block, or any sort of object pointer if it d
|
||||
|
||||
HOOK_ITEMDAMAGE (hs_itemdamage.int)
|
||||
|
||||
Runs when retriving the damage rating of the players used weapon. (Which may be their fists.)
|
||||
Runs when retrieving the damage rating of the players used weapon. (Which may be their fists.)
|
||||
|
||||
int arg1 - The default min damage
|
||||
int arg2 - The default max damage
|
||||
Item arg3 - The weapin used. (0 if unarmed)
|
||||
Item arg3 - The weapon used. (0 if unarmed)
|
||||
Critter arg4 - The critter doing the attacking
|
||||
int arg5 - The type of attack
|
||||
int arg6 - non zero if this is an attack using a melee weapon
|
||||
int arg6 - non-zero if this is an attack using a melee weapon
|
||||
|
||||
int ret1 - Either the damage to be used, if ret2 isn't given, or the new minimum damage if it is
|
||||
int ret2 - The new maximum damage
|
||||
@@ -328,7 +328,7 @@ To add proper check for ammo before shooting and proper calculation of number of
|
||||
Item arg1 - weapon
|
||||
int arg2 - Number of bullets in burst (1 for single shots)
|
||||
int arg3 - Ammo cost calculated by original function (this is basically 2 for Super Cattle Prod and Mega Power Fist)
|
||||
int arg4 - Type of hook (0 - when substracting ammo after attack, 1 - when checking for "out of ammo" before attack)
|
||||
int arg4 - Type of hook (0 - when subtracting ammo after attack, 1 - when checking for "out of ammo" before attack)
|
||||
|
||||
int ret1 - new ammo cost value (set to 0 for unlimited ammo)
|
||||
|
||||
@@ -393,12 +393,12 @@ HOOK_WITHINPERCEPTION (hs_withinperception.int)
|
||||
|
||||
Runs when checking if one critter sees another critter. This is used in different situations like combat AI. You can override the result.
|
||||
|
||||
NOTE: obj_can_see_obj calls this first when deciding if critter can possibly see another critter with regard to perception, lighting, sneak factors. If check fails, the end result is false. If check succeeds (eg. critter is within perception range), another check is made if there is any blocking tile between two critters (which includes stuff like windows, large bushes, barrels, etc.) and if there is - check still fails. You can override "within perception" check by returning 0 or 1, OR, as a convenience, you can also override blocking check after the perception check by returning 2 instead. In this case you should add "line of sight" check inside your hook script, otherwise critters will detect you through walls.
|
||||
NOTE: obj_can_see_obj calls this first when deciding if critter can possibly see another critter with regard to perception, lighting, sneak factors. If check fails, the end result is false. If check succeeds (e.g. critter is within perception range), another check is made if there is any blocking tile between two critters (which includes stuff like windows, large bushes, barrels, etc.) and if there is - check still fails. You can override "within perception" check by returning 0 or 1, OR, as a convenience, you can also override blocking check after the perception check by returning 2 instead. In this case you should add "line of sight" check inside your hook script, otherwise critters will detect you through walls.
|
||||
|
||||
This is fired after the default calculation is made.
|
||||
|
||||
Critter arg1 - Watcher object
|
||||
Obj arg2 - Target objet
|
||||
Obj arg2 - Target object
|
||||
int arg3 - Result of vanilla function: 1 - within perception range, 0 - otherwise
|
||||
|
||||
int ret1 - overrides the returned result of the function: 0 - not in range (can't see), 1 - in range (will see if not blocked), 2 - forced detection (will see regardless, only used in obj_can_see_obj scripting function which is called by every critter in the game)
|
||||
@@ -409,7 +409,7 @@ HOOK_INVENTORYMOVE (hs_inventorymove.int)
|
||||
|
||||
Runs before moving items between inventory slots in dude interface. You can override the action.
|
||||
What you can NOT do with this hook:
|
||||
- force moving items to inapropriate slots (like gun in armor slot)
|
||||
- force moving items to inappropriate slots (like gun in armor slot)
|
||||
- block picking up items
|
||||
What you can do:
|
||||
- restrict player from using specific weapons or armors
|
||||
@@ -432,7 +432,7 @@ NOTE: when replacing a previously wielded armor or weapon, the unwielding hook w
|
||||
If you need to rely on this, try checking if armor/weapon already equipped when wielding hook is executed.
|
||||
|
||||
Critter arg1 - critter
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor), may be 0 when unwielding
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor), may be 0 when unwielding (object is valid only if the item is unwielded by move_obj_inven_to_obj() or rm_obj_from_inven())
|
||||
int arg3 - slot (INVEN_TYPE_*)
|
||||
int arg4 - 1 when wielding, 0 when unwielding
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ Global scripts have multiple modes, which can be set using the set_global_script
|
||||
|
||||
Both set_global_script_repeat and set_global_script_type only have an effect on the script they were called from. Every global script needs its own game_loaded block to correctly set up the script type and repeat rate. set_global_script_repeat will have no effect if called on a non-global script.
|
||||
|
||||
The read_xxx functions take a memory address as the parameter and can read arbitrary pieces of fallouts address space. The write functions are equivilent except that they write to arbitrary memory addresses. The call_offset_xx functions can be used to call arbitrary functions inside fallout. Different versions are used to call functions with different numbers of arguments. None of these functions will work unless AllowUnsafeScripting is enabled in ddraw.ini
|
||||
The read_xxx functions take a memory address as the parameter and can read arbitrary pieces of Fallout's address space. The write functions are equivalent except that they write to arbitrary memory addresses. The call_offset_xx functions can be used to call arbitrary functions inside Fallout. Different versions are used to call functions with different numbers of arguments. None of these functions will work unless AllowUnsafeScripting is enabled in ddraw.ini
|
||||
|
||||
The get/set_pc_base/extra_stat functions are equivelent to calling get/set_critter_base/extra_stat with dude_obj as the critter pointer. None of these stat functions take perks into account, and neither do they do range clamping to make sure the stats are valid. Use the normal get_critter_stat function to get a correctly perk adjusted and range clamped value for a stat.
|
||||
The get/set_pc_base/extra_stat functions are equivalent to calling get/set_critter_base/extra_stat with dude_obj as the critter pointer. None of these stat functions take perks into account, and neither do they do range clamping to make sure the stats are valid. Use the normal get_critter_stat function to get a correctly perk adjusted and range clamped value for a stat.
|
||||
|
||||
The set_stat_max/min functions can be used to set the valid ranges on on stats. Values returned by get_current_stat will be clamped to this range. The set_pc_ function only effect the player, the set_npc_ functions only effect other critters, and the set_ functions effect both.
|
||||
|
||||
@@ -26,7 +26,7 @@ The graphics functions are only available if the user is using graphics mode 4 o
|
||||
|
||||
load_shader takes a path relative to the data\shaders\ directory as an argument and returns a shader ID. That ID should be passed as the first argument to all other shader functions, and is valid until free_shader is called on the ID, the player loads a saved game or the player quits to the main menu.
|
||||
|
||||
get_shader_version gives you the higest shader version supported by the players graphics cards. Possible return values are 11, 12, 13, 14, 20, 21 and 30.
|
||||
get_shader_version gives you the highest shader version supported by the player's graphics cards. Possible return values are 11, 12, 13, 14, 20, 21 and 30.
|
||||
|
||||
set_shader_mode tells sfall when to use a shader. The parameter is a set of 32 flags which specify the screens on which the shader will be disabled, unless bit 32 is set, in which case the shader will only be active on those screens. Remember that screens are displayed on top of each other; if the player opens the character menu which in combat, the game still considers the player to be in combat. See sfall.h for a list of defines.
|
||||
|
||||
@@ -38,41 +38,41 @@ set_pipboy_available will only accept 0 or 1 as an argument. Using any other val
|
||||
|
||||
get/set_critter_current_ap functions should only be used during the target critters turn while in combat. Calling them outside of combat typically returns the critters max ap, but don't rely on that behaviour. (Specifically, if the critter has never before entered combat, it will probably return the critters base ap ignoring any extra bonuses from perks etc.) Using set_critter_current_ap on the player will not automatically redraw the screen, so the ap bar will be incorrect until the player next clicks.
|
||||
|
||||
The 'type' value in the weapon knockback functions can be 0 or 1. If 0, the value becomes an absolute distance that targets will be knocked back. If 1, the value is multiplied by the distance they would normally have been knocked back. Weapon knockback modifiers are applied in the order weapon -> attacker -> target, so a x2 weapon weilded by an abs 6 attacker hitting a /2 target will knock the target back 3 squares. The knockback functions will not override the stonewall perk or knockdowns resulting from criticals. knockback values set on weapons or critters are not saved, and must be reset each time the player reloads.
|
||||
The 'type' value in the weapon knockback functions can be 0 or 1. If 0, the value becomes an absolute distance that targets will be knocked back. If 1, the value is multiplied by the distance they would normally have been knocked back. Weapon knockback modifiers are applied in the order weapon -> attacker -> target, so a x2 weapon wielded by an abs 6 attacker hitting a /2 target will knock the target back 3 squares. The knockback functions will not override the stonewall perk or knockdowns resulting from criticals. knockback values set on weapons or critters are not saved, and must be reset each time the player reloads.
|
||||
|
||||
The get/set_sfall_global functions require an 8 character long case sensitive string for the variable name. The variables behave the same as normal fallout globals, except that they don't have to be declared beforehand in vault13.gam. Trying to get a variable which hasn't been set will always return 0. These functions are intended for use when a patch to a mod requires the addition of a new global variable, a case which would otherwise require the player to start a new game.
|
||||
The get/set_sfall_global functions require an 8 character long case sensitive string for the variable name. The variables behave the same as normal Fallout globals, except that they don't have to be declared beforehand in vault13.gam. Trying to get a variable which hasn't been set will always return 0. These functions are intended for use when a patch to a mod requires the addition of a new global variable, a case which would otherwise require the player to start a new game.
|
||||
|
||||
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 corrisponds 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 64 characters and the description to 1024 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.
|
||||
|
||||
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 it's default state.
|
||||
|
||||
show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to 9 for custom boxes. Remember to add your messages to intrface.msg and setup the font colours in ddraw.ini if you're going to use custom boxes.
|
||||
show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to 9 for custom boxes. Remember to add your messages to intrface.msg and set up the font colours in ddraw.ini if you're going to use custom boxes.
|
||||
|
||||
get/set_bodypart_hit_modifier alter the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id's are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.
|
||||
|
||||
(re)set/get_critical_table are used for modifing the critical table. For details see 'http://falloutmods.wikia.com/wiki/Critical_hit_tables'. Changes are not saved, and will reset to the defaults, (or to the contents of CriticalOverrides.ini, if it exists,) at each game reload. These function also require OverrideCriticalTable to be set to 1 in ddraw.ini. (Disabled by default, because it noticably increases loading times.)
|
||||
(re)set/get_critical_table are used for modifying the critical table. For details see 'http://falloutmods.wikia.com/wiki/Critical_hit_tables'. Changes are not saved, and will reset to the defaults, (or to the contents of CriticalOverrides.ini, if it exists,) at each game reload. These function also require OverrideCriticalTable to be set to 1 in ddraw.ini. (Disabled by default, because it noticably increases loading times.)
|
||||
|
||||
get/set_unspent_ap_bonus alter the AC bonus you recieve per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.) get/set_unspent_ap_perk_bonus are similar, but effect the extra AC granted by the h2h evade perk. (The default value of this is also 4, equivilent to doubling the original bonus.)
|
||||
get/set_unspent_ap_bonus alter the AC bonus you receive per unused action point at the end of your turn in combat. To allow for fractional values, the value given if divided by 4. (Hence the default value is 4 and not 1.) get/set_unspent_ap_perk_bonus are similar, but effect the extra AC granted by the h2h evade perk. (The default value of this is also 4, equivalent to doubling the original bonus.)
|
||||
|
||||
nb_* functions are reserved for the brotherhood tactical training mod, and should be avoided.
|
||||
|
||||
The fs_* functions are used to manipulate a virtual file system. Files saved here should have paths relative to the data folder, and use backslashes as the directory seperator. They will take precedence over files stored in the normal data folder. They will also be saved into save games, so be avoid creating large files. Using fs_copy followed by fs_read_xxx, you can read the contents of existing files.
|
||||
The fs_* functions are used to manipulate a virtual file system. Files saved here should have paths relative to the data folder, and use backslashes as the directory separator. They will take precedence over files stored in the normal data folder. They will also be saved into save games, so be avoid creating large files. Using fs_copy followed by fs_read_xxx, you can read the contents of existing files.
|
||||
|
||||
get/set_proto_data are used to manipulate the in memory copies of the .pro files fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading. Changes are not stored on disc, and are not permenent. If you modify the protos, and then fallout subsequently reloads the file your changes will be lost.
|
||||
get/set_proto_data are used to manipulate the in memory copies of the .pro files Fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading. Changes are not stored on disc, and are not permanent. If you modify the protos, and then Fallout subsequently reloads the file your changes will be lost.
|
||||
|
||||
the list_xxx functions can be used to loop over all items on a map. list_begin takes an argument telling sfall what you want to list. (Defined in sfall.h) It returns a list pointer, which you iterate through with list_next. Finally, when you've finished with the list use list_end on it. Not calling list_end will result in a memory leak. Alternatively, use list_as_array to get the whole list at once as a temp array variable, which can be looped over using len_array and which you don't need to remember to free afterwards.
|
||||
|
||||
play_sfall_sound and stop_sfall_sound are used to play mp3/wav/wma files. The path given is relative to the fallout folder. Specify loop as 1 to loop the file continuously, or 0 otherwise. If you don't wish to loop, play_sfall_sound returns 0. If you do loop, it returns an id which can be passed back to stop_sfall_sound when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. These functions do not require 'AllowDShowSound' to be set to 1 in ddraw.ini.
|
||||
play_sfall_sound and stop_sfall_sound are used to play mp3/wav/wma files. The path given is relative to the Fallout folder. Specify loop as 1 to loop the file continuously, or 0 otherwise. If you don't wish to loop, play_sfall_sound returns 0. If you do loop, it returns an id which can be passed back to stop_sfall_sound when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. These functions do not require 'AllowDShowSound' to be set to 1 in ddraw.ini.
|
||||
|
||||
arrays are created and manipulated with the xxx_array functions. An array must first be created with create_array or temp_array, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The id returned by create/temp_array can then be used with the other array functions. Arrays are shared between all scripts. (i.e. you can call create_array from one script, and then use the returned id from another script.) They are also saved across savegames. You must remember to free any arrays you create with create_array when you are done with them, or you will leak memory. arrays created with temp_array will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad id or trying to access out of range elements will not crash the script. create_array is the only function that returns a permenent array, all other functions which return arrays (string_split, list_as_array etc,) all return temp arrays. You can use fix_array to make a temp array permenent.
|
||||
arrays are created and manipulated with the xxx_array functions. An array must first be created with create_array or temp_array, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The id returned by create/temp_array can then be used with the other array functions. Arrays are shared between all scripts. (i.e. you can call create_array from one script, and then use the returned id from another script.) They are also saved across savegames. You must remember to free any arrays you create with create_array when you are done with them, or you will leak memory. arrays created with temp_array will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad id or trying to access out of range elements will not crash the script. create_array is the only function that returns a permanent array, all other functions which return arrays (string_split, list_as_array etc,) all return temp arrays. You can use fix_array to make a temp array permanent.
|
||||
|
||||
NOTE: the above description only applies when "arraysBehavior" is set to 0 in ddraw.ini. Refer to "arrays.txt" for detailed description of new arrays behavior.
|
||||
|
||||
force_aimed_shots and disable_aimed_shots allow overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) force_aimed_shots will allow a weapon to make aimed shots even if it normally couldn't, and disable_aimed_shots stops a weapon from making aimed shots even if it normally could. Both of these functions affect player and npcs alike. force_aimed_shots does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the functions once at each reload. Use a pid of 0 to represent unarmed.
|
||||
force_aimed_shots and disable_aimed_shots allow overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) force_aimed_shots will allow a weapon to make aimed shots even if it normally couldn't, and disable_aimed_shots stops a weapon from making aimed shots even if it normally could. Both of these functions affect player and NPCs alike. force_aimed_shots does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the functions once at each reload. Use a pid of 0 to represent unarmed.
|
||||
|
||||
get/set_critter_skill_points will get/set the number of additional points a critter has in a skill, on top of whatever they have from their stats and other bonuses. Note that skill points are part of the proto, so calling set_skill_points on a critter will affect all critters that share the same proto.
|
||||
|
||||
@@ -101,23 +101,23 @@ array - array ID to be used with array-related functions (actually an integer)
|
||||
- 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. It's 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.
|
||||
- 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.
|
||||
|
||||
> 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.
|
||||
- also takes the NPC name 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
|
||||
|
||||
> int get_ini_setting(string setting)
|
||||
- reads an integer value from an ini file in the fallout directory.
|
||||
- reads an integer value from an ini file in the Fallout directory.
|
||||
- It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned.
|
||||
- The file name is limited to 16 chars, including the extension.
|
||||
- The section name is limited to 8 characters.
|
||||
- The file name is limited to 63 chars, including the extension.
|
||||
- The section name is limited to 32 characters.
|
||||
- It can also be used to get sfalls settings, by using ddraw.ini as the file name.
|
||||
|
||||
> string get_ini_string(string setting)
|
||||
- reads a string value from an ini file in the fallout directory.
|
||||
- reads a string value from an ini file in the Fallout directory.
|
||||
|
||||
> int get_game_mode()
|
||||
- is a more flexible version of in_world_map. It will return a set of flags indicating which mode the game is currently in.
|
||||
@@ -157,21 +157,21 @@ array - array ID to be used with array-related functions (actually an integer)
|
||||
- if you add 0x80000000 to the sid when calling set_script, map_enter_p_proc will be SKIPPED. The start proc will always be run.
|
||||
|
||||
> int get_script(object)
|
||||
- accepts a pointer to an object and returns it's scriptID (line number in scripts.lst), or -1 if the object is unscripted.
|
||||
- accepts a pointer to an object and returns its scriptID (line number in scripts.lst), or -1 if the object is unscripted.
|
||||
|
||||
> void set_self(int obj)
|
||||
- overrides the scripts self_obj for the next function call.
|
||||
- It is primarily used to allow the calling of functions which take an implicit self_obj parameter (e.g. drop_obj) from global scripts, but it can also be used from normal scripts;
|
||||
- self_obj will revert back to its original value after the next function call.
|
||||
- calling self_obj(0) will also revert self_obj to original value
|
||||
- source_obj, target_obj, and similar functions will not work if preceeded by "set_self"
|
||||
- source_obj, target_obj, and similar functions will not work if preceded by "set_self"
|
||||
|
||||
> void mod_skill_points_per_level(int x)
|
||||
- accepts a value of between -100 and 100, and modifies the number of skill points the player recieves when they level up.
|
||||
- accepts a value of between -100 and 100, and modifies the number of skill points the player receives when they level up.
|
||||
- This is a modification of what would otherwise happen, rather than a replacement.
|
||||
- The value is not saved into the save game, so should be reset in the game_loaded section of a script.
|
||||
|
||||
> void seq_perk_freq(int x)
|
||||
> void set_perk_freq(int x)
|
||||
- sets the number of levels between each perk.
|
||||
- Setting 0 will reset it back to the default.
|
||||
- This overrides the effects of the skilled trait.
|
||||
@@ -182,7 +182,7 @@ array - array ID to be used with array-related functions (actually an integer)
|
||||
- will return the last critter to be deliberately attacked
|
||||
> object get_last_attacker(object)
|
||||
- will return the last critter to deliberately launch an attack against the argument critter.
|
||||
- If a critter has not launched/recieved an attack, it will return 0. This is only stored for the duration of combat, and outside of combat both functions will always return 0.
|
||||
- If a critter has not launched/received an attack, it will return 0. This is only stored for the duration of combat, and outside of combat both functions will always return 0.
|
||||
|
||||
> void set_base_pickpocket_mod(int max, int mod)
|
||||
- changes maximum chance of success and chance mod for each steal attempt
|
||||
@@ -214,7 +214,7 @@ Some additional reg_anim_* functions were introduced. They all work in the same
|
||||
- plays "take out weapon" animation for given holdFrameID. It is not required to have such weapon in critter's inventory.
|
||||
|
||||
> void reg_anim_turn_towards(object, tile/target, delay)
|
||||
- makes object change it's direction to face given tile num or target object.
|
||||
- makes object change its direction to face given tile num or target object.
|
||||
|
||||
> int metarule2_explosions(int arg1, int arg2)
|
||||
was made as a dirty easy hack to allow dynamically change some explosion parameters (ranged attack). All changed parameters are reset to vanilla state automatically after each attack action. Following macros are available in sfall.h:
|
||||
@@ -229,13 +229,13 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
|
||||
- changes radius at which explosion will hit secondary targets for the next attack (from the experiments it is limited to something around 8 by the engine)
|
||||
|
||||
> void set_attack_is_explosion_fire
|
||||
- if you call this right before using a weapon with fire damage type, it will produce explosion effects (and radius damage) just like "explosion" type, but all targets will still recieve fire damage.
|
||||
- if you call this right before using a weapon with fire damage type, it will produce explosion effects (and radius damage) just like "explosion" type, but all targets will still receive fire damage.
|
||||
|
||||
|
||||
Some utility/math functions are available:
|
||||
|
||||
> array string_split(string, split)
|
||||
- takes a string and a seperator, searches the string for all instances of the seperator, and returns a temp array filled with the pieces of the string split at each instance. If you give an empty string as the seperator, the string is split into individual characters.
|
||||
- takes a string and a separator, searches the string for all instances of the separator, and returns a temp array filled with the pieces of the string split at each instance. If you give an empty string as the separator, the string is split into individual characters.
|
||||
- you can use this to search for a substring in a string like this: strlen(get_array(string_split(haystack, needle), 0))
|
||||
|
||||
> string substr(string, start, length)
|
||||
@@ -245,7 +245,7 @@ Some utility/math functions are available:
|
||||
- returns string length
|
||||
|
||||
> string sprintf(string format, any value)
|
||||
- formats given value using standart syntax of C printf function (google "printf" for format details). However it is limited to formatting only 1 value.
|
||||
- formats given value using standard syntax of C printf function (google "printf" for format details). However it is limited to formatting only 1 value.
|
||||
- can be used to get character by ASCII code ("%c")
|
||||
|
||||
> int typeof(any value)
|
||||
@@ -265,6 +265,9 @@ Some utility/math functions are available:
|
||||
> float exponent(float x)
|
||||
- e^x
|
||||
|
||||
> int ceil(float x)
|
||||
- round x to the nearest integer that is not less than x
|
||||
|
||||
> int round(float x)
|
||||
- round x to the nearest integer
|
||||
|
||||
@@ -299,8 +302,8 @@ Some utility/math functions are available:
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise
|
||||
- this is an internal engine variable wich is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
- returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise
|
||||
- this calls an internal engine function which is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
|
||||
> int tile_light(int elevation, int tileNum)
|
||||
- returns light intensity at the given tile in range from 0 to 65535
|
||||
@@ -340,7 +343,7 @@ Some utility/math functions are available:
|
||||
- these opcodes allows to use additional scripting functions, that do not require new opcode
|
||||
- first argument is always function name (string)
|
||||
- there are 7 versions of this opcode for different number of additional arguments (for convenience)
|
||||
- opcodes have return value, but it is not neccessary to use it
|
||||
- opcodes have return value, but it is not necessary to use it
|
||||
|
||||
|
||||
------------------------------------
|
||||
@@ -372,6 +375,16 @@ Some utility/math functions are available:
|
||||
> void sfall_func0("exec_map_update_scripts")
|
||||
- executes map_update_p_proc for all objects on map and global/hook scripts as well
|
||||
|
||||
> void sfall_func2("set_ini_setting", string setting, int/string value)
|
||||
- writes an integer or a string value to an ini file in the Fallout directory. If the ini file does not exist, it will be created
|
||||
- The setting argument works in the same way as in get_ini_setting; seperate the file name, section and key with a '|' character; e.g. 'set_ini_setting("myini.ini|mysec|var1", 42)'
|
||||
- The file name is limited to 63 chars, including the extension
|
||||
- The section name is limited to 32 characters
|
||||
|
||||
> int sfall_func1("floor2", int/float value)
|
||||
- works just like vanilla floor function, but returns correct integers for negative values
|
||||
- vanilla floor function works exactly the same as ceil for negative values, much like trunc in C/C++
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
@@ -319,6 +319,7 @@
|
||||
|
||||
0x8248 - object get_last_target(object critter)
|
||||
0x8249 - object get_last_attacker(object critter)
|
||||
0x824a - void block_combat(int enable)
|
||||
|
||||
0x824b - int tile_under_cursor
|
||||
0x824c - int gdialog_get_barter_mod
|
||||
|
||||
+194
-148
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "AnimationsAtOnceLimit.h"
|
||||
#include "FalloutEngine.h"
|
||||
#include "LoadGameHook.h"
|
||||
|
||||
static const int animRecordSize = 2656;
|
||||
|
||||
@@ -29,15 +30,18 @@ static int animationLimit = 32;
|
||||
static BYTE *anim_set;
|
||||
static BYTE *sad;
|
||||
|
||||
static const DWORD AnimPCMove[] = {
|
||||
static DWORD animSetAddr = _anim_set;
|
||||
static DWORD sadAddr = _sad;
|
||||
|
||||
static const DWORD animPCMove[] = {
|
||||
0x416E11, 0x416F64, 0x417143, 0x41725C, 0x4179CC,
|
||||
};
|
||||
|
||||
static const DWORD AnimMaxCheck[] = {
|
||||
static const DWORD animMaxCheck[] = {
|
||||
0x413A70, 0x413ADD, 0x413BDD, 0x413EB8, 0x413F4E, 0x4186F1,
|
||||
};
|
||||
|
||||
static const DWORD AnimMaxSizeCheck[] = {
|
||||
static const DWORD animMaxSizeCheck[] = {
|
||||
0x413AA9, 0x413CB7, 0x413DC2, 0x417F3A,
|
||||
};
|
||||
|
||||
@@ -150,7 +154,7 @@ static void __declspec(naked) anim_set_end_hack() {
|
||||
mov edi, _anim_set;
|
||||
cmp dword ptr animationLimit, 32;
|
||||
jle skip;
|
||||
mov edi, anim_set;
|
||||
mov edi, animSetAddr;
|
||||
add edi, animRecordSize; // Include a dummy
|
||||
skip:
|
||||
test dl, 0x2; // Is the combat flag set?
|
||||
@@ -163,157 +167,199 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
static DWORD __fastcall CheckSetSad(BYTE openFlag, DWORD valueMul) {
|
||||
bool result = false;
|
||||
int offset = (3240 * valueMul) + 32;
|
||||
|
||||
if (*(DWORD*)(sadAddr + offset) == -1000) {
|
||||
result = true;
|
||||
} else if (!InCombat() && !(openFlag & 1)) {
|
||||
*(DWORD*)(sadAddr + offset) = -1000;
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void __declspec(naked) object_move_hack() {
|
||||
__asm {
|
||||
mov ecx, ds:[ecx + 0x3C]; // openFlag
|
||||
mov edx, [esp + 0x4C - 0x20]; // valueMul
|
||||
call CheckSetSad;
|
||||
test eax, eax;
|
||||
jz end;
|
||||
push 0x417611; // fixed jump
|
||||
retn;
|
||||
end:
|
||||
push 0x417616; // default
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyAnimationsAtOncePatches(signed char aniMax) {
|
||||
if (aniMax <= 32) return;
|
||||
|
||||
int i;
|
||||
|
||||
//allocate memory to store larger animation struct arrays
|
||||
anim_set = new BYTE[animRecordSize * (aniMax + 1)];
|
||||
sad = new BYTE[3240 * (aniMax + 1)];
|
||||
|
||||
animSetAddr = (DWORD)anim_set;
|
||||
sadAddr = (DWORD)sad;
|
||||
|
||||
//set general animation limit check (old 20) aniMax-12 -- +12 reserved for PC movement(4) + other critical animations(8)?
|
||||
SafeWrite8(0x413C07, aniMax - 12);
|
||||
|
||||
//PC movement animation limit checks (old 24) aniMax-8 -- +8 reserved for other critical animations?.
|
||||
for (i = 0; i < sizeof(animPCMove) / 4; i++) {
|
||||
SafeWrite8(animPCMove[i], aniMax - 8);
|
||||
}
|
||||
|
||||
//Max animation limit checks (old 32) aniMax
|
||||
for (i = 0; i < sizeof(animMaxCheck) / 4; i++) {
|
||||
SafeWrite8(animMaxCheck[i], aniMax);
|
||||
}
|
||||
|
||||
//Max animations checks - animation struct size * max num of animations (old 2656*32=84992)
|
||||
for (i = 0; i < sizeof(animMaxSizeCheck) / 4; i++) {
|
||||
SafeWrite32(animMaxSizeCheck[i], animRecordSize * aniMax);
|
||||
}
|
||||
|
||||
//divert old animation structure list pointers to newly alocated memory
|
||||
|
||||
//struct array 1///////////////////
|
||||
|
||||
//old addr 0x54C1B4
|
||||
SafeWrite32(0x413A9E, animSetAddr);
|
||||
|
||||
//old addr 0x54C1C0
|
||||
for (i = 0; i < sizeof(fake_anim_set_C) / 4; i++) {
|
||||
SafeWrite32(fake_anim_set_C[i], 12 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC14
|
||||
for (i = 0; i < sizeof(anim_set_0) / 4; i++) {
|
||||
SafeWrite32(anim_set_0[i], animRecordSize + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC18
|
||||
for (i = 0; i < sizeof(anim_set_4) / 4; i++) {
|
||||
SafeWrite32(anim_set_4[i], animRecordSize + 4 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC1C
|
||||
for (i = 0; i < sizeof(anim_set_8) / 4; i++) {
|
||||
SafeWrite32(anim_set_8[i], animRecordSize + 8 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC20
|
||||
for (i = 0; i < sizeof(anim_set_C) / 4; i++) {
|
||||
SafeWrite32(anim_set_C[i], animRecordSize + 12 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC24
|
||||
for (i = 0; i < sizeof(anim_set_10) / 4; i++) {
|
||||
SafeWrite32(anim_set_10[i], animRecordSize + 16 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC28
|
||||
for (i = 0; i < sizeof(anim_set_14) / 4; i++) {
|
||||
SafeWrite32(anim_set_14[i], animRecordSize + 20 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC38
|
||||
SafeWrite32(0x413F29, animRecordSize + 36 + animSetAddr);
|
||||
|
||||
//old addr 0x54CC3C
|
||||
for (i = 0; i < sizeof(anim_set_28) / 4; i++) {
|
||||
SafeWrite32(anim_set_28[i], animRecordSize + 40 + animSetAddr);
|
||||
}
|
||||
|
||||
//old addr 0x54CC48
|
||||
SafeWrite32(0x415C35, animRecordSize + 52 + animSetAddr);
|
||||
|
||||
//struct array 2///////////////////
|
||||
|
||||
//old addr 0x530014
|
||||
for (i = 0; i < sizeof(sad_0) / 4; i++) {
|
||||
SafeWrite32(sad_0[i], sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530018
|
||||
for (i = 0; i < sizeof(sad_4) / 4; i++) {
|
||||
SafeWrite32(sad_4[i], 4 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x53001C
|
||||
for (i = 0; i < sizeof(sad_8) / 4; i++) {
|
||||
SafeWrite32(sad_8[i], 8 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530020
|
||||
for (i = 0; i < sizeof(sad_C) / 4; i++) {
|
||||
SafeWrite32(sad_C[i], 12 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530024
|
||||
for (i = 0; i < sizeof(sad_10) / 4; i++) {
|
||||
SafeWrite32(sad_10[i], 16 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530028
|
||||
for (i = 0; i < sizeof(sad_14) / 4; i++) {
|
||||
SafeWrite32(sad_14[i], 20 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x53002C
|
||||
for (i = 0; i < sizeof(sad_18) / 4; i++) {
|
||||
SafeWrite32(sad_18[i], 24 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530030
|
||||
for (i = 0; i < sizeof(sad_1C) / 4; i++) {
|
||||
SafeWrite32(sad_1C[i], 28 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530034
|
||||
for (i = 0; i < sizeof(sad_20) / 4; i++) {
|
||||
SafeWrite32(sad_20[i], 32 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x530038
|
||||
for (i = 0; i < sizeof(sad_24) / 4; i++) {
|
||||
SafeWrite32(sad_24[i], 36 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x53003A
|
||||
SafeWrite32(0x416903, 38 + sadAddr);
|
||||
|
||||
//old addr 0x53003B
|
||||
for (i = 0; i < sizeof(sad_27) / 4; i++) {
|
||||
SafeWrite32(sad_27[i], 39 + sadAddr);
|
||||
}
|
||||
|
||||
//old addr 0x53003C
|
||||
for (i = 0; i < sizeof(sad_28) / 4; i++) {
|
||||
SafeWrite32(sad_28[i], 40 + sadAddr);
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationsAtOnceInit() {
|
||||
animationLimit = GetPrivateProfileIntA("Misc", "AnimationsAtOnceLimit", 32, ini);
|
||||
if (animationLimit > 32) {
|
||||
if (animationLimit > 127) animationLimit = 127;
|
||||
if (animationLimit > 127) {
|
||||
animationLimit = 127;
|
||||
}
|
||||
dlog("Applying AnimationsAtOnceLimit patch.", DL_INIT);
|
||||
|
||||
int i;
|
||||
|
||||
//allocate memory to store larger animation struct arrays
|
||||
anim_set = new BYTE[animRecordSize * (animationLimit + 1)];
|
||||
sad = new BYTE[3240 * (animationLimit + 1)];
|
||||
|
||||
//set general animation limit check (old 20) animationLimit-12 -- +12 reserved for PC movement(4) + other critical animations(8)?
|
||||
SafeWrite8(0x413C07, animationLimit - 12);
|
||||
|
||||
//PC movement animation limit checks (old 24) animationLimit-8 -- +8 reserved for other critical animations?.
|
||||
for (i = 0; i < sizeof(AnimPCMove) / 4; i++) {
|
||||
SafeWrite8(AnimPCMove[i], animationLimit - 8);
|
||||
}
|
||||
|
||||
//Max animation limit checks (old 32) animationLimit
|
||||
for (i = 0; i < sizeof(AnimMaxCheck) / 4; i++) {
|
||||
SafeWrite8(AnimMaxCheck[i], animationLimit);
|
||||
}
|
||||
|
||||
//Max animations checks - animation struct size * max num of animations (old 2656*32=84992)
|
||||
for (i = 0; i < sizeof(AnimMaxSizeCheck) / 4; i++) {
|
||||
SafeWrite32(AnimMaxSizeCheck[i], animRecordSize * animationLimit);
|
||||
}
|
||||
|
||||
//divert old animation structure list pointers to newly alocated memory
|
||||
|
||||
//struct array 1///////////////////
|
||||
|
||||
//old addr 0x54C1B4
|
||||
SafeWrite32(0x413A9E, (DWORD)anim_set);
|
||||
|
||||
//old addr 0x54C1C0
|
||||
for (i = 0; i < sizeof(fake_anim_set_C) / 4; i++) {
|
||||
SafeWrite32(fake_anim_set_C[i], 12 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC14
|
||||
for (i = 0; i < sizeof(anim_set_0) / 4; i++) {
|
||||
SafeWrite32(anim_set_0[i], animRecordSize + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC18
|
||||
for (i = 0; i < sizeof(anim_set_4) / 4; i++) {
|
||||
SafeWrite32(anim_set_4[i], animRecordSize + 4 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC1C
|
||||
for (i = 0; i < sizeof(anim_set_8) / 4; i++) {
|
||||
SafeWrite32(anim_set_8[i], animRecordSize + 8 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC20
|
||||
for (i = 0; i < sizeof(anim_set_C) / 4; i++) {
|
||||
SafeWrite32(anim_set_C[i], animRecordSize + 12 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC24
|
||||
for (i = 0; i < sizeof(anim_set_10) / 4; i++) {
|
||||
SafeWrite32(anim_set_10[i], animRecordSize + 16 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC28
|
||||
for (i = 0; i < sizeof(anim_set_14) / 4; i++) {
|
||||
SafeWrite32(anim_set_14[i], animRecordSize + 20 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC38
|
||||
SafeWrite32(0x413F29, animRecordSize + 36 + (DWORD)anim_set);
|
||||
|
||||
//old addr 0x54CC3C
|
||||
for (i = 0; i < sizeof(anim_set_28) / 4; i++) {
|
||||
SafeWrite32(anim_set_28[i], animRecordSize + 40 + (DWORD)anim_set);
|
||||
}
|
||||
|
||||
//old addr 0x54CC48
|
||||
SafeWrite32(0x415C35, animRecordSize + 52 + (DWORD)anim_set);
|
||||
|
||||
//struct array 2///////////////////
|
||||
|
||||
//old addr 0x530014
|
||||
for (i = 0; i < sizeof(sad_0) / 4; i++) {
|
||||
SafeWrite32(sad_0[i], (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530018
|
||||
for (i = 0; i < sizeof(sad_4) / 4; i++) {
|
||||
SafeWrite32(sad_4[i], 4 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x53001C
|
||||
for (i = 0; i < sizeof(sad_8) / 4; i++) {
|
||||
SafeWrite32(sad_8[i], 8 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530020
|
||||
for (i = 0; i < sizeof(sad_C) / 4; i++) {
|
||||
SafeWrite32(sad_C[i], 12 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530024
|
||||
for (i = 0; i < sizeof(sad_10) / 4; i++) {
|
||||
SafeWrite32(sad_10[i], 16 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530028
|
||||
for (i = 0; i < sizeof(sad_14) / 4; i++) {
|
||||
SafeWrite32(sad_14[i], 20 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x53002C
|
||||
for (i = 0; i < sizeof(sad_18) / 4; i++) {
|
||||
SafeWrite32(sad_18[i], 24 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530030
|
||||
for (i = 0; i < sizeof(sad_1C) / 4; i++) {
|
||||
SafeWrite32(sad_1C[i], 28 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530034
|
||||
for (i = 0; i < sizeof(sad_20) / 4; i++) {
|
||||
SafeWrite32(sad_20[i], 32 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x530038
|
||||
for (i = 0; i < sizeof(sad_24) / 4; i++) {
|
||||
SafeWrite32(sad_24[i], 36 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x53003A
|
||||
SafeWrite32(0x416903, 38 + (DWORD)sad);
|
||||
|
||||
//old addr 0x53003B
|
||||
for (i = 0; i < sizeof(sad_27) / 4; i++) {
|
||||
SafeWrite32(sad_27[i], 39 + (DWORD)sad);
|
||||
}
|
||||
|
||||
//old addr 0x53003C
|
||||
for (i = 0; i < sizeof(sad_28) / 4; i++) {
|
||||
SafeWrite32(sad_28[i], 40 + (DWORD)sad);
|
||||
}
|
||||
|
||||
ApplyAnimationsAtOncePatches(animationLimit);
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
// Fix for calling anim() functions in combat
|
||||
MakeJump(0x415DE2, anim_set_end_hack);
|
||||
|
||||
// Fix crash when the critter goes through a door with animation trigger
|
||||
MakeJump(0x41755E, object_move_hack);
|
||||
}
|
||||
|
||||
void AnimationsAtOnceExit() {
|
||||
|
||||
+37
-32
@@ -21,8 +21,8 @@
|
||||
#include "BarBoxes.h"
|
||||
#include "FalloutEngine.h"
|
||||
|
||||
static const DWORD DisplayBoxesRet1=0x4615A8;
|
||||
static const DWORD DisplayBoxesRet2=0x4615BE;
|
||||
static const DWORD DisplayBoxesRet1 = 0x4615A8;
|
||||
static const DWORD DisplayBoxesRet2 = 0x4615BE;
|
||||
struct sBox {
|
||||
DWORD msg;
|
||||
DWORD colour;
|
||||
@@ -31,19 +31,23 @@ struct sBox {
|
||||
static sBox boxes[10];
|
||||
static DWORD boxesEnabled[5];
|
||||
|
||||
static const DWORD bboxMemAddr[] = {
|
||||
0x461266, 0x4612AC, 0x461374, 0x4613E8, 0x461479, 0x46148C, 0x4616BB,
|
||||
};
|
||||
|
||||
static void __declspec(naked) DisplayBoxesHook() {
|
||||
__asm {
|
||||
mov ebx, 0;
|
||||
start:
|
||||
mov eax, boxesEnabled[ebx*4];
|
||||
mov eax, boxesEnabled[ebx * 4];
|
||||
test eax, eax;
|
||||
jz next;
|
||||
lea eax, [ebx+5];
|
||||
lea eax, [ebx + 5];
|
||||
call add_bar_box_;
|
||||
add esi, eax;
|
||||
next:
|
||||
inc ebx;
|
||||
cmp ebx, 4;
|
||||
cmp ebx, 5;
|
||||
jne start;
|
||||
cmp esi, 1;
|
||||
jle fail;
|
||||
@@ -54,22 +58,19 @@ fail:
|
||||
}
|
||||
|
||||
void BarBoxesInit() {
|
||||
SafeWrite32(0x461266, (DWORD)boxes + 8);
|
||||
SafeWrite32(0x4612AC, (DWORD)boxes + 8);
|
||||
SafeWrite32(0x4612FE, (DWORD)boxes + 4);
|
||||
SafeWrite32(0x46133C, (DWORD)boxes + 0);
|
||||
SafeWrite32(0x461374, (DWORD)boxes + 8);
|
||||
SafeWrite32(0x4613E8, (DWORD)boxes + 8);
|
||||
for (int i = 0; i < sizeof(bboxMemAddr) / 4; i++) {
|
||||
SafeWrite32(bboxMemAddr[i], (DWORD)boxes + 8); //.mem
|
||||
}
|
||||
SafeWrite32(0x4612FE, (DWORD)boxes + 4); //.colour
|
||||
SafeWrite32(0x46133C, (DWORD)boxes + 0); //.msg
|
||||
|
||||
SafeWrite32(0x461479, (DWORD)boxes + 8);
|
||||
SafeWrite32(0x46148C, (DWORD)boxes + 8);
|
||||
SafeWrite32(0x4616BB, (DWORD)boxes + 8);
|
||||
memset(boxes, 0, 12 * 10);
|
||||
memset(boxesEnabled, 0, 5 * 4);
|
||||
memcpy(boxes, (void*)0x518FE8, 12 * 5);
|
||||
|
||||
memset(boxes, 0, 12*10);
|
||||
memset(boxesEnabled, 0, 5*4);
|
||||
memcpy(boxes, (void*)0x518FE8, 12*5);
|
||||
|
||||
for(int i=5;i<10;i++) boxes[i].msg=0x69 + i - 5;
|
||||
for (int i = 5; i < 10; i++) {
|
||||
boxes[i].msg = 0x69 + i - 5;
|
||||
}
|
||||
|
||||
SafeWrite8(0x46127C, 10);
|
||||
SafeWrite8(0x46140B, 10);
|
||||
@@ -78,22 +79,26 @@ void BarBoxesInit() {
|
||||
MakeJump(0x4615A3, DisplayBoxesHook);
|
||||
char buf[6];
|
||||
GetPrivateProfileString("Misc", "BoxBarColours", "", buf, 6, ini);
|
||||
if(strlen(buf)==5) {
|
||||
for(int i=0;i<5;i++) {
|
||||
if(buf[i]=='1') boxes[i+5].colour=1;
|
||||
if (strlen(buf) == 5) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (buf[i] == '1') {
|
||||
boxes[i + 5].colour = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int _stdcall GetBox(int i) {
|
||||
if(i<5||i>9) return 0;
|
||||
return boxesEnabled[i-5];
|
||||
int _stdcall GetBox(int i) {
|
||||
if (i < 5 || i > 9) return 0;
|
||||
return boxesEnabled[i - 5];
|
||||
}
|
||||
void _stdcall AddBox(int i) {
|
||||
if(i<5||i>9) return;
|
||||
boxesEnabled[i-5]=1;
|
||||
|
||||
void _stdcall AddBox(int i) {
|
||||
if (i < 5 || i > 9) return;
|
||||
boxesEnabled[i - 5] = 1;
|
||||
}
|
||||
|
||||
void _stdcall RemoveBox(int i) {
|
||||
if (i < 5 || i > 9) return;
|
||||
boxesEnabled[i - 5] = 0;
|
||||
}
|
||||
void _stdcall RemoveBox(int i) {
|
||||
if(i<5||i>9) return;
|
||||
boxesEnabled[i-5]=0;
|
||||
}
|
||||
+137
-2
@@ -46,6 +46,14 @@ static void __declspec(naked) PipAlarm_hack() {
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) PipStatus_hook() {
|
||||
__asm {
|
||||
call ListHoloDiskTitles_;
|
||||
mov dword ptr ds:[_holodisk], ebx;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
// corrects saving script blocks (to *.sav file) by properly accounting for actual number of scripts to be saved
|
||||
static void __declspec(naked) scr_write_ScriptNode_hook() {
|
||||
__asm {
|
||||
@@ -601,7 +609,7 @@ static void __declspec(naked) op_wield_obj_critter_adjust_ac_hook() {
|
||||
// Haenlomal
|
||||
static void __declspec(naked) MultiHexFix() {
|
||||
__asm {
|
||||
xor ecx, ecx; // argument value for make_path_func: ecx=0 (unknown arg)
|
||||
xor ecx, ecx; // argument value for make_path_func: ecx=0 (rotation data arg)
|
||||
test byte ptr ds:[ebx+0x25], 0x08; // is target multihex?
|
||||
mov ebx, dword ptr ds:[ebx+0x4]; // argument value for make_path_func: target's tilenum (end_tile)
|
||||
je end; // skip if not multihex
|
||||
@@ -611,6 +619,42 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
static const DWORD ai_move_steps_closer_run_object_ret = 0x42A169;
|
||||
static void __declspec(naked) MultiHexCombatRunFix() {
|
||||
__asm {
|
||||
test byte ptr ds:[edi + 0x25], 0x08; // is target multihex?
|
||||
jnz multiHex;
|
||||
test byte ptr ds:[esi + 0x25], 0x08; // is source multihex?
|
||||
jz runTile;
|
||||
multiHex:
|
||||
mov edx, dword ptr ds:[esp + 0x4]; // source's destination tilenum
|
||||
cmp dword ptr ds:[edi + 0x4], edx; // target's tilenum
|
||||
jnz runTile;
|
||||
add esp, 4;
|
||||
jmp ai_move_steps_closer_run_object_ret;
|
||||
runTile:
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static const DWORD ai_move_steps_closer_move_object_ret = 0x42A192;
|
||||
static void __declspec(naked) MultiHexCombatMoveFix() {
|
||||
__asm {
|
||||
test byte ptr ds:[edi + 0x25], 0x08; // is target multihex?
|
||||
jnz multiHex;
|
||||
test byte ptr ds:[esi + 0x25], 0x08; // is source multihex?
|
||||
jz moveTile;
|
||||
multiHex:
|
||||
mov edx, dword ptr ds:[esp + 0x4]; // source's destination tilenum
|
||||
cmp dword ptr ds:[edi + 0x4], edx; // target's tilenum
|
||||
jnz moveTile;
|
||||
add esp, 4;
|
||||
jmp ai_move_steps_closer_move_object_ret;
|
||||
moveTile:
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
//checks if an attacked object is a critter before attempting dodge animation
|
||||
static void __declspec(naked) action_melee_hack() {
|
||||
__asm {
|
||||
@@ -1113,6 +1157,62 @@ static void __declspec(naked) partyMemberGetCurLevel_hack() {
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) ResetPlayer_hook() {
|
||||
__asm {
|
||||
mov edx, eax;
|
||||
call stat_set_defaults_;
|
||||
mov dword ptr [edx + 0x78], 100; // critter_data.base_dr_emp
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) obj_move_to_tile_hack() {
|
||||
__asm {
|
||||
cmp ds:[_map_state], 0;
|
||||
jz map_leave;
|
||||
pop eax;
|
||||
push 0x48A74E;
|
||||
map_leave:
|
||||
mov ebx, 16;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) ai_move_steps_closer_hook() {
|
||||
__asm {
|
||||
call combat_turn_run_;
|
||||
movzx dx, word ptr [esi + 0x44]; // combat_data.results
|
||||
test dx, DAM_DEAD or DAM_KNOCKED_OUT or DAM_LOSE_TURN;
|
||||
jz end;
|
||||
mov [esi + 0x40], 0; // pobj.curr_mp (source reset ap)
|
||||
end:
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) op_obj_can_see_obj_hack() {
|
||||
__asm {
|
||||
mov eax, [esp + 0x2C - 0x28 + 4]; // source
|
||||
mov ecx, [eax + 4]; // source.tile
|
||||
cmp ecx, -1;
|
||||
jz end;
|
||||
mov eax, [eax + 0x28]; // source.elev
|
||||
mov edi, [edx + 0x28]; // target.elev
|
||||
cmp eax, edi; // check source.elev == target.elev
|
||||
retn;
|
||||
end:
|
||||
dec ecx; // reset ZF
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) ai_best_weapon_hook() {
|
||||
__asm {
|
||||
mov eax, [esp + 0xF4 - 0x10 + 4]; // prev.item
|
||||
jmp item_w_perk_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BugsInit()
|
||||
{
|
||||
@@ -1129,9 +1229,13 @@ void BugsInit()
|
||||
//}
|
||||
|
||||
// Fixes for clickability issue in Pip-Boy and exploit that allows to rest in places where you shouldn't be able to rest
|
||||
dlog("Applying fix for Pip-Boy rest exploit.", DL_INIT);
|
||||
dlog("Applying fix for Pip-Boy clickability issues and rest exploit.", DL_INIT);
|
||||
MakeCall(0x4971C7, pipboy_hack);
|
||||
MakeCall(0x499530, PipAlarm_hack);
|
||||
// Fix for clickability issue of holodisk list
|
||||
HookCall(0x497E9F, PipStatus_hook);
|
||||
SafeWrite16(0x497E8C, 0xD389); // mov ebx, edx
|
||||
SafeWrite32(0x497E8E, 0x90909090);
|
||||
dlogr(" Done", DL_INIT);
|
||||
|
||||
// Fix for "Too Many Items" bug
|
||||
@@ -1291,6 +1395,11 @@ void BugsInit()
|
||||
dlog("Applying MultiHex Pathing Fix.", DL_INIT);
|
||||
MakeCall(0x42901F, MultiHexFix);
|
||||
MakeCall(0x429170, MultiHexFix);
|
||||
// Fix for multihex critters moving too close and overlapping their targets in combat
|
||||
MakeCall(0x42A14F, MultiHexCombatRunFix);
|
||||
SafeWrite8(0x42A154, 0x90);
|
||||
MakeCall(0x42A178, MultiHexCombatMoveFix);
|
||||
SafeWrite8(0x42A17D, 0x90);
|
||||
dlogr(" Done", DL_INIT);
|
||||
//}
|
||||
|
||||
@@ -1417,4 +1526,30 @@ void BugsInit()
|
||||
|
||||
// Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt
|
||||
MakeJump(0x495FF6, partyMemberGetCurLevel_hack);
|
||||
|
||||
// Fix for player's base EMP DR not being properly initialized when creating a new character and then starting the game
|
||||
HookCall(0x4A22DF, &ResetPlayer_hook);
|
||||
|
||||
// Fix for add_mult_objs_to_inven only adding 500 of an object when the value of "count" argument is over 99999
|
||||
SafeWrite32(0x45A2A0, 0x1869F); // 99999
|
||||
|
||||
// Fix for being at incorrect hex after map change when the exit hex in source map is at the same position as
|
||||
// some exit hex in destination map
|
||||
MakeCall(0x48A704, obj_move_to_tile_hack);
|
||||
|
||||
// Fix for critters killed in combat by scripting still being able to move in their combat turn if the distance parameter
|
||||
// in their AI packages is set to stay_close/charge, or NPCsTryToSpendExtraAP is enabled
|
||||
HookCall(0x42A1A8, ai_move_steps_closer_hook); // 0x42B24D
|
||||
|
||||
// Fix for obj_can_see_obj not checking if source and target objects are on the same elevation before calling
|
||||
// is_within_perception_
|
||||
MakeCall(0x456B63, op_obj_can_see_obj_hack);
|
||||
SafeWrite16(0x456B76, 0x23EB); // jmp loc_456B9B (skip unused engine code)
|
||||
|
||||
// Fix for critters not checking weapon perks properly when searching for the best weapon
|
||||
if (GetPrivateProfileIntA("Misc", "AIBestWeaponFix", 0, ini)) {
|
||||
dlog("Applying AI best weapon choice fix.", DL_INIT);
|
||||
HookCall(0x42954B, ai_best_weapon_hook);
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ static const char* ExtraLines[] = {
|
||||
"#SFALL " VERSION_STRING,
|
||||
"",
|
||||
"sfall is free software, licensed under the GPL",
|
||||
"Copyright 2008-2017 The sfall team",
|
||||
"Copyright 2008-2018 The sfall team",
|
||||
"",
|
||||
"@Author",
|
||||
"Timeslip",
|
||||
@@ -54,6 +54,7 @@ static const char* ExtraLines[] = {
|
||||
"Slider2k",
|
||||
"Vennor",
|
||||
"Oppen",
|
||||
"Mr.Stalin",
|
||||
"",
|
||||
"@Additional thanks to",
|
||||
"Nirran",
|
||||
@@ -61,7 +62,6 @@ static const char* ExtraLines[] = {
|
||||
"MIB88",
|
||||
"Rain man",
|
||||
"Continuum",
|
||||
"Mr.Stalin",
|
||||
"Drobovik",
|
||||
"Anyone who has used sfall in their own mods",
|
||||
"The bug reporters and feature requesters",
|
||||
|
||||
@@ -244,6 +244,35 @@
|
||||
#define SKILL_OUTDOORSMAN (17)
|
||||
#define SKILL_count (18)
|
||||
|
||||
//XXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
//XX Combat Flags defines XX
|
||||
//XXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
#define DAM_KNOCKED_OUT (0x1)
|
||||
#define DAM_KNOCKED_DOWN (0x2)
|
||||
#define DAM_CRIP_LEG_LEFT (0x4)
|
||||
#define DAM_CRIP_LEG_RIGHT (0x8)
|
||||
#define DAM_CRIP_ARM_LEFT (0x10)
|
||||
#define DAM_CRIP_ARM_RIGHT (0x20)
|
||||
#define DAM_BLIND (0x40)
|
||||
#define DAM_DEAD (0x80)
|
||||
#define DAM_HIT (0x100)
|
||||
#define DAM_CRITICAL (0x200)
|
||||
#define DAM_ON_FIRE (0x400)
|
||||
#define DAM_BYPASS (0x800)
|
||||
#define DAM_EXPLODE (0x1000)
|
||||
#define DAM_DESTROY (0x2000)
|
||||
#define DAM_DROP (0x4000)
|
||||
#define DAM_LOSE_TURN (0x8000)
|
||||
#define DAM_HIT_SELF (0x10000)
|
||||
#define DAM_LOSE_AMMO (0x20000)
|
||||
#define DAM_DUD (0x40000)
|
||||
#define DAM_HURT_SELF (0x80000)
|
||||
#define DAM_RANDOM_HIT (0x100000)
|
||||
#define DAM_CRIP_RANDOM (0x200000)
|
||||
#define DAM_BACKWASH (0x400000)
|
||||
#define DAM_PERFORM_REVERSE (0x800000)
|
||||
|
||||
//XXXXXXXXXXXXXXXXXXXX
|
||||
//XX Object defines XX
|
||||
//XXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
@@ -211,9 +211,9 @@ void ResetExplosionSettings() {
|
||||
void ExplosionLightingInit() {
|
||||
MakeJump(0x411AB4, explosion_effect_hook); // required for explosions_metarule
|
||||
|
||||
if (GetPrivateProfileIntA("Misc", "ExplosionsEmitLight", 0, ini)) {
|
||||
lightingEnabled = GetPrivateProfileIntA("Misc", "ExplosionsEmitLight", 0, ini) != 0;
|
||||
if (lightingEnabled) {
|
||||
dlog("Applying Explosion changes.", DL_INIT);
|
||||
lightingEnabled = true;
|
||||
MakeJump(0x4118E1, ranged_attack_lighting_fix);
|
||||
MakeJump(0x410A4A, fire_dance_lighting_fix1);
|
||||
MakeJump(0x415A3F, anim_set_check__light_fix); // this allows to change light intensity
|
||||
|
||||
@@ -231,6 +231,7 @@ const DWORD AddHotLines_ = 0x4998C0;
|
||||
const DWORD adjust_ac_ = 0x4715F8;
|
||||
const DWORD adjust_fid_ = 0x4716E8;
|
||||
const DWORD ai_search_inven_armor_ = 0x429A6C;
|
||||
const DWORD ai_try_attack_ = 0x42A7D8;
|
||||
const DWORD art_exists_ = 0x4198C8; // eax - frameID, used for critter FIDs
|
||||
const DWORD art_flush_ = 0x41927C;
|
||||
const DWORD art_frame_data_ = 0x419870;
|
||||
@@ -256,6 +257,7 @@ const DWORD combat_attack_ = 0x422F3C;
|
||||
const DWORD combat_input_ = 0x4227F4;
|
||||
const DWORD combat_should_end_ = 0x422C60;
|
||||
const DWORD combat_turn_ = 0x42299C;
|
||||
const DWORD combat_turn_run_ = 0x4227DC;
|
||||
const DWORD compute_damage_ = 0x4247B8;
|
||||
const DWORD config_set_value_ = 0x42C160;
|
||||
const DWORD container_exit_ = 0x476394;
|
||||
@@ -369,6 +371,7 @@ const DWORD intface_use_item_ = 0x45F5EC;
|
||||
const DWORD intface_show_ = 0x45EA10;
|
||||
const DWORD intface_hide_ = 0x45E9E0;
|
||||
const DWORD intface_is_hidden_ = 0x45EA5C;
|
||||
const DWORD intface_get_attack_ = 0x45EF6C;
|
||||
const DWORD invenUnwieldFunc_ = 0x472A64;
|
||||
const DWORD invenWieldFunc_ = 0x472768;
|
||||
const DWORD inven_display_msg_ = 0x472D24;
|
||||
@@ -378,6 +381,7 @@ const DWORD inven_right_hand_ = 0x471B70;
|
||||
const DWORD inven_unwield_ = 0x472A54;
|
||||
const DWORD inven_wield_ = 0x472758;
|
||||
const DWORD inven_worn_ = 0x471C08;
|
||||
const DWORD is_pc_sneak_working_ = 0x42E3F4;
|
||||
const DWORD is_within_perception_ = 0x42BA04;
|
||||
const DWORD isPartyMember_ = 0x494FC4;
|
||||
const DWORD item_add_force_ = 0x4772B8;
|
||||
@@ -410,6 +414,7 @@ const DWORD item_w_damage_type_ = 0x478570;
|
||||
const DWORD item_w_dr_adjust_ = 0x4791E0;
|
||||
const DWORD item_w_max_ammo_ = 0x478674;
|
||||
const DWORD item_w_mp_cost_ = 0x478B24;
|
||||
const DWORD item_w_perk_ = 0x478D58;
|
||||
const DWORD item_w_range_ = 0x478A1C;
|
||||
const DWORD item_w_rounds_ = 0x478D80;
|
||||
const DWORD item_w_try_reload_ = 0x478768;
|
||||
@@ -417,6 +422,7 @@ const DWORD item_w_unload_ = 0x478F80;
|
||||
const DWORD item_weight_ = 0x477B88;
|
||||
const DWORD light_get_tile_ = 0x47A980;
|
||||
const DWORD ListDrvdStats_ = 0x43527C;
|
||||
const DWORD ListHoloDiskTitles_ = 0x498C40;
|
||||
const DWORD ListSkills_ = 0x436154;
|
||||
const DWORD ListTraits_ = 0x43B8A8;
|
||||
const DWORD loadColorTable_ = 0x4C78E4;
|
||||
@@ -544,6 +550,7 @@ const DWORD scr_set_ext_param_ = 0x4A3B34;
|
||||
const DWORD scr_set_objs_ = 0x4A3B0C;
|
||||
const DWORD scr_write_ScriptNode_ = 0x4A5704;
|
||||
const DWORD set_game_time_ = 0x4A347C;
|
||||
const DWORD setup_move_timer_win_ = 0x476AB8;
|
||||
const DWORD SexWindow_ = 0x437664;
|
||||
const DWORD skill_check_stealing_ = 0x4ABBE4;
|
||||
const DWORD skill_dec_point_ = 0x4AA8C4;
|
||||
@@ -563,6 +570,7 @@ const DWORD stat_pc_add_experience_ = 0x4AFAA8;
|
||||
const DWORD stat_pc_get_ = 0x4AF8FC;
|
||||
const DWORD stat_pc_set_ = 0x4AF910;
|
||||
const DWORD stat_set_bonus_ = 0x4AF63C;
|
||||
const DWORD stat_set_defaults_ = 0x4AF6CC;
|
||||
const DWORD stricmp_ = 0x4DECE6;
|
||||
const DWORD strncpy_ = 0x4F014F;
|
||||
const DWORD switch_hand_ = 0x4714E0;
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#define _gsound_initialized 0x518E30
|
||||
#define _hit_location_penalty 0x510954
|
||||
#define _holo_flag 0x664529
|
||||
#define _holodisk 0x6644F4
|
||||
#define _holopages 0x66445C
|
||||
#define _hot_line_count 0x6644F8
|
||||
#define _i_fid 0x59E95C
|
||||
@@ -122,6 +123,7 @@
|
||||
#define _main_window 0x5194F0
|
||||
#define _map_elevation 0x519578
|
||||
#define _map_global_vars 0x51956C
|
||||
#define _map_state 0x631D28
|
||||
#define _master_db_handle 0x58E948
|
||||
#define _max 0x56FB50
|
||||
#define _maxScriptNum 0x51C7CC
|
||||
@@ -167,11 +169,13 @@
|
||||
#define _proto_main_msg_file 0x6647FC
|
||||
#define _ptable 0x59E934
|
||||
#define _pud 0x59E960
|
||||
#define _quest_count 0x51C12C
|
||||
#define _queue 0x6648C0
|
||||
#define _quick_done 0x5193BC
|
||||
#define _read_callback 0x51DEEC
|
||||
#define _RedColor 0x6AB4D0
|
||||
#define _retvals 0x43EA7C
|
||||
#define _sad 0x530014
|
||||
#define _scr_size 0x6AC9F0
|
||||
#define _scriptListInfo 0x51C7C8
|
||||
#define _skill_data 0x51D118
|
||||
@@ -354,6 +358,7 @@ extern DWORD* ptr_quick_done;
|
||||
extern DWORD* ptr_read_callback;
|
||||
extern DWORD* ptr_RedColor;
|
||||
extern DWORD* ptr_retvals;
|
||||
extern DWORD* ptr_sad;
|
||||
extern DWORD* ptr_scr_size;
|
||||
extern DWORD* ptr_scriptListInfo;
|
||||
extern DWORD* ptr_skill_data;
|
||||
@@ -405,6 +410,7 @@ extern const DWORD AddHotLines_;
|
||||
extern const DWORD adjust_ac_;
|
||||
extern const DWORD adjust_fid_;
|
||||
extern const DWORD ai_search_inven_armor_;
|
||||
extern const DWORD ai_try_attack_;
|
||||
extern const DWORD art_exists_;
|
||||
extern const DWORD art_flush_;
|
||||
extern const DWORD art_frame_data_;
|
||||
@@ -430,6 +436,7 @@ extern const DWORD combat_attack_;
|
||||
extern const DWORD combat_input_;
|
||||
extern const DWORD combat_should_end_;
|
||||
extern const DWORD combat_turn_;
|
||||
extern const DWORD combat_turn_run_;
|
||||
extern const DWORD compute_damage_;
|
||||
extern const DWORD config_set_value_;
|
||||
extern const DWORD container_exit_;
|
||||
@@ -542,6 +549,7 @@ extern const DWORD intface_use_item_;
|
||||
extern const DWORD intface_show_;
|
||||
extern const DWORD intface_hide_;
|
||||
extern const DWORD intface_is_hidden_;
|
||||
extern const DWORD intface_get_attack_;
|
||||
extern const DWORD invenUnwieldFunc_; // (int critter@<eax>, int slot@<edx>, int a3@<ebx>) - int result (-1 on error, 0 on success)
|
||||
extern const DWORD invenWieldFunc_; // (int who@<eax>, int item@<edx>, int a3@<ecx>, int slot@<ebx>) - int result (-1 on error, 0 on success)
|
||||
extern const DWORD inven_display_msg_;
|
||||
@@ -551,6 +559,7 @@ extern const DWORD inven_right_hand_;
|
||||
extern const DWORD inven_unwield_;
|
||||
extern const DWORD inven_wield_;
|
||||
extern const DWORD inven_worn_;
|
||||
extern const DWORD is_pc_sneak_working_;
|
||||
extern const DWORD is_within_perception_;
|
||||
extern const DWORD isPartyMember_; // (<eax> - object) - bool result
|
||||
extern const DWORD item_add_force_;
|
||||
@@ -583,6 +592,7 @@ extern const DWORD item_w_damage_type_;
|
||||
extern const DWORD item_w_dr_adjust_;
|
||||
extern const DWORD item_w_max_ammo_;
|
||||
extern const DWORD item_w_mp_cost_;
|
||||
extern const DWORD item_w_perk_;
|
||||
extern const DWORD item_w_range_;
|
||||
extern const DWORD item_w_rounds_;
|
||||
extern const DWORD item_w_try_reload_;
|
||||
@@ -590,6 +600,7 @@ extern const DWORD item_w_unload_;
|
||||
extern const DWORD item_weight_;
|
||||
extern const DWORD light_get_tile_; // aElev<eax>, aTilenum<edx>
|
||||
extern const DWORD ListDrvdStats_;
|
||||
extern const DWORD ListHoloDiskTitles_;
|
||||
extern const DWORD ListSkills_;
|
||||
extern const DWORD ListTraits_;
|
||||
extern const DWORD loadColorTable_;
|
||||
@@ -720,6 +731,7 @@ extern const DWORD scr_set_ext_param_;
|
||||
extern const DWORD scr_set_objs_;
|
||||
extern const DWORD scr_write_ScriptNode_;
|
||||
extern const DWORD set_game_time_;
|
||||
extern const DWORD setup_move_timer_win_;
|
||||
extern const DWORD SexWindow_;
|
||||
extern const DWORD skill_check_stealing_;
|
||||
extern const DWORD skill_dec_point_;
|
||||
@@ -739,6 +751,7 @@ extern const DWORD stat_pc_add_experience_; // eax - amount to add
|
||||
extern const DWORD stat_pc_get_;
|
||||
extern const DWORD stat_pc_set_;
|
||||
extern const DWORD stat_set_bonus_;
|
||||
extern const DWORD stat_set_defaults_;
|
||||
extern const DWORD stricmp_;
|
||||
extern const DWORD strncpy_;
|
||||
extern const DWORD switch_hand_;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user