mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a new setting to PipBoyAvailableAtGameStart to skip the vault suit movie check and make the PipBoy always available.
Improved the functionality of PipBoyAvailableAtGameStart (from Crafty's mod)
This commit is contained in:
@@ -247,6 +247,7 @@ Movie17=credits.mve
|
||||
;PerksFile=Perks.ini
|
||||
|
||||
;Set to 1 if you want the pipboy to be available at the start of the game
|
||||
;Set to 2 to skip the vault suit movie check and make the pipboy always available
|
||||
PipBoyAvailableAtGameStart=0
|
||||
|
||||
;Set to 1 to double the number of available kill types
|
||||
|
||||
+21
-8
@@ -268,16 +268,17 @@ static void NewGame2() {
|
||||
GainStatFix=0;
|
||||
}
|
||||
|
||||
if(GetPrivateProfileInt("Misc", "PipBoyAvailableAtGameStart", 0, ini)) {
|
||||
SafeWrite8(0x00596C7B, 1);
|
||||
}
|
||||
if(GetPrivateProfileInt("Misc", "DisableHorrigan", 0, ini)) {
|
||||
*(DWORD*)0x00672E04=1;
|
||||
/*if (GetPrivateProfileInt("Misc", "PipBoyAvailableAtGameStart", 0, ini)) {
|
||||
SafeWrite8(0x596C7B, 1);
|
||||
}*/
|
||||
if (GetPrivateProfileInt("Misc", "DisableHorrigan", 0, ini)) {
|
||||
*(DWORD*)0x672E04 = 1;
|
||||
}
|
||||
|
||||
LoadGlobalScripts();
|
||||
CritLoad();
|
||||
}
|
||||
|
||||
static void __declspec(naked) NewGame() {
|
||||
__asm {
|
||||
pushad;
|
||||
@@ -293,11 +294,14 @@ static void ReadExtraGameMsgFilesIfNeeded() {
|
||||
ReadExtraGameMsgFiles();
|
||||
}
|
||||
|
||||
static bool PipBoyAvailableAtGameStart = false;
|
||||
static void __declspec(naked) MainMenu() {
|
||||
__asm {
|
||||
pushad;
|
||||
push 0;
|
||||
call ResetState;
|
||||
mov al, PipBoyAvailableAtGameStart;
|
||||
mov ds:[_gmovie_played_list+3], al;
|
||||
call ReadExtraGameMsgFilesIfNeeded;
|
||||
call LoadHeroAppearance;
|
||||
popad;
|
||||
@@ -439,13 +443,22 @@ static void __declspec(naked) AutomapHook() {
|
||||
}
|
||||
|
||||
void LoadGameHookInit() {
|
||||
SaveInCombatFix=GetPrivateProfileInt("Misc", "SaveInCombatFix", 1, ini);
|
||||
if(SaveInCombatFix>2) SaveInCombatFix=0;
|
||||
if(SaveInCombatFix) {
|
||||
SaveInCombatFix = GetPrivateProfileInt("Misc", "SaveInCombatFix", 1, ini);
|
||||
if (SaveInCombatFix > 2) SaveInCombatFix = 0;
|
||||
if (SaveInCombatFix) {
|
||||
GetPrivateProfileString("sfall", "SaveInCombat", "Cannot save at this time", SaveFailMsg, 128, translationIni);
|
||||
}
|
||||
GetPrivateProfileString("sfall", "SaveSfallDataFail", "ERROR saving extended savegame information! Check if other programs interfere with savegame files/folders and try again!", SaveSfallDataFailMsg, 128, translationIni);
|
||||
|
||||
switch (GetPrivateProfileInt("Misc", "PipBoyAvailableAtGameStart", 0, ini)) {
|
||||
case 1:
|
||||
PipBoyAvailableAtGameStart = true;
|
||||
break;
|
||||
case 2:
|
||||
SafeWrite8(0x497011, 0xEB); // skip the vault suit movie check
|
||||
break;
|
||||
}
|
||||
|
||||
HookCall(0x480AB3, NewGame);
|
||||
|
||||
HookCall(0x47C72C, LoadSlot);
|
||||
|
||||
Reference in New Issue
Block a user