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:59:45 +08:00
parent 8b9ffd08a8
commit c0f9f142c4
7 changed files with 22 additions and 20 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v3.8.19.1
;v3.8.20
[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
@@ -255,7 +255,7 @@ Movie16=artimer4.mve
Movie17=credits.mve
;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
;StartMonth=-1
;StartDay=-1
@@ -665,7 +665,7 @@ SpecialDeathGVAR=491
;Note that enabling this option can break the map changes in Modoc and Vault 15
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)
KnockoutTime=35
@@ -697,6 +697,10 @@ Enable=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
SkipCompatModeCheck=0
@@ -716,10 +720,6 @@ DontDeleteProtos=0
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
AllowUnsafeScripting=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
;Requires AllowSoundForFloats to be enabled
Test_ForceFloats=0
+4 -3
View File
@@ -126,12 +126,13 @@
#define reverse_array(array) resize_array(array, -4)
// randomly shuffle elements in list/map
#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)
// sort map in descending order by value
#define sort_map_value_desc(array) resize_array(array, -7)
// sort map in descending order by key value
#define sort_map_reverse(array) resize_array(array, -7)
// remove element from map or just replace value with 0 for list
#define unset_array(array, item) set_array(array, item, 0)
// same as "key_pressed" but checks VK codes instead of DX codes
#define key_pressed_vk(key) (key_pressed(key bwor 0x80000000))
+3
View File
@@ -2642,6 +2642,9 @@ void BugFixesInit()
if (GetPrivateProfileIntA("Misc", "AIBestWeaponFix", 0, ini)) {
dlog("Applying AI best weapon choice fix.", DL_INIT);
HookCall(0x42954B, ai_best_weapon_hook);
// also change the modifier for having weapon perk to 3x (was 5x)
SafeWrite8(0x42955E, 0x55);
SafeWrite8(0x4296E7, 0x55);
dlogr(" Done", DL_INIT);
}
+2 -2
View File
@@ -38,9 +38,9 @@ struct SfallMetarule {
// pointer to handler function
void(*func)();
// mininum number of arguments
int minArgs;
short minArgs;
// maximum number of arguments
int maxArgs;
short maxArgs;
};
typedef std::tr1::unordered_map<std::string, const SfallMetarule*> MetaruleTableType;
+1 -1
View File
@@ -215,7 +215,7 @@ void StatsInit() {
xpTable[level++] = atoi(ptr);
}
for (int i = level; i < 99; i++) xpTable[i] = -1;
SafeWrite8(0x4AFB1B, (BYTE)(level + 1));
SafeWrite8(0x4AFB1B, static_cast<BYTE>(level + 1));
}
GetPrivateProfileStringA("Misc", "DerivedStats", "", table, MAX_PATH, ini);
+1 -1
View File
@@ -442,7 +442,7 @@ void StartingStatePatches() {
date = GetPrivateProfileIntA("Misc", "StartDay", -1, ini);
if (date >= 0 && date < 31) {
dlog("Applying starting day patch.", DL_INIT);
SafeWrite8(0x4A3356, date);
SafeWrite8(0x4A3356, static_cast<BYTE>(date));
dlogr(" Done", DL_INIT);
}
+4 -6
View File
@@ -24,13 +24,11 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 8
#define VERSION_BUILD 19
#define VERSION_REV 1
#define VERSION_BUILD 20
#define VERSION_REV 0
#ifdef WIN2K
#define VERSION_STRING "3.8.19.1 win2k"
#define VERSION_STRING "3.8.20 win2k"
#else
#define VERSION_STRING "3.8.19.1"
#define VERSION_STRING "3.8.20"
#endif
//#define CHECK_VAL (4)