Compare commits

...
1197 Commits
Author SHA1 Message Date
NovaRain 0bb63de958 Updated version number and changelog 2026-02-11 21:40:51 +08:00
NovaRain 70a8eb086f Removed unnecessary/unused return value in critter_mod_skill function 2026-02-11 20:16:09 +08:00
NovaRain 47dad66b58 Removed misleading parens from functions without args in documents 2026-01-27 16:37:49 +08:00
NovaRain 8ec4ed6a0a Code edits to SingleCore to make it run safer
Changed SingleCore to be disabled by default.
(its usage is questionable on newer systems.)
2026-01-16 10:10:28 +08:00
NovaRain 201ecd16f7 Code edits to ProcessorIdle
* include QS_RAWINPUT (0x400) for WinXP+.
* set the option enabled by default.
2026-01-15 09:41:13 +08:00
NovaRain ae3a8f85f5 Added settings about the mirrored shades to tweaks.ini
Updated the description of Fallout1Behavior.
2026-01-13 14:30:08 +08:00
NovaRain b6d8b14f90 Expanded the functionality of Fallout1Behavior
* FO1 initial in-game time is 7:21 rather than 8:24.
2026-01-10 20:36:11 +08:00
NovaRain edd6da5716 Fixed edge-scrolling speed in the world map
* commit 5feeff0 only fixed when in normal game maps.
2026-01-04 12:37:51 +08:00
NovaRain fe9d56030f Re-ordered Unarmed module init (sync with 4.x) 2026-01-03 20:45:25 +08:00
NovaRain 5feeff0c21 Fixed edge-scrolling speed when using the speed tweak
(closes #523)
2026-01-01 20:23:34 +08:00
NovaRain ea79147afe Cosmetic edits: updated year 2026-01-01 20:17:18 +08:00
NovaRain 6535a5f02e Added a safeguard to the single-frame death anims tweak
Updated version number.
2025-12-05 16:48:31 +08:00
NovaRain 265314083d Tweaked interface bar FRM
* to better sync with HRP's 800px one.

Updated resource files.
2025-11-12 22:50:25 +08:00
NovaRain 0367d28bc1 Edited the description of some legacy options to make them explicitly clear 2025-10-23 08:56:39 +08:00
NovaRain 06df287b3a Updated version number and changelog
Edits to sfall opcode list.
2025-10-09 19:26:53 +08:00
NovaRain f57a261339 Updated Russian translation file 2025-09-17 20:51:42 +08:00
NovaRain ee5cdbcd81 Added support for switching the keyboard layout
(from Crafty)

Minor edits to some documents and LoadOrder.cpp.
2025-09-17 20:49:10 +08:00
NovaRain 93416a9450 Fixed the upper limit when applying mouse sensitivity 2025-09-11 22:13:47 +08:00
NovaRain 9a18193060 Added an option to disable Arroyo-related events
Minor fix to DisableSpecialMapIDs (as ID 0 is still a valid map).
Edited some descriptions in ddraw.ini.
2025-08-29 13:23:57 +08:00
NovaRain 95cd72348d Added splash screen fallback to Mash's HRP (4.1.8 only) 2025-08-28 09:08:11 +08:00
NovaRain 0b6a058dff Code fixes/edits to the previous commit
* nonEngLang didn't get set when using Mash's HRP.
2025-08-27 10:33:25 +08:00
NovaRain 6f5ebe76fc Added default path fallback for splash screens
* before the game loaded splash screens only from art\<language>\splash\
if the game language is not English, ignoring the default art\splash\.

Added a global boolean to replace individual game language checks.
2025-08-25 12:16:34 +08:00
NovaRain 4cef7cf72f Fixed file seeking in uncompressed .dat files
(ref. fallout2-ce/fallout2-ce#244)
2025-08-24 09:45:33 +08:00
NovaRain 400f94e302 Fixed crash in an encounter between two groups
* when they are set to fight each other but one group fails to spawn.
(ref. BGforgeNet/Fallout2_Restoration_Project#350)

Updated version number.
2025-08-17 15:11:05 +08:00
NovaRain 0a42f83084 Updated version number and changelog 2025-07-26 19:05:23 +08:00
NovaRain 9f5c8fa946 Updated sslc readme
Recompiled gl_npcarmor_lite due to sslc fixes.
2025-07-14 10:22:59 +08:00
NovaRain a8baf6c331 Removed unnecessary code in SingleCore option
* GetCurrentProcess returns a pseudo handle, with which calling the
CloseHandle function has no effect
2025-07-05 19:32:18 +08:00
NovaRain 2c33b2752b Fixed slightly misaligned buttons in the barter screen
(ref. fallout2-ce/fallout2-ce#204)
2025-06-11 21:43:29 +08:00
NovaRain 01ff118619 Updated use.frm/use_e.frm
(use invbox.frm as the base instead of loot.frm)
2025-06-02 10:03:04 +08:00
NovaRain c90571392b Improved the error handling for missing main .dat files
(ref. fallout2-ce/fallout2-ce#172)
2025-05-31 08:53:08 +08:00
NovaRain 7615e318ca Fixed slightly misaligned buttons in the character screen
(ref. fallout2-ce/fallout2-ce#154)
2025-05-26 21:45:03 +08:00
NovaRain 02f9be78f6 Fixed slightly misaligned buttons in the pipboy
(ref. fallout2-ce/fallout2-ce#147)
2025-05-24 08:05:23 +08:00
NovaRain bd87a49e87 Removed glass glare from use.frm/use_e.frm
* Now they look the same as all other interfaces that have the inventory
list and character portrait (ref. fallout2-ce/fallout2-ce#148)

Updated resource files.
2025-05-24 00:27:42 +08:00
NovaRain 508bcd745c Added lowercase 'a' as a hotkey for the 'Take All' button
(previously only uppercase 'A')
2025-05-22 08:44:12 +08:00
NovaRain 1c12b52303 Improved the clearing of floating text messages after map change
(ref. fallout2-ce/fallout2-ce#115)
2025-05-13 22:02:17 +08:00
NovaRain 7cd059a9a5 Added a safeguard to stat_level engine function
(ref. fallout2-ce/fallout2-ce#76)

Unified the naming style of return addr variables for some ASM code.
2025-05-11 12:07:27 +08:00
NovaRain 9355f84943 Minor code edits to Stats.cpp 2025-05-11 09:32:58 +08:00
NovaRain 5f220d54e4 Fixed potential undefined behavior in FullItemDescInBarter
* due to obj_examine_func_hack_objdesc, item description is coped to
messageBuffer already (max 354 chars), so in most cases desc is the same
as messageBuffer, which should be UB to strncpy_s. MSVC's implementation
seems treating self-copy as no-op, but we shouldn't rely on this
behavior.
2025-05-04 08:55:46 +08:00
NovaRain 0486a43532 Fixed duplicate sound in the "Move Items" and "Set Timer" windows
* happens when clicking the "Done" button.

Fixed crash when a critter with a powered melee/unarmed weapon runs out
of ammo and there is ammo nearby.

Minor code optimization to Interface.cpp, use spare ecx register instead
of the stack for eax value.
2025-05-03 21:39:50 +08:00
NovaRain 9cccb2e45b Improved the previous commit
* now the buttons have proper press/release sfx.
2025-05-02 21:28:19 +08:00
NovaRain b59930d831 Added missing click sound to the buttons in the combat control panel
Updated version number.
2025-04-29 11:01:26 +08:00
NovaRain d996e1f739 Correction to the previous commit
* shouldn't modify the string in-place.
2025-04-13 16:40:08 +08:00
NovaRain 86506b5ec7 Removed visible newline chars when examining items in the barter screen
(ref. #401, #591)

Minor code edits to BugFixes.cpp.
Updated changelog.
2025-04-13 01:10:58 +08:00
NovaRain 8f1813cd0b Moved render.cpp/h files to GUI folder/namespace
Moved newline support hacks from MiscPatches to Text.cpp/h as 4.x.
2025-04-13 00:13:37 +08:00
NovaRain 4e0e98dda9 Updated changelog 2025-04-09 09:23:55 +08:00
NovaRain 8ff09aa10e Minor code edits to Movies.cpp 2025-04-06 12:34:15 +08:00
NovaRain caa64822dd Code edit to the previous commit 2025-04-05 22:16:58 +08:00
NovaRain bad50cd335 Changed the implementation of ProcessorIdle
* now the same as CPU_USAGE_FIX in Mash's HRP, with a simpler toggle
setting.

* also avoids slowdowns if the player happens to enable both of them.
2025-04-05 17:42:17 +08:00
NovaRain 71c8b851e6 Tightened the compatibility mode check (again)
(OS check is now limited to unsupported Windows versions.)
2025-04-04 15:23:06 +08:00
NovaRain 16b2681c79 Reverted commit ef78c35
(found another way to fix freezing issues in Win11 24H2.)
2025-04-03 01:22:14 +08:00
NovaRain 764ab01d9d Fixed out-of-bounds selection in the file list when loading a GCD file 2025-04-02 14:21:56 +08:00
NovaRain ef78c35a30 Reverted part of the optimization for the save/load game screens
(commit a35a4e03, as it could cause the cursor to become unresponsive.)

Updated version number.
2025-03-31 21:55:59 +08:00
NovaRain 2e4998168c Updated version number and changelog 2025-03-20 22:31:04 +08:00
NovaRain eef4571cfe Correction to the previous commit
* should have checked for anim code directly instead of critter flag.
2025-03-18 11:03:24 +08:00
NovaRain 2e8c742fdb Minor edits to code and function notes 2025-03-11 09:01:30 +08:00
NovaRain 8782428615 Added a tweak to replace death anims on critters with "_sf" variants on map load
(also fix critters stuck in the middle of death anims after returning
to the map, #584)
2025-03-10 10:02:37 +08:00
NovaRain d62ec1b939 Fixed broken critter art debug message
(caused by commit e3b524dd)
2025-03-08 20:38:17 +08:00
NovaRain 5fb69175e5 Allow death animations to finish when entering combat
(to prevent animation glitch, #584)
2025-03-05 10:28:57 +08:00
NovaRain 157f4434d5 Changed PipBoyAvailableAtGameStart and set_pipboy_available
* They no longer modify the vault suit movie state, which was an
undesired behavior.

Updated scripting documents.
2025-03-02 11:29:20 +08:00
NovaRain 43fb1ec5f2 Improved the fix for "out of bounds" bug when printing the automap list
* prevent the overflow of _sortlist (holds 24 elements at max).
* NOTE: the fix just cuts off location/elevation lists, and should be
removed once a proper pagination in pipboy is implemented.
2025-03-01 23:28:49 +08:00
NovaRain 80679572c3 Improved the fix for extra hidden buttons in the previous commit
(ref. alexbatalov/fallout2-ce#465, alexbatalov/fallout2-ce#466)
2025-02-25 11:23:41 +08:00
NovaRain 7f0017a858 Fixed extra hidden buttons appearing below the location list
* in the Status section in the pipboy (a partial fix).
(ref. alexbatalov/fallout2-ce#465)
2025-02-24 23:52:32 +08:00
NovaRain 7e95e1b405 Fixed double click sound when selecting a location in pipboy status
(ref. alexbatalov/fallout2-ce#462)
2025-02-21 11:15:03 +08:00
NovaRain 03cc1f8ae4 Fixed the incorrect message when attempting to repair dead robots
(ref. alexbatalov/fallout2-ce#459)
2025-02-19 12:16:24 +08:00
NovaRain c4f6f9c9c7 Synced FunctionOffsets_def.h with 4.x
Removed VariableOffsets_HRP.h (was severely underused within 3.8 scope).
2025-02-12 22:30:36 +08:00
NovaRain 987419945f Fixed display issues when highlighting a multiline dialogue option
(ref. alexbatalov/fallout2-ce#418)
2025-02-12 13:24:48 +08:00
NovaRain 461b12037a Code edits to Perks.cpp 2025-02-09 12:32:10 +08:00
NovaRain e072cfda7c Restored the position of the ammo bar when ALTERNATE_AMMO_METRE=0 2025-02-03 12:19:22 +08:00
NovaRain 8bd0147578 Fixed the main menu music not stopping when replaying the intro
(ref. alexbatalov/fallout2-ce#399)
2025-02-01 16:04:03 +08:00
NovaRain b68655f7c8 Fixed item's unique ID being reset by a non-unique item (#582) 2025-01-31 22:41:31 +08:00
NovaRain 9d68ae2d4b Simplified some jumps in ASM code
* Replaced single-use "mov reg, addr; jmp reg" with constant variables.
2025-01-30 19:45:46 +08:00
NovaRain 7eec7a132e Added settings about Educated, Healer, and Lifegiver to perks.ini 2025-01-27 21:06:15 +08:00
NovaRain 3d630de332 Tightened the compatibility mode check 2025-01-26 11:33:02 +08:00
NovaRain b39d5d9a57 Edits to function documents 2025-01-22 21:37:38 +08:00
NovaRain d654233614 Fixed issues related to negative weapon ammo
(ref. alexbatalov/fallout2-ce#443)

Fixed freeze when reloading an overloaded weapon via the interface bar.
2025-01-19 15:10:55 +08:00
NovaRain 6f9d1fc1f8 Added German and French resource files 2025-01-14 12:32:06 +08:00
NovaRain fee5b7daa1 Reduced the green tone of the message window
(less pixelated colors and for text clarity)

Updated resource files.
2025-01-11 14:22:42 +08:00
NovaRain f36f204dd7 Fixed map lighting from Night Vision perk
* Before the perk effect only kicked in when map update proc ran after
game load. Now the delay is much shorter.
2025-01-09 10:47:26 +08:00
NovaRain cc7e471df0 Added setting about Comprehension perk to perks.ini 2025-01-07 11:58:45 +08:00
NovaRain 4b8478911e Added setting about Night Vision perk to perks.ini
Updated version number.
2025-01-05 21:05:59 +08:00
NovaRain deb6d2d0ea Cosmetic edits: updated year 2025-01-05 17:30:52 +08:00
NovaRain 1354ff2ec6 Updated changelog 2024-12-04 09:06:45 +08:00
NovaRain 38eed54c9f Added upper limit to WorldMapDelay2 2024-11-22 12:50:07 +08:00
NovaRain 5230d0aeca Tweaked how XPTable data was loaded
* to align hook functions with the engine functions they replaced.
2024-11-19 21:55:57 +08:00
NovaRain 62f9eb1987 Removed unnecessary selfrun file creation
* autoplay was disabled in 3.8.30 (commit 6c2eb479)

Updated version number.
2024-10-14 10:56:09 +08:00
NovaRain ef791b872a Updated version number and changelog 2024-09-15 12:45:36 +08:00
NovaRain bbf8e84696 Fixed the behavior of game_loaded script function
(always returned 1 when called from normal scripts)

- Revert the changes to ScriptExtender.cpp in commit 9149df1, and use
unordered_set instead of vector for caching script program pointers.
2024-09-10 09:52:21 +08:00
NovaRain b8add3dec5 Fixed issues with picking Tag! or Mutate! perk if there are unused perks
* their windows keep reappearing when picking other perks, can cause
various issues or even crashes.
2024-09-01 12:22:31 +08:00
NovaRain d3ff9d04b4 Fixed object_fix_weapon_ammo_ engine function
(was incorrectly checking Misc "object" type instead of item subtype.)
2024-08-14 14:42:20 +08:00
NovaRain 587ca5bee1 Fixed the return value of using_skill script function
* if the arguments are not the player and SKILL_SNEAK, it returned
garbage values due to the uninitialized variable.
2024-07-31 20:20:28 +08:00
NovaRain 20bf2ce145 Added a tweak to restore the sneak state when switching between maps
(can be overridden with map_enter/exit_p_proc in global scripts)

Minor edit to function notes.
2024-07-31 08:23:03 +08:00
NovaRain 486c897243 Added new HOOK_BUILDSFXWEAPON
* Hook for gsnd_build_weapon_sfx_name
* Fixed long name ACM crash in AutoSearchSFX
* Updated documents
2024-07-19 19:51:04 +08:00
NovaRain 87eca4898a Scripting headers: add material-related constants, minor lib extensions 2024-07-18 08:36:30 +08:00
NovaRain 3515dac146 Prevent unnecessary toggling of the tags in show/hide_iface_tag 2024-07-16 10:54:42 +08:00
NovaRain 73deda86c8 Fixed the skilldex art for the hero appearance mod (#555)
* the info card doesn't refresh properly due to cached FRM.
2024-07-07 18:18:49 +08:00
NovaRain d39535e0a6 Fixed inconsistent behavior of escaped percent sign in sprintf/string_format
Minor code edits to LoadGameHook.cpp.
2024-07-06 22:17:10 +08:00
NovaRain 5c246ba614 Reverted GameReset in LoadGameHook.cpp to pre-3.8.29 behavior
(when the engine's game_reset is called, sfall will reset modules as
well for consistency.)
2024-06-29 17:34:15 +08:00
NovaRain 33943bb6ff Added OutlineColorContainers/Corpses to the built-in item highlighting
Minor code refactor of the built-in item highlighting.
Updated version number.
2024-06-28 22:11:00 +08:00
NovaRain 81f4af927b Synced item highlighting mod with 4.x 2024-06-28 21:14:46 +08:00
NovaRain e2dcb3e0b2 Updated changelog and readme 2024-06-19 20:44:23 +08:00
NovaRain 88197f7fed Corrected proto pid offset in define_extra.h 2024-06-17 15:21:56 +08:00
NovaRain 0b14111472 Further simplification of the previous commit
Updated sslc_readme.md.
2024-06-15 19:08:04 +08:00
NovaRain 8448a24339 Added a tweak to prevent "forever" type of animation from stopping when entering combat 2024-06-09 14:15:30 +08:00
NovaRain 388a5de994 Changed the game mode check in gl_highlighting_lite
* now opening other interfaces (inventory, options, etc.) will also
turn off highlight.
2024-06-09 12:09:05 +08:00
NovaRain 803eeb4d27 Fixed crash on game save (due to commit 0409eb67) 2024-06-09 06:27:02 +08:00
NovaRain 2714b3bfc8 Expanded show/hide_iface_tag functions to work with tag value 0 (sneak)
Updated documents.
2024-06-07 08:08:13 +08:00
NovaRain 0409eb67e4 Minor code edits: replace some push/pop in ASM with pushadc/popadc pair 2024-06-06 21:56:45 +08:00
NovaRain ea74ff7d0c Added ItemMoveSkipDragKey from 4.x 2024-06-06 21:50:48 +08:00
NovaRain e05010c752 Cosmetic edits: unified the placement of __declspec keyword
* it's recommended to place __declspec before the return type.
(ref: https://stackoverflow.com/q/13613864 )
2024-06-04 20:48:49 +08:00
NovaRain 9f8a5b4766 Fixed possible crash in BoxBarCount 2024-06-03 09:29:05 +08:00
NovaRain 6a773780a7 Backported the per-line msg fallback from 4.x
Renamed PartyMemberNonRandomLevelUp for clarity.
2024-06-03 09:23:21 +08:00
NovaRain e2ad532607 Added a new attrType value to get_window_attribute
Added PAUSEWIN (Ctrl+P) to LoadGameHook game modes.
Fixed crash in interface_art_draw (when drawing beyond window bounds).
Fixed assert fail when calling sfall_func7+
Edits to documents.
2024-06-02 09:12:56 +08:00
NovaRain 181560265f Fixed NPCAutoLevel and set_npc_level opcode
- Now properly doesn't shift first level up too early and doesn't set "early" flag
- Fixed using set_npc_level without disabling engine leveling logic
- Renamed to PartyMemberNoEarlyLevelUpPatch to match behavior
2024-06-02 08:43:38 +08:00
NovaRain ca42b01193 Added new arguments to HOOK_ENCOUNTER
* to determine which encounter is being loaded, not just map ID.

Updated the document and header files.
2024-05-31 15:11:40 +08:00
NovaRain 73ac86d493 Updated healing skills example mod
(fix inaccurate behavior and refactoring)
2024-05-28 21:44:33 +08:00
NovaRain 7dc499eb24 Changed the world map healing rate patch to be enabled by default
* default 3 hrs according to Fallout v1.2 manual errata.

Changed AIDrugUsePerfFix to be enabled by default (UPU/RPU have it
enabled for years, and F2:CE also implemented a similar fix.)

Updated version number.
2024-05-28 21:30:52 +08:00
NovaRain 944a1be064 Added 'DontMoveTop' flag to the interface bar
* to prevent the interface bar from obscuring the barter/trade interface
when using the hi-res patch.
2024-05-27 22:26:22 +08:00
NovaRain bc882680e4 Added patch for healing time on worldmap and set_world_map_heal_time
* the time interval check is tied to real time clock, instead of game time.
2024-05-27 21:56:54 +08:00
NovaRain cfcfa21afe Reverted speed patch/keys behavior to pre-3.8.15
* Enable in [Speed] is the master switch for all Speed* settings.
* SpeedMultiInitial requires Enable=1, not a standalone setting.
* SpeedModKey=0 allows players to use only numpad keys to change speed.
2024-05-24 21:39:42 +08:00
NovaRain 0095ec212b Added healing skills example mod from 4.x 2024-05-24 08:55:01 +08:00
NovaRain 83d8104ed8 Added "item" type to the party member protos patch
(for the car trunk)
2024-05-24 08:51:04 +08:00
NovaRain c74ddc1cbc Backported ItemCounterAutoCaps from 4.x 2024-05-23 20:17:49 +08:00
NovaRain 0746d6b483 Header lib: refactor inven_as_array and add proper jsdoc defs to all comments
- inven_as_array was allocating blocks of 100 items which was unnecessary
2024-05-20 20:20:56 +08:00
NovaRain 3c8ec03e30 Add useful comments to most header lib procs and macros 2024-05-19 07:27:43 +08:00
NovaRain 0b67cb4125 Fixed the missing hotkeys for additional elevators derived from the original elevator types
(ref. BGforgeNet/Fallout2_Restoration_Project#290)
2024-05-18 15:17:22 +08:00
NovaRain e84c5fdc1d Added setting about Cautious Nature perk to perks.ini 2024-05-17 21:06:01 +08:00
NovaRain a56162c949 Backported the options for internal debug window 2024-05-14 21:33:11 +08:00
NovaRain 272b082d72 Removed duplicate implementation in round() script function
* there's a lroundf implementation already in Tiles.cpp.
2024-05-12 13:56:05 +08:00
NovaRain 4f43a47a09 Sync ExtraArt module with 4.x
Removed duplicate FRMs from repo.
Rename all interface FRMs to lowercase.
Updated resource files.
2024-05-12 13:47:48 +08:00
NovaRain 9c97d0da44 Removed unnecessary error message when AutoSearchSFX is enabled
Removed leftover from devlog_f() in release builds.
2024-05-11 00:23:11 +08:00
NovaRain c1b279f2fa Implemented ExtraArt module from 4.x
Changed ASM code in BugFixes.cpp and Inventory.cpp to match 4.x
2024-05-11 00:19:17 +08:00
NovaRain 3ebc4326c5 New metarule to read art size + DrawImage refactoring
- Fix inconsistent and duplicate FRM-related struct definitions
- Clean up code, especially around using PCX files
- When FID is used, read FRM directly from ArtCache instead of from disk
- When path is used, cache loaded FRM/PCX files
- Add art_frame_data to read FRM/PCX size by FID/filename

Updated docs and sfall.h for art_frame_data script function
2024-05-08 09:02:31 +08:00
NovaRain 257a1f7b33 Tweaked the check for stretch to fit of AVI movies 2024-05-06 23:38:23 +08:00
NovaRain a66db5a386 Backported ExpandWorldMap from 4.x 2024-05-06 08:42:02 +08:00
NovaRain db547212e8 Fixed PlayIdleAnimOnReload causing critters to lose highlights in combat
* happens when the Target Highlight pref is set to "targeting only".
2024-05-02 09:45:38 +08:00
NovaRain 10ffa66256 Added a check for NPC being dead to NPCsTryToSpendExtraAP 2024-05-02 08:47:21 +08:00
NovaRain 9734d18d68 Added signal_close_game script function
Updated documents and version number.
2024-04-24 08:57:23 +08:00
NovaRain e706fba989 Updated changelog 2024-04-19 08:42:19 +08:00
NovaRain 884c00ffeb Reverted ScriptValue DataType from long to short (sync with 4.x)
Updated version number.
2024-04-18 22:23:39 +08:00
NovaRain 78ef06c8e6 Text edits to INI files 2024-04-18 20:48:58 +08:00
NovaRain d75d46d281 Updated changelog 2024-04-04 22:51:14 +08:00
NovaRain fc1d9dbfc2 Removed SpeedInterfaceCounterAnims=3 (now default behavior) 2024-04-01 17:21:34 +08:00
NovaRain b50dcaa151 Fixed xp exploit from canceling Here and Now perk
(when the player has Swift Learner perk)

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

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

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

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

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

Updated version number in documents.

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

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

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

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

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

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

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

Sync header changes with develop branch.

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

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

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

Code edits to Interface.cpp.

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

Updated translation ini files.

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

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

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

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

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

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

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

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

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

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

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

Updated version number.
2022-04-04 21:34:01 +08:00
NovaRain 73e1faae92 Removed commented code in the previous commit
Edits to documents and README.md.
2022-03-28 14:57:37 +08:00
NovaRain bdb95c80ec Edits to hookscripts.md
Corrected a typo in arrays.md.
Removed redundant compiler txt files.
2022-03-21 22:51:57 +08:00
NovaRain a9a5627b83 Removed FadeBackgroundMusic option (cur. disabled)
* because the fix code doesn't work on all supported systems.
2022-03-21 08:45:38 +08:00
NovaRain e566db91bb Updated Ammo INI Loader example script mod
Updated version number.
2022-03-15 13:02:33 +08:00
NovaRain 8d6e6874ee Added .gitattributes with ssl syntax highlighting
Minor code edits to the built-in item highlighting function.
2022-03-11 20:32:55 +08:00
NovaRain 7cc25efb01 Code edits converge with 4.x 2022-02-20 08:56:43 +08:00
NovaRain b1323fc07a Code edits to Graphics.cpp & Logging.cpp
Minor edits to other code/documents.
Updated version number.
2022-02-17 10:26:42 +08:00
NovaRain 5fcf4aae50 Reverted the palette update method for DX9 mode to pre-3.8.31
* moving the processing to GPU (commit 932a9f3)

Improved the functionality of AllowDShowMovies:
now can take screenshots and press any key to skip AVI movies.

Code edits to Logging.cpp.
2022-02-14 12:49:10 +08:00
NovaRain 42afaa46ed Fixed the game printing an incorrect item name in some cases
Minor fixes in Graphics.cpp and InputFuncs.cpp.
2022-02-13 07:46:55 +08:00
NovaRain 8b858b6cb9 Reverted the limit on hit chance (commit 024e8b1)
* reason: the text length is depend on the frm.
2022-02-13 07:40:33 +08:00
NovaRain e8c952d082 Code correction on DX9 initialization
Some minor code edits.
2022-02-12 11:02:58 +08:00
NovaRain 024e8b1777 Added minimum and maximum limits to the hit chance
* to prevent display glitches (BGforgeNet/Fallout2_Unofficial_Patch#85)

Lowered the max number of PNG screenshots to 10K.
2022-02-11 15:07:20 +08:00
NovaRain 6b14d4f86e Fixed the screenshot for sfall DX9 mode
* Now the screenshots are saved in PNG format.

[TEST] Changed the DirectX 9 device creation mode.
2022-02-10 13:39:31 +08:00
NovaRain 6e10f624a3 Backported the code injection system for game hooks from 4.1
Split HookScripts.cpp/h to multiple sets in HookScripts\ as 4.x.

Reverted tile_num to stdcall (commit a5f57d4)
2022-02-08 22:30:06 +08:00
NovaRain bc380b978d Fixed the copyright line in the credits
Code edits to main.cpp and Graphics.cpp to converge with 4.x.
2022-02-01 09:40:33 +08:00
NovaRain d2b3529ed0 Fixed the music not playing after loading a saved game (#422)
* if the save is on the same map, and while in the game.
2022-01-20 07:13:50 +08:00
NovaRain f77cd85f95 Minor code edits 2022-01-19 09:43:05 +08:00
NovaRain 39c5ab3674 Removed unused code in Graphics.cpp 2022-01-18 10:16:53 +08:00
NovaRain 7d75023b81 Added HLSL source files and compiled shader files
* this should remove the hidden dependency on d3dcompiler_xx.dll.
2022-01-18 09:05:40 +08:00
NovaRain bd629b5460 Added a new warning message on shader effects to Graphics.cpp 2022-01-17 12:50:19 +08:00
NovaRain 5b180286d1 Added a redraw timer to the debug editor
* redraws the background game screen when moving the editor window.
* works for sfall DX9 mode.
2022-01-17 09:52:29 +08:00
NovaRain 814c280432 Updated the year for version info
Added GamePids.h from develop branch.
2022-01-17 08:55:21 +08:00
NovaRain c5f52105ec Code correction to DebugEditor.cpp 2022-01-15 12:00:01 +08:00
NovaRain 18cc3f7aa9 Increased the width of the mouse drop area for inv on the barter screen 2022-01-15 09:57:28 +08:00
NovaRain fda97ffefb Edits to the arrays document 2022-01-13 21:31:33 +08:00
NovaRain 00508adfb1 Fixed a bug in 3.8.31 that caused AI to be unable to use some weapons
Code edits regarding AIpref in Enums.h.
2022-01-13 10:26:36 +08:00
NovaRain e906be67ab Updated documents for the removal of ArraysBehavior option
Some other minor edits to documents.
2022-01-12 09:43:04 +08:00
NovaRain abe2430495 Fixed crash in the previous commit 2022-01-11 11:54:47 +08:00
NovaRain de51b6838b Redid the idle implementation for ProcessorIdle
Renamed RunGlobalScripts# functions to the same as 4.x.
2022-01-11 10:03:35 +08:00
NovaRain 52126bf62d Removed ArraysBehavior and RemoveWindowRounding from ddraw.ini
* both are now always enabled
2022-01-07 06:47:49 +08:00
NovaRain be7c1210a0 Changed the "Radiated" on the char screen to be highlighted in gray
* when the player still has an impending radiation effect

Unified the naming style for color variables.
2022-01-06 14:19:47 +08:00
NovaRain 08a96bc27e Code edits to Graphics.cpp for device lost state 2022-01-04 07:04:13 +08:00
NovaRain f94085be93 Fixed black screen after restoring DX9 device
Minor code edits.
2022-01-03 23:59:27 +08:00
NovaRain 89a49b4f32 Improved the message box for CRC mismatch
Changed SkipCompatModeCheck to not require sfall debugging mode.
Minor code edits.
2021-12-28 12:48:41 +08:00
NovaRain cf5952c031 Removed SkipSizeCheck from ddraw.ini
* the executable file size check is also removed (mostly).
2021-12-27 10:18:14 +08:00
NovaRain ac058ee4d7 Code correction/edits to the previous commit
Added a debug message for the open file limit being exceeded.
2021-12-26 11:43:51 +08:00
NovaRain b31f29a324 Fixed the broken fix for addicted party members
(BGforgeNet/Fallout2_Restoration_Project#131, #420)

Improved the duplicate path removal in LoadOrder.cpp.
Backported additional fixes to FadeBackgroundMusic from 4.x.
2021-12-25 21:25:24 +08:00
NovaRain 750d88ea9a Code edits to CRC.cpp for displayed messages
Code edits to ScriptExtender.cpp for duplicate code.
2021-12-24 14:35:29 +08:00
NovaRain 68389d9474 Added MapGridToggleKey debug option from 4.x
Fixed db_init function wrapper.
Minor edits to ddraw.ini.
2021-12-21 09:51:09 +08:00
NovaRain 97f3d3eb5f Code cleanup and edits according to dev branch 2021-12-19 08:45:26 +08:00
NovaRain b187c8359b Changed the load order of sfall.dat to after patchXXX.dat
Code edits to Interface.cpp due to the previous commit.
2021-12-18 21:37:48 +08:00
NovaRain 93f6131592 Added fixed call point for sfall initialization 2021-12-17 09:57:41 +08:00
NovaRain 5a9edb9723 Minor code edits to Graphics.cpp 2021-12-16 12:40:46 +08:00
NovaRain d14e7ccd9f Code changes to Graphics.cpp & main.cpp
* from HRP test branch
2021-12-12 10:31:51 +08:00
NovaRain c5baecfdad Fixed a crash bug in FadeBackgroundMusic
(when trying to mute the master audio volume in the preferences screen)

Minor code edits.
2021-12-10 10:01:31 +08:00
NovaRain c1dc31a919 Added a tweak to allow printing new floating messages when their limit is exceeded (#388)
Fixed incorrect value of the limit number of floating messages.
2021-11-28 12:40:42 +08:00
NovaRain 8e3e49b281 Removed UseCommandLine from ddraw.ini (always enabled)
Updated version number.
2021-11-27 06:44:06 +08:00
NovaRain 44411309f8 Removed unnecessary stdcall modifier as in 4.x 2021-11-25 09:22:27 +08:00
NovaRain a35a4e034b Added optimization for the save/load game screens
Edited the description of args for HOOK_TOHIT.
2021-11-23 20:44:00 +08:00
NovaRain 21c85b298b Refactored ScriptExtender and all function code
* in the same way as 4.x, to improve the error handling.
2021-11-22 22:05:09 +08:00
NovaRain 5151ea312a Code edits to the previous commit 2021-11-20 20:47:25 +08:00
NovaRain def3e52302 Added centering screen on the controlled critter 2021-11-19 09:48:04 +08:00
NovaRain 06f35e10fb Minor code edits to Graphics.cpp from HRP branch 2021-11-17 10:07:00 +08:00
NovaRain 588abd2a4b Added class to HookScripts module 2021-11-16 21:00:51 +08:00
NovaRain c6813bdd74 Fixed the redrawing of windows with "DontMoveTop" flag
* if one is not topmost, it's not redrawn after calling show function.
2021-11-16 15:04:18 +08:00
NovaRain 53c0517268 Added class to most of modules
Added missing ReplacementFuncs.h.
2021-11-15 22:03:40 +08:00
NovaRain 81f112063e Fixed a minor bug in HeroAppearance.cpp
Fixed incorrect display of name and damage values for unarmed attacks
in some cases.
2021-11-15 10:57:45 +08:00
NovaRain 87eeeeaa95 Reverted make_pair changes in commit 5c1ccca 2021-11-10 08:43:30 +08:00
NovaRain a5f57d400b Changed the option name of grave containers fix
Edited the code of tile_num function wrapper.
Reorganized the options in ddraw.ini.
2021-11-09 10:06:13 +08:00
NovaRain df983e0d25 Optimized the calculation loop in Glovz's ASM code
Renamed enums in Interface.cpp
2021-11-08 14:13:09 +08:00
NovaRain c9c9d1f35f Code edits to ScriptExtender.cpp/SpeedPatch.cpp
Minor edits to some files.
2021-11-08 13:48:52 +08:00
NovaRain 5e8269d171 Changed the fix in commit 93c6cf5 to an option
Changed the title bar text for DX9 windowed mode.
Renamed some enums in Movies/QuestList/Sound.cpp.
2021-11-06 23:42:01 +08:00
NovaRain e510f30120 Optimized the calculation loop in YAAM's ASM code
Minor edits to Glovz's formula code.
2021-10-31 20:17:26 +08:00
NovaRain 326610e66d Separated MainLoopHook.cpp/h from ScriptExtender 2021-10-30 23:21:13 +08:00
NovaRain c8de86d58f Improved the ASM code of Glovz's formula and YAAM
Changed OverrideArtCacheSize to set the art cache size to 261.
Fixed typo in ddraw.ini.
2021-10-27 22:05:29 +08:00
NovaRain 29e52703f4 Renamed some enums to be the same as 4.x 2021-10-26 20:50:33 +08:00
NovaRain a4ae8d47f0 Rewrote the text hook for main_menu_create_ in C++
Changed the description of CheckWeaponAmmoCost in ddraw.ini.

Replaced <br> html tag with backslash in markdown documents.
(CommonMark spec)

Updated version number.
2021-10-25 10:59:22 +08:00
NovaRain 80c9dd533f Finished implementing fo namespace.
Renamed some structs to converge with 4.x.
Splitted ReplacementFuncs.cpp/h to multiple sets in Game\ as 4.x.
Added sfall/game namespaces (except for ScriptExtender).
2021-10-21 11:38:07 +08:00
NovaRain 338a45cf5e Added fo::funcoffs/func/util/ptr/var namespaces 2021-10-19 14:20:47 +08:00
NovaRain 8c697054c0 Re-organized project structure to 4.x-like
Separated ScriptShaders.cpp/h from Graphics.cpp/h.
2021-10-18 21:49:58 +08:00
NovaRain e9662f49dd Updated define_extra.h 2021-10-16 07:25:26 +08:00
NovaRain eecf763ab7 Forgot to commit main.cpp in 1209b7e 2021-10-15 12:30:48 +08:00
NovaRain b9b7e24c1a Fixed a rounding error in Glovz's damage formula
Updated Russian and Germen translations.
2021-10-15 10:24:08 +08:00
NovaRain 09fe57a099 Updated translation ini files 2021-10-14 09:31:58 +08:00
NovaRain 1209b7efc1 Code edits converge with 4.x
* improved the behavior of SpeedInterfaceCounterAnims=3.

* now sfall will always create sfall-log.txt, still won't write any
unless debug options are enabled in ddraw.ini.
2021-10-13 14:12:23 +08:00
NovaRain 4bcf96dfe8 Simplified the code in the previous commit 2021-10-10 10:28:41 +08:00
NovaRain 93c6cf5222 Fixed the execution of use_p_proc handler for grave type containers
* "grave type" is a container with only two frames (open/closed)
* in vanilla code, using a grave type container in the open state does
not execute use_p_proc in its script like other containers do.
2021-10-08 11:06:57 +08:00
NovaRain 0ab0a592b4 Reverted the previous commit and added "obj_is_openable" function
* the previous commit conflicts with BIS document.
2021-10-08 09:41:25 +08:00
NovaRain dfcc698c7a Fixed the return value of obj_is_open function
* for containers with only one frame (e.g. shelves)

Minor edits to the previous commit.
2021-10-07 13:46:30 +08:00
NovaRain 4137e6e977 Added loading sfall.dat resource file
* localized sfall_XX.dat is also supported.

Minor code refactoring in ScriptExtender.cpp.
Minor edit to sfall function notes.
2021-10-06 21:28:12 +08:00
NovaRain 5c1cccae8f Backported "set_scr_name" script function from 4.x
Updated documents for the function.
Changed some make_pair to bare pair for map insertion.
2021-10-05 22:04:12 +08:00
NovaRain e3cb0bbaf5 Fixed crash at the end of DS sound playback
* revert to the previous implementation.
2021-10-05 13:42:52 +08:00
NovaRain 9db8736033 Code corrections converge with 4.x 2021-10-04 13:06:13 +08:00
NovaRain 932a9f37a3 Improved the rendering performance of DX9 modes
Code edits and preparation.
2021-10-01 12:28:33 +08:00
NovaRain 95a10758ae Added the ability to set custom names for unarmed attacks
Updated Translations.ini template.
Commented out empty exit function in some modules.
2021-09-27 10:38:00 +08:00
NovaRain b6f559755f Minor code edits to the previous commit 2021-09-26 07:35:55 +08:00
NovaRain 759ef35432 Added the display of actual damage for unarmed attacks in inven 2021-09-25 20:19:48 +08:00
NovaRain 334957d458 Backported Unarmed module and UnarmedFile option from 4.x 2021-09-23 10:43:38 +08:00
NovaRain 76e78fb2be Minor edits to code and project file 2021-09-22 11:20:10 +08:00
NovaRain 1ee2e5eeda Added a tweak to keep the selected attack mode for unarmed attacks
* was reset when the inventory is closed or the combat ends.
2021-09-20 11:20:14 +08:00
NovaRain b7ef4a6aed Added Polish translation (from JaidenIsPink) 2021-09-17 21:57:19 +08:00
NovaRain 73e17ddbef Some code edits and preparation 2021-09-17 10:55:54 +08:00
NovaRain 4ed512855e Added a fix to display the color index 255 of the palette correctly
* in DX9 mode when using the hi-res patch

Some minor code corrections.
2021-09-12 14:41:08 +08:00
NovaRain 95a03d7429 Code corrections 2021-09-07 06:38:42 +08:00
NovaRain 7d7cb9d84e Added missing sounds for the buttons on the world map interface (#373)
Changed the game speed tweak to be active only during the game.
2021-09-06 10:57:10 +08:00
NovaRain d498c86d65 Fixed key repeat delay/rate for game speed tweak (#406)
Removed AffectPlayback option.
2021-09-06 08:12:58 +08:00
NovaRain 806cc765bb Added an additional '"Can't Use" flag to misc flags in item objects
* it makes the weapon object unusable in combat.

Updated gl_npcarmor script.
Edits to header files and hookscripts.md.
2021-09-03 21:30:12 +08:00
NovaRain edc2755ef6 Fixed the Jet addiction was not removed when using the antidote (#405)
(BGforgeNet/Fallout2_Restoration_Project#118)
2021-08-29 10:27:52 +08:00
NovaRain 8ab0e57e58 Replaced *(TYPE*)FO_VAR with new inline functions 2021-08-27 22:26:50 +08:00
NovaRain cb73f4da47 Moved some patches/functions between Interface.cpp and MiscPatches.cpp
* And Graphics.cpp and InputFuncs.cpp.

Tweaked the buffer flush (actually print to file) rate in Console.cpp.
2021-08-27 21:11:13 +08:00
NovaRain be9aeae57a Code edits to Console.cpp 2021-08-25 12:42:23 +08:00
NovaRain 0d0f105ff2 Added support for the newline character '\n' in pro_*.msg files (#401)
(from Crafty)
2021-08-25 09:54:28 +08:00
NovaRain fc1e4e2ac4 Some code edits 2021-08-24 14:22:47 +08:00
NovaRain 4f9fec281e Changed SingleCore to set CPU affinity to the second core if available
Added missing code changes from the previous commit.
2021-08-23 16:15:15 +08:00
NovaRain c7e29b5d01 Replaced HRP addresses with the define values
Refactored get_attack_type opcode.
2021-08-23 15:10:27 +08:00
NovaRain c0737d9bea Fully implemented the new ai_check_drugs function
Added an additional 'Healing Item' flag to ext flags for item protos.
Added new EngineTweaks files and TweaksFile option.
Internal fix for HOOK_REMOVEINVENOBJ.
2021-08-23 10:15:51 +08:00
NovaRain 42d79aec0b Fixed ai_check_drugs for AIDrugUsePerfFix=1 (unimpl.) 2021-08-21 07:53:41 +08:00
NovaRain 90a7b20f9d Fixed a crash when opening a file whose name contains the '%' char
Code edits to ai_check_drugs implementation to converge with 4.x
2021-08-19 13:41:28 +08:00
NovaRain 9091690fdd [Untested] Added a fixed implementation of ai_check_drugs_ function
* which has all fixes/hook built-in.
2021-08-17 12:36:49 +08:00
NovaRain a4b7ac76a0 Added FadeBackgroundMusic option 2021-08-13 20:13:36 +08:00
NovaRain 6b34303268 Code edits to ExtraSaveSlots.cpp
* the page numbering is now 0-indexed, to better align with the macros.

Re-numbered save slot control metarules.
2021-08-13 10:58:55 +08:00
NovaRain cc29d548fe Changed the implementation of AutoQuickSave
* now it sets the number of pages used for quick saving.

Added related macros for controlling the save slot with scripts.
2021-08-12 15:24:13 +08:00
NovaRain 25b8933d7b Improved the page control for ExtraSaveSlots
Minor edits to ddraw.ini.
2021-08-11 14:11:59 +08:00
NovaRain e3b524dd3c Added AutoSearchSFX option for automatic search of SFX files
Excluded ANIM_walk from the debug log about missing critter art files.
2021-08-08 22:42:56 +08:00
NovaRain 077774fad0 Minor edits to the previous commit 2021-08-06 00:55:28 +08:00
NovaRain 7f8356a5c1 Fixed the main menu music stopped when entering load game screen
Added the ability to continuously play the music when moving to another
map that uses the same music.

Updated version number.
2021-08-05 14:18:20 +08:00
NovaRain cabb98949e Removed the extra AP check when AI reloads a weapon
(reloading is possible if there are not enough action points.)
2021-08-01 07:13:46 +08:00
NovaRain 8b0913c36b Updated the documents in the previous commit 2021-07-07 09:28:53 +08:00
NovaRain 3bac160395 Added markdown version of compiler documents 2021-07-05 10:02:58 +08:00
NovaRain fa694be6ac Added Brazilian Portuguese translation
(from Felipefpl)
2021-06-28 12:17:18 +08:00
NovaRain f51e9c8ef5 Updated french.ini (from HawK-EyE) 2021-06-26 23:09:12 +08:00
NovaRain 82539365a8 Fixed the algorithm for sorting the quest list (#397) 2021-06-21 06:09:32 +08:00
NovaRain a6b555bafc Fixed black screen after starting a new game w/o HRP (#395) 2021-06-20 08:40:03 +08:00
NovaRain f3e30ea0d5 Fixed item duplication bug in HOOK_INVENTORYMOVE (#396)
Code edits to Animations.cpp regarding locking anim slots.
Updated version number.
2021-06-20 02:07:07 +08:00
NovaRain 0b185a2022 Fixed code in Animations.cpp for commit 7bf1067 (#393, #394) 2021-06-10 08:41:33 +08:00
NovaRain 83a44f27b9 Minor code edits to BugFixes.cpp 2021-06-09 21:12:44 +08:00
NovaRain 74cfcaed77 Code edits to ReplacementFuncs and engine defines 2021-06-09 11:19:46 +08:00
NovaRain b3a91c673a Fixed chem_primary_desire values not being saved correctly for PMs 2021-06-08 13:26:02 +08:00
NovaRain 8a226b3139 Fixed infinite loop in combat with AIDrugUsePerfFix 2021-06-08 07:07:27 +08:00
NovaRain 34367efc62 Fixed friendly fire check not running for unset area_attack_mode 2021-06-07 06:58:55 +08:00
NovaRain 7bf106751f Disabled the improved implementation of animation registration
(for release build)

Updated version number and Russian translation file.
2021-06-06 09:19:17 +08:00
NovaRain 6885fcc2c0 Merged win2k build into release build 2021-06-06 09:14:21 +08:00
NovaRain f7a1bd604f Some edits to documents
Removed txt version of arrays, hookscripts, and function notes.
2021-06-01 11:08:15 +08:00
NovaRain 493485724b Minor code edits 2021-06-01 09:53:04 +08:00
NovaRain 3f001f2235 Added a debug message about missing combat object 2021-05-30 12:14:01 +08:00
NovaRain f9a61d62ef Fixed incorrect object type search when loading a game saved in combat 2021-05-29 10:37:46 +08:00
NovaRain dd016eac21 Added markdown version of function notes and opcode list 2021-05-28 22:14:23 +08:00
NovaRain f9b6fce195 Code edits to converge with 4.x 2021-05-28 11:42:38 +08:00
NovaRain 043d790a75 Removed "proto_exists" function in previous commit
Added macro for checking pid.
2021-05-26 08:48:06 +08:00
NovaRain 989feb1c65 Added "proto_exists" script function
Updated gl_auto_closebox example script.
2021-05-25 12:58:03 +08:00
NovaRain b931307ace Changed the placement algorithm for multihex critters
(Rewrote the fix in the previous commit.)
2021-05-23 09:11:19 +08:00
NovaRain eebaf80bda Fixed the placement of multihex critters in the player's party 2021-05-23 08:09:12 +08:00
NovaRain 6ed83ce9fd Fixed infinite loop in ObjCanSeeObj_ShootThru_Fix (#365) 2021-05-22 08:05:06 +08:00
NovaRain fdfb4c3a17 Corrected code for initializing attached script (create_object_sid, #378) 2021-05-19 10:19:38 +08:00
NovaRain 86e71738b9 Rewrote the fix for clearing floating text messages (#377) 2021-05-19 06:23:17 +08:00
NovaRain b55a09fb17 Fixed typos in hookscripts.md & sslc_readme.txt 2021-05-18 11:32:01 +08:00
NovaRain 0cecf9af17 Corrected code in Animations.cpp 2021-05-17 10:46:03 +08:00
NovaRain cc715e334a Implemented an improved animation registration process 2021-05-16 13:11:36 +08:00
NovaRain b0f108c89f Fixed value bounds for the redefined key code value in HOOK_KEYPRESS
Minor code & document edits.
2021-05-15 21:57:10 +08:00
NovaRain ac3a23ae0e Code edits to Animations.cpp to prepare new implementation
Added fill area truncation to win_fill_color.
2021-05-13 12:04:46 +08:00
NovaRain 4ec67526a4 Fixed setting the last script window when the mouse leaves (#376) 2021-05-12 10:41:23 +08:00
NovaRain 3a45d016af Rewrote the code in Animations.cpp
Fixed gl_auto_closebox not closing containers in some cases.
2021-05-11 10:43:21 +08:00
NovaRain 2cb2ebc9c9 Renamed gl_npcarmor script to gl_npcarmor_lite
Improved the version check in gl_highlighting_lite and gl_npcarmor_lite.
2021-05-09 19:59:49 +08:00
NovaRain 8c09223812 Code correction to two previous commits 2021-05-09 08:49:19 +08:00
NovaRain 45a268ee77 Enabled AI to use unarmed attack when switching weapons
Added build folders to gitignore.
2021-05-08 23:16:14 +08:00
NovaRain 2d2c13b35e Moved item_count function fix to ReplacementFuncs.cpp
Finished the code of item_weapon_mp_cost replacement.
2021-05-08 13:03:52 +08:00
NovaRain 075922aa33 Added a tweak to play "magic hands" anim when using items on objs
* for issues with scripted animations not playing (#356)
2021-05-07 15:49:47 +08:00
NovaRain b2c2a70822 Set idle(Sleep) function for losing window focus
Some code correction.
2021-05-06 10:43:40 +08:00
NovaRain 273f2b8e97 Added additional code to "duplicate obj_dude script data" fix 2021-05-04 12:42:39 +08:00
NovaRain 91afb6c5f1 Reverted the change of obj_under_cursor in 3.8.29 (commit 2d7ff1e)
The game window position is now also saved when dragging the window by
the title bar.
2021-05-02 12:09:53 +08:00
NovaRain 81046daa9d Adjusted how the fix for create_object_sid works
Added CreateObjectSidFix option.
2021-05-02 11:59:51 +08:00
NovaRain afc0cdd4c8 Rewrote the score calculation in AIBestWeaponFix (#370)
Changed FastShotFix to be disabled by default.
2021-04-29 12:48:03 +08:00
NovaRain 8b61f358e3 Backported FemaleDialogMsgs and DialogGenderWords options 2021-04-27 14:49:12 +08:00
NovaRain 5a375484c4 Reverted the calling convention of db functions to stdcall
* due to the glitched code generation in Tiles.cpp.

Reverted the name changes of some variables.
2021-04-26 21:52:11 +08:00
NovaRain 55000ca940 Added DisableSpecialAreas option
Added a new "fonts" folder for language specific fonts.
2021-04-25 11:50:12 +08:00
NovaRain 4ce513f42f Added language path for loading fonts (#368)
Some code fixes to support the language path.
2021-04-25 08:36:36 +08:00
NovaRain c34b910e9c Code correction regarding string length 2021-04-23 11:06:06 +08:00
NovaRain 0c47dfd068 Added language path for sfall translations.ini 2021-04-22 13:17:04 +08:00
NovaRain 6c2eb47957 Added language path for premade files (#368)
Added AppIface.msg file support to Hero Appearance mod.
2021-04-22 12:56:48 +08:00
NovaRain f721596434 Code edits to converge with 4.x 2021-04-19 14:22:29 +08:00
NovaRain 0731325585 Fixed and improved AllowLargeTiles option (#367)
Removed the unspent skill points limit.
2021-04-18 20:17:24 +08:00
NovaRain e9aa1f1762 Added a new value to AIDrugUsePerfFix 2021-04-14 16:24:43 +08:00
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
NovaRain 4b2056857b Reformatted critical table fixes in Criticals.cpp 2020-11-01 09:28:31 +08:00
NovaRain 031faa4ae9 Fixed the "uncalled" critical tables for some critter types
ref: https://www.nma-fallout.com/threads/219827/
2020-10-30 22:00:43 +08:00
NovaRain e1cec4b01d Code refactoring for a few script functions
* draw_image, draw_image_scaled, interface_art_draw, get_sfall_global_int/float
2020-10-28 21:24:15 +08:00
NovaRain 66b3ee7b46 Cosmetic: renamed all module Init() and Exit() 2020-10-27 11:41:44 +08:00
NovaRain 061a3925e6 Minor edits to Message.cpp/h 2020-10-27 00:54:29 +08:00
NovaRain c6fa6bac30 Cleaned up define_lite.h and command_lite.h
Improved/corrected the fix for function args in commit e59af7e8.
Minor code edits.
2020-10-26 11:25:31 +08:00
NovaRain 0988004245 Fixed the error handling in win_fill_color
Some code fixes.
2020-10-25 08:07:49 +08:00
NovaRain e59af7e88a Fixed function args not being reset properly
Removed redundant safeguard/manual arg init in various script functions.
2020-10-25 01:05:34 +08:00
NovaRain 7cf1b60b38 Backported the extended functionality of ExtraGameMsgFileList from 4.x 2020-10-24 21:23:04 +08:00
NovaRain a8919367ea Added "win_fill_color" script function 2020-10-24 13:54:43 +08:00
NovaRain 0a44f7118a Added support for drawing PCX images to draw_image, draw_image_scaled, and interface_art_draw
Fixed bug in TalkingHeads.cpp.
2020-10-24 00:55:40 +08:00
NovaRain cda56aca7d Fixed the macro guard in command_lite.h and added two macros 2020-10-21 22:36:59 +08:00
NovaRain 761124aaf4 Code edits to PartyControl.cpp 2020-10-18 07:15:57 +08:00
NovaRain 8e6a961fba Renamed elements in PerkInfo/TraitInfo structs
Implemented StatFormula struct from 4.x for Stats.cpp.
Implemented DudeState struct from 4.x for PartyControl.cpp.
2020-10-15 13:12:15 +08:00
NovaRain cca0fe0cb6 Fixed and improved the code in Graphics.cpp 2020-10-15 09:30:39 +08:00
NovaRain 180761c489 Added the ability to change the poison level for critters 2020-10-12 20:47:05 +08:00
NovaRain 540b68070b Corrected code in Arrays.cpp 2020-10-12 11:03:55 +08:00
NovaRain 466b79f5e8 Code optimization for array expression (from 4.x) 2020-10-11 10:55:58 +08:00
NovaRain b1f847afbc Code edits to Graphics.cpp according to 4.x changes
Minor edits to MetaruleExtender.cpp and notes.txt.
2020-10-11 01:09:31 +08:00
NovaRain 31fbddb612 Code correction in FalloutEngine.cpp
Updated global shader example files.
2020-10-09 08:57:46 +08:00
NovaRain 0c547da134 Backported "car_gas_amount" and "set_car_intface_art" functions from 4.0
Added prefixes to some functions (fake classes)
2020-10-08 22:14:32 +08:00
NovaRain cc5561d3d6 Updated example mod scripts 2020-10-08 15:34:41 +08:00
NovaRain 66ff811bcd Added "combat_data" script function
Added a new argument to HOOK_COMBATDAMAGE.
Removed the check for valid objects from get/set_object_data functions.
Some code fixes/edits.
2020-10-08 13:50:37 +08:00
NovaRain 27963fd064 Fixed broken Print() script function
Fixed the background image of the character portrait on inv/char screens.
Renamed "print_text" to "interface_print".
2020-10-06 11:48:31 +08:00
NovaRain dc88193ff6 Added "print_text" script function 2020-10-05 21:05:06 +08:00
NovaRain 2c36ad9a2a Removed InterfaceDontMoveOnTop from ddraw.ini (always enabled)
Added a fix to prevent toggling the cursor for a Transparent window.
2020-10-05 10:26:39 +08:00
NovaRain 9d34a4c70a Added support for transparent interface windows (#25) 2020-10-03 21:01:54 +08:00
NovaRain 548039d5bc Fixed FrmFile struct in the previous commit
Finished the code refactoring in InterfaceOps.hpp.
2020-09-29 09:04:27 +08:00
NovaRain 49c4bb2479 Some code refactoring
Added a value of 2 to TextureFilter option.
2020-09-28 12:07:12 +08:00
NovaRain 75b275159f Added "interface_art_draw" script function
Added an argument to "intface_redraw" function to redraw all interfaces.
2020-09-26 22:17:59 +08:00
NovaRain 52f42af913 Changed the behavior of saving/restoring hook arguments
(no need to specify the number of args when executing a nested hook)
Reverted the change of argCount in some hooks.
Disabled an obsolete fix for MultiHexPathingFix.
Simplified the code of draw_image/draw_image_scaled script functions.
2020-09-25 00:12:22 +08:00
NovaRain b195a8ab02 Moved all engine function defines to new FalloutFuncs_def.h
(similar to the way how 4.x handles engine functions)

Added the ability to get Automap window pointer.

Reorganized some code to prepare for later commits.
2020-09-24 15:22:32 +08:00
NovaRain 796e834a9d Some edits to the previous commit
Minor edits to some code.
2020-09-23 23:07:45 +08:00
NovaRain df4e847c59 Changed argCount to be set right after HookBegin in some hooks
* to avoid possible unexpected issues.
2020-09-23 15:33:42 +08:00
NovaRain 0a48ed3048 Added a new argument to HOOK_TOHIT (#339)
Added hook type 3 to HOOK_WITHINPERCEPTION (when AI selects a target)

Extended the upper limit of set_pickpocket_max and set_hit_chance_max
script functions to 999.

Added a fix for combat_is_shot_blocked_ not taking the flags of critters
in the line of fire into account.

Minor edits to ASM code of some hooks.
2020-09-22 22:16:57 +08:00
NovaRain 7414c8a361 Refactored ASM code of some hooks using 4.x as ref
Code edits to DisplayKarmaChanges.
Implemented the buf_to_buf_ replacement function from 4.x.
2020-09-21 21:22:21 +08:00
NovaRain 90a9ee5f15 Added loading multiple shader files for GlobalShaderFile option
Added a sharpen filter file as a global shader example.
Set TextureFilter to be enabled by default.
2020-09-21 13:03:05 +08:00
NovaRain 314100f231 Added TextureFilter option (restored from sfall 2.x) 2020-09-20 10:07:16 +08:00
NovaRain 9c92e2f487 Reorganized the function defines in FalloutEngine.cpp/h
* in the same way as 4.x's Functions_def.h.

Replaced some ASM blocks with function defines.
2020-09-19 21:34:14 +08:00
NovaRain 2d3a4d6c34 Corrected talking heads code of Use32BitHeadGraphics
Minor code correction.
2020-09-19 00:39:55 +08:00
NovaRain a936f35c80 Refactored code in Elevators.cpp to be like 4.x 2020-09-16 14:25:21 +08:00
NovaRain 3479bc6893 Backported KeepWeaponSelectMode from 4.x
Minor edits to code and documents.
2020-09-16 11:09:55 +08:00
NovaRain ff1aac40f5 Fixed temporary arrays being cleared when flushing the keyboard buffer (#337)
Added a message about failed initialization of the game and exit if an error occurs.
2020-09-15 11:34:26 +08:00
NovaRain 6142d95a60 Graphics: improved the performance of DX9 mode 2020-09-15 10:33:33 +08:00
NovaRain c4fc3d2c8b Graphics & Movies refactoring (WIP/unfinished) 2020-09-13 22:33:30 +08:00
NovaRain 40cca2452d Reverted part of changes in commit 0d5c88f
* InterpretGetValue could cause unexpected behavior in global scripts.
2020-09-13 18:37:55 +08:00
NovaRain 33a5c7428a Updated Ammo INI Loader example script mod
* now the INI will be read only once on script initialization, not
always being re-read on each map load.
2020-09-10 14:55:11 +08:00
NovaRain 55e935e18c Added the original Fallout 1 behavior to FastShotFix 2020-09-06 08:45:17 +08:00
NovaRain 398ad650b9 Added a fix to the weapon check in the Fast Shot trait
* changed range check to type+range check, the same fix is also applied
to FastShotTraitFix.

Added more info to the description of FastShotFix option.
2020-09-05 10:47:53 +08:00
NovaRain 9c7f34ffb2 Fixed typo in sfall.h (#334) 2020-09-03 21:06:01 +08:00
NovaRain 6a2a7ee82f Fixed EncounterTableSize option (#333)
* the encounter messages were still limited to 50 entries per table when
the value for encounters is set to greater than 50.

Fixed building the path to multihex objects.
2020-09-03 14:24:00 +08:00
NovaRain 849ae49bfb Tweaked the field of view check in ObjCanSeeObj_ShootThru_Fix
And fixed a bug when the target critter has the ShootTrhu flag set
(cannot be seen by the source)

Minor edits to some comments in previous commit.
2020-09-02 14:21:57 +08:00
NovaRain ed9c6c7508 Added support for ACM audio file playback to soundplay script function
(with volume control)

Added a volume control to reduce the volume for play_sfall_sound.
Added descriptions and constant defines to documents.
Some code optimization.
Updated version number.
2020-09-01 16:12:00 +08:00
NovaRain 57f4deb5cf Minor edits to Interface.cpp and ddraw.ini 2020-08-22 10:51:07 +08:00
NovaRain c6da5169b8 Minor edits to HookScripts.cpp based on 4.x changes 2020-08-21 12:57:03 +08:00
NovaRain 72f3abe3c9 Moved DeathScreenFontPatch code to Interface.cpp
Added a note about DeathScreenFontPatch in ddraw.ini.

Some code edits in BugFixes.cpp and DamageMod.cpp.
2020-08-21 12:42:46 +08:00
NovaRain 5d12d815dd Added DeathScreenFontPatch option
* use the normal font instead of bitmap font for death screen subtitles.

Attempted to fix the melee damage display for some extreme cases when
BonusHtHDamageFix=1 and DisplayBonusDamage=0.
2020-08-20 13:48:41 +08:00
NovaRain 502a5764a5 Updated global.fx and withinperception example script
Fixed some code.
2020-08-19 15:21:53 +08:00
NovaRain 13976a5278 Added a fix to limit the maximum distance for knockback animation
* 20 hexes at max. This does not affect the knockback value in
Combat Damage hook, only the animation part.

Backported AlwaysFindScripts option from 4.x for global scripts.
2020-08-18 13:45:49 +08:00
NovaRain a35487d0aa Added a fix to prevent the player from leaving the map during death anim
* when the death animation causes the player to cross an exit grid.

Fixed the height of the black background for the subtitles on death
screens when using the hi-res patch.

Added MakeJumps template to SafeWrite.h and devlog_f to Logging.cpp.

Minor code edits.
2020-08-17 15:11:16 +08:00
NovaRain f1102afbc3 Fixed the use of #pragma pack() directives for structures 2020-08-16 11:15:37 +08:00
NovaRain 4071a65f73 Replaced all 'DWORD' script pointers with the proper 'TProgram*'
Added more engine function wrappers.
2020-08-15 10:02:36 +08:00
NovaRain 8d813a952e Fixed and improved the behavior of nested timer events in global scripts
Added a fix to prevent the execution of critter_p_proc and game events
when playing movies.

Added a debug message about a corrupted proto file.

Some minor code/document edits.
2020-08-14 21:31:06 +08:00
NovaRain c1b7e729a8 Reorganized KeyPress hook & related code
* now it should work in exactly the same way as 4.x.

Improved the key press behavior for Debug Editor.
Implemented ScriptListInfoItem struct from 4.x.
2020-08-14 00:39:09 +08:00
NovaRain 12070f5e3d Fixed the playback of additional movies defined in the MovieXX options (#330)
Added the keyboard buffer cleanup function to metarule3.
2020-08-13 15:22:20 +08:00
NovaRain 63b2025468 Added the city name in the description of a save slot by default
Corrected some code.
2020-08-13 14:44:09 +08:00
NovaRain 44ad268aed Added a fix to remove floating text after moving to another elevation
* also update black edges of the map (HRP bug, #282)
2020-08-09 12:29:15 +08:00
NovaRain 2305128adc Changed the behavior of ObjCanSeeObj_ShootThru_Fix
* now the critter can only see through objects in front of it.
2020-08-08 11:52:17 +08:00
NovaRain 112c931ea3 Added a patch to allow setting custom colors for object outlines
Added a tweak to ObjCanSeeObj_ShootThru_Fix to allow critters to see
through other critters.

Fixed the internal variable for Horrigan encounter always being reset if
DisableHorrigan=0 (commit 74d3cb9)

Corrected some code.
2020-08-05 16:18:19 +08:00
NovaRain 8e3ae04aec Changed the behavior for replacing art aliases for critters
Added ANIM_charred_body/ANIM_charred_body_sf animations to art aliases
(#323)

Minor code edit to OverrideMusicDir (nop the rest to avoid leaving
garbage bytes)

Renamed some functions in Worldmap.cpp.
2020-08-03 14:41:43 +08:00
NovaRain 89ec203483 Corrected combat_attack_gcsd code in the previous commit
Added DAM_PRESERVE_FLAGS to attack_complex for keeping result flags.
Fixed OverrideMusicDir=2 not working.
2020-08-02 19:48:04 +08:00
NovaRain 21cbcb4a03 Rewrote several fixes for attack_complex in C++ and merged them
Added a default fix for attack_complex to untie target_results from
attacker_results.
2020-08-01 10:27:18 +08:00
NovaRain 76c9d63d3e Added more fixes for the arguments of attack_complex function:
* fixed result flags for the attacker and the target when calling
attack_complex function (#323)

* tweaked how attacker_results/target_results work when
AttackComplexFix is enabled.

Minor code edits.
2020-07-31 20:42:46 +08:00
NovaRain 962e7f0056 Added support for delayed speech playback to AllowDShowSound
(for synchronizing with subtitles when playing endgame slideshow)
2020-07-30 10:42:08 +08:00
NovaRain 950b9949c0 Added a new value 2 to AllowDShowMovies
* for forcing avi videos to fit the screen width.

Disabled warning C4995 (e.g. wcscpy in Movies.cpp)
Minor code edits to AI.cpp & Sound.cpp.
2020-07-29 14:20:04 +08:00
NovaRain 648bffedc6 Added volume control support for avi movies
Fixed implementation bugs when playing avi movies.
Added a couple of engine variable pointers.
2020-07-28 17:08:44 +08:00
NovaRain 058cc0bb96 Further implementation of speech playback for alternative sound files 2020-07-26 08:53:31 +08:00
NovaRain 9e79b01a27 Added a function extension for vanilla metarule3 function
Added SET_HORRIGAN_ENCOUNTER function to metarule3.
Updated German translation.
2020-07-24 21:29:54 +08:00
NovaRain 37e3ccb410 WIP: Fixed sfx/speech playback for alternative sound files 2020-07-22 12:27:18 +08:00
NovaRain 82db339ff9 Implemented CodeType enums in some SafeWrite8
Replaced some SafeWriteX with SafeWriteBatch.
Misc code edits to DebugEditor.cpp and ScriptExtender.cpp.
Minor edits to documents.
2020-07-21 12:42:46 +08:00
NovaRain 74d3cb9707 Removed some redundant code 2020-07-19 08:56:42 +08:00
NovaRain e0f0ee0f7d Fixed the default values for the MovieXX options
Added some comments to elevators.ini & other codes.
Rearranged the functions in NewGame2().
Updated FalloutEngine.h for previous commit.
Updated version number.
2020-07-18 22:28:22 +08:00
NovaRain 107335749f Implemented union in TGameObj struct (from 4.x)
Moved some code from HeroAppearance to other parts.
Some code edits.
2020-07-18 10:50:49 +08:00
NovaRain c66add00e7 Added more 4.x constants to Define.h
Renamed some members in structs according to 4.x namings.
2020-07-16 11:10:48 +08:00
NovaRain d4d8b3a06c Uploaded language translation files to repo
Updated German (#326) and Russian translations.
2020-07-08 09:54:08 +08:00
NovaRain fcd3bd05f0 Fixed NPC stuck in an animation loop in combat (#321)
* this happens when trying to move close to a multihex critter.
2020-07-01 09:49:37 +08:00
NovaRain ae6a6e80d3 Fixed ASM error in the previous commit 2020-06-30 15:49:53 +08:00
NovaRain c0557ddbc1 Fixed broken PlayIdleAnimOnReload option (#320)
(in commit aafc030)

Improved the fix for incorrect positioning after exiting small/medium
locations.
2020-06-30 12:31:49 +08:00
NovaRain 46dd02b566 Fixed the code for "display_stats" script function
Minor edit to Perks.cpp.
2020-06-29 23:03:41 +08:00
NovaRain 4c3f255915 Added a fix to prevent showing an empty perk selection window 2020-06-29 12:56:27 +08:00
NovaRain de01fdf065 Added "get_stat_max/min" script functions (#307)
Added updating player's stats on the char screen to "display_stats"
script function (#314)
2020-06-29 11:57:36 +08:00
NovaRain 1e6d2229dd Corrected the code for multihex retargeting tile
Small optimization to sfall function code.
2020-06-28 23:13:05 +08:00
NovaRain 317c4d4c05 Re-fix for the previous commit 2020-06-28 09:53:33 +08:00
NovaRain 31b244e5f3 Corrected the fix from the previous commit 2020-06-27 10:16:14 +08:00
NovaRain 066280a7ca Fixed the hang/freeze in combat (from commit b345140)
Added a fix for retargeting tile for multihex critters.
2020-06-27 09:48:20 +08:00
NovaRain 535595a997 Refactored some code in HeroAppearance.cpp 2020-06-14 10:41:57 +08:00
NovaRain 41b15b8838 Fixed bugs in the hero appearance mod:
* gender was not reset properly when creating a new character (#309)
* the player was missing some fire/electrical death animations (#310)
2020-06-14 09:29:53 +08:00
NovaRain 2cd79c1033 Moved static addresses into respective funcs in Stats.cpp 2020-06-13 00:26:31 +08:00
NovaRain cc9807344a Fixed Auto Doors example script mod
Cosmetic changes to the text descriptions in Perks.ini.
2020-06-13 00:20:48 +08:00
NovaRain 6c31cc43a0 Increased the max width of the player name on the char screen (#305)
Updated version number.
2020-06-04 06:40:57 +08:00
NovaRain b345140fba Some bug fixes regarding multihex critters in shoot blocking 2020-05-24 11:33:06 +08:00
NovaRain 3acf051b49 Renamed all metarule functions with mf_ prefix 2020-05-21 09:42:02 +08:00
NovaRain 0137504f3f Renamed all script opcode handlers with op_ prefix 2020-05-19 10:05:27 +08:00
NovaRain ebcd505561 Minor code fixes in AI.cpp:
* Fixed NPCs being unable to select a burst attack mode if the line of
fire was blocked.

* Changed the return point of combat_ai_hook_FleeFix to run
ai_check_drugs_ first.

Changed the debug message about missing art file for critters to be
displayed in game only when in sfall debugging mode.
2020-05-19 09:50:23 +08:00
NovaRain 24cb02b7d8 Fixed ai_move_away_ engine function
Some minor fixes.
2020-05-10 10:03:04 +08:00
NovaRain 48ce358451 Backported SkipLoadingGameSettings option from 4.x 2020-05-08 10:38:32 +08:00
NovaRain c293a826bc Cosmetic changes to the code:
Use double underscore for stdcall and "asm" keyword.
2020-05-07 12:30:22 +08:00
NovaRain 0da7c7b266 Minor code edits to Combat.cpp 2020-05-07 11:20:32 +08:00
NovaRain d74df7fc78 Added checking AP cost to ai_pick_hit_mode_ engine function 2020-05-07 09:49:57 +08:00
NovaRain df816bcd47 Added a tweak for finding new targets for PMs
* before they would "forget" their current target when trying to find
new ones (only 3), now the current target is included as one of
potential targets.

Tweaked the code of MultiHexPathingFix.
2020-05-05 12:15:30 +08:00
NovaRain 068988caad Added internal implementation of engine functions with hooks:
* item_w_mp_cost_ with CALCAPCOST
* is_within_perception_ with WITHINPERCEPTION
2020-05-01 10:29:27 +08:00
NovaRain 24c9499021 Added combat rating check to "Snipe" distance preference fix
Added a fix to reduce friendly fire in burst attacks.
Updated the info of TGameObj struct.
2020-05-01 08:01:24 +08:00
NovaRain 7f3de8d19a Minor code edits/fixes 2020-04-30 10:28:31 +08:00
NovaRain 87f7fe4a54 Moved code from main.cpp to new PlayerModel/MiscPatches.cpp 2020-04-28 12:43:54 +08:00
NovaRain 01ba18100e Added a fix for AI behavior for "Snipe" distance preference
Added a check for for the weapon range and the distance to the target
when AI is choosing weapon attack modes.
2020-04-28 10:58:24 +08:00
NovaRain 8b26573073 Changed the fix for AI target selection in commit f0f00a7
* NPCs will reload the weapon in the same turn (and attack if have
enough AP left) if weapon is empty while selecting targets.

Moved some leftover code in main.cpp to KillCounter.cpp & Elevators.cpp.

Misc code edits.
2020-04-27 14:32:39 +08:00
NovaRain 1839790dfb Fixed AllowDShowSound=2 not working
Limited NumSoundBuffers to the max of 32.
Fixed replacing Body_Torso with Body_Uncalled (from commit 62f890d)
Corrected the code in the previous commit.
2020-04-23 12:42:20 +08:00
NovaRain cb1d5d359f Added a tweak to the miss message in combat
* if the main target has Flat flag set, remove the message about hitting
another object.

Reorganized the code of misc patches in main.cpp.
2020-04-22 11:40:11 +08:00
NovaRain b781e117a2 Improved the fix for placing PID_CORPSE_BLOOD obj on the lower layer
(didn't work correctly after re-entering the map.)

Fixed CorpseDeleteTime not setting the timer correctly.
2020-04-21 10:55:56 +08:00
NovaRain a7d9716b68 Moved some engine structs to FalloutStructs.h
Some code edits regarding variable/struct types.
2020-04-20 12:06:13 +08:00
NovaRain cdd2bfe338 Reverted incorrect code change of SpeedPatch.cpp in previous commit.
Some code edits to Explosions.cpp and Perks.cpp.
2020-04-19 10:21:20 +08:00
NovaRain 7decec4a2c Added use_item_on_dude macro to sfall.h
Various code edits:
* Implemented more HookCalls/MakeCalls/SafeWriteBatch in code.
* Moved return/jump address consts into their respective functions.
2020-04-18 21:25:54 +08:00
NovaRain e3af4f5754 Fixed ReloadWeaponKey for using any non-weapon item (#84) 2020-04-18 11:25:46 +08:00
NovaRain 1b61bca702 Fixed "loot_obj" script function 2020-04-18 09:03:16 +08:00
NovaRain f0f00a77ea Fixed AI target selection for no ammo or target out of range cases 2020-04-18 09:01:29 +08:00
NovaRain 58d41487fd Re-fixed automatically ending combat
Updated version number.
2020-04-18 08:59:28 +08:00
NovaRain 73ccba22bf Implemented HookCalls/MakeCalls templates
* same as SafeWriteBatch, only accept address arrays due to no support
for list initialization in VS2010.
2020-04-11 08:19:32 +08:00
NovaRain 1f8b3636f3 Implemented SafeWriteBatch template from 4.x
* only the version that accepts address array due to no support
for list initialization in VS2020.
2020-04-08 10:42:59 +08:00
NovaRain b7e80d445e Fixed NPCs not fully reloading a weapon sometimes
* NPCs use only one box per reload. If the weapon has more ammo
capacity than a box of ammo (e.g. miniguns and BB gun), it'll take
several tries for them to fully reload it.
2020-04-05 08:25:00 +08:00
NovaRain e404684f58 Reverted the change for ResetState() in 993555
* reason: the skills didn't get initialized properly if loading a save
from the main menu before starting any game. And some inits in 3.8
also require running ResetState() before any game, so reverting is
probably the easiest solution before I break more stuff.

Backported some code setup from 4.x for Combat.cpp & Skills.cpp.
2020-04-04 18:06:04 +08:00
NovaRain 4c78ba595c Moved static addresses into respective funcs in BugFixes & main.cpp 2020-04-03 23:19:10 +08:00
NovaRain 1f1d6eb6f0 Some code correction in BugFixes
Minor edits to documents.
2020-04-03 12:33:48 +08:00
NovaRain 9935553bce Reduced unnecessary game reset execution 2020-04-02 23:20:04 +08:00
NovaRain cd4d3b5b2f Some code/document edits 2020-04-02 12:00:52 +08:00
NovaRain a61ff5b626 Edited the description of RadEffectsRemovalMsg option 2020-04-01 22:10:55 +08:00
NovaRain bc2e8e4362 Backported the code of DeathAnim1/2 hook from 4.x
Updated hookscripts.txt to reflect the change.
2020-04-01 10:57:54 +08:00
NovaRain 136404a723 Fixed loading savegame for "NPC turns into a container" bug fix
Added RadEffectsRemovalMsg option for radiation fixes.

Some code correction in Graphics.cpp.
2020-03-31 21:54:49 +08:00
NovaRain 1a17ac5ac8 Added ActiveGeigerMsgs option and radiation fixes
Changed "Radiated" to be highlighted in red color when the player is
under the influence of negative effects of radiation.

Some edits to macros in HookScripts.cpp.
2020-03-30 21:15:19 +08:00
NovaRain 07543dd29d Fixed a crash when using older versions of HRP
Fixed potential crash/bug when alt-tab out of game and get back.
Edited OnDeath hook to minimize its hook points to the engine (from 4.x)
Minor edits to ddraw.ini.
2020-03-26 14:13:22 +08:00
NovaRain 4243bead5d Attempted to fix the crash with sfall array and missing script (#281)
Replaced all pushad/popad in script opcodes with pushaop/popaop macros.
2020-03-25 20:22:54 +08:00
NovaRain f80e933889 Rewrote some script functions in PerksOps.hpp
* funcs: get_perk_available, set_perk_name/desc, set_selectable_perk,
set_fake_perk/trait.

Minor code refactoring in ObjectsOps.hpp.
2020-03-25 12:26:26 +08:00
NovaRain 7cbde234c6 Rewrote various script functions in _WRAP_OPCODE
* funcs: reg_anim_*, sqrt, sin, cos, tan, arctan, get/set_weapon_ammo_*,
list_*, strlen, atoi, atof, typeof, string_split.
2020-03-24 12:12:34 +08:00
NovaRain f6ae7c5f2c Fixed stuttering when playing avi movies
Fixed a crash when playing mve movies without the hi-res patch.

Minor edits to ddraw.ini and function notes.txt.
2020-03-24 10:55:28 +08:00
NovaRain 58060a8c5f Simplified the pushad/popad in _WRAP_OPCODE macro
Refactored ASM code of art_exists and sneak_success functions.
Rewrote set_critter_current_ap and set_sfall_arg with _WRAP_OPCODE.
2020-03-23 13:52:28 +08:00
NovaRain 22140e2a0c Added performance patches, some code moved to main.cpp
Minor edits to ddraw.ini.

Tweaked the names in AsmMacros.h.
2020-03-22 09:27:24 +08:00
NovaRain 1c6f8cc255 Refactored sfall_ver_* and charcode functions 2020-03-20 12:32:05 +08:00
NovaRain e479609581 Added a new "fullscreen windowed" DX9 mode
Added saving the position of the game window to ddraw.ini
2020-03-20 12:30:41 +08:00
NovaRain ab11c0422a Refactored ASM code of script opcode handlers
Included call_offset_xx functions for AllowUnsafeScripting=2
2020-03-19 12:57:19 +08:00
NovaRain 09752c98a4 Attempted to fix the crash in commit 0ba3b62
* the crash happens when the game loses focus.
2020-03-17 14:48:50 +08:00
NovaRain aab04764ae Added a new value to AllowUnsafeScripting
* for disabling the memory address check in write_xxx unsafe functions.
2020-03-17 13:39:05 +08:00
NovaRain 0ba3b62eff Improved and fixed the playback of alternative sound files
Added a new mode to play_sfall_sound script function.
2020-03-17 13:08:47 +08:00
NovaRain 0c0d1dd73e Fixed the return value of play_sfall_sound function
* before it returned a raw pointer instead of the ID number of the
played sound.
2020-03-12 11:58:48 +08:00
NovaRain 0fd45aa37a Moved allowDShowSound code from Movies.cpp to Sound.cpp 2020-03-12 10:06:56 +08:00
NovaRain 00a6e4f0f9 Fixed set_palette function broken in the previous commit 2020-03-10 10:07:59 +08:00
NovaRain 36ef55ddd0 Refactored ASM code of script handlers in MiscOps.hpp
Minor code edits.
2020-03-07 16:02:23 +08:00
NovaRain db2435416d Minor code edits 2020-02-29 18:59:44 +08:00
NovaRain 0120e46782 Added a new value to the 'mark_state' arg of mark_area_known function
* 3 - uncovers locations without highlighting their sub-tiles.
(Fallout 1 behavior)
2020-02-29 08:40:45 +08:00
NovaRain eddefd6bd5 Fixed Fill_W not uncovering all tiles to the left (#287) 2020-02-28 07:43:14 +08:00
NovaRain f9cbab3d55 Fixed a crash or animation glitch of the critter in combat (beta fix)
* when an explosion from explosives and the AI attack animation are
performed simultaneously.
2020-02-25 11:38:43 +08:00
NovaRain e3168946ba Minor code fix for Graphics.cpp
Added notes/correction to hookscripts.txt.
2020-02-22 15:50:06 +08:00
NovaRain 8bb660ff11 Fixed the player's money not being displayed after barter (#286)
Restored TownMapHotkeysFix option.

Updated version number.
2020-02-22 15:37:36 +08:00
NovaRain 8a7d9cbd78 Re-ordered the code in ScriptExtender.cpp
* for removing some unnecessary static func declarations at the top.

Moved Set/GetAppearanceGlobals() to HeroAppearance.cpp like 4.x.
2020-02-10 22:22:02 +08:00
NovaRain 008fdb12b7 Minor code improvement in Graphics.cpp 2020-02-09 09:29:43 +08:00
NovaRain 3609f2e309 Renamed dinput.cpp/input.h to InputFuncs.cpp/h 2020-02-08 11:59:00 +08:00
NovaRain 517c2e6825 Updated stdafx.h and other code/doc files 2020-02-08 08:48:02 +08:00
NovaRain 4bc687922a Reverted part of changes in the previous commit 2020-02-07 19:17:24 +08:00
NovaRain 5230ca9cbf Edited some wording in ddraw.ini and Define.h 2020-02-07 10:05:59 +08:00
NovaRain 5a5c65291d Fixed trying to loot corpses with the "NoSteal" flag (#280) 2020-02-06 10:52:19 +08:00
NovaRain e153819bcd Added the description for 'div' operator to notes.txt 2020-02-05 23:21:15 +08:00
NovaRain 8ab5b9b7e7 Replaced all MAXINT with INT_MAX in QuestList.cpp (#279)
Added WINVER and _WIN32_WINNT defines to stdafx.h.
2020-02-05 16:18:51 +08:00
NovaRain abe3b01213 Fixed playing game movies with width less than 640px in DX9 mode
Fixed palette updating.
2020-02-05 09:47:25 +08:00
NovaRain 15019ffe81 Some code edits to ExtraSaveSlots.cpp 2020-02-04 16:28:21 +08:00
NovaRain eacd1e5682 Moved engine function defines from HeroAppearance to FalloutEngine 2020-02-04 10:55:09 +08:00
NovaRain 84204d97d8 Simplified the code in HeroAppearance.cpp 2020-02-03 11:23:20 +08:00
NovaRain 3b85596ca1 Renamed all Op.hpp to Ops.hpp 2020-02-02 21:54:10 +08:00
NovaRain 21bf1056ac Added DivisionOperatorFix option for signed integer division (#278)
* it changes the behavior of vanilla division operator to use signed
integer division. Before it used signed division for floats but
unsigned for integers.

Added a new "div" operator for unsigned integer division.
Moved mathematical script functions from ScriptUtils.hpp to new MathOps.
Added include guard to sfall.h and main.h in modders pack.
2020-02-02 21:49:54 +08:00
NovaRain 1354467059 Fixed the barter button on the dialog window (from rotators repo)
* when first entering the dialog, it didn't animate on click.
2020-02-02 15:44:47 +08:00
NovaRain 8d720185a7 Reverted part of changes in previous commit 2020-02-02 13:50:01 +08:00
NovaRain 87864d9ef6 Fixed palette in DX9 mode 2020-02-01 14:08:46 +08:00
NovaRain 0d5c88fded Implemented the optimization for receiving/passing script args from 4.x
* combined related engine interpreter functions into a single function
for aligning the compiled ASM code better.

Minor edits to dinput.cpp.
2020-01-31 20:29:29 +08:00
NovaRain 555b3a9504 Fixed the timer event execution in global scripts 2020-01-31 01:41:25 +08:00
NovaRain f8cd74cc49 Minor changes to some other code and documents. 2020-01-31 01:23:32 +08:00
NovaRain 408661f42b Rewrote and rename "dialog_box" to "message_box"
Added support for '\n' control character to create_message_window.

Fix the playback of the speech sound file for the death screen.
2020-01-28 13:14:58 +08:00
NovaRain 893847cc6a Added "dialog_box" script function
Added a new attrType value to "get_window_attribute" function.

Tweaked the arg type check for "force_encounter_with_flags" function.
2020-01-27 20:52:01 +08:00
NovaRain 6b1fffded1 Fixed the timing of setting some game mode flags
* now WORLDMAP, PIPBOY, INVENTORY, INTFACEUSE, and INTFACELOOT are
toggled after creating/before deleting their corresponding interface
windows.

Fixed the array out of bounds bug in Skills.cpp.
2020-01-27 10:42:51 +08:00
NovaRain 3b2e23fda6 Backported FO1 worldmap features from 4.x
* WorldMapTravelMarkers, WorldMapTerrainInfo options.
* set_terrain_name, set_town_title script functions.
2020-01-26 09:26:41 +08:00
NovaRain c9b1a1b583 Edited FalloutEngine using 4.x's EngineUtils & Variables_def as ref 2020-01-25 18:01:55 +08:00
NovaRain d13cd9267d Reordered ResetState() sequence in LoadGameHook.cpp
* in the same order as 4.x modules.

Merged and renamed some "reset" functions.
2020-01-24 22:38:55 +08:00
NovaRain 5a638f48ff Added some engine variables to pointer defines.
Removed redundant PlayAcm() from HeroAppearance.cpp.
2020-01-24 10:03:39 +08:00
NovaRain df1d147a4f Removed TownMapHotkeysFix from ddraw.ini (always enabled)
Also move its code from Worldmap.cpp to BugFixes.cpp.
2020-01-23 23:34:21 +08:00
NovaRain e733954e65 Removed DisplaySecondWeaponRange from ddraw.ini (always enabled)
Minor edits to some code and documents.
2020-01-23 20:35:18 +08:00
NovaRain 36b3b6a2c7 Added "get_window_attribute" script function (#276) 2020-01-22 21:23:12 +08:00
NovaRain ceba5d1da2 Added a flashing icon to the Horrigan encounter
Minor edits to some code and documents.
2020-01-22 10:27:11 +08:00
NovaRain d6486008f4 Expanded the functionality of Fallout1Behavior
* calling endgame_movie now plays Movie11 or Movie12 depending on
the player's gender before the credits.

Added new flags to force_encounter_with_flags function.
2020-01-21 21:40:36 +08:00
NovaRain 9f140cf3ca Added a blinking icon to force_encounter/with_flags functions
* currently an icon is always shown for scripted force encounters.
2020-01-20 11:51:17 +08:00
NovaRain f2670deb6f Minor edits to Console.cpp and Logging.cpp
Added procedure and macros for unsigned integer comparison to lib.math.h.
2020-01-19 12:20:18 +08:00
NovaRain 6e6e01ea7f Simplified the code of string_to_case function
Minor edits to some code and documents.
2020-01-17 21:56:12 +08:00
NovaRain dccd735454 Improved the avi playback function 2020-01-17 21:48:54 +08:00
NovaRain 21004e3e63 Combined tolower/toupper in previous commit to "string_to_case" 2020-01-16 20:35:49 +08:00
NovaRain d12db2be28 Added "tolower", "toupper" script functions 2020-01-16 09:46:27 +08:00
NovaRain 3d335231a2 Replaced <hash_map><set> with <unordered_map><unordered_set> 2020-01-10 21:33:32 +08:00
NovaRain d4eb1ee539 Moved the Combat Block patch from AI.cpp to Combat.cpp
Removed palette animations enablement from Interface.cpp.
2020-01-10 11:12:34 +08:00
NovaRain 61c0964c98 Moved engine func defines from various files to FalloutEngine.cpp
(HeroAppearance.cpp, Message.cpp, Sound.cpp)
2020-01-09 22:36:58 +08:00
NovaRain 58532fd902 Fixed duplicate critters being added to the target list for AI
Edited hookscripts.txt to mention the fix.

Some code correction.
2020-01-09 11:41:50 +08:00
NovaRain aafc030f8e Code refactoring in main.cpp (from MiscPatches in 4.x)
Updated compiler document.
2020-01-08 16:59:07 +08:00
NovaRain c652982a06 Added sslc documents to repo 2020-01-06 14:14:22 +08:00
NovaRain 1e0b048e9e Re-fixed setting DIALOG game mode flag 2020-01-06 00:19:36 +08:00
NovaRain 28dc256f61 Fixed the timing of setting DIALOG game mode flag
Renamed win_* related functions in FalloutEngine.

Minor code edits to Inventory & Worldmap following develop branch.
2020-01-05 10:05:39 +08:00
NovaRain 18e1e06d28 Merged message struct defines in Inventory.cpp & Message.cpp
Changed GetMessageStr() and MsgSearch() to take proper MSGList struct.

Edited some code to reflect the changes above.
2020-01-04 01:21:48 +08:00
NovaRain 6871e6f673 Minor edits to Worldmap.cpp & Interface.cpp (from 4.x) 2020-01-02 00:43:13 +08:00
NovaRain 9ef670161d Reverted the change on x offset in previous commit 2019-12-29 08:42:08 +08:00
NovaRain c26cd45b5b Increased the width of the total weight display in the inventory
(moved from the CritterInvSizeLimitMode option)

Minor format edits to README.md.
2019-12-29 01:58:02 +08:00
NovaRain 0b5c61cb72 Backported AutoQuickSave and AutoQuickSavePage options from 4.x
Updated version number and year.
2019-12-28 09:27:45 +08:00
NovaRain 11261ca9be Merged db_* engine function defines in HeroAppearance and Tiles
Edited both source files according to new defines.
2019-12-28 09:14:12 +08:00
NovaRain 4d435ca143 Backported WRAP_WATCOM_CALL macros from 4.x for engine function defines 2019-12-28 09:03:27 +08:00
NovaRain 35d9b9439c Included Define.h in FalloutEngine.h
* it removes the need to include Define.h separately across the code.
(similar to Fallout2.h in 4.x code)

Added StrNormalizePath() to Utils.cpp.
2019-12-25 09:25:36 +08:00
NovaRain a1968f7f86 Minor edits to the built-in item highlighting function
Removed the redundant struct define in Tiles.cpp.

Added a comment to ScriptUtils.hpp.
2019-12-24 20:58:03 +08:00
NovaRain 85a5ee2a52 Some edits to hookscripts.txt & function notes.txt 2019-12-24 00:57:16 +08:00
NovaRain 310c392759 Added lootable corpses to the built-in item highlighting 2019-12-23 21:22:15 +08:00
NovaRain 3a24d0bdfd Replaced _stricmp in previous commit with strcmp.
Minor edits to Inventory.cpp.
2019-12-16 15:46:09 +08:00
NovaRain a9ad1a62eb Tweaked the path to load global shaders in the previous commit
* although 3.8 doesn't have the path issue as 4.x due to the lack of
loading custom .dat, it's better to unify the path in this case.

Refactored the code for DataLoadOrderPatch in the same way as 4.x.
2019-12-15 10:31:50 +08:00
NovaRain d73859fa5f Applied proper ptr_patches to some code 2019-12-14 11:41:43 +08:00
NovaRain 04043989c6 Restored loading global shaders at game start from pre-3.0
Added GlobalShaderFile option to ddraw.ini.
Added an example global shader file to modderspack.
Minor edits to HeroAppearance.cpp.
2019-12-14 11:05:12 +08:00
NovaRain 3b82232b46 Edited the description of the functions in the previous commit
Rewrote ASM code for tile_under_cursor script function.
2019-12-14 00:35:05 +08:00
NovaRain 5e704d206f Added "objects_in_radius" and "tile_by_position" script functions 2019-12-13 10:56:15 +08:00
NovaRain 5e65510797 Rewrote the code of some hook in 4.x style
* TOHIT, AFTERHITROLL, REMOVEINVENOBJ
2019-12-11 15:55:29 +08:00
NovaRain b4dac84ddd Rewrote some script functions in ObjectsOps in C++
* remove_script, set/get_script, set_critter_burst_disable.

Changed the return value of get_script to 0 for unscripted objects.
2019-12-09 11:07:40 +08:00
NovaRain cbc822c9e0 Minor edits to code 2019-12-07 09:56:43 +08:00
NovaRain 6cc68ed3de Re-fixed the previous commit
Replaced calling full substring with a simplified one for get_array.
2019-12-05 09:49:07 +08:00
NovaRain 6d4aea216b Fix for printing game messages to debug log 2019-12-04 13:07:04 +08:00
NovaRain 569790acb2 Code refactoring for ASM code in opcodes 2019-12-04 11:37:44 +08:00
NovaRain 7016690f99 Added "string_format" script function
Rewrote ASM code of opcode handlers in MemoryOp.hpp.
2019-12-03 10:52:56 +08:00
NovaRain eeb97a4299 Some code refactoring 2019-12-01 12:10:33 +08:00
NovaRain 66c237d297 Refactored the code for "substr" script function
* fixed the crashing bug and added a new behavior.

Changed the error message due to missing critter frame (again):
* replaced the interruption with printing the error message to in-game
message window.
2019-11-29 12:13:36 +08:00
NovaRain 3629c90fa9 Simplified _RET_VAL_INT2 in AsmMacros.h (from dev)
Changed related ASM code in various script functions.

Minor refactoring on some script functions.
2019-11-29 12:10:08 +08:00
NovaRain 1f99855500 Changed the error msg due to missing critter frame
* now the game only "crashes" when both Enable and DebugMode are
enabled in [Debugging] in ddraw.ini.
2019-11-28 14:43:00 +08:00
NovaRain cdf0bdf23e Refactored script function handlers
Changed error return values of list_begin/next to the same as dev.
2019-11-28 14:42:07 +08:00
NovaRain 2c67058016 Code refactoring for opcodes/metarules
* added proper arg validation for some opcodes using WRAP_OPCODE macro.
* changed return values of some opcodes/metarules to be the same as dev.
2019-11-28 10:24:40 +08:00
NovaRain 29f0affd72 Re-fixed commit e62b5c0 (correct variant) 2019-11-26 07:49:31 +08:00
NovaRain e01569637d Backported additional check in DialogHook from 4.x
Renamed inLoop/saveInCombatFix variables in LoadGameHook.cpp.
2019-11-25 09:58:12 +08:00
NovaRain 78f0ac473d Restored calling original engine functions from HRP hacks. 2019-11-25 07:29:29 +08:00
NovaRain bbe9a2d26d Added "get_text_width" and "string_compare" script functions
Rewrote set_dm/df_model, set_movie_path functions with WRAP_OPCODE.
2019-11-23 20:32:57 +08:00
NovaRain 7bcb76e70c Restored and fixed RemoveWindowRounding option
Reorganized ddraw.ini a bit.
2019-11-21 00:58:41 +08:00
NovaRain 3348d8b716 Backported "draw_image" and "draw_image_scaled" functions from 4.1 2019-11-19 20:51:22 +08:00
NovaRain 4767ad2753 Fixed a crash bug in CorpseLineOfFireFix (from commit d9a440f)
Minor edits to HookScripts/FalloutEngine.
2019-11-19 14:27:19 +08:00
NovaRain 04ebbaa182 Added three new script window functions:
"show_window", "hide_window", "set_window_flag"

Updated documents.
2019-11-17 08:40:18 +08:00
NovaRain 3c5dc6853a Added "get_sfall_arg_at" script function
Improved the functionality of "inventory_redraw" function.
2019-11-16 22:54:09 +08:00
NovaRain a70a776e46 Tweaked/fixed reg_anim_callback function 2019-11-15 10:01:39 +08:00
NovaRain 83c3d6b1a8 Added "reg_anim_callback" script function(opcode)
Updated documents.
2019-11-14 13:02:10 +08:00
NovaRain 6a566087ca Implemented executing timed_event_p_proc in sfall global scripts
Added "add_g_timer_event" and "remove_timer_event" script functions
for timed_event_p_proc in global scripts.

Fixed the check on the 'hidden' flag for previous commit.
2019-11-11 10:01:38 +08:00
NovaRain e62b5c03db Added a fix for scripted interface windows
* prevents player's movement when clicking on the window.

* the mouse cursor will not be toggled when the cursor hovers over
a hidden window.

Updated version number.
2019-11-10 18:24:43 +08:00
NovaRain 29da6d7071 Minor edits to FalloutStructs.h
Removed unnecessary AfterAttackCleanup on reset in LoadGameHook.cpp.
Fixed Debug build configuration in project file.
2019-11-05 09:27:41 +08:00
NovaRain ec4a58e19e Updated define_extra.h
Added define of OBJ_DATA_SCRIPT_INDEX to define_extra.h.
Moved Stats related reset code from ScriptExtender.cpp to Stats.cpp.
2019-11-04 21:28:06 +08:00
NovaRain b023999c5e Updated script mods. 2019-11-03 10:10:11 +08:00
NovaRain ee711d8f81 Added "get_inven_ap_cost" script function 2019-11-02 10:26:28 +08:00
NovaRain d26a06872a Backported the advanced BarBoxes features from 4.x:
* Added BoxBarCount option.
* Added "set_iface_tag_text" and "add_iface_tag" script functions.
* Now number of simultaneously displayed boxes depends on game res.
* Updated documents.
2019-11-01 21:14:03 +08:00
NovaRain c4f8912490 Added support for displaying item AP cost up to 19
* Requires an extended MVENUM.frm in the art\intrface\ directory to
display properly (will be included in modderspack).
2019-10-31 12:47:57 +08:00
NovaRain d9a440f667 Fixed PM's weapon being misplaced after level up
Moved some codes from Worldmap.cpp to new Interface.cpp (same as 4.x).

Moved some option codes from main.cpp to other modules.

Removed CorpseLineOfFireFix from ddraw.ini (always enabled).
2019-10-31 11:42:20 +08:00
NovaRain 49bc2d3241 Some code fixes/edits. 2019-10-29 10:45:46 +08:00
NovaRain d07603f1b0 Renamed AnimationsAtOnceLimit.cpp/h to Animations
Renamed SuperSave.cpp/h to ExtraSaveSlots (same as 4.x)
2019-10-28 09:51:20 +08:00
NovaRain 76346c24b3 Added a debug message about missing art file for critters 2019-10-25 10:24:40 +08:00
NovaRain dee3e2f596 Minor code edit to previous commit 2019-10-23 09:37:10 +08:00
NovaRain 648eb9b2f1 Engine now uses 'English' as the fallback language for all msg files 2019-10-22 15:56:04 +08:00
NovaRain fcbf4d3972 Cleanup in vcxproj file 2019-10-22 10:27:59 +08:00
NovaRain 3ef6056a77 Added "add_trait" script function
Replaced some C-style casting with pre-defined ptr_* variables.
2019-10-20 19:31:08 +08:00
NovaRain ac10bce231 Moved code from main.cpp to new LoadOrder/Karma.cpp
Slightly refactored list_* functions with 4.x codebase.

Changed the initialization order in main.cpp to 4.x's.
2019-10-18 11:15:10 +08:00
NovaRain 6780a21b07 Fixed amount argument for critter_add/rm_trait functions 2019-10-17 10:27:28 +08:00
NovaRain 25fabde434 Replaced GetPrivateProfileInt/String with wrapper functions
Fixed crash when a name in PremadePaths exceeds 11 characters.
2019-10-16 14:29:04 +08:00
NovaRain da7cd2a060 Implemented new ini reading funcs (part 2)
Refactored Premade.cpp, Reputations.cpp, KarmaFRMs in main.cpp, and
XPTable in Stats.cpp using 4.x implementation.
2019-10-15 21:57:49 +08:00
NovaRain 8924257aee Added a new flag to MainMenuFontColour option
* set bit 1 of the first byte to only change the color of version text
(old behavior)
2019-10-15 11:58:49 +08:00
NovaRain 90ef9e273d Implemented new ini reading funcs in various codes 2019-10-14 23:55:54 +08:00
NovaRain b447e8e9b8 Rewrote set_xp_mod function with WRAP_OPCODE.
Cleanup in ASM scripting handlers code.

Code edits to Perks.cpp and Stats.cpp.
2019-10-14 21:36:25 +08:00
NovaRain 3744c0b165 Added optional options to the perks ini file
* to toggle modification sections for perks and traits.

Backported ini reading functions from 4.x to main.cpp, and edited
related code in Perks.cpp (need to implement to other source later)

Added error/warning icons to message boxes.
2019-10-14 15:30:46 +08:00
NovaRain c98af496b3 Added command_lite.h header file to modderspack 2019-10-11 00:53:22 +08:00
NovaRain c7eaff7ff5 Fixed art_change_fid_num when the hero appearance mod is enabled
* before it set player's FID incorrectly if PC is in other appearance.

Prevented the player from equipping a weapon when player's current
appearance doesn't have the animation for it.

Fixed the player name while controlling other critters.

Edited texts for some error message boxes.
2019-10-10 12:00:30 +08:00
NovaRain 37acec7115 Added "unwield_slot" script function
Re-fixed obj_art_fid for player's FID (commit 36523d8)
2019-10-08 10:56:49 +08:00
NovaRain f6ec543f40 Fixed inven_unwield script function
* now it updates the interface slot for the player properly.

Fixed some code in PartyControl.cpp.
2019-10-07 13:34:35 +08:00
NovaRain 5cfd5f99e3 Moved object unique id code from ScriptExtender to new Objects.cpp/h
Backported set_unjam_locks_time function from 4.0.
2019-10-07 09:36:46 +08:00
NovaRain dafee58c77 Fixed arg1 of HOOK_INVENWIELD when calling move_obj_inven_to_obj
Moved get/set_proto_data functions from MiscOps.hpp to ObjectsOps.hpp.
2019-10-05 07:53:50 +08:00
NovaRain 4cf0c6688f Improved the implementation of HOOK_INVENWIELD
* it now runs for the player and NPCs when removing equipped items.
* added an additional argument.

Fixed drop_obj script function not removing the equipped armor properly
for the player and party members.
2019-10-04 22:04:05 +08:00
NovaRain 27ec2d24fe Fixed move_obj_inven_to_obj script function
* it didn't remove the equipped armor properly for the player and party
members, resulting in broken armor stats.

Added a check for valid objects to get/set_object_data functions.

Some code edits to HeroAppearance.cpp.
2019-09-30 07:51:43 +08:00
NovaRain e3a3ff2540 Improved file searching for hero appearance mod (#251)
* now it will search files in .dat files and folders simultaneously.

* files in folders have higher priority than .dat files.
2019-09-28 10:52:48 +08:00
NovaRain e6a51f965f Removed NPCStage6Fix from ddraw.ini (always enabled)
Moved the code of NPCStage6Fix to BugFixes.cpp.
(to its original relative location, right above MultiHexPathingFix)

Reorganized some code in BugFixes.cpp.

Tweaked the error printing for ResizeArray in Arrays.cpp.
2019-09-27 20:51:34 +08:00
NovaRain 552a2a185e Refactored code in Arrays.cpp and fixed save_array() script function. 2019-09-24 16:50:50 +08:00
NovaRain 04d47d10ad Some minor changes:
* Improved the display of the car fuel gauge on the world map interface.

* Expanded set_critter_stat function to allow changing STAT_unused and
STAT_dmg_* stats for the player, and STAT_unused for other critters.

* Changed AllowUnsafeScripting to not require sfall debugging mode.

* Changed NPCStage6Fix to be enabled by default.

* Added a new value to AIBestWeaponFix to change the priority multiplier
for having weapon perk to 3x.

Updated version number.
2019-09-24 16:01:39 +08:00
NovaRain 749e248c8b Changed CorpseLineOfFireFix to be enabled by default 2019-09-15 07:18:13 +08:00
NovaRain 52290b09d2 Removed duplicate code from intface_redraw_ engine function
Minor edits to code/documents.
2019-09-14 08:56:05 +08:00
NovaRain a6a8e2e42f Backported HEROWIN, DIALOGVIEW, COUNTERWIN game mode flags from 4.x
Updated UI hotkeys example mod.
2019-09-13 08:09:07 +08:00
NovaRain 9693c0d439 Added "register_hook_proc_spec" script function
Updated documents to address the new function.
2019-09-12 22:23:02 +08:00
NovaRain aa22575ec9 Backported optimization for global/hook scripts execution from 4.x 2019-09-11 13:18:20 +08:00
NovaRain 8f4fd1dec8 Fixed AllowLargeTiles option (broken in 3.8.18)
(due to commit f7fa62a)
2019-09-10 10:09:15 +08:00
NovaRain d26097e9ae Fixed some code in AnimationsAtOnceLimit.cpp
Renamed F1EngineBehavior option to Fallout1Behavior.
2019-09-10 06:53:48 +08:00
NovaRain 4bb9828f3e Added F1EngineBehavior option to change some of F2 engine funcs to F1
* disables playing the final movie/credits after the endgame slideshow.
* disables halving the weight for power armor items.

Moved FastShotFix and Ray's combat_p_proc fix from main.cpp to other
files.
2019-09-09 15:19:37 +08:00
NovaRain 2d2f539826 Added a call to load f2_res.dll library from sfall code
Fixed code that depends on HRP addresses in Tiles.cpp.
2019-09-08 10:46:53 +08:00
NovaRain 97bd2cee18 Changed CriticalOverrides.ini to be parsed only once at game start
* before the ini was always reparsed after each game load/reset. This
should improve the performance.
2019-09-07 21:24:19 +08:00
NovaRain 62f890d287 Removed the dependency of Body_Torso from Body_Uncalled hit modifier
Re-added BodyHit_Torso to ddraw.ini.
Reverted set_bodypart_hit_modifier function to pre-3.7.4 behavior.
2019-09-07 20:16:50 +08:00
NovaRain 4b28829983 Renamed Knockback.cpp/h to Combat.cpp/h and reorganized some code:
* Moved PickpocketMod to skills.cpp.
* Moved CheckWeaponAmmoCost to Combat.cpp.
2019-09-07 12:13:31 +08:00
NovaRain cbb739bd7c Added options for tweaking some engine perks to the perks ini file
Minor code edits to main.cpp and ObjectsOps.hpp.
2019-09-06 13:13:40 +08:00
NovaRain e00d02f1f0 Added a compute damage example script.
Updated compiled scripts due to main.h changes.
2019-09-01 11:38:34 +08:00
NovaRain c9e0feeb32 Increased the width of the car fuel gauge to 2px 2019-09-01 09:03:09 +08:00
NovaRain 272e58d873 Tweaked reordering the execution of functions before exiting the map
Added event clearing for active explosives before exiting the map.

Minor code edit to BARTERPRICE hook.
2019-08-31 20:01:51 +08:00
NovaRain 20cb24b385 Fixed some args in HOOK_BARTERPRICE hook when trading with PM
And added a new argument to indicate trading with a party member.

Refactored register_hook/register_hook_proc with _WRAP_OPCODE.
2019-08-27 22:31:10 +08:00
NovaRain 071581effc Replaced 'Take All' hotkey mod with UI hotkeys mod
Minor edits to code/documents.
2019-08-26 21:53:11 +08:00
NovaRain 155c14f4e7 Fixed player stuck at "climbing" frame after ladder climbing animation
Removed the previous fix about player's direction.

Minor code refactoring in AnimationsAtOnceLimit.cpp (from 4.x)
2019-08-25 10:25:30 +08:00
NovaRain c6d612f4a7 Added MainMenuBigFontColour option to change button text color
Changed the fix for player's direction after climbing ladder (61aa11)
2019-08-23 10:35:17 +08:00
NovaRain 61aa1104a1 Fixed player's position if entrance tile is blocked when entering a map
Fixed player's direction after leaving a map via ladder/stairs.

Fixed MainMenuFontColour not changing the font color for the copyright
text on the main menu (#261)

Code correction in main.cpp.
2019-08-22 13:32:18 +08:00
NovaRain 2bd8a6223d Added OverrideCriticalFile option for specifying alternative crit file
Added code for preparing clearing map_update_event in queue.

Fixed a crash bug in message_str_game function when passing a negative
fileId value.

Corrected/edited some code.
2019-08-20 16:47:37 +08:00
NovaRain 99bc47e3f8 Minor edits to Message.cpp and define_extra.h. 2019-08-17 20:56:48 +08:00
NovaRain 07ff16af75 Added an additional 'Energy Weapon' flag to ext flags in weapon protos
* it forces the weapon to use EW skill regardless of its damage type.

Placed an object with PID 0x5000004 (corpse blood) to the lower z-layer
of the tile.
2019-08-16 15:17:59 +08:00
NovaRain a7ea2a9a81 Set DAM_BACKWASH_ flag for attacker before calling combat damage (#246) 2019-08-14 14:36:35 +08:00
NovaRain 2bbb020a80 Fixed the lost car bug with using the Town/World button
(http://www.nma-fallout.com/threads/fallout-2-vehicle-bug.217993/)
2019-08-13 13:59:20 +08:00
NovaRain 81ba15d451 Rewrote the code of force_encounter functions
Added a new flag to force_encounter_with_flags.
2019-08-12 21:12:28 +08:00
NovaRain 36523d89e5 Fixed obj_art_fid for dude_obj when the hero appearance mod is enabled 2019-08-12 00:13:50 +08:00
NovaRain 53bb9ea5c7 Fixed create_message_window script function
* prevent it from creating multiple message windows.

Capped StartMonth/StartDay in case people didn't notice "0-indexed".
Minor fix for assigning an ID to objects when loading a map.
Small optimization for sfall gl/hs scripts.
2019-08-11 11:04:57 +08:00
NovaRain c0f9f142c4 Added a tweak for weapon perk modifier to AIBestWeaponFix
Minor edits to code/documents.
Updated version number.
2019-08-09 11:59:45 +08:00
NovaRain 8b9ffd08a8 Minor edits to ddraw.ini 2019-07-18 09:27:28 +08:00
NovaRain b26208141f Changed DebugMode to not require enabling sfall debugging mode
Changed version to 3.8.19.1 as maintenance release.
2019-07-17 10:10:28 +08:00
NovaRain 147382de25 Minor code edits to LoadGameHook, PartyControl, ScriptExtender.cpp 2019-07-16 13:01:44 +08:00
NovaRain 9529208c7c Fixed the error handling on loading sfallgv.sav
* to improve backward compatibility with older saved games.
2019-07-15 20:51:29 +08:00
NovaRain fc3b7180af Backported the code of COMBATDAMAGE hook from 4.x
Moved instadeath crit fix from COMBATDAMAGE hook to BugFixes.cpp.
Completed the compute_attack struct.
Updated version number.
2019-07-15 09:59:58 +08:00
NovaRain f53aa16923 Excluded Awareness from perks resetting in PartyControl.cpp 2019-07-14 10:46:56 +08:00
NovaRain ce19262283 Excluded barter mode for ItemCounterDefaultMax
Renamed GetCurrentLoops function to "GetLoopFlags".
Minor edits to document/code.
2019-07-10 11:05:28 +08:00
NovaRain e43762b45f Added assignment of unique IDs to items/critters for event queue
* to prevent event queue being added to the incorrect object on the map.
2019-07-09 21:50:46 +08:00
NovaRain ceb9c41e3d Changed the implementation of the bug fix in commit f1ef55d
Added additional fix for "NPC turns into a container" bug.
2019-07-09 10:50:00 +08:00
NovaRain 0aee36f77d Fixed bugs related to knockout/knockdown critters
Fixed knocked down critters not playing stand up animation when the
combat ends.

Fixed dead NPCs reloading their weapons when the combat ends.
2019-07-06 22:34:20 +08:00
NovaRain 9c41ddd243 Fixed the execution of functions before exiting map in commit f13e6bd 2019-07-06 01:57:09 +08:00
NovaRain f38d87e0ee Added KnockoutTime option to change the duration of the knockout effect.
Fixed op_lookup_string_proc_ engine function not searching the last
procedure in a script.
2019-07-04 12:11:00 +08:00
NovaRain 5fa418ae08 Added reassignment of IDs for critters upon first loading a map
* for fixing mapper not checking existing object IDs and generating
duplicated ones for new critters added on a map.
2019-07-03 15:13:46 +08:00
NovaRain c6c66a4b58 Added a check for the DAM_KNOCKED_OUT flag
to wield_obj_critter/inven_unwield script functions.

Added climbing ladders to "interrupted player's movement in combat" fix.
2019-07-03 12:14:23 +08:00
NovaRain feeae8c750 Added debug log entries to PartyControl.cpp as 4.x 2019-07-01 13:12:10 +08:00
NovaRain 58a67d58cb Added SkipOpeningMovies=2 to also skip the splash screen
Changed the order of some code in main.cpp.
Renamed IsDebug variable to "isDebug".
2019-06-29 20:11:53 +08:00
NovaRain 96881c19a3 Fixed combat not ending automatically when there are no hostiles. 2019-06-26 06:15:35 +08:00
NovaRain c18828b61b Changed DataLoadOrderPatch to be 1 by default.
Replaced most of NULL with nullptr, since VS2010 supports it.
Some code edits to MiscOps.hpp and ScriptUtils.hpp.
2019-06-24 12:25:32 +08:00
NovaRain b1e78bb61c Rewrote get/set_pc/critter_*_stat funcs in C++.
* this slightly improved their error handling.

Concentrated the error msg for invalid args of opcodes.
2019-06-23 11:23:42 +08:00
NovaRain bcb0228ed3 Fixed fade in/out of the screen in DX9 mode. 2019-06-18 09:27:39 +08:00
NovaRain a75e634c96 Fixed Scout perk being taken into account for mark_area_known function.
* technically it should only effect the visibility of tiles when you're
exploring on the world map.

Fixed the incorrect coordinates for small/medium location circles when
highlighting their sub-tiles (one of bugs listed in #228)

Moved the fix for the position of the target marker from Worldmap.cpp to
BugFixes.cpp.

Slightly adjusted the position/size for Local variables button in debug
editor.
2019-06-17 11:24:57 +08:00
NovaRain c4f6c762c4 Added viewing and modifying local vars for critters to the debug editor. 2019-06-15 10:09:50 +08:00
NovaRain 5ccd1534f4 Added "metarule_exist" script function.
Limited the maximum number of extra game msg files to 4096 (from 4.x).
Code edit to Message.cpp and ScriptUtils.hpp.
2019-06-14 23:32:01 +08:00
NovaRain 8e0190939e Minor edit to error messages in MiscOps.hpp. 2019-06-12 09:14:12 +08:00
NovaRain 0f7a8592a9 Fixed the interrupted player's movement in combat.
* it happens when the player try to use objects with Bonus Move APs
available. The distance has to be greater than remaining normal APs.

Replaced calling db_dir_entry_ with db_access_ in HeroAppearance.cpp.
2019-06-10 09:45:52 +08:00
NovaRain e9f3fd5039 Fixed the position of the target maker for location circles. 2019-06-09 11:35:30 +08:00
NovaRain 6cc988aef5 Fixed the reserve movement fix in commit f1ef55d.
* before the reserve movement didn't work correctly if the player has
free move AP (yellow, from Bonus Move) left.
2019-06-09 07:26:32 +08:00
NovaRain e50369c18d Fixed the up/down button images in the world map interface. 2019-06-08 23:56:20 +08:00
NovaRain f1ef55d22d Fixed anim_move_to_tile_ ignoring the distance argument.
* this also fixes the broken "reserve movement" feature.
2019-06-08 09:46:30 +08:00
NovaRain d1fe920cf7 Fixed a few bugs in WorldMapSlots option.
Updated version number.
2019-06-06 10:21:36 +08:00
NovaRain 9a331c918c Fixed a bug in knockback modifier functions that could crash the game (#237)
Updated version number.
2019-06-02 08:52:42 +08:00
NovaRain 56fd9706a4 Minor edit to gl_ammomod example script. 2019-05-31 09:11:25 +08:00
NovaRain b46892cb66 Improved the fix for the removal of PM corpses.
* to prevent save file corruption (one of bugs listed in #228). Now
party member's corpse is removed in the same way as all other critter
corpses.

Simplified the ASM code of combat_ai_hack (take 2).
2019-05-30 10:34:15 +08:00
NovaRain 7663a47fbb Fixed the code for removal of party member's corpse when loading the map. 2019-05-29 09:37:28 +08:00
NovaRain a9aeac1f6f Fixed AI not checking min HP properly for using stims.
Edited the code of InventoryApCost in Inventory.cpp.
Minor edits to some other code.
2019-05-28 11:18:11 +08:00
NovaRain 6db496e66c Code edits to Perks.cpp/PerksOp.hpp/ScriptExtender.cpp. 2019-05-27 12:10:34 +08:00
NovaRain daf6585ba3 Simplified the ASM code of combat_ai_hack. 2019-05-24 20:01:19 +08:00
NovaRain 1f6dac09b8 Rewrote the fix to allow fleeing NPC to use drugs.
Code edits to Perks.cpp/PerksOp.hpp.
2019-05-24 10:43:46 +08:00
NovaRain af6038ee0c Removed LoadProtoMaxLimit option from ddraw.ini.
* now the proto limit is always handled by set_proto_data function when
needed, since the related issue was originally from using it to process
lots of protos at once.
2019-05-23 17:06:40 +08:00
NovaRain 2c7548f164 Fixed getting perks/traits from the real dude_obj while controlling other NPCs.
Added "real_dude_obj" script function and updated documents.
2019-05-22 12:59:27 +08:00
NovaRain 301ccba45f Rewrote NPC fleeing fix.
Removed DialogOptions9Lines option from ddraw.ini.
2019-05-22 10:48:41 +08:00
NovaRain 899dc2422d Increased the max text width of the info card in the char screen.
* the increased the width is according to the max width of one char in
font (uppercase A seems to be the widest with 8 px).

Adjusted code format in Console.cpp.
2019-05-20 11:36:03 +08:00
NovaRain 0e69ef4af1 Added two fixes for NPC fleeing in combat.
* added fix to allow fleeing NPC to use drugs.
* fixed NPC stuck in fleeing mode when the hit chance of a target was
too low.
2019-05-19 15:40:21 +08:00
NovaRain f6d27b71aa Slightly simplified the code of NPCStage6Fix.
Moved NPCsTryToSpendExtraAP to AI.cpp.
2019-05-19 08:24:31 +08:00
NovaRain 520f939afa Improved the fix in previous commit.
* now ignoring the inv capacity only happens in combat for preventing
AI inf loop. The vanilla behavior still applies outside of combat.
* added a correct message for NPC not being able to pick up an item.
2019-05-18 11:09:04 +08:00
NovaRain fa1e5eddc9 Fixed two item pickup issues for NPC.
* message for the player is displayed when the NPC cannot pick up item.
* if in combat, NPC will also be stuck in a loop of picking up item.

Fixed HideObjIsNullMsg option.
2019-05-17 10:03:48 +08:00
NovaRain 3b8878e647 Implemented an ASM patch for Win2K build to remove VS2008 requirement.
* tested DX9 modes, hookscripts, and combat control in VM environment.

Removed Cpp11_emu.h file.
Replaced some define macros with enums.
2019-05-15 23:42:35 +08:00
NovaRain 5353ab0ad6 Backported the code of four hookscripts from 4.x.
* FINDTARGET, BARTERPRICE, WITHINPERCEPTION, and INVENTORYMOVE. For
unifying the behavior of common hooks between 3.8 and 4.x.

Added the example script of WITHINPERCEPTION from 4.x.
Updated gl_highlighting_lite.
2019-05-14 11:42:21 +08:00
NovaRain 20ffc39f95 Added a tweak to op_use_obj_on_obj_hack in BugFixes (from Mr.Stalin)
Minor edits to some code.
2019-05-14 06:41:13 +08:00
NovaRain 8482618291 Rewrote Ray's combat_p_proc fix.
Refactored the code of SwitchHandHook with backporting from 4.x.
Minor code edits.
2019-05-13 11:37:02 +08:00
NovaRain f7fa62a078 Refactored the code in Tiles.cpp.
Removed the font check in create_message_window script function.
2019-05-11 10:04:47 +08:00
NovaRain 1891612f38 Reverted the change in Tiles.cpp from previous commit. 2019-05-10 10:44:34 +08:00
NovaRain efe00b9faf Changed the names of FRM structures.
Fixed get FID type in Inventory.cpp.
2019-05-09 10:20:47 +08:00
NovaRain 2059a3da8c Backported 3 script functions from 4.1:
* dialog_obj, loot_obj, and npc_engine_level_up.
2019-05-08 21:04:18 +08:00
NovaRain ec3bc8c21c Moved Test_ForceFloats to [Debugging] section.
* Since it's never mentioned anywhere, should be OK moving it before
the formal release.

Minor code edits to Tiles.cpp.
2019-05-07 23:08:47 +08:00
NovaRain c1ec4057a6 Code edits on Graphics.cpp & ScriptExtender.cpp.
Minor edits on some other code.
Added the missing Test_ForceFloats option to ddraw.ini.
2019-05-07 14:04:36 +08:00
NovaRain 5d9008f407 Minor code edits on Graphics/Movies/TalkingHeads.cpp 2019-05-05 10:59:49 +08:00
NovaRain 64e4daeb02 Code refactoring in Arrays.cpp & ScriptArrays.hpp.
Added new example mods gl_ammomod & gl_highlighting_lite to modderspack.
Renamed Bugs.cpp to BugFixes.cpp.
2019-05-05 10:11:36 +08:00
NovaRain 40ed445956 Simplified the iterator in party member protos patch.
Added initialization and delete for repList, as in 4.x.
2019-05-03 10:14:00 +08:00
NovaRain cbd3964ae5 Moved worldmap related code from main.cpp to the new Worldmap.cpp. 2019-05-02 21:02:49 +08:00
NovaRain 34628c0ea5 Unset the read-only attribute for party member's .sav proto files
Slightly changed the implementation of previous commit.
2019-05-02 14:33:09 +08:00
NovaRain f2f260e743 Backported the patch for party member base protos. 2019-05-02 09:28:28 +08:00
NovaRain f13e6bd9f3 Reordered the execution of functions before exiting the map
* partyMemberSaveProtos and queue_leaving_map are now called after
executing map_exit_p_proc procedure.
2019-05-01 11:37:11 +08:00
NovaRain 8ef05d205a Fixed the argument value of dialogue_reaction script function 2019-04-30 11:18:42 +08:00
NovaRain 3c255085ed Replaced ASM code in various opcodes with macros (from Mr.Stalin)
Unified the directory separator in documents.
Updated version number.
2019-04-30 10:38:39 +08:00
NovaRain 7500e6b637 Updated set_unique_id defines in sfall.h. 2019-04-24 20:26:26 +08:00
NovaRain 560eead694 Rewrote Force Encounter script function code.
Changed set_global_script_repeat/type & set_self to use fastcall.
Minor edits to BugFixes.cpp and ddraw.ini.
2019-04-24 15:06:07 +08:00
NovaRain 45baeff397 Minor code edits to some opcodes. 2019-04-23 11:40:28 +08:00
NovaRain 2df1dfbadc Fixed and improved Use32BitHeadGraphics option:
* Fixed the position of the talking head texture when the game res is
larger than 640x480.

* Added the support to use textures without the need of patching
talking head FRM files.
2019-04-23 07:35:18 +08:00
NovaRain cbe31e845c Renamed heads/ddraw2 to TalkingHeads/Graphics.
Added necessary defines to prepare TalkingHeads backporting.
Some code edits to AI.cpp, MainMenu.cpp, movies.cpp.
2019-04-22 23:03:03 +08:00
NovaRain 2e2d3f7946 Renamed AmmoMod.cpp/h to DamageMod. 2019-04-19 09:24:17 +08:00
NovaRain 854adc2afc Reverted some changes in previous commit.
* Now weapons with knockback modifiers applied still stack with others
in the inventory.
2019-04-17 10:34:13 +08:00
NovaRain 0c8794661c Further implementation of unique ID.
* weapons with knockback modifiers applied will have a special ID
(negative value) that work as a temporary UID for the current game
session.

Added checks on object types to functions in Combat module.
Added the second argument to set_unique_id script function.
2019-04-16 20:53:41 +08:00
NovaRain ceb55cdfa9 Fixed the start procedure not being called correctly
* If the required standard script procedure is missing, the procedure
above the start proc is called instead of the start (from Crafty)

Added a id reversion mechanism to remove_weapon_knockback.
2019-04-15 13:04:15 +08:00
NovaRain 6791b15af1 Added "set_unique_id" script function.
Minor edit to Perks.cpp.
Added DevXP config to project files.
2019-04-14 07:35:52 +08:00
NovaRain ff4f5d7e73 Updated proto offsets in define_extra.h.
Minor edit to HookScripts.cpp.
2019-04-10 09:50:59 +08:00
NovaRain 564c48354a Backported the code of AmmoCost hook from 4.x.
* Mainly for fixing the issues with CheckWeaponAmmoCost. Because it's
easier to backport the whole set of code than working on the old
implementation. Shouldn't affect the performance much.

Also backported the CheckWeaponAmmoCost code from 4.x.
Updated hookscripts.txt to reflect the change.
Now the debug editor starts at the center of the screen.
2019-04-09 09:53:56 +08:00
NovaRain 4232be088c Fixed setting array values in the debug editor.
Some code corrections.
2019-04-06 08:31:14 +08:00
NovaRain 9ec8a12288 Added setting array values for the debug editor.
Updates to sfall debug editor (part 1)
2019-04-05 13:03:08 +08:00
NovaRain b97c5fd65d Updated sfall debug editor (from Mr.Stalin)
Formatted the code of sfall debug editor.
2019-04-04 10:37:09 +08:00
NovaRain 5c377ad3df Added support for the new 'automap=yes/no' parameter to maps.txt
* This parameter overrides the hardcoded values for displaying the map
in the pipboy automaps for the first 160 maps (from Mr.Stalin)
2019-04-03 22:10:19 +08:00
NovaRain 3c47288e70 Fixed "out of bounds" bug when printing the automap list. 2019-04-01 21:22:27 +08:00
NovaRain 5d7ee90f71 Fixed a duplicate obj_dude script being created when loading a saved game.
Added a fix to prevent the reserved object IDs of the player and party members from being generated for other objects.
Moved SkipOpeningMovies to movies.cpp.
Added log entries for various Init() functions in main.cpp.
Renamed timer.cpp/h to SpeedPatch.cpp/h.
2019-03-31 23:02:56 +08:00
NovaRain 6193afff11 Added DisableSpecialMapIDs option (from Mr.Stalin)
Fixed the overflow of the automap tables when the number of maps in maps.txt is more than 160.
2019-03-30 11:09:35 +08:00
NovaRain b4800361e6 Replaced the fix in the previous commit with a fix for unexplored areas being revealed on the automap when entering a map. 2019-03-28 12:03:28 +08:00
NovaRain 0debe89a27 Fixed player's position when entering a map.
This also fixed the issue with getting player's position in the map_enter_p_proc procedure.
2019-03-27 20:08:38 +08:00
NovaRain aae34d5d82 Fixed the argument numbering in error messages when validating arguments.
Changed BlockCall to use the long NOP.
Minor edits on some code.
Update version number.
2019-03-26 22:46:25 +08:00
NovaRain 26e814581f Changed hero_select_win function to require an AppHeroWin.frm file in the art\intrface\ folder (from Mr.Stalin) 2019-03-25 21:01:23 +08:00
NovaRain a62a4d6911 Added SpecialDeathGVAR option to override the global variable number for special death.
Minor fix for Stats.ini.
2019-03-17 10:38:32 +08:00
NovaRain 20746abba2 Fixed range for object ID.
Minor edits to documents.
2019-03-16 08:53:20 +08:00
NovaRain e11755cb2d Added CorpseDeleteTime option (from Mr.Stalin)
Fixed some functionality issues of fake perks.
2019-03-15 19:20:30 +08:00
NovaRain 83b0862db6 Fixed the removal of party member's corpse (from Mr.Stalin)
Now items in party member's inventory are not removed along with the corpse.
2019-03-14 13:44:38 +08:00
NovaRain 386b5a6678 Fixed critters not being healed over time when entering the map if 'dead_bodies_age=No' is set in maps.txt.
Added additional checks for the amounts to properly compare the effects of drugs.
2019-03-13 11:55:33 +08:00
NovaRain 5bd69dfee2 Tweaked the code of the fix in previous commit. 2019-03-13 00:09:46 +08:00
NovaRain a388a9e602 Fixed NPC stuck in a loop of reloading melee/unarmed weapons when out of ammo (from Mr.Stalin) 2019-03-12 11:50:22 +08:00
NovaRain 69bea44481 Fixed broken get_perk_available script function. 2019-03-11 11:31:36 +08:00
NovaRain e2fc1ee0ec Minor edits on Perks.cpp and related code. 2019-03-11 10:22:17 +08:00
NovaRain 912abbd213 Fix item_d_load_subfix in the previous commit. 2019-03-06 21:28:08 +08:00
NovaRain 653b419be6 Backported the fix of active drug pids from the develop branch. 2019-03-06 09:35:53 +08:00
NovaRain 4480ecfcad Tweaked the code of item_d_take_drug_hack in Bugs.cpp. 2019-03-05 12:41:51 +08:00
NovaRain 08b9d98d3b Fixed the screen not returning to the player when moving a controlled critter to another elevation of the map.
Refactored some code in Bugs.cpp.
2019-03-04 12:55:34 +08:00
NovaRain c20e709659 Moved RemoveCriticalTimelimits to Criticals.cpp. 2019-03-03 12:02:19 +08:00
NovaRain 68a345f398 Moved the code of set_map_time_multi to WorldmapOps.hpp, and NPCAutoLevel to PartyControl.cpp.
Removed validate_test example function from release builds.
2019-02-27 12:27:22 +08:00
NovaRain 730cd212a4 Fixed a crash bug when trying to use explosives if using a books ini file.
Fixed some bugs in BugFixes.cpp.
2019-02-25 23:54:47 +08:00
NovaRain ce0f5ea8c9 Added a new argument to REMOVEINVENOBJ hook (from Mr.Stalin) 2019-02-25 20:44:49 +08:00
NovaRain 2ce1c0f36e Fixed inconsistent return value of get_npc_level.
Some edits to documents.
2019-02-25 12:32:56 +08:00
NovaRain 72e370117e Expanded get/inc_npc_level functions to accept party member PIDs (from Mr.Stalin)
Some code correction in Skills.cpp.
2019-02-24 20:14:36 +08:00
NovaRain 6ab45bbc3c Fixed incorrect skill point cost for negative skill levels when using a skills ini file (from Mr.Stalin) 2019-02-23 22:21:37 +08:00
NovaRain 7bcf06c227 Fixed the negative skill points of a skill not being taken into account when calculating the skill level (from Mr.Stalin, #202)
Fixed the return value of has_skill function for incorrect skill numbers.
2019-02-21 10:57:53 +08:00
NovaRain bc8f7477c7 Fixed the reserved item FRM being displayed in the top-left corner when in the loot/barter screens. 2019-02-20 10:04:54 +08:00
NovaRain f5c570ddc1 Removed MultiPatches from ddraw.ini, now it's always enabled.
Minor edits to main.cpp and Arrays.cpp.
Updated version number.
2019-02-19 12:07:40 +08:00
NovaRain 504f66f002 Moved DontDeleteProtos option from main.cpp to DebugEditor.cpp.
Updated Auto Doors script mod from Mr.Stalin and ddraw.ini.
2019-02-11 13:59:37 +08:00
NovaRain 76f2301b6c Minor edits to speed tweak and documents. 2019-02-10 09:56:28 +08:00
NovaRain 4788ac757b Formatted code in Arrays.cpp and added checks for the integrity of sfallgv.sav when loading a saved game.
Fixed unregistering hook procedure.
2019-02-09 09:55:43 +08:00
NovaRain a71b33aab1 Fixed crash when saving the game with speed tweak enabled. 2019-02-09 08:09:25 +08:00
NovaRain 222f3eaf68 Refactored and fixed speed patch related code (from Mr.Stalin)
Rewrote ASM code of WorldMapFpsPatch functions.
2019-02-08 12:53:13 +08:00
NovaRain 823d2b92f7 Minor refactoring of ScriptValue and some script function handlers. 2019-02-06 12:00:30 +08:00
NovaRain f478e9a1f9 Changed sfall to stop loading save if there's error on data files.
Minor simplified a couple of assembly in LoadGameHook.cpp.
2019-02-06 09:33:02 +08:00
NovaRain 8718b86440 Refactored error handling of saving/loading sfall save data files. 2019-02-05 11:11:56 +08:00
NovaRain 67adb9b592 Revert the change of get_year code to pure assembly.
Minor edits to main.cpp.
2019-02-04 17:55:16 +08:00
NovaRain ca5781a44a Refactored world map related code/funcs in main.cpp (from Mr.Stalin)
Fixed TimeLimit option and removed the pointless value of -2 (now it works the same as -3).
Fixed the slow mouse cursor on the world map when WorldMapFPSPatch is enabled.
2019-02-03 09:32:16 +08:00
NovaRain 4edf36a1dc Removed some more unnecessary memset code.
Added note on effect flags to CriticalOverrides.ini.
2019-01-31 09:12:15 +08:00
NovaRain 4a5f556cd3 Removed some unnecessary memset code.
Minor code corrections.
2019-01-30 00:15:12 +08:00
NovaRain 2b7754746c Refactored code in Books.cpp.
Increased the maximum number of books in BooksFile to 50.
Moved scattered Cpp11_emu.h includes from various cpp files to main.h.
2019-01-29 11:11:03 +08:00
NovaRain 8a4a83c8f8 Added HideObjIsNullMsg option to [Debugging].
Moved DebugEditor option from MiscPatches.cpp to DebugEditor.cpp.
2019-01-27 10:43:54 +08:00
NovaRain c04df22c48 Added two bug fixes for loading a game saved in combat mode (from Mr.Stalin) 2019-01-27 09:22:03 +08:00
NovaRain 8e0ccc576c Fixed pickup_obj/drop_obj/use_obj script functions (from Mr.Stalin)
Fixed a crash when calling use_obj/use_obj_on_obj functions without using set_self in global scripts.
2019-01-25 00:31:23 +08:00
NovaRain 42566cc9da Added AttackComplexFix option (from Mr.Stalin) 2019-01-23 09:33:54 +08:00
NovaRain 9e1c68e78d Fixed bugs in attack_complex and critter_mod_skill script functions. 2019-01-22 17:06:36 +08:00
NovaRain 9765396b08 Fixed set_self function for use_obj_on_obj, attack, attack_complex vanilla functions (from Mr.Stalin) (#214) 2019-01-22 09:47:19 +08:00
NovaRain b008502e13 Added error message when the name for sfall global variable is not equal to 8 characters.
Fixed error in FileSystem.cpp from the previous commit.
Updated version number.
2019-01-21 13:55:42 +08:00
NovaRain d71efe5b82 Corrected code in FileSystem.cpp (from Mr.Stalin)
Added fix for db_freadInt_ engine function from BugFixes.cpp when enabling UseFileSystemOverride.
2019-01-20 22:16:38 +08:00
NovaRain 120888e5ed Added "art_cache_clear" script function. 2019-01-20 09:10:58 +08:00
NovaRain 7b5075042d Fixed and refactored code in FileSystem.cpp (from Mr.Stalin) 2019-01-20 00:20:51 +08:00
NovaRain 12ad41043d Refactored ASM code in FileSystem.cpp (from Mr.Stalin) 2019-01-17 10:10:38 +08:00
NovaRain e509932add Added support for returning integer values to abs math function.
Minor code refactoring in Skills.cpp.
2019-01-16 11:38:49 +08:00
NovaRain ba3ad33587 Fixed a bug that broke the calculation of the skill point cost for increasing skill levels (#226)
Updated version number for hot fix.
2019-01-14 09:34:19 +08:00
NovaRain 6e74c3166a Refactored ASM code in Sound.cpp (from Mr.Stalin)
Minor fix for "path_find_to" script function.
Changed the two wrapper functions in ObjectsOps.hpp using dev branch as ref.
Changed some code in ObjectsOps.hpp for edited wrapper functions.
Moved obj_under_cursor to ObjectsOps.hpp.
Reformatted Karma/Worldmap related code in main.cpp as in dev branch.
2019-01-08 13:28:00 +08:00
NovaRain e320acce0b Expanded create/temp_array functions to allow creating a new "lookup" type of associative array (from Mr.Stalin) 2019-01-08 06:52:00 +08:00
NovaRain 4f48926105 Added support for sorting associative arrays by keys or values (from Mr.Stalin) 2019-01-07 15:13:22 +08:00
NovaRain 5611931063 Fixed a crash bug when using sorting functions on an associative array(map) (from Mr.Stalin) 2019-01-06 11:59:09 +08:00
NovaRain f00022fed6 Moved ModifiedIni to main.cpp. 2019-01-04 21:08:30 +08:00
NovaRain 78815425e2 Refactored ASM code in KillCounter.cpp.
Reformatted and tweaked code in Explosions.cpp.
2019-01-03 11:07:57 +08:00
NovaRain 9ddddcc120 Changed INVENTORYMOVE hook to be called before displaying the 'Move Items' window for drag and drop ammo on weapons. 2019-01-03 09:35:26 +08:00
NovaRain 11c15cec93 Refactored some ASM code in BurstMods.cpp, Inventory.cpp, Credits.cpp, AnimationsAtOnceLimit.cpp. 2019-01-01 10:27:40 +08:00
NovaRain f36bd6fb61 Improved the functionality of ElevatorsFile to allow to change the FRM images of the elevator panel and create new elevator types (from Mr.Stalin) 2018-12-31 10:10:06 +08:00
NovaRain 26ab38c6c3 Changed critical table to be loaded before global scripts.
Removed redundant ClearGlobals() in LoadGameHook.cpp (already run in ResetState(1) above)
Updated version number and year.
2018-12-30 10:08:47 +08:00
NovaRain 9b50e6be1e Added UseWalkDistance option (from Mr.Stalin) (#46) 2018-12-28 20:06:55 +08:00
NovaRain 2427634ee8 Added a fix to the following script functions to ensure they set the correct object: (from Mr.Stalin)
set_critter_burst_disable, set_critter_pickpocket_mod, set_critter_skill_mod, set_critter_hit_chance_mod, set_*_knockback
2018-12-28 10:04:22 +08:00
NovaRain 36d1d0a5fc Refactored HeroAppearance.cpp (from Mr.Stalin) 2018-12-27 16:03:13 +08:00
NovaRain 486f00cdf4 Refactored assembler code in Skills.cpp. 2018-12-26 10:23:21 +08:00
NovaRain b6fd424665 Added missing return values for HOOK_INVENWIELD. 2018-12-25 10:02:39 +08:00
NovaRain 3d679db758 Added a fix to prevent sfall from loading global scripts with an extension that exceeds three characters (from Mr.Stalin)
Replaced some pushad/popad opcodes with pushadc/popadc ASM macros.
2018-12-25 01:25:37 +08:00
NovaRain 92e1f919d9 Refactored SafeWrite.cpp. 2018-12-20 09:37:47 +08:00
NovaRain d259e8c903 Formatted code in HeroAppearance.cpp. 2018-12-18 07:54:19 +08:00
NovaRain dea0e596c3 Minor code edit on main.cpp. 2018-12-17 09:44:36 +08:00
NovaRain 90b39f3dde Replaced some values with constants in Perks.cpp. 2018-12-16 11:39:56 +08:00
NovaRain c80224f661 Simplified and reformatted code in Perks.cpp (from Mr.Stalin)
Replaced some 'strcpy_s' usages to 'strncpy_s' in Perks.cpp.
2018-12-15 18:55:40 +08:00
NovaRain d7d8de5e1a Added "get/set_object_data" script functions (from Mr.Stalin)
Changed read_byte, read_short, read_int, and read_string functions to not require AllowUnsafeScripting.
2018-12-05 10:17:26 +08:00
NovaRain 0a21e4abfa Fixed a bug in the hero appearance mod that caused the player to disappear after saving the game when player's base FID is greater than 255.
Replaced old SafeWrite usages with corresponding Hook/MakeCall functions in HeroAppearance.cpp.
2018-12-04 09:45:55 +08:00
NovaRain 1340eeb0d3 Fixed the return values of a hook getting corrupted if another hook was called during the execution of the current hook (from Mr.Stalin)
Added a fix to prevent hook scripts from being executed when the depth limit is exceeded.
2018-12-03 20:43:03 +08:00
NovaRain a350fed4d1 Added a fix for unable to sell/give items in barter screen when the player/party member is overloaded (from Mr.Stalin)
Added a variant of MakeCall/Jump with 3 arguments to replace some SafeWrite 0x90 code for trailing NOPs.
2018-11-30 11:35:14 +08:00
NovaRain 402d4f40f2 Changed some MakeJump usages to MakeCall in Stats.cpp, Knockback.cpp, and main.cpp.
(see Mr.Stalin's comments in commit c990b6701d)
2018-11-29 09:56:41 +08:00
NovaRain 0f49c7f68d Refactored the code in Knockback.cpp.
Edited part of HookScripts.cpp (ref. commit 0a3745f8f5)
Minor edits to some code files.
2018-11-28 21:35:47 +08:00
NovaRain deb0299776 Added an option to fix AI not taking chem_primary_desire in AI.txt as drug use preference when using drugs in their inventory (from Mr.Stalin)
Minor edits to some code files.
2018-11-26 09:59:14 +08:00
NovaRain 4bb3fa0275 Merged two Glovz's fix functions and reorganized Glovz's/YAAM code layout a bit.
Fixed a bug in Stats.cpp that caused critical hits to ignore critical table roll value and only have the lowest level effect.
Minor edits to MainMenu.cpp.
2018-11-20 23:44:27 +08:00
NovaRain da31455cef Fixed missing AC/DR mod stats when examining ammo in barter screen.
Added an option to display full item description for weapon/ammo in barter screen.
Minor code correction in ScriptExtender.cpp.
Minor edits to document.
Updated version number.
2018-11-20 07:23:25 +08:00
NovaRain 4da10e2fdb Fixed the missing return value of -1 for HOOK_USEOBJON. 2018-11-16 06:34:47 +08:00
NovaRain 5426d043c1 Fixed unable to click the pop-up message box when death from radiation was triggered during resting. 2018-11-14 07:14:39 +08:00
NovaRain 719cec74d1 Added a fix to display a pop-up message box about death from radiation. 2018-11-13 21:37:48 +08:00
NovaRain 627fe11c29 Fixed determine_to_hit_func_ engine function taking distance into account when called from determine_to_hit_no_range_ (from Mr.Stalin) 2018-11-12 13:14:07 +08:00
NovaRain dcca405b89 Added an additional mode to SpeedInterfaceCounterAnims (from Mr.Stalin)
Refactored the code of Stats.cpp.
Unified stat_level_ usages in Inventory.cpp, LoadGameHook.cpp and skills.cpp.
2018-11-10 10:08:08 +08:00
NovaRain cce9437d19 Removed the pop-up message box about not finding the original ddraw.dll, now the error is reported in the log file.
Added a note about setting a custom background for the character screen to the hero appearance mod.
2018-11-09 10:01:10 +08:00
NovaRain 09b3bf3aed Added DisplaySwiftLearnerExp option (from Crafty)
Minor edits to some documents/code.
2018-11-07 09:39:11 +08:00
NovaRain 08a891a0fc Added "obj_under_cursor" script function.
Backported some script functions from 4.0: lock_is_jammed, unjam_lock.
2018-11-04 09:14:02 +08:00
NovaRain e9df81ac78 Changed PartyMemberExtraInfo to not show "Addict" text (in dark green) on the combat control panel if the party member is not addicted to drugs. 2018-11-02 22:49:14 +08:00
NovaRain 3e982be4b6 Removed RemoveWindowRounding option because it doesn't affect anything. 2018-11-01 09:54:37 +08:00
NovaRain 8a888f387d Adjusted the position of ExtraSaveSlots page buttons a bit. 2018-10-31 07:16:17 +08:00
NovaRain 712b4de5f7 Changed the debug editor to require sfall debugging mode.
Some minor code edits.
2018-10-29 11:14:30 +08:00
NovaRain a3b456cf0a Added a new return value to HOOK_KEYPRESS to override the pressed key (from Crafty)
Added check for map being loaded to KeyPress/MouseClick hooks.
2018-10-28 08:51:01 +08:00
NovaRain 9f689863d7 Added a new setting to DebugMode to send debug output to both the screen and the debug log (from Crafty)
Simplified the code for ObjCanSeeObj_ShootThru_Fix a bit (from Mr.Stalin)
Changed sfall to not to create sfallfs.sav when UseFileSystemOverride is disabled.
2018-10-27 09:46:35 +08:00
NovaRain b5306406b3 Replaced some __cdecl calling conventions with __fastcall.
(from Mr.Stalin - Reason: The compiler can use the arguments for its own purposes, which can spoil the stored value on the stack.)
Added extra notes for some options to ddraw.ini.
2018-10-26 06:51:52 +08:00
NovaRain ce3b9c172c Minor edit to the fade patch. 2018-10-24 12:00:52 +08:00
NovaRain b8a77d77fb Added missing functions from the source library ddraw.dll to export from sfall (from Mr.Stalin)
Simplified the code in SuperSave.cpp.
Minor edits to ddraw.ini.
2018-10-23 11:50:55 +08:00
NovaRain a01da656c7 Fixed showing game movies and subtitles for DX9 mode when not using the hi-res patch, and added logging messages for DX9 mode (from Mr.Stalin)
Changed DisplayNPCExtraInfo to PartyMemberExtraInfo.
2018-10-19 11:07:30 +08:00
NovaRain 5eda8dd7a0 Backported a new mode of metarule2_explosions from 4.0. 2018-10-17 22:30:07 +08:00
NovaRain c05babeda7 Added DisplayNPCExtraInfo option to ddraw.ini for previous commit. 2018-10-17 09:34:14 +08:00
NovaRain cc2b95d64e Added displaying party member's current level & AC & addict flag info to the combat control panel (from Mr.Stalin)
Added additional notes to HOOK_COMBATDAMAGE in hookscripts.txt (#204)
2018-10-16 10:14:32 +08:00
NovaRain fb62bd51b5 Simplified some byte writing in a few options. 2018-10-15 09:57:55 +08:00
NovaRain f4d7ccef40 Fixed typo in the previous commit. 2018-10-14 10:15:02 +08:00
NovaRain 85bb34377c Added missing argument validation to refactored fs_* opcodes.
Minor edits to Criticals.cpp.
2018-10-14 10:06:06 +08:00
NovaRain af24c6eae4 Fixed the exploit that allows you to gain excessive skill points from Tag! perk before leaving the character screen (from Mr.Stalin) 2018-10-12 19:27:04 +08:00
NovaRain 930f463000 Backported expanded is_iface_tag_active function from 4.0, and refactored show/hide_iface_tag functions as well.
Minor edits to a couple of documents.
2018-10-11 23:56:11 +08:00
NovaRain e1aefcc1ed Refactored BonusHtHDamageFix/DisplayBonusDamage code in AmmoMod.cpp (from Mr.Stalin)
Fixed DisplayBonusDamage not being applied on Melee Damage stat in the character screen when BonusHtHDamageFix is enabled.
Reimplemented INTFACEUSE/INTFACELOOT/BARTER game mode flags, and backported inventory_redraw script function from 4.0.
2018-10-11 11:19:22 +08:00
NovaRain 25554ff0b2 Added FastMoveFromContainer as the auxiliary option for ItemFastMoveKey (from Mr.Stalin)
Refactored the code of StackEmptyWeapons.
Added missing argument validation for backported script functions.
2018-10-10 18:27:54 +08:00
NovaRain dad0860d6e Changed implementation of StartGDialogFix, additionally fixed the game crash if calling start_gdialog function outside of talk_p_proc procedure for talking heads.
Fixed "Heave Ho!" perk increasing strength stat above 10 when determining the max range of thrown weapons.
Moved SpecialUnarmedAttacksFix to BugFixes.cpp and simplified the code.
Added comments to old ApplyHeaveHoFix in Perks.cpp.
Backported some non-hook related script functions from 4.0: item_weight, get/set_outline, get/set_flags, tile_refresh_display, outlined_object, get/set_cursor_mode, display_stats, get/set_map_enter_position, attack_is_aimed.
2018-10-10 17:24:05 +08:00
NovaRain a7e492a80f Backported get/set_proto_data changes and LoadProtoMaxLimit option from the develop branch.
Added more definitions to define_extra.h.
2018-10-08 21:45:16 +08:00
NovaRain d9b748c261 Backported UseScrollingQuestsList imporvements from 4.1.
Added sound effect to ExtraSaveSlots page buttons (from Mr.Stalin)
2018-10-06 23:18:07 +08:00
NovaRain 0aad511e3e Refactored ASM code in ScriptExtender.cpp according to the develop branch, and edited the code style.
Moved NegateFix to Bugs.cpp and simplified its code.
2018-10-05 10:13:01 +08:00
NovaRain d117296990 Backported "create_win" script function and InterfaceDontMoveOnTop option from the developt branch.
Updated version number.
2018-10-02 12:15:48 +08:00
NovaRain e672db53c7 Backported AllowDShowSound improvements from the develop branch:
* Added volume control support for alternative sound files.
* Added mode 2 to play alternative music files even if original acm files are not present in the music folder.
* Added AllowDShowMovies option to separate avi files playback from enabling DX9 mode.
* Fixed initialization bug when DX9 mode is disabled.
* Small refactoring on ASM code.

Added missing FadeMultiplier option to ddraw.ini.
2018-10-01 12:16:42 +08:00
NovaRain 25bbd91fc5 Fixed the mood argument of start_gdialog function being ignored for talking heads (from Crafty)
Fixed the broken obj_can_hear_obj script function (from Mr.Stalin)
Simplified the code of disabling losing unused perks.
2018-09-30 16:31:29 +08:00
NovaRain 8db528330b Fixed the max text width of player name in inventory.
Added an 8 lines limit to the underline position fix.
Some minor ASM code edits.
Minor edit to document.
2018-09-25 14:17:45 +08:00
NovaRain f761f7834e Refactored fs_* opcodes with ASM macros and opcode handlers. 2018-09-25 12:29:33 +08:00
NovaRain f6c4e5133c Fixed ai_retrieve_object_ engine function not returning the requested object when there are different objects with the same ID (from Mr.Stalin)
Added info about map_*_p_proc procedures to the global script section in notes.txt.
2018-09-23 08:15:52 +08:00
NovaRain 2e30c86467 Added "get_current_inven_size" script function. 2018-09-21 19:27:57 +08:00
NovaRain 1679f7c59d Backported CritterInvSizeLimitMode related fixes/improvements from the develop branch:
* Changed item_total_weight/item_c_curr_size engine functions to return the weight and size of equipped(hidden) items on NPCs when exchanging/bartering items.
* Fixed CritterInvSizeLimitMode not properly checking the weight of equipped items when mode is set to 4+.
* Added inventory size check to "Take All" button.
* Added additional note to CritterInvSizeLimitMode in ddraw.ini, and changed CritterInvSizeLimit to its default value.
2018-09-20 09:48:27 +08:00
NovaRain 9a4cbd4fa9 Excluded inventory size features for NPCs when CritterInvSizeLimitMode is set to PC only. 2018-09-16 10:25:45 +08:00
NovaRain 0c561ba677 Backported refactored CritterInvSizeLimitMode option from the develop branch (from Mr.Stalin)
Added party member's current/max inventory size info to the combat control panel.
Removed redundant functions from FalloutEngine.cpp.
2018-09-15 11:41:46 +08:00
NovaRain 20ccdacee8 Fixed the underline position in the inventory display window when the item name is longer than one line (from Mr.Stalin)
Simplified the code of SuperStimExploitFix and corrected the return value for the change.
2018-09-12 22:45:58 +08:00
NovaRain d44663ce76 Backported two bug fixes from the develop branch:
* Fixed broken get/reset_critical_table functions (from Mr.Stalin)
* Fixed the encounter description being displayed in two lines instead of one (from Crafty)
2018-09-11 16:15:25 +08:00
NovaRain a196160258 Changed the fix for multihex critter moving in combat to a more proper one (from Mr.Stalin)
Added AIBestWeaponFix option to ddraw.ini.
2018-09-02 18:07:05 +08:00
NovaRain 55a97a5793 Fixed multihex critters moving too close and overlapping their targets in combat (from Crafty)
Fixed critters not checking weapon perks properly when searching for the best weapon (from Mr.Stalin)
2018-08-21 07:18:35 +08:00
NovaRain 3eaa64ee16 Added extra comment for CarChargingFix to ddraw.ini. 2018-08-14 23:57:29 +08:00
NovaRain aa9257ab1c Fixed obj_can_see_obj not checking if source and target objects are on the same elevation before calling is_within_perception_ (from Mr.Stalin) 2018-08-10 22:37:55 +08:00
NovaRain 81a8fd4863 Added a fix for the display issue in the pipboy when a quest list is too long with UseScrollingQuestsList diabled (from Mr.Stalin)
Added a fix for the clickability issue of holodisk list in the pipboy (from Mr.Stalin)
2018-08-06 21:10:09 +08:00
NovaRain ed260ad7e5 Minor edit to the description of CityRepsList in ddraw.ini, to avoid misunderstanding.
Updated version number.
2018-07-28 22:33:28 +08:00
NovaRain 9dce3c8d62 Fixed an issue with file IDs of additional game msg files being shifted when a file in ExtraGameMsgFileList is missing. 2018-07-24 09:39:26 +08:00
NovaRain f28a179c78 Added more info to the comments of various keys in [Input] section in ddraw.ini. 2018-06-12 20:53:03 +08:00
NovaRain 540abbe273 Fixed a bug in DisplaySecondWeaponRange that didn't display correct weapon range when the secondary mode is aimed (e.g. spear and throwing knife)
Added more info about unwielding in HOKK_INVENWIELD to hookscripts.txt.
2018-06-11 13:47:20 +08:00
NovaRain 8dda3940d0 Added ItemFastMoveKey and ItemCounterDefaultMax options from 4.0 develop branch (commit aaa76cb3d1)
Set ReloadReserve to be disabled by default.
2018-06-06 06:54:55 +08:00
NovaRain 44b9b24490 Minor edits to documents. 2018-06-04 21:28:05 +08:00
NovaRain dafbc357b2 Added more detail to the comment of previous commit. 2018-06-02 18:13:33 +08:00
Mr.StalinandNovaRain 02572a5193 Fix bug "walking dead" for critters in combat mode after their death. (#160) 2018-06-02 18:10:49 +08:00
NovaRain cab19b5ca0 Fixed the backported code in commit d6952a0c93 not working when enabling AnimationsAtOnceLimit.
Reorganized the layout of AnimationsAtOnceLimit.cpp to be more in-line with 4.0 code.
2018-06-02 08:21:19 +08:00
NovaRain d6952a0c93 Backported the fix for the crash when the critter goes through a door with animation trigger from commit 56945c7437. 2018-06-01 23:42:52 +08:00
NovaRain b996867d65 Minor edit to the code in Explosions.cpp. 2018-05-30 21:21:23 +08:00
NovaRain bd18c240f9 Simplified the ASM code of get_mouse_buttons() a bit. 2018-05-30 09:37:58 +08:00
NovaRain 2ad28e3086 Added WorldMapFontPatch option to use Fallout's normal text font instead of DOS-like font on the world map. (#48) 2018-05-30 09:33:40 +08:00
NovaRain ef5ff4e90f Expanded get_mouse_buttons function to return a value for the middle mouse button (from Mr.Stalin) 2018-05-29 09:32:16 +08:00
NovaRain 0a672c1e10 Added MoreTiles option to increase the limit of FRM images for tiles from 4096 to 16383 (from Crafty)
Added sfall log messages to both options in Tiles.cpp and edited the code style.
2018-05-28 10:15:02 +08:00
NovaRain 01214633f4 Simplified the code in BarBoxes.cpp.
Updated version number.
Fixed a minor typo in function notes.txt.
2018-05-27 16:42:34 +08:00
NovaRain 334e98c4c1 Backported DisplaySecondWeaponRange option from 'develop' branch.
Improved DisablePipboyAlarm so that when the player press Z key they won't see a blank Pipboy screen.
Simplified the HookCall usages in TimeLimit option.
2018-05-27 16:09:21 +08:00
NovaRain 78a29ad556 Simplified the code from commit 716bfd4156. 2018-05-15 20:23:34 +08:00
NovaRain e5d14ff845 Minor edit to FixCharScrnBack() in HeroAppearance.cpp. 2018-05-14 21:16:44 +08:00
mr.StalinandNovaRain 716bfd4156 Hero Appearance mod: Loads the custom background frm for the character windows. (#150)
AppChCrt.frm (for the character creation) and AppChEdt.frm (for the character screen) should be placed in art/intrface, and the image size must be 640x480.
2018-05-14 09:56:56 +08:00
NovaRain 9b67db7208 Fixed broken get_attack_type function (from Mr.Stalin and Crafty)
Replaced some SafeWriteX usages with SafeMemSet for writing serial NOPs.
Minor edits to documents.
2018-05-08 15:39:39 +08:00
NovaRain e92ded34e4 Added "floor2" script function to work with ceil (#109)
Added the missing description of ceil to notes.txt.
Disabled ceil marco in lib.math.h.
Removed duplications in Utils.h.
2018-04-28 11:16:10 +08:00
NovaRain 1689542165 Fixed the last additional notification boxes to the interface being missing (#140) 2018-04-26 10:11:22 +08:00
NovaRain 2c86201db9 Updated README.txt for info about additional headers/libraries.
(cherry picked from commit e474ba1660)
2018-04-21 09:19:20 +08:00
NovaRain d7c9acf713 Added set_ini_setting to documents, and updated info for get_ini_setting.
Updated credits.
Replacing a couple of strcpy usages with strcpy_s.
2018-04-21 08:49:56 +08:00
mr.StalinandNovaRain 399da0d322 Scripting function "set_ini_setting" for FuncX [sfall v3.8] (#139)
* Added new script function "set_ini_setting" for FuncX (#85)

* Small fix for sf_set_ini_setting function.

* Refactoring code for set/get_ini* functions.
2018-04-21 08:42:12 +08:00
NovaRain 774adaa3b0 Revert "Fixed a bug when using HOOK_ITEMDAMAGE and calling item_w_damage_ engine function at the same time. It would result in player self-damaging when attacking targets."
This reverts commit b4d174d91b.
2018-04-13 20:43:33 +08:00
NovaRain b4d174d91b Fixed a bug when using HOOK_ITEMDAMAGE and calling item_w_damage_ engine function at the same time. It would result in player self-damaging when attacking targets.
Set DataLoadOrderPatch to be enabled by default, for preventing partial of a game crash issue due to unusual game folders setup. #136
2018-04-13 11:09:37 +08:00
NovaRain 3291f6fe17 Added a fix for being at incorrect hex after map change when the exit hex in source map is at the same position as some exit hex in destination map (from Crafty) #134 2018-04-02 23:22:46 +08:00
NovaRain 84f442ca08 Rewrote the fix for player's base EMP DR as an engine-level fix (from Crafty) 2018-04-01 12:48:13 +08:00
NovaRain f5c35eb639 Fixed typos in hookscripts.txt. 2018-03-23 23:10:17 +08:00
NovaRain 514894ed59 Fixed typos in sfall function notes.txt. 2018-03-23 22:06:02 +08:00
NovaRain 204810d067 Fixed the long existing slotdat.ini function in ExtraSaveSlots.
Reduced duplication in ExtraSaveSlots code.
Unified the indent style in ExtraSaveSlots.cpp.
Updated version number.
2018-03-16 12:49:39 +08:00
NovaRain ec4ba13a28 Fixed add_mult_objs_to_inven only adding 500 of an object when the value of "count" argument is over 99999. #129 2018-01-17 07:37:03 +08:00
NovaRain 14a6ef7fc6 Made sure the value of player's base EMP DR is set correctly. 2018-01-02 23:25:27 +08:00
NovaRain c3a74070ca Updated version number and the year.
Set the copyright string in the same way as 4.0 build.
2018-01-02 10:26:32 +08:00
NovaRain 302fd4bb51 Condensed the code in ApplyHeaveHoFix a bit. 2018-01-02 10:02:04 +08:00
NovaRain c7520c71cf Fixed player's base EMP DR isn't properly initialized when creating a new character and then starting the game. 2017-12-15 07:34:10 +08:00
NovaRain 45632d6887 Changed sneak_success to call is_pc_sneak_working_ engine function, which takes player's current sneaking status into account as well, instead of only returning the result of last sneak attempt. 2017-12-05 10:25:11 +08:00
NovaRain 866c9165c0 Replaced hex values with proper VAR_TYPE_* defines for code readability. 2017-12-03 23:29:28 +08:00
NovaRain 813abbf452 Added missing entry of block_combat script function in opcode list. 2017-12-03 02:40:36 +08:00
NovaRain c6864e01f6 Added the damage type offset of weapon proto to define_extra.h.
Fixed a typo in hookscripts.txt.
Added a new example mod gl_autodoors (by Mr.Stalin) to modderspack. #19
2017-11-28 00:30:29 +08:00
NovaRain 0eab48932a Tweaked the way DebugMode works, now only DebugMode=2 sends debug output to a debug.log file. Any other non-0 value sends debug output to the screen. #123 2017-11-07 10:44:57 +08:00
NovaRain 6c3efc5b84 Replaced some SafeWrite* usages in old code with corresponding HookCall/MakeCall/MakeJump for code readability.
Edited code style in Perks.cpp.
2017-11-06 15:21:08 +08:00
NovaRain cb8d7dc94a Enabled mouse scroll control in barter and loot screens when the cursor is hovering over other lists, also enabled scrolling through the display monitor (from Crafty) #120
Rearraged the code style in dinput.cpp.
Updated version number.
2017-10-25 11:40:46 +08:00
NovaRain 5786cfb267 Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt.
Updated version number.
2017-10-18 14:56:38 +08:00
NovaRain 78dfb530a9 Moved LoadHeroAppearance() from MainMenuHook to NewGame2. No reason to run it on the main menu where player appearance can't display. 2017-09-19 15:27:08 +08:00
NovaRain d588f2e691 Edited code style in HeroAppearance.cpp/h, also removed some redundant blank lines. 2017-09-19 10:43:31 +08:00
NovaRain daf7a82997 Added descriptions for the variables in Perks.ini.
(cherry picked from commit 848f29b468)
2017-09-12 15:39:39 +08:00
NovaRain 9ad2b19e1a Removed the redundant LoadHeroAppearance calling.
(now it's called during LoadGame_, which is earlier than LoadGame2_After)
2017-09-09 18:59:21 +08:00
NovaRain 4b66dd3682 Reverted LoadGame to previous revision, but also kept EndLoadHook and changed it to only call LoadHeroAppearance.
(attempted to fix issue #117 and #94)
2017-09-05 09:21:22 +08:00
NovaRain 4899aeece1 Changed new function names in the previous commit to PascalCase style. 2017-09-01 09:45:33 +08:00
NovaRainandGitHub 946266e367 Merge pull request #107 from FakelsHub/crafty_features/combat_proc
Added calls to unimplemented script procedures: combat_is_starting_p_proc/combat_is_over_p_proc (from Crafty)
2017-09-01 09:40:47 +08:00
NovaRain 438ea071fc Removed the backported new modes for get_game_mode in commit a93ad5a9ba. 2017-08-24 21:46:42 +08:00
NovaRain 89760235c7 Removed unimplemented HEROWIN game mode from header files.
Cleared some obsoleted/unused code from main.cpp & LoadGameHook.cpp.
2017-08-23 13:42:58 +08:00
NovaRain 321f1c6034 Fixed the double damage effect of Silent Death perk not being applied to critical hits (from Crafty) 2017-08-21 23:18:32 +08:00
NovaRain 513338f160 Fixed incorrect argument description for get/set_proto_data in sfall opcode list.txt.
Removed incorrect PROTO_CR_FLAGS value in define_extra.h (was actually critter's IN), and renamed PROTO_CR_ACTION_FLAGS to its correct name #112

(cherry picked from commit ad17773ace)
2017-08-21 11:33:37 +08:00
NovaRain 08b92542f4 Fixed the incorrect description in HOOK_COMBATDAMAGE.
(cherry picked from commit 85cdd8973e)
2017-08-19 08:49:56 +08:00
NovaRain 46013c94b0 Added SSL library files and define_lite.h (from 4.0 development branch) 2017-08-18 15:52:14 +08:00
NovaRain 7a4ab59089 Added missing description for set_car_current_town.
Removed trailing spaces in MetaruleOp.hpp.
2017-08-13 11:38:18 +08:00
NovaRain e505e204cb Two bug fixes from Crafty:
1. Fixed the displayed message when the attack randomly hits a target that is not a critter and has a script attached.
2. Fixed damage_p_proc being called for misses if the target is not a critter.
2017-08-07 13:24:11 +08:00
NovaRain 7343754d53 Fixed Bonus Move APs being replenished when you save and load the game in combat (from Crafty)
Replaced all usages of MakeCall with 3 arguments with either MakeJump or MakeCall (2 arguments) to improve code readability (ref. commit 96fa2668cc)
2017-07-26 23:13:40 +08:00
NovaRain ae1e17d359 Added a note for argnum in set_sfall_arg().
Fixed incorrect set_sfall_arg usage in the example.
Removed a redundant line in sfall opcode list.txt.
2017-07-25 23:14:50 +08:00
NovaRain 32dbe5581d Replaced hs_*.int scripts in example mods with normal global scripts with register_hook.
(cherry picked from commit e7e286013f)
2017-07-06 21:04:51 +08:00
NovaRain a93ad5a9ba Added new modes for get_game_mode to match Crafty's (backported from 4.0 development branch, commit c32dc7664e) 2017-06-22 09:41:05 +08:00
NovaRain 874b047ce1 Added Attack Type argument for HOOK_COMBATDAMAGE (from Crafty) #100 2017-06-14 12:45:13 +08:00
NovaRain afa590c5a8 Minor edits to ddraw.ini. 2017-06-02 11:49:02 +08:00
NovaRain b89c52fcec Added DontTurnOffSneakIfYouRun option to prevent the player from running while sneaking without Silent Running perk (from Crafty)
Added sfall log text for DisablePipboyAlarm.
2017-05-26 10:10:16 +08:00
NovaRain ec2d323f75 Changed LoadGame2_After to be called before LoadGame state is ended (backported from 4.0 development branch, commit c2e6d743a3)
Updated version number.
Minor edits to scripting documents.
2017-05-23 21:05:04 +08:00
Mr.Stalin 586679b07f Added scripting procedure handlers combat_is_starting_p_proc/combat_is_over_p_proc from Crafry. 2017-05-12 18:28:46 +03:00
501 changed files with 75426 additions and 34798 deletions
+1
View File
@@ -0,0 +1 @@
*.ssl linguist-language=Pascal
+5
View File
@@ -26,6 +26,7 @@
*.exe
*.out
*.app
!ducible.exe
# NetBeans
nbproject/private/
@@ -46,6 +47,8 @@ nb-configuration.xml
*.user
*.userosscache
*.sln.docstates
*.VC.db
*.VC.opendb
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
@@ -53,8 +56,10 @@ nb-configuration.xml
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Dd]evXP/
[Rr]elease/
[Rr]eleases/
[Ww]in2K/
x64/
x86/
build/
+1012
View File
File diff suppressed because it is too large Load Diff
@@ -23,17 +23,20 @@
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bGlobals = new System.Windows.Forms.Button();
this.bMapVars = new System.Windows.Forms.Button();
this.bCritters = new System.Windows.Forms.Button();
this.bSGlobals = new System.Windows.Forms.Button();
this.bArrays = new System.Windows.Forms.Button();
this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bEdit = new System.Windows.Forms.Button();
this.redrawTimer = new System.Windows.Forms.Timer(this.components);
this.bCrittersLvar = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
@@ -41,84 +44,38 @@
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeight = 22;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column0,
this.Column1,
this.Column2,
this.Column3});
this.dataGridView1.Location = new System.Drawing.Point(12, 12);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(444, 215);
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(561, 354);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit);
//
// bGlobals
//
this.bGlobals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bGlobals.Location = new System.Drawing.Point(12, 233);
this.bGlobals.Name = "bGlobals";
this.bGlobals.Size = new System.Drawing.Size(100, 23);
this.bGlobals.TabIndex = 1;
this.bGlobals.Text = "Globals";
this.bGlobals.UseVisualStyleBackColor = true;
this.bGlobals.Click += new System.EventHandler(this.bGlobals_Click);
//
// bMapVars
//
this.bMapVars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bMapVars.Location = new System.Drawing.Point(118, 233);
this.bMapVars.Name = "bMapVars";
this.bMapVars.Size = new System.Drawing.Size(100, 23);
this.bMapVars.TabIndex = 2;
this.bMapVars.Text = "Map variables";
this.bMapVars.UseVisualStyleBackColor = true;
this.bMapVars.Click += new System.EventHandler(this.bMapVars_Click);
//
// bCritters
//
this.bCritters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bCritters.Location = new System.Drawing.Point(118, 262);
this.bCritters.Name = "bCritters";
this.bCritters.Size = new System.Drawing.Size(100, 23);
this.bCritters.TabIndex = 3;
this.bCritters.Text = "Critters";
this.bCritters.UseVisualStyleBackColor = true;
this.bCritters.Click += new System.EventHandler(this.bCritters_Click);
//
// bSGlobals
//
this.bSGlobals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bSGlobals.Location = new System.Drawing.Point(225, 233);
this.bSGlobals.Name = "bSGlobals";
this.bSGlobals.Size = new System.Drawing.Size(100, 23);
this.bSGlobals.TabIndex = 4;
this.bSGlobals.Text = "sfall globals";
this.bSGlobals.UseVisualStyleBackColor = true;
this.bSGlobals.Click += new System.EventHandler(this.bSGlobals_Click);
//
// bArrays
//
this.bArrays.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bArrays.Location = new System.Drawing.Point(12, 262);
this.bArrays.Name = "bArrays";
this.bArrays.Size = new System.Drawing.Size(100, 23);
this.bArrays.TabIndex = 5;
this.bArrays.Text = "sfall arrays";
this.bArrays.UseVisualStyleBackColor = true;
this.bArrays.Click += new System.EventHandler(this.bArrays_Click);
this.dataGridView1.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView1_RowsAdded);
//
// Column0
//
this.Column0.HeaderText = "ID";
this.Column0.Name = "Column0";
this.Column0.ReadOnly = true;
this.Column0.Width = 50;
//
// Column1
//
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column1.HeaderText = "Name";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
@@ -133,10 +90,65 @@
this.Column3.HeaderText = "Value (Float)";
this.Column3.Name = "Column3";
//
// bGlobals
//
this.bGlobals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bGlobals.Location = new System.Drawing.Point(12, 372);
this.bGlobals.Name = "bGlobals";
this.bGlobals.Size = new System.Drawing.Size(100, 23);
this.bGlobals.TabIndex = 1;
this.bGlobals.Text = "Globals";
this.bGlobals.UseVisualStyleBackColor = true;
this.bGlobals.Click += new System.EventHandler(this.bGlobals_Click);
//
// bMapVars
//
this.bMapVars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bMapVars.Location = new System.Drawing.Point(118, 372);
this.bMapVars.Name = "bMapVars";
this.bMapVars.Size = new System.Drawing.Size(100, 23);
this.bMapVars.TabIndex = 2;
this.bMapVars.Text = "Map variables";
this.bMapVars.UseVisualStyleBackColor = true;
this.bMapVars.Click += new System.EventHandler(this.bMapVars_Click);
//
// bCritters
//
this.bCritters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bCritters.Location = new System.Drawing.Point(12, 401);
this.bCritters.Name = "bCritters";
this.bCritters.Size = new System.Drawing.Size(100, 23);
this.bCritters.TabIndex = 3;
this.bCritters.Text = "Critters";
this.bCritters.UseVisualStyleBackColor = true;
this.bCritters.Click += new System.EventHandler(this.bCritters_Click);
//
// bSGlobals
//
this.bSGlobals.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bSGlobals.Location = new System.Drawing.Point(367, 372);
this.bSGlobals.Name = "bSGlobals";
this.bSGlobals.Size = new System.Drawing.Size(100, 23);
this.bSGlobals.TabIndex = 4;
this.bSGlobals.Text = "sfall globals";
this.bSGlobals.UseVisualStyleBackColor = true;
this.bSGlobals.Click += new System.EventHandler(this.bSGlobals_Click);
//
// bArrays
//
this.bArrays.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bArrays.Location = new System.Drawing.Point(473, 372);
this.bArrays.Name = "bArrays";
this.bArrays.Size = new System.Drawing.Size(100, 23);
this.bArrays.TabIndex = 5;
this.bArrays.Text = "sfall arrays";
this.bArrays.UseVisualStyleBackColor = true;
this.bArrays.Click += new System.EventHandler(this.bArrays_Click);
//
// bEdit
//
this.bEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bEdit.Location = new System.Drawing.Point(225, 262);
this.bEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bEdit.Location = new System.Drawing.Point(473, 401);
this.bEdit.Name = "bEdit";
this.bEdit.Size = new System.Drawing.Size(100, 23);
this.bEdit.TabIndex = 6;
@@ -144,11 +156,29 @@
this.bEdit.UseVisualStyleBackColor = true;
this.bEdit.Click += new System.EventHandler(this.bEdit_Click);
//
// redrawTimer
//
this.redrawTimer.Interval = 200;
this.redrawTimer.Tick += new System.EventHandler(this.timer1_Tick);
//
// bCrittersLvar
//
this.bCrittersLvar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bCrittersLvar.Enabled = false;
this.bCrittersLvar.Location = new System.Drawing.Point(118, 401);
this.bCrittersLvar.Name = "bCrittersLvar";
this.bCrittersLvar.Size = new System.Drawing.Size(100, 23);
this.bCrittersLvar.TabIndex = 7;
this.bCrittersLvar.Text = "Local variables";
this.bCrittersLvar.UseVisualStyleBackColor = true;
this.bCrittersLvar.Click += new System.EventHandler(this.bCrittersLvar_Click);
//
// DebugEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(468, 297);
this.ClientSize = new System.Drawing.Size(585, 436);
this.Controls.Add(this.bCrittersLvar);
this.Controls.Add(this.bEdit);
this.Controls.Add(this.bArrays);
this.Controls.Add(this.bSGlobals);
@@ -156,8 +186,10 @@
this.Controls.Add(this.bMapVars);
this.Controls.Add(this.bGlobals);
this.Controls.Add(this.dataGridView1);
this.MinimumSize = new System.Drawing.Size(450, 300);
this.Name = "DebugEditor";
this.Text = "DebugEditor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "sfall Debug Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DebugEditor_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
@@ -172,11 +204,13 @@
private System.Windows.Forms.Button bCritters;
private System.Windows.Forms.Button bSGlobals;
private System.Windows.Forms.Button bArrays;
private System.Windows.Forms.Button bEdit;
private System.Windows.Forms.DataGridViewTextBoxColumn Column0;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.Button bEdit;
internal System.Windows.Forms.Timer redrawTimer;
private System.Windows.Forms.Button bCrittersLvar;
}
}
+394
View File
@@ -0,0 +1,394 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using File = System.IO.File;
using StreamReader = System.IO.StreamReader;
using MemoryStream = System.IO.MemoryStream;
using BinaryReader = System.IO.BinaryReader;
using BinaryWriter = System.IO.BinaryWriter;
namespace FalloutClient {
public partial class DebugEditor : Form
{
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
private struct ByteConverter {
[System.Runtime.InteropServices.FieldOffset(0)]
private int i;
[System.Runtime.InteropServices.FieldOffset(0)]
private float f;
public int GetAsInt(float f) {
this.f = f;
return i;
}
public float GetAsFloat(int i) {
this.i = i;
return f;
}
public byte[] GetAsBytes(ulong ul) {
byte[] b = new byte[8];
for (int i = 0; i < 8; i++) b[i] = (byte)((ul & ((ulong)0xff << (i * 8))) >> (i * 8));
return b;
}
}
private static ByteConverter converter = new ByteConverter();
private enum Mode { Globals, MapVars, SGlobals, Arrays, Critters, LocalVars }
private readonly EditorConnection connection;
private Mode mode;
private readonly Dictionary<int, string> GlobNames = new Dictionary<int, string>();
private readonly Dictionary<uint, string> CritNames = new Dictionary<uint, string>();
private void Redraw() {
bCrittersLvar.Enabled = false;
bEdit.Enabled = false;
Column2.ReadOnly = false;
Column3.ReadOnly = false;
Column2.HeaderText = "Value (Int)";
Column3.HeaderText = "Value (Float)";
dataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect;
dataGridView1.SuspendLayout();
dataGridView1.Rows.Clear();
switch (mode) {
case Mode.Globals:
for (int i = 0; i < connection.Globals.Length; i++) {
string name = GlobNames.ContainsKey(i) ? GlobNames[i] : "";
dataGridView1.Rows.Add(i, name, connection.Globals[i], converter.GetAsFloat(connection.Globals[i]));
}
break;
case Mode.MapVars:
for (int i = 0; i < connection.MapVars.Length; i++) {
dataGridView1.Rows.Add(i, "", connection.MapVars[i], converter.GetAsFloat(connection.MapVars[i]));
}
break;
case Mode.SGlobals:
for (int i = 0; i < connection.SGlobalKeys.Length; i++) {
string s = connection.SGlobalKeys[i] > 0xffffffff
? new string(System.Text.ASCIIEncoding.ASCII.GetChars(converter.GetAsBytes(connection.SGlobalKeys[i])))
: (connection.SGlobalKeys[i].ToString());
dataGridView1.Rows.Add(s, "", connection.sGlobals[i], converter.GetAsFloat(connection.sGlobals[i]));
}
break;
case Mode.Arrays:
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
Column2.ReadOnly = true;
Column3.ReadOnly = true;
Column2.HeaderText = "Array size";
Column3.HeaderText = "Array flags";
bEdit.Enabled = true;
for (int i = 0; i < connection.Arrays.Length; i++) {
bool isMap = connection.ArrayIsMap[i];
int arrlen = connection.ArrayLengths[i];
if (isMap) arrlen /= 2;
dataGridView1.Rows.Add(connection.Arrays[i], isMap ? "Map" : "", arrlen, "0x" + connection.ArrayFlag[i].ToString("x").ToUpper());
}
break;
case Mode.Critters:
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
Column2.ReadOnly = true;
Column3.ReadOnly = true;
Column2.HeaderText = "PID";
Column3.HeaderText = "Pointer";
bEdit.Enabled = true;
bCrittersLvar.Enabled = true;
for (int i = 0; i < connection.Critters.Length / 2; i++) {
uint modcrit = (connection.Critters[i, 0] & 0xfffff);
string name = CritNames.ContainsKey(modcrit) ? CritNames[modcrit] : "";
dataGridView1.Rows.Add(i + 1, name, connection.Critters[i, 0].ToString("x").ToUpper(), connection.Critters[i, 1].ToString());
}
break;
}
dataGridView1.ResumeLayout();
}
internal DebugEditor(EditorConnection connection) {
InitializeComponent();
this.connection = connection;
mode = Mode.Globals;
if (File.Exists(".\\data\\data\\vault13.gam")) {
StreamReader sr=new StreamReader(".\\data\\data\\vault13.gam");
int gvar = 0;
while (!sr.EndOfStream) {
string line = sr.ReadLine().TrimStart();
if (line.StartsWith("GVAR_")) GlobNames[gvar++] = line.Remove(line.IndexOf(':')).TrimEnd();
}
sr.Close();
} else if (File.Exists("globals.txt")) {
StreamReader sr = new StreamReader("globals.txt");
while (!sr.EndOfStream) {
string[] line = sr.ReadLine().Split(' ');
GlobNames[int.Parse(line[0])] = line[1];
}
sr.Close();
}
if (File.Exists("critters.txt")) {
StreamReader sr = new StreamReader("critters.txt");
while (!sr.EndOfStream) {
string line = sr.ReadLine();
CritNames[uint.Parse(line.Remove(line.IndexOf(' ')))] = line.Substring(line.IndexOf(' ') + 1);
}
sr.Close();
}
Redraw();
redrawTimer.Start();
}
private void DebugEditor_FormClosing(object sender, FormClosingEventArgs e) {
connection.WriteDataType(DataTypeSend.Exit);
connection.Close();
}
private void bGlobals_Click(object sender, EventArgs e) {
mode = Mode.Globals;
Redraw();
}
private void bMapVars_Click(object sender, EventArgs e) {
mode = Mode.MapVars;
Redraw();
}
private void bSGlobals_Click(object sender, EventArgs e) {
mode = Mode.SGlobals;
Redraw();
}
private void bArrays_Click(object sender, EventArgs e) {
mode = Mode.Arrays;
Redraw();
}
private void bCritters_Click(object sender, EventArgs e) {
mode = Mode.Critters;
Redraw();
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) {
int[] array = null;
DataTypeSend dts;
switch (mode) {
case Mode.Globals:
array = connection.Globals;
dts = DataTypeSend.SetGlobal;
break;
case Mode.MapVars:
array = connection.MapVars;
dts = DataTypeSend.SetMapVar;
break;
case Mode.SGlobals:
array = connection.sGlobals;
dts = DataTypeSend.SetSGlobal;
break;
default:
return;
}
redrawTimer.Stop();
if (e.ColumnIndex == 2) {
string str = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
int val;
if (str == null || !int.TryParse(str, out val)) {
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = array[e.RowIndex];
} else {
array[e.RowIndex] = val;
connection.WriteDataType(dts);
connection.WriteInt(e.RowIndex);
connection.WriteInt(val);
}
} else {
string str = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
float val;
if (str == null || !float.TryParse(str, out val)) {
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = array[e.RowIndex];
} else {
array[e.RowIndex] = converter.GetAsInt(val);
connection.WriteDataType(dts);
connection.WriteInt(e.RowIndex);
connection.WriteInt(converter.GetAsInt(val));
}
}
redrawTimer.Start();
}
private void bEdit_Click(object sender, EventArgs e) {
if (dataGridView1.SelectedRows.Count == 0) return;
int i = (int)dataGridView1.SelectedRows[0].Tag;
redrawTimer.Stop();
switch (mode) {
case Mode.Arrays: {
DataType[] types = new DataType[connection.ArrayLengths[i]];
int[] lenType = new int[connection.ArrayLengths[i]];
string[] strings = new string[connection.ArrayLengths[i]];
connection.WriteDataType(DataTypeSend.GetArray); // code
connection.WriteInt(i); // index
int lenData = 0;
for (int j = 0; j < strings.Length; j++) {
types[j] = (DataType)connection.ReadInt();
lenType[j] = connection.ReadInt(); // len data of type
lenData += lenType[j];
}
byte[] buf = connection.ReadBytes(lenData); // read data
BinaryReader br = new BinaryReader(new MemoryStream(buf));
for (int j = 0; j < strings.Length; j++) {
switch (types[j]) {
case DataType.None:
br.BaseStream.Position += 4;
break;
case DataType.Int:
strings[j] = br.ReadInt32().ToString();
break;
case DataType.Float:
strings[j] = br.ReadSingle().ToString();
break;
case DataType.String:
byte[] bytes = br.ReadBytes(lenType[j]);
strings[j] = System.Text.Encoding.ASCII.GetString(bytes, 0, Array.IndexOf<byte>(bytes, 0));
break;
}
}
br.Close();
strings = EditorWindow.ShowEditor(this, null, types, strings, connection.ArrayIsMap[i]);
if (strings != null) { // save
MemoryStream ms = new MemoryStream(lenData);
BinaryWriter bw = new BinaryWriter(ms);
for (int j = 0; j < strings.Length; j++) {
switch (types[j]) {
case DataType.None:
bw.BaseStream.Position += 4;
break;
case DataType.Int:
bw.Write(int.Parse(strings[j]));
break;
case DataType.Float:
bw.Write(float.Parse(strings[j]));
break;
case DataType.String:
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(strings[j]);
if (bytes.Length < lenType[j])
bw.Write(bytes);
else
bw.Write(bytes, 0, lenType[j] - 1);
bw.Write((byte)0);
break;
}
}
// send data to sfall
connection.WriteDataType(DataTypeSend.SetArray);
connection.WriteInt(i); // index
connection.WriteInt(lenData);
connection.WriteBytes(ms.GetBuffer(), 0, lenData);
bw.Close();
}
}
break;
case Mode.Critters: {
DataType[] types = new DataType[33];
string[] strings = new string[33];
string[] names = new string[33];
connection.WriteDataType(DataTypeSend.RetrieveCritter);
connection.WriteInt(i);
BinaryReader br = new BinaryReader(new System.IO.MemoryStream(connection.ReadBytes(33 * 4)));
for (int j = 0; j < 33; j++) {
types[j] = DataType.Int;
strings[j] = br.ReadInt32().ToString();
}
br.Close();
names[0] = " ID";
names[1] = " Tile";
names[6] = " Current frame";
names[7] = " Rotation";
names[8] = " FID";
names[9] = " Flags";
names[10] = " Elevation";
names[11] = " Inventory count";
names[13] = " Inventory pointer";
names[14] = " Reaction";
names[15] = " Combat state";
names[16] = " Current AP";
names[17] = " Combat flags";
names[18] = " Last Turn Damage";
names[19] = " AI Packet";
names[20] = " Team";
names[21] = " Who hit me";
names[22] = " HP";
names[23] = " Rads";
names[24] = " Poison";
names[25] = " Proto ID";
names[26] = " Combat ID";
names[29] = " Outline flags";
names[30] = " Script ID";
names[32] = " Script index";
strings = EditorWindow.ShowEditor(this, names, types, strings);
if (strings != null) {
MemoryStream ms = new MemoryStream(33 * 4);
BinaryWriter bw = new BinaryWriter(ms);
for (int j = 0; j < 33; j++) bw.Write(int.Parse(strings[j]));
connection.WriteDataType(DataTypeSend.SetCritter);
connection.WriteInt(i);
connection.WriteBytes(ms.GetBuffer(), 0, 33 * 4);
bw.Close();
}
}
break;
}
redrawTimer.Start();
}
private void bCrittersLvar_Click(object sender, EventArgs e) {
if (dataGridView1.SelectedRows.Count == 0) return;
int i = (int)dataGridView1.SelectedRows[0].Tag;
connection.WriteDataType(DataTypeSend.RetrieveCritter);
connection.WriteInt(i);
BinaryReader br = new BinaryReader(new System.IO.MemoryStream(connection.ReadBytes(33 * 4)));
br.BaseStream.Position = 30 * 4;
int sid = br.ReadInt32();
br.Close();
if (sid != -1) {
connection.WriteDataType(DataTypeSend.GetLocal);
connection.WriteInt(sid);
int totalVar = connection.ReadInt();
string[] values = new string[totalVar];
if (totalVar > 0) {
br = new BinaryReader(new System.IO.MemoryStream(connection.ReadBytes(totalVar * 4)));
for (int j = 0; j < totalVar; j++) {
values[j] = br.ReadInt32().ToString();
}
br.Close();
}
values = EditorWindow.ShowEditor(this, values);
if (values != null) {
int countVar = values.Length;
MemoryStream ms = new MemoryStream(countVar * 4);
BinaryWriter bw = new BinaryWriter(ms);
for (int j = 0; j < countVar; j++) bw.Write(int.Parse(values[j]));
connection.WriteDataType(DataTypeSend.SetLocal);
connection.WriteInt(sid);
connection.WriteInt(countVar);
connection.WriteBytes(ms.GetBuffer(), 0, countVar * 4);
bw.Close();
}
} else {
MessageBox.Show("This critter has no script attached.");
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) {
bEdit.PerformClick();
}
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {
dataGridView1.Rows[e.RowIndex].Tag = e.RowIndex;
}
private void timer1_Tick(object sender, EventArgs e) {
connection.WriteDataType(DataTypeSend.RedrawGame);
}
}
}
@@ -129,4 +129,7 @@
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="redrawTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -3,7 +3,9 @@ using System.Net.Sockets;
using System.IO;
namespace FalloutClient {
class EditorConnection {
class EditorConnection
{
private TcpClient client;
private NetworkStream stream;
private BinaryReader br;
@@ -11,73 +13,81 @@ namespace FalloutClient {
public readonly int[] Globals;
public readonly int[] MapVars;
public readonly uint[] Critters;
public readonly uint[,] Critters;
public readonly ulong[] SGlobalKeys;
public readonly int[] sGlobals;
public readonly uint[] Arrays;
public readonly int[] ArrayLengths;
public readonly int[] ArrayDataSizes;
public readonly int[] ArrayFlag;
public readonly bool[] ArrayIsMap;
public EditorConnection() {
System.Threading.Thread.Sleep(1000);
client=new TcpClient("127.0.0.1", 4245);
stream=client.GetStream();
br=new BinaryReader(stream);
bw=new BinaryWriter(stream);
Globals=new int[br.ReadInt32()];
MapVars=new int[br.ReadInt32()];
SGlobalKeys=new ulong[br.ReadInt32()];
sGlobals=new int[SGlobalKeys.Length];
Arrays=new uint[br.ReadInt32()];
ArrayLengths=new int[Arrays.Length];
ArrayDataSizes=new int[Arrays.Length];
Critters=new uint[br.ReadInt32()];
client = new TcpClient("127.0.0.1", 4245);
stream = client.GetStream();
br = new BinaryReader(stream);
bw = new BinaryWriter(stream);
Globals = new int[br.ReadInt32()];
MapVars = new int[br.ReadInt32()];
SGlobalKeys = new ulong[br.ReadInt32()];
sGlobals = new int[SGlobalKeys.Length];
Arrays = new uint[br.ReadInt32()];
ArrayLengths = new int[Arrays.Length];
ArrayFlag = new int[Arrays.Length];
ArrayIsMap = new bool[Arrays.Length];
Critters = new uint[br.ReadInt32(), 2];
for(int i=0;i<Globals.Length;i++) Globals[i]=br.ReadInt32();
for(int i=0;i<MapVars.Length;i++) MapVars[i]=br.ReadInt32();
for(int i=0;i<sGlobals.Length;i++) {
SGlobalKeys[i]=br.ReadUInt64();
sGlobals[i]=br.ReadInt32();
for (int i = 0; i < Globals.Length; i++) Globals[i] = br.ReadInt32();
for (int i = 0; i < MapVars.Length; i++) MapVars[i] = br.ReadInt32();
for (int i = 0; i < sGlobals.Length; i++) {
SGlobalKeys[i] = br.ReadUInt64();
sGlobals[i] = br.ReadInt32();
br.ReadInt32();
}
for(int i=0;i<Arrays.Length;i++) {
Arrays[i]=br.ReadUInt32();
ArrayLengths[i]=br.ReadInt32();
ArrayDataSizes[i]=br.ReadInt32();
for (int i = 0; i < Arrays.Length; i++) {
Arrays[i] = br.ReadUInt32();
ArrayIsMap[i] = (br.ReadInt32() != 0);
ArrayLengths[i] = br.ReadInt32();
ArrayFlag[i] = br.ReadInt32();
}
for (int i = 0; i < Critters.Length / 2; i++) {
Critters[i, 0] = br.ReadUInt32();
Critters[i, 1] = br.ReadUInt32();
}
for(int i=0;i<Critters.Length;i++) Critters[i]=br.ReadUInt32();
}
public void Close() {
stream.Close();
client.Close();
stream=null;
client=null;
stream = null;
client = null;
}
public void WriteDataType(DataTypeSend type) {
stream.WriteByte((byte)type);
//bw.Write((byte)type);
}
public void WriteByte(byte b) { bw.Write(b); }
public void WriteInt16(short value) { bw.Write(value); }
public void WriteInt(int value) { bw.Write(value); }
public void WriteBytes(byte[] buf) { bw.Write(buf); }
public void WriteBytes(byte[] buf, int start, int len) {
bw.Write(buf, start, len);
}
public void Read(byte[] buffer) {
int upto=0;
while(upto<buffer.Length) {
upto+=stream.Read(buffer, upto, buffer.Length-upto);
int upto = 0;
while (upto < buffer.Length) {
upto += stream.Read(buffer, upto, buffer.Length - upto);
}
}
public void Read(byte[] buffer, int offset, int length) {
int upto=0;
int upto = 0;
//System.Diagnostics.Debug.WriteLine("Read - offset: "+offset+" length: "+length);
while(upto<length) {
upto+=stream.Read(buffer, offset+upto, length-upto);
while (upto < length) {
upto += stream.Read(buffer, offset + upto, length - upto);
}
}
public int ReadByte() {
@@ -29,13 +29,14 @@
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.checkBox = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// bSave
//
this.bSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bSave.Location = new System.Drawing.Point(281, 265);
this.bSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.bSave.Location = new System.Drawing.Point(12, 336);
this.bSave.Name = "bSave";
this.bSave.Size = new System.Drawing.Size(75, 23);
this.bSave.TabIndex = 0;
@@ -46,7 +47,7 @@
// bCancel
//
this.bCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bCancel.Location = new System.Drawing.Point(200, 265);
this.bCancel.Location = new System.Drawing.Point(371, 336);
this.bCancel.Name = "bCancel";
this.bCancel.Size = new System.Drawing.Size(75, 23);
this.bCancel.TabIndex = 1;
@@ -58,49 +59,77 @@
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeight = 22;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3});
this.dataGridView1.Location = new System.Drawing.Point(12, 12);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(344, 247);
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(434, 318);
this.dataGridView1.TabIndex = 2;
this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit);
//
// Column1
//
this.Column1.HeaderText = "Name";
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column1.HeaderText = "Element";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column2
//
this.Column2.HeaderText = "Type";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column2.Width = 75;
//
// Column3
//
this.Column3.HeaderText = "Value";
this.Column3.Name = "Column3";
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 150;
//
// checkBox
//
this.checkBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBox.AutoSize = true;
this.checkBox.Location = new System.Drawing.Point(103, 341);
this.checkBox.Name = "checkBox";
this.checkBox.Size = new System.Drawing.Size(91, 17);
this.checkBox.TabIndex = 3;
this.checkBox.Text = "Values in Hex";
this.checkBox.UseVisualStyleBackColor = true;
this.checkBox.Click += new System.EventHandler(this.checkBox_Click);
//
// EditorWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(368, 300);
this.ClientSize = new System.Drawing.Size(458, 371);
this.Controls.Add(this.checkBox);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.bCancel);
this.Controls.Add(this.bSave);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MinimumSize = new System.Drawing.Size(300, 200);
this.Name = "EditorWindow";
this.Text = "EditorWindow";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Values";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -112,5 +141,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.CheckBox checkBox;
}
}
+131
View File
@@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace FalloutClient {
public enum DataType : int { None = 0, Int = 1, Float = 2, String = 3 }
public partial class EditorWindow : Form
{
private readonly DataType[] types = null;
private string[] values;
private bool save;
private static bool valueInHex = false;
private void ConvertValues(bool toHex) {
for (int i = 0; i < values.Length; i++) {
if (toHex) {
if (types == null || types[i] == DataType.Int) {
int val = int.Parse(values[i]);
values[i] = "0x" + val.ToString("x").ToUpper();
}
} else {
if (types == null || types[i] == DataType.Int) {
values[i] = Convert.ToInt32(values[i], 16).ToString();
}
}
}
}
private EditorWindow(string[] names, DataType[] types, string[] values, bool isMap) {
this.types = types;
this.values = values;
InitializeComponent();
checkBox.Checked = EditorWindow.valueInHex;
dataGridView1.SuspendLayout();
if (valueInHex) ConvertValues(true);
if (names == null)
for (int i = 0; i < types.Length; i++) {
string element = i.ToString();
if (isMap && (i % 2) == 0) element += " - Key";
dataGridView1.Rows.Add(element, types[i].ToString(), values[i]);
}
else
for (int i = 0; i < types.Length; i++) dataGridView1.Rows.Add("[0x" + (i * 4).ToString("x").ToUpper() + "]" + names[i], types[i].ToString(), values[i]);
dataGridView1.ResumeLayout();
}
public static string[] ShowEditor(DebugEditor form, string[] names, DataType[] types, string[] values, bool isMap = false) {
form.redrawTimer.Start();
EditorWindow editor = new EditorWindow(names, types, values, isMap);
editor.ShowDialog();
form.redrawTimer.Stop();
if (editor.save) {
if (valueInHex) editor.ConvertValues(false);
return editor.values;
}
return null;
}
private EditorWindow(string[] values) {
this.values = values;
InitializeComponent();
checkBox.Checked = EditorWindow.valueInHex;
dataGridView1.SuspendLayout();
if (valueInHex) ConvertValues(true);
for (int i = 0; i < values.Length; i++) {
dataGridView1.Rows.Add(i.ToString(), "Int", values[i]);
}
dataGridView1.ResumeLayout();
}
public static string[] ShowEditor(DebugEditor form, string[] lvalues) {
form.redrawTimer.Start();
EditorWindow editor = new EditorWindow(lvalues);
editor.ShowDialog();
form.redrawTimer.Stop();
if (editor.save) {
if (valueInHex) editor.ConvertValues(false);
return editor.values;
}
return null;
}
private bool CheckInput(DataType type, string str) {
switch (type) {
case DataType.Int:
if (valueInHex) {
try {
Convert.ToInt32(str, 16);
return true;
} catch (Exception) {
return false;
}
}
int i;
return int.TryParse(str, out i);
case DataType.Float:
float f;
return float.TryParse(str, out f);
}
return true;
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) {
string str = (string)dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
if (str != null && CheckInput(((types != null) ? types[e.RowIndex] : DataType.Int), str))
values[e.RowIndex] = str;
else
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = values[e.RowIndex];
}
private void bCancel_Click(object sender, EventArgs e) {
Close();
}
private void bSave_Click(object sender, EventArgs e) {
save = true;
Close();
}
private void checkBox_Click(object sender, EventArgs e) {
valueInHex = checkBox.Checked;
ConvertValues(valueInHex);
for (int i = 0; i < values.Length; i++) {
dataGridView1.Rows[i].Cells[2].Value = values[i];
}
}
}
}
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.Windows.Forms;
using System.IO;
namespace FalloutClient {
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (args.Length == 1 && args[0] == "-debugedit") {
Application.Run(new DebugEditor(new EditorConnection()));
} else {
MessageBox.Show("The debug editor can only be run from the game.\n" +
"Use the key assigned to the DebugEditorKey option in ddraw.ini to run the debugger.",
"sfall Debug Editor", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}
}
enum DataTypeSend {
SetGlobal = 0,
SetMapVar = 1,
RetrieveCritter = 2,
SetCritter = 3,
SetSGlobal = 4,
GetArray = 9,
SetArray = 10,
GetLocal = 11,
SetLocal = 12,
Exit = 254,
RedrawGame = 255
}
}
@@ -5,12 +5,12 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FalloutClient")]
[assembly: AssemblyTitle("sfall Debug Editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FalloutClient")]
[assembly: AssemblyCopyright("Copyright © 2009")]
[assembly: AssemblyProduct("sfall")]
[assembly: AssemblyCopyright("Copyright (C) 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("4.1.9.1")]
[assembly: AssemblyFileVersion("4.1.9.1")]
@@ -9,13 +9,28 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FalloutClient</RootNamespace>
<AssemblyName>FalloutClient</AssemblyName>
<AssemblyName>FalloutDebug</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>false</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -27,12 +42,14 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -62,6 +79,18 @@
<DependentUpon>EditorWindow.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -71,6 +100,7 @@
</Target>
-->
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "C:\Games\Fallout2\$(TargetName)$(TargetExt)"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MPClient", "MPClient.csproj", "{80ED0DCE-100E-4EC9-A79D-2FBFA4CAD1E3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SfallDebugEditor", "SfallDebugEditor.csproj", "{80ED0DCE-100E-4EC9-A79D-2FBFA4CAD1E3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+7 -8
View File
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -664,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
-300
View File
@@ -1,300 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using File=System.IO.File;
using StreamReader=System.IO.StreamReader;
using MemoryStream=System.IO.MemoryStream;
using BinaryReader=System.IO.BinaryReader;
using BinaryWriter=System.IO.BinaryWriter;
namespace FalloutClient {
public partial class DebugEditor : Form {
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
private struct ByteConverter {
[System.Runtime.InteropServices.FieldOffset(0)]
private int i;
[System.Runtime.InteropServices.FieldOffset(0)]
private float f;
public int GetAsInt(float f) {
this.f=f;
return i;
}
public float GetAsFloat(int i) {
this.i=i;
return f;
}
public byte[] GetAsBytes(ulong ul) {
byte[] b=new byte[8];
for(int i=0;i<8;i++) b[i]=(byte)((ul&((ulong)0xff<<(i*8)))>>(i*8));
return b;
}
}
private static ByteConverter converter=new ByteConverter();
private enum Mode { Globals, MapVars, SGlobals, Arrays, Critters }
private readonly EditorConnection connection;
private Mode mode;
private readonly Dictionary<int, string> GlobNames=new Dictionary<int, string>();
private readonly Dictionary<uint, string> CritNames=new Dictionary<uint, string>();
private void Redraw() {
dataGridView1.SuspendLayout();
dataGridView1.Rows.Clear();
switch(mode) {
case Mode.Globals:
Column2.ReadOnly=false;
Column3.ReadOnly=false;
Column2.HeaderText="Value (Int)";
Column3.HeaderText="Value (Float)";
bEdit.Enabled=false;
for(int i=0;i<connection.Globals.Length;i++) {
string name=GlobNames.ContainsKey(i)?GlobNames[i]:"";
dataGridView1.Rows.Add(i, name, connection.Globals[i], converter.GetAsFloat(connection.Globals[i]));
}
break;
case Mode.MapVars:
Column2.ReadOnly=false;
Column3.ReadOnly=false;
Column2.HeaderText="Value (Int)";
Column3.HeaderText="Value (Float)";
bEdit.Enabled=false;
for(int i=0;i<connection.MapVars.Length;i++) {
dataGridView1.Rows.Add(i, "", connection.MapVars[i], converter.GetAsFloat(connection.MapVars[i]));
}
break;
case Mode.SGlobals:
Column2.ReadOnly=false;
Column3.ReadOnly=false;
Column2.HeaderText="Value (Int)";
Column3.HeaderText="Value (Float)";
bEdit.Enabled=false;
for(int i=0;i<connection.SGlobalKeys.Length;i++) {
string s=connection.SGlobalKeys[i]>0xffffffff?new string(System.Text.ASCIIEncoding.ASCII.GetChars(converter.GetAsBytes(connection.SGlobalKeys[i]))):("0x"+connection.SGlobalKeys[i].ToString("x"));
dataGridView1.Rows.Add(s, "", connection.sGlobals[i], converter.GetAsFloat(connection.sGlobals[i]));
}
break;
case Mode.Arrays:
Column2.ReadOnly=true;
Column3.ReadOnly=true;
Column2.HeaderText="Array length";
Column3.HeaderText="Element size";
bEdit.Enabled=true;
for(int i=0;i<connection.Arrays.Length;i++) {
dataGridView1.Rows.Add(connection.Arrays[i], "", connection.ArrayLengths[i], connection.ArrayDataSizes[i]);
}
break;
case Mode.Critters:
Column2.ReadOnly=true;
Column3.ReadOnly=true;
Column2.HeaderText="pid";
Column3.HeaderText="";
bEdit.Enabled=true;
for(int i=0;i<connection.Critters.Length;i++) {
uint modcrit=(connection.Critters[i]&0xfffff);
string name=CritNames.ContainsKey(modcrit)?CritNames[modcrit]:"";
dataGridView1.Rows.Add(i+1, name, connection.Critters[i].ToString("x"), "");
}
break;
}
dataGridView1.ResumeLayout();
}
internal DebugEditor(EditorConnection connection) {
InitializeComponent();
this.connection=connection;
mode=Mode.Globals;
if(File.Exists("globals.txt")) {
StreamReader sr=new StreamReader("globals.txt");
while(!sr.EndOfStream) {
string[] line=sr.ReadLine().Split(' ');
GlobNames[int.Parse(line[0])]=line[1];
}
sr.Close();
}
if(File.Exists("critters.txt")) {
StreamReader sr=new StreamReader("critters.txt");
while(!sr.EndOfStream) {
string line=sr.ReadLine();
CritNames[uint.Parse(line.Remove(line.IndexOf(' ')))]=line.Substring(line.IndexOf(' ')+1);
}
sr.Close();
}
Redraw();
}
private void DebugEditor_FormClosing(object sender, FormClosingEventArgs e) {
connection.WriteDataType(DataTypeSend.Exit);
connection.Close();
}
private void bGlobals_Click(object sender, EventArgs e) {
mode=Mode.Globals;
Redraw();
}
private void bMapVars_Click(object sender, EventArgs e) {
mode=Mode.MapVars;
Redraw();
}
private void bSGlobals_Click(object sender, EventArgs e) {
mode=Mode.SGlobals;
Redraw();
}
private void bArrays_Click(object sender, EventArgs e) {
mode=Mode.Arrays;
Redraw();
}
private void bCritters_Click(object sender, EventArgs e) {
mode=Mode.Critters;
Redraw();
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) {
int[] array=null;
DataTypeSend dts;
switch(mode) {
case Mode.Globals:
array=connection.Globals;
dts=DataTypeSend.SetGlobal;
break;
case Mode.MapVars:
array=connection.MapVars;
dts=DataTypeSend.SetMapVar;
break;
case Mode.SGlobals:
array=connection.sGlobals;
dts=DataTypeSend.SetSGlobal;
break;
default:
return;
}
if(e.ColumnIndex==2) {
int val;
if(!int.TryParse(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), out val)) {
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value=array[e.RowIndex];
} else {
array[e.RowIndex]=val;
connection.WriteDataType(dts);
connection.WriteInt(e.RowIndex);
connection.WriteInt(val);
}
} else {
float val;
if(!float.TryParse(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), out val)) {
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value=array[e.RowIndex];
} else {
array[e.RowIndex]=converter.GetAsInt(val);
connection.WriteDataType(dts);
connection.WriteInt(e.RowIndex);
connection.WriteInt(converter.GetAsInt(val));
}
}
}
private void bEdit_Click(object sender, EventArgs e) {
if(dataGridView1.SelectedRows.Count!=1) return;
int i=dataGridView1.SelectedRows[0].Index;
switch(mode) {
case Mode.Arrays: {
DataType[] types=new DataType[connection.ArrayLengths[i]];
string[] strings=new string[connection.ArrayLengths[i]];
connection.WriteDataType(DataTypeSend.GetArray);
connection.WriteInt(i);
for(int j=0;j<strings.Length;j++) types[j]=(DataType)connection.ReadInt();
byte[] buf=connection.ReadBytes(connection.ArrayLengths[i]*connection.ArrayDataSizes[i]);
MemoryStream ms=new MemoryStream(buf);
BinaryReader br=new BinaryReader(ms);
for(int j=0;j<strings.Length;j++) {
ms.Position=j*connection.ArrayDataSizes[i];
switch(types[j]) {
case DataType.Int:
strings[j]=br.ReadInt32().ToString();
break;
case DataType.Float:
strings[j]=br.ReadSingle().ToString();
break;
case DataType.String:
byte[] bytes=br.ReadBytes(connection.ArrayDataSizes[i]);
strings[j]=System.Text.Encoding.ASCII.GetString(bytes, 0, Array.IndexOf<byte>(bytes, 0));
break;
}
}
br.Close();
strings=EditorWindow.ShowEditor(null, types, strings);
if(strings!=null) {
connection.WriteDataType(DataTypeSend.SetArray);
connection.WriteInt(i);
ms=new MemoryStream(connection.ArrayLengths[i]*connection.ArrayDataSizes[i]);
BinaryWriter bw=new BinaryWriter(ms);
for(int j=0;j<strings.Length;j++) {
ms.Position=j*connection.ArrayDataSizes[i];
switch(types[j]) {
case DataType.Int:
bw.Write(int.Parse(strings[j]));
break;
case DataType.Float:
bw.Write(float.Parse(strings[j]));
break;
case DataType.String:
byte[] bytes=System.Text.Encoding.ASCII.GetBytes(strings[j]);
if(bytes.Length<connection.ArrayDataSizes[i]) bw.Write(bytes);
else bw.Write(bytes, 0, connection.ArrayDataSizes[i]-1);
bw.Write(0);
break;
}
}
connection.WriteBytes(ms.GetBuffer(), 0, connection.ArrayLengths[i]*connection.ArrayDataSizes[i]);
bw.Close();
}
}
break;
case Mode.Critters: {
DataType[] types=new DataType[29];
string[] strings=new string[29];
string[] names=new string[29];
connection.WriteDataType(DataTypeSend.RetrieveCritter);
connection.WriteInt(i);
BinaryReader br=new BinaryReader(new System.IO.MemoryStream(connection.ReadBytes(29*4)));
for(int j=0;j<29;j++) {
types[j]=DataType.Int;
strings[j]=br.ReadInt32().ToString();
names[j]="0x"+(j*4).ToString("x");
}
br.Close();
names[1]="Tile";
names[10]="Elevation";
names[11]="Inventory count";
names[13]="Inventory pointer";
names[16]="Current AP";
names[17]="Crippled limbs";
names[22]="HP";
names[23]="Rads";
names[24]="Poison";
names[25]="Proto ID";
strings=EditorWindow.ShowEditor(names, types, strings);
if(strings!=null) {
MemoryStream ms=new MemoryStream(29*4);
BinaryWriter bw=new BinaryWriter(ms);
for(int j=0;j<29;j++) bw.Write(int.Parse(strings[j]));
connection.WriteDataType(DataTypeSend.SetCritter);
connection.WriteInt(i);
connection.WriteBytes(ms.GetBuffer(), 0, 29*4);
bw.Close();
}
}
break;
}
}
}
}
-56
View File
@@ -1,56 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace FalloutClient {
public enum DataType : int { None=0, Int=1, Float=2, String=3 }
public partial class EditorWindow : Form {
private readonly DataType[] types;
private readonly string[] values;
private bool save;
private EditorWindow(string[] names, DataType[] types, string[] values) {
this.types=types;
this.values=values;
InitializeComponent();
dataGridView1.SuspendLayout();
if(names==null) for(int i=0;i<types.Length;i++) dataGridView1.Rows.Add(i.ToString(), types[i].ToString(), values[i]);
else for(int i=0;i<types.Length;i++) dataGridView1.Rows.Add(names[i], types[i].ToString(), values[i]);
dataGridView1.ResumeLayout();
}
public static string[] ShowEditor(string[] names, DataType[] types, string[] values) {
EditorWindow editor=new EditorWindow(names, types, values);
editor.ShowDialog();
if(editor.save) return editor.values;
else return null;
}
private bool CheckInput(DataType type, string str) {
switch(type) {
case DataType.Int:
int i;
return int.TryParse(str, out i);
case DataType.Float:
float f;
return float.TryParse(str, out f);
}
return true;
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) {
string str=(string)dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
if(CheckInput(types[e.RowIndex], str)) values[e.RowIndex]=str;
else dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value=values[e.RowIndex];
}
private void bCancel_Click(object sender, EventArgs e) {
Close();
}
private void bSave_Click(object sender, EventArgs e) {
save=true;
Close();
}
}
}
-28
View File
@@ -1,28 +0,0 @@
using System;
using System.Windows.Forms;
using System.IO;
namespace FalloutClient {
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if(args.Length==1&&args[0]=="-debugedit") {
Application.Run(new DebugEditor(new EditorConnection()));
} else {
throw new Exception("Multiplayer is no longer supported");
}
}
}
enum DataTypeSend {
Mouse=0, LMouseDown=1, LMouseUp=2, RMouseDown=3, RMouseUp=4, TakeChar=5, ReleaseChar=6,
SetGlobal=0, SetMapVar=1, RetrieveCritter=2, SetCritter=3, SetSGlobal=4, GetArray=9, SetArray=10,
Exit=254
}
}
+52 -4
View File
@@ -1,16 +1,64 @@
# sfall
A set of engine modifications for the classic game Fallout 2 in form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
[![License](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Dev Build](https://github.com/phobos2077/sfall/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/phobos2077/sfall/actions/workflows/build.yml)
[![GitHub Pages](https://github.com/phobos2077/sfall/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/phobos2077/sfall/actions/workflows/gh-pages.yml)
Engine modifications include:
A set of engine modifications for the classic game Fallout 2 in the form of a DLL, which modifies executable in memory without changing anything in EXE file itself.
**Engine modifications include:**
- Better support for modern operating systems
- Externalizing many settings like starting map and game time, skills, perks, critical hit tables, books, etc.
- Bug fixes
- Many additional features for users, such as item highlight button, party member control, etc.
- Extended scripting capabilities for modders (many new opcodes to control sfall features as well as previously unavailable vanilla engine functions)
Original author: **Timeslip**
Original author: timeslip
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows Fallout to run correctly on modern operating systems, and adds additional features for modders.
Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows fallout to run correctly on modern operating systems, and adds additional features for modders.
## Installation
- Download `sfall_*.7z` from the [release archive](https://sourceforge.net/projects/sfall/files/).
- Extract `ddraw.dll`, `ddraw.ini`, and `sfall.dat` to Fallout's base directory (i.e. the one that contains `fallout2.exe`).
- __Important Note:__\
If you are using a mod that already included sfall (e.g. killap's [Unofficial Patch](https://github.com/BGforgeNet/Fallout2_Unofficial_Patch) or [Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project)), then that mod has probably included a custom modified `ddraw.ini`. In that case, overwriting it with sfall's vanilla `ddraw.ini` will be likely break your game. Instead, only overwrite `ddraw.dll`, and keep the mod's existing copy of `ddraw.ini`. (Or, if you know what you're doing, you can merge them together by hand.)
- The folder `translations` contains translations of some of the strings that sfall displays in the game. To use a translation, copy this folder to Fallout's base directory too, and then in `ddraw.ini` change the __TranslationsINI__ setting to `.\translations\<your language>.ini`.
## Uninstallation
Delete `ddraw.dll`, `ddraw.ini`, and `sfall.dat` from your Fallout directory.
## Usage
This mod is configured via the `ddraw.ini` file, which can be opened with any text editor. Details of every configerable option are included in that file. Where a comment refers to a DX scancode, the complete list of codes can be found at the link below:\
https://kippykip.com/b3ddocs/commands/scancodes.htm
In a default installation using an unmodified copy of `ddraw.ini`, the middle mouse button will be set to switch between weapons and the mouse wheel will be set to scroll through any menus that respond to the up/down arrow keys. Holding **Ctrl** and hitting numpad keys 0 to 6 (with Num Lock off) will adjust the game speed. Holding **left Ctrl** will let you move items between inventory lists by simply clicking on them. Pressing **left Shift** will highlight items on the ground, and holding the key will let you move an entire stack of items at once. The script extender and any engine fixes are also enabled. Most of the options that change gameplay in some way not originally intended by the developers are disabled.
For [__Wine__](https://www.winehq.org/) users:\
You need to set DLL overrides for `ddraw.dll` to __"native, builtin"__ in `winecfg` or use `WINEDLLOVERRIDES="ddraw=n,b"` to run Fallout from the command line. If you want to play alternative sound files, you'll also need to install GStreamer Good 32-bit plugins.
## Build Instructions
### Prerequisites:
* Visual C++ 2010 Express SP1 or Visual Studio 2010 SP1.
* [DirectX SDK (February 2010)](https://archive.org/details/dxsdk_feb10). You will also need `dinput.lib` from DXSDK August 2007. The file can be found in the [DirectX SDK Collection repo](https://github.com/NovaRain/DXSDK_Collection).
* [DirectX Runtime (June 2010)](https://www.microsoft.com/en-us/download/details.aspx?id=8109).
### Steps:
1. Set up a `postbuild.cmd` using the template from the repo.
2. Open the solution file and build with the **Release** configuration.
3. If everything is set up correctly, you should have a new sfall `ddraw.dll` in your Fallout 2 directory.
## Additional info
* [Changelog](CHANGELOG.md)
* [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)

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