Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about uGridsToLoad #664

Merged
merged 2 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading