phobos2077
6d5b08f761
Healing skill mod: fix inaccurate behavior and refactoring
2024-05-24 17:54:20 +02:00
phobos2077
18e976ded9
Healing skills implementation in SSL, v2
...
- Got rid of duplicate code with one function instead of switch/case, while keeping logic (hopefully) unchanged
2024-05-24 02:36:00 +02:00
phobos2077
c986298fe0
Healing skills implementation in SSL
...
- (almost) exact copy of engine logic in script, for making healign mods
2024-05-24 00:59:14 +02:00
phobos2077
522219d72b
Code cleanup and better comments
2024-05-21 16:06:33 +02:00
phobos2077
22aed0e663
Auto balance barter tables when dragging caps around
2024-05-21 15:31:37 +02:00
phobos2077
6b818e797e
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 12:41:02 +02:00
phobos2077
037269c940
Add useful comments to most header lib procs and macros
2024-05-19 00:15:57 +02:00
phobos2077
6dafb3e8c6
CautiousNatureDistanceBonus
2024-05-17 00:17:22 +02:00
phobos2077
15432e15f4
Debug window patch: minor refactoring
2024-05-12 10:53:49 +02:00
phobos2077
09b9982a67
Settings to ddraw.ini
2024-05-12 10:00:36 +02:00
phobos2077
5bb108d0e2
Add options to adjust internal debug window size and text font
2024-05-12 10:00:36 +02:00
phobos2077
44e7a67cea
Remove IFACE frms
2024-05-11 11:15:51 +02:00
phobos2077
9a7a795b82
ActionPointsBar: language agnostic FRM
...
- Use one small FRM with just AP bar background instead of having 2 big FRMs per language (for HRP and not)
- It works by simply writing into iface window buffer right after it was written with iface.frm contents
- Uses position relative to right edge of the iface panel
2024-05-11 11:11:58 +02:00
phobos2077
08efe382e4
Small INVBOX_E.frm tweak to remove visible seams
2024-05-11 11:11:25 +02:00
phobos2077
fa8a42eff3
Expanded UI bug fixes (2)
...
- HRP compatibility: add support for the current HRP version by patching window Y value directly to it's code
- Barter Window: fixed mouse wheel scrolling not working over extended areas of 2 central tables
2024-05-09 16:04:18 +02:00
phobos2077
b5af3b04fc
Expanded UI bug fixes
...
- HRP compatibility: disable ExpandedBarter patch with external HRP due to hack conflict leading to crash (fixes_dialog.cpp:904)
- Main inventory: fix dropping items from armor/hand slots into expanded area not registering
- Loot/barter: fix mouse wheel scroll feature not registering expanded area of target windows
2024-05-09 11:54:14 +02:00
phobos2077
cc12986d2f
Code review fix + Russian expanded FRM's
...
- GetUnlistedFrmPath: remove unused path parameter
- Add RU FRM's (by NovaRain)
2024-05-09 09:33:06 +02:00
phobos2077
ab9844ccdd
Fix usage of unloaded FRM's
2024-05-09 01:27:04 +02:00
phobos2077
c850c2ec4f
Final preparations for extended UI patches
...
- Reduced inventory UI height by 8 pixels and moved all Done buttons down
- Renamed all extra FRM files
- Added checks that all required FRMs exist before applying patch
- Add final FRM files (EN versions)
- Minor refactoring
2024-05-08 20:48:11 +02:00
phobos2077
ed44706c9f
ExtendedBarter: fix crashes when scrolling in/out
2024-05-08 20:44:33 +02:00
phobos2077
bf3f5d2930
Replace all usage of LoadUnlisted with fo::FrmFile
...
- Move cached FRM/PCX loading to new ExtraArt module
- Use the same FRM cache for all unlisted FRM needs
- Minor refactoring
2024-05-08 20:44:33 +02:00
phobos2077
344a64f9d2
Split one expanded UI patch into 2 and add minimum resolution check
...
- Rename and split patch into 2: inventory and barter
- Add instructions for inventory patch
- Minor patch code cleanup
2024-05-08 20:42:40 +02:00
phobos2077
31713022db
Extend all 6-slot inventory windows to 8 slots
2024-05-08 20:41:01 +02:00
phobos2077
0150c8f42d
Barter extra slots: polishing
...
- Make windows transparent to allow for non-square art
- Use correct art when scrolling window down
2024-05-08 20:41:01 +02:00
phobos2077
a43186df7a
Barter extra slots: Make optional by using LoadUnlistedFrm to replace default FRM
2024-05-08 20:41:01 +02:00
phobos2077
625e424d4a
Proof of concept: extend barter screen inventory windows to 4 slots each
2024-05-08 20:41:01 +02:00
phobos2077 and NovaRain
8f10169661
Add docs and macro for new opcode
2024-05-07 20:35:57 +08:00
phobos2077 and NovaRain
76f198e567
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 unnecessary loading from disk
- When path is used, cache loaded FRM/PCX files
- Add art_frame_data to read FRM/PCX size by FID/filename
2024-05-07 20:35:57 +08:00
phobos2077
553c7cc195
Renamed string_pos back to string_find to make meaning more obvious
2023-08-07 20:01:21 +02:00
phobos2077
5d7015bbb5
Headers update
...
- Synced a small number of defines from RPU headers
- Removed duplicate defines from define_lite
2023-07-30 22:24:44 +02:00
phobos2077
f0ec82923d
EnginePerks: fixes
...
- Remove duplicate Salesman tweak
- Decoupled hacks for multi-perk-level support for Salesman and Demolition Expert from the bonus value change
- Renamed settings for consistency ("<PerkName>Bonus" when it has only one effect)
2023-07-30 22:00:04 +02:00
phobos2077
cd5c803386
EnginePerks: rewritten and expanded
...
- Got rid of unused and repeated code
- Added all perk skill bonuses
2023-07-30 19:58:34 +02:00
phobos2077
5c3c1ca4db
Header fixes
...
- Fix conflict with RPU command_extra.h
- Fix undefined debug_array_str error
2023-07-24 00:56:01 +02:00
phobos2077
4c441d5852
Fix incorrect int->float conversion in op_sub ( closes #488 )
2023-07-22 21:22:27 +02:00
phobos2077
5394352bf0
HOOK_STEAL: add ret0 value 2 to fail "silently"
2023-07-22 13:43:23 +02:00
phobos2077
f267224428
HOOK_STEAL: return value improvements
...
- Allow to use vanilla handler but only override experience in case of success
- Treat both return values less than -1 the same as -1
2023-07-22 10:43:18 +02:00
phobos2077
b189fe9252
HOOK_STEAL: ret1 to override experience for successful stealing
2023-07-22 04:21:05 +02:00
phobos2077
b2c9b1cc23
HOOK_STEAL: add arg4 - quantity of items stolen
2023-07-22 03:29:31 +02:00
phobos2077
a2ea1910f5
Minor header and readme edits
2023-07-10 23:56:58 +02:00
phobos2077
66559812bd
Updated headers
...
- Add a bunch of array-related procs to unlock basic functional programming
- Fix error with FUNC_SELECTOR_7
2023-07-05 02:31:47 +02:00
phobos2077
f968dea5e7
string_pos: use negative pos value how it works in substr
2023-07-05 01:47:47 +02:00
phobos2077
664fb84dc5
string_find renamed to string_pos + header update
...
- Renamed get_clamped to math_clamp for consistency (libs should use namespace prefixes)
- Nuked above/below macros and renamed unsigned_comp to insigned_int_compare, because it doesn't work with floats
- Replaced sprintf2 and string_pos with macros (due to new metarules)
- Add a few entries to functions.yml
2023-07-04 21:06:35 +02:00
phobos2077
74ef65335d
Add string_find metarule
...
- lib.inven.h: Updated remove_items_pid to return actually removed quantity
2023-07-04 20:19:38 +02:00
phobos2077
0bb5941c98
IniReader: Remove bufSize argument when it's not used ( closes #485 )
...
- Fix return value of getString with buffer argument
- Increase max line length to 2048
2023-06-27 00:14:00 +02:00
phobos2077
3e4e9ff4e6
Console window improvements
...
- Retain maximized/minimized state
- Save normal position when closing in maximized/minized state
- Allow to move window in negative x direction
- Disable close button
- Save position if game was closed by pressing Alt+F4 in console window
2023-06-26 23:31:06 +02:00
phobos2077
5f38744a2e
De-shittify string_format ( closes #482 )
2023-06-25 00:24:24 +02:00
phobos2077
c0aac45b0c
ConsoleWindow: attempt to fix position jumping
2023-06-24 13:12:38 +02:00
phobos2077 and NovaRain
3f8d322697
Fix container highlight condition
2023-06-24 07:59:16 +08:00
phobos2077 and NovaRain
50b51fc1a3
Highlighting mod update
...
- Optional highlighting of critters, using the same colors and rules as in the combat mode
- Holding highlight key will update outlines based on current positions
- Enable LOS check by default for more interesting looting
2023-06-24 07:59:16 +08:00
phobos2077
e1aebb21e4
op_create_spatial: fix spatial object having no scriptIndex upon creation
2023-06-24 01:58:17 +02:00
phobos2077
a5075734cc
ConsoleWindow: prevent user from messing up window position & size
2023-06-24 01:57:27 +02:00
phobos2077
4adb6dffe2
get_ini_config - reset array cache to prevent wrong arrays being returned!
2023-06-21 23:32:33 +02:00
phobos2077
3a3760704c
Load order: more informative logging
2023-06-20 20:44:57 +02:00
phobos2077
e33a025c62
get_ini_config: sanitize and validate INI path
2023-06-18 15:01:25 +02:00
phobos2077
20088ffcb1
Save window positions in OnBeforeGameClose
...
- This way we can guarantee sfall has not started to "destruct" yet, so we don't have to rely on the order of destructor calls
2023-06-18 00:41:45 +02:00
phobos2077
cec091bda2
IniReader: Remove ini file from cache when it's changed by SetString
...
- Had to reorganize some code to make this work. Changed how some singletons are created to guarantee destructor calls in correct order (IniReader is constructed first and destructed last, after every other module).
2023-06-17 23:33:37 +02:00
phobos2077
4d19fa2d60
Use single function for all string-to-integer conversions for consistent behavior
...
- Reading INI from within sfall as well as get_ini_setting opcode
- calling atoi opcode
- Support auto-detecting 0x, 0 and 0b for hex, octal and binary representations respectively
2023-06-16 16:06:24 +02:00
phobos2077
0a6a604abc
Add support for using 0b prefix in INI files to denote binary base (consistent with GetPrivateProfile*)
2023-06-16 15:10:25 +02:00
phobos2077
2cef5310e2
Rewrite console writing
...
- Separate debug_msg and display_msg as separate Source
- Merge writing to one function with proper filtering
2023-06-16 14:57:41 +02:00
phobos2077
fe7aa9ae04
Removed unused code
2023-06-16 02:16:25 +02:00
phobos2077
b36771da48
Increase maximum size of one INI line to 1023 and fix potential crash in IniReader::getString()
...
- Now can read strings up to 1021 from INI files using all available functions (get_ini_string, get_ini_section, get_ini_config)
2023-06-16 00:53:03 +02:00
phobos2077
ad6491d61e
Increase array string limit to 1024 bytes
...
- Because it is now safe to log longer stuff
2023-06-16 00:16:36 +02:00
phobos2077
4de5de6a0c
Restore code page option from NovaRain
2023-06-16 00:02:55 +02:00
phobos2077
347b4a3ecb
Fix buffer overflow when DebugMode is enabled and printing messages longer than 259 via script
...
- Refactoring: moved ConsoleWindow into separate file
2023-06-15 23:57:41 +02:00
phobos2077
0b161c7374
Rename metarule for consistency with other ini-related functions, add to functions.yml
2023-06-15 21:48:06 +02:00
phobos2077
7bbc15ab0b
Made Config queries case-insensitive for both section names and keys to match GetPrivateProfile* behavior
2023-06-15 21:01:24 +02:00
phobos2077
ac02971d61
get_ini_section(s): switched to using Config class
...
- Load configs via IniReader to take advantage of it's cache
2023-06-15 19:28:52 +02:00
phobos2077
e4ea3645d6
Add config_load metarule to efficiently load INI into array and also load INI from DAT
...
- Refactoring: moved all ini-related handlers into new cpp
- Moved modified_ini opcode to C++
2023-06-15 19:01:07 +02:00
phobos2077
3f7ce8c412
Custom Config parser based on Vanilla & Fallout CE
2023-06-15 15:30:46 +02:00
phobos2077
6d3afd4e7d
Attempt to fix config reader memory allocation issues (unsuccessful)
2023-06-15 15:30:46 +02:00
phobos2077
2fcf81cb78
Read all ini's using built-in FO config parser
2023-06-15 15:30:46 +02:00
phobos2077
b8c52304eb
Add precise time measurements for: Sfall Init, Game Init, New Game start and Save game load.
2023-06-15 15:30:24 +02:00
phobos2077
5f38a934ca
Console improvements
...
- Save & restore window position
- Fix display_msg not mirrored to console
- Fix log prefixes showing up mid line
2023-06-14 21:34:57 +02:00
phobos2077
3c40518e87
Make sfall logs a little prettier
2023-06-14 20:01:13 +02:00
phobos2077
dc665cb741
Debugging.ConsoleWindow option
2023-06-13 23:09:21 +02:00
phobos2077
d7127a4deb
Fix crash in debug mode due to __stdcall not being explicitly specified for C++ function ( closes #476 )
2023-06-13 19:45:11 +02:00
phobos2077
f5e7235a80
get_tile_fid: take FRM Limit patch into account by extending FRM mask from 12 to 14 bits
2023-06-13 01:10:23 +02:00
phobos2077
0fef6f1f8c
mods_order: remove comments before other checks, to prevent valid paths being ignored
2023-06-12 19:55:33 +02:00
phobos2077
4b9008d53c
get_tile_fid correct for backwards compatibility and flexibility
...
- Allow to pass elevation using the free bits of the tileNum value to access elevations 1 and 2 (instead of defaulting to dude_elevation, which is not how it worked before)
- Access roof FID and raw data using mode flags in the top 4 bits
2023-06-12 18:26:28 +02:00
phobos2077
0d960ca326
Fix get_tile_fid function to work on elevations 1 and 2
...
- Since it has no second argument, assume dude elevation
- Rewrite into new opcode system
2023-06-12 16:44:07 +02:00
phobos2077
94388d3470
LoadOrder update
...
- Rename to "mods_order.txt"
- Create "mods" folder if it doesn't exist before creating an empty mods_order.txt
- Trim space and tab characters
- Allow comments after file names with ; or # (INI-style)
2023-06-12 11:59:10 +02:00
phobos2077
208cacc4dd
load_order.txt per #469
2023-06-12 11:59:10 +02:00
phobos2077
f222348b25
Update docs, remove deprecated macro
2023-06-12 11:55:06 +02:00
phobos2077
49cf0e6726
Allow passing string directly to set_sfall_return in HOOK_DESCRIPTIONOBJ
...
- HookScripts: track return types in addition to values
- Set allowNonIntReturn in hook code to allow non-int return values to be accepted
- Moved get_sfall_arg and set_sfall_return opcodes to the new table
2023-06-12 11:52:12 +02:00
phobos2077
d107edbb23
invenWieldFunc fix for putting non-armor, non-weapon items into hand slot
2023-06-11 20:12:11 +02:00
phobos2077
e9f8984819
Script Headers: fix remove_items_pid function and fix naming
...
- It didn't take different stacks of items into account as well as cases where one item is in the backback and other in the slot and you need to remove both
2023-06-11 14:07:44 +02:00
phobos2077
1c34f85789
Add get_combat_free_move for better mod compatibility
2023-06-08 21:36:09 +02:00
phobos2077
21fe99a297
Docs: Clarification about get_ini_* function return values
...
- Also updated lib.strings.h
2023-06-04 20:32:43 +02:00
phobos2077
ac1abf71f8
Corrected hook documentation
2023-06-04 12:02:11 +02:00
phobos2077
bfc9fd4d88
Add set_combat_free_move metarule and 2 arguments to STDPROCEDURE to make it more useful
2023-06-04 11:59:13 +02:00
phobos2077
f755e0a1dc
Header update
2023-06-04 11:59:13 +02:00
phobos2077
d5268f3fbc
Small update to headers
2023-05-25 02:37:51 +02:00
phobos2077
a3cfc481a5
Remove postbuild.cmd from git
2023-05-16 18:50:13 +02:00
phobos2077
427a978bb4
Implemented YAAM damage formula in script
2023-05-14 23:31:40 +02:00
phobos2077
e6e941e14c
Updated gl_compute_damage example script to work as 1:1 reflection of vanilla damage formula
...
- In hope that this will make it easier for someone to write his own damage formula
2023-05-14 22:50:33 +02:00
phobos2077
493003af54
Updated some defines
...
- ATKMODE defines removed to avoid confusion - these are really two 4-bit fields, not bit flags!
2023-05-14 01:44:15 +02:00
phobos2077
1683678657
Revert adding RMOBJ to avoid duplication from devine_extra.h
2023-05-08 10:38:35 +02:00
phobos2077
a05207cc83
Add some missing script defines
2023-05-08 02:53:31 +02:00
phobos2077
c2e6d743a3
Changed LoadGame_after to be called before LoadGame state is ended #94
2017-05-20 18:10:59 +07:00
phobos2077
0486192c3c
Updated rebracer.xml
2017-05-03 22:47:40 +07:00