This directory contains the first editable skeleton for the extracted Android compatibility MOD / Harmony patcher. It is intentionally not a copy of the old full game source.
Current implementation (STS2AndroidPortCompat):
ModEntryexposes the same unmanaged entrypoints used by the reference launcher (InitializeGodotSharp,Apply).PlatformPatchesdisables desktop Steam/Sentry/platform paths.ReleaseInfoPatchesreadsrelease_info.jsonfrom the imported private payload atOS.GetDataDir()/game/release_info.json.AndroidSettingsBridgereads extra-settings JSON fromOS.GetDataDir()/default/1/settings.savewithout requiring PCSettingsSaveto contain Android-only fields.AndroidSettingsPatchesmaps companion JSON fields that also exist in the PCSettingsSave(aspect_ratio,vsync,msaa,fps_limit,fullscreen), maps companionmod_settings.mods_enabled/mod_list/ legacydisabled_modsinto the runtimeModSettings, and merges Android-only JSON keys back after PCSettingsSaveserialization would drop them.DisplaySettingsPatchesapplies Android-only companion fields for FPS, custom fullscreen render size, global content scale, UI font scale, and 180° landscape orientation.MobileHandLayoutPatchesapplies the companionshow_more_hand_card_text/show_more_hand_card_text_lift_height_percenthand lift as a Harmony post-layout offset without rebuilding the game body.QuickRestartPatchesadds the built-in Android retry button on the pause menu whenquick_sl_enabledis true and no external Quick Restart UI mod is loaded; it waits for pending run-save work, awaits saved-run setup before loading the new run, and fades back in on failure so async restart errors do not leave a permanent black transition screen.ExternalSettingsPatchesadds a fallback in-game settings row that opens the Java companion settings shell, redirects game Quit back to the settings shell, and applies the companionpending_unlock_all.flagcommand.ModLoaderPatchesredirects local mods toOS.GetDataDir()/modsand skips Steam mod enumeration.ShaderCompatibilityPatchesloadsport_compat.pckand applies the mobile shader replacements copied from the old port whenshader_compatibility_modeis enabled; it intentionally keeps the originalcanvas_group_mask_blur.gdshadercard/Ancient-card face shader and does not ship the old mobile substitute because it can render Ancient card faces solid white.TouchInputPatchesadds the first touch-friendly card-play cancellation path for releases outside the play zone / untargeted releases.MobileTapPreviewPatchesadds a first-pass tap-to-lift card preview flow using companiontouch_lift_preview/touch_lift_retap_actionsettings.AndroidInputCompatPatchesbridges Android back-button, two-finger inspect right-click, and trigger-axis controller compatibility into original input.LanMultiplayerPatchesbridges companion LAN settings by using stable ENet message IDs, adding configured compatibility mod names to multiplayer mod checks, honoring persistent/custom LAN player IDs, replacing the no-Steam join screen with host/port input, and hosting ENet games with the configured player capacity.
Build locally from the parent repository after configuring .env:
../tools/android/build-port-mod.shOr build a standalone compatibility pack from this submodule with local environment variables:
export DOTNET_BIN=/path/to/dotnet
export STS2_ORIGINAL_V1071_REFERENCE_DIR=/path/to/original-v0.107.1/bin/Debug
REFERENCE_FLAVOR=original-v0.107.1 ./tools/build-compat-pack.shThe patched Godot runtime expects STS2Mobile.dll / STS2Mobile.ModEntry; the parent build script builds this skeleton under that assembly name and copies it into android/assets/dotnet_bcl/.