M2TWEOP: Medieval 2 Engine Overhaul Project¶
M2TW Engine Overhaul Project is designed to expand the capabilities of the game Medieval 2: Total War.
EOP uses C++ and Assembly to modify the game's code in-memory and exposes this to the end user via a Lua API and the EOP Lua Plugin
Features
- Hugely expanded Lua scripting system that integrates seamlessly with existing campaign_script scripts, hot-reload, new custom console, debugger and much more
- Breaks the EDU limit allowing for more than 500 units in a mod
- Place .fbx models anywhere on the strategy or battle map with full animation and texture support
- Render .cas models for characters, settlements, forts, or anywhere on the map based on any kind of condition you can imagine
- Play custom sounds or music with support for WAV, OGG/Vorbis and FLAC
- Unlocks all vanilla console commands
- Rome: Total War style tactical map viewer
- Create your own GUIs and overlays using the popular ImGUI
- New custom EDU system that allows the creation and modification of new and existing units without the need to restart the game
- Play out Hotseat battles online and transfer the results back to the campaign map
- Set your own limits for the number of religions, ancillaries, bodyguard units, building chains, max unit size
- Set the boundaries of the number of soldiers in units
- Fixed many engine bugs, crashes and oversights (e.g crashes when using berserkers in battle)
- Edit the .worldpkgdesc for any settlement on the fly without the need to restart the game
- Custom keybinding support
- Added ability to write your own add-ons in C++. The library exports many different functions.
- Utilize the packaged M2TWEOP GUI launcher with full customization support as well as the included EOP Health Checker or just allow your mod to be launched directly
- Many, many more!
Breaking Engine Limits
-- <YOUR_MOD_FOLDER>/eopData/eopScripts/luaPluginScript.lua function onPluginLoad() M2TWEOP.unlockGameConsoleCommands(); M2TWEOP.setAncillariesLimit(16); M2TWEOP.setMaxBgSize(100); M2TWEOP.setReligionsLimit(50); M2TWEOP.setBuildingChainLimit(40); M2TWEOP.setGuildCooldown(3); end
Playing sounds, displaying GUIs and spawning units
function onGeneralAssaultsGeneral(eventData) -- Check if the attacker is a Nazgul if(hasTrait(attacker, "NazgulRace")) then -- Play a sound playSound(nazgulScream); -- Display some text showWindow("The Nazgul have arrived.","Nazgul_Arrived.png", NAZGUL_ARRIVAL_TEXT); -- Spawn a new unit spawnUnit("Citadel Guard", "Anorien","Minas Tirith", 3, 4, 1, 1); end end