Medievel MMO has no
  • C++ 90.6%
  • PowerShell 8.9%
  • C# 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-21 16:31:36 +02:00
.codex UE5.8..2 update 2026-09-13 09:28:22 +02:00
.cursor UE5.8..2 update 2026-09-13 09:28:22 +02:00
.gemini UE5.8..2 update 2026-09-13 09:28:22 +02:00
.vscode UE5.8..2 update 2026-09-13 09:28:22 +02:00
Config Fix everything 2026-09-21 16:31:36 +02:00
Content Fix everything 2026-09-21 16:31:36 +02:00
Docs Fix everything 2026-09-21 16:31:36 +02:00
Scripts Fix everything 2026-09-21 16:31:36 +02:00
Source Fix everything 2026-09-21 16:31:36 +02:00
.clang-format refactor: clarify combat flow and expose tuning settings 2026-09-11 23:43:19 +02:00
.gitattributes LFS 2026-09-13 11:59:28 +02:00
.gitignore build: migrate prototype to Unreal Engine 5.8 2026-09-12 20:23:22 +02:00
.mcp.json UE5.8..2 update 2026-09-13 09:28:22 +02:00
AGENTS.md UE5.8..2 update 2026-09-13 09:28:22 +02:00
medieval_mmo.uproject UE5.8..2 update 2026-09-13 09:28:22 +02:00
README.md docs: add Unreal code and tuning guide 2026-09-11 23:44:05 +02:00

Medieval combat prototype — Unreal Engine 5.5

The prototype now includes CMC movement, replicated directional combat, upper-body sword attacks and guards, and server-authoritative duels with health and automatic reset. Open medieval_mmo.uproject with UE 5.5, then press Play in L_CombatTest. The original Game Animation Sample remains available at /Game/Levels/DefaultLevel.

New to Unreal C++? Start with the code and tuning guide: reading order, an attack walkthrough, Unreal terminology, editable settings, and the design principles used in this prototype.

Compare combat controls

In Play, use number-row keys 1: button + gesture, 2: radial drag, 3: facing guard, or 4: original controls. These replace F1-F4 to avoid Unreal's debug view shortcuts. Radial selection now uses 3x sensitivity and shows its ring only after a mouse adjustment; repeat clicks keep it hidden. Switch while READY with both mouse buttons released. Each player can choose independently; new play sessions start with the original controls. All schemes use the same movement, attack timings and combat state machine. See the prototype controls guide for exact behavior, tuning and validation.

Controls and movement

The following describes the original 4 controls:

  • WASD: camera-relative movement, including strafing and retreating.
  • Mouse: look, facing, and selection of Left / Right / Overhead / Thrust. Pitch is limited to ±65 degrees.
  • Left mouse: hold to wind up and prepare an attack; release to swing. A quick click still plays the full windup.
  • Right mouse: hold a directional guard. Move the mouse while guarding to change direction.
  • Q: feint during windup or hold. A committed swing cannot be canceled.
  • One battle-running speed: 600 cm/s in every direction; diagonal input is clamped by CMC.
  • Acceleration and braking: 4000 cm/s², with no camera lag.
  • No sprint, running stamina, jump, or crouch actions in this first test.

The arena contains four spawn points, perimeter walls, and a spacing obstacle. The HUD shows speed, selected/locked combat direction, phase and progress. Labels above remote players show their combat state. A training sword plays four attacks and guards over running. Server blade sweeps now resolve hits and blocks: 100 health, 25 damage, and a three-second reset after defeat. See the duel guide for block direction, testing and current network limits. These values are initial tuning choices, not measurements of Bannerlord.

Try multiplayer in the editor

  1. Open /Game/MedievalCombat/Maps/L_CombatTest.
  2. In the Play dropdown's multiplayer settings, set Number of Players = 2.
  3. Choose Play As Listen Server and New Editor Window (PIE).
  4. Move each character; check that the other window displays the movement.
  5. Test circling, retreating, diagonal movement, abrupt stops, and wall collisions.
  6. Repeat with Play As Client and a separate server using the advanced Play settings.

