mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
228f8966f2 | ||
|
|
e923fa801b | ||
|
|
16dacee0e0 | ||
|
|
b4fe9b3e57 | ||
|
|
553c7cc195 | ||
|
|
61f3a2ac13 | ||
|
|
aca6c92d86 | ||
|
|
5d7015bbb5 | ||
|
|
f0ec82923d | ||
|
|
cd5c803386 | ||
|
|
c95d872f77 | ||
|
|
5c3c1ca4db | ||
|
|
cb1a3dd764 | ||
|
|
4c441d5852 | ||
|
|
53c294cf98 | ||
|
|
5394352bf0 | ||
|
|
f267224428 | ||
|
|
b189fe9252 | ||
|
|
b2c9b1cc23 | ||
|
|
0e8b6efe49 | ||
|
|
6d66bfffb0 | ||
|
|
6eeb674641 | ||
|
|
b94993d756 | ||
|
|
a2ea1910f5 | ||
|
|
ddb3cf9b6e | ||
|
|
321f8e1ab2 | ||
|
|
66559812bd | ||
|
|
f968dea5e7 | ||
|
|
664fb84dc5 | ||
|
|
74ef65335d | ||
|
|
9f6ca9d55d | ||
|
|
f42b232e19 | ||
|
|
0926ace899 | ||
|
|
b2023b7e51 | ||
|
|
1f962458cd | ||
|
|
0bb5941c98 | ||
|
|
3e4e9ff4e6 | ||
|
|
ece95a95e9 | ||
|
|
5f38744a2e | ||
|
|
c0aac45b0c | ||
|
|
d7a974c50b | ||
|
|
3f8d322697 | ||
|
|
50b51fc1a3 | ||
|
|
e1aebb21e4 | ||
|
|
a5075734cc | ||
|
|
4adb6dffe2 | ||
|
|
3b29088818 | ||
|
|
3a3760704c | ||
|
|
b619ea3fba | ||
|
|
ae7921fe26 | ||
|
|
14f6de0329 | ||
|
|
e33a025c62 | ||
|
|
20088ffcb1 | ||
|
|
cec091bda2 | ||
|
|
97c2b111ff | ||
|
|
1e4bbaedbd | ||
|
|
fce35c7e14 | ||
|
|
4d19fa2d60 | ||
|
|
0a6a604abc | ||
|
|
2cef5310e2 | ||
|
|
fe7aa9ae04 | ||
|
|
b36771da48 | ||
|
|
ad6491d61e | ||
|
|
4de5de6a0c | ||
|
|
347b4a3ecb | ||
|
|
0b161c7374 | ||
|
|
7bbc15ab0b | ||
|
|
ac02971d61 | ||
|
|
e4ea3645d6 | ||
|
|
f9dc7a3e25 | ||
|
|
3f7ce8c412 | ||
|
|
6d3afd4e7d | ||
|
|
2fcf81cb78 | ||
|
|
b8c52304eb | ||
|
|
23d1e3b9c8 | ||
|
|
7baa6de014 | ||
|
|
7bf562338c | ||
|
|
5f38a934ca | ||
|
|
3c40518e87 | ||
|
|
7939924257 | ||
|
|
dc665cb741 | ||
|
|
d7127a4deb | ||
|
|
46a80fdb6a | ||
|
|
492e31410c | ||
|
|
f5e7235a80 | ||
|
|
0fef6f1f8c | ||
|
|
4b9008d53c | ||
|
|
0d960ca326 | ||
|
|
c95d074f44 | ||
|
|
4b88bfad10 | ||
|
|
94388d3470 | ||
|
|
208cacc4dd | ||
|
|
f222348b25 | ||
|
|
49cf0e6726 | ||
|
|
d107edbb23 | ||
|
|
e9f8984819 | ||
|
|
ab0c373a9b | ||
|
|
1c34f85789 | ||
|
|
b317ed71ce | ||
|
|
9197966993 | ||
|
|
21fe99a297 | ||
|
|
ac1abf71f8 | ||
|
|
bfc9fd4d88 | ||
|
|
f755e0a1dc | ||
|
|
3d88304777 | ||
|
|
4e37fb0228 | ||
|
|
0de7614c53 | ||
|
|
d5268f3fbc | ||
|
|
19db722948 | ||
|
|
c2dde7485a | ||
|
|
c73f311b22 | ||
|
|
000816acb5 | ||
|
|
37e7af2a17 | ||
|
|
befea69909 | ||
|
|
a3cfc481a5 | ||
|
|
c9034f917b | ||
|
|
5b9e90100d | ||
|
|
427a978bb4 | ||
|
|
e6e941e14c | ||
|
|
493003af54 | ||
|
|
1683678657 | ||
|
|
a05207cc83 | ||
|
|
00b85bec49 | ||
|
|
571955fbcb | ||
|
|
f4e3049a0f | ||
|
|
184af43928 | ||
|
|
32e9642f90 | ||
|
|
59310dec6d | ||
|
|
55c5c815f8 | ||
|
|
a4d6687aab |
@@ -26,6 +26,7 @@
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
!ducible.exe
|
||||
|
||||
# NetBeans
|
||||
nbproject/private/
|
||||
|
||||
+44
-11
@@ -1,5 +1,38 @@
|
||||
# Changelog
|
||||
|
||||
## 4.4
|
||||
* Implemented a `mods_order.txt` to improve and simplify mod ordering and add support for mod managers. This replaces previous **.dat** file autoloading. Please refer to `ddraw.ini` for details
|
||||
* Implemented a **custom config file parser**, which greatly improves the performance of sfall initialization and reading files from scripts
|
||||
* **Item highlighting and NPC combat control mods** are now packed into `sfall.dat` resource file, and `sfall-mods.ini` is moved to `<GameRoot>\mods\`
|
||||
* Fixed a bug when updating the maximum HP stat of critters on the map when loaded for the first time
|
||||
* Fixed `set_pc_base/extra_stat` and `set_critter_base/extra_stat` script functions not updating derived stats when setting SPECIAL stats
|
||||
* Fixed `wield_obj_critter` script function, which can now put non-weapon/armor items in the critter's hand
|
||||
* Fixed `get_tile_fid` script function to work on elevations 1 and 2 instead of always elevation 0
|
||||
* Fixed `create_spatial` script function not setting the script index number upon object creation
|
||||
* Fixed incorrect behavior of the subtraction operator involving floats and negative integers
|
||||
* Fixed the backward compatibility of `get_npc_level` script function
|
||||
* Fixed a crash bug in `display_msg` and `debug_msg` script functions when printing a string longer than 260 characters
|
||||
* Fixed a crash bug in `AMMOCOST` hook when returning ammo cost of 0 for burst attacks
|
||||
* Fixed various issues in script compiler and decompiler (`compile.exe` and `int2ssl.exe` in the **modders pack**)
|
||||
* Improved **item highlighting mod** to handle the line-of-sight check properly when the player is moving while holding down the key
|
||||
* Improved and tweaked the behavior of **ComputeSpray_\*** options
|
||||
* Expanded `atoi` script function to support parsing binary strings
|
||||
* Expanded `string_format` script function to support more arguments and conversion types
|
||||
* Changed **CheckWeaponAmmoCost** to be enabled by default and affect only hook type 1 of `HOOK_AMMOCOST` hook script
|
||||
* Changed how `HOOK_DESCRIPTIONOBJ` hook script handles its return value. Now you can return normal strings directly in the hook
|
||||
* Re-added the check for valid objects to `get/set_object_data` script functions (only disabled in combat for accessing the combat data)
|
||||
* Removed the debug message about a missing critter art file from displaying in the game (added in 4.2.2)
|
||||
* Added options to override the names of sound files used by the engine
|
||||
* Added an option to **item highlighting mod** to highlight critters with the same rules as in combat, and changed **CheckLOS** to be enabled by default
|
||||
* Added a debug option to duplicate logs to a dedicated console window alongside the game window
|
||||
* Added a lower limit of -99% and an upper limit of 999% to the hit chance value to prevent a display issue
|
||||
* Added more options for tweaking some engine perks to the **perks ini file**
|
||||
* Added a new argument and a new return value to `HOOK_STEAL` hook script
|
||||
* Added a burst control example script and a resting encounters mod to the example mods in the **modders pack**
|
||||
* Updated the compute damage example script in the **modders pack**. Now it should be easier to write one's own damage formula
|
||||
* Increased the setting range of the combat speed slider in the preferences screen
|
||||
* New script functions: `set_spray_settings`, `get/set_combat_free_move`, `get_ini_config`, `string_find`
|
||||
|
||||
## 4.3.8
|
||||
* Fixed a bug introduced in 4.2.8 that broke the arguments of `HOOK_RESTTIMER` hook script
|
||||
* Fixed a bug introduced in 4.3.1 that caused the game to display incorrect names for corpses in some cases
|
||||
@@ -44,7 +77,7 @@
|
||||
* HRP: Added support for **SPLASH_SCRN_TIME** option in `f2_res.ini`
|
||||
* Fixed the handling of obsolete script functions that are still recognized by script compiler and decompiler
|
||||
* Fixed **NPC combat control mod** not redrawing the interface bar properly when it's the player's turn again
|
||||
* Improved the fix for updating the HP stats of critters on the map when loaded for the first time
|
||||
* Improved the fix for updating the maximum HP stat of critters on the map when loaded for the first time
|
||||
* Removed **DivisionOperatorFix** from `ddraw.ini` because there is little reason to turn it off
|
||||
* Removed **ComputeSprayMod** from `ddraw.ini`. Now **ComputeSpray_\*** options no longer require a master switch
|
||||
* Added a fix for a crash when the player equips a weapon overloaded with ammo
|
||||
@@ -129,7 +162,7 @@
|
||||
* Added missing sounds for the buttons on the world map interface (similar to Fallout 1 behavior)
|
||||
* Added 5 `metarule3` macros for controlling the save slot with scripts to `sfall.h` in the **modders pack**
|
||||
* New script functions: `set_scr_name`, `obj_is_openable`
|
||||
* Updated **NPC armor appearance mod** to prevent NPCs from equipping **unusable** weapons
|
||||
* Updated **NPC armor appearance mod** in the **modders pack** to prevent NPCs from equipping **unusable** weapons
|
||||
* Included Brazilian Portuguese and Polish translation (from Felipefpl and Jaiden)
|
||||
|
||||
## 4.3.0.2
|
||||
@@ -212,7 +245,7 @@
|
||||
* Added an option about the behavior of maximum HP calculation to the **stats ini file**
|
||||
* Added 3 new attribute type values to `get_window_attribute` script functions
|
||||
* Added additional universal opcodes `sfall_func7` and `sfall_func8` (`compile.exe` and `int2ssl.exe` in the **modders pack** are also updated)
|
||||
* Added a new mode to **NPC combat control mod** to let you order party members to attack specified targets instead of controlling them directly
|
||||
* Added a new mode to **NPC combat control mod** that lets you use the command cursor to specify targets for party members to attack in combat
|
||||
* Added an auto-close containers mod to the example mods in the **modders pack**
|
||||
* Added `snd2acm_fix.exe` (snd2acm with a fix wrapper) to the **modders pack** for writing the correct sample rate and channel info from **WAV** files to **ACM** format
|
||||
* New script functions: `interface_overlay`
|
||||
@@ -289,7 +322,7 @@
|
||||
* Improved the pathfinding in the engine function when a multihex object is in the line of fire
|
||||
* Improved the functionality of `display_stats` script function to also update player's stats on the character screen
|
||||
* Improved the fix for incorrect positioning after exiting small/medium locations
|
||||
* Removed **AutoSearchPath** from `ddraw.ini`. Now the folder path for autoloading custom files is the fixed **\<GameRoot\>\mods\\**
|
||||
* Removed **AutoSearchPath** from `ddraw.ini`. Now the directory for autoloading custom files is the fixed `<GameRoot>\mods\`
|
||||
* Added a fix to prevent critters from overlapping other object tiles when moving to the retargeted tile
|
||||
* Added a fix to prevent showing an empty perk selection window (crash when clicking on the empty perk list)
|
||||
* Added a fix for NPC stuck in an animation loop in combat when trying to move close to a multihex critter
|
||||
@@ -355,7 +388,7 @@
|
||||
* Added a fix for the barter button on the dialog window not animating until after leaving the barter screen
|
||||
* Added a fix for the division operator treating negative integers as unsigned
|
||||
* Added a fix for trying to loot corpses with the **'NoSteal'** flag set
|
||||
* Added an option to allow using the special `'^'` character in dialog msg files to specify the alternative text that will be displayed in the dialogue based on the player's gender
|
||||
* Added an option to allow using the caret character `'^'` in dialog msg files to specify alternative text in dialogue based on the player's gender
|
||||
* Added options to draw a dotted line while traveling on the world map (similar to Fallout 1, from Ghosthack)
|
||||
* Added an option to display terrain types when hovering the cursor over the player's marker on the world map (from Ghosthack)
|
||||
* Added a flashing icon to the Horrigan encounter and scripted force encounters by default
|
||||
@@ -372,7 +405,7 @@
|
||||
* Fixed and improved the functionality of `substr` script function
|
||||
* Restored and fixed **RemoveWindowRounding** option that was removed in 4.1.2
|
||||
* Improved the functionality of `inventory_redraw` script function
|
||||
* Changed the way **IniConfigFolder** works. Now the game will search for the ini files relative to the specified directory
|
||||
* Changed the way **IniConfigFolder** works. Now the game will search for ini files relative to the specified directory
|
||||
* Changed the debug message about a missing critter art file to also be displayed in the game
|
||||
* Code refactoring for various script functions
|
||||
* Added a fix to prevent the player from moving when clicking on a script-created window and prevent the mouse cursor from being toggled when hovering over a **'hidden'** window
|
||||
@@ -488,7 +521,7 @@
|
||||
* Added a fix for knocked down critters not playing stand up animation when the combat ends
|
||||
* Added a fix for dead NPCs reloading their weapons when the combat ends
|
||||
* Added an option to use the expanded world map interface (requires hi-res patch v4.1.8)
|
||||
* Added an option to allow setting a folder path for the game to automatically search and load custom **.dat** files
|
||||
* Added an option to allow setting a directory for the game to automatically search and load custom **.dat** files
|
||||
* Added an option to expand the number of action points displayed on the interface bar
|
||||
* Added an option to change the base value of the duration of the knockout effect
|
||||
* Added a check for the `DAM_KNOCKED_OUT` flag to `wield_obj_critter/inven_unwield` script functions
|
||||
@@ -511,7 +544,7 @@
|
||||
* Changed `create_message_window` script function to be available when other game interfaces are opened
|
||||
* Removed **DialogOptions9Lines** from `ddraw.ini` because there is little reason to turn it off
|
||||
* Removed **LoadProtoMaxLimit** from `ddraw.ini`. Now the proto limit is automatically increased when needed
|
||||
* Added a fix for party member's stats being reset to the base level when their base protos with the read-only attribute set are placed in the **proto\critters\\** directory
|
||||
* Added a fix for party member's stats being reset to the base level when their base protos with the read-only attribute set are placed in the `proto\critters\` directory
|
||||
* Added a fix for NPC stuck in a loop of picking up items in combat and the incorrect message being displayed when the NPC cannot pick up an item due to not enough space in the inventory
|
||||
* Added a fix to allow fleeing NPC to use drugs
|
||||
* Added a fix for AI not checking minimum HP properly for using stimpaks
|
||||
@@ -531,7 +564,7 @@
|
||||
* Fixed fake perks not stacking properly
|
||||
* Fixed the position of the 32-bit talking heads when the game resolution is higher than 640x480
|
||||
* Fixed a bug in **item highlighting** that caused items to be kept highlighted when picking them up while holding the highlight key
|
||||
* Changed `hero_select_win` function to require an `AppHeroWin.frm` file (included in the **modders pack**) in the **art\intrface\\** directory
|
||||
* Changed `hero_select_win` function to require an `AppHeroWin.frm` file (included in the **modders pack**) in the `art\intrface\` directory
|
||||
* Added a fix for unexplored areas being revealed on the automap when entering a map
|
||||
* Added a fix for the overflow of the automap tables when the number of maps in `maps.txt` is more than 160
|
||||
* Added a fix for a duplicate `obj_dude` script being created when loading a saved game
|
||||
@@ -767,8 +800,8 @@ Original engine bug fixes and various features based on the work by Mr.Stalin:
|
||||
* The build environment is now **Visual Studio 2015**, and Win XP SP2 and Win 2000 are no longer supported
|
||||
* Extensive code reorganizing/rewrite was made in the effort to tidy up sfall code base accumulated over the years and make it easier to read, understand, and extend. Main code was split into separate **'modules'**. Code for interacting with Fallout 2 engine was moved and expanded to allow for engine manipulations without using too much Assembly code
|
||||
* Fixed an issue with the game being rendered before the **hero appearance mod** is loaded
|
||||
* **Item highlighting mod** was moved from sfall into a separate script (`gl_highlighting.int`) and extended with new options
|
||||
* **NPC combat control mod** was moved from sfall into a separate script (`gl_partycontrol.int`)
|
||||
* **Item highlighting mod** is moved from sfall into a separate script (`gl_highlighting.int`) and extended with new options
|
||||
* **NPC combat control mod** is moved from sfall into a separate script (`gl_partycontrol.int`)
|
||||
* Related options of **item highlighting** and **NPC combat control** mods were moved from `ddraw.ini` into a separate `sfall-mods.ini`
|
||||
* A new version of **NPC armor appearance mod** was implemented as a separate script (`gl_npcarmor.int` in the **modders pack**). It can be configured and made compatible with any Fallout 2 mod
|
||||
* Improved compatibility between **hero appearance**, **NPC combat control**, and **NPC armor appearance** mods
|
||||
|
||||
@@ -21,7 +21,7 @@ Original description: A set of engine modifications for the classic game Fallout
|
||||
|
||||
- Download `sfall_*.7z` from the [release archive](https://sourceforge.net/projects/sfall/files/).
|
||||
|
||||
- Extract `ddraw.dll`, `ddraw.ini`, `sfall-mods.ini`, `sfall.dat`, and `data` folder to Fallout's base directory (i.e. the one that contains `fallout2.exe`).
|
||||
- Extract `ddraw.dll`, `ddraw.ini`, `sfall.dat`, and the `mods` folder to Fallout's base directory (i.e. the one that contains `fallout2.exe`). Also, remove `gl_highlighting.int` and `gl_partycontrol.int` from Fallout's `data\scripts\` directory if you are updating from an older version.
|
||||
|
||||
- __Important Note:__\
|
||||
If you are using a mod that already included sfall (e.g. killap's [Unofficial Patch](https://github.com/BGforgeNet/Fallout2_Unofficial_Patch) or [Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project)), then that mod has probably included a custom modified `ddraw.ini`. In that case, overwriting it with sfall's vanilla `ddraw.ini` will be likely break your game. Instead, only overwrite `ddraw.dll`, and keep the mod's existing copy of `ddraw.ini`. (Or, if you know what you're doing, you can merge them together by hand.)
|
||||
@@ -30,7 +30,7 @@ Original description: A set of engine modifications for the classic game Fallout
|
||||
|
||||
## Uninstallation
|
||||
|
||||
Delete `ddraw.dll`, `ddraw.ini`, `sfall-mods.ini`, and `sfall.dat` from your Fallout directory. Also, delete `gl_highlighting.int` and `gl_partycontrol.int` from Fallout's `data\scripts\` directory.
|
||||
Delete `ddraw.dll`, `ddraw.ini`, and `sfall.dat` from your Fallout directory, and delete `sfall-mods.ini` from the `mods` folder.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -42,6 +42,20 @@ In a default installation using an unmodified copy of `ddraw.ini`, the middle mo
|
||||
For [__Wine__](https://www.winehq.org/) users:\
|
||||
You need to set DLL overrides for `ddraw.dll` to __"native, builtin"__ in `winecfg` or use `WINEDLLOVERRIDES="ddraw=n,b"` to run Fallout from the command line. If you want to play alternative sound files, you'll also need to install GStreamer Good 32-bit plugins.
|
||||
|
||||
## Build Instructions
|
||||
|
||||
### Prerequisites:
|
||||
|
||||
* Visual Studio 2015 with **Windows XP support for C++** component. If you're using Visual Studio 2017/2019/2022, make sure to install **VS 2015 C++ build tools (v140)**.
|
||||
* [DirectX SDK (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=6812). You will also need `ddraw.lib` from DXSDK February 2010 and `dinput.lib` from DXSDK August 2007. Both files can be found in the [DirectX SDK Collection repo](https://github.com/NovaRain/DXSDK_Collection).
|
||||
* [DirectX Runtime (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=8109). You can also install it from DirectX SDK installer.
|
||||
|
||||
### Steps:
|
||||
|
||||
1. Set up a `postbuild.cmd` using the template from the repo.
|
||||
2. Open the solution file and build with the **ReleaseXP** configuration (this is the one used for sfall releases).
|
||||
3. If everything is set up correctly, you should have a new sfall `ddraw.dll` in your Fallout 2 directory.
|
||||
|
||||
## Additional info
|
||||
|
||||
* [Changelog](CHANGELOG.md)
|
||||
|
||||
+7
-7
@@ -82,7 +82,7 @@ runs:
|
||||
#
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
echo "::set-output name=dir::$(cygpath --windows "$DXSDK_DIR/DXSDK_Jun2010/")"
|
||||
echo "dir=$(cygpath --windows "$DXSDK_DIR/DXSDK_Jun2010/")" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
# MSBuild is not in PATH on Windows machines
|
||||
@@ -93,7 +93,7 @@ runs:
|
||||
echo "::group::Prepare MSBuild"
|
||||
|
||||
MSBUILD_EXE="$("/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild/**/Bin/MSBuild.exe)"
|
||||
echo "::set-output name=exe::$MSBUILD_EXE"
|
||||
echo "exe=$MSBUILD_EXE" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "::endgroup::"
|
||||
shell: bash
|
||||
@@ -106,10 +106,10 @@ runs:
|
||||
echo ::group::Build ReleaseXP
|
||||
|
||||
#
|
||||
echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
||||
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
||||
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=ReleaseXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
||||
#
|
||||
echo "::set-output name=ddraw-dll::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")"
|
||||
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
@@ -126,11 +126,11 @@ runs:
|
||||
echo "::group::Build DevXP"
|
||||
|
||||
#
|
||||
echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
||||
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
||||
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=DevXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
||||
#
|
||||
echo "::set-output name=ddraw-dll::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")"
|
||||
echo "::set-output name=ddraw-pdb::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.pdb")"
|
||||
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
||||
echo "ddraw-pdb=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.pdb")" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -7,10 +7,39 @@
|
||||
; be used to remove their hardcoded effects, and add new stat/skill effects
|
||||
|
||||
[PerksTweak]
|
||||
;Changes the Outdoorsman skill bonus for 'Survivalist' perk (ID 16)
|
||||
;125 - maximum bonus, 25 - default bonus
|
||||
SurvivalistBonus=25
|
||||
|
||||
;Changes the bonus for 'Master Trader' perk (ID 17)
|
||||
;25 - default bonus
|
||||
MasterTraderBonus=25
|
||||
|
||||
;Changes the Science and Repair skill bonus for 'Mr.Fixit' perk (ID 31)
|
||||
;125 - maximum bonus, 10 - default bonus
|
||||
MrFixitBonus=10
|
||||
|
||||
;Changes the skill bonuses for 'Medic' perk (ID 32)
|
||||
;125 - maximum bonus, 10 - default bonus
|
||||
MedicFirstAidBonus=10
|
||||
MedicDoctorBonus=10
|
||||
|
||||
;Changes the Lockpick and Steal skill bonus for 'Master Thief' perk (ID 33)
|
||||
;125 - maximum bonus, 15 - default bonus
|
||||
MasterThiefBonus=15
|
||||
|
||||
;Changes the Speech skill bonus for 'Speaker' perk (ID 34)
|
||||
;125 - maximum bonus, 20 - default bonus
|
||||
SpeakerBonus=20
|
||||
|
||||
;Changes the Sneak skill bonus (when in darkness) for 'Ghost' perk (ID 38)
|
||||
;125 - maximum bonus, 20 - default bonus
|
||||
GhostBonus=20
|
||||
|
||||
;Changes the Outdoorsman skill bonus for 'Ranger' perk (ID 47)
|
||||
;125 - maximum bonus, 15 - default bonus
|
||||
RangerOutdoorsmanBonus=15
|
||||
|
||||
;Changes the distance bonus for 'Weapon Long Range' weapon perk (ID 58)
|
||||
;2 - no bonus, 4 - default bonus
|
||||
WeaponLongRangeBonus=4
|
||||
@@ -34,9 +63,22 @@ VaultCityInoculationsRadBonus=10
|
||||
;999 - maximum bonus, 10 - default bonus
|
||||
DemolitionExpertBonus=10
|
||||
|
||||
;Changes the damage bonus for 'Living Anatomy' perk (ID 97)
|
||||
;125 - maximum bonus, 5 - default bonus
|
||||
;Changes the Gambling skill bonus for 'Gambler' perk (ID 83)
|
||||
;125 - maximum bonus, 20 - default bonus
|
||||
GamblerBonus=20
|
||||
|
||||
;Changes the Steal skill bonus for 'Harmless' perk (ID 91)
|
||||
;125 - maximum bonus, 20 - default bonus
|
||||
HarmlessBonus=20
|
||||
|
||||
;Changes the damage bonus and the Doctor skill bonus for 'Living Anatomy' perk (ID 97)
|
||||
;125 - maximum bonus, 5 - default bonus, 10 - default skill bonus
|
||||
LivingAnatomyBonus=5
|
||||
LivingAnatomyDoctorBonus=10
|
||||
|
||||
;Changes the Speech and Barter skill bonus for 'Negotiator' perk (ID 99)
|
||||
;125 - maximum bonus, 10 - default bonus
|
||||
NegotiatorBonus=10
|
||||
|
||||
;Changes the damage bonus for 'Pyromaniac' perk (ID 101)
|
||||
;125 - maximum bonus, 5 - default bonus
|
||||
@@ -50,10 +92,23 @@ SalesmanBonus=20
|
||||
;valid range: 0..100, 50 - default percent
|
||||
StonewallPercent=50
|
||||
|
||||
;Changes the Lockpick, Steal, and Traps skill bonus for 'Thief' perk (ID 105)
|
||||
;125 - maximum bonus, 10 - default bonus
|
||||
ThiefBonus=10
|
||||
|
||||
;Changes the strength bonus for 'Weapon Handling' perk (ID 106)
|
||||
;0 - no bonus, 10 - maximum bonus, 3 - default bonus
|
||||
WeaponHandlingBonus=3
|
||||
|
||||
;Changes the skill bonuses for 'Vault City Training' perk (ID 107)
|
||||
;125 - maximum bonus, 5 - default bonus
|
||||
VaultCityTrainingFirstAidBonus=5
|
||||
VaultCityTrainingDoctorBonus=5
|
||||
|
||||
;Changes the Speech skill bonus for 'Expert Excrement Expeditor' perk (ID 116)
|
||||
;125 - maximum bonus, 5 - default bonus
|
||||
ExpertExcrementExpeditorBonus=5
|
||||
|
||||
;##############################################################################
|
||||
[Perks]
|
||||
;Set to 1 to enable the modifications for perks
|
||||
|
||||
@@ -9,10 +9,13 @@ Containers=0
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=0
|
||||
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
CheckLOS=0
|
||||
; Set to 1 to also highlight critters, with the same rules as in combat
|
||||
Critters=0
|
||||
|
||||
; Set the color of outlines, available colors:
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
CheckLOS=1
|
||||
|
||||
; Set the color of outlines for items, corpses, and containers; available colors:
|
||||
; 1 - glowing red
|
||||
; 2 - red
|
||||
; 4 - grey
|
||||
@@ -20,7 +23,7 @@ CheckLOS=0
|
||||
; 16 - bright yellow
|
||||
; 32 - dark yellow
|
||||
; 64 - purple
|
||||
; You can set a custom color from the game palette by multiplying the color index value by 256 (available since sfall 4.2.7)
|
||||
; You can set a custom color from the game palette by multiplying the color index value by 256 (in 4.2.7 or later)
|
||||
OutlineColor=16
|
||||
|
||||
; Motion Scanner mode:
|
||||
@@ -31,11 +34,11 @@ MotionScanner=0
|
||||
|
||||
|
||||
[CombatControl]
|
||||
;Allows you to directly control other critters in combat
|
||||
;Allows you to control other critters directly in combat
|
||||
;Set to 0 to disable
|
||||
;Set to 1 to control all critters in combat (allowed only in sfall debugging mode)
|
||||
;Set to 2 to control all party members
|
||||
;Set to 3 to let you order party members to attack specified targets after your first attack instead of controlling them directly
|
||||
;Set to 3 to let you use the command cursor to specify targets for party members to attack in combat
|
||||
Mode=0
|
||||
;If you want to control only specific critters, uncomment the PIDList line and set a comma delimited list of PIDs
|
||||
;PIDList=62,89,97,107,160,161
|
||||
|
||||
+57
-29
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.3.8
|
||||
;v4.4
|
||||
|
||||
[Main]
|
||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||
@@ -19,14 +19,19 @@ UseCommandLine=0
|
||||
;This section allows you to set multiple paths to folders containing mods or patches
|
||||
;Paths to folders and Fallout .dat files are supported
|
||||
;The PatchFileXX options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
|
||||
;Starting from 4.2.6, the game will automatically search and load custom .dat files (or folders named as .dat files) from <GameRoot>\mods\
|
||||
;The load order of files in the folder will be in reverse alphabetical order of the filenames
|
||||
;Autoloaded files will have a higher priority than the files specified in the PatchFileXX options
|
||||
;The complete data load order is:
|
||||
;master_patches > critter_patches > mods > PatchFile99..PatchFile0 > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;Starting from 4.4/3.8.40, the game will load custom .dat files and folders from <GameRoot>\mods\mods_order.txt
|
||||
;The files and folders in mods_order.txt will have a higher priority than the PatchFileXX options
|
||||
;The complete order of how the engine loads game data is:
|
||||
;master_patches > critter_patches > mods_order.txt > PatchFileXX > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;PatchFile0=mods\RP_data
|
||||
;PatchFile1=
|
||||
|
||||
;Some details about mods_order.txt:
|
||||
;If mods_order.txt does not exist, sfall will create one in <GameRoot>\mods\
|
||||
;To install a new mod, copy the file/folder to <GameRoot>\mods\ and add its name to mods_order.txt
|
||||
;Mods will be loaded line by line from top to bottom. You can change the load order in a text editor
|
||||
;To disable a mod temporarily, you can comment it out by adding a ';' or '#' to the beginning of the line
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Speed]
|
||||
;Set to 1 to enable options related to the game speed adjustment (SpeedMulti#, SpeedKey#, SpeedModKey, and SpeedToggleKey)
|
||||
@@ -65,7 +70,7 @@ GraphicsWidth=0
|
||||
GraphicsHeight=0
|
||||
|
||||
;Window position data. Do not modify
|
||||
;Set to -1 or 0 to reset if the window position is incorrect
|
||||
;Set to -1 or 0 to reset the window position to the center or top-left corner
|
||||
WindowData=-1
|
||||
|
||||
;Uncomment the option to use a hardware shader (requires DX9 graphics mode)
|
||||
@@ -85,7 +90,7 @@ TextureFilter=1
|
||||
GPUBlt=0
|
||||
|
||||
;Set to 1 to allow using 32-bit textures for talking heads
|
||||
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (w/o extension)
|
||||
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (without extension)
|
||||
;The files in the folder should be numbered according to the number of frames in the talking head FRM file (0.png, 1.png, etc.)
|
||||
;See the text file in the modders pack for a detailed description
|
||||
;Requires DX9 graphics mode and v2.0 pixel shader support (see GPUBlt option)
|
||||
@@ -150,6 +155,15 @@ OverrideMusicDir=1
|
||||
;This will slightly increase the startup time of the game on older computers
|
||||
AutoSearchSFX=1
|
||||
|
||||
;Uncomment these lines to override the names of sound files used by the engine
|
||||
;Filenames are limited to 8 characters (without extension)
|
||||
;MainMenuMusic=07desert
|
||||
;WorldMapMusic=23world
|
||||
;WorldMapCarMusic=20car
|
||||
;EndGameMovieMusic0=akiss
|
||||
;EndGameMovieMusic1=10labone
|
||||
;MapLoadingSound=wind2
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through the inventory, barter, and loot screens
|
||||
@@ -277,9 +291,9 @@ UseFileSystemOverride=0
|
||||
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
|
||||
;PatchFile=patch%03d.dat
|
||||
|
||||
;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 > extra_patches > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;Set to 1 to change the order of how the engine loads game data
|
||||
;Old: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
|
||||
;New: master_patches > critter_patches > [ExtraPatches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only
|
||||
DataLoadOrderPatch=1
|
||||
|
||||
@@ -287,21 +301,20 @@ DataLoadOrderPatch=1
|
||||
;Set to 2 to also load subtitle files from text\<language>\cuts_female\ for female PC
|
||||
FemaleDialogMsgs=0
|
||||
|
||||
;Set to 1 to allow using the special '^' character in dialog msg files to specify the alternative text
|
||||
;that will be displayed in the dialogue based on the player's gender
|
||||
;Set to 1 to allow using the caret character '^' in dialog msg files to specify alternative text in dialogue based on the player's gender
|
||||
;The text must be enclosed in angle brackets (example: <MaleText^FemaleText>)
|
||||
DialogGenderWords=0
|
||||
|
||||
;To change the default and starting player models, uncomment the next four lines.
|
||||
;The default models can also be changed ingame via script
|
||||
;The default models can also be changed in-game via script
|
||||
;MaleStartModel=hmwarr
|
||||
;MaleDefaultModel=hmjmps
|
||||
;FemaleStartModel=hfprim
|
||||
;FemaleDefaultModel=hfjmps
|
||||
|
||||
;To change the various ingame movies, modify the next 17 lines
|
||||
;To change the various in-game movies, modify the next 17 lines
|
||||
;You can also define additional movies by adding Movie18 - Movie32 lines
|
||||
;Most of these can also be changed ingame via script
|
||||
;Most of these can also be changed in-game via script
|
||||
Movie1=iplogo.mve
|
||||
Movie2=intro.mve
|
||||
Movie3=elder.mve
|
||||
@@ -515,7 +528,7 @@ ScienceOnCritters=0
|
||||
;Default is 166 (lower - faster; valid range: 0..1000)
|
||||
SpeedInventoryPCRotation=166
|
||||
|
||||
;Modify the number of the extra interface boxes available to modders. (Default is 5, and the maximum is 95)
|
||||
;Modify the number of the extra interface boxes available to modders (Default is 5, and the maximum is 95)
|
||||
BoxBarCount=5
|
||||
|
||||
;Uncomment to set the text colour of the extra interface boxes
|
||||
@@ -528,10 +541,10 @@ BonusHtHDamageFix=1
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
DisplayBonusDamage=0
|
||||
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||
;Modify the maximum number of animations allowed to run on a map (Default is 32, and the maximum is 127)
|
||||
AnimationsAtOnceLimit=64
|
||||
|
||||
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
|
||||
;Set to 1 to remove the limits that stop the game from rolling critical successes/failures in the first few days of game time
|
||||
RemoveCriticalTimelimits=0
|
||||
|
||||
;Change the colour of the font used on the main menu for the Fallout/sfall version string and copyright text
|
||||
@@ -617,10 +630,10 @@ ExplosionsEmitLight=0
|
||||
;MovieTimer_artimer3=270
|
||||
;MovieTimer_artimer4=360
|
||||
|
||||
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
|
||||
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
|
||||
;Set to 1 to add proper checks for ammo before attacking
|
||||
;By default, a weapon can perform an attack with at least one ammo, regardless of ammo cost calculation
|
||||
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
|
||||
CheckWeaponAmmoCost=0
|
||||
CheckWeaponAmmoCost=1
|
||||
|
||||
;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
|
||||
CombatPanelAnimDelay=1000
|
||||
@@ -741,7 +754,7 @@ AIBestWeaponFix=1
|
||||
|
||||
;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
|
||||
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
|
||||
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
|
||||
;Note: chem_primary_desire without fixes prevents the specified item from being consumed if all three values in the list are the same PID
|
||||
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
|
||||
AIDrugUsePerfFix=0
|
||||
|
||||
@@ -809,10 +822,9 @@ DisableSpecialAreas=0
|
||||
;Paths outside of scripts folder are supported
|
||||
GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
|
||||
|
||||
;Uncomment the option to specify an additional folder path for ini files used by scripts
|
||||
;The game will search for the ini files relative to this directory
|
||||
;If the file is not found, the search will proceed relative to the root directory of the game
|
||||
;The maximum length of the specified path is 61 characters
|
||||
;Uncomment the option to specify an additional directory for ini files used by scripts
|
||||
;The game will search for ini files first relative to this directory and then relative to the root directory if not found
|
||||
;The path length is limited to 61 characters
|
||||
;IniConfigFolder=mods\iniConfigs
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
@@ -838,7 +850,7 @@ AllowUnsafeScripting=0
|
||||
SkipCompatModeCheck=0
|
||||
|
||||
;Fallout 2 Debug Patch
|
||||
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and debug.log
|
||||
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both
|
||||
;Does not require sfall debugging mode
|
||||
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg
|
||||
;-------
|
||||
@@ -876,7 +888,7 @@ AlwaysFindScripts=0
|
||||
Test_ForceFloats=0
|
||||
|
||||
;These options control what output is saved in the debug log (sfall-log.txt)
|
||||
;Prints messages duing sfall initialization
|
||||
;Prints messages during sfall initialization
|
||||
Init=1
|
||||
;Prints messages relating to hook scripts
|
||||
Hook=0
|
||||
@@ -886,3 +898,19 @@ Script=0
|
||||
Criticals=1
|
||||
;Prints messages relating to engine fixes
|
||||
Fixes=1
|
||||
|
||||
;Duplicates logs to a dedicated console window alongside the game window
|
||||
;This option uses bit flags to control the types of messages to be shown
|
||||
;All types other than sfall log (bit 1) require DebugMode to be enabled
|
||||
;1 (bit 0) - debug output from the engine
|
||||
;2 (bit 1) - sfall log
|
||||
;4 (bit 2) - messages from debug_msg script function
|
||||
;8 (bit 3) - messages from display_msg script function
|
||||
ConsoleWindow=0b0000
|
||||
|
||||
;Console window position and size data. Do not modify
|
||||
;Clear the data to reset the window position and size
|
||||
ConsoleWindowData=
|
||||
|
||||
;Set the code page for the console window (Default is your system code page)
|
||||
ConsoleCodePage=0
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
A basic example of how to use set_spray_settings function for script-based burst control
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
|
||||
procedure start;
|
||||
procedure ammocost_handler;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_AMMOCOST, ammocost_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure ammocost_handler begin
|
||||
variable
|
||||
weapon := get_sfall_arg,
|
||||
bullets := get_sfall_arg,
|
||||
cost := get_sfall_arg,
|
||||
event := get_sfall_arg;
|
||||
|
||||
if (event == 2 and weapon > 0) then begin // when calculating number of burst rounds
|
||||
if (obj_pid(weapon) == PID_ASSAULT_RIFLE) then begin
|
||||
set_spray_settings(1, 1, 1, 1); // burst attack will not hit other targets
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,28 +1,69 @@
|
||||
/*
|
||||
Example algorithm of how the game engine calculates combat damage
|
||||
This script reimplements the combat damage calculation of the original game.
|
||||
Use this to implement your own damage formula!
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
#include "../sfall/define_lite.h"
|
||||
#include "../sfall/define_extra.h"
|
||||
#include "../sfall/sfall.h"
|
||||
|
||||
#define DAMAGE_FORMULA_VANILLA (0)
|
||||
#define DAMAGE_FORMULA_GLOVZ (1)
|
||||
#define DAMAGE_FORMULA_GLOVZ2 (2)
|
||||
#define DAMAGE_FORMULA_YAAM (5)
|
||||
|
||||
procedure start;
|
||||
procedure compute_damage_F2;
|
||||
procedure item_w_damage_hook;
|
||||
procedure combatdamage_handler;
|
||||
procedure itemdamage_handler;
|
||||
procedure calc_damage_YAAM(variable weapon, variable rounds, variable armorDT, variable armorDR, variable bonusRangedDamage, variable multiplyDamage, variable difficulty);
|
||||
procedure item_w_subtype(variable weapon, variable hit_mode);
|
||||
procedure get_ammo_value(variable weapon, variable param);
|
||||
|
||||
variable item_w_damage;
|
||||
variable
|
||||
damage_formula,
|
||||
item_damage_min,
|
||||
item_damage_max,
|
||||
item_damage_weapon,
|
||||
item_damage_attacker;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_COMBATDAMAGE, compute_damage_F2);
|
||||
register_hook_proc(HOOK_ITEMDAMAGE, item_w_damage_hook);
|
||||
damage_formula := get_ini_setting("ddraw.ini|Misc|DamageFormula");
|
||||
register_hook_proc(HOOK_COMBATDAMAGE, combatdamage_handler);
|
||||
register_hook_proc(HOOK_ITEMDAMAGE, itemdamage_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure compute_damage_F2 begin
|
||||
/*
|
||||
HOOK_COMBATDAMAGE
|
||||
|
||||
Runs when:
|
||||
1) Game calculates how much damage each target will get. This includes primary target as well as all extras (explosions and bursts). This happens BEFORE the actual attack animation.
|
||||
2) AI decides whether it is safe to use area attack (burst, grenades), if he might hit friendlies.
|
||||
|
||||
Does not run for misses, or non-combat damage like dynamite explosions.
|
||||
|
||||
Critter arg0 - The target
|
||||
Critter arg1 - The attacker
|
||||
int arg2 - The amount of damage to the target
|
||||
int arg3 - The amount of damage to the attacker
|
||||
int arg4 - The special effect flags for the target (use bwand DAM_* to check specific flags)
|
||||
int arg5 - The special effect flags for the attacker (use bwand DAM_* to check specific flags)
|
||||
Item arg6 - The weapon used in the attack
|
||||
int arg7 - The bodypart that was struck
|
||||
int arg8 - 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; for critical hits, the value is taken from the critical table; with Silent Death perk and the corresponding attack conditions, the value will be doubled)
|
||||
int arg9 - Number of bullets actually hit the target (1 for melee attacks)
|
||||
int arg10 - The amount of knockback to the target
|
||||
int arg11 - Attack Type (see ATKTYPE_* constants)
|
||||
mixed arg12 - computed attack data (see C_ATTACK_* for offsets and use get/set_object_data functions to get/set the data)
|
||||
|
||||
int ret0 - The damage to the target
|
||||
int ret1 - The damage to the attacker
|
||||
int ret2 - The special effect flags for the target
|
||||
int ret3 - The special effect flags for the attacker
|
||||
int ret4 - The amount of knockback to the target
|
||||
*/
|
||||
procedure combatdamage_handler begin
|
||||
variable dmg_type, weapon_perk, dmg_thresh, dmg_resist, weapon_subtype, bonus_ranged, difficulty, i, dmg_mult, dmg_div, damage;
|
||||
variable target, flags, knockback, amount;
|
||||
|
||||
@@ -40,6 +81,11 @@ procedure compute_damage_F2 begin
|
||||
amountKnockback := get_sfall_arg,
|
||||
hit_mode := get_sfall_arg;
|
||||
|
||||
if (ctdSource != item_damage_attacker or weapon != item_damage_weapon) then begin
|
||||
debug_msg("! ERROR ! compute_damage: Expected attacker or weapon differs!");
|
||||
return;
|
||||
end
|
||||
|
||||
if (flagsSource bwand DAM_HIT) then begin
|
||||
target := ctdTarget;
|
||||
flags := flagsTarget;
|
||||
@@ -50,7 +96,6 @@ procedure compute_damage_F2 begin
|
||||
knockback := 0;
|
||||
end
|
||||
|
||||
//amount := 0;
|
||||
if target and (obj_type(target) == OBJ_TYPE_CRITTER) then begin
|
||||
if weapon then begin
|
||||
dmg_type := weapon_dmg_type(weapon);
|
||||
@@ -77,7 +122,7 @@ procedure compute_damage_F2 begin
|
||||
end
|
||||
|
||||
weapon_subtype := item_w_subtype(weapon, hit_mode); // item_w_subtype_
|
||||
if (ctdSource != dude_obj) or (weapon_subtype != WEAPON_TYPE_GUNS) then
|
||||
if (ctdSource != dude_obj) or (weapon_subtype != WEAPON_TYPE_RANGED) then
|
||||
bonus_ranged := 0;
|
||||
else
|
||||
bonus_ranged := has_trait(TRAIT_PERK, ctdSource, PERK_bonus_ranged_damage) * 2;
|
||||
@@ -90,27 +135,31 @@ procedure compute_damage_F2 begin
|
||||
difficulty := 125;
|
||||
end
|
||||
|
||||
// F2 default start
|
||||
// Damage = (1 - (DR_armor + DR_ammo_adjust) * (((raw_damage * (dmg_mult * damageMultiplier)) / dmg_div) - dmg_thresh)
|
||||
dmg_resist += get_ammo_value(weapon, PROTO_AM_DR_MOD); // item_w_dr_adjust_ (DR Adjust %)
|
||||
if (dmg_resist < 100) then begin
|
||||
if (dmg_resist < 0) then dmg_resist := 0;
|
||||
if (damage_formula == DAMAGE_FORMULA_YAAM) then begin
|
||||
amount := calc_damage_YAAM(weapon, rounds, dmg_thresh, dmg_resist, bonus_ranged, damageMultiplier, difficulty);
|
||||
end else begin
|
||||
// F2 default start
|
||||
// Damage = (1 - (DR_armor + DR_ammo_adjust) * (((raw_damage * (dmg_mult * damageMultiplier)) / dmg_div) - dmg_thresh)
|
||||
dmg_resist += get_ammo_value(weapon, PROTO_AM_DR_MOD); // item_w_dr_adjust_ (DR Adjust %)
|
||||
if (dmg_resist < 100) then begin
|
||||
if (dmg_resist < 0) then dmg_resist := 0;
|
||||
|
||||
dmg_mult := damageMultiplier * get_ammo_value(weapon, PROTO_AM_DMG_MULT); // item_w_dam_mult_ (Dmg mod A)
|
||||
dmg_div := get_ammo_value(weapon, PROTO_AM_DMG_DIV); // item_w_dam_div_ (Dmg mod B)
|
||||
dmg_mult := damageMultiplier * get_ammo_value(weapon, PROTO_AM_DMG_MULT); // item_w_dam_mult_ (Dmg mod A)
|
||||
dmg_div := get_ammo_value(weapon, PROTO_AM_DMG_DIV); // item_w_dam_div_ (Dmg mod B)
|
||||
|
||||
for (i := 1; i <= rounds; i++) begin
|
||||
damage := (item_w_damage + bonus_ranged) * dmg_mult; // item_w_damage_ (raw_damage)
|
||||
if dmg_div then damage /= dmg_div;
|
||||
for (i := 1; i <= rounds; i++) begin
|
||||
damage := (random(item_damage_min, item_damage_max) + bonus_ranged) * dmg_mult; // item_w_damage_ (raw_damage)
|
||||
if dmg_div then damage /= dmg_div;
|
||||
|
||||
damage := (((damage / 2) * difficulty) / 100) - dmg_thresh;
|
||||
if (damage > 0) then begin
|
||||
damage := damage - ((damage * dmg_resist) / 100); // reduce damage by the percentage of DR_armor + DR_Ammo
|
||||
if (damage > 0) then amount += damage;
|
||||
damage := (((damage / 2) * difficulty) / 100) - dmg_thresh;
|
||||
if (damage > 0) then begin
|
||||
damage := damage - ((damage * dmg_resist) / 100); // reduce damage by the percentage of DR_armor + DR_Ammo
|
||||
if (damage > 0) then amount += damage;
|
||||
end
|
||||
end
|
||||
end
|
||||
// F2 default end
|
||||
end
|
||||
// F2 default end
|
||||
|
||||
if (ctdSource == dude_obj) then begin
|
||||
if has_trait(TRAIT_PERK, ctdSource, PERK_living_anatomy_perk) and (critter_kill_type(ctdTarget) != KILL_TYPE_robot_kills)
|
||||
@@ -140,11 +189,11 @@ procedure compute_damage_F2 begin
|
||||
end
|
||||
|
||||
if (flagsSource bwand DAM_HIT) then begin
|
||||
display_msg("amountTarget = " + amountTarget+ ", amount = " + amount);
|
||||
display_msg("COMBATDAMAGE amountTarget = " + amountTarget+ ", amount = " + amount);
|
||||
amountTarget := amount;
|
||||
flagsTarget := flags;
|
||||
end else begin
|
||||
display_msg("amountSource = " + amountSource+ ", amount = " + amount);
|
||||
display_msg("COMBATDAMAGE amountSource = " + amountSource+ ", amount = " + amount);
|
||||
amountSource := amount;
|
||||
flagsSource := flags;
|
||||
end
|
||||
@@ -154,40 +203,118 @@ procedure compute_damage_F2 begin
|
||||
set_sfall_return(flagsTarget);
|
||||
set_sfall_return(flagsSource);
|
||||
set_sfall_return(amountKnockback);
|
||||
|
||||
set_sfall_arg(2, amountTarget);
|
||||
set_sfall_arg(3, amountSource);
|
||||
set_sfall_arg(4, flagsTarget);
|
||||
set_sfall_arg(5, flagsSource);
|
||||
set_sfall_arg(10, amountKnockback);
|
||||
end
|
||||
|
||||
procedure item_w_damage_hook begin
|
||||
variable
|
||||
item_w_damage_min := get_sfall_arg,
|
||||
item_w_damage_max := get_sfall_arg;
|
||||
//weapon := get_sfall_arg,
|
||||
//source := get_sfall_arg,
|
||||
procedure calc_damage_YAAM(variable weapon, variable rounds, variable armorDT, variable armorDR, variable bonusRangedDamage, variable multiplyDamage, variable difficulty) begin
|
||||
variable accumulatedDamage, ammoDiv, ammoMult, ammoDT, calcDT, _calcDT, calcDR, i, rawDamage, resistedDamage;
|
||||
if (rounds <= 0) then begin
|
||||
return 0;
|
||||
end
|
||||
|
||||
ammoDiv := get_ammo_value(weapon, PROTO_AM_DMG_DIV);
|
||||
ammoMult := get_ammo_value(weapon, PROTO_AM_DMG_MULT);
|
||||
|
||||
// Damage Multipler = Critical Multipler * Ammo Dividend
|
||||
multiplyDamage *= ammoMult;
|
||||
|
||||
// Retrieve ammo DT (well, it's really Retrieve ammo DR, but since we're treating ammo DR as ammo DT...)
|
||||
ammoDT := get_ammo_value(weapon, PROTO_AM_DR_MOD);
|
||||
|
||||
calcDT := armorDT - ammoDT;
|
||||
_calcDT := calcDT;
|
||||
|
||||
if (calcDT >= 0) then begin
|
||||
_calcDT := 0;
|
||||
end else begin
|
||||
// note that this should be a negative value
|
||||
_calcDT *= 10;
|
||||
calcDT := 0;
|
||||
end
|
||||
|
||||
// DR = armor DR + DT (note that DT should be less than or equal to zero)
|
||||
calcDR = armorDR + _calcDT;
|
||||
if (calcDR < 0) then begin
|
||||
calcDR = 0;
|
||||
end else if (calcDR >= 100) then begin
|
||||
return 0;
|
||||
end
|
||||
|
||||
display_msg("YAAM: AmmoDT=" + ammoDT + ", DT=" + calcDT + "/" + armorDT + ", DR=" + calcDR + "/" + armorDR);
|
||||
// Start of damage calculation loop
|
||||
for (i := 0; i < rounds; i++) begin
|
||||
rawDamage = random(item_damage_min, item_damage_max);
|
||||
rawDamage += bonusRangedDamage;
|
||||
|
||||
rawDamage -= calcDT;
|
||||
if (rawDamage <= 0) then
|
||||
continue;
|
||||
|
||||
rawDamage *= multiplyDamage;
|
||||
if (ammoDiv != 0) then begin
|
||||
rawDamage /= ammoDiv;
|
||||
end
|
||||
rawDamage /= 2; // related to critical hit damage multiplier bonus
|
||||
rawDamage *= difficulty; // combat difficulty setting (75 if wimpy, 100 if normal or if attacker is player, 125 if rough)
|
||||
rawDamage /= 100;
|
||||
|
||||
resistedDamage = calcDR * rawDamage;
|
||||
resistedDamage /= 100;
|
||||
rawDamage -= resistedDamage;
|
||||
|
||||
if (rawDamage > 0) then begin
|
||||
display_msg("YAAM: Bullet " + i + " dmg=" + rawDamage);
|
||||
accumulatedDamage += rawDamage;
|
||||
end
|
||||
end
|
||||
return accumulatedDamage;
|
||||
end
|
||||
|
||||
/*
|
||||
HOOK_ITEMDAMAGE
|
||||
|
||||
Runs when retrieving the damage rating of the player's used weapon. (Which may be their fists.)
|
||||
|
||||
int arg0 - The default min damage
|
||||
int arg1 - The default max damage
|
||||
Item arg2 - The weapon used (0 if unarmed)
|
||||
Critter arg3 - The critter doing the attacking
|
||||
int arg4 - The type of attack
|
||||
int arg5 - non-zero if this is an attack using a melee weapon
|
||||
|
||||
int ret0 - Either the damage to be used, if ret1 isn't given, or the new minimum damage if it is
|
||||
int ret1 - The new maximum damage
|
||||
*/
|
||||
procedure itemdamage_handler begin
|
||||
item_damage_min := get_sfall_arg;
|
||||
item_damage_max := get_sfall_arg;
|
||||
item_damage_weapon := get_sfall_arg;
|
||||
item_damage_attacker := get_sfall_arg;
|
||||
//hit_mode := get_sfall_arg,
|
||||
//isMelee := get_sfall_arg;
|
||||
|
||||
item_w_damage := (item_w_damage_min + (item_w_damage_max - item_w_damage_min) / 2);
|
||||
display_msg("item_w_damage_ = " + item_w_damage);
|
||||
|
||||
set_sfall_return(item_w_damage);
|
||||
display_msg("itemdamage: " + item_damage_min + "-" + item_damage_max);
|
||||
end
|
||||
|
||||
procedure item_w_subtype(variable weapon, variable hit_mode) begin
|
||||
variable attack_mode, type := WEAPON_TYPE_UNARMED;
|
||||
|
||||
if weapon and (hit_mode <= ATKTYPE_RWEP2) then begin
|
||||
attack_mode := (get_proto_data(obj_pid(weapon), PROTO_IT_FLAGS));
|
||||
attack_mode := weapon_attack_mode(obj_pid(weapon), hit_mode);
|
||||
|
||||
if (hit_mode == ATKTYPE_LWEP2) or (hit_mode == ATKTYPE_RWEP2) then
|
||||
attack_mode := (attack_mode bwand 0xF0) / 16; // shift 4 bits to the right
|
||||
else
|
||||
attack_mode := (attack_mode bwand 0x0F);
|
||||
|
||||
if (attack_mode > ATKMODE_PRI_THROW) then
|
||||
type := WEAPON_TYPE_GUNS;
|
||||
else if (attack_mode == ATKMODE_PRI_THROW) then
|
||||
if (attack_mode >= ATTACK_MODE_SINGLE) then
|
||||
type := WEAPON_TYPE_RANGED;
|
||||
else if (attack_mode == ATTACK_MODE_THROW) then
|
||||
type := WEAPON_TYPE_THROWN;
|
||||
else if (attack_mode > ATKMODE_PRI_KICK) then
|
||||
else if (attack_mode >= ATTACK_MODE_SWING) then
|
||||
type := WEAPON_TYPE_MELEE;
|
||||
else if (attack_mode == ATTACK_MODE_NONE) then
|
||||
type := WEAPON_TYPE_NONE;
|
||||
end
|
||||
|
||||
return type;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
|
||||
Resting Encounters mod for Fallout 2 by Lexx
|
||||
--------------------------------------------
|
||||
|
||||
- Check where we are on the world map and overwrite the default desert "resting" map
|
||||
- Compatible with vanilla Fallout 2 and UP/RP
|
||||
|
||||
Requires sfall 4.3.6/3.8.38 or higher
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\lib.arrays.h"
|
||||
|
||||
procedure start;
|
||||
procedure encounter_handler;
|
||||
|
||||
#define is_terrain_desert (get_current_terrain_name == mstr_worldmap(1000))
|
||||
#define is_terrain_mountains (get_current_terrain_name == mstr_worldmap(1001))
|
||||
#define is_terrain_city (get_current_terrain_name == mstr_worldmap(1002))
|
||||
#define is_terrain_coast (get_current_terrain_name == mstr_worldmap(1003))
|
||||
|
||||
procedure start begin
|
||||
if (game_loaded) then begin
|
||||
register_hook_proc(HOOK_ENCOUNTER, encounter_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure encounter_handler begin
|
||||
variable
|
||||
event := get_sfall_arg,
|
||||
mapID := get_sfall_arg,
|
||||
mapsList;
|
||||
|
||||
// If the player enters a map on the world map, we set it depending on the current terrain type
|
||||
// event 0 is random encounter, 1 is player initiated "encounter"
|
||||
if (event == 1 AndAlso mapID == MAP_RND_DESERT_1) then begin
|
||||
if (is_terrain_desert) then begin
|
||||
mapsList := [MAP_RND_DESERT_1];
|
||||
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_DESERT);
|
||||
end
|
||||
else if (is_terrain_mountains) then begin
|
||||
mapsList := [MAP_RND_MOUNTAIN1, MAP_RND_MOUNTAIN2];
|
||||
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_MOUNTAIN);
|
||||
end
|
||||
else if (is_terrain_city) then begin
|
||||
mapsList := [MAP_RND_CITY1, MAP_RND_CITY_2, MAP_RND_CITY_3, MAP_RND_CITY_4, MAP_RND_CITY_5, MAP_RND_CITY_6, MAP_RND_CITY_7, MAP_RND_CITY_8];
|
||||
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_CITY);
|
||||
end
|
||||
else if (is_terrain_coast) then begin
|
||||
mapsList := [MAP_RND_COAST1, MAP_RND_COAST2];
|
||||
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_COAST);
|
||||
end
|
||||
else begin
|
||||
mapsList := [MAP_RND_DESERT_1];
|
||||
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_DESERT);
|
||||
debug_msg("!!! COULDN'T DETECT TERRAIN TYPE !!!");
|
||||
end
|
||||
|
||||
mapID := array_random_value(mapsList);
|
||||
set_sfall_return(mapID);
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
Resting Encounters mod for Fallout 2 by Lexx
|
||||
--------------------------------------------
|
||||
|
||||
- Check where we are on the world map and overwrite the default desert "resting" map
|
||||
- Compatible with vanilla Fallout 2 and UP/RP
|
||||
|
||||
|
||||
Requires sfall 4.3.6/3.8.38 or higher.
|
||||
|
||||
To use, copy gl_rest_encounter.int to your scripts folder.
|
||||
|
||||
This mod is an example of how you can use HOOK_ENCOUNTER hooks.
|
||||
Binary file not shown.
@@ -1,11 +1,13 @@
|
||||
/**
|
||||
|
||||
Item Highlight mod.
|
||||
Item Highlighting mod
|
||||
|
||||
Previously was part of sfall itself, now a separate mod.
|
||||
Features:
|
||||
- highlighting items, containers (optional) and lootable corpses (optional) on the ground
|
||||
- highlights items, containers (optional) and lootable corpses (optional) on the ground
|
||||
- highlights critters using the same rules as combat mode highlighting (optional)
|
||||
- configurable hotkey is used to trigger highlight
|
||||
- hotkey can be pressed and held to continuously update highlighted objects based on current position
|
||||
- only objects in direct line-of-sight of player are highlighted (optional)
|
||||
- motion scanner is required to enable highlight (optional)
|
||||
- motion scanner charges are decreased on each use (optional)
|
||||
@@ -13,7 +15,7 @@
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.1
|
||||
version 1.2
|
||||
|
||||
**/
|
||||
|
||||
@@ -22,6 +24,7 @@
|
||||
|
||||
#define CRITTER_IS_DEAD (1)
|
||||
#define PID_MOTION_SENSOR (59)
|
||||
#define REPEAT_FRAMES (10)
|
||||
#define NO_HIGHLIGHT(obj) (get_flags(obj) bwand FLAG_NOHIGHLIGHT)
|
||||
#define NO_STEAL(obj) (get_proto_data(obj_pid(obj), PROTO_CR_FLAGS) bwand CFLG_NOSTEAL)
|
||||
|
||||
@@ -30,36 +33,70 @@ variable highlightKey;
|
||||
variable isHighlight;
|
||||
variable alsoContainer;
|
||||
variable alsoCorpse;
|
||||
variable alsoCritter;
|
||||
variable checkLOS;
|
||||
variable outlineColor;
|
||||
variable motionScanner;
|
||||
variable highlightFailMsg1;
|
||||
variable highlightFailMsg2;
|
||||
|
||||
procedure ToggleHighlightObject(variable obj, variable enable) begin
|
||||
if obj and (not enable or not checkLOS or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) then begin
|
||||
if (alsoContainer and obj_item_subtype(obj) == item_type_container) or (not NO_HIGHLIGHT(obj)) then begin
|
||||
if (enable) then set_outline(obj, outlineColor);
|
||||
else set_outline(obj, 0);
|
||||
procedure DudeCanSee(variable obj) begin
|
||||
variable block := obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT);
|
||||
return not block or block == obj;
|
||||
end
|
||||
|
||||
procedure DudeCanHear(variable obj) begin
|
||||
variable hearDist := dude_perception * 5;
|
||||
if (get_flags(obj) bwand FLAG_TRANSGLASS) then
|
||||
hearDist /= 2;
|
||||
|
||||
return tile_distance_objs(dude_obj, obj) <= hearDist;
|
||||
end
|
||||
|
||||
procedure GetOutlineColor(variable obj, variable isCritter) begin
|
||||
if isCritter then begin
|
||||
if get_team(obj) == get_team(dude_obj) then return OUTLINE_GREEN_GLOW;
|
||||
if not DudeCanSee(obj) then begin
|
||||
if (DudeCanHear(obj)) then return OUTLINE_DARK_YELLOW;
|
||||
return 0;
|
||||
end
|
||||
return OUTLINE_RED_GLOW;
|
||||
end
|
||||
if checkLOS and not DudeCanSee(obj) then
|
||||
return 0;
|
||||
|
||||
return outlineColor;
|
||||
end
|
||||
|
||||
procedure ToggleHighlightObject(variable obj, variable enable, variable isCritter) begin
|
||||
if (not alsoContainer or obj_item_subtype(obj) != item_type_container) and NO_HIGHLIGHT(obj) then return;
|
||||
|
||||
set_outline(obj, GetOutlineColor(obj, isCritter) if enable else 0);
|
||||
end
|
||||
|
||||
procedure ToggleHighlight(variable enable) begin
|
||||
variable obj;
|
||||
variable obj, isCorpse;
|
||||
foreach obj in list_as_array(LIST_GROUNDITEMS) begin
|
||||
if obj != outlined_object then begin
|
||||
call ToggleHighlightObject(obj, enable);
|
||||
if obj and obj != outlined_object then begin
|
||||
call ToggleHighlightObject(obj, enable, false);
|
||||
end
|
||||
end
|
||||
if (alsoCorpse) then begin
|
||||
if (alsoCorpse or alsoCritter) then begin
|
||||
foreach obj in list_as_array(LIST_CRITTERS) begin
|
||||
if critter_state(obj) == CRITTER_IS_DEAD and not NO_STEAL(obj) then begin
|
||||
call ToggleHighlightObject(obj, enable);
|
||||
if obj and obj != dude_obj then begin
|
||||
isCorpse := critter_state(obj) == CRITTER_IS_DEAD;
|
||||
if (alsoCritter and not isCorpse) or (isCorpse and not NO_STEAL(obj)) then begin
|
||||
call ToggleHighlightObject(obj, enable, not isCorpse);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
tile_refresh_display;
|
||||
if (checkLOS or alsoCritter) and enable != isHighlight then begin
|
||||
set_global_script_repeat(REPEAT_FRAMES if enable else 0);
|
||||
end
|
||||
|
||||
isHighlight := enable;
|
||||
end
|
||||
|
||||
procedure KeyPressHandler begin
|
||||
@@ -69,7 +106,7 @@ procedure KeyPressHandler begin
|
||||
|
||||
if scanCode == highlightKey and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
if pressed then begin
|
||||
isHighlight := true;
|
||||
set_global_script_repeat(REPEAT_FRAMES);
|
||||
if motionScanner then begin
|
||||
scanner := obj_carrying_pid_obj(dude_obj, PID_MOTION_SENSOR);
|
||||
if scanner then begin
|
||||
@@ -92,7 +129,6 @@ procedure KeyPressHandler begin
|
||||
call ToggleHighlight(true);
|
||||
end
|
||||
end else begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
@@ -100,14 +136,12 @@ end
|
||||
|
||||
procedure CombatTurnHandler begin
|
||||
if isHighlight then begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
|
||||
procedure GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
@@ -118,12 +152,15 @@ procedure InventoryMoveHandler begin
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major < 4) then return;
|
||||
|
||||
call InitConfigs;
|
||||
|
||||
highlightKey := GetConfig(configSection, "Key", 0);
|
||||
alsoContainer := GetConfig(configSection, "Containers", 0);
|
||||
alsoCorpse := GetConfig(configSection, "Corpses", 0);
|
||||
alsoCritter := GetConfig(configSection, "Critters", 0);
|
||||
checkLOS := GetConfig(configSection, "CheckLOS", 0);
|
||||
outlineColor := GetConfig(configSection, "OutlineColor", 16);
|
||||
if (outlineColor < 1) then outlineColor := 64;
|
||||
@@ -136,5 +173,10 @@ procedure start begin
|
||||
register_hook_proc(HOOK_COMBATTURN, CombatTurnHandler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChangeHandler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMoveHandler);
|
||||
set_global_script_type(1);
|
||||
end else begin
|
||||
if isHighlight and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
call ToggleHighlight(true);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -164,7 +164,9 @@ end
|
||||
|
||||
procedure start begin
|
||||
variable sect, sects, armorTypes, armorType, npc, pid, pids, i;
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major < 4) then return;
|
||||
|
||||
armorTypes := get_ini_section(modIni, "ArmorTypes");
|
||||
armorPidMap := create_array_map;
|
||||
foreach (armorType: pids in armorTypes) begin
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,12 @@
|
||||
|
||||
NPC Combat Control
|
||||
|
||||
Allows to take control of your party member or other NPCs during combat
|
||||
Previously was part of sfall itself, now a separate mod.
|
||||
Features:
|
||||
- allows you to take control of your party members or other NPCs during combat
|
||||
- configurable list of perk IDs for perks being inherited from the player (optional, not all perks can work)
|
||||
- allows the player to gain a positive reputation when killing NPCs while controlling other critters (optional)
|
||||
- a notification box to display the name of the controlled critter above the interface bar (optional)
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
@@ -15,6 +20,12 @@
|
||||
#include "..\headers\critrpid.h"
|
||||
#include "main.h"
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DEBUGMSG(x)
|
||||
#else
|
||||
#define DEBUGMSG(x) debug_msg(x);
|
||||
#endif
|
||||
|
||||
procedure start;
|
||||
procedure AllowControl(variable pid);
|
||||
procedure SetLight(variable critter, variable int, variable dist);
|
||||
@@ -48,25 +59,29 @@ procedure CombatTurn_Handler begin
|
||||
critter := get_sfall_arg,
|
||||
pid, perkID, level;
|
||||
|
||||
//display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + "/" + critter + ", arg3: " + get_sfall_arg);
|
||||
DEBUGMSG("Combat Turn: " + status + ", by " + obj_name(critter) + "/" + critter + ", arg3: " + get_sfall_arg)
|
||||
|
||||
pid := obj_pid(critter);
|
||||
if (pid == PID_PLAYER and inControl == false) then return;
|
||||
|
||||
if (pid != PID_PLAYER and controlMode != 1 and AllowControl(pid) == false) then begin
|
||||
DEBUGMSG("Skip control.")
|
||||
|
||||
if (npcControl) then begin
|
||||
npcControl := 0;
|
||||
set_dude_obj(real_dude_obj);
|
||||
call SetLight(dude_obj, dudeLightInt, dudeLightDist); // restore dude light
|
||||
//move_to(dude_obj, dude_tile, dude_elevation);
|
||||
intface_redraw;
|
||||
move_to(dude_obj, dude_tile, dude_elevation);
|
||||
|
||||
DEBUGMSG("Set dude after NPC control.")
|
||||
end
|
||||
//display_msg("Skip control.");
|
||||
return;
|
||||
end
|
||||
|
||||
if (status == 1) then begin
|
||||
set_dude_obj(critter);
|
||||
//display_msg("Take control of: " + obj_name(critter));
|
||||
|
||||
DEBUGMSG("Take control of: " + obj_name(critter))
|
||||
|
||||
if (critter != real_dude_obj) then begin
|
||||
if (npcControl == 0) then begin
|
||||
@@ -118,13 +133,11 @@ procedure CombatTurn_Handler begin
|
||||
|
||||
// remove perks before switching control (only work with 4.1.8+)
|
||||
if (dude_obj != real_dude_obj) then begin
|
||||
DEBUGMSG("Remove perks after NPC control.")
|
||||
foreach (perkID in perksList) begin
|
||||
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
if (level) then critter_rm_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
|
||||
if (status == 0) then set_dude_obj(0); // w/o redraw interface bar (otherwise it flickers when switching from the player to NPCs)
|
||||
//display_msg("Return control to real dude!");
|
||||
end
|
||||
|
||||
if (status < 0) then begin
|
||||
@@ -175,11 +188,8 @@ procedure SetGlobalVar_Handler begin
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if (game_loaded and sfall_ver_major >= 4) then begin
|
||||
//variable configSection := "CombatControl";
|
||||
|
||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major < 4) then return;
|
||||
|
||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||
if (controlMode >= 3) then begin
|
||||
@@ -206,6 +216,9 @@ procedure start begin
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
end
|
||||
|
||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
||||
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
if (len_array(pidList) > 0) then
|
||||
fix_array(pidList);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "..\scripting\headers\lib.inven.h"
|
||||
*/
|
||||
|
||||
variable ini := "sfall-mods.ini";
|
||||
variable ini := "mods\\sfall-mods.ini";
|
||||
variable translationIni;
|
||||
|
||||
// Gets the integer value from the specified ini
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
To install each mod, copy *.int file into your <Fallout Dir>\data\scripts\ folder.
|
||||
For gl_npcarmor.int, you also need to copy npcarmor.ini to your Fallout directory.
|
||||
|
||||
gl_highlighting.int and gl_partycontrol.int are already included in sfall.dat.
|
||||
You don't usually need to install them separately.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user