-
An assault has taken place.
+
An assault has taken place. NOTE: settlement and fort are not in eventData! They are separate arguments!.
Exports: character, faction, targetFaction, regionID, targetRegionID, characterType, religion, targetReligion
@@ -17503,6 +17794,18 @@
Parameters:
+
+
settlement
+ settlementStruct
+
+
+
+
+
fort
+ fortStruct
+
+
+
@@ -17511,7 +17814,7 @@
Parameters:
Usage:
function onGeneralAssaultsResidence(eventData)
+ function onGeneralAssaultsResidence(eventData, settlement, fort)
end
@@ -23485,7 +23788,7 @@ Parameters:
Returns:
- eopDuEntry
+ int
retEntry Usually you shouldn't use this value.
@@ -23493,7 +23796,7 @@ Returns:
Usage:
local eopDUEntry=M2TWEOPDU.getDataEopDu(1000);
+ local eopEntry=M2TWEOPDU.getDataEopDu(1000);
@@ -26176,7 +26479,7 @@ Fields:
battleBuilding
- buildingBattle
+ buildingBattle
@@ -26468,19 +26771,19 @@ Fields:
campaignDifficultyFaction
int[31]
- Indexing starts at 1, so add 1 to faction ID.
+ Indexing starts at 1, so add 1 to faction ID. Maximum 31.
battleDifficultyFaction
int[31]
- Indexing starts at 1, so add 1 to faction ID.
+ Indexing starts at 1, so add 1 to faction ID. Maximum 31.
factionsSortedByDescrStrat
factionStruct[31]
- Table of factionStruct[31], indexing starts at 1.
+ Table of factionStruct[31], indexing starts at 1. Maximum 31.
factionsSortedByID
factionStruct[31]
- Table of factionStruct[31], indexing starts at 1, so add 1 to faction ID.
+ Table of factionStruct[31], indexing starts at 1, so add 1 to faction ID. Maximum 31.
numberOfFactions
int
@@ -27656,7 +27959,7 @@ Fields:
settlement
- settlement or nil
+ settlementStruct or nil
@@ -27674,7 +27977,7 @@ Fields:
watchtower
- watchTowerStruct or nil
+ watchtowerStruct or nil
@@ -29287,7 +29590,7 @@
Fields:
- eduEntry
- EduEntry
+ eduEntry
@@ -29618,18 +29921,18 @@
Fields:
- sidesNum
int
- Returns a battleSide[8]. Maximum: 8.
-
- - sides
- battleSide[8]
- - faction
- factionSide[31]
+
- sides
+ battleSide[8]
+ Returns a battleSide[8]. Maximum: 8.
+
+ - factionSide
+ integer[31]
-
alliance array, -1 if not in battle, start at 1 so faction ID + 1
+ faction alliance array, -1 if not in battle, start at 1 so faction ID + 1 Maximum 31.
tfield getPlayerArmy getPlayerArmy
@@ -29734,7 +30037,7 @@ Fields:
- winConditions
int[4]
- Returns an int index of a wincondition.
+ Returns an int index of a wincondition. Maximum 4.
- getWinConditionString
getWinConditionString
@@ -29772,7 +30075,19 @@
Fields:
- - battleAIPlan
+
- battleOdds
+ float
+
+
+
+
+ - totalValueStart
+ int
+
+
+
+
+ - battleAIPlan
battleAI
@@ -29785,8 +30100,8 @@
Fields:
- armies
- trackedPointerArmy[8]
- Returns a table of trackedPointerArmy. Maximum: 8.
+ trackedPointerArmy[64]
+ Returns a table of trackedPointerArmy. Maximum: 64.
@@ -29949,7 +30264,7 @@ Fields:
deploymentArea
- deploymentAreaS
+ deploymentAreaS
@@ -29966,8 +30281,8 @@
-
-
- trackedPointerArmy.deploymentAreaS
+
+ deploymentAreaS
-
@@ -30075,13 +30390,166 @@
Fields:
+
+
- addedObjectivesCount
+ int
+
+
+
+
+
- getObjective
+ getObjective
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+ battleAI:getObjective (index)
+
+
-
+
+ Get a battle objective by it's index.
+
+
+ Parameters:
+
+
+ Returns:
+
+
+ battleObjective
+ objective
+
+
+
+
+ Usage:
+ local objective = battleAI:getObjective(0)
+
+
+
+
+
+
+
+ -
+
+ battleObjective
+
+ -
+
+ Basic battleObjective table
+
+
+ Fields:
+
+ - priority
+ int
+
+
+
+
+ - unitCount
+ int
+
+
+
+
+ - getUnit
+ getUnit
+
+
+
+
+ - getType
+ getType
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ battleObjective:getUnit (index)
+
+ -
+
+ Get a unit by it's index.
+
+
+ Parameters:
+
+ Returns:
+
+
+ unit
+ unit
+
+
+
+
+ Usage:
+ local unit = battleObjective:getUnit(0)
+
+
+
+ -
+
+ battleObjective:getType ()
+
+ -
+
+ Get the type of objective.
+
+
+ Returns:
+
+ int
+ objectiveType
+
+
+ Usage:
+ local objective = battleObjective:getType(0)
+
+
@@ -30325,6 +30793,12 @@
Fields:
+
+
- faction
+ factionStruct
+
+
+
- isFortBattle
int
@@ -30350,6 +30824,144 @@
Fields:
+
+
+
+
+
+ -
+
+ buildingBattle
+
+ -
+
+ Basic buildingBattle table
+
+
+ Fields:
+
+ - type
+ int
+
+
+
+
+ - endHealth
+ int
+
+
+
+
+ - currentHealth
+ int
+
+
+
+
+ - startHealth
+ int
+
+
+
+
+ - isDefenderControlled
+ int
+
+
+
+
+ - posX
+ float
+
+
+
+
+ - posZ
+ float
+
+
+
+
+ - posY
+ float
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ battleBuildings
+
+ -
+
+ Basic battleBuildings table
+
+
+ Fields:
+
+ - buildingCount
+ int
+
+
+
+
+ - getBuilding
+ getBuilding
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ battleBuildings:getBuilding (index)
+
+ -
+
+ Get a battle building by it's index.
+
+
+ Parameters:
+
+
+ Returns:
+
+
+ buildingBattle
+ building
+
+
+
+
+ Usage:
+ local building = battleBuildings:getBuilding(0)
+
+
diff --git a/docs/_static/LuaLib/readme_imgui.md.html b/docs/_static/LuaLib/readme_imgui.md.html
index 813d1bab..0739529c 100644
--- a/docs/_static/LuaLib/readme_imgui.md.html
+++ b/docs/_static/LuaLib/readme_imgui.md.html
@@ -274,7 +274,7 @@ Medieval 2: Total War - Engine Overhaul Project Lua Plugi
Welcome to the EOP Lua Plugin Documentation!
Please note that many of the examples require additional checks and not all functions are fully documented. If you need additional help, we welcome you to join the Discord!
-
Last updated: 2024-01-22 17:41:51
+ Last updated: 2024-02-03 21:26:27