Skip to content

Commit

Permalink
Updated EOP Docs for version: M2TWEOP-3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
youneuoy committed Dec 3, 2023
1 parent 393e464 commit 31fd7eb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/_static/LuaLib/extra/readme_imgui.md.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h2 class="bannerText">Medieval 2: Total War - Engine Overhaul Project Lua Plugi
<h3 class="welcomeMessage">Welcome to the EOP Lua Plugin Documentation!</h3>
<br>
<h3 class="disclaimerMessage">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!</h3>
<p class="lastUpdatedMessage">Last updated: 2023-12-01 22:12:54</p>
<p class="lastUpdatedMessage">Last updated: 2023-12-03 11:23:15</p>
<a target="_blank" href="https://discord.gg/Epqjm8u2WK">
<img class="discordImage" src="https://img.shields.io/discord/713369537948549191?color=282828&label=DISCORD&style=for-the-badge"/>
</a>
Expand Down
64 changes: 42 additions & 22 deletions docs/_static/LuaLib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ <h2>Data Types</h2>
<details>
<summary><a href="#StackStruct">StackStruct </a></summary>
<li><a href="#stackStruct">stackStruct</a></li>
<li><a href="#stackStruct:sortStack">stackStruct:sortStack (sort)</a></li>
<li><a href="#stackStruct:sortStack">stackStruct:sortStack (sortMode, sortMode2, sortMode3)</a></li>
<li><a href="#stackStruct:getUnit">stackStruct:getUnit (number)</a></li>
<li><a href="#stackStruct:getCharacter">stackStruct:getCharacter (number)</a></li>
<li><a href="#stackStruct:findInSettlement">stackStruct:findInSettlement ()</a></li>
Expand Down Expand Up @@ -767,7 +767,7 @@ <h2>Data Types</h2>
<li><a href="#EDB.setBuildingLocalizedDescrShort">EDB.setBuildingLocalizedDescrShort (edbEntry, newName, level, facnum)</a></li>
<li><a href="#EDB.addBuildingCapability">EDB.addBuildingCapability (edbEntry, level, capability, value, bonus)</a></li>
<li><a href="#EDB.removeBuildingCapability">EDB.removeBuildingCapability (edbEntry, level, index)</a></li>
<li><a href="#EDB.getBuildingCapability">EDB.getBuildingCapability (edbEntry, level, index.)</a></li>
<li><a href="#EDB.getBuildingCapability">EDB.getBuildingCapability (edbEntry, level, index)</a></li>
<li><a href="#EDB.getBuildingCapabilityNum">EDB.getBuildingCapabilityNum (edbEntry, level)</a></li>
<li><a href="#EDB.addBuildingPool">EDB.addBuildingPool (edbEntry, level, eduIndex, initialSize, gainPerTurn, maxSize, exp, condition)</a></li>
<li><a href="#EDB.removeBuildingPool">EDB.removeBuildingPool (edbEntry, level, index)</a></li>
Expand Down Expand Up @@ -1076,7 +1076,7 @@ <h2 class="bannerText">Medieval 2: Total War - Engine Overhaul Project Lua Plugi
<h3 class="welcomeMessage">Welcome to the EOP Lua Plugin Documentation!</h3>
<br>
<h3 class="disclaimerMessage">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!</h3>
<p class="lastUpdatedMessage">Last updated: 2023-12-01 22:12:54</p>
<p class="lastUpdatedMessage">Last updated: 2023-12-03 11:23:15</p>
<a target="_blank" href="https://discord.gg/Epqjm8u2WK">
<img class="discordImage" src="https://img.shields.io/discord/713369537948549191?color=282828&label=DISCORD&style=for-the-badge"/>
</a>
Expand Down Expand Up @@ -1999,7 +1999,7 @@ <h2><a href="#StackStruct">StackStruct </a></h2>
<td class="summary">Basic stackStruct table</td>
</tr>
<tr>
<td class="name" nowrap><a href="#stackStruct:sortStack">stackStruct:sortStack (sort)</a></td>
<td class="name" nowrap><a href="#stackStruct:sortStack">stackStruct:sortStack (sortMode, sortMode2, sortMode3)</a></td>
<td class="summary">Sort units in a stack.</td>
</tr>
<tr>
Expand Down Expand Up @@ -3124,7 +3124,7 @@ <h2><a href="#EDB">EDB </a></h2>
<td class="summary">Remove a capability from a building.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#EDB.getBuildingCapability">EDB.getBuildingCapability (edbEntry, level, index.)</a></td>
<td class="name" nowrap><a href="#EDB.getBuildingCapability">EDB.getBuildingCapability (edbEntry, level, index)</a></td>
<td class="summary">