Use Shift+F1 to release the mouse in PIE. Try holding an attack while moving the mouse: its direction stays locked, while the blue "Next direction" text changes. Hold RMB and change direction to see the guard transition. See combat input and networking details and combat animation setup.

Build and regenerate prototype assets

Required: UE 5.5, Windows SDK, MSVC v143 14.38, and .NET Framework 4.8 SDK. The build tools can be installed without the full Visual Studio IDE.

From PowerShell in the project root:

& 'C:\Program Files\Epic Games\UE_5.5\Engine\Build\BatchFiles\Build.bat' medieval_mmoEditor Win64 Development "-Project=$PWD\medieval_mmo.uproject" -WaitMutex -NoHotReloadFromIDE
& 'C:\Program Files\Epic Games\UE_5.5\Engine\Binaries\Win64\UnrealEditor-Cmd.exe' "$PWD\medieval_mmo.uproject" -run=MedievalSetup -unattended -nullrhi -nosound
& 'C:\Program Files\Epic Games\UE_5.5\Engine\Binaries\Win64\UnrealEditor-Cmd.exe' "$PWD\medieval_mmo.uproject" -run=MedievalAnimation -unattended -nullrhi -nosound

The setup commandlets create missing assets and fill missing weapon animation references. Existing animation assets are preserved. Generated .uasset and .umap files are included in the project; ordinary editor use does not require regeneration.

Repeatable network smoke test

./Scripts/Test-Movement.ps1
./Scripts/Test-Movement.ps1 -PacketLag 50 -PacketLoss 1
./Scripts/Test-Movement.ps1 -Screenshot

The script starts a headless editor server and two separate game clients on localhost port 17877. It injects Enhanced Input actions through the actual pawn bindings, exercises forward/right/back/left/diagonal movement, checks the 600 cm/s cap and stopping, and verifies that each autonomous client observes another character moving. It also checks that the locomotion AnimInstance is loaded. This is a development smoke test, not proof of production capacity, animation quality, or physical keyboard/mouse behavior.

Logs are in Saved/MovementSmoke/<timestamp>/. Processes started by the script are stopped on completion or failure. The screenshot option renders the first client and requests Saved/Screenshots/MovementPrototype.png. Packet lag is Unreal's outgoing packet delay per client, in milliseconds; packet loss is a percentage. This does not claim a particular measured round-trip latency or symmetric network conditions.

Architecture and next steps

See the implementation roadmap.

  • Source/MedievalCombat: runtime character, input, animation values, GameMode, HUD, and opt-in development test probe.
  • Source/MedievalCombatEditor: repeatable creation of the isolated test assets.
  • /Game/MedievalCombat/Animation/BS_BattleLocomotion: editable direction/speed Blend Space.
  • /Game/MedievalCombat/Animation/ABP_MedievalCombat: cached locomotion, upper-body montage layer and bounded torso aim.
  • /Game/MedievalCombat/Animation/Sequences: in-place copies of selected sample animations.
  • /Game/MedievalCombat/Data/DA_TrainingSword: editable combat timings, damage, blade geometry and ready/attack/guard montage references.

Combat verification:

./Scripts/Test-Combat.ps1
./Scripts/Test-Combat.ps1 -PacketLag 80 -PacketLoss 1 -Screenshot
./Scripts/Test-Duel.ps1 -PacketLag 80 -PacketLoss 1 -Screenshot

Combat logs go to Saved/CombatSmoke/<timestamp>/. Screenshots include Saved/Screenshots/CombatInputPrototype.png (guard) and Combat_<0..3>_Hold/Release.png. The Medieval.Combat automation tests can also be run from Unreal's Session Frontend Automation tab.

Create a Blueprint child of MedievalCharacter to tune the inherited Character Movement and Camera Boom components. Assign that character through a Blueprint child of MedievalGameMode in the test map's World Settings. The default prototype uses the native classes directly.