Fixed unable to reach the specified max level in XPTable

Fixed the AP cost display issue in NPC combat control mod.
Added a tweak for weapon perk modifier to AIBestWeaponFix.
Minor edits to code/documents.
Updated version number.
This commit is contained in:
NovaRain
2019-08-09 11:47:33 +08:00
parent 839e8d2636
commit 744213dea1
8 changed files with 20 additions and 18 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
;sfall configuration settings ;sfall configuration settings
;v4.1.9.1 ;v4.2
[Main] [Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file. ;Change to 1 if you want to use command line args to tell sfall to use another ini file.
@@ -272,7 +272,7 @@ Movie16=artimer4.mve
Movie17=credits.mve Movie17=credits.mve
;To change the starting year, month or day, uncomment the next 3 lines ;To change the starting year, month or day, uncomment the next 3 lines
;Both StartMonth and StartDay are 0-indexed ;Both StartMonth and StartDay are 0-indexed (i.e. 0 is January or the first day of a month)
;StartYear=-1 ;StartYear=-1
;StartMonth=-1 ;StartMonth=-1
;StartDay=-1 ;StartDay=-1
@@ -703,7 +703,7 @@ SpecialDeathGVAR=491
;Note that enabling this option can break the map changes in Modoc and Vault 15 ;Note that enabling this option can break the map changes in Modoc and Vault 15
DisableSpecialMapIDs=0 DisableSpecialMapIDs=0
;Changes the base value of the duration of the knockout effect (valid range: 35..100) ;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
;The formula for the duration in ticks is: 10 * (value - 3 * EN) ;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35 KnockoutTime=35
@@ -742,6 +742,10 @@ Enable=0
;------- ;-------
DebugMode=0 DebugMode=0
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
;Requires DebugMode to be enabled
HideObjIsNullMsg=0
;Change to 1 to skip the compatibility mode check ;Change to 1 to skip the compatibility mode check
SkipCompatModeCheck=0 SkipCompatModeCheck=0
@@ -767,10 +771,6 @@ AlwaysFindScripts=0
;Set to 1 to force sfall to inject all hooks code into the game, even if corresponding hook scripts don't exist ;Set to 1 to force sfall to inject all hooks code into the game, even if corresponding hook scripts don't exist
InjectAllGameHooks=0 InjectAllGameHooks=0
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
;Requires DebugMode to be enabled
HideObjIsNullMsg=0
;Set to 1 to force critters to display combat float messages ;Set to 1 to force critters to display combat float messages
;Requires AllowSoundForFloats to be enabled ;Requires AllowSoundForFloats to be enabled
Test_ForceFloats=0 Test_ForceFloats=0
Binary file not shown.
+1
View File
@@ -58,6 +58,7 @@ procedure combatturn_handler begin
critter_add_trait(critter, TRAIT_PERK, perkID, level); critter_add_trait(critter, TRAIT_PERK, perkID, level);
end end
end end
intface_redraw;
lightDist := get_object_data(critter, OBJ_DATA_LIGHT_DISTANCE); lightDist := get_object_data(critter, OBJ_DATA_LIGHT_DISTANCE);
lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY); lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY);
obj_set_light_level(critter, 100, 4); obj_set_light_level(critter, 100, 4);
+4 -3
View File
@@ -142,12 +142,13 @@
#define reverse_array(array) resize_array(array, -4) #define reverse_array(array) resize_array(array, -4)
// randomly shuffle elements in list/map // randomly shuffle elements in list/map
#define shuffle_array(array) resize_array(array, -5) #define shuffle_array(array) resize_array(array, -5)
// sort map in ascending order by value // sort map in ascending order by key value
#define sort_map_value(array) resize_array(array, -6) #define sort_map_value(array) resize_array(array, -6)
// sort map in descending order by value // sort map in descending order by key value
#define sort_map_value_desc(array) resize_array(array, -7) #define sort_map_reverse(array) resize_array(array, -7)
// remove element from map or just replace value with 0 for list // remove element from map or just replace value with 0 for list
#define unset_array(array, item) set_array(array, item, 0) #define unset_array(array, item) set_array(array, item, 0)
// same as "key_pressed" but checks VK codes instead of DX codes // same as "key_pressed" but checks VK codes instead of DX codes
#define key_pressed_vk(key) (key_pressed(key bwor 0x80000000)) #define key_pressed_vk(key) (key_pressed(key bwor 0x80000000))
+2
View File
@@ -2656,6 +2656,8 @@ void BugFixes::init()
if (GetConfigInt("Misc", "AIBestWeaponFix", 0)) { if (GetConfigInt("Misc", "AIBestWeaponFix", 0)) {
dlog("Applying AI best weapon choice fix.", DL_INIT); dlog("Applying AI best weapon choice fix.", DL_INIT);
HookCall(0x42954B, ai_best_weapon_hook); HookCall(0x42954B, ai_best_weapon_hook);
// also change the modifier for having weapon perk to 3x (was 5x)
SafeWriteBatch<BYTE>(0x55, {0x42955E, 0x4296E7});
dlogr(" Done", DL_INIT); dlogr(" Done", DL_INIT);
} }
+1 -1
View File
@@ -598,7 +598,7 @@ void Stats::init() {
? atoi(xpTableList[i].c_str()) ? atoi(xpTableList[i].c_str())
: -1; : -1;
} }
SafeWrite8(0x4AFB1B, static_cast<BYTE>(numLevels)); SafeWrite8(0x4AFB1B, static_cast<BYTE>(numLevels + 1));
} }
auto statsFile = GetConfigString("Misc", "DerivedStats", "", MAX_PATH); auto statsFile = GetConfigString("Misc", "DerivedStats", "", MAX_PATH);
+1 -1
View File
@@ -443,7 +443,7 @@ void StartingStatePatches() {
date = GetConfigInt("Misc", "StartDay", -1); date = GetConfigInt("Misc", "StartDay", -1);
if (date >= 0 && date < 31) { if (date >= 0 && date < 31) {
dlog("Applying starting day patch.", DL_INIT); dlog("Applying starting day patch.", DL_INIT);
SafeWrite8(0x4A3356, date); SafeWrite8(0x4A3356, static_cast<BYTE>(date));
dlogr(" Done", DL_INIT); dlogr(" Done", DL_INIT);
} }
+4 -6
View File
@@ -23,10 +23,8 @@
#define LEGAL_COPYRIGHT "Copyright (C) 2006-2019, sfall team" #define LEGAL_COPYRIGHT "Copyright (C) 2006-2019, sfall team"
#define VERSION_MAJOR 4 #define VERSION_MAJOR 4
#define VERSION_MINOR 1 #define VERSION_MINOR 2
#define VERSION_BUILD 9 #define VERSION_BUILD 0
#define VERSION_REV 1 #define VERSION_REV 0
#define VERSION_STRING "4.1.9.1" #define VERSION_STRING "4.2"
//#define CHECK_VAL (4)