Skip to content

Commit

Permalink
Release 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Aug 22, 2023
2 parents b4fe9b3 + e923fa8 commit 228f896
Show file tree
Hide file tree
Showing 156 changed files with 3,541 additions and 1,706 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*.exe
*.out
*.app
!ducible.exe

# NetBeans
nbproject/private/
Expand Down
55 changes: 44 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand All @@ -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

Expand All @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 228f896

Please sign in to comment.