</td>
Expand Down Expand Up @@ -4625,7 +4625,7 @@ <h3>Usage:</h3>
<h3>Returns:</h3>
<ol>

<span class="types"><a class="type" href="index.html#options1">options1</a></span>
<span class="types"><a class="type" href="index.html#options2">options2</a></span>
options
</ol>

Expand All @@ -4650,7 +4650,7 @@ <h3>Usage:</h3>
<h3>Returns:</h3>
<ol>

<span class="types"><a class="type" href="index.html#options1">options1</a></span>
<span class="types"><a class="type" href="index.html#campaignDifficulty1">campaignDifficulty1</a></span>
options
</ol>

Expand All @@ -4675,7 +4675,7 @@ <h3>Usage:</h3>
<h3>Returns:</h3>
<ol>

<span class="types"><a class="type" href="index.html#options1">options1</a></span>
<span class="types"><a class="type" href="index.html#campaignDifficulty2">campaignDifficulty2</a></span>
options
</ol>

Expand Down Expand Up @@ -4723,7 +4723,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" ><span class="keyword">local</span> options =M2TWEOP.condition();</code></pre>
<pre class="example"><code class="language-lua" ><span class="keyword">if</span> M2TWEOP.condition(<span class="string">"InEnemyLands"</span>, eventData) <span class="keyword">then</span>
<span class="comment">--do stuff
</span><span class="keyword">end</span></code></pre>
</ul>

</dd>
Expand Down Expand Up @@ -5498,7 +5500,8 @@ <h3>Returns:</h3>
<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" ><span class="comment">-- Creating units, adding money
</span><span class="keyword">function</span> onCharacterSelected(selectedChar)
</span><span class="keyword">function</span> onCharacterSelected(eventData)
<span class="keyword">local</span> selectedChar = eventData.character
<span class="keyword">local</span> err = stratmap.game.callConsole(<span class="string">"add_money"</span>, <span class="string">"2321"</span>)
<span class="keyword">local</span> err2 = stratmap.game.callConsole(<span class="string">"create_unit"</span>, <span class="string">"testcharacter 'Cool Unit' 4 1 1 1"</span>)
<span class="global">print</span>(err)
Expand Down Expand Up @@ -6242,7 +6245,7 @@ <h3>Parameters:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" >unit:setBattleProperty(unitBattleProperties.skirmish);</code></pre>
<pre class="example"><code class="language-lua" >unit:setBattleProperty(unitBattleProperties.skirmish, <span class="keyword">true</span>);</code></pre>
</ul>

</dd>
Expand Down Expand Up @@ -6839,7 +6842,7 @@ <h3>Fields:</h3>


</li>
<li><span class="parameter">ArmourCost</span>
<li><span class="parameter">armourCost</span>
<span class="types"><span class="type">int</span></span>


