Compare commits

...
4 Commits
Author SHA1 Message Date
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
9 changed files with 52 additions and 23 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## 3.8.45.1
* Fixed a bug in **XPTable** that caused leveling issues with **Here and Now** perk
* Disabled unnecessary selfrun file creation in the recording mode (autoplay has been disabled in 3.8.30)
## 3.8.45
* Fixed a bug introduced in 3.8.29 that caused `game_loaded` script function to always return 1 when called from normal scripts
* Fixed a bug introduced in 3.8.44 that caused the information card for the **hero appearance mod** not to refresh properly
+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>.
+2 -2
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v3.8.45
;v3.8.45.1
[Main]
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
@@ -286,7 +286,7 @@ WorldMapTimeMod=100
WorldMapFPSPatch=1
;Controls the world map speed if WorldMapFPSPatch is 1. Higher values cause slower movement
;Default is 66 milliseconds
;Default is 66 milliseconds, and the maximum is 150
WorldMapDelay2=66
;Set to 1 to enable Ray's patch to make world map encounter rate independent of your travel speed
+18
View File
@@ -713,14 +713,32 @@ FUNC(soundSetFileIO_, 0x4AE2FC)
FUNC(soundVolume_, 0x4ADE0C)
FUNC(sprintf_, 0x4F0041)
FUNC(square_num_, 0x4B1F04)
FUNC(statPCAddExperienceCheckPMs_, 0x4AFAB8)
FUNC(statPcMinExpForLevel_, 0x4AF9A8)
FUNC(statPcResetExperience_, 0x4AFC38)
FUNC(stat_description_, 0x4AF898)
FUNC(stat_exit_, 0x4AEEE4)
FUNC(stat_get_base_, 0x4AF3E0)
FUNC(stat_get_base_direct_, 0x4AF408)
FUNC(stat_get_bonus_, 0x4AF474)
FUNC(stat_init_, 0x4AED70)
FUNC(stat_level_, 0x4AEF48) // &GetCurrentStat(void* critter, int statID)
FUNC(stat_level_description_, 0x4AF8DC)
FUNC(stat_load_, 0x4AEEF4)
FUNC(stat_name_, 0x4AF854)
FUNC(stat_pc_add_experience_, 0x4AFAA8)
FUNC(stat_pc_description_, 0x4AFA14)
FUNC(stat_pc_get_, 0x4AF8FC)
FUNC(stat_pc_min_exp_, 0x4AF9A0)
FUNC(stat_pc_name_, 0x4AF9F4)
FUNC(stat_pc_set_, 0x4AF910)
FUNC(stat_pc_set_defaults_, 0x4AF980)
FUNC(stat_picture_, 0x4AFA34)
FUNC(stat_recalc_derived_, 0x4AF6FC)
FUNC(stat_reset_, 0x4AEEC0)
FUNC(stat_result_, 0x4AFA78)
FUNC(stat_save_, 0x4AEF20)
FUNC(stat_set_base_, 0x4AF4BC)
FUNC(stat_set_bonus_, 0x4AF63C)
FUNC(stat_set_defaults_, 0x4AF6CC)
FUNC(strParseStrFromList_, 0x4AFE08)
+1 -1
View File
@@ -4295,7 +4295,7 @@ void BugFixes::init() {
SafeWrite8(0x440C8E, 7); // jnz 0x440C96
// Fix for gaining two levels at once when leveling up from level 97
SafeWrite8(0x4AF9AF, 0x7F); // jge > jg (stat_pc_min_exp_)
SafeWrite8(0x4AF9AF, 0x7F); // jge > jg (statPcMinExpForLevel_)
// Fix to prevent integer overflow for the number of items in a stack in the inventory
// If the number of items in a stack is less than 1, it is considered an integer overflow
+6 -1
View File
@@ -1013,7 +1013,12 @@ void MiscPatches::init() {
BlockCall(0x4425E6); // Patch out ereg call
SafeWrite8(0x4810AB, CodeType::JumpShort); // Disable selfrun
SafeWrite8(0x4810AB, CodeType::JumpShort); // Disable selfrun autoplay
// Disable selfrun file creation
BlockCall(0x4A8DB5); // block selfrun_save_data_ (selfrun_prep_recording_)
SafeWrite32(0x4A8DBA, 0x9090C031); // xor eax, eax
BlockCall(0x4A8E10); // block vcr_record_ (selfrun_recording_loop_)
BlockCall(0x4A8E15); // just nop code
SimplePatch<DWORD>(0x440C2A, "Misc", "SpecialDeathGVAR", fo::GVAR_MODOC_SHITTY_DEATH);
+10 -7
View File
@@ -109,10 +109,11 @@ failMax:
}
}
// Returns experience to reach a given level
static __declspec(naked) void GetLevelXPHook() {
__asm {
cmp eax, PC_LEVEL_MAX;
jge lvlMax;
jg lvlMax;
dec eax;
mov eax, [xpTable + eax * 4];
retn;
@@ -122,9 +123,11 @@ lvlMax:
}
}
// Returns experience to reach the next level
static __declspec(naked) void GetNextLevelXPHook() {
__asm {
mov eax, ds:[FO_VAR_Level_pc];
inc eax;
jmp GetLevelXPHook;
}
}
@@ -374,14 +377,14 @@ void Stats::init() {
if (numLevels > 0) {
if (numLevels >= PC_LEVEL_MAX) numLevels = PC_LEVEL_MAX - 1;
const DWORD getNextLevelXPHkAddr[] = {0x434AA7, 0x439642, 0x4AFB22};
HookCalls(GetNextLevelXPHook, getNextLevelXPHkAddr);
HookCalls(GetNextLevelXPHook, getNextLevelXPHkAddr); // replace stat_pc_min_exp_
const DWORD getLevelXPHkAddr[] = {0x496C8D, 0x4AFC53};
HookCalls(GetLevelXPHook, getLevelXPHkAddr);
HookCalls(GetLevelXPHook, getLevelXPHkAddr); // replace statPcMinExpForLevel_
for (size_t i = 0; i < PC_LEVEL_MAX; i++) {
xpTable[i] = (i < numLevels)
? atoi(xpTableList[i].c_str())
: -1;
for (size_t i = 0; i < PC_LEVEL_MAX - 1; i++) {
xpTable[i + 1] = (i < numLevels)
? atoi(xpTableList[i].c_str())
: -1;
}
SafeWrite8(0x4AFB1B, static_cast<BYTE>(numLevels + 1));
}
+2 -2
View File
@@ -22,6 +22,7 @@
#include "..\main.h"
#include "..\FalloutEngine\Fallout2.h"
#include "..\Utils.h"
#include "LoadGameHook.h"
#include "ScriptExtender.h"
#include "SpeedPatch.h"
@@ -423,8 +424,7 @@ static void WorldmapFpsPatch() {
if (IniReader::GetConfigInt("Misc", "WorldMapFPSPatch", 0)) {
dlog("Applying world map fps patch.", DL_INIT);
if (fpsPatchOK) {
int delay = IniReader::GetConfigInt("Misc", "WorldMapDelay2", 66);
worldMapDelay = max(1, delay);
worldMapDelay = clamp(IniReader::GetConfigInt("Misc", "WorldMapDelay2", 66), 1, 150);
dlogr(" Done", DL_INIT);
} else {
dlogr(" Failed", DL_INIT);
+2 -2
View File
@@ -25,6 +25,6 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 8
#define VERSION_BUILD 45
#define VERSION_REV 0
#define VERSION_REV 1
#define VERSION_STRING "3.8.45"
#define VERSION_STRING "3.8.45.1"