.. 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
EOP

TWC Discord server YouTube

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

Breaking Engine Limits

	-- <YOUR_MOD_FOLDER>/youneuoy_Data/plugins/lua/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
	

Videos

.. toctree:: :maxdepth: 2 faq articles mainInfo