Expand Down Expand Up @@ -13415,7 +13418,8 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" ><span class="keyword">function</span> onSettlementSelected(selectedSett)
<pre class="example"><code class="language-lua" ><span class="keyword">function</span> onSettlementSelected(eventData)
<span class="keyword">local</span> selectedSett = eventData.settlement
<span class="keyword">local</span> resList = <span class="string">""</span>
<span class="keyword">for</span> i = <span class="number">0</span>, selectedSett.resourcesNum - <span class="number">1</span>, <span class="number">1</span> <span class="keyword">do</span>
<span class="keyword">local</span> thisRes = selectedSett:getResource(i)
Expand Down Expand Up @@ -13584,7 +13588,7 @@ <h3>Fields:</h3>
</dd>
<dt>
<a name = "stackStruct:sortStack"></a>
<strong>stackStruct:sortStack (sort)</strong>
<strong>stackStruct:sortStack (sortMode, sortMode2, sortMode3)</strong>
</dt>
<dd>
<div class="functionDescription">
Expand All @@ -13593,9 +13597,23 @@ <h3>Fields:</h3>

<h3>Parameters:</h3>
<ul>
<li><span class="parameter">sort</span>
<li><span class="parameter">sortMode</span>
<span class="types"><span class="type">int</span></span>
mode



</li>
<li><span class="parameter">sortMode2</span>
<span class="types"><span class="type">int</span></span>



</li>
<li><span class="parameter">sortMode3</span>
<span class="types"><span class="type">int</span></span>



</li>
</ul>

Expand All @@ -13610,8 +13628,10 @@ <h3>Usage:</h3>
</span><span class="comment">-- 3 = Class
</span><span class="comment">-- 4 = Soldier Count
</span><span class="comment">-- 5 = Experience
</span><span class="comment">-- 6 = Category + Class
</span>
<span class="keyword">function</span> onFactionTurnStart(faction)
<span class="keyword">function</span> onFactionTurnStart(eventData)
<span class="keyword">local</span> faction = eventData.faction
<span class="comment">-- If it's not the players turn, don't sort
</span> <span class="keyword">if</span> faction.isPlayerControlled == <span class="number">0</span> <span class="keyword">then</span> <span class="keyword">return</span> <span class="keyword">end</span>;

Expand All @@ -13632,8 +13652,8 @@ <h3>Usage:</h3>
</span> <span class="comment">-- end
</span> <span class="comment">-- end
</span>
<span class="comment">-- Sort the stack by EDU type
</span> stack:sortStack(<span class="number">1</span>)
<span class="comment">-- Sort the stack by category + class, then by soldier count, then by experience
</span> stack:sortStack(<span class="number">6</span>, <span class="number">4</span>, <span class="number">5</span>)

<span class="comment">-- print("\n\n")
</span> <span class="comment">-- print("-- Sorted Stack --")
Expand Down Expand Up @@ -24891,7 +24911,7 @@ <h3>Usage:</h3>
</dd>
<dt>
<a name = "EDB.getBuildingCapability"></a>
<strong>EDB.getBuildingCapability (edbEntry, level, index.)</strong>
<strong>EDB.getBuildingCapability (edbEntry, level, index)</strong>
</dt>
<dd>
<div class="functionDescription">
Expand All @@ -24911,7 +24931,7 @@ <h3>Parameters:</h3>
<span class="types"><span class="type">int</span></span>
Building level.
</li>
<li><span class="parameter">index.</span>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>


Expand Down Expand Up @@ -29805,7 +29825,7 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" ><span class="keyword">function</span> onPostBattle(namedChar, faction, region, characterType, religion)
<pre class="example"><code class="language-lua" ><span class="keyword">function</span> onPostBattle(eventData)
getBattleData()
<span class="keyword">end</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/_static/LuaLib/readme_imgui.md.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h2 class="bannerText">Medieval 2: Total War - Engine Overhaul Project Lua Plugi
<h3 class="welcomeMessage">Welcome to the EOP Lua Plugin Documentation!</h3>
<br>
<h3 class="disclaimerMessage">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!</h3>
<p class="lastUpdatedMessage">Last updated: 2023-12-01 22:12:54</p>
<p class="lastUpdatedMessage">Last updated: 2023-12-03 11:23:15</p>
<a target="_blank" href="https://discord.gg/Epqjm8u2WK">
<img class="discordImage" src="https://img.shields.io/discord/713369537948549191?color=282828&label=DISCORD&style=for-the-badge"/>
</a>
Expand Down

0 comments on commit 31fd7eb

Please sign in to comment.