.. M2TWEOP documentation master file, created by
sphinx-quickstart on Thu Apr 22 15:18:38 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
M2TWEOP: Medieval 2 Engine Overhaul Project
===================================
.. raw:: html
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
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
Playing sounds, displaying GUIs and spawning units
functiononGeneralAssaultsGeneral(eventData)-- Check if the attacker is a Nazgulif(hasTrait(attacker,"NazgulRace"))then-- Play a soundplaySound(nazgulScream);-- Display some textshowWindow("The Nazgul have arrived.","Nazgul_Arrived.png", NAZGUL_ARRIVAL_TEXT);-- Spawn a new unitspawnUnit("Citadel Guard","Anorien","Minas Tirith", 3, 4, 1, 1);endend