mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
368d632919 | ||
|
|
9dabf726e3 | ||
|
|
e3c14cda94 | ||
|
|
0bb63de958 | ||
|
|
70a8eb086f | ||
|
|
47dad66b58 | ||
|
|
8ec4ed6a0a | ||
|
|
201ecd16f7 | ||
|
|
ae3a8f85f5 | ||
|
|
b6d8b14f90 | ||
|
|
edd6da5716 | ||
|
|
fe9d56030f | ||
|
|
5feeff0c21 | ||
|
|
ea79147afe | ||
|
|
6535a5f02e | ||
|
|
265314083d | ||
|
|
0367d28bc1 | ||
|
|
06df287b3a | ||
|
|
f57a261339 | ||
|
|
ee5cdbcd81 | ||
|
|
93416a9450 | ||
|
|
9a18193060 | ||
|
|
95cd72348d | ||
|
|
0b6a058dff | ||
|
|
6f5ebe76fc | ||
|
|
4cef7cf72f | ||
|
|
400f94e302 | ||
|
|
0a42f83084 | ||
|
|
9f5c8fa946 | ||
|
|
a8baf6c331 | ||
|
|
2c33b2752b | ||
|
|
01ff118619 | ||
|
|
c90571392b | ||
|
|
7615e318ca | ||
|
|
02f9be78f6 | ||
|
|
bd87a49e87 | ||
|
|
508bcd745c | ||
|
|
1c12b52303 | ||
|
|
7cd059a9a5 | ||
|
|
9355f84943 | ||
|
|
5f220d54e4 | ||
|
|
0486a43532 | ||
|
|
9cccb2e45b | ||
|
|
b59930d831 | ||
|
|
d996e1f739 | ||
|
|
86506b5ec7 | ||
|
|
8f1813cd0b | ||
|
|
4e0e98dda9 | ||
|
|
8ff09aa10e | ||
|
|
caa64822dd | ||
|
|
bad50cd335 | ||
|
|
71c8b851e6 | ||
|
|
16b2681c79 | ||
|
|
764ab01d9d | ||
|
|
ef78c35a30 | ||
|
|
2e4998168c | ||
|
|
eef4571cfe | ||
|
|
2e8c742fdb | ||
|
|
8782428615 | ||
|
|
d62ec1b939 | ||
|
|
5fb69175e5 | ||
|
|
157f4434d5 | ||
|
|
43fb1ec5f2 | ||
|
|
80679572c3 | ||
|
|
7f0017a858 | ||
|
|
7e95e1b405 | ||
|
|
03cc1f8ae4 | ||
|
|
c4f6f9c9c7 | ||
|
|
987419945f | ||
|
|
461b12037a | ||
|
|
e072cfda7c | ||
|
|
8bd0147578 | ||
|
|
b68655f7c8 | ||
|
|
9d68ae2d4b | ||
|
|
7eec7a132e | ||
|
|
3d630de332 | ||
|
|
b39d5d9a57 | ||
|
|
d654233614 | ||
|
|
6f9d1fc1f8 | ||
|
|
fee5b7daa1 | ||
|
|
f36f204dd7 | ||
|
|
cc7e471df0 | ||
|
|
4b8478911e | ||
|
|
deb6d2d0ea | ||
|
|
1354ff2ec6 | ||
|
|
38eed54c9f | ||
|
|
5230d0aeca | ||
|
|
62f9eb1987 | ||
|
|
ef791b872a | ||
|
|
bbf8e84696 | ||
|
|
b8add3dec5 | ||
|
|
d3ff9d04b4 | ||
|
|
587ca5bee1 | ||
|
|
20bf2ce145 | ||
|
|
486c897243 | ||
|
|
87eca4898a | ||
|
|
3515dac146 | ||
|
|
73deda86c8 | ||
|
|
d39535e0a6 | ||
|
|
5c246ba614 | ||
|
|
33943bb6ff | ||
|
|
81f4af927b | ||
|
|
e2dcb3e0b2 | ||
|
|
88197f7fed | ||
|
|
0b14111472 | ||
|
|
8448a24339 | ||
|
|
388a5de994 | ||
|
|
803eeb4d27 | ||
|
|
2714b3bfc8 | ||
|
|
0409eb67e4 | ||
|
|
ea74ff7d0c | ||
|
|
e05010c752 | ||
|
|
9f8a5b4766 | ||
|
|
6a773780a7 | ||
|
|
e2ad532607 | ||
|
|
181560265f | ||
|
|
ca42b01193 | ||
|
|
73ac86d493 | ||
|
|
7dc499eb24 | ||
|
|
944a1be064 | ||
|
|
bc882680e4 | ||
|
|
cfcfa21afe | ||
|
|
0095ec212b | ||
|
|
83d8104ed8 | ||
|
|
c74ddc1cbc | ||
|
|
0746d6b483 | ||
|
|
3c8ec03e30 | ||
|
|
0b67cb4125 | ||
|
|
e84c5fdc1d | ||
|
|
a56162c949 | ||
|
|
272b082d72 | ||
|
|
4f43a47a09 | ||
|
|
9c97d0da44 | ||
|
|
c1b279f2fa | ||
|
|
3ebc4326c5 | ||
|
|
257a1f7b33 | ||
|
|
a66db5a386 | ||
|
|
db547212e8 | ||
|
|
10ffa66256 | ||
|
|
9734d18d68 | ||
|
|
e706fba989 | ||
|
|
884c00ffeb | ||
|
|
78ef06c8e6 | ||
|
|
d75d46d281 | ||
|
|
fc1d9dbfc2 | ||
|
|
b50dcaa151 | ||
|
|
53f427fcac | ||
|
|
818c2eb6b2 | ||
|
|
ad2b9ab0fb | ||
|
|
46349c5d69 | ||
|
|
8a8455efea | ||
|
|
6e7ba2f5b9 | ||
|
|
da08bdbf83 | ||
|
|
dc97dad94c | ||
|
|
82cf074845 | ||
|
|
8e95b2d8f6 | ||
|
|
81638168c2 | ||
|
|
56459ee5f0 | ||
|
|
35276dfe59 | ||
|
|
0400671f38 | ||
|
|
30cb8b7ee9 | ||
|
|
273c44e788 | ||
|
|
4ef8986bda | ||
|
|
dbf5e36b86 | ||
|
|
386d373376 | ||
|
|
360037a2fd | ||
|
|
a3c8f0f609 | ||
|
|
7dda156ee7 | ||
|
|
31a5dbc61c | ||
|
|
c476e54db0 | ||
|
|
95dc75da38 | ||
|
|
e276c59447 | ||
|
|
1c3e2f2eb1 | ||
|
|
3dcc26a739 | ||
|
|
8ef6a66134 | ||
|
|
0bba6ccb54 | ||
|
|
8f846eda6e | ||
|
|
572cbd059f | ||
|
|
f02ba1993b | ||
|
|
f800b7bb33 | ||
|
|
de3d6256e3 | ||
|
|
ae0f3d6fdc | ||
|
|
f46ffb4ea5 | ||
|
|
c7ecf1c070 | ||
|
|
8c277730bf | ||
|
|
898e7bb4e0 | ||
|
|
3e955572be | ||
|
|
7fc5dc47b4 | ||
|
|
71e3ee4801 | ||
|
|
59eacce6be | ||
|
|
ff53d2515d | ||
|
|
8fd5182bb5 | ||
|
|
2677d9faa7 | ||
|
|
9fe3ed5d98 | ||
|
|
e6610c4bbe | ||
|
|
31630f6627 | ||
|
|
489f62f5cb | ||
|
|
1f802cab6f | ||
|
|
788593cdcc | ||
|
|
680310f702 | ||
|
|
4f36136a39 | ||
|
|
48355fa637 | ||
|
|
6af62af27d | ||
|
|
bd76a3ded7 | ||
|
|
3a08488895 | ||
|
|
2941157174 | ||
|
|
2148650313 | ||
|
|
6dee4e1183 | ||
|
|
b2e60ba62e | ||
|
|
a71c2c901a | ||
|
|
4f3c1a60b4 | ||
|
|
9674c16928 | ||
|
|
0c035a05df | ||
|
|
51cd2eab69 | ||
|
|
323631835b | ||
|
|
135c26ab70 | ||
|
|
34092900a6 | ||
|
|
c8fe92ef7d | ||
|
|
b578aecc59 | ||
|
|
b57a87f98f | ||
|
|
2156f82184 | ||
|
|
be6947e3d2 | ||
|
|
f0784e2987 | ||
|
|
1a6a9e5ec1 | ||
|
|
0be6011c19 | ||
|
|
6f45d45fcd | ||
|
|
f413bb8b9a | ||
|
|
e3907c3647 | ||
|
|
007386caec | ||
|
|
c593269ee7 | ||
|
|
1976461b72 | ||
|
|
9fa123d15f | ||
|
|
3b6435d8a4 | ||
|
|
7322634780 | ||
|
|
7f0398c618 | ||
|
|
4e3f065453 | ||
|
|
378bc8a126 | ||
|
|
e92c994744 | ||
|
|
a1d0e59287 | ||
|
|
40f2050f8c | ||
|
|
c33c200b51 | ||
|
|
26693fd0ed | ||
|
|
033c8bf8ef | ||
|
|
ddf2854938 | ||
|
|
637de0e07d | ||
|
|
ff1c87f0c5 | ||
|
|
66c0ed8cb2 | ||
|
|
f3bbfbfa28 | ||
|
|
41a1fead58 | ||
|
|
a0cf633899 | ||
|
|
a09611edc6 | ||
|
|
291370a96c | ||
|
|
576bea2aa9 |
@@ -26,6 +26,7 @@
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
!ducible.exe
|
||||
|
||||
# NetBeans
|
||||
nbproject/private/
|
||||
|
||||
+219
-37
@@ -1,5 +1,188 @@
|
||||
# Changelog
|
||||
|
||||
## 3.8.49.1
|
||||
* Fixed a crash bug introduced in 3.8.46 when the player is hit and combat starts at the same time
|
||||
|
||||
## 3.8.49
|
||||
* Fixed the edge-scrolling speed when using the game speed tweak
|
||||
* Fixed incorrect unarmed damage being displayed in the inventory under specific conditions
|
||||
* Fixed a crash bug in the tweak that replaces death animations on critters with single-frame variants on map load
|
||||
* Improved the functionality of **Fallout1Behavior** to set the correct initial in-game time
|
||||
* Changed **ProcessorIdle** to be enabled by default
|
||||
* Changed **SingleCore** to be disabled by default as its usage is questionable on newer systems
|
||||
* Added a fix for script execution issues when calling `critter_mod_skill` in a loop
|
||||
* Added options to the **tweaks ini file** to override the PID of the mirrored shades and the stat they affect when equipped
|
||||
|
||||
## 3.8.48
|
||||
* Fixed incorrect mnemonic names in script dumps generated by the script decompiler (`int2ssl.exe` in the **modders pack**)
|
||||
* Added a fix for a crash when an encounter between two groups fighting each other fails to spawn one group
|
||||
* Added a fix to use the `art\splash\` directory as the fallback for loading splash screens for non-English languages
|
||||
* Added a fix for the game not applying the mouse sensitivity setting correctly in certain cases
|
||||
* Added a fix for file seeking in uncompressed **.dat** files
|
||||
* Added an option to disable the engine's processing of Arroyo-related events
|
||||
* Added support for switching to alternate keyboard character codes (from Crafty)
|
||||
|
||||
## 3.8.47
|
||||
* Fixed potential undefined behavior in **FullItemDescInBarter**
|
||||
* Fixed the behavior of `break` statement in script compiler and decompiler (`compile.exe` and `int2ssl.exe` in the **modders pack**)
|
||||
* Improved the fix for removing floating text messages on the map when moving to another map or elevation
|
||||
* Improved the error handling for missing main **.dat** files
|
||||
* Removed glass glare from the **'Use Inventory Item On'** window to match other game interfaces
|
||||
* Added a fix for a crash when a critter with a powered melee/unarmed weapon runs out of ammo and there was ammo nearby
|
||||
* Added a fix to prevent a potential crash when using skills on non-critter objects
|
||||
* Added a fix for the duplicate click sound for the 'Done' button in the **'Move Items'** and **'Set Timer'** windows
|
||||
* Added a few fixes for slightly misaligned buttons in the pipboy, character screen, and barter screen
|
||||
* Added missing sounds to the 'Done' and 'Cancel' buttons in the 'Custom' disposition of the combat control panel
|
||||
* Added lowercase `a` as a hotkey for the 'Take All' button (previously only uppercase `A`)
|
||||
|
||||
## 3.8.46.1
|
||||
* The compatibility mode check now targets only unsupported Windows versions
|
||||
* Changed the way **ProcessorIdle** works to prevent conflicts with **CPU_USAGE_FIX** option in `f2_res.ini`
|
||||
* Added a fix to prevent out-of-bounds selection in the file list when loading a character file
|
||||
* Added a fix to remove visible newline control characters `\n` when examining items in the barter screen
|
||||
|
||||
## 3.8.46
|
||||
* Fixed a bug introduced in 3.8.31 that broke the debug message about a missing critter art file
|
||||
* Fixed an issue where an item with a unique ID in the inventory had its ID reset by a non-unique item
|
||||
* Restored the position of the ammo bar when **ALTERNATE_AMMO_METRE=0** in `f2_res.ini`
|
||||
* Improved the fix for the display issue in the pipboy when the automap list is too long
|
||||
* Improved the compatibility mode check for newer Windows
|
||||
* Changed **PipBoyAvailableAtGameStart** option and `set_pipboy_available` script function to no longer modify the vault suit movie state
|
||||
* Added a fix for the main menu music not stopping when replaying the intro
|
||||
* Added a fix for display issues when highlighting a multiline dialogue option
|
||||
* Added a fix for the incorrect message being displayed when attempting to repair a dead robot
|
||||
* Added a fix for the duplicate click sound when selecting a location in the Status section of the pipboy
|
||||
* Added a fix for extra hidden buttons below the location list in the Status section of the pipboy
|
||||
* Added a fix for map lighting from **Night Vision** perk not updating when loading a saved game
|
||||
* Added a fix for an animation glitch when death animations and combat start at the same time
|
||||
* Added a fix to prevent the game from hanging when reloading a weapon overloaded with ammo via the interface bar
|
||||
* Added a few fixes for issues related to weapons with negative ammo
|
||||
* Added a tweak to replace death animations on critters with single-frame variants on map load
|
||||
* Added more options for tweaking some engine perks to the **perks ini file**
|
||||
* Reduced the green tone of the message window on the interface bar for text clarity
|
||||
|
||||
## 3.8.45.1
|
||||
* Fixed a bug in **XPTable** that caused leveling issues with **Here and Now** perk
|
||||
* Disabled unnecessary selfrun file creation in the recording mode (autoplay has been disabled in 3.8.30)
|
||||
|
||||
## 3.8.45
|
||||
* Fixed a bug introduced in 3.8.29 that caused `game_loaded` script function to always return 1 when called from normal scripts
|
||||
* Fixed a bug introduced in 3.8.44 that caused the information card for the **hero appearance mod** not to refresh properly
|
||||
* Fixed a crash bug in **AutoSearchSFX** when an **ACM** file has a name longer than 12 characters
|
||||
* Fixed an issue where sfall did not reset data properly after attempting to load a corrupted saved game
|
||||
* Fixed the inconsistent behavior of the escaped percent sign `%` in `sprintf` and `string_format` script functions
|
||||
* Fixed `show/hide_iface_tag` script functions to prevent unnecessary toggling of tags
|
||||
* Fixed `using_skill` script function returning garbage values when the arguments are not the player and Sneak skill
|
||||
* Added a fix for the engine not checking **'misc'** type items when correcting data for items on maps
|
||||
* Added a fix to prevent the windows of **Tag!** and **Mutate!** perks from reappearing when there are still unused perks
|
||||
* Added a tweak to restore the player's sneak state when switching between maps
|
||||
* Added options to separately set the color of outlines for highlighted containers and corpses
|
||||
* Updated **item highlighting mod** in the **modders pack** to match the feature set of the 4.x version
|
||||
* New hook script: `hs_buildsfxweapon`
|
||||
|
||||
## 3.8.44
|
||||
* Fixed a bug in **NPCsTryToSpendExtraAP** that caused NPCs to still be able to move in their combat turn after they killed themselves
|
||||
* Fixed a bug in **PlayIdleAnimOnReload** that could cause critters to lose highlights after reloading weapons in combat
|
||||
* Fixed a crash bug in `interface_art_draw` script function when drawing beyond window bounds
|
||||
* Fixed the missing hotkeys for additional elevators derived from the original elevator types
|
||||
* Fixed and improved the syntax parsing in script compiler (`compile.exe` in the **modders pack**)
|
||||
* Improved the fix for using **'English'** as the fallback language directory for msg files to work on a per-line basis
|
||||
* Improved the fix for saving/loading party member protos to include the car trunk
|
||||
* Improved the performance of `draw_image`, `draw_image_scaled`, and `interface_art_draw` script functions
|
||||
* Expanded `show/hide_iface_tag` script functions to work with the tag value 0 (sneak)
|
||||
* Changed **AIDrugUsePerfFix** to be enabled by default
|
||||
* Tweaked the behavior of **NPCAutoLevel** option and renamed it to **PartyMemberNonRandomLevelUp** to better match its behavior
|
||||
* Removed the unnecessary error message about sndlist.lst when **AutoSearchSFX** is enabled
|
||||
* Added a fix for the time interval for healing during world map travel being tied to the system timer instead of game time
|
||||
* Added a fix for the interface bar obscuring the barter/trade interface when using the hi-res patch
|
||||
* Added a tweak to prevent the **'forever'** type of animation on objects from stopping when entering combat
|
||||
* Added an option to use the expanded world map interface (requires the hi-res patch)
|
||||
* Added an option to pre-fill the **'Move Items'** window with the correct balancing amount when moving money/caps in the barter screen
|
||||
* Added an option to set up a key to let you move items between inventory lists by simply clicking on them
|
||||
* Added debug options to adjust the size and text font for the internal debug window
|
||||
* Added an option for tweaking **Cautious Nature** perk to the **perks ini file**
|
||||
* Added a new attribute type value to `get_window_attribute script` function
|
||||
* Added `PAUSEWIN` flag to the game mode functions (when pausing the game using `Ctrl+P`)
|
||||
* Added 2 new arguments to `HOOK_ENCOUNTER` hook script
|
||||
* Added a healing skills example script to the example mods in the **modders pack**
|
||||
* New script function: `signal_close_game`, `art_frame_data`, `set_worldmap_heal_time`
|
||||
|
||||
## 3.8.43.1
|
||||
* Fixed a possible hang or crash introduced in 3.8.41 when running certain script sequences
|
||||
|
||||
## 3.8.43
|
||||
* Restored support for **pre-SSE** processors because the code optimization resulting from dropping support is marginal
|
||||
* Fixed a bug introduced in 3.8.29 that caused critters with crippled arms to be unable to attack in certain cases
|
||||
* Fixed the critical hit messages of the right arm and left leg for super mutants
|
||||
* Fixed `add_extra_msg_file` script function to prevent it from loading the same msg file more than once
|
||||
* Removed **DisplaySwiftLearnerExp** from `ddraw.ini` because there is little reason to turn it off
|
||||
* Removed **SpeedInterfaceCounterAnims=3**. Now the AC counter is always instantly updated when switching to other controlled critters in combat
|
||||
* Added a fix for the game disappearing from the taskbar after using `Alt+Tab`
|
||||
* Added a fix for the clickability issue of the **'Use Inventory Item On'** action when the selected item overlaps an object
|
||||
* Added a fix for the xp exploit from canceling **Here and Now** perk when the player has **Swift Learner** perk
|
||||
* Added support for loading an external **DirectDraw** wrapper (`ddraw.dll`) from the `<GameRoot>\wrapper\` directory for rendering
|
||||
* Added a static books mod and a molotov fire damage mod to the example mods in the **modders pack**
|
||||
|
||||
## 3.8.42
|
||||
* Fixed a bug in **XPTable** that could cause a hang when leveling up in some cases
|
||||
* Fixed the critical hit messages of the right arm for some critter types
|
||||
* Changed `add_mult_objs_to_inven` script function to allow adding more than 99999 instances of an object in one go
|
||||
* Added a fix to use **'English'** as the fallback language directory for loading `credits.txt/quotes.txt`
|
||||
* Added a fix for gaining two levels at once when leveling up from level 97
|
||||
* Added a fix for the modulo operator treating negative integers as unsigned
|
||||
* Added a fix to prevent integer overflow for the number of items in a stack in the inventory
|
||||
* Added a fix to `COMBATDAMAGE` hook to prevent instadeath critical hits for no damage
|
||||
* New script function: `reg_anim_animate_and_move`
|
||||
|
||||
## 3.8.41
|
||||
* Fixed a bug introduced in 3.8.40 that broke the interoperability of saved arrays with older versions
|
||||
* Fixed a crash when calling `start_gdialog` outside the `talk_p_proc` procedure for talking heads
|
||||
* Fixed `create_object_sid` script function to allow creating an object with no script correctly when passing 0 as the script index number
|
||||
* Changed the calculation of the **'best armor'** score to exclude the EMP stats (gameplay mod friendly)
|
||||
* Tweaked the position of the ammo bar on the interface bar
|
||||
* Removed **AdditionalWeaponAnims** from `ddraw.ini`. Now additional weapon animation codes are always available
|
||||
* Updated **NPC combat control mod** in the modders pack to make the player's **Jinxed** trait/perk affect all controlled critters
|
||||
|
||||
## 3.8.40.1
|
||||
* Improved compatibility with older Windows 2000 (**pre-SP4**)
|
||||
|
||||
## 3.8.40
|
||||
* 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
|
||||
* 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 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 3.8.22)
|
||||
* Removed the old built-in **NPC combat control** and added a script-based version to the example mods in the **modders pack**
|
||||
* Added an option to let you use the command cursor to specify targets for party members to attack in combat
|
||||
* Added an option to specify an additional directory for ini files used by scripts
|
||||
* Added options to override the names of sound files used by the engine
|
||||
* 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
|
||||
* Updated **NPC armor appearance mod** in the **modders pack** to prevent NPCs from equipping **unusable** weapons
|
||||
* Updated **item highlighting mod** in the **modders pack** to match the feature set of the 4.x version
|
||||
* Increased the setting range of the combat speed slider in the preferences screen
|
||||
* Backported script functions from 4.0/4.1: `set_dude_obj`, `get_object_ai_data`
|
||||
* Backported hook scripts from 4.x: `hs_combatturn`, `hs_rollcheck`, `hs_bestweapon`, `hs_canuseweapon`
|
||||
* New script functions: `set_spray_settings`, `get/set_combat_free_move`, `get_ini_config`, `string_find`
|
||||
|
||||
## 3.8.38
|
||||
* Fixed a bug introduced in 3.8.30 that could cause unexpected behavior for burst attacks at close range
|
||||
* Fixed a bug introduced in 3.8.31 that caused the game to display incorrect names for corpses in some cases
|
||||
@@ -43,17 +226,17 @@
|
||||
|
||||
## 3.8.35
|
||||
* Fixed the handling of obsolete script functions that are still recognized by script compiler and decompiler
|
||||
* 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
|
||||
* Added a fix for being able to use the **'Push'** action on members of the player's team in combat when they are knocked down
|
||||
* Added missing sounds for the markers on the world map interface (similar to Fallout 1, from Ghosthack)
|
||||
* Added missing sounds to the markers on the world map interface (similar to Fallout 1, from Ghosthack)
|
||||
|
||||
## 3.8.34
|
||||
* Minor fixes to **LocalMapXLimit/LocalMapYLimit** options and the built-in **item highlighting mod**
|
||||
* Minor fixes to **LocalMapXLimit/LocalMapYLimit** options and the built-in **item highlighting**
|
||||
* Removed **FadeBackgroundMusic** option because the fix in 3.8.33 doesn't work reliably in all cases
|
||||
* Added a fix for being unable to plant items on non-biped critters with the `Barter` flag set (e.g. Skynet and Goris)
|
||||
* Added a fix for being unable to plant items on non-biped critters with the **'Barter'** flag set (e.g. Skynet and Goris)
|
||||
* Updated the ammo ini loader mod in the **modders pack**
|
||||
|
||||
## 3.8.33.1
|
||||
@@ -92,7 +275,7 @@
|
||||
|
||||
## 3.8.31
|
||||
* Fixed the Jet addiction not being removed when using the antidote in some cases
|
||||
* Fixed the key repeat delay and rate when enabling the game speed tweak
|
||||
* Fixed the key repeat delay and rate when using the game speed tweak
|
||||
* Fixed a possible crash at the end of the playback of alternative sound files
|
||||
* Fixed a rounding error in Glovz's damage formula
|
||||
* Improved the behavior of **SpeedInterfaceCounterAnims=3**
|
||||
@@ -116,14 +299,13 @@
|
||||
* Added a config file to change some engine parameters for the game mechanics
|
||||
* Added the ability to continuously play the music when moving to another map that uses the same music
|
||||
* Added the ability to set custom names for unarmed attacks in the inventory to **TranslationsINI**
|
||||
* Added support for using the newline control character `'\n'` in the object description in `pro_*.msg` files
|
||||
* Added support for using the newline control character `\n` in the object description in `pro_*.msg` files
|
||||
* Added support for the new **'Healing Item'** flag to item protos. Now AI will also use items with this flag for healing in combat
|
||||
* Added support for the new **'Cannot Use'** flag to the misc flags of item objects. This flag makes a weapon object unusable in combat
|
||||
* Added missing sounds for the buttons on the world map interface (similar to Fallout 1 behavior)
|
||||
* Added missing sounds to 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**
|
||||
* Added a `sfall.dat` resource file, which contains the required files for various features. The localized `sfall_xx.dat` is also supported
|
||||
* New script functions: `set_scr_name`, `obj_is_openable`
|
||||
* Updated **NPC armor appearance mod** to prevent NPCs from equipping **unusable** weapons
|
||||
* Included Brazilian Portuguese and Polish translation (from Felipefpl and Jaiden)
|
||||
|
||||
## 3.8.30.2
|
||||
@@ -134,21 +316,21 @@
|
||||
|
||||
## 3.8.30.1
|
||||
* Merged Windows 2000 support into the standard version of sfall. Using **DX9** graphics modes now requires `d3dx9_42.dll` and `d3dcompiler_42.dll`
|
||||
* Fixed a crash bug introduced in 3.8.30 with the fix for animation registration
|
||||
* Fixed a crash bug introduced in 3.8.30 by the fix for animation registration
|
||||
* Fixed a bug in **AIDrugUsePerfFix** that could cause a hang in combat
|
||||
* Fixed the extra check for friendly fire not working if the `area_attack_mode` parameter in the AI packet is not set or set to `no_pref`
|
||||
* Added a fix for `chem_primary_desire` values in party member AI packets not being saved and reset correctly
|
||||
|
||||
## 3.8.30
|
||||
* Fixed the original engine issues with being unable to register animations in certain situations in the game
|
||||
* Fixed a crash bug introduced in 3.8.29 with the fix for the **'Leave'** event procedure in `AddRegionProc` function
|
||||
* Fixed a crash bug introduced in 3.8.29 by the fix for the **'Leave'** event procedure in `AddRegionProc` function
|
||||
* Fixed a bug in **ObjCanSeeObj_ShootThru_Fix** that could cause a hang in some cases
|
||||
* Fixed the check of the ammo cost for a shot in **CheckWeaponAmmoCost**
|
||||
* Fixed `set_critter_burst_disable` script function, which now applies only to weapons with the burst attack as the secondary mode
|
||||
* Fixed the error handling in `create_object_sid` script function to prevent a crash when the proto is missing
|
||||
* Fixed `METARULE_CURRENT_TOWN` metarule function not returning the correct index of the current town at the start of a new game
|
||||
* Fixed the auto-close containers mod for gravesites and not closing containers in some cases (in the **modders pack**)
|
||||
* Fixed and improved the functionality of **AllowLargeTiles**. Now it requires a `gridmask.frm` file (included in the **modders pack**) in the `art\tiles\`` directory
|
||||
* Fixed and improved the functionality of **AllowLargeTiles**. Now it requires a `gridmask.frm` file (included in the **modders pack**) in the `art\tiles\` directory
|
||||
* Restored the functionality of `obj_under_cursor` script function for the movement cursor (changed in 3.8.29)
|
||||
* Improved the **hero appearance mod** to be able to load the interface text from `text\<language>\game\AppIface.msg`
|
||||
* Improved the functionality of **TranslationsINI** to also search for the ini file relative to the `text\<language>\` directory
|
||||
@@ -161,7 +343,7 @@
|
||||
* Added a fix to prevent the player name from being displayed at the bottom of the dialog review window when the text is longer than one screen
|
||||
* Added a fix for the in-game quest list not being in the same order as in `quests.txt`
|
||||
* Added a fix for multihex critters hitting themselves when they miss an attack with ranged weapons
|
||||
* Added a fix to the placement of multihex critters in the player's party when entering a map or elevation
|
||||
* Added a fix for the placement of multihex critters in the player's party when entering a map or elevation
|
||||
* Added a fix to the starting position of the player's marker on the world map when starting a new game
|
||||
* Added a fix for AI not checking the safety of weapons based on the selected attack mode
|
||||
* Added a fix for the incorrect check and AP cost when AI reloads a weapon
|
||||
@@ -171,9 +353,9 @@
|
||||
* Added a tweak to prevent NPC aggression when non-hostile NPCs accidentally hit the player or members of the player's team
|
||||
* Added a tweak to play the **'magic hands'** animation when using an item on an object. This also prevents a few issues with scripted animations not playing
|
||||
* Added a tweak to remove the unspent skill points limit
|
||||
* Added an option to disable the special handling of city areas 45 and 46 in the engine when visiting Area 45
|
||||
* Added an option to disable the engine's special handling of city areas 45 and 46 when visiting Area 45
|
||||
* Added an option to load alternative dialog msg and subtitle files for female PC (translation friendly)
|
||||
* 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 a new value to **AIDrugUsePerfFix** to allow NPCs to use only the drugs listed in `chem_primary_desire` and healing drugs
|
||||
* Added support for loading premade character **GCD/BIO** files from the `premade\<language>\` directory for non-English languages
|
||||
* Added support for loading fonts from the `fonts\<language>\` directory for non-English languages
|
||||
@@ -205,13 +387,13 @@
|
||||
* Added more options for tweaking some engine perks to the **perks ini file**
|
||||
* Added options for tweaking tag skills to the **skills ini file**
|
||||
* 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 3 new attribute type values to `get_window_attribute` script function
|
||||
* Added additional universal opcodes `sfall_func7` and `sfall_func8` (`compile.exe` and `int2ssl.exe` in the **modders pack** are also updated)
|
||||
* Added an auto-close containers mod and **NPC armor appearance 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
|
||||
* Backported script functions from 4.0/4.1: `get_ini_sections`, `get_ini_section`, `add_extra_msg_file`
|
||||
* Backported 4 new modes for `metarule2_explosions` function from 4.1
|
||||
* Backported `HOOK_ADJUSTFID` and `HOOK_GAMEMODECHANGE` hook scripts from 4.2
|
||||
* Backported hook scripts from 4.2: `hs_adjustfid`, `hs_gamemodechange`
|
||||
* Backported `SPECIAL` game mode flag from 4.2 (when switching from dialog mode to barter mode, or a party member joins/leaves in the dialog screen)
|
||||
* New script functions: `interface_overlay`
|
||||
|
||||
@@ -224,9 +406,10 @@
|
||||
|
||||
## 3.8.28
|
||||
* Fixed a bug introduced in 3.8.23 that could cause unexpected behavior in global scripts
|
||||
* Fixed a bug in **ObjCanSeeObj_ShootThru_Fix** that caused the source to be unable to see the target if it has the `ShootTrhu` flag set
|
||||
* Fixed a bug in **ObjCanSeeObj_ShootThru_Fix** that caused the source to be unable to see the target if it has the **'ShootTrhu'** flag set
|
||||
* Fixed the encounter messages still being limited to 50 entries per table when **EncounterTableSize** is set to greater than 50
|
||||
* Fixed temporary arrays in scripts being cleared when flushing the keyboard buffer
|
||||
* Fixed the broken `Print()` script function
|
||||
* Improved the field of view check in **ObjCanSeeObj_ShootThru_Fix**
|
||||
* Improved the functionality of **GlobalShaderFile** to be able to load multiple shader files
|
||||
* Improved the performance of **DX9** graphics modes
|
||||
@@ -238,7 +421,6 @@
|
||||
* Added a fix for the flags of critters in the line of fire not being taken into account when calculating the hit chance penalty of ranged attacks
|
||||
* Added a fix to the check for ranged weapons in the **Fast Shot** trait and **FastShotFix**
|
||||
* Added a fix for the background image of the character portrait on the player's inventory screen
|
||||
* Added a fix for the broken `Print()` script function
|
||||
* Added the original Fallout 1 behavior of the **Fast Shot** trait to **FastShotFix**
|
||||
* Added a tweak to keep the selected attack mode when moving the weapon between active item slots
|
||||
* Added an option to enable linear texture filtering for **DX9** graphics modes
|
||||
@@ -259,7 +441,7 @@
|
||||
* Fixed the default values for **Movie1 - Movie17** options
|
||||
* Fixed the playback of additional movies defined in **Movie18 - Movie32** options
|
||||
* Fixed **OverrideMusicDir=2** not overriding the music path properly
|
||||
* Fixed incorrect Melee Damage stat value being displayed when setting **BonusHtHDamageFix=1** and **DisplayBonusDamage=0**
|
||||
* Fixed incorrect Melee Damage stat value being displayed when **BonusHtHDamageFix=1** and **DisplayBonusDamage=0**
|
||||
* Fixed `attack_complex script` function not setting result flags correctly for the attacker and the target
|
||||
* Fixed and improved **SFX** and speech playback for alternative sound files
|
||||
* Fixed and improved the behavior of nested timer events in global scripts
|
||||
@@ -349,7 +531,7 @@
|
||||
* Fixed the timing of setting `WORLDMAP`, `DIALOG`, `PIPBOY`, `INVENTORY`, `INTFACEUSE`, and `INTFACELOOT` game mode flags
|
||||
* Fixed the execution of the timer event in global scripts
|
||||
* Fixed the palette and the movie playback in **DX9** mode
|
||||
* Improved the functionality of `create_message_window` script function to support the newline control character `'\n'`
|
||||
* Improved the functionality of `create_message_window` script function to support the newline control character `\n`
|
||||
* Removed **TownMapHotkeysFix** and **DisplaySecondWeaponRange** from `ddraw.ini` because there is little reason to turn them off
|
||||
* Added a fix for duplicate critters being added to the list of potential targets for AI
|
||||
* Added a fix for the playback of the speech sound file for the death screen being ended abruptly in some cases
|
||||
@@ -373,7 +555,7 @@
|
||||
* 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
|
||||
* Added a fix to prevent crashes when **DebugMode** is enabled and there is a `'%'` character in the printed message
|
||||
* Added a fix to prevent crashes when **DebugMode** is enabled and there is a `%` character in the printed message
|
||||
* Added an option to load a global shader file at game startup and added an example global shader file to the **modders pack**
|
||||
* Added an option to highlight lootable corpses as well as items
|
||||
* Added support for executing the `timed_event_p_proc` procedure in global scripts
|
||||
@@ -381,7 +563,7 @@
|
||||
* New script functions: `add_g_timer_event`, `remove_timer_event`, `reg_anim_callback`, `get_sfall_arg_at`, `hide/show_window`, `set_window_flag`, `get_text_width`, `string_compare`, `string_format`, `objects_in_radius`, `tile_by_position`
|
||||
|
||||
## 3.8.21.1
|
||||
* Fixed a crash bug introduced in 3.8.21 with the fix for corpses blocking line of fire
|
||||
* Fixed a crash bug introduced in 3.8.21 by the fix for corpses blocking line of fire
|
||||
|
||||
## 3.8.21
|
||||
* Fixed a bug in `save_array` script function that could corrupt `sfallgv.sav` when saving a new array under the same key
|
||||
@@ -390,7 +572,7 @@
|
||||
* Fixed `move_obj_inven_to_obj/drop_obj` script functions not removing the equipped armor properly for the player and party members
|
||||
* Fixed `inven_unwield` script function not updating the active item button on the interface bar for the player
|
||||
* Fixed `art_change_fid_num` script function not setting player's FID correctly when the **hero appearance mod** is enabled
|
||||
* Fixed `critter_add/rm_trait` script functions ignoring the value of the **'amount'** argument. Note: pass negative amount values to `critter_rm_trait` to remove all ranks of the perk (vanilla behavior)
|
||||
* Fixed `critter_add/rm_trait` script functions ignoring the **'amount'** argument. Note: pass negative amount values to `critter_rm_trait` to remove all ranks of the perk (vanilla behavior)
|
||||
* Fixed the xp bonus set by `set_swiftlearner_mod` script function not being reset on game load
|
||||
* Fixed the player name while controlling other critters
|
||||
* Improved the display of the car fuel gauge on the world map interface
|
||||
@@ -512,7 +694,7 @@
|
||||
* Added a fix to prevent the reserved object IDs of the player and party members from being generated for other objects
|
||||
* Added a fix for the display issue in the pipboy when the automap list is too long
|
||||
* Added a fix for the `start` procedure not being called correctly if the required standard script procedure is missing (from Crafty)
|
||||
* Added an option to disable the special handling of map IDs 19 and 37 in the engine when entering the maps
|
||||
* Added an option to disable the engine's special handling of map IDs 19 and 37 when entering those maps
|
||||
* Added support for the new **'automap=yes/no'** parameter to `maps.txt`. This parameter overrides the hardcoded values for displaying the map in the pipboy automaps for the first 160 maps
|
||||
* Added files for using 32-bit images for talking heads to the **modders pack**
|
||||
* Improved the functionality of the debug editor (in the **modders pack**)
|
||||
@@ -532,7 +714,7 @@
|
||||
* Added a fix for the reserved item FRM being displayed in the top-left corner when in the loot/barter screens
|
||||
* Added a fix for the active effects of drugs not being saved properly
|
||||
* Added a fix for NPC stuck in a loop of reloading melee/unarmed weapons when out of ammo
|
||||
* Added a fix for critters not being healed over time when entering the map if **'dead_bodies_age=No'** is set in `maps.txt`
|
||||
* Added a fix for critters not being healed over time when entering a map with **'dead_bodies_age=No'** set in `maps.txt`
|
||||
* Added a fix for corpses being removed early after returning to the map
|
||||
* Added a fix for the removal of party member's corpse. Now items in party member's inventory are not removed along with the corpse
|
||||
* Added an option to change the timer for deleting corpses on a map after you leave
|
||||
@@ -547,7 +729,7 @@ Various bug fixes and features based on the work by Mr.Stalin:
|
||||
* Fixed `critter_mod_skill` script function taking a negative amount value as a positive
|
||||
* Fixed a crash when calling `use_obj/use_obj_on_obj` without using `set_self` in global scripts
|
||||
* Fixed `pickup_obj`, `drop_obj`, and `use_obj` script functions not working properly in some cases
|
||||
* Fixed **TimeLimit=-3** not returning the correct year, and removed the setting value -2 (Now it works the same as -3)
|
||||
* Fixed **TimeLimit=-3** not returning the correct year, and removed the setting value of -2 (Now it works the same as -3)
|
||||
* Fixed the mouse cursor lag on the world map when **WorldMapFPSPatch** is enabled
|
||||
* Fixed issues with the game speed tweak. Now the game speed will be temporarily set to normal speed when in the inventory or dialogue, and it doesn't affect the endgame slideshow
|
||||
* Fixed and improved the functionality of **UseFileSystemOverride** and `fs_*` script functions
|
||||
@@ -617,9 +799,9 @@ Various bug fixes and features based on the work by Mr.Stalin:
|
||||
* Improved the functionality of **CritterInvSizeLimitMode** and added party member's current/max inventory size info to the combat control panel
|
||||
* Improved the functionality of **AllowDShowSound**: added volume control support and the ability to play alternative music files even if original **ACM** files are not present in the music folder, and fixed initialization crash bug when **DX9** mode is disabled
|
||||
* Improved the functionality of **ExtraSaveSlots**: added sound effect when clicking on the navigation buttons
|
||||
* Improved the fix for `start_gdialog` script function to fix a crash if calling `start_gdialog` outside of the `talk_p_proc` procedure for talking heads
|
||||
* Improved the functionality of **StartGDialogFix** to fix a crash when calling `start_gdialog` outside the `talk_p_proc` procedure for talking heads
|
||||
* Improved and expanded the functionality of **UseScrollingQuestsList** to display page numbers and add another set of scroll buttons
|
||||
* Expanded `is_iface_tag_active` script function to check tag value of 0/1/2 (sneak/poisoned/radiated)
|
||||
* Expanded `is_iface_tag_active` script function to check tag values of 0/1/2 (sneak/poisoned/radiated)
|
||||
* Added a fix for the broken `obj_can_hear_obj` script function
|
||||
* Added a fix for the underline position in the inventory display window when the item name is longer than one line
|
||||
* Added a fix for AI being unable to use the picked up object immediately when there is a different object with the same ID
|
||||
@@ -632,12 +814,12 @@ Various bug fixes and features based on the work by Mr.Stalin:
|
||||
|
||||
## 3.8.11
|
||||
Various bug fixes based on the work by Mr.Stalin:
|
||||
* Fixed an issue with file IDs of additional game msg files being shifted when a file in **ExtraGameMsgFileList** is missing
|
||||
* Fixed an issue where the file IDs of additional game msg files were shifted when a file in **ExtraGameMsgFileList** was missing
|
||||
* Fixed `obj_can_see_obj` script function not checking if source and target objects are on the same elevation before calling `HOOK_WITHINPERCEPTION` hook script
|
||||
* Added a fix for the display issue in the pipboy when a quest list is too long with **UseScrollingQuestsList** diabled
|
||||
* Added a fix for the clickability issue of holodisk list in the pipboy
|
||||
* Added a fix for the clickability issue of the holodisk list in the pipboy
|
||||
* Added a fix for multihex critters moving too close and overlapping their targets in combat
|
||||
* Added a fix for AI not checking weapon perks properly when choosing the best weapon in combat
|
||||
* Added a fix for AI not checking weapon perks properly when choosing the best weapon
|
||||
|
||||
## 3.8.10
|
||||
* Added an option to use Fallout's normal text font instead of DOS-like font on the world map
|
||||
@@ -661,7 +843,7 @@ Original engine bug fixes and various features based on the work by Mr.Stalin:
|
||||
* New script function: `set_ini_setting` (from Mr.Stalin)
|
||||
|
||||
## 3.8.8
|
||||
* Fixed `add_mult_objs_to_inven` script function only adding 500 of an object when the value of the **'count'** argument is over 99999
|
||||
* Fixed `add_mult_objs_to_inven` script function adding only 500 instances of an object when the value of the **'count'** argument is over 99999
|
||||
* Improved the fix for player's base EMP DR to make sure the value is set correctly
|
||||
|
||||
## 3.8.7
|
||||
@@ -673,7 +855,7 @@ Original engine bug fixes and various features based on the work by Mr.Stalin:
|
||||
* Fixed a crash bug in **NPC combat control** when trying to control a temporary party member that has no data in `party.txt`
|
||||
|
||||
## 3.8.5
|
||||
* Fixed an issue with the game being rendered before the **hero appearance mod** is loaded
|
||||
* Fixed an issue where the game was rendered before the **hero appearance mod** was loaded
|
||||
* Included Chinese and Russian translations
|
||||
|
||||
Original engine bug fixes and various features based on the work by Crafty:
|
||||
@@ -705,7 +887,7 @@ Original engine bug fixes and various features based on the work by Crafty:
|
||||
|
||||
Original engine bug fixes and various features based on the work by Crafty:
|
||||
* Added a fix for a crash when clicking on empty space in the inventory list opened by **'Use Inventory Item On'** (backpack) action icon
|
||||
* Added a fix for negative SPECIAL values in character creation
|
||||
* Added a fix for negative SPECIAL values in the character creation
|
||||
* Added a fix for the game hanging in an endless loop in combat mode when calling `anim` script functions inside `damage_p_proc`
|
||||
* Added 3 new arguments to `HOOK_BARTERPRICE` hook script
|
||||
|
||||
@@ -713,7 +895,7 @@ Original engine bug fixes and various features based on the work by Crafty:
|
||||
* Fixed broken `call_offset_*` script functions
|
||||
* Fixed **OverrideMusicDir** not using the correct path string
|
||||
* Fixed a bug in `metarule2_explosions` function that caused damage type change not to work
|
||||
* Fixed a crash if calling `reg_anim_obj_run_to_tile` after `reg_anim_combat_check`
|
||||
* Fixed a crash when calling `reg_anim_obj_run_to_tile` after `reg_anim_combat_check`
|
||||
* Changed `sfallgv.sav` to be loaded before other save game files to make saved arrays available in the start procedure
|
||||
* Changed **BodyHit_Torso** to **BodyHit_Torso_Uncalled** because it sets both *body_torso* and *body_uncalled* hit modifiers
|
||||
|
||||
@@ -816,7 +998,7 @@ Original engine bug fixes and various features based on the work by Crafty:
|
||||
* Added a fix for the original engine issue that caused party members to have incorrect stats when they level up while on drugs
|
||||
* Added a fix for the unlimited ammo exploit
|
||||
* Added a fix for negative values in Skilldex window
|
||||
* Added a fix for the clickability issue in the pipboy and an exploit that allows resting in places where you shouldn't be able to
|
||||
* Added a fix for the clickability issue in the pipboy and an exploit that allows resting in restricted areas
|
||||
* Added a fix to prevent **'Too Many Items'** bug from corrupting save files
|
||||
* Added a fix for the exploit that you can gain stats from more than two doses of a specific chem after save/load
|
||||
* Added a fix for the original engine issues with reverse order of items in memory relative to visual order in the inventory list
|
||||
@@ -830,4 +1012,4 @@ Original engine bug fixes and various features based on the work by Crafty:
|
||||
* Added an option to allow 9 options (lines of text) to be displayed correctly in the dialog window
|
||||
* Added an option to display additional points of damage from **Bonus HtH/Ranged Damage** perks in the inventory
|
||||
|
||||
__For changelogs prior to 3.7, please read the `sfall-readme.txt` in the [release files](https://github.com/sfall-team/sfall/releases).__
|
||||
__For changelogs prior to version 3.7, please refer to the `sfall-readme.txt` in the [release files](https://github.com/sfall-team/sfall/releases).__
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@@ -664,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
||||
@@ -37,11 +37,25 @@ Delete `ddraw.dll`, `ddraw.ini`, and `sfall.dat` from your Fallout directory.
|
||||
This mod is configured via the `ddraw.ini` file, which can be opened with any text editor. Details of every configerable option are included in that file. Where a comment refers to a DX scancode, the complete list of codes can be found at the link below:\
|
||||
https://kippykip.com/b3ddocs/commands/scancodes.htm
|
||||
|
||||
In a default installation using an unmodified copy of `ddraw.ini`, the middle mouse button will be set to switch between weapons and the mouse wheel will be set to scroll through any menus that respond to the up/down arrow keys. Holding Ctrl and hitting numpad keys 0 to 6 (with Num Lock off) will adjust the game speed. Holding left Ctrl will let you move a whole stack of items at once. Pressing left Shift will highlight items on the ground. The script extender and any engine fixes are also enabled. Most of the options that change gameplay in some way not originally intended by the developers are disabled.
|
||||
In a default installation using an unmodified copy of `ddraw.ini`, the middle mouse button will be set to switch between weapons and the mouse wheel will be set to scroll through any menus that respond to the up/down arrow keys. Holding **Ctrl** and hitting numpad keys 0 to 6 (with Num Lock off) will adjust the game speed. Holding **left Ctrl** will let you move items between inventory lists by simply clicking on them. Pressing **left Shift** will highlight items on the ground, and holding the key will let you move an entire stack of items at once. The script extender and any engine fixes are also enabled. Most of the options that change gameplay in some way not originally intended by the developers are disabled.
|
||||
|
||||
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 C++ 2010 Express SP1 or Visual Studio 2010 SP1.
|
||||
* [DirectX SDK (February 2010)](https://archive.org/details/dxsdk_feb10). You will also need `dinput.lib` from DXSDK August 2007. The file 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).
|
||||
|
||||
### Steps:
|
||||
|
||||
1. Set up a `postbuild.cmd` using the template from the repo.
|
||||
2. Open the solution file and build with the **Release** configuration.
|
||||
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)
|
||||
|
||||
@@ -2,15 +2,64 @@
|
||||
|
||||
;When adding extra perks to a mod, it's advisable to use the fake perk scripting functions rather than make
|
||||
; modifications in this file, as some perks have hardcoded effects which may catch you out
|
||||
;Set the bonus value to 0 in the 'PerksTweak' section for perks to get around this problem
|
||||
|
||||
;Since traits need to be picked before any scripts run, they have an additional NoHardcode option in this file which can
|
||||
; be used to remove their hardcoded effects, and add new stat/skill effects
|
||||
;Since traits need to be picked before any scripts run, they have an additional 'NoHardcode' option in this file
|
||||
; which can be used to remove their hardcoded effects, and add new stat/skill effects
|
||||
|
||||
;##############################################################################
|
||||
[PerksTweak]
|
||||
;Changes the light level bonus for 'Night Vision' perk (ID 9)
|
||||
;valid range: 0..100, 20 - default bonus
|
||||
NightVisionBonus=20
|
||||
|
||||
;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 skill point bonus for 'Educated' perk (ID 18)
|
||||
;125 - maximum bonus, 2 - default bonus
|
||||
EducatedBonus=2
|
||||
|
||||
;Changes the hit point bonuses for 'Healer' perk (ID 19)
|
||||
;999 - maximum bonus, 4 - default bonus
|
||||
HealerMinBonus=4
|
||||
;999 - maximum bonus, 10 - default bonus
|
||||
HealerMaxBonus=10
|
||||
|
||||
;Changes the hit point bonus for 'Lifegiver' perk (ID 28)
|
||||
;125 - maximum bonus, 4 - default bonus
|
||||
LifegiverBonus=4
|
||||
|
||||
;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
|
||||
@@ -30,13 +79,36 @@ WeaponScopeRangeBonus=5
|
||||
VaultCityInoculationsPoisonBonus=10
|
||||
VaultCityInoculationsRadBonus=10
|
||||
|
||||
;Changes the distance bonus for 'Cautious Nature' perk (ID 80)
|
||||
;Affects where critters spawn in 'surrounding' random encounters without a specified distance
|
||||
;valid range: -12..20, 3 - default bonus
|
||||
CautiousNatureBonus=3
|
||||
|
||||
;Changes the percentage bonus for 'Comprehension' perk (ID 81)
|
||||
;50 - default bonus
|
||||
ComprehensionBonus=50
|
||||
|
||||
;Changes the damage bonus per level for 'Demolition Expert' perk (ID 82)
|
||||
;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 damage bonus
|
||||
LivingAnatomyBonus=5
|
||||
;125 - maximum bonus, 10 - default skill bonus
|
||||
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 +122,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
|
||||
@@ -86,7 +171,6 @@ Enable=0
|
||||
|
||||
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
|
||||
|
||||
;##############################################################################
|
||||
;This is a modification to perk 119
|
||||
[119]
|
||||
Name=Example
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
[sfall]
|
||||
;Table for overriding ASCII codes for keyboard character input when entering the player's name and saved game descriptions
|
||||
;Only character codes in the ASCII range 33-126 can be overridden
|
||||
;Character codes that do not need to be overridden can be omitted by using commas as delimiters
|
||||
;You must also set a key for switching layouts using the XltKey option in ddraw.ini
|
||||
;Default character code table for the English layout (letter codes only)
|
||||
;XltTable=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,,,,,,,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,,,,
|
||||
|
||||
;##############################################################################
|
||||
|
||||
SaveInCombat=Cannot save at this time.
|
||||
KarmaGain=You gained %d karma.
|
||||
KarmaLoss=You lost %d karma.
|
||||
@@ -14,6 +23,10 @@ NPCPickupFail=%s cannot pick up the item.
|
||||
AmmoInfoGlovz=Div: DR/%d, DT/%d
|
||||
AmmoInfoYAAM=DT Mod: %d
|
||||
|
||||
PartyOrderAttackHuman=I'll take care of it.|Okay, I got it.|Sounds like a plan.
|
||||
PartyOrderAttackCreature=::Growl::
|
||||
PartyOrderAttackRobot=::Beep::
|
||||
|
||||
[AppearanceMod]
|
||||
RaceText=Race
|
||||
StyleText=Style
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
[Main]
|
||||
|
||||
|
||||
[Items]
|
||||
;Override the PIDs of the standard healing drugs that AI will use in combat
|
||||
;Set to -1 if you don't want AI to identify this item as a healing drug
|
||||
@@ -11,3 +10,10 @@
|
||||
STIMPAK=40
|
||||
SUPER_STIMPAK=144
|
||||
HEALING_POWDER=273
|
||||
|
||||
;Overrides the PID of the item that grants a +1 stat bonus when placed in an active item slot
|
||||
;Default is 433. Set to -1 to prevent any item from granting the bonus
|
||||
MIRROR_SHADES_PID=433
|
||||
;The SPECIAL stat number (0..6) to which the bonus is applied
|
||||
;Default is 3 (Charisma). Set to -1 to disable the item's effect
|
||||
MIRROR_SHADES_STAT=3
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
sfall's main configuration options appear in ddraw.ini, but there are several other configuration files that it can read in for modding purposes.
|
||||
|
||||
Books.ini: Lets you override/add books to the game (associated object PIDs, skills and text messages)
|
||||
Books.ini: Lets you override/add books to the game (associated object PIDs, skills, and text messages)
|
||||
Perks.ini: Lets you override the name/description/frm image/other stats of perks and traits
|
||||
Elevators.ini: Lets you override which elevators lead where
|
||||
Elevators.ini: Lets you override which elevators lead to where
|
||||
CriticalOverrides.ini: Lets you make modifications to the critical hit tables
|
||||
Translations.ini: Contains some text strings which sfall displays, to allow their translation
|
||||
Skills.ini: Lets you change the formula used for calculating skills
|
||||
Stats.ini: Lets you change the formula used to calculate the derived stats
|
||||
Tweaks.ini: Lets you override a few object PIDs used in the engine
|
||||
Unarmed.ini: Lets you configure the requirements and effects of unarmed attacks
|
||||
|
||||
+155
-78
File diff suppressed because it is too large
Load Diff
@@ -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,429 @@
|
||||
/*
|
||||
This script reimplements the healing skills of the original game.
|
||||
This version uses a refactored code with no less code duplication, but potentially some minor differences from vanilla.
|
||||
You can use this to make any tweaks you want to these skills.
|
||||
*/
|
||||
|
||||
#include "../../scripting/headers/define_lite.h"
|
||||
#include "../../scripting/headers/define_extra.h"
|
||||
#include "../../scripting/headers/sfall.h"
|
||||
#include "../../scripting/headers/lib.arrays.h"
|
||||
#include "../../scripting/headers/lib.math.h"
|
||||
|
||||
#define PID_FIRST_AID_KIT (47)
|
||||
#define PID_DOCTORS_BAG (91)
|
||||
#define PID_FIELD_MEDIC_KIT (408)
|
||||
#define PID_PARAMEDICS_BAG (409)
|
||||
|
||||
#define DAM_CRIP (DAM_CRIP_ARM_LEFT bwor DAM_CRIP_ARM_RIGHT bwor DAM_CRIP_LEG_LEFT bwor DAM_CRIP_LEG_RIGHT bwor DAM_BLIND)
|
||||
#define COMBAT_STATE_FLEEING (4)
|
||||
|
||||
#define critter_max_hp(cr) get_critter_stat(cr, STAT_max_hit_points)
|
||||
#define critter_cur_hp(cr) get_critter_stat(cr, STAT_current_hp)
|
||||
#define critter_has_dmg_flag(cr, flag) ((get_object_data(cr, OBJ_DATA_DAMAGE_FLAGS) bwand flag) != 0)
|
||||
|
||||
#define clear_critter_flag(cr, offset, flag) set_object_data(cr, offset, get_object_data(cr, offset) bwand bwnot(flag))
|
||||
#define clear_critter_dmg_flag(cr, flag) clear_critter_flag(cr, OBJ_DATA_DAMAGE_FLAGS, flag)
|
||||
#define clear_critter_combat_flag(cr, flag) clear_critter_flag(cr, OBJ_DATA_COMBAT_STATE, flag)
|
||||
|
||||
#define SKILLS_MAX_USES_PER_DAY (3)
|
||||
|
||||
variable times_skill_used, healable_damage_flags;
|
||||
|
||||
procedure skill_use_slot_available(variable skill) begin
|
||||
variable slot, time, hoursSinceLastUsage, timesUsed;
|
||||
|
||||
// Lazy init array
|
||||
if (not times_skill_used) then
|
||||
times_skill_used := create_array_map;
|
||||
|
||||
if (not times_skill_used[skill]) then
|
||||
times_skill_used[skill] := create_array_list(SKILLS_MAX_USES_PER_DAY);
|
||||
|
||||
timesUsed := times_skill_used[skill];
|
||||
for (slot := 0; slot < SKILLS_MAX_USES_PER_DAY; slot++) begin
|
||||
if (timesUsed[slot] == 0) then
|
||||
return slot;
|
||||
end
|
||||
time := game_time;
|
||||
hoursSinceLastUsage = (time - timesUsed[0]) / ONE_GAME_HOUR;
|
||||
if (hoursSinceLastUsage <= 24) then begin
|
||||
return -1;
|
||||
end
|
||||
return SKILLS_MAX_USES_PER_DAY - 1;
|
||||
end
|
||||
|
||||
procedure skill_use_slot_add(variable skill) begin
|
||||
variable i, timesUsed,
|
||||
slot := skill_use_slot_available(skill);
|
||||
|
||||
if (slot == -1) then
|
||||
return -1;
|
||||
|
||||
timesUsed := times_skill_used[skill];
|
||||
if (timesUsed[slot] != 0) then begin
|
||||
// Shift all earlier use times to make use for the new time.
|
||||
for (i := 0; i < slot; i++) begin
|
||||
timesUsed[i] := timesUsed[i + 1];
|
||||
end
|
||||
end
|
||||
|
||||
timesUsed[slot] = game_time;
|
||||
return 0;
|
||||
end
|
||||
|
||||
procedure critter_is_dead(variable critter) begin
|
||||
if (not critter) then
|
||||
return false;
|
||||
|
||||
if (obj_type(critter) != OBJ_TYPE_CRITTER) then
|
||||
return false;
|
||||
|
||||
if (critter_cur_hp(critter) <= 0) then
|
||||
return true;
|
||||
|
||||
if (is_critter_dead(critter) != 0) then
|
||||
return true;
|
||||
|
||||
return false;
|
||||
end
|
||||
|
||||
procedure critter_body_type(variable critter) begin
|
||||
if (not critter) then begin
|
||||
debug_msg("\nError: critter_body_type: pobj was NULL!");
|
||||
return CR_BODY_BIPED;
|
||||
end
|
||||
|
||||
if (obj_type(critter) != OBJ_TYPE_CRITTER) then
|
||||
return CR_BODY_BIPED;
|
||||
|
||||
return proto_data(obj_pid(critter), cr_body_type);
|
||||
end
|
||||
|
||||
procedure critter_is_crippled(variable critter) begin
|
||||
if (not critter) then
|
||||
return false;
|
||||
|
||||
if (obj_type(critter) != OBJ_TYPE_CRITTER) then
|
||||
return false;
|
||||
|
||||
return critter_has_dmg_flag(critter, DAM_CRIP);
|
||||
end
|
||||
|
||||
procedure get_skill_xp(variable skill) begin
|
||||
switch (skill) begin
|
||||
case SKILL_FIRST_AID: return 25;
|
||||
// case SKILL_REPAIR: return 0; // no exp for repair skill in vanilla!
|
||||
case SKILL_DOCTOR: return 50;
|
||||
default: return 0;
|
||||
end
|
||||
end
|
||||
|
||||
procedure show_skill_use_messages(variable skill, variable successCount := 1) begin
|
||||
variable baseExp, xpToAdd, before, after;
|
||||
if (successCount <= 0) then return;
|
||||
|
||||
baseExp = get_skill_xp(skill);
|
||||
if (baseExp == 0) then return;
|
||||
|
||||
xpToAdd = successCount * baseExp;
|
||||
|
||||
before = get_pc_stat(PCSTAT_experience);
|
||||
|
||||
give_exp_points(xpToAdd);
|
||||
|
||||
after = get_pc_stat(PCSTAT_experience);
|
||||
display_msg(sprintf(mstr_skill(505), after - before));
|
||||
end
|
||||
|
||||
variable sfall_ini_RemoveCriticalTimelimits := -2;
|
||||
|
||||
/**
|
||||
* Exactly like FO2 roll_check function, but without returning "how_much".
|
||||
* @arg {int} rollMod
|
||||
* @arg {int} critSuccessMod
|
||||
*/
|
||||
procedure roll_check(variable rollMod, variable critSuccessMod) begin
|
||||
variable
|
||||
delta := rollMod - random(1, 100),
|
||||
roll, criticalsAllowed;
|
||||
|
||||
if (sfall_ini_RemoveCriticalTimelimits == -2) then
|
||||
sfall_ini_RemoveCriticalTimelimits := get_ini_setting("ddraw.ini|Misc|RemoveCriticalTimelimits");
|
||||
|
||||
criticalsAllowed := (sfall_ini_RemoveCriticalTimelimits > 0) or (game_time >= ONE_GAME_DAY);
|
||||
|
||||
if (delta < 0) then begin
|
||||
return ROLL_CRITICAL_FAILURE
|
||||
if (criticalsAllowed and random(1, 100) <= -delta / 10)
|
||||
else ROLL_FAILURE;
|
||||
end
|
||||
return ROLL_CRITICAL_SUCCESS
|
||||
if (criticalsAllowed and random(1, 100) <= delta / 10 + critSuccessMod)
|
||||
else ROLL_SUCCESS;
|
||||
end
|
||||
|
||||
// 530: damaged eye
|
||||
// 531: crippled left arm
|
||||
// 532: crippled right arm
|
||||
// 533: crippled right leg
|
||||
// 534: crippled left leg
|
||||
#define display_uncrippled_msg(dmgFlagIdx, prefixMsgId) display_msg(sprintf(mstr_skill(prefixMsgId), mstr_skill(530 + dmgFlagIdx)))
|
||||
|
||||
|
||||
/**
|
||||
* A refactored version of skill_use function from the engine, for use with healing skills only. Returns true if skill use was actually attempted.
|
||||
* @arg {ObjectPtr} user
|
||||
* @arg {ObjectPtr} target
|
||||
* @arg {int} skill - First Aid, Doctor or Repair
|
||||
* @arg {int} skillBonus
|
||||
*/
|
||||
procedure use_healing_skill(variable user, variable target, variable skill, variable skillBonus) begin
|
||||
variable curHp, maxHp, healingAttempts, isRobot, isRepair, isFirstAid;
|
||||
|
||||
display_msg(string_format("use_healing_skill: user = %s, target = %s, bonus = %d, skill = %d", obj_name(user), obj_name(target), skillBonus, skill));
|
||||
|
||||
isRobot := (critter_body_type(target) == CR_BODY_ROBOTIC);
|
||||
isRepair := (skill == SKILL_REPAIR);
|
||||
if (isRepair and not isRobot) then begin
|
||||
// You cannot repair that.
|
||||
display_msg(mstr_skill(553));
|
||||
return false;
|
||||
end
|
||||
if (skill_use_slot_available(skill) == -1) then begin
|
||||
// 590: You've taxed your ability with that skill. Wait a while.
|
||||
// 591: You're too tired.
|
||||
// 592: The strain might kill you.
|
||||
display_msg(mstr_skill(590 + random(0, 2)));
|
||||
return false;
|
||||
end
|
||||
if (critter_is_dead(target)) then begin
|
||||
// 512: You can't heal the dead.
|
||||
// 513: Let the dead rest in peace.
|
||||
// 514: It's dead, get over it.
|
||||
display_msg(mstr_skill(512 + random(0, 2)));
|
||||
return false;
|
||||
end
|
||||
|
||||
isFirstAid := (skill == SKILL_FIRST_AID);
|
||||
|
||||
curHp := critter_cur_hp(target);
|
||||
maxHp := critter_max_hp(target);
|
||||
healingAttempts := 1;
|
||||
if (curHp < maxHp or (not isFirstAid and critter_is_crippled(target))) then begin
|
||||
variable skillUseSlotAdded, roll, i, prefixMsg,
|
||||
critChance := get_critter_stat(user, STAT_crit_chance) + skillBonus;
|
||||
|
||||
fade_out;
|
||||
|
||||
// Heal crippled limbs.
|
||||
if (not isFirstAid and (not isRepair or not isRobot) and critter_is_crippled(target)) then begin
|
||||
// Lazy init healable flags
|
||||
if (not healable_damage_flags) then
|
||||
healable_damage_flags := array_fixed([
|
||||
DAM_BLIND,
|
||||
DAM_CRIP_ARM_LEFT,
|
||||
DAM_CRIP_ARM_RIGHT,
|
||||
DAM_CRIP_LEG_RIGHT,
|
||||
DAM_CRIP_LEG_LEFT
|
||||
]);
|
||||
|
||||
for (i := 0; i < len_array(healable_damage_flags); i++) begin
|
||||
if (not critter_has_dmg_flag(target, healable_damage_flags[i])) then
|
||||
continue;
|
||||
|
||||
healingAttempts += 1;
|
||||
roll := roll_vs_skill(user, skill, critChance);
|
||||
if (roll == ROLL_SUCCESS or roll == ROLL_CRITICAL_SUCCESS) then begin
|
||||
clear_critter_dmg_flag(target, healable_damage_flags[i]);
|
||||
clear_critter_combat_flag(target, COMBAT_STATE_FLEEING);
|
||||
// 520: You heal your %s.
|
||||
// 521: You heal the %s.
|
||||
display_uncrippled_msg(i, 520 if (target == dude_obj) else 521);
|
||||
call skill_use_slot_add(skill);
|
||||
skillUseSlotAdded := true;
|
||||
if (user == dude_obj) then
|
||||
call show_skill_use_messages(skill);
|
||||
end else begin
|
||||
// 525: You fail to heal your %s.
|
||||
// 526: You fail to heal the %s.
|
||||
display_uncrippled_msg(i, 525 if (target == dude_obj) else 526);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// Restore hit points.
|
||||
roll := (roll_vs_skill(user, skill, critChance) if isFirstAid else roll_check(has_skill(user, skill), critChance))
|
||||
if (isRepair or not isRobot)
|
||||
else ROLL_FAILURE;
|
||||
|
||||
if (roll == ROLL_SUCCESS or roll == ROLL_CRITICAL_SUCCESS) then begin
|
||||
variable
|
||||
minHpToHeal := (1 if isFirstAid else 4),
|
||||
maxHpToHeal := (5 if isFirstAid else 10),
|
||||
hpToHeal;
|
||||
if (user == dude_obj and not isRepair) then begin
|
||||
variable healerRank := has_trait(TRAIT_PERK, user, PERK_healer);
|
||||
minHpToHeal += 4 * healerRank;
|
||||
maxHpToHeal += 10 * healerRank;
|
||||
end
|
||||
hpToHeal = random(minHpToHeal, maxHpToHeal);
|
||||
critter_heal(target, hpToHeal);
|
||||
|
||||
if (user == dude_obj) then begin
|
||||
// You heal %d hit points.
|
||||
display_msg(sprintf(mstr_skill(500), math_min(maxHp - curHp, hpToHeal)));
|
||||
end
|
||||
|
||||
if (not skillUseSlotAdded) then
|
||||
call skill_use_slot_add(skill);
|
||||
|
||||
clear_critter_combat_flag(target, COMBAT_STATE_FLEEING);
|
||||
if (user == dude_obj) then
|
||||
call show_skill_use_messages(skill);
|
||||
end else begin
|
||||
// You fail to do any healing.
|
||||
display_msg(sprintf(mstr_skill(503), how_much(0)));
|
||||
end
|
||||
|
||||
fade_in;
|
||||
end else if (user == dude_obj) then begin
|
||||
// 501: You look healty already
|
||||
// 502: %s looks healthy already
|
||||
display_msg(mstr_skill(501)
|
||||
if (target == dude_obj)
|
||||
else sprintf(mstr_skill(502), obj_name(target)));
|
||||
end
|
||||
if (user == dude_obj) then begin
|
||||
game_time_advance((ONE_GAME_HOUR if (skill == SKILL_DOCTOR) else (30 * ONE_GAME_MINUTE)) * healingAttempts);
|
||||
end
|
||||
// TODO: not sure if this is needed
|
||||
//exec_map_update_scripts
|
||||
return true;
|
||||
end
|
||||
|
||||
|
||||
/**
|
||||
* A partial copy of engine's protinst_use_item_on with code pertinent to healing skills. Returns value for set_sfall_return in useobjon_hook.
|
||||
* @arg {ObjectPtr} user - item user
|
||||
* @arg {ObjectPtr} target - target
|
||||
* @arg {ObjectPtr} item - item
|
||||
* @ret {bool}
|
||||
*/
|
||||
procedure protinst_use_item_on(variable user, variable target, variable item) begin
|
||||
variable begin
|
||||
messageId := -1;
|
||||
skillBonus := 0;
|
||||
skill := -1;
|
||||
end
|
||||
switch (obj_pid(item)) begin
|
||||
case PID_DOCTORS_BAG: begin
|
||||
// The supplies in the Doctor's Bag run out.
|
||||
messageId = 900;
|
||||
skillBonus = 20;
|
||||
skill = SKILL_DOCTOR;
|
||||
end
|
||||
case PID_FIRST_AID_KIT: begin
|
||||
// The supplies in the First Aid Kit run out.
|
||||
messageId = 901;
|
||||
skillBonus = 20;
|
||||
skill = SKILL_FIRST_AID;
|
||||
end
|
||||
case PID_PARAMEDICS_BAG: begin
|
||||
// The supplies in the Paramedic's Bag run out.
|
||||
messageId = 910;
|
||||
skillBonus = 40;
|
||||
skill = SKILL_DOCTOR;
|
||||
end
|
||||
case PID_FIELD_MEDIC_KIT: begin
|
||||
// The supplies in the Field Medic First Aid Kit run out.
|
||||
messageId = 911;
|
||||
skillBonus = 40;
|
||||
skill = SKILL_FIRST_AID;
|
||||
end
|
||||
end
|
||||
if (skill == -1) then
|
||||
return -1;
|
||||
|
||||
if (combat_is_initialized) then begin
|
||||
// You cannot do that in combat.
|
||||
if (user == dude_obj) then
|
||||
display_msg(mstr_proto(902));
|
||||
return 0;
|
||||
end
|
||||
|
||||
if (not use_healing_skill(user, target, skill, skillBonus)) then
|
||||
return 0;
|
||||
|
||||
if (random(1, 10) != 1) then
|
||||
return 0;
|
||||
|
||||
if (user == dude_obj) then
|
||||
display_msg(mstr_proto(messageId));
|
||||
|
||||
return 1;
|
||||
end
|
||||
|
||||
/*
|
||||
Runs when:
|
||||
|
||||
a critter uses an object on another critter. (Or themselves)
|
||||
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.
|
||||
player or AI uses any drug
|
||||
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 arg0 - The target
|
||||
Critter arg1 - The user
|
||||
int arg2 - The object used
|
||||
|
||||
int ret0 - overrides hard-coded handler and selects what should happen with the item (0 - place it back, 1 - remove it, -1 - use engine handler)
|
||||
*/
|
||||
procedure useobjon_hook begin
|
||||
variable
|
||||
target := get_sfall_arg,
|
||||
user := get_sfall_arg,
|
||||
item := get_sfall_arg,
|
||||
useItemResult;
|
||||
|
||||
useItemResult := protinst_use_item_on(user, target, item);
|
||||
if (useItemResult != -1) then
|
||||
set_sfall_return(useItemResult);
|
||||
end
|
||||
|
||||
/*
|
||||
Runs when using any skill on any object.
|
||||
|
||||
This is fired before the default handlers are called, which you can override. In this case you should write your own skill use handler entirely, or otherwise nothing will happen (this includes fade in/fade out, time lapsing and messages - all of this can be scripted; to get vanilla text messages - use message_str_game along with sprintf). Suggested use - override First Aid/Doctor skills to buff/nerf them, override Steal skill to disallow observing NPCs inventories in some cases.
|
||||
|
||||
Does not run if the script of the object calls script_overrides for using the skill.
|
||||
|
||||
Critter arg0 - The user critter
|
||||
Obj arg1 - The target object
|
||||
int arg2 - skill being used
|
||||
int arg3 - skill bonus from items such as first aid kits
|
||||
|
||||
int ret0 - overrides hard-coded handler (-1 - use engine handler, any other value - override; if it is 0, there will be a 10% chance of removing the used medical item)
|
||||
*/
|
||||
procedure useskill_hook begin
|
||||
variable
|
||||
user := get_sfall_arg,
|
||||
target := get_sfall_arg,
|
||||
skill := get_sfall_arg,
|
||||
skillBonus := get_sfall_arg,
|
||||
isSuccess;
|
||||
|
||||
if (skill == SKILL_FIRST_AID or skill == SKILL_DOCTOR or skill == SKILL_REPAIR) then begin
|
||||
isSuccess := use_healing_skill(user, target, skill, skillBonus);
|
||||
set_sfall_return(0 if isSuccess else 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
procedure start begin
|
||||
if (game_loaded) then begin
|
||||
register_hook_proc(HOOK_USEOBJON, useobjon_hook);
|
||||
register_hook_proc(HOOK_USESKILL, useskill_hook);
|
||||
end
|
||||
end
|
||||
Binary file not shown.
@@ -1,11 +1,13 @@
|
||||
/**
|
||||
|
||||
Item Highlight mod (Lite version)
|
||||
Item Highlighting mod (Lite version)
|
||||
|
||||
A cut-down version of the mod included in sfall 4.x, offers a bit more features than the built-in function.
|
||||
A cut-down version of the mod included in sfall 4.x, offering more features than the built-in function.
|
||||
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)
|
||||
@@ -15,7 +17,7 @@
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.1
|
||||
version 1.3
|
||||
|
||||
**/
|
||||
|
||||
@@ -24,6 +26,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)
|
||||
|
||||
@@ -32,36 +35,78 @@ variable highlightKey;
|
||||
variable isHighlight;
|
||||
variable alsoContainer;
|
||||
variable alsoCorpse;
|
||||
variable alsoCritter;
|
||||
variable checkLOS;
|
||||
variable outlineColor;
|
||||
variable outlineColorContainers;
|
||||
variable outlineColorCorpses;
|
||||
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;
|
||||
|
||||
if obj_type(obj) == OBJ_TYPE_CRITTER then
|
||||
return outlineColorCorpses;
|
||||
|
||||
if obj_item_subtype(obj) == item_type_container then
|
||||
return outlineColorContainers;
|
||||
|
||||
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,9 +114,9 @@ procedure KeyPressHandler begin
|
||||
scanCode := get_sfall_arg,
|
||||
scanner, charges;
|
||||
|
||||
if scanCode == highlightKey and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
if scanCode == highlightKey and not(get_game_mode bwand bwnot(COMBAT bwor PCOMBAT)) 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
|
||||
@@ -94,16 +139,21 @@ procedure KeyPressHandler begin
|
||||
call ToggleHighlight(true);
|
||||
end
|
||||
end else begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// visual glitch fix - for 3.8.29+
|
||||
// visual glitch fix, turn off highlight when entering combat - for 3.8.40+
|
||||
procedure CombatTurnHandler begin
|
||||
if isHighlight then begin
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
|
||||
// visual glitch fix, turn off highlight when opening other interfaces - for 3.8.29+
|
||||
procedure GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
isHighlight := false;
|
||||
if isHighlight and (get_game_mode bwand bwnot(COMBAT bwor PCOMBAT)) then begin
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
@@ -114,22 +164,35 @@ procedure InventoryMoveHandler begin
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major < 4 and sfall_ver_build >= 12) then begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major >= 4 or sfall_ver_build < 12) 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;
|
||||
outlineColorContainers := GetConfig(configSection, "OutlineColorContainers", 16);
|
||||
if (outlineColorContainers < 1) then outlineColorContainers := 64;
|
||||
outlineColorCorpses := GetConfig(configSection, "OutlineColorCorpses", 16);
|
||||
if (outlineColorCorpses < 1) then outlineColorCorpses := 64;
|
||||
motionScanner := GetConfig(configSection, "MotionScanner", 0);
|
||||
|
||||
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
|
||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
||||
|
||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
||||
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 bwnot(COMBAT bwor PCOMBAT)) then begin
|
||||
call ToggleHighlight(true);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,51 +12,52 @@
|
||||
#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
|
||||
procedure GetIniConfig(variable section, variable key, variable def, variable inifile) begin
|
||||
variable val := get_ini_setting(inifile + "|" + section + "|" + key);
|
||||
if val == -1 then val := def;
|
||||
if (val == -1) then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the string value from the specified ini
|
||||
procedure GetIniConfigStr(variable section, variable key, variable def, variable inifile) begin
|
||||
variable val := get_ini_string(inifile + "|" + section + "|" + key);
|
||||
if val == -1 orElse val == "" then val := def;
|
||||
if (val == -1 orElse val == "") then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the integer value from sfall-mods.ini
|
||||
procedure GetConfig(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_setting(ini + "|" + section + "|" + key);
|
||||
if val == -1 then val := def;
|
||||
if (val == -1) then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the string value from sfall-mods.ini
|
||||
procedure GetConfigStr(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
||||
if val == -1 orElse val == "" then val := def;
|
||||
if (val == -1 orElse val == "") then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the value from sfall-mods.ini as a temp array of strings
|
||||
procedure GetConfigList(variable section, variable key) begin
|
||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
||||
if val == -1 orElse val == "" then return [];
|
||||
if (val == -1 orElse val == "") then return [];
|
||||
|
||||
return string_split(val, ",");
|
||||
end
|
||||
|
||||
// Gets the value from sfall-mods.ini as a temp array of ints
|
||||
procedure GetConfigListInt(variable section, variable key) begin
|
||||
variable arr, i, item;
|
||||
variable arr, len, i, item;
|
||||
|
||||
arr := GetConfigList(section, key);
|
||||
for (i := 0; i < len_array(arr); i++) begin
|
||||
len = len_array(arr);
|
||||
for (i := 0; i < len; i++) begin
|
||||
arr[i] := atoi(arr[i]);
|
||||
end
|
||||
return arr;
|
||||
@@ -65,9 +66,7 @@ end
|
||||
// Translates given string using Translations.ini
|
||||
procedure Translate(variable id, variable def) begin
|
||||
variable str := get_ini_string(translationIni + "|Sfall|" + id);
|
||||
if (str == 0 orElse (strlen(str) == 0)) then begin
|
||||
str := def;
|
||||
end
|
||||
if (str == 0 orElse strlen(str) == 0) then return def;
|
||||
return str;
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Item Highlight mod (Lite version) for sfall 3.8.x
|
||||
-------------------------------------------------
|
||||
Item Highlighting mod (Lite version) for sfall 3.8.x
|
||||
----------------------------------------------------
|
||||
|
||||
A cut-down version of the mod included in sfall 4.x, offers a bit more features than the built-in function.
|
||||
A cut-down version of the mod included in sfall 4.x, offers more features than the built-in function.
|
||||
Features:
|
||||
- highlighting items, containers (optional) and lootable corpses (optional) on the ground
|
||||
- highlights items, containers (optional) and lootable corpses (optional) on the ground
|
||||
- configurable hotkey is used to trigger highlight
|
||||
- only objects in direct line-of-sight of player are highlighted (optional)
|
||||
- motion scanner is required to enable highlight (optional)
|
||||
@@ -12,10 +12,10 @@ Features:
|
||||
|
||||
Requires sfall 3.8.12 or higher.
|
||||
|
||||
To use, copy gl_highlighting_lite.int to your scripts folder, and copy sfall-mods.ini to the same directory as sfall.
|
||||
Also, you should disable the built-in function in ddraw.ini (ToggleItemHighlightsKey=0).
|
||||
To use, copy gl_highlighting_lite.int to your scripts folder and sfall-mods.ini to the mods folder in the same directory as sfall.
|
||||
Create the mods folder if it does not exist. Also, you should disable the built-in function in ddraw.ini (ToggleItemHighlightsKey=0).
|
||||
|
||||
Note that due to the lack of newer game hooks in sfall 3.8.x, there are some minor visual glitches in the lite version:
|
||||
- items will be kept highlighted when entering combat while holding the highlight key.
|
||||
- when you pick up items while holding the highlight key, they will be kept highlighted if you drop them on the ground (fixed for 3.8.18+).
|
||||
- items will be kept highlighted when entering combat while holding the highlight key (fixed in 3.8.40+).
|
||||
- when you pick up items while holding the highlight key, they will be kept highlighted if you drop them on the ground (fixed in 3.8.18+).
|
||||
Both glitches can bo solved by pressing and releasing the highlight key again.
|
||||
|
||||
@@ -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; available colors:
|
||||
; 1 - glowing red
|
||||
; 2 - red
|
||||
; 4 - grey
|
||||
@@ -20,11 +23,51 @@ 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 3.8.27 or later)
|
||||
OutlineColor=16
|
||||
|
||||
; Set the color of outlines for containers
|
||||
OutlineColorContainers=4
|
||||
|
||||
; Set the color of outlines for corpses
|
||||
OutlineColorCorpses=4
|
||||
|
||||
; Motion Scanner mode:
|
||||
; 0 - ignored
|
||||
; 1 - requires Motion Scanner present in player inventory to activate highlighting
|
||||
; 2 - requires Motion Scanner and also requires 1 charge on every use (depleted scanner will not work anymore)
|
||||
; 1 - requires Motion Sensor to be present in the player's inventory to activate highlighting
|
||||
; 2 - requires Motion Sensor and consumes 1 charge on every use (depleted sensor will not work anymore)
|
||||
MotionScanner=0
|
||||
|
||||
|
||||
[CombatControl]
|
||||
;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 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
|
||||
|
||||
;Set a comma-delimited list of perk IDs for perks to be inherited from the player during the combat control
|
||||
PerksList=0,73
|
||||
|
||||
;Set to 1 to allow the player to gain a positive reputation when killing NPCs while controlling other critters
|
||||
GainReputation=0
|
||||
|
||||
;Choose a notification box to display the name of the controlled critter above the interface bar
|
||||
;Must be between 5 and (4 + the value of BoxBarCount in ddraw.ini)
|
||||
;For sfall 4.1.6+ the number for the notification box is set automatically, so just use any value
|
||||
;Set to 0 to disable
|
||||
DisplayName=0
|
||||
|
||||
;Set the color of display name, available colors:
|
||||
;0 - green
|
||||
;1 - red
|
||||
;2 - white
|
||||
;3 - yellow
|
||||
;4 - dark yellow
|
||||
;5 - blue
|
||||
;6 - purple
|
||||
;7 - dull pink
|
||||
DisplayNameColor=0
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
|
||||
Molotov Fire Damage mod for Fallout 2 by NovaRain
|
||||
-------------------------------------------------
|
||||
|
||||
- molotov cocktail now inflicts fire damage to critters
|
||||
- molotov cocktail can still blow up some doors and scenery objects as before
|
||||
|
||||
Requires sfall 3.8.4 or higher
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
procedure start;
|
||||
procedure afterhitroll_handler;
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_AFTERHITROLL, afterhitroll_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure afterhitroll_handler begin
|
||||
variable
|
||||
hitType := get_sfall_arg,
|
||||
attacker := get_sfall_arg,
|
||||
target := get_sfall_arg,
|
||||
slot, item;
|
||||
|
||||
if (target and attacker) then begin
|
||||
if (attacker == dude_obj and active_hand == 0) then begin
|
||||
slot := INVEN_TYPE_LEFT_HAND;
|
||||
end else begin
|
||||
slot := INVEN_TYPE_RIGHT_HAND;
|
||||
end
|
||||
item := critter_inven_obj(attacker, slot);
|
||||
|
||||
if (item and obj_pid(item) == PID_MOLOTOV_COCKTAIL) then begin
|
||||
if (obj_type(target) == OBJ_TYPE_SCENERY and hitType > 1) then begin
|
||||
set_proto_data(PID_MOLOTOV_COCKTAIL, PROTO_WP_DMG_TYPE, DMG_explosion);
|
||||
end else begin
|
||||
set_proto_data(PID_MOLOTOV_COCKTAIL, PROTO_WP_DMG_TYPE, DMG_fire);
|
||||
set_attack_explosion_radius(2); // grenade radius
|
||||
set_attack_is_explosion_fire;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user