Skip to content

Commit

Permalink
Merge pull request #664 from tiltedphoques/fix/gridsToLoad
Browse files Browse the repository at this point in the history
Warn about uGridsToLoad
  • Loading branch information
RobbeBryssinck authored May 5, 2024
2 parents 335033b + 31c9ac5 commit f2e85cb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Code/client/Games/TES.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ struct INISettingCollection
Entry* next;
};

// TODO(FT): Setting a setting should be followed by SettingHandlerMap::SettingUpdated() call
Setting* GetSetting(const char* acpName) noexcept;

uint8_t unk0[0x118];
Expand Down
10 changes: 10 additions & 0 deletions Code/client/Services/Generic/DiscoveryService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ void DiscoveryService::OnUpdate(const PreUpdateEvent& acUpdateEvent) noexcept

void DiscoveryService::OnConnected(const ConnectedEvent& acEvent) noexcept
{
// uGridsToLoad should always be 5, as this is what the server enforces
auto* pSetting = INISettingCollection::Get()->GetSetting("uGridsToLoad:General");
if (pSetting && pSetting->data != 5)
{
ConnectionErrorEvent errorEvent{};
errorEvent.ErrorDetail = "{\"error\": \"bad_uGridsToLoad\"}";

m_world.GetRunner().Trigger(errorEvent);
}

VisitCell(true);
}

Expand Down
1 change: 1 addition & 0 deletions Code/skyrim_ui/src/app/services/error.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface ErrorEvent {
| 'wrong_password'
| 'server_full'
| 'no_reason'
| 'bad_uGridsToLoad'
| 'non_default_install';
data?: Record<any, any>;
}
Expand Down
1 change: 1 addition & 0 deletions Code/skyrim_ui/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"WRONG_PASSWORD": "The password you entered is incorrect.",
"NO_REASON": "The server refused connection without reason.",
"SERVER_FULL": "This server is full.",
"BAD_UGRIDSTOLOAD": "It seems that your Skyrim.ini file has a non-default value for 'uGridsToLoad'. THIS IS A VERY BAD IDEA, and will most likely break the mod. Please set this setting back to its default (5), or remove the Skyrim.ini file and launch Skyrim vanilla once to generate a new file. The settings 'uExterior Cell Buffer' and 'uInterior Cell Buffer' should also be left at the default setting. If you do not know how to do this, please refer to our wiki or ask on our Discord server/Reddit sub for help.",
"NON_DEFAULT_INSTALL": "It seems that your installation is not purely vanilla, i.e. it has Creation Club content (Anniversary Update or otherwise) or other mods.\nWe do NOT recommend playing with mods.\nWe recommend that you uninstall and disable these mods (instructions can be found on the wiki).\n\nFor the best experience, you should have the following mod list:<strong>\nSkyrim.esm\nUpdate.esm\nDawnguard.esm\nHearthFires.esm\nDragonborn.esm\n_ResourcePack.esl\nSkyrimTogether.esp</strong>"
}
},
Expand Down

0 comments on commit f2e85cb

Please sign in to comment.