Compare commits

...
233 Commits
Author SHA1 Message Date
NovaRain 228f8966f2 Release 4.4 2023-08-22 08:54:41 +08:00
NovaRain e923fa801b Updated changelog and other documents 2023-08-21 14:23:59 +08:00
NovaRain 16dacee0e0 Fixed UpdateHPStat() for not properly capping HP
* when a critter has modified base value of max HP in its proto.
2023-08-09 10:29:22 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b4fe9b3e57 Bump commonmarker from 0.23.9 to 0.23.10 in /docs (#490)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 08:24:32 +08:00
phobos2077 553c7cc195 Renamed string_pos back to string_find to make meaning more obvious 2023-08-07 20:01:21 +02:00
NovaRain 61f3a2ac13 Fixed the backward compatibility of get_npc_level
(broken in commit 438bc6f)
2023-08-04 09:13:55 +08:00
NovaRain aca6c92d86 Reordered the engine perk entries in perks.ini
(sorted by their perk IDs)
2023-07-31 20:52:43 +08:00
phobos2077 5d7015bbb5 Headers update
- Synced a small number of defines from RPU headers
- Removed duplicate defines from define_lite
2023-07-30 22:24:44 +02:00
phobos2077 f0ec82923d EnginePerks: fixes
- Remove duplicate Salesman tweak
- Decoupled hacks for multi-perk-level support for Salesman and Demolition Expert from the bonus value change
- Renamed settings for consistency ("<PerkName>Bonus" when it has only one effect)
2023-07-30 22:00:04 +02:00
phobos2077 cd5c803386 EnginePerks: rewritten and expanded
- Got rid of unused and repeated code
- Added all perk skill bonuses
2023-07-30 19:58:34 +02:00
NovaRain c95d872f77 Added build instructions to readme 2023-07-26 15:08:41 +08:00
phobos2077 5c3c1ca4db Header fixes
- Fix conflict with RPU command_extra.h
- Fix undefined debug_array_str error
2023-07-24 00:56:01 +02:00
NovaRain cb1a3dd764 Reverted the ASM change for StealCheckHook in commit 53c294c 2023-07-23 07:42:16 +08:00
phobos2077 4c441d5852 Fix incorrect int->float conversion in op_sub (closes #488) 2023-07-22 21:22:27 +02:00
NovaRain 53c294cf98 Edited ASM code and documents for HOOK_STEAL 2023-07-22 20:46:26 +08:00
phobos2077 5394352bf0 HOOK_STEAL: add ret0 value 2 to fail "silently" 2023-07-22 13:43:23 +02:00
phobos2077 f267224428 HOOK_STEAL: return value improvements
- Allow to use vanilla handler but only override experience in case of success
- Treat both return values less than -1 the same as -1
2023-07-22 10:43:18 +02:00
phobos2077 b189fe9252 HOOK_STEAL: ret1 to override experience for successful stealing 2023-07-22 04:21:05 +02:00
phobos2077 b2c9b1cc23 HOOK_STEAL: add arg4 - quantity of items stolen 2023-07-22 03:29:31 +02:00
NovaRain 0e8b6efe49 Re-added the check for valid objs to get/set_object_data
* disabled in combat for the combat data.
2023-07-19 20:56:12 +08:00
NovaRain 6d66bfffb0 Edited function and sslc docs 2023-07-17 20:53:50 +08:00
NovaRain 6eeb674641 Minor code edits to BugFixes.cpp
Minor edits to some comments.
2023-07-14 09:46:02 +08:00
NovaRain b94993d756 Minor edits to error msg for some script functions
Edits to function notes.
2023-07-11 11:19:29 +08:00
phobos2077 a2ea1910f5 Minor header and readme edits 2023-07-10 23:56:58 +02:00
NovaRain ddb3cf9b6e Added upper/lower limits to the hit chance value
Edited hookscript docs.
2023-07-09 15:22:56 +08:00
NovaRain 321f8e1ab2 Changed string_pos to return -1 on arg error
Added a check to PartyControl::OrderAttackPatch().
Updated function documents.
2023-07-05 22:14:04 +08:00
phobos2077 66559812bd Updated headers
- Add a bunch of array-related procs to unlock basic functional programming
- Fix error with FUNC_SELECTOR_7
2023-07-05 02:31:47 +02:00
phobos2077 f968dea5e7 string_pos: use negative pos value how it works in substr 2023-07-05 01:47:47 +02:00
phobos2077 664fb84dc5 string_find renamed to string_pos + header update
- Renamed get_clamped to math_clamp for consistency (libs should use namespace prefixes)
- Nuked above/below macros and renamed unsigned_comp to insigned_int_compare, because it doesn't work with floats
- Replaced sprintf2 and string_pos with macros (due to new metarules)
- Add a few entries to functions.yml
2023-07-04 21:06:35 +02:00
phobos2077 74ef65335d Add string_find metarule
- lib.inven.h: Updated remove_items_pid to return actually removed quantity
2023-07-04 20:19:38 +02:00
NovaRain 9f6ca9d55d Updated some documents 2023-07-03 15:39:56 +08:00
NovaRain f42b232e19 Moved sfall-mod.ini into mods\ folder
Packed item highlighting and NPC combat control mods into sfall.dat.
2023-07-02 20:40:35 +08:00
NovaRain 0926ace899 Use explicit GetFileAttributesA function 2023-07-02 08:28:15 +08:00
NovaRain b2023b7e51 Removed capping of console window position and size
* for multi-monitor setup, leaving only minimum size of 640x480.
2023-06-29 21:32:32 +08:00
NovaRain 1f962458cd 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.
Edits to ddraw.ini and function docs.
2023-06-27 21:19:36 +08:00
phobos2077 0bb5941c98 IniReader: Remove bufSize argument when it's not used (closes #485)
- Fix return value of getString with buffer argument
- Increase max line length to 2048
2023-06-27 00:14:00 +02:00
phobos2077 3e4e9ff4e6 Console window improvements
- Retain maximized/minimized state
- Save normal position when closing in maximized/minized 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-26 23:31:06 +02:00
NovaRain ece95a95e9 Updated docs for improved string_format
Edited error messages for a few functions.
ConsoleWindow: disallowed negative window position.
2023-06-25 16:16:23 +08:00
phobos2077 5f38744a2e De-shittify string_format (closes #482) 2023-06-25 00:24:24 +02:00
phobos2077 c0aac45b0c ConsoleWindow: attempt to fix position jumping 2023-06-24 13:12:38 +02:00
NovaRain d7a974c50b Fixed the display after switching back in NPC combat control mod
* player's active "sneak" notification box wasn't shown when switching
back after the combat.

Replaced numbers with defines in item highlighting mod.
2023-06-24 14:17:38 +08:00
phobos2077andNovaRain 3f8d322697 Fix container highlight condition 2023-06-24 07:59:16 +08:00
phobos2077andNovaRain 50b51fc1a3 Highlighting mod update
- Optional highlighting of critters, using the same colors and rules as in the combat mode
- Holding highlight key will update outlines based on current positions
- Enable LOS check by default for more interesting looting
2023-06-24 07:59:16 +08:00
phobos2077 e1aebb21e4 op_create_spatial: fix spatial object having no scriptIndex upon creation 2023-06-24 01:58:17 +02:00
phobos2077 a5075734cc ConsoleWindow: prevent user from messing up window position & size 2023-06-24 01:57:27 +02:00
phobos2077 4adb6dffe2 get_ini_config - reset array cache to prevent wrong arrays being returned! 2023-06-21 23:32:33 +02:00
NovaRain 3b29088818 Edited the log messages in LoadOrder.cpp
Cleaned up some module headers.

Updated version number in documents.

Updated changelog in sslc document, and removed the mention about
empty statements (it never worked).
2023-06-21 22:21:12 +08:00
phobos2077 3a3760704c Load order: more informative logging 2023-06-20 20:44:57 +02:00
NovaRain b619ea3fba Updated function docs for get_ini_config 2023-06-19 12:15:17 +08:00
NovaRain ae7921fe26 Some format/textual edits to code
* line indents.
* remove trailing spaces.
* use nullptr instead of NULL for pointers.

Edited the error messages of get_ini_config.
2023-06-19 12:14:31 +08:00
NovaRainandGitHub 14f6de0329 Merge pull request #481 from sfall-team/feature/fo-ini-reader
INI Config reader:
- Replaced GetPrivateProfile* functions for reading ini with vanilla-based INI reader.
- Changed IniReader classes to read INI files once using new Config class and cache results until GameReset (going to main menu).
- Added metarule to read entire INI file in one operation and return as two-dimensional map array.
- Increased limits for INI strings to 1021.
2023-06-19 11:22:27 +08:00
phobos2077 e33a025c62 get_ini_config: sanitize and validate INI path 2023-06-18 15:01:25 +02:00
phobos2077 20088ffcb1 Save window positions in OnBeforeGameClose
- This way we can guarantee sfall has not started to "destruct" yet, so we don't have to rely on the order of destructor calls
2023-06-18 00:41:45 +02:00
phobos2077 cec091bda2 IniReader: Remove ini file from cache when it's changed by SetString
- Had to reorganize some code to make this work. Changed how some singletons are created to guarantee destructor calls in correct order (IniReader is constructed first and destructed last, after every other module).
2023-06-17 23:33:37 +02:00
NovaRain 97c2b111ff Updated the description of ConsoleWindow
Simplified ASM code in Premade.cpp a bit.
2023-06-17 21:40:11 +08:00
VladandGitHub 1e4bbaedbd Merge branch 'develop' into feature/fo-ini-reader 2023-06-16 18:13:12 +02:00
NovaRainandGitHub fce35c7e14 Merge pull request #480 from sfall-team/feature/debug-log-overflow-fix
Fixed buffer overflow when DebugMode is enabled and printing messages longer than 259 via script.
2023-06-16 23:37:59 +08:00
phobos2077 4d19fa2d60 Use single function for all string-to-integer conversions for consistent behavior
- Reading INI from within sfall as well as get_ini_setting opcode
- calling atoi opcode
- Support auto-detecting 0x, 0 and 0b for hex, octal and binary representations respectively
2023-06-16 16:06:24 +02:00
phobos2077 0a6a604abc Add support for using 0b prefix in INI files to denote binary base (consistent with GetPrivateProfile*) 2023-06-16 15:10:25 +02:00
phobos2077 2cef5310e2 Rewrite console writing
- Separate debug_msg and display_msg as separate Source
- Merge writing to one function with proper filtering
2023-06-16 14:57:41 +02:00
phobos2077 fe7aa9ae04 Removed unused code 2023-06-16 02:16:25 +02:00
phobos2077 b36771da48 Increase maximum size of one INI line to 1023 and fix potential crash in IniReader::getString()
- Now can read strings up to 1021 from INI files using all available functions (get_ini_string, get_ini_section, get_ini_config)
2023-06-16 00:53:03 +02:00
phobos2077 ad6491d61e Increase array string limit to 1024 bytes
- Because it is now safe to log longer stuff
2023-06-16 00:16:36 +02:00
phobos2077 4de5de6a0c Restore code page option from NovaRain 2023-06-16 00:02:55 +02:00
phobos2077 347b4a3ecb Fix buffer overflow when DebugMode is enabled and printing messages longer than 259 via script
- Refactoring: moved ConsoleWindow into separate file
2023-06-15 23:57:41 +02:00
phobos2077 0b161c7374 Rename metarule for consistency with other ini-related functions, add to functions.yml 2023-06-15 21:48:06 +02:00
phobos2077 7bbc15ab0b Made Config queries case-insensitive for both section names and keys to match GetPrivateProfile* behavior 2023-06-15 21:01:24 +02:00
phobos2077 ac02971d61 get_ini_section(s): switched to using Config class
- Load configs via IniReader to take advantage of it's cache
2023-06-15 19:28:52 +02:00
phobos2077 e4ea3645d6 Add config_load metarule to efficiently load INI into array and also load INI from DAT
- Refactoring: moved all ini-related handlers into new cpp
- Moved modified_ini opcode to C++
2023-06-15 19:01:07 +02:00
NovaRain f9dc7a3e25 Added code page setting for the console window 2023-06-15 23:27:07 +08:00
phobos2077 3f7ce8c412 Custom Config parser based on Vanilla & Fallout CE 2023-06-15 15:30:46 +02:00
phobos2077 6d3afd4e7d Attempt to fix config reader memory allocation issues (unsuccessful) 2023-06-15 15:30:46 +02:00
phobos2077 2fcf81cb78 Read all ini's using built-in FO config parser 2023-06-15 15:30:46 +02:00
phobos2077 b8c52304eb Add precise time measurements for: Sfall Init, Game Init, New Game start and Save game load. 2023-06-15 15:30:24 +02:00
NovaRain 23d1e3b9c8 Updated the description in [ExtraPatches] for mods_order.txt
Tweaked the error log entry for mods_order.txt.
Removed unnecessary Inject_SwitchHandHook (unused since 4.2.1)
2023-06-15 13:38:04 +08:00
NovaRain 7baa6de014 Reduced buffer flush in Logging.cpp
Edited some description in ddraw.ini.
2023-06-15 13:24:02 +08:00
NovaRainandGitHub 7bf562338c Merge pull request #477 from sfall-team/feature/console-window-v2
Console Window output (closes #474)
2023-06-15 13:14:46 +08:00
phobos2077 5f38a934ca Console improvements
- Save & restore window position
- Fix display_msg not mirrored to console
- Fix log prefixes showing up mid line
2023-06-14 21:34:57 +02:00
phobos2077 3c40518e87 Make sfall logs a little prettier 2023-06-14 20:01:13 +02:00
NovaRain 7939924257 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.
2023-06-14 09:26:28 +08:00
phobos2077 dc665cb741 Debugging.ConsoleWindow option 2023-06-13 23:09:21 +02:00
phobos2077 d7127a4deb Fix crash in debug mode due to __stdcall not being explicitly specified for C++ function (closes #476) 2023-06-13 19:45:11 +02:00
NovaRain 46a80fdb6a Added get_tile_fid and macros to function notes
Some misc edits to documents.
2023-06-13 12:32:49 +08:00
NovaRain 492e31410c Fixed the mode 2 of get_tile_fid
Minor code/comment/format edits.
2023-06-13 10:15:02 +08:00
phobos2077 f5e7235a80 get_tile_fid: take FRM Limit patch into account by extending FRM mask from 12 to 14 bits 2023-06-13 01:10:23 +02:00
phobos2077 0fef6f1f8c mods_order: remove comments before other checks, to prevent valid paths being ignored 2023-06-12 19:55:33 +02:00
phobos2077 4b9008d53c get_tile_fid correct for backwards compatibility and flexibility
- Allow to pass elevation using the free bits of the tileNum value to access elevations 1 and 2 (instead of defaulting to dude_elevation, which is not how it worked before)
- Access roof FID and raw data using mode flags in the top 4 bits
2023-06-12 18:26:28 +02:00
phobos2077 0d960ca326 Fix get_tile_fid function to work on elevations 1 and 2
- Since it has no second argument, assume dude elevation
- Rewrite into new opcode system
2023-06-12 16:44:07 +02:00
VladandGitHub c95d074f44 Merge pull request #470 from sfall-team/feature/load_order
load_order.txt per #469
2023-06-12 14:47:27 +02:00
VladandGitHub 4b88bfad10 Merge pull request #473 from sfall-team/hook_return_string_v2
Allow passing string directly to set_sfall_return in HOOK_DESCRIPTIONOBJ (v2)
2023-06-12 14:46:59 +02:00
phobos2077 94388d3470 LoadOrder update
- Rename to "mods_order.txt"
- Create "mods" folder if it doesn't exist before creating an empty mods_order.txt
- Trim space and tab characters
- Allow comments after file names with ; or # (INI-style)
2023-06-12 11:59:10 +02:00
phobos2077 208cacc4dd load_order.txt per #469 2023-06-12 11:59:10 +02:00
phobos2077 f222348b25 Update docs, remove deprecated macro 2023-06-12 11:55:06 +02:00
phobos2077 49cf0e6726 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-12 11:52:12 +02:00
phobos2077 d107edbb23 invenWieldFunc fix for putting non-armor, non-weapon items into hand slot 2023-06-11 20:12:11 +02:00
phobos2077 e9f8984819 Script Headers: fix remove_items_pid function and fix naming
- It didn't take different stacks of items into account as well as cases where one item is in the backback and other in the slot and you need to remove both
2023-06-11 14:07:44 +02:00
NovaRain ab0c373a9b Minor edits to code and documents
Commented out unused combat related functions.
2023-06-09 11:20:47 +08:00
phobos2077 1c34f85789 Add get_combat_free_move for better mod compatibility 2023-06-08 21:36:09 +02:00
NovaRain b317ed71ce Added options to override the names of sound files for game modes
Remove the worldmap/credits music override from Fallout1Behavior.
(was added in commit 00b85be)

Minor edits to ddraw.ini.
2023-06-05 11:37:58 +08:00
NovaRain 9197966993 Some grammar correction in function document 2023-06-05 10:54:36 +08:00
phobos2077 21fe99a297 Docs: Clarification about get_ini_* function return values
- Also updated lib.strings.h
2023-06-04 20:32:43 +02:00
phobos2077 ac1abf71f8 Corrected hook documentation 2023-06-04 12:02:11 +02:00
phobos2077 bfc9fd4d88 Add set_combat_free_move metarule and 2 arguments to STDPROCEDURE to make it more useful 2023-06-04 11:59:13 +02:00
phobos2077 f755e0a1dc Header update 2023-06-04 11:59:13 +02:00
NovaRain 3d88304777 Added a new example mod gl_rest_encounter
Added a burst control example script.
2023-06-02 15:14:25 +08:00
NovaRain 4e37fb0228 Fixed crash when using NumbersInDialogue
(revert commit a4d6687)

Added more accurate description for div function in DamageMod.cpp.
2023-06-01 15:56:43 +08:00
NovaRain 0de7614c53 Minor edits to ddraw.ini and define_extra.h 2023-05-29 15:21:21 +08:00
phobos2077 d5268f3fbc Small update to headers 2023-05-25 02:37:51 +02:00
NovaRain 19db722948 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:56:39 +08:00
NovaRain c2dde7485a Added back postbuild.cmd for github action 2023-05-19 10:35:59 +08:00
NovaRain c73f311b22 Randomized one extra bullet for side groups in burst attacks
* idea from phobos2077.

Added minimum value check to multipliers.
2023-05-19 09:45:15 +08:00
NovaRain 000816acb5 Merge branch 'scriptable-burst' into develop 2023-05-19 08:27:46 +08:00
NovaRain 37e7af2a17 Added documentation for set_spray_settings 2023-05-18 22:52:00 +08:00
NovaRain befea69909 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:01:49 +08:00
phobos2077 a3cfc481a5 Remove postbuild.cmd from git 2023-05-16 18:50:13 +02:00
NovaRain c9034f917b Added "set_spray_settings" function for scriptable burst (#36)
* Current implementation works similar to metarule2_explosions.
documentation will come later.
2023-05-17 00:14:44 +08:00
NovaRain 5b9e90100d Changed AttackSubType enum "GUNS" to "RANGED"
* to be in line with define_extra.h, the naming is from RE/CE.

Minor textual edits to code.
2023-05-15 12:06:53 +08:00
phobos2077 427a978bb4 Implemented YAAM damage formula in script 2023-05-14 23:31:40 +02:00
phobos2077 e6e941e14c Updated gl_compute_damage example script to work as 1:1 reflection of vanilla damage formula
- In hope that this will make it easier for someone to write his own damage formula
2023-05-14 22:50:33 +02:00
phobos2077 493003af54 Updated some defines
- ATKMODE defines removed to avoid confusion - these are really two 4-bit fields, not bit flags!
2023-05-14 01:44:15 +02:00
phobos2077 1683678657 Revert adding RMOBJ to avoid duplication from devine_extra.h 2023-05-08 10:38:35 +02:00
phobos2077 a05207cc83 Add some missing script defines 2023-05-08 02:53:31 +02:00
NovaRain 00b85bec49 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:18:51 +08:00
NovaRain 571955fbcb 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:45:57 +08:00
NovaRain f4e3049a0f Code edits to PartyControl.cpp
* use roll_random function from the engine instead of making a new one.

Updated version number.
2023-04-19 10:41:20 +08:00
NovaRain 184af43928 Attempt for reproducible builds
* ducible.exe is built with v140_xp toolset and /arch:SSE.
2023-04-17 10:06:46 +08:00
NovaRain 32e9642f90 Replaced deprecated set-output command in action
Removed Debug Directory "coffgrp" from PE header of release builds.
2023-04-14 14:04:41 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
59310dec6d Bump nokogiri from 1.13.10 to 1.14.3 in /docs (#462)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.10 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.10...v1.14.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 14:29:01 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55c5c815f8 Bump commonmarker from 0.23.7 to 0.23.9 in /docs (#461)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.7 to 0.23.9.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.7...v0.23.9)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 14:28:50 +08:00
NovaRain a4d6687aab Minor code edits to MiscPatches.cpp 2023-04-12 10:02:26 +08:00
NovaRain 99de222605 Release 4.3.8 2023-03-31 22:10:41 +08:00
NovaRain 29ad2bf3b8 Recompressed sfall resource files 2023-03-31 21:54:55 +08:00
NovaRain 4fc282fa61 Minor edit to the changelog 2023-03-29 14:31:50 +08:00
NovaRain 5b4e165368 Fixed assorted typos in documents
Added an example ini to Ammo INI Loader mod.
Updated the changelog.
2023-03-27 20:30:36 +08:00
NovaRainandGitHub 43a261bd27 Bump activesupport to 6.1.7.3 in /docs 2023-03-20 10:04:46 +08:00
NovaRain b69e4e0eeb Fixed being able to call multiple exit msg boxes with Alt+F4 2023-03-16 10:44:58 +08:00
NovaRain 254473cf1c Added support for closing the game by Alt+F4 (#457) 2023-03-15 12:09:52 +08:00
NovaRain c4efe78661 Updated readme and added changelog (#451) 2023-03-13 14:22:35 +08:00
NovaRain 656b122f3e Removed deprecated "register" keyword
Minor edits to documents.
2023-03-10 21:01:21 +08:00
NovaRain 30802e8e21 Changed the copyright text format in the credits 2023-03-06 22:41:37 +08:00
NovaRain 56150d572a Renamed some object flags 2023-03-05 10:18:59 +08:00
NovaRain a75886a020 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:13:48 +08:00
NovaRain 64dc30d922 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:29:17 +08:00
NovaRain a6a2285ffe 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:05:25 +08:00
NovaRain 381032a246 Removed redundant "Done" strings from sfall log
* only when there are alternative states or for graphics/sound/scripting
2023-02-10 08:42:02 +08:00
NovaRain b6ee7bebf2 Tweaked how disabled unsafe opcodes work
* now disabled opcodes will just do nothing instead of causing the
script terminated.
2023-02-09 15:04:41 +08:00
NovaRain dd73cbea9c Removed StackEmptyWeapons from ddraw.ini (always enabled) 2023-02-02 12:38:33 +08:00
NovaRain d3960cbebb Bump activesupport to 6.1.7.1 in /docs (again) 2023-01-25 18:25:55 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a93eee9849 Bump commonmarker from 0.23.6 to 0.23.7 in /docs (#454)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.6 to 0.23.7.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.6...v0.23.7)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 18:23:49 +08:00
NovaRain e954b34676 Try to bump activesupport to 6.1.7.1 in /docs 2023-01-22 09:13:55 +08:00
NovaRain 5c5df4ef64 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:31:35 +08:00
NovaRain ad137896c9 Increased the upper limit of ProcessorIdle 2023-01-07 23:06:07 +08:00
NovaRain 9bdd633fcd Cosmetic edits: updated/unified the copyright header years 2022-12-31 10:13:41 +08:00
NovaRain 48e2a63cdf Edits to sfall_ver_* script functions
* they take no arguments and only return constants, simpler structure
in ASM is enough.
2022-12-26 08:43:40 +08:00
NovaRain 33e6cb0cb8 Fixed broken read_string script function
* actually it has never worked.
2022-12-22 09:34:52 +08:00
NovaRain 52e796815a Fixed a crash bug in FullItemDescInBarter
* when weapon/ammo has no description, it'd trigger UB from strncpy_s.
2022-12-17 10:35:39 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6c7bbb5a58 Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#449)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.9...v1.13.10)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 12:17:40 +08:00
NovaRain 05f2fb4001 Minor edits to Functions_def.h 2022-12-03 13:18:06 +08:00
NovaRain 024a13c6a8 Minor edits to code and documents 2022-12-01 08:40:39 +08:00
NovaRain 9ecd598544 Fixed args for HOOK_RESTTIMER 2022-11-26 09:58:13 +08:00
NovaRain 8521c1772b Minor edits to a few ASM hacks
(Changed 2-bytes null jcc to just 2 nop)
2022-11-16 12:19:04 +08:00
NovaRain f7d94e16c9 Tweaked HOOK_INVENTORYMOVE for dropping caps
* before the amount was set in the dropped object only after the hook.

Edits to hook script documents.
2022-10-29 11:32:25 +08:00
NovaRain 3b8d2a4527 Edited the format for window title
Reorganized RMOBJ_* defines in define_extra.h.
2022-10-27 17:20:41 +08:00
NovaRain db7419a2f7 Some format edits to documents
Updated version number.
2022-10-25 21:23:21 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e93ca6fcab Bump nokogiri from 1.13.6 to 1.13.9 in /docs (#447)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.6 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.6...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-21 11:12:22 +08:00
NovaRain 6181140954 Minor edit to hook script document 2022-10-18 09:07:31 +08:00
NovaRain 007fa7314b Minor edit to hookscripts.md 2022-10-18 08:58:51 +08:00
NovaRain 87f5a5f081 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:15 +08:00
NovaRain 5d5da0a471 Code correction to LoadOrder.cpp
Updated version number.
2022-09-28 10:17:11 +08:00
NovaRain bd15cf2b9e Fixed the order of autoloaded dat files on FAT file system 2022-09-27 16:14:38 +08:00
NovaRain ea2a4bfdfa Edited [ExtraPatches] description in ddraw.ini 2022-09-22 10:49:16 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8ad4f86e1d Bump commonmarker from 0.23.4 to 0.23.6 in /docs (#444)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.4 to 0.23.6.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.4...v0.23.6)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 10:46:18 +08:00
NovaRain c4b55734d1 Release 4.3.7 2022-08-27 21:15:14 +08:00
NovaRain ec5874a3c4 Fixed HOOK_REMOVEINVENOBJ to match RMOBJ_* defines
Edits to define_extra.h for RMOBJ_* defines
2022-08-14 11:04:17 +08:00
NovaRain 8b3a2bcead Expanded set_pipboy_available function for mode 2 2022-08-11 21:24:47 +08:00
NovaRain 13cf81e151 Code edits to SpeedInventoryPCRotation
Updated version number.
2022-08-09 21:32:59 +08:00
NovaRain efdd6afa34 Fixed the lighting of critters in gl_partycontrol 2022-08-09 08:43:39 +08:00
NovaRain c878d17a2b Added support for editor.msg to message_str_game
Edits to header files.
2022-08-09 08:12:54 +08:00
NovaRain 050af07b3b Corrected the language path for loading art files 2022-08-08 22:08:24 +08:00
NovaRain 1e5fd7fd13 Combined AllowDShowSound=2 with mode 1
Removed MoreTiles from ddraw.ini (always enabled)
Minor edits to documents.
2022-08-08 09:08:05 +08:00
NovaRain c1475ba453 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:41:07 +08:00
NovaRain 85862d1599 Corrected comments in Functions.cpp 2022-07-27 22:11:42 +08:00
NovaRain be2af4a3a2 Changed the default number of sound buffers
Updated version number.
2022-07-26 08:23:47 +08:00
NovaRain d0fa304035 Minor edits to sslc document 2022-07-22 22:22:48 +08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e49922d438 Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#442)
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.9 to 1.2.10.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v1.2.9...v1.2.10)

---
updated-dependencies:
- dependency-name: tzinfo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 19:50:32 +08:00
burner1024andGitHub f29720effa 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:17:58 +08:00
NovaRain 543198cc89 Release 4.3.6 2022-07-08 21:00:59 +08:00
NovaRain c869080d91 Correction to previous commit 2022-07-07 08:28:03 +08:00
NovaRain f5f1f5ec70 Fixed NPC stuck in a loop of reloading the solar scorcher
(happens when out of ammo and it's dark.)
2022-07-06 20:05:17 +08:00
NovaRain 0b3be17839 Edits to document about set_self function
Updated version number.
2022-07-02 20:03:21 +08:00
NovaRainandGitHub 08f19e63e1 Merge pull request #439 from sfall-team/dependabot/github_actions/develop/actions/setup-python-4
Bump actions/setup-python from 3 to 4
2022-07-01 09:21:23 +08:00
dependabot[bot]andGitHub abbdc36eb8 Bump actions/setup-python from 3 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 01:09:07 +00:00
NovaRain 8c71953eed Fixed float_msg script function
* didn't set purple/black text color correctly (was always grey)
2022-06-30 21:51:34 +08:00
NovaRain dee28843ae Changed the mode 1 of NPC combat control mod
* now requires sfall debugging mode to control all critters.
2022-06-24 09:36:45 +08:00
NovaRain cd91355896 Added a warning pop-up for the open file limit 2022-06-17 22:47:27 +08:00
NovaRain 85e5da660b Added "get_terrain_name" script function
Updated documents for the function.
Minor edits to other code.
2022-06-14 21:04:51 +08:00
NovaRain 7015db2414 Changed HiResMode to not always be read from ddraw.ini
Minor edits to Perks.ini (120 CPL)
2022-06-10 09:04:17 +08:00
NovaRain a415fc2e7f Added ladder climbing action to UseWalkDistance
Added notes to MainMenuFontColour description in ddraw.ini.
Updated version number.
2022-06-07 10:24:52 +08:00
NovaRain 0516aabcc1 Added GainReputation to NPC combat control mod 2022-06-06 12:54:02 +08:00
NovaRain 1d8004623a Minor code edits
* read FastShotFix setting only once.
2022-06-02 14:22:05 +08:00
NovaRain 5d1c63ab08 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:51:42 +08:00
NovaRainandGitHub 8527e17fa1 Merge pull request #438 from sfall-team/dependabot/github_actions/develop/actions/setup-python-3
Bump actions/setup-python from 2 to 3
2022-05-30 21:04:42 +08:00
NovaRainandGitHub 3782d548d8 Merge pull request #437 from sfall-team/dependabot/github_actions/develop/actions/upload-artifact-3
Bump actions/upload-artifact from 2 to 3
2022-05-30 21:04:06 +08:00
dependabot[bot]andGitHub f3e6c244be Bump actions/setup-python from 2 to 3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 12:59:24 +00:00
dependabot[bot]andGitHub c449c72556 Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 12:59:21 +00:00
NovaRain 6b97ad4bcf Release 4.3.5 2022-05-30 20:56:17 +08:00
NovaRain a4230c3bad Added a function to EngineUtils.cpp
Minor edits to ddraw.ini.
2022-05-28 21:40:34 +08:00
NovaRain 9667b522a8 Tweaked how the graphics mode setting is read
Added a couple of notes to ddraw.ini.
Minor code edits.
2022-05-27 13:18:09 +08:00
NovaRain 73ec85b01d Code edits to gl_npcarmor script 2022-05-26 22:55:08 +08:00
NovaRain e8652ca17b Some edits to documents 2022-05-25 21:52:24 +08:00
NovaRain 8bad934279 Removed ComputeSprayMod from ddraw.ini
Updated version number.
2022-05-25 21:17:06 +08:00
NovaRain fddb71e88a Added support for SPLASH_SCRN_TIME option to sfall HRP 2022-05-24 22:49:40 +08:00
NovaRain a51bd676e0 Fixed being able to push knocked down team members in combat 2022-05-23 12:00:20 +08:00
NovaRain 02b25c325f Simplified the fix in commit 4e3d8a6 2022-05-22 14:45:21 +08:00
NovaRain 05cd041e79 Code edits to Stats::UpdateHPStat() 2022-05-20 15:36:15 +08:00
NovaRainandGitHub c8cd9ef4db Merge pull request #436 from phobos2077/dependabot/bundler/docs/nokogiri-1.13.6
Bump nokogiri from 1.13.4 to 1.13.6 in /docs
2022-05-19 11:41:26 +08:00
dependabot[bot]andGitHub f40e9be2a1 Bump nokogiri from 1.13.4 to 1.13.6 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.4 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.4...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 03:39:32 +00:00
NovaRain 7ab89200d7 Tweaked interface bar redraw in gl_partycontrol 2022-05-12 21:58:03 +08:00
NovaRain 7057e044d0 Changed Stats::UpdateHPStat() to update the current HP as well
Updated German translation file.
2022-05-11 21:55:50 +08:00
NovaRainandGitHub 51035958a3 Merge pull request #435 from wipe2238/dependabot
Add dependabot configuration for GitHub Actions
2022-05-10 21:40:23 +08:00
Wipe 2cbc026b72 Dependabot will make PRs against develop branch 2022-05-10 12:01:54 +02:00
Wipe 4ad77cebc1 Added dependabot configuration for GitHub Actions 2022-05-10 11:29:25 +02:00
NovaRain 64f6647fb0 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:40:47 +08:00
NovaRain b24df4caad Removed DivisionOperatorFix from ddraw.ini (always enabled) 2022-04-29 08:09:24 +08:00
NovaRain 9a6022d923 Moved FO1 worldmap sfx code to Interface.cpp
Removed extra button release sfx for markers on the world map.
(to match the exact FO1 behavior)
2022-04-21 19:53:15 +08:00
MarkusandGitHub f985af96db Fallout 1 worldmap sfx implementation (#434)
Implemented FO1 worldmap sfx (#373)
Added obj_drop call definition.
2022-04-21 19:49:48 +08:00
NovaRain e9581cd92b Corrected placeholders for obsolete opcodes
Minor edit to documents.
2022-04-20 09:51:40 +08:00
NovaRain 144d57243c [HRP] Disabled scaling of main menu buttons/text for Chinese version
* to prevent garbled text from Image::ScaleText()
2022-04-18 14:22:08 +08:00
NovaRainandGitHub 3a9121fb8e Merge pull request #432 from phobos2077/dependabot/bundler/docs/nokogiri-1.13.4
Bump nokogiri from 1.13.3 to 1.13.4 in /docs
2022-04-12 19:51:28 +08:00
dependabot[bot]andGitHub 758162b3e0 Bump nokogiri from 1.13.3 to 1.13.4 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.4/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.3...v1.13.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 10:02:30 +00:00
NovaRain e5f7d29a03 [HRP] Fixed movie subtitles not showing up when setting MOVIE_SIZE=1
* happens with certain combinations of screen and movie aspect ratios.

Minor edit to Credits.cpp.
Updated version number.
2022-04-11 09:56:35 +08:00
NovaRain d3255277d7 Copy GitHub pages fixes 2022-04-07 21:24:49 +08:00
NovaRain 824780db88 Fix to GitHub pages 2022-04-07 21:16:16 +08:00
348 changed files with 6858 additions and 3031 deletions
+12
View File
@@ -0,0 +1,12 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
target-branch: "develop"
labels:
- "dependencies"
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sfall-build
path: sfall-build
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
+1
View File
@@ -26,6 +26,7 @@
*.exe
*.out
*.app
!ducible.exe
# NetBeans
nbproject/private/
+969
View File
File diff suppressed because it is too large Load Diff
+46 -5
View File
@@ -13,11 +13,52 @@ A set of engine modifications for the classic game Fallout 2 in the form of a DL
- 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 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.
---
#### Fallout Engine IDA Database
**[Download](https://www.dropbox.com/s/tm0nyx0lnk4yui0/Fallout_1_and_2_IDA68.rar "Download from Dropbox")** (comments are in Russian)
## Installation
- Download `sfall_*.7z` from the [release archive](https://sourceforge.net/projects/sfall/files/).
- Extract `ddraw.dll`, `ddraw.ini`, `sfall.dat`, and the `mods` folder to Fallout's base directory (i.e. the one that contains `fallout2.exe`). Also, remove `gl_highlighting.int` and `gl_partycontrol.int` from Fallout's `data\scripts\` directory if you are updating from an older version.
- __Important Note:__\
If you are using a mod that already included sfall (e.g. killap's [Unofficial Patch](https://github.com/BGforgeNet/Fallout2_Unofficial_Patch) or [Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project)), then that mod has probably included a custom modified `ddraw.ini`. In that case, overwriting it with sfall's vanilla `ddraw.ini` will be likely break your game. Instead, only overwrite `ddraw.dll`, and keep the mod's existing copy of `ddraw.ini`. (Or, if you know what you're doing, you can merge them together by hand.)
- 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, and delete `sfall-mods.ini` from the `mods` folder.
## Usage
This mod is configured via the `ddraw.ini` and `sfall-mods.ini` files, which can be opened with any text editor. Details of every configerable option are included in those files. 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 Studio 2015 with **Windows XP support for C++** component. If you're using Visual Studio 2017/2019/2022, make sure to install **VS 2015 C++ build tools (v140)**.
* [DirectX SDK (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=6812). You will also need `ddraw.lib` from DXSDK February 2010 and `dinput.lib` from DXSDK August 2007. Both files can be found in the [DirectX SDK Collection repo](https://github.com/NovaRain/DXSDK_Collection).
* [DirectX Runtime (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=8109). You can also install it from DirectX SDK installer.
### Steps:
1. Set up a `postbuild.cmd` using the template from the repo.
2. Open the solution file and build with the **ReleaseXP** configuration (this is the one used for sfall releases).
3. If everything is set up correctly, you should have a new sfall `ddraw.dll` in your Fallout 2 directory.
## Additional info
* [Changelog](CHANGELOG.md)
* [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)
+7 -7
View File
@@ -82,7 +82,7 @@ runs:
#
echo "::endgroup::"
fi
echo "::set-output name=dir::$(cygpath --windows "$DXSDK_DIR/DXSDK_Jun2010/")"
echo "dir=$(cygpath --windows "$DXSDK_DIR/DXSDK_Jun2010/")" >> $GITHUB_OUTPUT
shell: bash
# MSBuild is not in PATH on Windows machines
@@ -93,7 +93,7 @@ runs:
echo "::group::Prepare MSBuild"
MSBUILD_EXE="$("/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild/**/Bin/MSBuild.exe)"
echo "::set-output name=exe::$MSBUILD_EXE"
echo "exe=$MSBUILD_EXE" >> $GITHUB_OUTPUT
echo "::endgroup::"
shell: bash
@@ -106,10 +106,10 @@ runs:
echo ::group::Build ReleaseXP
#
echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=ReleaseXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
#
echo "::set-output name=ddraw-dll::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")"
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")" >> $GITHUB_OUTPUT
echo "::endgroup::"
fi
@@ -126,11 +126,11 @@ runs:
echo "::group::Build DevXP"
#
echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=DevXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
#
echo "::set-output name=ddraw-dll::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")"
echo "::set-output name=ddraw-pdb::$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.pdb")"
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")" >> $GITHUB_OUTPUT
echo "ddraw-pdb=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.pdb")" >> $GITHUB_OUTPUT
echo "::endgroup::"
fi
+74 -14
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,25 +119,30 @@ 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)
;You can add simple extra perks with ID numbers from 119 to 255
; that do not require using scripting functions to change player stats, and can also be used for Armor perks
;The extra perks do not require using scripting functions to change player stats, and can also be used for Armor perks
;These parameters are only for extra perks
;Stat1/Stat2: same as Stat
;Stat1Mag/Stat2Mag: same as StatMag
+2
View File
@@ -11,6 +11,8 @@ 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::
+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
+1 -1
View File
@@ -72,7 +72,7 @@ Power=16777349
[5]
PID=16777720
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Default=16777353
Default=16777346
Jacket=16777346
Leather=16777347
Metal=16777348
+13 -7
View File
@@ -9,10 +9,13 @@ Containers=0
; Set to 1 to also highlight lootable corpses
Corpses=0
; Set to 1 to only highlight objects in the player's line-of-sight
CheckLOS=0
; Set to 1 to also highlight critters, with the same rules as in combat
Critters=0
; Set the color of outlines, available colors:
; Set to 1 to only highlight objects in the player's line-of-sight
CheckLOS=1
; Set the color of outlines for items, corpses, and containers; available colors:
; 1 - glowing red
; 2 - red
; 4 - grey
@@ -20,7 +23,7 @@ CheckLOS=0
; 16 - bright yellow
; 32 - dark yellow
; 64 - purple
; You can set a custom color from the game palette by multiplying the color index value by 256 (available since sfall 4.2.7)
; You can set a custom color from the game palette by multiplying the color index value by 256 (in 4.2.7 or later)
OutlineColor=16
; Motion Scanner mode:
@@ -31,11 +34,11 @@ MotionScanner=0
[CombatControl]
;Allows you to directly control other critters in combat
;Allows you to control other critters directly in combat
;Set to 0 to disable
;Set to 1 to control all critters in combat
;Set to 1 to control all critters in combat (allowed only in sfall debugging mode)
;Set to 2 to control all party members
;Set to 3 to let you order party members to attack specified targets after your first attack instead of controlling them directly
;Set to 3 to let you use the command cursor to specify targets for party members to attack in combat
Mode=0
;If you want to control only specific critters, uncomment the PIDList line and set a comma delimited list of PIDs
;PIDList=62,89,97,107,160,161
@@ -43,6 +46,9 @@ Mode=0
;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
+81 -63
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.3.4
;v4.4
[Main]
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
@@ -16,18 +16,21 @@ UseCommandLine=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[ExtraPatches]
;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game
;If DataLoadOrderPatch is enabled, the data load order is:
;master_patches > critter_patches > [extra patches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;This section allows you to set multiple paths to folders containing mods or patches
;Paths to folders and Fallout .dat files are supported
;The PatchFile## options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;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=
;Path to the folder in which the game will automatically search and load custom files (by *.dat mask, including folders)
;The data load order of the files in the folder will be in reverse alphabetical order of the filenames
;The files placed in this folder will have higher priority than the PatchFile## options
;This option has no effect in 4.2.6 or later. The path is fixed to <GameRoot>\mods\
;AutoSearchPath=mods
;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]
@@ -57,6 +60,7 @@ SpeedMultiInitial=100
;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)
;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
Mode=0
;If using a DX9 mode, this changes the resolution
@@ -66,7 +70,7 @@ GraphicsWidth=0
GraphicsHeight=0
;Window position data. Do not modify
;Set to -1 or 0 to reset if the window position is incorrect
;Set to -1 or 0 to reset the window position to the center or top-left corner
WindowData=-1
;Uncomment the option to use a hardware shader (requires DX9 graphics mode)
@@ -86,7 +90,7 @@ TextureFilter=1
GPUBlt=0
;Set to 1 to allow using 32-bit textures for talking heads
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (w/o extension)
;The texture files should be placed in art\heads\<name of the talking head FRM file>\ (without extension)
;The files in the folder should be numbered according to the number of frames in the talking head FRM file (0.png, 1.png, etc.)
;See the text file in the modders pack for a detailed description
;Requires DX9 graphics mode and v2.0 pixel shader support (see GPUBlt option)
@@ -131,14 +135,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 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
@@ -151,6 +155,15 @@ OverrideMusicDir=1
;This will slightly increase the startup time of the game on older computers
AutoSearchSFX=1
;Uncomment these lines to override the names of sound files used by the engine
;Filenames are limited to 8 characters (without extension)
;MainMenuMusic=07desert
;WorldMapMusic=23world
;WorldMapCarMusic=20car
;EndGameMovieMusic0=akiss
;EndGameMovieMusic1=10labone
;MapLoadingSound=wind2
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Input]
;Set to 1 to enable the mouse scroll wheel to scroll through the inventory, barter, and loot screens
@@ -278,9 +291,9 @@ UseFileSystemOverride=0
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
;PatchFile=patch%03d.dat
;Set to 1 to use the modified data load order for the engine to find game data
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;Modified: master_patches > critter_patches > 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
@@ -288,21 +301,20 @@ DataLoadOrderPatch=1
;Set to 2 to also load subtitle files from text\<language>\cuts_female\ for female PC
FemaleDialogMsgs=0
;Set to 1 to allow using the special '^' character in dialog msg files to specify the alternative text
;that will be displayed in the dialogue based on the player's gender
;Set to 1 to allow using the caret character '^' in dialog msg files to specify alternative text in dialogue based on the player's gender
;The text must be enclosed in angle brackets (example: <MaleText^FemaleText>)
DialogGenderWords=0
;To change the default and starting player models, uncomment the next four lines.
;The default models can also be changed ingame via script
;The default models can also be changed in-game via script
;MaleStartModel=hmwarr
;MaleDefaultModel=hmjmps
;FemaleStartModel=hfprim
;FemaleDefaultModel=hfjmps
;To change the various ingame movies, modify the next 17 lines
;To change the various in-game movies, modify the next 17 lines
;You can also define additional movies by adding Movie18 - Movie32 lines
;Most of these can also be changed ingame via script
;Most of these can also be changed in-game via script
Movie1=iplogo.mve
Movie2=intro.mve
Movie3=elder.mve
@@ -349,7 +361,7 @@ ExtraKillTypes=0
;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.
@@ -429,7 +441,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
@@ -452,7 +464,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
@@ -512,10 +525,10 @@ 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
@@ -528,14 +541,17 @@ 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
@@ -588,15 +604,12 @@ SuperStimExploitFix=0
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
@@ -617,10 +630,10 @@ ExplosionsEmitLight=0
;MovieTimer_artimer3=270
;MovieTimer_artimer4=360
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Set to 1 to add proper checks for ammo before attacking
;By default, a weapon can perform an attack with at least one ammo, regardless of ammo cost calculation
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
CheckWeaponAmmoCost=0
CheckWeaponAmmoCost=1
;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
CombatPanelAnimDelay=1000
@@ -629,9 +642,6 @@ DialogPanelAnimDelay=33
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
PipboyTimeAnimDelay=50
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
StackEmptyWeapons=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)
;Set to 0 to use all the ammo boxes to reload
@@ -699,9 +709,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
@@ -741,22 +748,18 @@ 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 apply his/her skills when you use First Aid/Doctor skills on the player, but only if
;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
@@ -819,16 +822,15 @@ DisableSpecialAreas=0
;Paths outside of scripts folder are supported
GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
;Uncomment the option to specify an additional folder path for ini files used by scripts
;The game will search for the ini files relative to this directory
;If the file is not found, the search will proceed relative to the root directory of the game
;The maximum length of the specified path is 61 characters
;Uncomment the option to specify an additional directory for ini files used by scripts
;The game will search for ini files first relative to this directory and then relative to the root directory if not found
;The path length is limited to 61 characters
;IniConfigFolder=mods\iniConfigs
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[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
@@ -848,7 +850,7 @@ AllowUnsafeScripting=0
SkipCompatModeCheck=0
;Fallout 2 Debug Patch
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and debug.log
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both
;Does not require sfall debugging mode
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg
;-------
@@ -886,7 +888,7 @@ AlwaysFindScripts=0
Test_ForceFloats=0
;These options control what output is saved in the debug log (sfall-log.txt)
;Prints messages duing sfall initialization
;Prints messages during sfall initialization
Init=1
;Prints messages relating to hook scripts
Hook=0
@@ -896,3 +898,19 @@ Script=0
Criticals=1
;Prints messages relating to engine fixes
Fixes=1
;Duplicates logs to a dedicated console window alongside the game window
;This option uses bit flags to control the types of messages to be shown
;All types other than sfall log (bit 1) require DebugMode to be enabled
;1 (bit 0) - debug output from the engine
;2 (bit 1) - sfall log
;4 (bit 2) - messages from debug_msg script function
;8 (bit 3) - messages from display_msg script function
ConsoleWindow=0b0000
;Console window position and size data. Do not modify
;Clear the data to reset the window position and size
ConsoleWindowData=
;Set the code page for the console window (Default is your system code page)
ConsoleCodePage=0
+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
@@ -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,65 @@
/*
Resting Encounters mod for Fallout 2 by Lexx
--------------------------------------------
- Check where we are on the world map and overwrite the default desert "resting" map
- Compatible with vanilla Fallout 2 and UP/RP
Requires sfall 4.3.6/3.8.38 or higher
*/
#include "..\headers\define.h"
#include "..\headers\sfall\sfall.h"
#include "..\headers\sfall\lib.arrays.h"
procedure start;
procedure encounter_handler;
#define is_terrain_desert (get_current_terrain_name == mstr_worldmap(1000))
#define is_terrain_mountains (get_current_terrain_name == mstr_worldmap(1001))
#define is_terrain_city (get_current_terrain_name == mstr_worldmap(1002))
#define is_terrain_coast (get_current_terrain_name == mstr_worldmap(1003))
procedure start begin
if (game_loaded) then begin
register_hook_proc(HOOK_ENCOUNTER, encounter_handler);
end
end
procedure encounter_handler begin
variable
event := get_sfall_arg,
mapID := get_sfall_arg,
mapsList;
// If the player enters a map on the world map, we set it depending on the current terrain type
// event 0 is random encounter, 1 is player initiated "encounter"
if (event == 1 AndAlso mapID == MAP_RND_DESERT_1) then begin
if (is_terrain_desert) then begin
mapsList := [MAP_RND_DESERT_1];
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_DESERT);
end
else if (is_terrain_mountains) then begin
mapsList := [MAP_RND_MOUNTAIN1, MAP_RND_MOUNTAIN2];
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_MOUNTAIN);
end
else if (is_terrain_city) then begin
mapsList := [MAP_RND_CITY1, MAP_RND_CITY_2, MAP_RND_CITY_3, MAP_RND_CITY_4, MAP_RND_CITY_5, MAP_RND_CITY_6, MAP_RND_CITY_7, MAP_RND_CITY_8];
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_CITY);
end
else if (is_terrain_coast) then begin
mapsList := [MAP_RND_COAST1, MAP_RND_COAST2];
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_COAST);
end
else begin
mapsList := [MAP_RND_DESERT_1];
if (global_var(GVAR_CAR_PLACED_TILE) < 0) then set_car_current_town(AREA_RND_DESERT);
debug_msg("!!! COULDN'T DETECT TERRAIN TYPE !!!");
end
mapID := array_random_value(mapsList);
set_sfall_return(mapID);
end
end
@@ -0,0 +1,12 @@
Resting Encounters mod for Fallout 2 by Lexx
--------------------------------------------
- Check where we are on the world map and overwrite the default desert "resting" map
- Compatible with vanilla Fallout 2 and UP/RP
Requires sfall 4.3.6/3.8.38 or higher.
To use, copy gl_rest_encounter.int to your scripts folder.
This mod is an example of how you can use HOOK_ENCOUNTER hooks.
+2 -2
View File
@@ -352,7 +352,7 @@ special=60
;Each map has 2 variables
; r{index}=region # corrisponds to a region section above
; r{index}=region # corresponds to a region section above
; a{index]=type # set to 0 for no weather or 1 for normal weather
[Maps]
@@ -547,7 +547,7 @@ r70=16 ;cavern encounter 1
a70=0
r71=16 ;cavern encounter 2
a71=0
r72=16 ;cavern encoutner 3
r72=16 ;cavern encounter 3
a72=0
r73=16 ;cavern encounter 4
a73=0

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