Commit Graph
100 Commits
Author SHA1 Message Date
NovaRain 6b3f88da5e Reorganized/renamed the functions in IniReader
Renamed some variables.
2021-04-13 21:21:26 +08:00
NovaRain fb3070fdfb Fixed cur_town function on new game start (#366) 2021-04-13 12:17:58 +08:00
NovaRain 0b868593e0 Fixed AI behavior to prevent the unnecessary use of healing drugs 2021-04-13 10:15:18 +08:00
NovaRain 3a3591e759 Code edits to converge with 4.x 2021-04-11 21:41:01 +08:00
NovaRain dc6263f522 Added markdown version of arrays.txt & hookscripts.txt 2021-04-07 21:13:52 +08:00
NovaRain 78aadeebe5 Cosmetic edits: alignment of multi-line ternary 2021-04-07 21:07:20 +08:00
NovaRain 1f90894dc5 Code changes to the previous commit 2021-04-04 09:57:13 +08:00
NovaRain d34f0ac21f Added a few fixes for knockout/down issues 2021-04-03 12:38:10 +08:00
NovaRain 60ffde1f80 Cosmetic edits to the code:
* tabs for indentation, spaces for alignment.
* reduced the length of some separation comment lines.
* changed some variable names ('exist' is a verb).
2021-04-03 11:04:03 +08:00
NovaRain ba173c91e9 Added DL_FIX for logging 2021-04-02 01:26:25 +08:00
NovaRain e08615abf2 Improved some combat-related fixes 2021-04-01 13:43:45 +08:00
NovaRain 9b28447e17 Improved the implementation of tile_num_beyond function 2021-03-29 11:55:37 +08:00
NovaRain 8bc4e3f790 Corrected the code in the previous commit 2021-03-28 08:44:35 +08:00
NovaRain d0fe019165 Added a fixed implementation of the tile_num_beyond_ function
Removed the code of multihex critter self-hit fix from BugFixes.cpp
(now fixed properly with the aforementioned implementation)
2021-03-28 00:59:40 +08:00
NovaRain 9d2c10aae6 Removed DataLoadOrderPatch from ddraw.ini (always enabled) 2021-03-26 12:29:18 +08:00
NovaRain e90a805c95 Added a fix for multihex critter self-hit issue 2021-03-25 21:30:57 +08:00
NovaRain e441d405b5 Added "set_quest_failure_value" script function 2021-03-24 21:22:18 +08:00
NovaRain dc34655981 Code correction to the previous commit 2021-03-23 09:46:10 +08:00
NovaRain 575bd6a2d2 Added a fix to the sorting of the quest list (#361)
Added a cosmetic to the dialog review interface.

Fixed a crash introduced in commit 773ec47.
2021-03-22 14:29:03 +08:00
NovaRain 347dc8508f Code edits to the weapon switching fix in AI.cpp
Added more struct defines and corrected related code.
2021-03-19 13:16:35 +08:00
NovaRain 88c17744fe Fixed the error handling in create_object_sid
* also added a debug message about the missing pid.
2021-03-17 09:49:54 +08:00
NovaRain 19afef94cc Fixed a possible crash in commit dae48e9
* when the proto does not exist, leading to null object pointer.
2021-03-16 09:21:51 +08:00
NovaRain 4c47977c52 Added a tweak to prevent NPC aggression (#357)
* when non-hostile NPCs accidentally hit the player or members of the
player's team.
2021-03-15 10:59:15 +08:00
NovaRain dae48e9175 Fixed the script attached to an object not running upon object creation (#359) 2021-03-14 11:04:25 +08:00
NovaRain a4c0753eff Moved INI reading functions from main.cpp to IniReader.cpp
Moved SimplePatch templates to a standalone header.
2021-03-14 01:39:07 +08:00
NovaRain c9249492f9 Edited description of CheckWeaponAmmoCost and HOOK_AMMOCOST 2021-03-12 09:38:31 +08:00
NovaRain 3609045ea8 Fixed the check of the ammo cost for a shot in CheckWeaponAmmoCost (#360) 2021-03-11 14:39:38 +08:00
NovaRain 773ec47913 Fixed set_critter_burst_disable script function
* now applies only to weapons with burst attack as the secondary mode.

Minor edits to code comments.
2021-03-10 11:49:00 +08:00
NovaRain c789dbffb4 Added fixes for the AP cost for AI
* before the reload AP cost for AI was always 2, even if it's changed
by CALCAPCOST hook.
2021-03-05 15:16:35 +08:00
NovaRain b883bb30a3 Some code edits regarding BodyPart defines 2021-03-03 10:40:15 +08:00
NovaRain e7dff360ee Added a fix for AI weapon validation before attack
* the check was always based on the primary weapon hit mode instead of
the selected attack mode.
2021-03-02 12:15:44 +08:00
NovaRain 7456a6023c Removed the fix added in commit 6d7ef3c
reason: supposedly a minor issue affecting the initial movement of an
NPC, requires further verification before implementation due to
potential harm to the AI behavior.

Moved the input patch code in main.cpp to new Input.cpp/h.
2021-02-26 10:36:07 +08:00
NovaRain 14e8dba41c Fixed gl_auto_closebox for gravesites
Edits to hookscripts.txt, added weapon argument to HOOK_CALCAPCOST.
2021-02-24 15:35:22 +08:00
NovaRain 4b6253f9f0 Added more checks to weapon ammo script functions 2021-02-24 15:33:18 +08:00
NovaRain f2259830c0 Moved some script function handlers to new files
Reorganized some script functions.
2021-02-24 15:31:16 +08:00
NovaRain 3fb2594855 Code correction related to GetProto usage 2021-02-20 10:30:17 +08:00
NovaRain 0dad664a67 Moved all sfgame_ functions into new ReplacementFuncs.cpp/h 2021-02-19 23:33:51 +08:00
NovaRain e588c89832 Added a tweak to restore combat flags for NPC after fleeing
Added item_weapon_range game function.
Improved the range check in previous commit.
2021-02-19 12:45:36 +08:00
NovaRain 0b15ac7b77 Code edits to a couple of fixes in AI.cpp
Minor edits to HookScripts.cpp.
2021-02-16 11:31:09 +08:00
NovaRain 7ce7f4db27 Fixed broken GetProto() function (again) 2021-02-10 23:52:56 +08:00
NovaRain 6d7ef3c76b Fixed broken GetProto() function
Added a fix to prevent NPCs from wasting their AP to pick up
unreachable items.
2021-02-10 08:37:35 +08:00
NovaRain e5b04d81e3 Code edits in FalloutEngine.cpp
Added comments to some defines in Define.h.
2021-02-09 22:08:30 +08:00
NovaRain c9eb5c2dee Removed unnecessary code
Added some function/variable defines.
2021-02-09 10:41:55 +08:00
NovaRain a47644f269 Added some tweaks for debug log
Code edits in SpeedPatch.cpp
2021-02-08 12:45:16 +08:00
NovaRain 02e48dde63 Rewrote ASM code of WorldMapFPSPatch in C++ 2021-02-07 21:27:36 +08:00
NovaRain 60a187de30 Refactored HOOK_WITHINPERCEPTION code as 4.x
Renamed engine function reimplementations with "sfgame_" prefix.
Added AIpref defines and AIcap struct.
2021-02-07 20:04:00 +08:00
NovaRain 83392f739b Refactored CombatHook() in LoadGameHook.cpp.
Updated struct/variable/function defines.
Minor code edits according to develop branch.
Updated version number.
2021-02-06 11:06:38 +08:00
NovaRain 9c084c10e0 Minor code format edits in LoadGameHook.cpp 2021-02-04 10:12:31 +08:00
NovaRain 52ce39c264 Added NPC armor mod to the example mods 2021-02-02 20:34:12 +08:00
NovaRain 4813b5656f Code edits to ScriptExtender.cpp
Updated FalloutStructs.h and ddraw.ini.
2021-02-02 11:39:33 +08:00
NovaRain 3932676824 Separated the loading and initialization of hook scripts
* now it works mostly in the same way as 4.x.
* now the hook injection code is run only once on sfall init.
2021-02-02 11:31:57 +08:00
NovaRain 7b5d50abf0 Separated the loading and initialization of global scripts
* now the loading occurs before the start of a new game.
* Note: hs_ scripts are still loaded & inited in one go after game load
2021-02-01 15:13:07 +08:00
NovaRain 4ffdac7f0d Refactored the code in LoadGameHook.cpp
* now the reset of modules should be in the same way as 4.x.
2021-01-31 20:49:32 +08:00
NovaRain 9149df171d Small optimization for game_loaded script function 2021-01-31 10:33:52 +08:00
NovaRain 4e200bc513 Minor edits to code and document 2021-01-31 10:26:57 +08:00
NovaRain 3ae0f0f87b Reorganized render related code in Graphics.cpp 2021-01-30 10:08:22 +08:00
NovaRain 609c4af6b1 Updated FalloutStructs.h and some other files 2021-01-30 09:28:32 +08:00
NovaRain 21b88c3cf0 Backported HOOK_ADJUSTFID from 4.2 2021-01-29 23:03:26 +08:00
NovaRain 87af67346e Fixed the "Leave" event of the window region
* the event procedure was not triggered when the cursor moves to
a non-scripted window.
2021-01-29 12:44:20 +08:00
NovaRain 7eab9ff3ce Added SmallFrameFix option
Code style edit: use !boolean instead of (boolean == false) for some
checks.
2021-01-29 12:05:19 +08:00
NovaRain 7a1ab34964 Moved the defines of engine function offsets to a new header 2021-01-28 21:33:04 +08:00
NovaRain a914029f46 Removed unnecessary hack in Perks.cpp 2021-01-28 12:54:03 +08:00
NovaRain 980176451e Code edits to Perks.cpp 2021-01-28 12:36:38 +08:00
NovaRain 9e861f735d Implemented sProto stuct and GetProto function
* replaced the obsolete "char* proto" usages and GetProtoPtr function.
2021-01-27 12:20:03 +08:00
NovaRain 83d50fc33e Code edits 2021-01-27 10:47:17 +08:00
NovaRain 839f531cbd Moved the defines of engine variable pointers to a new header 2021-01-26 22:01:34 +08:00
NovaRain ba11cee858 Renamed all engine function wrappers with "fo_" prefix 2021-01-26 14:03:37 +08:00
NovaRain 42215fc1bb Changed the script name search algorithm from linear to binary 2021-01-25 13:04:06 +08:00
NovaRain 2d7ff1e558 Changed "obj_under_cursor" for the movement cursor
* the function is not designed for use with it.

Code correction in Stats.cpp.
2021-01-25 11:34:41 +08:00
NovaRain 2aa77552f5 Added an option about max HP calculation to the stats ini file
Added an update to the HP stats when the map is loaded first time.
Code edits to Animations.cpp.
Minor code edits.
2021-01-24 22:54:20 +08:00
NovaRain 73b0091ec1 Renamed engine variable defines to be in line with 4.x 2021-01-22 22:32:04 +08:00
NovaRain e5b110d7ce Added some functions/variables for future use 2021-01-22 14:19:35 +08:00
NovaRain 8e66b82f76 Added a new example mod gl_auto_closebox
Updated gl_highlighting_lite example mod.
Updated engine structs.
2021-01-20 10:21:48 +08:00
NovaRain d2b3cac835 Fixed flag setting/unsetting for non-door objects
Added a fix to prevent setting the radiation level for controlled NPCs.
Removed the ability to change the poison level for NPCs (now 4.x
exclusive)
2021-01-15 08:42:11 +08:00
NovaRain 2b187cee1f Fixed the format of some debug messages (#195) 2021-01-14 11:37:49 +08:00
NovaRain 3b965fc76c Fixed a crash bug in ScriptExtender.cpp from commit e075c05
Minor code/document edits.
2021-01-13 11:19:25 +08:00
NovaRain 31af299b4a Added TagSkillMode option to the skills ini file
Added a fix to the radiation handling in the engine when an NPC is under
the player's control.

Code correction in Graphics.cpp.
2021-01-12 12:02:17 +08:00
NovaRain cf90437b71 Backported HOOK_GAMEMODECHANGE from 4.2
Backported SPECIAL game mode flag from 4.2
2021-01-10 21:45:50 +08:00
NovaRain e075c05a3f Fixed the display issue in DX9 mode
* black screen or rainbow colors when returning to the game after using
Alt+Tab in dialogue.

ASM code correction in ScriptExtender.cpp.
2021-01-08 13:28:57 +08:00
NovaRain ae76b93f07 Fixed the ID assignment for script objects and party member's items
when saving the map
2021-01-08 10:11:00 +08:00
NovaRain 9116596bf1 Added TagSkillBonus option to the skills ini file
Fixed a crash in the previous commit.
2021-01-06 11:31:07 +08:00
NovaRain 087b259b04 Added more options for tweaking some engine perks to the perks ini file
Added tweaks to include the perk level in the calculation of the bonus
value for "Salesman" and "Demolition Expert" perks.
2021-01-05 14:15:33 +08:00
NovaRain bc2ed03db1 Added sfx volume reduction for objects located on a different map elev
Added a fix for AI weapon switching when not having enough APs
2021-01-03 10:48:50 +08:00
NovaRain cdc06b4e6a Added a fix to the poison handling in the engine when an NPC is under
the player's control.

Minor code edits.
2020-12-30 22:34:32 +08:00
NovaRain 28bba7cfef Fix for previous commit 2020-12-27 09:32:54 +08:00
NovaRain c829a3e753 Added support for panning sfx sounds
Removed the tweak that adds the city name in the description for empty
save slots (commit 63b2025)
2020-12-26 21:58:52 +08:00
NovaRain 43a2fc93cc Modified some of the mechanics of "interface_overlay" function
Changed "intface_redraw" with one argument to redraw the specified
interface window.
2020-12-25 14:51:31 +08:00
NovaRain 26a2338038 Added "interface_overlay" script function
* for creating an additional overlay on the top of the interface window.
(document WIP)
2020-12-23 11:58:29 +08:00
NovaRain e0e300a91e Added sfall_func7 and sfall_func8 new opcodes
Added 3 new attrType values to "get_window_attribute" function.
Minor code edits.
2020-12-22 17:03:01 +08:00
NovaRain 9052396de5 Added stereo support for SFX and speech ACM files
(for files at 44.1 kHz sample rate)

SFX sounds that are dependent on the gsound_compute_relative_volume_
function are excluded from the search for alternative formats.
2020-12-21 16:05:16 +08:00
NovaRain 9e9c3ed5d1 Added support for ACM files at 44.1kHz sample rate 2020-12-17 14:04:14 +08:00
NovaRain 4271241628 Renamed MPClient folder to DebugEditor
Renamed FalloutClient.exe to FalloutDebug.exe
Fixed a crash bug in commit 82db339 when using the debug editor.
2020-12-14 15:42:45 +08:00
NovaRain 82a57179f7 Updated some code 2020-12-13 09:38:34 +08:00
NovaRain 586e622fcc Corrected code of some hook scripts 2020-12-13 08:46:33 +08:00
NovaRain 5ac7bfcbde Reverted support for the D3DFMT_A8 texture format 2020-12-10 07:20:49 +08:00
NovaRain e0d5f6a568 Removed unnecessary code in Graphics.cpp
Replaced the D3DFMT_A8 texture format with D3DFMT_L8.
Minor edits to documents.
2020-12-09 10:49:02 +08:00
NovaRain 4f7937314f Changed the numbering of args in hookscripts.txt (#345)
* because arg numbers are 0-indexed for related functions.
2020-11-16 09:17:19 +08:00
NovaRain 1508d88a5e Backported "get_ini_sections/section" functions from 4.0
Minor code edits.
2020-11-06 10:48:35 +08:00
NovaRain cdeb970d4f Backported metarule2_explosions modes from 4.1
Updated version number.
2020-11-05 12:13:25 +08:00
NovaRain 38a0ddb1eb Backported "add_extra_msg_file" function from 4.1
Re-ordered critical table fixes in Criticals.cpp.
2020-11-03 15:10:33 +08:00