diff --git a/docs/_static/LuaLib/extra/readme_imgui.md.html b/docs/_static/LuaLib/extra/readme_imgui.md.html index 813d1bab..0739529c 100644 --- a/docs/_static/LuaLib/extra/readme_imgui.md.html +++ b/docs/_static/LuaLib/extra/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

diff --git a/docs/_static/LuaLib/index.html b/docs/_static/LuaLib/index.html index 448772fe..b97d834c 100644 --- a/docs/_static/LuaLib/index.html +++ b/docs/_static/LuaLib/index.html @@ -63,9 +63,11 @@

Data Types

  • M2TWEOP.isTileFree (X, Y)
  • M2TWEOP.getGameTileCoordsWithCursor ()
  • M2TWEOP.getTileRegionID (x, y)
  • -
  • M2TWEOP.getTileVisibility (faction, x, y)
  • +
  • M2TWEOP.getTileVisibility (faction, xCoord, yCoord)
  • M2TWEOP.getRegionOwner (regionID)
  • M2TWEOP.getReligionName (index)
  • +
  • M2TWEOP.getReligionCount ()
  • +
  • M2TWEOP.getReligion (name)
  • M2TWEOP.getOptions1 ()
  • M2TWEOP.getOptions2 ()
  • M2TWEOP.getCampaignDifficulty1 ()
  • @@ -101,7 +103,7 @@

    Data Types

  • objects.startDrawModelAt (modelId, x, y, sizeMultiplier)
  • objects.stopDrawModel (modelId)
  • objects.addModelToGame (path, modelId)
  • -
  • objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath)
  • +
  • objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath, scale)
  • objects.setModel (xCoord, yCoord, modelId, modelId2)
  • objects.replaceTile (label, xCoord, yCoord, filename, weather, dayTime)
  • @@ -119,7 +121,7 @@

    Data Types

    Game
  • stratmap.game
  • -
  • game.callConsole ()
  • +
  • game.callConsole (command, args)
  • game.getFactionsCount ()
  • game.getFaction (Index)
  • game.getGuild (index)
  • @@ -153,6 +155,7 @@

    Data Types

  • unit:isOnWalls ()
  • unit:isEngaged ()
  • unit:isUnderFire ()
  • +
  • unit:getMountClass ()
  • @@ -168,6 +171,8 @@

    Data Types

    EduEntry
  • eduEntry
  • +
  • eduEntry:hasOwnership (factionID)
  • +
  • eduEntry:setOwnerShip (factionID, setOwnership)
  • @@ -537,7 +542,7 @@

    Data Types

  • onCeasedFactionHeir (eventData)
  • onCharacterDamagedByDisaster (eventData)
  • onGeneralCaptureSettlement (eventData)
  • -
  • onGeneralAssaultsResidence (eventData)
  • +
  • onGeneralAssaultsResidence (eventData, settlement, fort)
  • onGeneralAssaultsGeneral (eventData)
  • onCharacterAttacksCrusadingGeneral (eventData)
  • onGeneralPrisonersRansomedCaptor (eventData)
  • @@ -978,7 +983,7 @@

    Data Types

    DeploymentAreaS -
  • trackedPointerArmy.deploymentAreaS
  • +
  • deploymentAreaS
  • deploymentAreaS:getCoordPair ()
  • @@ -986,6 +991,15 @@

    Data Types

    BattleAI
  • battleAI
  • +
  • battleAI:getObjective (index)
  • +
    + + +
    + BattleObjective +
  • battleObjective
  • +
  • battleObjective:getUnit (index)
  • +
  • battleObjective:getType ()
  • @@ -1008,6 +1022,19 @@

    Data Types

    +
    + buildingBattle +
  • buildingBattle
  • +
    + + +
    + battleBuildings +
  • battleBuildings
  • +
  • battleBuildings:getBuilding (index)
  • +
    + +
    M2TWEOPFBX
  • M2TWEOPFBX
  • @@ -1076,7 +1103,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

    @@ -1190,7 +1217,7 @@

    M2TWEOP

    Get the RegionID of a tile. - M2TWEOP.getTileVisibility (faction, x, y) + M2TWEOP.getTileVisibility (faction, xCoord, yCoord) Get a specific tile's visibility according to faction (i.e can a faction see a tile) Note: Once the tile has been seen by a faction, it will always return true. @@ -1202,6 +1229,14 @@

    M2TWEOP

    Get religion name by index. + M2TWEOP.getReligionCount () + Get the amount of religions. + + + M2TWEOP.getReligion (name) + Get religion ID by name. + + M2TWEOP.getOptions1 () Get some game options. @@ -1274,7 +1309,7 @@

    StratmapObjects

    Add a new .cas campaign strategy model to the game with a unique ID. - objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath) + objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath, scale) Add a new .cas character strategy model to the game with a unique name. @@ -1312,12 +1347,12 @@

    Game

    Basic stratmap.game table - game.callConsole () + game.callConsole (command, args) Execute a Medieval II console command. game.getFactionsCount () - Get the amount of factions + Get the amount of factions. game.getFaction (Index) @@ -1413,6 +1448,10 @@

    Unit

    unit:isUnderFire () Is unit under fire? + + unit:getMountClass () + Get unit mount class. +

    Unit Position Data

    @@ -1441,6 +1480,14 @@

    EduEntry

    + + + + + + + +
    eduEntry Basic eduEntry table
    eduEntry:hasOwnership (factionID)Check if a faction has ownership of this entry.
    eduEntry:setOwnerShip (factionID, setOwnership)Set if a faction has ownership of this entry.

    Character

    @@ -2289,7 +2336,7 @@

    EOP Events

    - + @@ -3530,7 +3577,7 @@

    TrackedPointerArmy

    DeploymentAreaS

    A General has captured a settlement.
    onGeneralAssaultsResidence (eventData)onGeneralAssaultsResidence (eventData, settlement, fort) An assault has taken place.
    - + @@ -3544,6 +3591,25 @@

    BattleAI

    + + + + +
    trackedPointerArmy.deploymentAreaSdeploymentAreaS Basic trackedPointerArmy table
    battleAI Basic Battle AI table
    battleAI:getObjective (index)Get a battle objective by it's index.
    +

    BattleObjective

    + + + + + + + + + + + + +
    battleObjectiveBasic battleObjective table
    battleObjective:getUnit (index)Get a unit by it's index.
    battleObjective:getType ()Get the type of objective.

    BattleArmy

    @@ -3570,6 +3636,24 @@

    battleResidence

    Basic battleResidence table
    +

    buildingBattle

    + + + + + +
    buildingBattleBasic buildingBattle table
    +

    battleBuildings

    + + + + + + + + + +
    battleBuildingsBasic battleBuildings table
    battleBuildings:getBuilding (index)Get a battle building by it's index.

    M2TWEOPFBX

    @@ -3844,6 +3928,12 @@

    Fields:

    + +
  • setGuildCooldown + setGuildCooldown + + +
  • getRegionOwner getRegionOwner @@ -3868,6 +3958,18 @@

    Fields:

    +
  • +
  • getReligionCount + getReligionCount + + + +
  • +
  • getReligion + getReligion + + +
  • condition condition @@ -4474,7 +4576,7 @@

    Usage:

    - M2TWEOP.getTileVisibility (faction, x, y) + M2TWEOP.getTileVisibility (faction, xCoord, yCoord)
    @@ -4487,21 +4589,21 @@

    Parameters:

    factionStruct Faction to check
  • -
  • x - xCoord - coord of the tile +
  • xCoord + int + x coord of the tile
  • -
  • y - yCoord - coord of the tile +
  • yCoord + int + y coord of the tile
  • Returns:

      - isVisible - true = visible, false = not visible + bool + isVisible true = visible, false = not visible
    @@ -4586,6 +4688,65 @@

    Usage:

    local religionName = M2TWEOP.getReligionName(1);
    + +
    + + M2TWEOP.getReligionCount () +
    +
    +
    + Get the amount of religions. +
    + + +

    Returns:

    +
      + + int + religionCount +
    + + + +

    Usage:

    + + +
    +
    + + M2TWEOP.getReligion (name) +
    +
    +
    + Get religion ID by name. +
    + +

    Parameters:

    + + +

    Returns:

    +
      + + int + index +
    + + + +

    Usage:

    + +
    @@ -5125,7 +5286,7 @@

    Usage:

    - objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath) + objects.addCharacterCas (skeleton, caspath, shadowcaspath, typename, texturepath, scale)
    @@ -5153,6 +5314,12 @@

    Parameters:

  • texturepath string Relative path from the mods folder (starting with "mods/"). +
  • +
  • scale + float + + +
  • @@ -5166,7 +5333,8 @@

    Usage:

    "mods/Bare_Geomod/data/models_strat/islamic_general2.cas", "mods/Bare_Geomod/data/models_strat/shadow_sword2.cas", "islamic_general2", - "mods/Bare_Geomod/data/models_strat/textures/islamic_general_turks.tga" + "mods/Bare_Geomod/data/models_strat/textures/islamic_general_turks.tga", + 0.7 ); @@ -5480,13 +5648,28 @@

    Fields:

    - game.callConsole () + game.callConsole (command, args)
    Execute a Medieval II console command.
    +

    Parameters:

    +

    Returns:

      @@ -5516,7 +5699,7 @@

      Usage:

      - Get the amount of factions + Get the amount of factions.
      @@ -5905,19 +6088,19 @@

      Stratmap

      Fields:

      @@ -6401,6 +6590,31 @@

      Usage:

      local isUnderFire = unit:isUnderFire();
      +
      +
      + + unit:getMountClass () +
      +
      +
      + Get unit mount class. +
      + + +

      Returns:

      +
        + + int + mountClass +
      + + + +

      Usage:

      +
        +
        local mountClass = unit:getMountClass();
        +
      +

      Unit Position Data

      @@ -6902,10 +7116,81 @@

      Fields:

      +
    +
    + + eduEntry:hasOwnership (factionID) +
    +
    +
    + Check if a faction has ownership of this entry. +
    + +

    Parameters:

    + + +

    Returns:

    +
      + + bool + hasOwnership +
    + + + +

    Usage:

    + + +
    +
    + + eduEntry:setOwnerShip (factionID, setOwnership) +
    +
    +
    + Set if a faction has ownership of this entry. +
    + +

    Parameters:

    + + + + + +

    Usage:

    + +
    -

    Character

    +

    Character

    +
    + Table +
    @@ -7041,12 +7326,6 @@

    Fields:

    - -
  • turnJoinedCrusade - int - - -
  • currentTurn int @@ -7513,6 +7792,12 @@

    Fields:

    +
  • +
  • isFamily + bool + + +
  • isMale bool @@ -7556,7 +7841,7 @@

    Fields:

  • childs namedCharacter[4] - example: ourChar.childs[2].fullName + Maximum 4.
  • getTraits getTraits @@ -11284,7 +11569,7 @@

    Fields:

  • getSiege - getSiege + getSiege @@ -11739,7 +12024,7 @@

    Fields:

  • getSiege - getSiege + getSiege @@ -13552,6 +13837,12 @@

    Fields:

    +
  • +
  • sortStack + sortStack + + +
  • mergeArmies mergeArmies @@ -17484,12 +17775,12 @@

    Usage:

    - onGeneralAssaultsResidence (eventData) + onGeneralAssaultsResidence (eventData, settlement, fort)
    -

    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)
       --something
       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 @@

    MercenaryUnits

    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 @@

    DeploymentAreaS

    - - trackedPointerArmy.deploymentAreaS + + deploymentAreaS
    @@ -30075,13 +30390,166 @@

    Fields:

    +
  • +
  • addedObjectivesCount + int + + + +
  • +
  • getObjective + getObjective + + + + + +
  • + + + + + + + +
    + + battleAI:getObjective (index) +
    +
    +
    + Get a battle objective by it's index. +
    + +

    Parameters:

    +
      +
    • index + int + + + +
    • +
    + +

    Returns:

    +
      + + battleObjective + objective +
    + + + +

    Usage:

    +
      +
      local objective = battleAI:getObjective(0)
      +
    + +
    +
    +

    BattleObjective

    + +
    +
    + + battleObjective +
    +
    +
    + Basic battleObjective table +
    + +

    Fields:

    +
      +
    • priority + int + + + +
    • +
    • unitCount + int + + + +
    • +
    • getUnit + getUnit + + + +
    • +
    • getType + getType + + + +
    • +
    + + + + + +
    +
    + + battleObjective:getUnit (index) +
    +
    +
    + Get a unit by it's index. +
    + +

    Parameters:

    +
      +
    • index + int + + +
    +

    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)
      +
    +

    BattleArmy

    @@ -30325,6 +30793,12 @@

    Fields:

    + +
  • faction + factionStruct + + +
  • isFortBattle int @@ -30350,6 +30824,144 @@

    Fields:

    + + +

    buildingBattle

    + +
    +
    + + buildingBattle +
    +
    +
    + Basic buildingBattle table +
    + +

    Fields:

    +
      +
    • type + int + + + +
    • +
    • endHealth + int + + + +
    • +
    • currentHealth + int + + + +
    • +
    • startHealth + int + + + +
    • +
    • isDefenderControlled + int + + + +
    • +
    • posX + float + + + +
    • +
    • posZ + float + + + +
    • +
    • posY + float + + + +
    • +
    + + + + + +
    +
    +

    battleBuildings

    + +
    +
    + + battleBuildings +
    +
    +
    + Basic battleBuildings table +
    + +

    Fields:

    +
      +
    • buildingCount + int + + + +
    • +
    • getBuilding + getBuilding + + + +
    • +
    + + + + + +
    +
    + + battleBuildings:getBuilding (index) +
    +
    +
    + Get a battle building by it's index. +
    + +

    Parameters:

    +
      +
    • index + int + + + +
    • +
    + +

    Returns:

    +
      + + buildingBattle + building +
    + + + +

    Usage:

    +
      +
      local building = battleBuildings:getBuilding(0)
      +
    +

    M2TWEOPFBX

    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