Commit Graph
100 Commits
Author SHA1 Message Date
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
phobos2077 83f2d48668 Fix hero appearance bug (#92) and broken sfall global variables
- Changed LoadGame_before function to be called AFTER GameReset when loading the game
- Don't set appearance globals in RefreshPCArt function
- Moved functions for saving/loading appearance globals into HeroAppearance.cpp
2017-04-24 16:37:53 +07:00
phobos2077 fd4fe5fd0e HeroAppearance: Fixed AppStyle and AppRace frms not being loaded and drawn #94 2017-04-24 13:41:05 +07:00
phobos2077 85020d66f2 Added new functions into docs #90 2017-04-15 22:17:42 +07:00
phobos2077 629641eb96 Added new HOOK_CARTRAVEL #90 2017-04-15 21:59:18 +07:00
phobos2077 0af8010861 Added scripting function "set_car_intface_art" #90 2017-04-15 02:04:21 +07:00
phobos2077 addccd2bc6 Added rebracer.xml 2017-04-12 00:35:25 +07:00
phobos2077 8a0ac2082e Fixed some override structs not being initialized on starting the game, leading to min/max skills/stats/hit chances being wrong #92 2017-04-12 00:35:10 +07:00
phobos2077 d484be45c8 Added function car_gas_amount #90
- Sorted some defines
- Minor code formatting fixes
2017-04-08 13:48:14 +07:00
phobos2077 e34a00148f Fixed path do Delegate.h in Inventory.h 2017-04-05 00:40:24 +07:00
phobos2077 478684f8ef Enabled Elevators module and fixed incorrect loading from Elevators.ini 2017-04-05 00:16:30 +07:00
phobos2077 e2a383511d Refactor opcodes in Objects.cpp
- Added missing argument type checks
- Replace asm blocks with wrapper function calls
- Use GameObject instead of DWORD
2017-04-03 23:27:33 +07:00
phobos2077 116c522bdc Moved hard-coded "ControlCombat" mod from sfall into a global script #87
- Exactly the same functionality and settings
- Mod settings are now in sfall-mods.ini
2017-04-01 21:11:19 +07:00
phobos2077 9531fcbebd Added new hook script HOOK_COMBATTURN - runs before and after every turn in combat 2017-04-01 20:31:19 +07:00
phobos2077 76a946c72e Moved all combat-related hook scripts into separate unit 2017-04-01 16:09:34 +07:00
phobos2077 20bc5b9fd6 Make modules interfaces public 2017-04-01 16:01:53 +07:00
phobos2077 dcc471fc47 Reorganize HookScripts.cpp
- Moved most hook script implementations into several separate files
- Group HS implementations together by their category
2017-04-01 15:57:25 +07:00
phobos2077 d881dc9e89 Make Metarule.cpp more accessible
- Improve comments
- Rename metaruleTable and move it on top of the file
- Use C++ style iteration
2017-04-01 03:28:50 +07:00
phobos2077 fef690c2c2 Merge branch 'feature/armor-appearance' into develop 2017-04-01 02:21:58 +07:00
phobos2077 5bbdcbd2db Added final version of NPC armor appearance script, compatible with both HeroAppearance mod and set_dude_obj (NPC control) function #82 2017-04-01 02:21:12 +07:00
phobos2077 24e9dde577 Add missing code for real_dude_obj 2017-04-01 02:15:09 +07:00
phobos2077 029419db3d Added real_dude_obj scripting function, useful for checking if currently controlling NPC or "real" character 2017-04-01 02:14:27 +07:00
phobos2077 6e0fe881df Added new hook script for controlling FID of character figure on inventory screen 2017-04-01 02:12:20 +07:00
phobos2077 203dcdf6be Refactor adjust_fid function, make it compatible with NPC control, Hero Appearance and NPC Armor appearance mods 2017-04-01 00:20:00 +07:00
phobos2077 34500d9dd5 Replace adjust_fid engine function with C++ implementation 2017-03-31 20:55:45 +07:00
phobos2077 cbe987df25 First prototype of armor appearance mod (hook-based)
- Add test version of gl_npcarmor script with config file for FO2 RP
- Add some useful scripting headers
- Add new scripting functions to sfall.h
2017-03-30 01:20:44 +07:00
phobos2077 5dadba6e56 Better solution for NPC inventory FID: skip reading from proto, use existing art instead (partially fixes incompatibility with armor appearance mod);
Fixed conflict with HeroAppearance mod (assumed adjust_fid was always called for "real" Dude)
2017-03-28 02:49:55 +07:00
phobos2077 b592d6bdbe PartyControl: added fix for displaying proper NPC art in inventory screens (not taking armor into account - like vanilla game); removed redundant SetInventoryCheck function; minor refactoring (not compatible with current scripted implementation of NPC armor appearance mod) 2017-03-28 01:26:40 +07:00
phobos2077 0fe6c2a426 Fixed crash after barter 2017-03-27 23:42:34 +07:00
phobos2077 32564d64d1 Added scripting functions for reading INI sections 2017-03-27 04:07:16 +07:00
phobos2077 897f1ab323 Fixed bug and added description for new scripting function #17 2017-03-27 00:58:06 +07:00
phobos2077 4e3168e2e3 Added function set_dude_obj to take control of any critter at any time [EXPERIMENTAL] #17 2017-03-27 00:18:27 +07:00
phobos2077 8a65172927 Minor refactoring of PartyControl 2017-03-27 00:17:37 +07:00
phobos2077 778230dde1 Added item_weight script function;
Return -1 on metarule argument validation error (to match normal opcodes) #63
2017-03-26 23:16:35 +07:00
phobos2077 6a78206c2e Added SafeWriteBatch function for writing the same value to a list of addresses;
Rewrite AnimationsAtOnceLimit: get rid of redundant loops and unsafe heap allocations
2017-03-26 22:06:27 +07:00
phobos2077 c519fb6fb6 Replaced all usages of MakeCall with 3 arguments with either MakeJump or MakeCall (2 arguments) - code readability. 2017-03-26 20:10:44 +07:00
phobos2077 96fa2668cc Reduce duplication in HookScripts's hooking code using HookCalls; Added function MakeJump to improve code readability 2017-03-26 20:00:49 +07:00
phobos2077 c32dc7664e Added new modes for get_game_mod to match Crafty's; implemented HookCalls function to reduce code duplication #66 2017-03-26 19:41:04 +07:00
phobos2077 f2243f2874 Added definitions for AnimationSet structures (based on Crafty's work); refactor Proto struct definitions, added a couple of static asserts for safety 2017-03-23 01:57:06 +07:00
phobos2077 52e24a4dd4 Added a hack from Crafty that allows to use reg_anim_animate() inside combat_p_proc without game hanging in eternal loop #75 2017-03-23 01:13:49 +07:00
phobos2077 7bbe84feef Fixed TOHIT hook issues: added 3 missing hook arguments, fixed incorrect attack type argument being passed to vanilla function, thus potentially breaking vanilla to hit calculations, even when not using any scripts at all 2017-03-18 21:45:28 +07:00
phobos2077 c83fe0690b Merge branch 'develop' of https://github.com/phobos2077/sfall into develop 2017-03-18 20:26:11 +07:00
phobos2077 76e32e1bef InputFuncs: added OnMouseClick delegate, moved debug editor related code into new module;
HookScripts: added check for map being loaded in MouseClick hook, minor renaming.
2017-03-18 20:23:34 +07:00
phobos2077 1f74aa5c22 Refactor LoadGameHook: replaced MainMenuLoop hook with separate game_reset and main_init_system hooks #83 2017-03-18 18:24:08 +07:00
phobos2077andNovaRain b48549b524 Fixed 0 prices in all shops when not using barter mods
(cherry picked from commit 2d278bf4c7)
2017-03-18 10:34:01 +08:00
phobos2077 2525e8a005 Prevent crashes due to global scripts being executed during game closing 2017-03-18 03:21:50 +07:00
phobos2077 7c661ce408 Merge branch 'develop' of https://github.com/phobos2077/sfall into develop 2017-03-18 02:59:04 +07:00
phobos2077 2d278bf4c7 Fixed 0 prices in all shops when not using barter mods 2017-03-18 02:58:41 +07:00
phobos2077 2fbf4a0518 Add notes for new scripting functions 2017-03-16 02:01:29 +07:00
phobos2077 9514602f91 Removed CommonTypes.h, it's redundant because with precompiled header, Windows.h defines are available everywhere 2017-03-16 01:33:11 +07:00
phobos2077 adf8dd13dd Moved highlighting-related settings into new "sfall-mods.ini", dedicated for scripted sfall mods;
Reverted description for MotionScannerFlags 1 and 2, it was actually correct before.
2017-03-16 01:21:20 +07:00
phobos2077 c5698d74ce Update documentation on hook scripts 2017-03-14 02:24:30 +07:00
phobos2077 afadbb71c4 Refactor highlighting mod script, added check for outlined_object (via new scripting function), updated ddraw.ini to reflect the actual meaning of highighting-related settings (they way it worked for a long time); #53
HighlightMod is permanently removed from sfall code, it is now only a script.
2017-03-14 00:20:34 +07:00
phobos2077 a74bab42e8 Full implementation of highlight mod with motion scanner interaction; #53
Fixed incorrect string lookup failsafe in Inventory.cpp
2017-03-13 23:54:54 +07:00
phobos2077 c411ced286 Merge branch 'develop' of https://github.com/phobos2077/sfall into develop 2017-03-13 22:15:16 +07:00
phobos2077 b0dc6ff182 ExplosionEmitLight: Skip setting light level if object was already lit #78 2017-03-13 22:13:21 +07:00
phobos2077 fa583d41d7 Added scripting functions: get/set_flags. This allows, for example, to turn character into a ghost dynamically from script. 2017-03-13 04:12:52 +07:00
phobos2077 c63ddf3e9c Fixed incorrect GlobalVar struct size leading to load game crashes and corrupted saves 2017-03-13 03:54:23 +07:00
phobos2077 6152615ce5 Implemented highlighting mod as a stand-alone global script with LOS and NoHighlight flag checks #53 2017-03-13 03:36:02 +07:00
phobos2077 a379e1f998 Added ability to load global scripts from different paths with new GlobalScriptPaths option 2017-03-13 02:26:02 +07:00
phobos2077 b3d5d38cc4 Remove dependency on Explosions from ScriptExtender by introducing onAfterCombatAttack delegate 2017-03-13 00:52:40 +07:00
phobos2077 ede1bacf2b Added new arguments to barter price hook from Crafty (slightly modified) #76 2017-03-13 00:17:50 +07:00
phobos2077 4823b71d96 Encapsulated delegate variables into functions 2017-03-12 23:27:00 +07:00
phobos2077 aa77d82a23 Removed all WorldmapSpeed patches except the default one, fixed global worldmap scripts not working when speed patch is disabled 2017-03-12 23:14:35 +07:00
phobos2077 0a3745f8f5 Moved main loop hooks from ScriptExtender to separate module (with new hooks);
Moved HighlightingMod into separate module;
Removed direct reference to ScriptExtender from InputFuncs using delegate
2017-03-12 21:48:10 +07:00
phobos2077 685914dafa Improved outline function by redrawing only necessary portion of screen #54;
Renamed some sfall structs;
Minor refactoring.
2017-03-11 23:21:44 +07:00
phobos2077 2d4ce73664 Initial implementation of set_outline function (need to find better solution) #54 2017-03-11 21:48:59 +07:00
phobos2077 7b5e730f72 Moved some more wrappers out from HeroAppearance 2017-03-11 19:18:10 +07:00
phobos2077 10bc859892 Use precompiled header for all configurations; removed useless check for VS version 2017-03-11 18:39:54 +07:00
phobos2077 2e064580ed Refactor HeroAppearance and related code - moved wrapper functions into Functions_def.h, replaced usages, corrected some structs 2017-03-11 18:35:57 +07:00
phobos2077 8357465e9c Removed file-specific compile settings for Worldmap.cpp and TalkingHeads.cpp 2017-03-11 15:45:24 +07:00
phobos2077 81d3479bff Greatly increase compilation speed using precompiled header 2017-03-11 15:43:28 +07:00
phobos2077 89f92f9676 Replaced NULL with nullptr 2017-03-11 15:11:38 +07:00
phobos2077 5888b76afb Merge branch 'feature/namespace-changes' into develop 2017-03-11 15:07:52 +07:00
phobos2077 e1db0550b1 Removed ExtraSaveSlots dependency on HeroAppearance - moved some functions to EngineUtils, others replaced with wrappers 2017-03-11 14:51:56 +07:00
phobos2077 d0f05e4efe Rewrite Proto structures - mapped most of proto offsets into one big struct 2017-03-11 14:07:08 +07:00
phobos2077 b18b5a340c Renamed most used engine structs;
Rename struct fields and map previously unknown fields;
Replace sElevator with proper two-dimensional array of simple structs;
Fix build errors.
2017-03-11 02:15:27 +07:00
phobos2077 a4de59dac4 Put all engine function offsets into fo::funcoffs:: namespace; refactor the definition of functions to reduce lines of code; renamed some headers #56 2017-03-09 02:48:48 +07:00
phobos2077 67c3ba7caf Renamed VARPTR_ to FO_VAR_ prefix #56 2017-03-09 01:12:20 +07:00
phobos2077 4b261febfd Put all FO variables and function wrappers to fo:: namespace; fix all build errors; other minor refactoring #56 2017-03-09 00:27:54 +07:00
phobos2077 6b6da17610 Updated TGameObj struct with separate sub-structs for items and critters; Put game enums and structs into fo namespace (broken build) #56 2017-03-06 02:20:22 +07:00
phobos2077 8ed93e8cf7 Replaced DATATYPE_* constants with enum class 2017-03-06 00:50:15 +07:00
phobos2077 31520d6f65 Fixed crash when using Graphic patch due to conflict between Movie patch and SkipOpeningMovies patch 2017-03-06 00:28:59 +07:00
phobos2077 033221398e Fixed Sfall not working :)
Separated sfall initialization from WinAPI-specific code in main.cpp and InputFuncs.cpp
2017-03-05 22:41:19 +07:00
phobos2077 3a4b7fe3f5 Moved all files to sfall namespace 2017-03-05 21:49:21 +07:00
phobos2077 a016e4a236 Replaced all direct references to ini and translationIni with GetConfig*() 2017-03-05 18:25:33 +07:00
phobos2077 6f0901f980 Replaced more INI reading with new functions;
Removed CityRepsCount setting (redundant)
2017-03-05 01:52:33 +07:00
phobos2077 fbb643bfa8 Fix and refactor loading of ExtraGameMsgFileList 2017-03-04 20:23:03 +07:00