From ea2a4bfdfa0e02aec678b00a0d006b25c4307cda Mon Sep 17 00:00:00 2001 From: NovaRain Date: Thu, 22 Sep 2022 10:09:52 +0800 Subject: [PATCH] Edited [ExtraPatches] description in ddraw.ini --- artifacts/ddraw.ini | 19 +++++++++---------- docs/Gemfile.lock | 14 ++++---------- sfall/Modules/LoadOrder.cpp | 5 +++-- sfall/Modules/Worldmap.h | 4 ++-- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 15354e81..69044f8b 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -16,18 +16,17 @@ UseCommandLine=0 ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [ExtraPatches] -;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game -;If DataLoadOrderPatch is enabled, the data load order is: -;master_patches > critter_patches > [extra patches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat +;This section allows you to set multiple paths to folders containing mods or patches ;Paths to folders and Fallout .dat files are supported -;The PatchFile## options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat) +;The PatchFileXX options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat) ;PatchFile0=mods\RP_data +;PatchFile1= -;Path to the folder in which the game will automatically search and load custom files (by *.dat mask, including folders) -;The data load order of the files in the folder will be in reverse alphabetical order of the filenames -;The files placed in this folder will have higher priority than the PatchFile## options -;This option has no effect in 4.2.6 or later. The path is fixed to \mods\ -;AutoSearchPath=mods +;Starting from 4.2.6, the game will automatically search and load custom .dat files (or folders named as .dat files) from \mods\ +;The load order of files in the folder will be in reverse alphabetical order of the filenames +;Autoloaded files will have a higher priority than the files specified in the PatchFileXX options +;The complete data load order is: +;master_patches > critter_patches > mods > PatchFile99..PatchFile0 > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [Speed] @@ -281,7 +280,7 @@ UseFileSystemOverride=0 ;Set to 1 to use the modified data load order for the engine to find game data ;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat -;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat +;Modified: master_patches > critter_patches > extra_patches > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat ;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only DataLoadOrderPatch=1 diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 04fec695..7e746209 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -14,7 +14,7 @@ GEM execjs coffee-script-source (1.11.1) colorator (1.1.0) - commonmarker (0.23.4) + commonmarker (0.23.6) concurrent-ruby (1.1.9) dnsruby (1.61.9) simpleidn (~> 0.1) @@ -121,6 +121,7 @@ GEM pathutil (~> 0.9) rouge (>= 1.7, < 4) safe_yaml (~> 1.0) + jekyll-analytics (0.1.14) jekyll-avatar (0.7.0) jekyll (>= 3.0, < 5.0) jekyll-coffeescript (1.1.1) @@ -232,7 +233,7 @@ GEM jekyll-seo-tag (~> 2.1) minitest (5.15.0) multipart-post (2.1.1) - nokogiri (1.13.3) + nokogiri (1.13.6) mini_portile2 (~> 2.8.0) racc (~> 1.4) octokit (4.22.0) @@ -267,14 +268,10 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.10) thread_safe (~> 0.1) - tzinfo-data (1.2021.1) - tzinfo (>= 1.0.0) unf (0.1.4) unf_ext unf_ext (0.0.8) unicode-display_width (1.8.0) - wdm (0.1.1) - webrick (1.7.0) zeitwerk (2.5.4) PLATFORMS @@ -284,11 +281,8 @@ DEPENDENCIES github-pages (~> 225) jekyll-analytics jekyll-feed (~> 0.6) - kramdown-parser-gfm - tzinfo (~> 1.2) + jekyll-remote-theme tzinfo-data - wdm (~> 0.1.0) - webrick (~> 1.7) BUNDLED WITH 2.1.4 diff --git a/sfall/Modules/LoadOrder.cpp b/sfall/Modules/LoadOrder.cpp index aab24d75..60ff370e 100644 --- a/sfall/Modules/LoadOrder.cpp +++ b/sfall/Modules/LoadOrder.cpp @@ -256,6 +256,7 @@ static void __fastcall game_init_databases_hook1() { } fo::var::master_db_handle = node; // set pointer to master_patches node + InitSystemPatches(); InitExtraPatches(); } */ @@ -263,7 +264,7 @@ static bool NormalizePath(std::string &path) { if (path.find(':') != std::string::npos) return false; int pos = 0; - do { // replace all '/' char to '\' + do { // replace all '/' char with '\' pos = path.find('/', pos); if (pos != std::string::npos) path[pos] = '\\'; } while (pos != std::string::npos); @@ -303,7 +304,7 @@ static void GetExtraPatches() { // Remove first duplicates size_t size = patchFiles.size(); for (size_t i = 1; i < size; ++i) { - for(size_t j = size - 1; j > i; --j) { + for (size_t j = size - 1; j > i; --j) { if (patchFiles[j] == patchFiles[i]) { patchFiles[i].clear(); } diff --git a/sfall/Modules/Worldmap.h b/sfall/Modules/Worldmap.h index cd6f4a16..23e9123f 100644 --- a/sfall/Modules/Worldmap.h +++ b/sfall/Modules/Worldmap.h @@ -31,8 +31,8 @@ public: static Delegate<>& OnWorldmapLoop(); - static void Worldmap::SaveData(HANDLE); - static bool Worldmap::LoadData(HANDLE); + static void SaveData(HANDLE); + static bool LoadData(HANDLE); static void SetCarInterfaceArt(DWORD artIndex); static void SetRestHealTime(DWORD minutes);