# Example Unreal router, for a made-up game ("Harbor Point", Unreal 5) in the shape of a real one. # 20 lines of data are the whole router; router.lua (example-unreal.router.lua) only clicks # through a menu the kit can't know. `fusion-cli router new --kit unreal` writes this layout. [router] id = "harborpoint" name = "Harbor Point" version = "0.1.0" license = "CC-BY-4.0" game_exe = "HarborPoint-Win64-Shipping.exe" units = { length = "cm", up_axis = "z", handedness = "left" } [router.launch] steam_app = 4000001 [[block]] id = "harborpoint.world" name = "Harbor Point's Town" kind = "world" description = "The harbor town (docks, streets, lighthouse), drawn by the game from Fusion's camera with correct depth. Its ground and walls go into Fusion's Collision Hub." gives = ["layer:color+depth", "collision"] cost = { ram_gb = 4.0, gpu = "high", must_stay_awake = true } [block.bind] map = "/Game/Maps/HarborTown" # opened from the main menu player = "BP_HarborPlayer_C" # in the world once the player is one player_follows_camera = true # World Partition loads around the player [[block]] id = "harborpoint.player" name = "Harbor Point's Keeper" kind = "character" description = "Play as the lighthouse keeper: Fusion's keys and mouse drive the game's own movement." needs = ["input"] gives = ["pose"] cost = { ram_gb = 0.0, gpu = "none" } [[block]] id = "harborpoint.crabs" name = "Harbor Point's Crabs" kind = "npc_group" description = "The giant crabs near Fusion's camera, with their health, in Fusion's entity registry." gives = ["entities"] actions = ["remove", "set_health", "move_to", "stop"] cost = { ram_gb = 0.0, gpu = "none" } [[block.bind.entity]] class = "BP_GiantCrab_C" kind = "crab" name = "Giant Crab" health = "HealthComp.Current" max_health = "HealthComp.Max" team = 2 spawn = "/Game/Creatures/BP_GiantCrab" [[block.bind.entity]] is_a = "/Script/HarborPoint.BoatBase" kind = "boat" # One-click setup: UE4SS is a requirement the player installs; Fusion adds its kit and the router. [router.setup] installed_when = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/FusionKit/dlls/main.dll" [[router.setup.require]] name = "UE4SS" check = "{game}/HarborPoint/Binaries/Win64/ue4ss/UE4SS.dll" guide = "Download UE4SS and unzip it into the game's HarborPoint/Binaries/Win64 folder." url = "https://github.com/UE4SS-RE/RE-UE4SS/releases" [[router.setup.step]] copy = "{tools}/fusion_unreal.dll" to = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/FusionKit/dlls/main.dll" [[router.setup.step]] # the kit's Lua: main.lua, router_api.lua, queries.lua copy = "{fusion}/kits/unreal/lua" to = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/FusionKit/Scripts" [[router.setup.step]] copy = "{router}/router.toml" to = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/FusionKit/Scripts/router.toml" [[router.setup.step]] copy = "{router}/router.lua" to = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/FusionKit/Scripts/router.lua" [[router.setup.step]] add_line = "FusionKit : 1" to = "{game}/HarborPoint/Binaries/Win64/ue4ss/Mods/mods.txt"