mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 16:17:06 +02:00
2.0.8's dedicated server was released with a world-layers.json scanned from
a game Steam had updated: 263 layers, where every player's game has 261. A
server that shares its layers (world_layer_sync) sends one choice for each,
the player's game turned the message down as unreadable, and nobody could
join such a server ("Join code, sender identity, or multiplayer protocol
did not match", and "Disconnected." in the server's log).
- supported_build::world_layer_count (261): how many layers the supported
build's levels have.
- Server: a world-layers.json of another count is not used; the log says
why and layer sync stays off, where before every player was turned away.
- --export-world-layers refuses a game folder whose count differs, so a
release cannot be built from an updated game again.
- Player's game: a layer list of another length is left unread and every
layer stays as the player has it; the rest of the message is taken and
they join.
62 lines
3.4 KiB
C++
62 lines
3.4 KiB
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <string_view>
|
|
|
|
// This is the accepted contract identity, not a list of hashes to bypass.
|
|
// Advance it only together with the reviewed native/asset contracts in
|
|
// Engine/Game/Build/<build>/. Diagnostic tools with historical addresses
|
|
// intentionally retain their own historical build pins.
|
|
namespace dingosdk::supported_build {
|
|
|
|
inline constexpr std::uint64_t game_file_size = 144567168;
|
|
inline constexpr std::uint32_t game_image_size = 0x09144000;
|
|
inline constexpr std::string_view game_sha256 =
|
|
"fbce74d5e28ef525dbba2cb4adbebc13405bdbd88f31bc940bca45e4ae88b8f9";
|
|
inline constexpr std::uint64_t steam_api_file_size = 300928;
|
|
inline constexpr std::string_view steam_api_sha256 =
|
|
"88b55dc33bfe9d8f998b72bf7074ebe0d21318a0b6dfdcca3530cb1e0c102a39";
|
|
// The Steam content that ships the files above; the launcher config repeats these
|
|
// so the launcher can fetch this build with DepotDownloader.
|
|
inline constexpr std::uint32_t steam_app_id = 3354750;
|
|
inline constexpr std::uint32_t steam_depot_id = 3354751;
|
|
inline constexpr std::string_view steam_manifest_id = "4621099302092747785";
|
|
inline constexpr std::string_view steam_build_id = "25414733";
|
|
// The build number this build's data files carry (Data\layout.toc, "pipelineCodeChangelists"):
|
|
// what mods made for it carry too. Data of another number beside a supported Skate.exe is a
|
|
// game that was updated or copied over in part, and has to be verified.
|
|
inline constexpr std::string_view game_data_changelist = "29544144";
|
|
// How many world layers this build's levels have: the catalog players scan from their game and
|
|
// a dedicated server reads from world-layers.json. A session's layers are sent as one choice for
|
|
// each, in the catalog's order, so both ends must have the same catalog. (2.0.8's server was
|
|
// released with the catalog of a game Steam had updated, 263 layers, and no player could join a
|
|
// server that shared its layers: 2026-10-13.)
|
|
inline constexpr std::size_t world_layer_count = 261;
|
|
// The live game's HTTP content cache for this build (catalogue chunks and CDN
|
|
// images), published as a ReSkateCache release and installed by the launcher.
|
|
inline constexpr std::wstring_view content_cache_url =
|
|
L"https://github.com/Dingo-Shenanigans/ReSkateCache/releases/download/25414733/25414733.zip";
|
|
inline constexpr std::string_view content_cache_sha256 =
|
|
"01867746b29301eead35a473ae523f8c84aa43784c244fcfafe0057a113045f4";
|
|
inline constexpr std::uint64_t content_cache_bytes = 9296380;
|
|
|
|
consteval std::array<unsigned char, 32> sha256_bytes(std::string_view text) {
|
|
if (text.size() != 64) throw "SHA-256 must have exactly 64 hexadecimal digits";
|
|
const auto nibble = [](char value) -> unsigned char {
|
|
if (value >= '0' && value <= '9') return static_cast<unsigned char>(value - '0');
|
|
if (value >= 'a' && value <= 'f') return static_cast<unsigned char>(value - 'a' + 10);
|
|
throw "SHA-256 must use lowercase hexadecimal digits";
|
|
};
|
|
std::array<unsigned char, 32> result{};
|
|
for (std::size_t i = 0; i < result.size(); ++i)
|
|
result[i] = static_cast<unsigned char>((nibble(text[i * 2]) << 4) | nibble(text[i * 2 + 1]));
|
|
return result;
|
|
}
|
|
|
|
inline constexpr auto game_sha256_bytes = sha256_bytes(game_sha256);
|
|
inline constexpr auto steam_api_sha256_bytes = sha256_bytes(steam_api_sha256);
|
|
|
|
} // namespace dingosdk::supported_build
|