Compare commits

..
193 Commits
Author SHA1 Message Date
NovaRain e706fba989 Updated changelog 2024-04-19 08:42:19 +08:00
NovaRain 884c00ffeb Reverted ScriptValue DataType from long to short (sync with 4.x)
Updated version number.
2024-04-18 22:23:39 +08:00
NovaRain 78ef06c8e6 Text edits to INI files 2024-04-18 20:48:58 +08:00
NovaRain d75d46d281 Updated changelog 2024-04-04 22:51:14 +08:00
NovaRain fc1d9dbfc2 Removed SpeedInterfaceCounterAnims=3 (now default behavior) 2024-04-01 17:21:34 +08:00
NovaRain b50dcaa151 Fixed xp exploit from canceling Here and Now perk
(when the player has Swift Learner perk)

Removed DisplaySwiftLearnerExp from ddraw.ini (always enabled)
2024-03-29 16:57:10 +08:00
NovaRain 53f427fcac Minor code edits 2024-03-28 08:35:15 +08:00
NovaRain 818c2eb6b2 Edits to gl_partycontrol and main.h
* it seems no need to "fix" Gecko Skinning perk anymore.
* use array to hold perk levels instead of calling has_trait twice.
2024-03-27 11:20:36 +08:00
NovaRain ad2b9ab0fb Added a new example mod gl_molotov 2024-03-26 12:15:15 +08:00
NovaRain 46349c5d69 Fixed add_extra_msg_file loading the same msg file more than once (#467)
Minor code edits.
Updated version number.
2024-03-22 12:09:14 +08:00
NovaRain 8a8455efea Added a new example mod gl_static_books 2024-03-14 10:20:42 +08:00
NovaRain 6e7ba2f5b9 Restored support for pre-SSE processors
(revert commit c9712f7)

* the codegen optimization from VS2010 isn't much (e.g. the number of
CMOVcc), so better to make 3.8.x focus on wider compatibility.
2024-03-14 10:17:43 +08:00
NovaRain da08bdbf83 Edits to sslc documents
* edited the description of command line options.
* removed old references of dos4gw.exe (only for pre-2.10) and FSE.
2024-03-11 10:10:03 +08:00
NovaRain dc97dad94c Fixed the clickability issue of the "Use Inventory Item On" action
* the game would execute the default action for the overlapped object
instead of the player using the item.

(ref. BGforgeNet/Fallout2_Restoration_Project#271)
2024-03-05 10:41:09 +08:00
NovaRain 82cf074845 Updated npcarmor.ini based on new NPC armor mod
(ref. BGforgeNet/Fallout2_NPC_Armor@ca93bb6)
2024-03-05 10:32:01 +08:00
NovaRain 8e95b2d8f6 Updated npcarmor.ini based on newer RPU (v27+) 2024-03-04 11:53:46 +08:00
NovaRain 81638168c2 Tweaked the log for loading global scripts
* it should be after the game scripts check.
2024-03-03 00:01:37 +08:00
NovaRain 56459ee5f0 Added additional check to AI weapon switching fix 2024-02-29 13:21:08 +08:00
NovaRain 35276dfe59 Added support for an external DirectDraw wrapper 2024-02-26 09:28:03 +08:00
NovaRain 0400671f38 Cosmetic edits: unified indentation of switch-case 2024-02-22 08:41:45 +08:00
NovaRain 30cb8b7ee9 Fixed critical hit message for super mutants
* judging from combat.msg, the fix has been applied to a wrong
bodypart since 2.8b.
2024-02-17 07:52:56 +08:00
NovaRain 273c44e788 Fixed the game disappearing from the taskbar after using Alt+Tab
Code change to the input patch.
Updated version number.
2024-02-16 09:30:16 +08:00
NovaRain 4ef8986bda Updated changelog 2024-02-12 20:45:37 +08:00
NovaRain dbf5e36b86 Added a fix to prevent integer overflow for inven item stacks
* This is more of a preventive fix because now it's easier to cause
integer overflow with add_mult_objs_to_inven. Also in case people
use save editor and set silly values to their items.
2024-02-12 09:57:22 +08:00
NovaRain 386d373376 Fixed the modulo operator for negative integers
* this changes the behavior of vanilla modulo operator to use signed
integer division to match how the fixed division operator works.
2024-01-25 10:20:41 +08:00
NovaRain 360037a2fd Changed the fix for add_mult_objs_to_inven
(to allow adding more than 99999 instances of an object in one go)
2024-01-24 09:45:05 +08:00
NovaRain a3c8f0f609 Added missing level cap to XPTable (fixed a hang) 2024-01-15 14:30:27 +08:00
NovaRain 7dda156ee7 Fixed log entry for PatchFileXX options
(also allow using ".\\", as it cannot escape the game folder.)
2024-01-11 21:40:34 +08:00
NovaRain 31a5dbc61c Updated version number and year 2024-01-02 10:31:08 +08:00
NovaRain c476e54db0 Added reg_anim_animate_and_move script function 2023-12-27 13:21:40 +08:00
NovaRain 95dc75da38 Fixed right arm critical hit messages for some critter types
(BGforgeNet/Fallout2_Restoration_Project#256)
2023-12-19 21:02:19 +08:00
NovaRain e276c59447 Tweaked the condition check for instadeath fix 2023-12-15 20:45:30 +08:00
NovaRain 1c3e2f2eb1 Fixed 0 dmg instadeath crits with HOOK_COMBATDAMAGE 2023-12-15 09:18:26 +08:00
NovaRain 3dcc26a739 Fixed skipping to lv99 when leveling up from lv97
(mentioned in Per's guide)

Minor code edits.
2023-12-04 21:53:26 +08:00
NovaRain 8ef6a66134 Use proper size directives in ASM code 2023-12-02 18:32:19 +08:00
NovaRain 0bba6ccb54 Engine now uses 'English' as the fallback language for the credits
Updated version number.
2023-11-30 22:44:17 +08:00
NovaRain 8f846eda6e Updated changelog for better clarity 2023-11-20 21:28:42 +08:00
NovaRain 572cbd059f Updated changelog 2023-11-20 10:20:02 +08:00
NovaRain f02ba1993b Fixed create_object_sid when passing 0 as the script index number
* would result in a crash. Now it allows creating an object with no
script (different from -1, which just doesn't touch default script).
2023-11-14 21:49:36 +08:00
NovaRain f800b7bb33 Tweaked the position of the ammo bar 2023-10-30 21:33:04 +08:00
NovaRain de3d6256e3 Fixed incorrect data for saved arrays
Updated version number.
2023-10-27 22:43:23 +08:00
NovaRain ae0f3d6fdc Fixed crash when calling start_gdialog outside talk_p_proc
(the fix was embedded in StartGDialogFix, now it works regardless of
the option.)
2023-10-19 15:18:17 +08:00
NovaRain f46ffb4ea5 Updated documents (mainly array functions) 2023-10-16 11:34:45 +08:00
NovaRain c7ecf1c070 Changed the "best armor" score calc to exclude EMP
(gameplay mod friendly)
2023-10-07 19:45:19 +08:00
NovaRain 8c277730bf Updated NPC combat control mod for player's Jinxed trait/perk
* controlled critters will now be "Jinxed" as well
2023-10-05 09:26:35 +08:00
NovaRain 898e7bb4e0 Removed AdditionalWeaponAnims from ddraw.ini (always enabled)
Updated version number.
2023-10-05 09:11:17 +08:00
NovaRain 3e955572be Corrected the description of CALCAPCOST hook 2023-09-30 17:18:51 +08:00
NovaRain 7fc5dc47b4 Fixed German translation 2023-08-26 01:41:58 +08:00
NovaRain 71e3ee4801 Improved compatibility with pre-SP4 Win2000
Moved the LoadLibrary call out of DllMain entry point.
Updated version number and changelog.
2023-08-24 21:42:27 +08:00
NovaRain 59eacce6be Updated changelog and other documents 2023-08-21 14:24:44 +08:00
NovaRain ff53d2515d Fixed UpdateHPStat() for not properly capping HP
* when a critter has modified base value of max HP in its proto.
2023-08-09 10:30:58 +08:00
NovaRain 8fd5182bb5 Renamed "string_pos" function to "string_find" 2023-08-09 08:57:03 +08:00
NovaRain 2677d9faa7 Fixed the backward compatibility of get_npc_level
(broken in commit 347dc85)
2023-08-04 09:15:01 +08:00
NovaRain 9fe3ed5d98 Headers update
- Synced a small number of defines from RPU headers
- Removed duplicate defines from define_lite
2023-07-31 20:55:34 +08:00
NovaRain e6610c4bbe Expanded the engine perk options in perks.ini 2023-07-31 20:54:54 +08:00
NovaRain 31630f6627 Added build instructions to readme 2023-07-27 08:24:47 +08:00
NovaRain 489f62f5cb Header fixes
- Fix conflict with RPU command_extra.h
- Fix undefined debug_array_str error
2023-07-24 08:36:28 +08:00
NovaRain 1f802cab6f Fixed incorrect int->float conversion in op_sub
Fixed ASM code in StealCheckHook from previous commit.
2023-07-23 08:21:37 +08:00
NovaRain 788593cdcc Backported the improvements of HOOK_STEAL
Edits to hookscripts.md and ddraw.ini.
2023-07-22 21:06:38 +08:00
NovaRain 680310f702 Re-added the check for valid objs to get/set_object_data
* disabled in combat for the combat data.
2023-07-19 20:56:31 +08:00
NovaRain 4f36136a39 Edited function and sslc docs 2023-07-17 20:54:57 +08:00
NovaRain 48355fa637 Minor code edits to BugFixes.cpp
Minor edits to some comments.
2023-07-14 09:46:53 +08:00
NovaRain 6af62af27d Backported "get_object_ai_data" script function
Updated headers and documents.
Edited error messages for some script functions.
2023-07-11 11:20:56 +08:00
NovaRain bd76a3ded7 Added upper/lower limits to the hit chance value
Edited hookscript docs.
2023-07-09 15:24:46 +08:00
NovaRain 3a08488895 Added "string_pos" function from 4.x
Added a check to PartyControl::OrderAttackPatch().
Updated function documents.
Updated scripting headers.
2023-07-05 22:20:14 +08:00
NovaRain 2941157174 Added NPC combat control mod to example mods
Updated item highlighting mod and NPC armor mod.
2023-07-03 15:35:03 +08:00
NovaRain 2148650313 Use explicit GetFileAttributesA function 2023-07-02 08:29:30 +08:00
NovaRain 6dee4e1183 Removed capping of console window position and size
* for multi-monitor setup, leaving only minimum size of 640x480.
2023-06-29 21:34:41 +08:00
NovaRain b2e60ba62e Backported IniConfigFolder option
* using C-string instead of std::string.
2023-06-28 08:52:28 +08:00
NovaRain a71c2c901a Removed unused bufSize argument from IniReader
Fixed return value of getString with buffer argument.
Increased max line length to 2048.
Added file check for books/drugs/enginetweaks ini files.
Fixed possible array index out of bound error in BarBoxes.
Added trimming to custom unarmed attack names.
2023-06-27 21:40:55 +08:00
NovaRain 4f3c1a60b4 Console window improvements
- Retain maximized/minimized state
- Save normal position when closing in maximized/minimized state
- Allow to move window in negative x direction
- Disable close button
- Save position if game was closed by pressing Alt+F4 in console window
2023-06-27 21:21:13 +08:00
NovaRain 9674c16928 Fixed position jumping for console window
Improved "string_format" script function.
Edited error messages for a few functions.
Updated documents.
2023-06-25 16:30:46 +08:00
NovaRain 0c035a05df op_create_spatial: fix spatial object having no scriptIndex upon creation
ConsoleWindow: prevent user from messing up window position & size
2023-06-24 09:07:10 +08:00
NovaRain 51cd2eab69 Unified the name of "GameRest" function in modules 2023-06-22 11:51:14 +08:00
NovaRain 323631835b Added arrary cache reset to get_ini_config
* prevent returning wrong arrays (left from previous session).

Removed "tr1" namespace (no needed for VS2010 and later).
Minor code edits.
2023-06-22 09:04:22 +08:00
NovaRain 135c26ab70 Load order: more informative logging
Code fixes to PartyControl.cpp and ConsoleWindow.cpp.

Updated version number in documents.

Updated changelog in sslc document, and removed the mention about
empty statements (it never worked).
2023-06-21 22:39:59 +08:00
NovaRain 34092900a6 Backported the module manager from 4.x 2023-06-20 11:16:30 +08:00
NovaRain c8fe92ef7d Updated document and sfall.h for get_ini_config 2023-06-19 22:18:01 +08:00
NovaRain b578aecc59 Backported INI parser from 4.x (part 2)
Added Config.cpp/h (core parser based on vanilla & Fallout CE).
Implemented the parser to IniReader.
Added "get_ini_config" function.
2023-06-19 22:15:37 +08:00
NovaRain b57a87f98f Backported INI parser from 4.x (part 1)
* Some misc code changes first.
* Changed saving game/console window positions in OnBeforeGameClose.
* Simplified arrays code a bit.
* Added binary string support to atoi.
2023-06-19 21:58:45 +08:00
NovaRain 2156f82184 Backported the buffer overflow fix for debug log from 4.x
Simplified ASM code in Premade.cpp a bit.
2023-06-17 22:01:36 +08:00
NovaRain be6947e3d2 Added code page setting for the console window 2023-06-15 23:28:04 +08:00
NovaRain f0784e2987 Updated the description in [ExtraPatches] for mods_order.txt
Tweaked the error log entry for mods_order.txt.
Minor code edits.
2023-06-15 13:40:12 +08:00
NovaRain 1a6a9e5ec1 Backported ConsoleWindow option from 4.x 2023-06-15 13:27:56 +08:00
NovaRain 0be6011c19 Removed debug message about missing critter art from displaying in-game
* to prevent unnecessary annoyance to generic players.

Added a safeguard to get_tile_fid.
Fixed crash in debug build due to stdcall not being specified.
2023-06-14 09:48:51 +08:00
NovaRain 6f45d45fcd Updated documents for hook/function changes 2023-06-13 12:33:28 +08:00
NovaRain f413bb8b9a Backported the new mods_order.txt mechanism 2023-06-13 12:12:07 +08:00
NovaRain e3907c3647 Allow passing string directly to set_sfall_return in HOOK_DESCRIPTIONOBJ
- HookScripts: track return types in addition to values
- Set allowNonIntReturn in hook code to allow non-int return values to be accepted
- Moved get_sfall_arg and set_sfall_return opcodes to the new table
2023-06-13 12:07:04 +08:00
NovaRain 007386caec Backported get_tile_fid improvements from 4.x 2023-06-13 12:05:00 +08:00
NovaRain c593269ee7 Fixed get_tile_fid function to work on elevation 1 and 2
* it now follows dude elevation.
2023-06-12 23:20:49 +08:00
NovaRain 1976461b72 Fixed invWieldFunc for non-weapon/armor items
Fixed lib.inven.h header from develop branch.
2023-06-12 22:50:21 +08:00
NovaRain 9fa123d15f Added get_combat_free_move metarule
Updated documents and headers.
Added PartyOrderToAttack to ddraw.ini.
2023-06-09 11:19:45 +08:00
NovaRain 3b6435d8a4 Backported HOOK_COMBATTURN from 4.2
* using pre-4.2.8 codebase

Replaced ControlCombat option with PartyOrderToAttack.
Updated documents.
2023-06-07 21:48:54 +08:00
NovaRain 7322634780 Backported three game hooks from 4.x:
* ROLLCHECK, BESTWEAPON, CANUSEWEAPON

Updated documents.
2023-06-06 21:46:03 +08:00
NovaRain 7f0398c618 Added options to override the names of sound files for game modes
Remove the worldmap/credits music override from Fallout1Behavior.
(was added in commit 41a1fea)

Minor edits to ddraw.ini.
2023-06-05 11:46:07 +08:00
NovaRain 4e3f065453 Updated headers and function document from 4.x 2023-06-05 11:03:51 +08:00
NovaRain 378bc8a126 Added set_combat_free_move metarule and 2 args to HOOK_STDPROCEDURE
Added a missing hack from 4.x to PartyControl.cpp.
2023-06-05 10:42:02 +08:00
NovaRain e92c994744 Added a new example mod gl_rest_encounter
Added a burst control example script.
2023-06-02 15:15:01 +08:00
NovaRain a1d0e59287 Fixed crash when using NumbersInDialogue
(revert commit 576bea2)
2023-06-01 15:58:23 +08:00
NovaRain 40f2050f8c Minor edits to ddraw.ini and define_extra.h 2023-05-29 15:22:45 +08:00
NovaRain c33c200b51 Sync header changes with develop branch 2023-05-25 09:37:54 +08:00
NovaRain 26693fd0ed Decoupled hook type 2 of HOOK_AMMOCOST from CheckWeaponAmmoCost
Edits to documents to reflect the hook change.
Changed CheckWeaponAmmoCost to be enabled by default.
Updated version number.
2023-05-20 10:59:26 +08:00
NovaRain 033c8bf8ef Randomized one extra bullet for side groups in burst attacks
* idea from phobos2077.

Added minimum value check to multipliers.
2023-05-19 09:54:49 +08:00
NovaRain ddf2854938 Added "set_spray_settings" function for scriptable burst
Added documentation for set_spray_settings.
Remove postbuild.cmd from git.
2023-05-19 09:51:58 +08:00
NovaRain 637de0e07d Fixed "divided by zero" error when returning 0 in AMMOCOST hook
* with CheckWeaponAmmoCost=1.

Added a value check to the return value of AMMOCOST hook.
Updated hookscripts.md to reflect this change.
2023-05-18 10:02:07 +08:00
NovaRain ff1c87f0c5 Updated gl_compute_damage example script from 4.x
* with script-based YAAM implementation.

Sync header changes with develop branch.

Changed AttackSubType enum "GUNS" to "RANGED".
(to be in line with define_extra.h, the naming is from RE/CE.)
2023-05-15 12:16:23 +08:00
NovaRain 66c0ed8cb2 Updated some defines
- ATKMODE defines removed to avoid confusion - these are really two 4-bit fields, not bit flags!
2023-05-14 08:24:02 +08:00
NovaRain f3bbfbfa28 Sync header changes with develop branch 2023-05-08 17:30:09 +08:00
NovaRain 41a1fead58 Expanded the functionality of Fallout1Behavior
* change the world map music and the credits music to match FO1 files.

Increased the maximum value of the combat speed slider.
Some minor code edits.
2023-04-30 09:21:53 +08:00
NovaRain a0cf633899 Tweaked set_pc/critter_base/extra_stat script functions
* before they didn't update derived stats when setting SPECIAL, for
the player it requires accessing the char screen to update.

Replaced some proto_ptr() usages with GetProto().
2023-04-22 23:46:16 +08:00
NovaRain a09611edc6 Backported the "order to attack" function from 4.x
Updated translation ini files.
Updated version number.
2023-04-19 10:35:59 +08:00
NovaRain 291370a96c Attempt for reproducible builds
* ducible.exe is built with v140_xp toolset and /arch:SSE.

Code edits to Interface.cpp.

* to avoid error C3068 for Debug config in VS2010.
2023-04-17 10:09:21 +08:00
NovaRain 576bea2aa9 Minor code edits to MiscPatches.cpp 2023-04-12 10:04:43 +08:00
NovaRain 765b19e045 Minor edit to the changelog 2023-03-29 14:32:33 +08:00
NovaRain f4fe4211e1 Fixed assorted typos in documents
Added an example ini to Ammo INI Loader mod.
Updated the changelog.
2023-03-27 20:35:24 +08:00
NovaRain 0c3d6004a7 Added support for closing the game by Alt+F4
Moved some code from Graphics.cpp to new WinProc files.
Patched dead code in memory in DamageMod.cpp.
2023-03-16 10:55:05 +08:00
NovaRain f6675cf241 Updated readme and added changelog (#451) 2023-03-13 14:23:10 +08:00
NovaRain 736c2cb6fe Backported "item_make_explosive" script function
Updated documents for the function.
Removed deprecated "register" keyword.
2023-03-10 21:08:05 +08:00
NovaRain 13445a1b83 Changed the copyright text format in the credits 2023-03-06 22:42:14 +08:00
NovaRain 4417947c56 Moved some code to the new submodule files
Fixed a crash bug with setting the DAM_BACKWASH flag for the attacker.
(from 6e10f62)
2023-03-06 22:28:39 +08:00
NovaRain 6903d59e6d Renamed some object flags 2023-03-05 10:21:17 +08:00
NovaRain 5e3e37f74c Added a tweak to the ammo info for Glovz's/YAAM
* to display correct ammo stats based on the formulas w/o editing
proto.msg manually.

Updated translation ini files.

Set the maximum number of screenshots to 10k (was 100k)

* 100k is impractical because the max files per directory on FAT32 is
65535 (only if all files are in 8.3 format) when the game came out.
2023-03-01 09:18:28 +08:00
NovaRain e090fd833b Removed CreditsAtBottom from ddraw.ini
* sfall built-in credits will be shown at the beginning when from the
main menu and at the end during the ending.
2023-02-26 23:31:48 +08:00
NovaRain 1ab8407407 Fixed incorrect death endings being shown
* can happen in vanilla FO2 when the player is lv10 or higher,
with a low chance.
2023-02-15 21:06:45 +08:00
NovaRain a4558993e0 Removed redundant "Done" strings from sfall log
* only when there are alternative states or for graphics/sound/scripting
2023-02-10 08:54:52 +08:00
NovaRain f1131b87c6 Tweaked how disabled unsafe opcodes work
* now disabled opcodes will just do nothing instead of causing the
script terminated.
2023-02-09 15:06:19 +08:00
NovaRain 465bc649be Removed StackEmptyWeapons from ddraw.ini (always enabled) 2023-02-02 12:39:06 +08:00
NovaRain 9db5f45545 Added a tweak to allow premade characters to have less than two traits
Fixed the player's traits not being displayed in certain unusual cases.
(with save editing or hex-edited GCD file)
2023-01-10 10:33:00 +08:00
NovaRain fb4770edc4 Increased the upper limit of ProcessorIdle 2023-01-07 23:07:31 +08:00
NovaRain 921f14f43f Cosmetic edits: updated/unified the copyright header years 2022-12-31 10:14:38 +08:00
NovaRain d013d59afd Edits to sfall_ver_* script functions
* they take no arguments and only return constants, simpler structure
in ASM is enough.
2022-12-26 08:50:56 +08:00
NovaRain 2828e08f68 Fixed broken read_string script function
* actually it has never worked.
2022-12-22 09:37:19 +08:00
NovaRain 0b08035b97 Fixed a crash bug in FullItemDescInBarter
* when weapon/ammo has no description, it'd trigger UB from strncpy_s.
2022-12-17 10:36:25 +08:00
NovaRain 62b0955807 Changed all fastcall wrappers to stdcall 2022-12-03 13:19:54 +08:00
NovaRain 67b46cd4a6 Backported three more hooks from 4.1:
* USESKILLON, ONEXPLOSION, SETLIGHTING.

Backported PartyMemberSkillFix option from 4.1.
Updated documents.
2022-12-01 08:41:05 +08:00
NovaRain bb13e3f219 Backported 5 game hooks from 4.1/4.2:
* SNEAK, STDPROCEDURE, STDPROCEDURE_END, TARGETOBJECT, ENCOUNTER.

Updated documents and example mods.
2022-11-29 14:27:10 +08:00
NovaRain 7ecdfe362f Backported three game hooks from 4.1:
* USEANIMOBJ, EXPLOSIVETIMER, DESCRIPTIONOBJ

Updated documents and example mods
2022-11-27 09:27:46 +08:00
NovaRain 4f34217625 Backported game hooks from 4.0.x
* COMBATTURN is not implemented.

Updated documents.
2022-11-26 09:57:01 +08:00
NovaRain f4666dad18 Minor edits to a few ASM hacks
(Changed 2-bytes null jcc to just 2 nop)
2022-11-16 12:19:22 +08:00
NovaRain 536e3b2741 Tweaked HOOK_INVENTORYMOVE for dropping caps
* before the amount was set in the dropped object only after the hook.

Edits to hookscripts.md.
2022-10-29 11:33:42 +08:00
NovaRain f4c72a4e6e Edited the format for window title
Reorganized RMOBJ_* defines in define_extra.h.
2022-10-27 17:21:57 +08:00
NovaRain db40eae68f Some format edits to documents
Updated version number.
2022-10-25 21:25:48 +08:00
NovaRain f1626e846a Changed the check for unavailable hooks
* easier to backport more discontinuous hooks if needed.
2022-10-19 10:59:17 +08:00
NovaRain 5429217c0a Minor edit to hookscripts.md 2022-10-18 08:59:14 +08:00
NovaRain 59aee239fe Fixed incorrect critter names for corpses
* happens when multiple critters based on the same proto with
different scripts attached are killed.

Tweaked the fix for create_object_sid function.
2022-10-09 23:25:51 +08:00
NovaRain d429af8011 Code correction to LoadOrder.cpp
Updated version number.
2022-09-28 10:18:19 +08:00
NovaRain ba186590bc Backported [ExtraPatches] section from 4.x
* in pre-4.1.9 configuration, without .dat autoloading.
2022-09-22 10:50:10 +08:00
NovaRain f94cadf767 Backported rest related script functions from 4.x
* set_rest_heal_time, set_rest_mode, get/set_can_rest_on_map
2022-09-20 09:14:08 +08:00
NovaRain aea263eddd Backported "dialog_message" script function
Updated documents for the function.
2022-08-19 09:12:48 +08:00
NovaRain b7fc0fb1d7 Fixed HOOK_REMOVEINVENOBJ to match RMOBJ_* defines
Edits to define_extra.h for RMOBJ_* defines
2022-08-14 11:04:46 +08:00
NovaRain b8c3f89279 Expanded set_pipboy_available function for mode 2 2022-08-11 21:27:19 +08:00
NovaRain 82eb78e185 Code edits to SpeedInventoryPCRotation
Updated version number.
2022-08-09 21:34:12 +08:00
NovaRain d8fafa85a9 Added support for editor.msg to message_str_game
Edits to header files.
2022-08-09 08:14:04 +08:00
NovaRain a121d09704 Corrected the language path for loading art files 2022-08-08 22:09:11 +08:00
NovaRain b0fa170ffd Combined AllowDShowSound=2 with mode 1
Removed MoreTiles from ddraw.ini (always enabled)
Minor edits to documents.
2022-08-08 09:10:53 +08:00
NovaRain c9712f75ee Dropped support for old pre-SSE processors
Changed buf_to_buf function to SSE implementation.

* affected old processors:
Intel - Pentium II, older Celeron (Covington/Mendocino)
AMD - older K7 (Athlon Classic/Thunderbird)
2022-07-30 00:45:42 +08:00
NovaRain 7f426608d2 Corrected comments in Functions.cpp 2022-07-27 22:12:39 +08:00
NovaRain 81af621b3c Changed the default number of sound buffers
Updated version number.
2022-07-26 08:28:59 +08:00
NovaRain 0ed00a0a41 Minor edits to sslc document 2022-07-22 22:23:27 +08:00
NovaRain 89eff96b69 Switch default Cat Jules appearance to leather jacket
* The original default/naked appearance (`nmprmb`) in RP only has very limited weapon anims.
2022-07-18 16:21:03 +08:00
NovaRain e24e616d5c Correction to previous commit 2022-07-07 08:28:37 +08:00
NovaRain 08d2ffe26d Fixed NPC stuck in a loop of reloading the solar scorcher
(happens when out of ammo and it's dark.)
2022-07-06 20:06:59 +08:00
NovaRain 225fa9cc57 Edits to document about set_self function
Updated version number.
2022-07-02 20:04:35 +08:00
NovaRain 511d594e7d Fixed float_msg script function
* didn't set purple/black text color correctly (was always grey)
2022-06-30 21:54:56 +08:00
NovaRain 0e0d884a97 Changed the mode 1 of NPC combat control
* now requires sfall debugging mode to control all critters.
2022-06-24 09:39:31 +08:00
NovaRain 2950140e3a Added a warning pop-up for the open file limit 2022-06-17 22:48:43 +08:00
NovaRain e70005dbd5 Added "get_terrain_name" script function
Updated documents for the function.
Minor edits to other code.
2022-06-14 21:09:31 +08:00
NovaRain 5ac91aec79 Minor edits to Perks.ini (120 CPL) and ddraw.ini 2022-06-10 09:04:49 +08:00
NovaRain 2578963f7d Added ladder climbing action to UseWalkDistance
Added notes to MainMenuFontColour description in ddraw.ini.
Updated version number.
2022-06-07 10:25:38 +08:00
NovaRain ce82348a15 Simplified the code for ControlCombatPIDList 2022-06-03 12:30:22 +08:00
NovaRain 74f3036b57 Minor code edits
* read FastShotFix setting only once.
2022-06-02 14:23:04 +08:00
NovaRain 7666b4e08f Replaced item_w_curr_ammo_ engine function
* a simplified one, without calling proto_ptr_ unnecessarily.

Related code edits to Combat.cpp & Inventory.cpp.
2022-06-01 12:53:30 +08:00
NovaRain b10fb8c162 Added a function to EngineUtils.cpp
Minor edits to ddraw.ini.
2022-05-28 21:41:49 +08:00
NovaRain e3628232c5 Tweaked how the graphics mode setting is read
Changed all checks with Graphics::mode in the same way as 4.x.
Added a couple of notes to ddraw.ini.
Minor code edits.
2022-05-27 13:18:29 +08:00
NovaRain 205602d85d Updated compiled HLSL shaders
* using the compiler from DXSDK June 2010.

Minor edits to documents.
2022-05-25 21:59:00 +08:00
NovaRain 89f454e825 Removed ComputeSprayMod from ddraw.ini
Updated version number.
2022-05-25 21:41:31 +08:00
NovaRain 977eae4c24 Fixed being able to push knocked down team members in combat 2022-05-23 12:02:11 +08:00
NovaRain 3cb013dfa3 Simplified the fix in commit e7e6175 2022-05-22 14:47:19 +08:00
NovaRain c0bee95aa4 Code edits to the previous commit 2022-05-20 15:33:47 +08:00
NovaRain 8ce87a3088 Changed Stats::UpdateHPStat() to update the current HP as well 2022-05-11 21:56:19 +08:00
NovaRain 5aadf41668 Fixed crash when the player equips an "overloaded" weapon
Fixed a bug in ReloadWeaponKey that could cause a hang.
(only triggerable due to the crash fix for overloaded weapons)
2022-05-05 10:41:44 +08:00
NovaRain 7d71917f7a Removed DivisionOperatorFix from ddraw.ini (always enabled) 2022-04-29 08:10:45 +08:00
NovaRain 9454ad75a3 Backported FO1 worldmap sfx addition from 4.x (#373)
Added some function offsets from 4.x.
2022-04-21 19:55:19 +08:00
NovaRain 4c7cfb11b6 Corrected placeholders for obsolete opcodes
Minor edit to documents.
Updated version number.
2022-04-20 09:51:54 +08:00
NovaRain 4460325f70 Minor edit to Credits.cpp 2022-04-11 09:57:17 +08:00
NovaRain c427604d8d Edited code comment in the previous commit
Code format edits to BugFixes.cpp.
2022-04-07 20:45:05 +08:00
NovaRain e7e6175084 Fixed item planting for non-biped critters with the "barter" flag set
(BGforgeNet/Fallout2_Unofficial_Patch#95)

Updated version number.
2022-04-04 21:34:01 +08:00
NovaRain 73e1faae92 Removed commented code in the previous commit
Edits to documents and README.md.
2022-03-28 14:57:37 +08:00
NovaRain bdb95c80ec Edits to hookscripts.md
Corrected a typo in arrays.md.
Removed redundant compiler txt files.
2022-03-21 22:51:57 +08:00
NovaRain a9a5627b83 Removed FadeBackgroundMusic option (cur. disabled)
* because the fix code doesn't work on all supported systems.
2022-03-21 08:45:38 +08:00
NovaRain e566db91bb Updated Ammo INI Loader example script mod
Updated version number.
2022-03-15 13:02:33 +08:00
NovaRain 8d6e6874ee Added .gitattributes with ssl syntax highlighting
Minor code edits to the built-in item highlighting function.
2022-03-11 20:32:55 +08:00
NovaRain 7cc25efb01 Code edits converge with 4.x 2022-02-20 08:56:43 +08:00
299 changed files with 11801 additions and 4750 deletions
+1
View File
@@ -0,0 +1 @@
*.ssl linguist-language=Pascal
+3
View File
@@ -26,6 +26,7 @@
*.exe
*.out
*.app
!ducible.exe
# NetBeans
nbproject/private/
@@ -46,6 +47,8 @@ nb-configuration.xml
*.user
*.userosscache
*.sln.docstates
*.VC.db
*.VC.opendb
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+908
View File
File diff suppressed because it is too large Load Diff
+51 -3
View File
@@ -1,6 +1,10 @@
# sfall
A set of engine modifications for the classic game Fallout 2 in form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
[![License](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Dev Build](https://github.com/phobos2077/sfall/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/phobos2077/sfall/actions/workflows/build.yml)
[![GitHub Pages](https://github.com/phobos2077/sfall/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/phobos2077/sfall/actions/workflows/gh-pages.yml)
A set of engine modifications for the classic game Fallout 2 in the form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
**Engine modifications include:**
- Better support for modern operating systems
@@ -9,8 +13,52 @@ A set of engine modifications for the classic game Fallout 2 in form of a DLL, w
- Many additional features for users, such as item highlight button, party member control, etc.
- Extended scripting capabilities for modders (many new opcodes to control sfall features as well as previously unavailable vanilla engine functions)
Original author: **Timeslip**
Original author: timeslip
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows Fallout to run correctly on modern operating systems, and adds additional features for modders.
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows fallout to run correctly on modern operating systems, and adds additional features for modders.
## Installation
- Download `sfall_*.7z` from the [release archive](https://sourceforge.net/projects/sfall/files/).
- Extract `ddraw.dll`, `ddraw.ini`, and `sfall.dat` to Fallout's base directory (i.e. the one that contains `fallout2.exe`).
- __Important Note:__\
If you are using a mod that already included sfall (e.g. killap's [Unofficial Patch](https://github.com/BGforgeNet/Fallout2_Unofficial_Patch) or [Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project)), then that mod has probably included a custom modified `ddraw.ini`. In that case, overwriting it with sfall's vanilla `ddraw.ini` will be likely break your game. Instead, only overwrite `ddraw.dll`, and keep the mod's existing copy of `ddraw.ini`. (Or, if you know what you're doing, you can merge them together by hand.)
- The folder `translations` contains translations of some of the strings that sfall displays in the game. To use a translation, copy this folder to Fallout's base directory too, and then in `ddraw.ini` change the __TranslationsINI__ setting to `.\translations\<your language>.ini`.
## Uninstallation
Delete `ddraw.dll`, `ddraw.ini`, and `sfall.dat` from your Fallout directory.
## Usage
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.
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)
* [Scripting Documentation](https://sfall-team.github.io/sfall/)
* Fallout Engine IDA Database: [for IDA Pro 6.8](https://www.dropbox.com/s/tm0nyx0lnk4yui0/Fallout_1_and_2_IDA68.rar?dl=1 "Download from Dropbox") | [for IDA Pro 7.0](https://www.dropbox.com/s/61srq09pn8grfpu/Fallout_1_and_2_IDA70.rar?dl=1 "Download from Dropbox") (comments are in Russian)
* [Fallout 2 Reference Edition](https://github.com/alexbatalov/fallout2-re)
+73 -13
View File
@@ -1,16 +1,45 @@
;This file handles modifications to perks and traits
;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
;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
;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 Outdoorsman skill bonus for 'Survivalist' perk (ID 16)
;125 - maximum bonus, 25 - default bonus
SurvivalistBonus=25
;Changes the bonus for 'Master Trader' perk (ID 17)
;25 - default bonus
MasterTraderBonus=25
;Changes the Science and Repair skill bonus for 'Mr.Fixit' perk (ID 31)
;125 - maximum bonus, 10 - default bonus
MrFixitBonus=10
;Changes the skill bonuses for 'Medic' perk (ID 32)
;125 - maximum bonus, 10 - default bonus
MedicFirstAidBonus=10
MedicDoctorBonus=10
;Changes the Lockpick and Steal skill bonus for 'Master Thief' perk (ID 33)
;125 - maximum bonus, 15 - default bonus
MasterThiefBonus=15
;Changes the Speech skill bonus for 'Speaker' perk (ID 34)
;125 - maximum bonus, 20 - default bonus
SpeakerBonus=20
;Changes the Sneak skill bonus (when in darkness) for 'Ghost' perk (ID 38)
;125 - maximum bonus, 20 - default bonus
GhostBonus=20
;Changes the Outdoorsman skill bonus for 'Ranger' perk (ID 47)
;125 - maximum bonus, 15 - default bonus
RangerOutdoorsmanBonus=15
;Changes the distance bonus for 'Weapon Long Range' weapon perk (ID 58)
;2 - no bonus, 4 - default bonus
WeaponLongRangeBonus=4
@@ -34,9 +63,22 @@ VaultCityInoculationsRadBonus=10
;999 - maximum bonus, 10 - default bonus
DemolitionExpertBonus=10
;Changes the damage bonus for 'Living Anatomy' perk (ID 97)
;125 - maximum bonus, 5 - default bonus
;Changes the Gambling skill bonus for 'Gambler' perk (ID 83)
;125 - maximum bonus, 20 - default bonus
GamblerBonus=20
;Changes the Steal skill bonus for 'Harmless' perk (ID 91)
;125 - maximum bonus, 20 - default bonus
HarmlessBonus=20
;Changes the damage bonus and the Doctor skill bonus for 'Living Anatomy' perk (ID 97)
;125 - maximum bonus, 5 - default bonus, 10 - default skill bonus
LivingAnatomyBonus=5
LivingAnatomyDoctorBonus=10
;Changes the Speech and Barter skill bonus for 'Negotiator' perk (ID 99)
;125 - maximum bonus, 10 - default bonus
NegotiatorBonus=10
;Changes the damage bonus for 'Pyromaniac' perk (ID 101)
;125 - maximum bonus, 5 - default bonus
@@ -50,10 +92,23 @@ SalesmanBonus=20
;valid range: 0..100, 50 - default percent
StonewallPercent=50
;Changes the Lockpick, Steal, and Traps skill bonus for 'Thief' perk (ID 105)
;125 - maximum bonus, 10 - default bonus
ThiefBonus=10
;Changes the strength bonus for 'Weapon Handling' perk (ID 106)
;0 - no bonus, 10 - maximum bonus, 3 - default bonus
WeaponHandlingBonus=3
;Changes the skill bonuses for 'Vault City Training' perk (ID 107)
;125 - maximum bonus, 5 - default bonus
VaultCityTrainingFirstAidBonus=5
VaultCityTrainingDoctorBonus=5
;Changes the Speech skill bonus for 'Expert Excrement Expeditor' perk (ID 116)
;125 - maximum bonus, 5 - default bonus
ExpertExcrementExpeditorBonus=5
;##############################################################################
[Perks]
;Set to 1 to enable the modifications for perks
@@ -64,20 +119,25 @@ Enable=0
;Image: The line number (0-indexed) of the corresponding FRM in skilldex.lst
;Ranks: The number of perk levels
;Level: The minimum required level
;Type: If 0, the perk checks only Skill1 for skill requirements; if 1, it checks Skill1 or Skill2; if 2, it checks both Skill1 and Skill2
;Type: If 0, the perk checks only Skill1 for skill requirements; if 1, it checks Skill1 or Skill2; if 2, it checks both
; Skill1 and Skill2
;Stat: The modified stat or -1 if you don't want to change any stats
;StatMag: The increased/decreased value to the modified stat
;Skill1/Skill2: The first/second skill (or -1 for none) to check, but if you set a specific bit 0x4000000 (67108864), it checks GVAR.
; For example, if Skill1=0x4000004, then the perk will check GVAR_BAD_MONSTER (0x4000000 + 4) on Skill1Mag value
;Skill1/Skill2: The first/second skill (or -1 for none) to check, but if you set a specific bit 0x4000000 (67108864),
; it checks the corresponding GVAR
; For example, if Skill1=0x4000004, the perk will check GVAR_BAD_MONSTER (0x4000000 + 4) on Skill1Mag value
;Skill1Mag/Skill2Mag: Positive value is used as the minimum requirements of the first/second skill/GVAR, and a negative value is interpreted as the maximum requirement.
; For example, with Skill1=0 and Skill1Mag=100, if player has small guns skill >= 100 and meets all other requirements, the perk will be available in the
; selection window; with Skill1=1 and Skill1Mag=-120, the perk will not be available if player has big guns skill >= 120
;Skill1Mag/Skill2Mag: Positive value is used as the minimum requirements of the first/second skill/GVAR, and a negative
; value is interpreted as the maximum requirement
; For example, with Skill1=0 and Skill1Mag=100, if player has small guns skill >= 100 and meets all other requirements,
; the perk will be available in the selection window; with Skill1=1 and Skill1Mag=-120, the perk will not be available
; if player has big guns skill >= 120
;STR-LCK: Positive values are used as minimum requirements of SPECIAL stats, and negative values are interpreted as maximum requirements.
; For some special perks processed by the engine (e.g. PERK_armor_powered and PERK_armor_combat), the values are not used as requirements
; but to add to corresponding SPECIAL stats
;STR-LCK: Positive values are used as minimum requirements of SPECIAL stats, and negative values are interpreted as
; maximum requirements
; For some special perks processed by the engine (e.g. PERK_armor_powered and PERK_armor_combat), the values are not
; used as requirements but to add to corresponding SPECIAL stats
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
+7 -1
View File
@@ -11,6 +11,12 @@ PartyLvlMsg=Lvl:
PartyACMsg=AC:
PartyAddictMsg=Addict
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
@@ -32,4 +38,4 @@ DoneBtn=Done
;PowerKick=Power Kick:
;HipKick=Hip Kick:
;HookKick=Hook Kick:
;PiercingKick=Piercing kick:
;PiercingKick=Piercing Kick:
+1 -1
View File
@@ -10,4 +10,4 @@
;in the proto for other items, so AI will use them for healing in combat as well
STIMPAK=40
SUPER_STIMPAK=144
HEALING_POWDER=237
HEALING_POWDER=273
+122 -83
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v3.8.33.1
;v3.8.43.1
[Main]
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
@@ -10,6 +10,24 @@ UseCommandLine=0
;This file can be placed in text\<language>\ for sfall to get the translations depending on the game language
;TranslationsINI=sfall\Translations.ini
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[ExtraPatches]
;This section allows you to set multiple paths to folders containing mods or patches
;Paths to folders and Fallout .dat files are supported
;The PatchFileXX options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;Starting from 4.4/3.8.40, the game will load custom .dat files and folders from <GameRoot>\mods\mods_order.txt
;The files and folders in mods_order.txt will have a higher priority than the PatchFileXX options
;The complete order of how the engine loads game data is:
;master_patches > critter_patches > mods_order.txt > PatchFileXX > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;PatchFile0=mods\RP_data
;PatchFile1=
;Some details about mods_order.txt:
;If mods_order.txt does not exist, sfall will create one in <GameRoot>\mods\
;To install a new mod, copy the file/folder to <GameRoot>\mods\ and add its name to mods_order.txt
;Mods will be loaded line by line from top to bottom. You can change the load order in a text editor
;To disable a mod temporarily, you can comment it out by adding a ';' or '#' to the beginning of the line
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Speed]
;Set to 1 to enable options related to the game speed adjustment (SpeedMulti#, SpeedKey#, SpeedModKey, and SpeedToggleKey)
@@ -35,9 +53,11 @@ SpeedMultiInitial=100
;Set to 0 for 8 bit fullscreen
;Set to 4 for DX9 fullscreen
;Set to 5 for DX9 windowed
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be set to the same aspect ratio as your desktop resolution)
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be in the same aspect ratio as your desktop resolution)
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
;Modes 1, 2 and 3 are no longer supported
;If using the hi-res patch by Mash, this option will always be read from the main ddraw.ini file
;Note: When using an external DirectDraw wrapper (ddraw.dll file in <GameRoot>\wrapper\), DX9 mode will not be available
Mode=0
;If using a DX9 mode, this changes the resolution
@@ -47,7 +67,7 @@ GraphicsWidth=0
GraphicsHeight=0
;Window position data. Do not modify
;Set to -1 or 0 to reset if the window position is incorrect
;Set to -1 or 0 to reset the window position to the center or top-left corner
WindowData=-1
;Uncomment the option to use a hardware shader (requires DX9 graphics mode)
@@ -67,7 +87,7 @@ TextureFilter=1
GPUBlt=0
;Set to 1 to allow using 32-bit textures for talking heads
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (w/o extension)
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (without extension)
;The files in the folder should be numbered according to the number of frames in the talking head FRM file (0.png, 1.png, etc.)
;See the text file in the modders pack for a detailed description
;Requires DX9 graphics mode and v2.0 pixel shader support (see GPUBlt option)
@@ -100,17 +120,14 @@ WorldMapTerrainInfo=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Sound]
;Sets the number of allowed simultaneous sound effects
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
NumSoundBuffers=0
;Set to 1 to enable fade effects for background music when stopping and starting the playback
FadeBackgroundMusic=1
;Set to 0 to leave the default unchanged (i.e. 8). The maximum is 32
NumSoundBuffers=8
;Set to 1 to allow attaching sound files to combat float messages
AllowSoundForFloats=0
;Set to 1 to automatically search for alternative formats (mp3/wma/wav) when Fallout tries to play an ACM
;Set to 2 to play alternative music files even if original ACM files are not present in the music folder
;Alternative music files will play even if original ACM files are not present in the music folder
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
AllowDShowSound=0
@@ -123,6 +140,15 @@ OverrideMusicDir=1
;This will slightly increase the startup time of the game on older computers
AutoSearchSFX=1
;Uncomment these lines to override the names of sound files used by the engine
;Filenames are limited to 8 characters (without extension)
;MainMenuMusic=07desert
;WorldMapMusic=23world
;WorldMapCarMusic=20car
;EndGameMovieMusic0=akiss
;EndGameMovieMusic1=10labone
;MapLoadingSound=wind2
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Input]
;Set to 1 to enable the mouse scroll wheel to scroll through the inventory, barter, and loot screens
@@ -134,7 +160,7 @@ UseScrollWheel=1
;Set to 0 to only ever scroll 1 click
ScrollMod=0
;Adjusts mouse sensitivity to some percentage of normal.
;Adjusts mouse sensitivity to some percentage of normal
;Negative values are valid if you want your mouse axis reversed for some reason
MouseSensitivity=100
@@ -185,10 +211,10 @@ WindowScrollKey=0
ToggleItemHighlightsKey=42
;Set to 1 to also highlight containers
HighlightContainers=1
HighlightContainers=0
;Set to 1 to also highlight lootable corpses
HighlightCorpses=1
HighlightCorpses=0
;Set the color of outlines, available colors:
;1 - glowing red
@@ -198,7 +224,7 @@ HighlightCorpses=1
;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 3.8.27)
;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
;A key to press to reload your currently equipped weapon or use the active item
@@ -271,9 +297,9 @@ UseFileSystemOverride=0
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
;PatchFile=patch%03d.dat
;Set to 1 to use the modified data load order for the engine to find game data
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Set to 1 to change the order of how the engine loads game data
;Old: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;New: master_patches > critter_patches > [ExtraPatches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only
DataLoadOrderPatch=1
@@ -281,21 +307,20 @@ DataLoadOrderPatch=1
;Set to 2 to also load subtitle files from text\<language>\cuts_female\ for female PC
FemaleDialogMsgs=0
;Set to 1 to allow using the special '^' character in dialog msg files to specify the alternative text
;that will be displayed in the dialogue based on the player's gender
;Set to 1 to allow using the caret character '^' in dialog msg files to specify alternative text in dialogue based on the player's gender
;The text must be enclosed in angle brackets (example: <MaleText^FemaleText>)
DialogGenderWords=0
;To change the default and starting player models, uncomment the next four lines.
;The default models can also be changed ingame via script
;To change the default and starting player models, uncomment the next four lines
;The default models can also be changed in-game via script
;MaleStartModel=hmwarr
;MaleDefaultModel=hmjmps
;FemaleStartModel=hfprim
;FemaleDefaultModel=hfjmps
;To change the various ingame movies, modify the next 17 lines
;To change the various in-game movies, modify the next 17 lines
;You can also define additional movies by adding Movie18 - Movie32 lines
;Most of these can also be changed ingame via script
;Most of these can also be changed in-game via script
Movie1=iplogo.mve
Movie2=intro.mve
Movie3=elder.mve
@@ -321,8 +346,8 @@ Movie17=credits.mve
;StartDay=-1
;To change the limit of the distance away from the player to which you're allowed to scroll the local maps, uncomment the next two lines
;Defaults are 480 in the x direction and 400 in the y direction.
;Not compatible with the hi-res patch!
;Defaults are 480 in the x direction and 400 in the y direction
;Does not work with the hi-res patch by Mash!
;LocalMapXLimit=480
;LocalMapYLimit=400
@@ -332,20 +357,20 @@ PipBoyAvailableAtGameStart=0
;Set to 1 to double the number of available kill types
;If you use this, you need to provide the extra descriptions in proto.msg (entries from 1450 to 1487 are names and 1488 to 1525 are descriptions)
;Changing this option mid game will not invalidate old save games, but the player's kill counters will be completely screwed.
;Changing this option mid game will not invalidate old save games, but the player's kill counters will be completely screwed
;Setting this to 1 may cause problems if the player kills more than 32767 of any one critter type
;Additional kill types must have their new critical tables set! (See the OverrideCriticalTable option)
ExtraKillTypes=0
;Choose the damage formula used to calculate combat damage.
;Choose the damage formula used to calculate combat damage
;Don't set this to anything other than 0 unless another mod you're using explicitly tells you to!
;0 - Fallout default
;1 - Glovz's Damage Fix
;2 - Glovz's Damage Fix with Damage Multiplier tweak
;5 - Haenlomal's Yet Another Ammo Mod.
;5 - Haenlomal's Yet Another Ammo Mod
DamageFormula=0
;Prevents you from using 0 to escape from dialogue at any time.
;Prevents you from using 0 to escape from dialogue at any time
DialogueFix=1
;Prevents you from using number keys to enter unvisited areas on a town map
@@ -354,7 +379,7 @@ TownMapHotkeysFix=1
;Set to 1 to disable the Horrigan encounter
DisableHorrigan=0
;Set to 1 to disable the random element in NPC levelling.
;Set to 1 to disable the random element in NPC levelling
;This will cause all NPC party members to automatically level up as soon as the player reaches the requirements
NPCAutoLevel=0
@@ -376,13 +401,14 @@ OverrideArtCacheSize=0
;Set to 2 to block all saving in combat
SaveInCombatFix=1
;Uncomment and set a comma delimited list of numbers to use a custom xp table.
;Uncomment and set a comma-delimited list of numbers to use a custom xp table
;Player's level is capped once the highest specified level is reached
;XPTable=50,100,200
;Set to 1 to enable additional weapon animation codes from 'o' to 't'
;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10
;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corresponds to 's' and 15 to 't'
;This option is always enabled in 4.4.1/3.8.41 or later. The information is left for reference only
AdditionalWeaponAnims=1
;Uncomment these lines to modify the default modifiers for aimed shots at specific bodyparts
@@ -422,7 +448,7 @@ CorpseDeleteTime=6
;Set a number of milliseconds to idle each input loop
;Set to -1 to disable
;Set to 0 to idle only if other processes are waiting for processor time (WinXP/2000: if processes have equal priority)
;Set to 1 (or some higher number if needed) to prevent 100% CPU use. The maximum is 30
;Set to 1 (or some higher number if needed) to prevent 100% CPU use. The maximum is 50
ProcessorIdle=-1
;Set to 1 if using the hero appearance mod
@@ -434,8 +460,8 @@ EnableHeroAppearanceMod=0
;Set to 2 to also skip the splash screen
SkipOpeningMovies=0
;Causes NPCs who complete their combat turn with AP left over will try and find other ways to spend it.
;Only NPCs with AP left equal to or greater than the value given here will be considered.
;Causes NPCs who complete their combat turn with AP left over will try and find other ways to spend it
;Only NPCs with AP left equal to or greater than the value given here will be considered
;Set to 0 to disable
NPCsTryToSpendExtraAP=0
@@ -445,7 +471,8 @@ NPCsTryToSpendExtraAP=0
AllowLargeTiles=0
;Set to 1 to boost the maximum number of tile FRMs from 4096 to 16383
MoreTiles=0
;This option is always enabled in 4.3.7/3.8.37 or later. The information is left for reference only
MoreTiles=1
;Change the Skilldex cursor FRM numbers
;Default is 293 for all skills
@@ -473,7 +500,7 @@ UseScrollingQuestsList=1
;PremadeFIDs=201,203,202
;Use this line to modify the list of cities and their associated global variables used for city reputations
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
;Syntax is 'city id:global id', with each city/global pair separated by a comma
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
;Set this to a valid path to save a copy of the console contents
@@ -493,7 +520,6 @@ AutoQuickSavePage=1
;Set to 1 to speed up the HP/AC counter animations
;Set to 2 to update the HP/AC counters instantly
;Set to 3 to update the AC counter instantly when switching to other controlled critters in combat
SpeedInterfaceCounterAnims=0
;These lines allow you to control the karma FRMs displayed on the character screen
@@ -505,30 +531,33 @@ SpeedInterfaceCounterAnims=0
ScienceOnCritters=0
;Modify this value to change the player's speed of rotation on the inventory and character screens
;Default is 166
;Default is 166 (lower - faster; valid range: 0..1000)
SpeedInventoryPCRotation=166
;Modify the number of the extra interface boxes available to modders. (Default is 5, and the maximum is 95)
;Modify the number of the extra interface boxes available to modders (Default is 5, and the maximum is 95)
BoxBarCount=5
;Uncomment to set the text colour of the extra interface boxes
;The line must contain the same number of digits as the value of BoxBarCount, each either a 0 for green or 1 for red
;BoxBarColours=00000
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly.
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly
BonusHtHDamageFix=1
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
DisplayBonusDamage=0
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
AnimationsAtOnceLimit=120
;Modify the maximum number of animations allowed to run on a map (Default is 32, and the maximum is 127)
AnimationsAtOnceLimit=64
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
;Set to 1 to remove the limits that stop the game from rolling critical successes/failures in the first few days of game time
RemoveCriticalTimelimits=0
;Change the colour of the font used on the main menu for the Fallout/sfall version number and copyright text
;Change the colour of the font used on the main menu for the Fallout/sfall version string and copyright text
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
;1 - change the colour for the version string only
;2 - underline text for the version string
;4 - use monospace font for the version string
;MainMenuFontColour=0x00003C
;Change the colour of the font used on the main menu for the button text
;MainMenuBigFontColour=0x3C
@@ -555,7 +584,7 @@ CritterInvSizeLimitMode=0
CritterInvSizeLimit=200
;Some bit flags to alter behaviour of the motion sensor
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
;1 - Allow sensor use on automap when the motion sensor is in the pack rather than hands
;2 - Motion sensor doesn't require charges
;4 - Motion sensor is required to use the item highlight feature
MotionScannerFlags=1
@@ -575,22 +604,19 @@ DisablePipboyAlarm=0
;MainMenuCreditsOffsetX=0
;MainMenuCreditsOffsetY=0
;Prevents you from using super stims on a critter who is at full health.
;Prevents you from using super stims on a critter who is at full health
SuperStimExploitFix=0
;Change the AP cost for accessing inventory in combat, and the related effect of Quick Pockets perk
InventoryApCost=4
QuickPocketsApCostReduction=2
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
ComputeSprayMod=0
;These options modify the bullet distribution of burst attacks if ComputeSprayMod is 1
;All the bullets are divided into three groups: central, left and right
;These three groups will then travel along three parallel tracks, trying to hit targets on the way
;CenterMult/Div set the ratio of how many bullets go to the central group, and remaining bullets are divided equally to left and right sides
;TargetMult/Div set the ratio of how many bullets in the central group will attack the primary target directly
;Multipliers are capped at divisor values
;These options modify the bullet distribution of burst attacks
;All the bullets are divided into three groups: center, left, and right
;These groups will then travel along three parallel tracks, trying to hit targets on the way
;CenterMult/Div set the ratio of how many bullets go to the center group, and the remaining are divided equally to the left and right sides
;TargetMult/Div set the ratio of how many bullets in the center group will attack the primary target directly
;Multiplier values are capped at divisor values
ComputeSpray_CenterMult=1
ComputeSpray_CenterDiv=3
ComputeSpray_TargetMult=1
@@ -611,10 +637,10 @@ ExplosionsEmitLight=0
;MovieTimer_artimer3=270
;MovieTimer_artimer4=360
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Set to 1 to add proper checks for ammo before attacking
;By default, a weapon can perform an attack with at least one ammo, regardless of ammo cost calculation
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
CheckWeaponAmmoCost=0
CheckWeaponAmmoCost=1
;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
CombatPanelAnimDelay=1000
@@ -623,16 +649,9 @@ DialogPanelAnimDelay=33
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
PipboyTimeAnimDelay=50
;Allows you to directly control other critters in combat
;Set to 0 to disable
;Set to 1 to control all critters in combat
;Set to 2 to control all party members
ControlCombat=0
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set a comma delimited list of PIDs
;ControlCombatPIDList=62,89,97,107,160,161
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
StackEmptyWeapons=0
;Set to 1 to let you use the command cursor to specify targets for party members to attack in combat
;The 'Attack Who' preference in the combat control panel of party members must be set to 'Whomever you want'
PartyOrderToAttack=0
;Changes the way weapon reloading works when you drag ammo onto a weapon in the inventory
;Set to -1 to disable (vanilla behavior with the 'Move Items' window)
@@ -667,7 +686,7 @@ CanSellUsedGeiger=1
;Set to 1 to skip weapon equip/unequip animations when performing various actions
InstantWeaponEquip=0
;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension
;To add additional game msg files, uncomment the next line and set a comma-delimited list of filenames without .msg extension
;By default, the files will have consecutive numbers assigned beginning with 0
;You can use the syntax 'filename:number' to manually assign numbers to specific msg files, with each pair separated by a comma
;If a file after the specified pair does not have a number assigned, it will have the next consecutive number from the last pair
@@ -687,9 +706,6 @@ DeathScreenFontPatch=0
;Set to 1 to display full item description for weapon/ammo in the barter screen
FullItemDescInBarter=0
;Set to 1 to display experience points with the bonus from Swift Learner perk when gained from non-scripted situations
DisplaySwiftLearnerExp=1
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
PartyMemberExtraInfo=0
@@ -701,9 +717,6 @@ SkipLoadingGameSettings=0
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Critical modding options - the following options should be changed with caution
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -743,20 +756,23 @@ CreateObjectSidFix=0
;Note that enabling this option will cause problems for existing grave scripts
GraveContainersFix=0
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
;Note: To perform the unsigned integer division, use the new 'div' operator
DivisionOperatorFix=1
;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
;Note that enabling this option can affect the weapon of choice for some NPCs
AIBestWeaponFix=1
;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
;Note: chem_primary_desire without fixes prevents the specified item from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0
;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player
;This will cause the party member to perform First Aid/Doctor skills when you use them on the player, but only if
;the player is standing next to the party member
;Note that because the related engine function is not fully implemented, enabling this option without a global script
;that overrides First Aid/Doctor functions has very limited usefulness
PartyMemberSkillFix=0
;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
;Set to -1 to disable the special death message when the global variable is set
SpecialDeathGVAR=491
@@ -803,10 +819,17 @@ DisableSpecialAreas=0
;To change some engine parameters for the game mechanics, uncomment the next line
;TweaksFile=sfall\Tweaks.ini
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Scripts]
;Uncomment the option to specify an additional directory for ini files used by scripts
;The game will search for ini files first relative to this directory and then relative to the root directory if not found
;The path length is limited to 61 characters
;IniConfigFolder=mods\iniConfigs
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Debugging]
;Extra sfall configuration settings that can be used by modders
;This section is not effected by the 'UseCommandLine' option. It will always be read from the main ini
;This section is not affected by the 'UseCommandLine' option. It will always be read from the main ddraw.ini file
;Set to 1 to enable sfall debugging mode
Enable=0
@@ -826,7 +849,7 @@ AllowUnsafeScripting=0
SkipCompatModeCheck=0
;Fallout 2 Debug Patch
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and debug.log
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both
;Does not require sfall debugging mode
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg
;-------
@@ -864,7 +887,7 @@ AlwaysFindScripts=0
Test_ForceFloats=0
;These options control what output is saved in the debug log (sfall-log.txt)
;Prints messages duing sfall initialization
;Prints messages during sfall initialization
Init=1
;Prints messages relating to hook scripts
Hook=0
@@ -874,3 +897,19 @@ Script=0
Criticals=1
;Prints messages relating to engine fixes
Fixes=1
;Duplicates logs to a dedicated console window alongside the game window
;This option uses bit flags to control the types of messages to be shown
;All types other than sfall log (bit 1) require DebugMode to be enabled
;1 (bit 0) - debug output from the engine
;2 (bit 1) - sfall log
;4 (bit 2) - messages from debug_msg script function
;8 (bit 3) - messages from display_msg script function
ConsoleWindow=0b0000
;Console window position and size data. Do not modify
;Clear the data to reset the window position and size
ConsoleWindowData=
;Set the code page for the console window (Default is your system code page)
ConsoleCodePage=0
+201
View File
@@ -0,0 +1,201 @@
;Example Ammo INI for vanilla damage formula
; PID_EXPLOSIVE_ROCKET
[1]
pid=14
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=1
; PID_10MM_JHP
[2]
pid=29
ac_adjust=0
dr_adjust=25
dam_mult=2
dam_div=1
; PID_10MM_AP
[3]
pid=30
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=2
; PID_44_MAGNUM_JHP
[4]
pid=31
ac_adjust=0
dr_adjust=20
dam_mult=2
dam_div=1
; PID_FLAMETHROWER_FUEL
[5]
pid=32
ac_adjust=-20
dr_adjust=25
dam_mult=1
dam_div=1
; PID_14MM_AP
[6]
pid=33
ac_adjust=0
dr_adjust=-50
dam_mult=1
dam_div=2
; PID_223_FMJ
[7]
pid=34
ac_adjust=-20
dr_adjust=-20
dam_mult=1
dam_div=1
; PID_5MM_JHP
[8]
pid=35
ac_adjust=0
dr_adjust=35
dam_mult=2
dam_div=1
; PID_5MM_AP
[9]
pid=36
ac_adjust=0
dr_adjust=-35
dam_mult=1
dam_div=2
; PID_ROCKET_AP
[10]
pid=37
ac_adjust=-15
dr_adjust=-50
dam_mult=1
dam_div=1
; PID_SMALL_ENERGY_CELL
[11]
pid=38
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_MICRO_FUSION_CELL
[12]
pid=39
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_SHOTGUN_SHELLS
[13]
pid=95
ac_adjust=-10
dr_adjust=0
dam_mult=1
dam_div=1
; PID_44_FMJ_MAGNUM
[14]
pid=111
ac_adjust=0
dr_adjust=-20
dam_mult=1
dam_div=1
; PID_9MM_BALL
[15]
pid=121
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_BBS
[16]
pid=163
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_ROBO_ROCKET_AMMO
[17]
pid=274
ac_adjust=0
dr_adjust=-25
dam_mult=1
dam_div=1
; PID_45_CALIBER_AMMO
[18]
pid=357
ac_adjust=0
dr_adjust=0
dam_mult=1
dam_div=1
; PID_2MM_EC_AMMO
[19]
pid=358
ac_adjust=-30
dr_adjust=-20
dam_mult=3
dam_div=2
; PID_4_7MM_CASELESS
[20]
pid=359
ac_adjust=-5
dr_adjust=-10
dam_mult=3
dam_div=2
; PID_9MM_AMMO
[21]
pid=360
ac_adjust=0
dr_adjust=10
dam_mult=1
dam_div=2
; PID_HN_NEEDLER_CARTRIDGE
[22]
pid=361
ac_adjust=-10
dr_adjust=0
dam_mult=1
dam_div=1
; PID_HN_AP_NEEDLER_CARTRIDGE
[23]
pid=362
ac_adjust=-10
dr_adjust=0
dam_mult=2
dam_div=1
; PID_7_62MM_AMMO
[24]
pid=363
ac_adjust=-5
dr_adjust=-10
dam_mult=1
dam_div=1
; PID_FLAMETHROWER_FUEL_MK_II
[25]
pid=382
ac_adjust=-20
dr_adjust=0
dam_mult=1
dam_div=1
Binary file not shown.
+12 -12
View File
@@ -1,14 +1,14 @@
/*
Ammo INI Loader mod for Fallout 2 by NovaRain
---------------------------------------------
Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
--------------------------------------------------
- modifies ammo protos with data from an INI file:
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
* AmmoYAAM.ini if DamageFormula=5 in ddraw.ini
* AmmoMod.ini if not using any bulit-in damage formula
Requires sfall 3.5 or higher
Requires sfall 4.0/3.8.29 or higher
*/
@@ -23,7 +23,7 @@ variable ammoData;
variable enabled;
procedure start begin
variable i := 1, ammo, ammoPid, dmgMod;
variable i := 1, ammo, ammoSection, dmgMod;
if game_loaded then begin
enabled := get_ini_setting("ddraw.ini|Misc|DamageFormula");
if (enabled == 1 or enabled == 2) then
@@ -37,19 +37,19 @@ procedure start begin
if (enabled <= 0) then return;
ammoData := create_array_map;
ammoPid := enabled; // pid from the first section
while (ammoPid > 0) do begin
ammoSection := get_ini_section(ammoIni, "" + i);
while (ammoSection.pid > 0) do begin
ammo := create_array_map; // create permanent arrays
ammo.ac_adjust := get_ini_setting(ammoIni + "|" + i + "|ac_adjust");
ammo.dr_adjust := get_ini_setting(ammoIni + "|" + i + "|dr_adjust");
ammo.ac_adjust := atoi(ammoSection.ac_adjust);
ammo.dr_adjust := atoi(ammoSection.dr_adjust);
// dam_mult and dam_div must be positive integers
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_mult");
dmgMod := atoi(ammoSection.dam_mult);
ammo.dam_mult := dmgMod if (dmgMod > 0) else 1;
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_div");
dmgMod := atoi(ammoSection.dam_div);
ammo.dam_div := dmgMod if (dmgMod > 0) else 1;
ammoData[ammoPid] := ammo;
ammoData[atoi(ammoSection.pid)] := ammo;
i++;
ammoPid := get_ini_setting(ammoIni + "|" + i + "|pid");
ammoSection := get_ini_section(ammoIni, "" + i);
end
call map_enter_p_proc;
debug_msg("Ammo INI Loader mod: " + ammoIni + " - set " + (i - 1) + " ammo protos.");
+3 -3
View File
@@ -1,5 +1,5 @@
Ammo INI Loader mod for Fallout 2 by NovaRain
---------------------------------------------
Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
--------------------------------------------------
- modifies ammo protos with data from an INI file:
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
@@ -7,6 +7,6 @@ Ammo INI Loader mod for Fallout 2 by NovaRain
* AmmoMod.ini if not using any bulit-in damage formula
Requires sfall 3.5 or higher.
Requires sfall 4.0/3.8.29 or higher.
To use, copy gl_ammomod.int to your scripts folder, and copy the INI files to the same directory as sfall.
@@ -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;
@@ -0,0 +1,44 @@
/*
Example implementation of the algorithm of how the game engine sets the explosive timer.
*/
#include "..\..\scripting_docs\headers\sfall.h"
#include "..\..\scripting_docs\headers\define_lite.h"
// from CONDTION.H
#define ROLL_CRITICAL_FAILURE (0)
#define ROLL_FAILURE (1)
#define ROLL_SUCCESS (2)
#define ROLL_CRITICAL_SUCCESS (3)
procedure start;
procedure start begin
if game_loaded then begin
register_hook(HOOK_EXPLOSIVETIMER);
end else begin
variable
time := get_sfall_arg,
result := ROLL_CRITICAL_FAILURE;
if has_trait(TRAIT_PERK, dude_obj, PERK_demolition_expert_perk) then
result := ROLL_SUCCESS;
else begin
result := roll_vs_skill(dude_obj, SKILL_TRAPS, 0);
end
if (result) then begin
if (result == ROLL_FAILURE) then
time /= 2;
else begin // success or critical success
result := ROLL_SUCCESS;
end
end else begin // critical failure
time := 0;
result := ROLL_FAILURE;
end
set_sfall_return(time);
set_sfall_return(result); // failure/success
end
end
@@ -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.2
**/
@@ -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,70 @@ variable highlightKey;
variable isHighlight;
variable alsoContainer;
variable alsoCorpse;
variable alsoCritter;
variable checkLOS;
variable outlineColor;
variable motionScanner;
variable highlightFailMsg1;
variable highlightFailMsg2;
procedure ToggleHighlightObject(variable obj, variable enable) begin
if obj and (not enable or not checkLOS or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) then begin
if (alsoContainer and obj_item_subtype(obj) == item_type_container) or (not NO_HIGHLIGHT(obj)) then begin
if (enable) then set_outline(obj, outlineColor);
else set_outline(obj, 0);
procedure DudeCanSee(variable obj) begin
variable block := obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT);
return not block or block == obj;
end
procedure DudeCanHear(variable obj) begin
variable hearDist := dude_perception * 5;
if (get_flags(obj) bwand FLAG_TRANSGLASS) then
hearDist /= 2;
return tile_distance_objs(dude_obj, obj) <= hearDist;
end
procedure GetOutlineColor(variable obj, variable isCritter) begin
if isCritter then begin
if get_team(obj) == get_team(dude_obj) then return OUTLINE_GREEN_GLOW;
if not DudeCanSee(obj) then begin
if (DudeCanHear(obj)) then return OUTLINE_DARK_YELLOW;
return 0;
end
return OUTLINE_RED_GLOW;
end
if checkLOS and not DudeCanSee(obj) then
return 0;
return outlineColor;
end
procedure ToggleHighlightObject(variable obj, variable enable, variable isCritter) begin
if (not alsoContainer or obj_item_subtype(obj) != item_type_container) and NO_HIGHLIGHT(obj) then return;
set_outline(obj, GetOutlineColor(obj, isCritter) if enable else 0);
end
procedure ToggleHighlight(variable enable) begin
variable obj;
variable obj, isCorpse;
foreach obj in list_as_array(LIST_GROUNDITEMS) begin
if obj != outlined_object then begin
call ToggleHighlightObject(obj, enable);
if obj and obj != outlined_object then begin
call ToggleHighlightObject(obj, enable, false);
end
end
if (alsoCorpse) then begin
if (alsoCorpse or alsoCritter) then begin
foreach obj in list_as_array(LIST_CRITTERS) begin
if critter_state(obj) == CRITTER_IS_DEAD and not NO_STEAL(obj) then begin
call ToggleHighlightObject(obj, enable);
if obj and obj != dude_obj then begin
isCorpse := critter_state(obj) == CRITTER_IS_DEAD;
if (alsoCritter and not isCorpse) or (isCorpse and not NO_STEAL(obj)) then begin
call ToggleHighlightObject(obj, enable, not isCorpse);
end
end
end
end
tile_refresh_display;
if (checkLOS or alsoCritter) and enable != isHighlight then begin
set_global_script_repeat(REPEAT_FRAMES if enable else 0);
end
isHighlight := enable;
end
procedure KeyPressHandler begin
@@ -71,7 +108,7 @@ procedure KeyPressHandler begin
if scanCode == highlightKey and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
if pressed then begin
isHighlight := true;
set_global_script_repeat(REPEAT_FRAMES);
if motionScanner then begin
scanner := obj_carrying_pid_obj(dude_obj, PID_MOTION_SENSOR);
if scanner then begin
@@ -94,16 +131,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 loot/barter screens - for 3.8.29+
procedure GameModeChangeHandler begin
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
isHighlight := false;
call ToggleHighlight(false);
end
end
@@ -114,12 +156,15 @@ 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;
@@ -129,7 +174,13 @@ procedure start begin
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 (INTFACELOOT bwor BARTER)) 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.
@@ -4,15 +4,18 @@
Key=42
; Set to 1 to also highlight containers
Containers=1
Containers=0
; Set to 1 to also highlight lootable corpses
Corpses=1
Corpses=0
; Set to 1 to also highlight critters, with the same rules as in combat
Critters=0
; Set to 1 to only highlight objects in the player's line-of-sight
CheckLOS=0
CheckLOS=1
; Set the color of outlines, available colors:
; Set the color of outlines for items, corpses, and containers; available colors:
; 1 - glowing red
; 2 - red
; 4 - grey
@@ -20,11 +23,45 @@ 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
; 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

Some files were not shown because too many files have changed in this diff Show More