Skip to content

Commit

Permalink
Updated EOP Docs for version: M2TWEOP-3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnTW committed Apr 2, 2024
1 parent 3c6b927 commit 0dbdd67
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 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: 2024-04-01 14:12:12</p>
<p class="lastUpdatedMessage">Last updated: 2024-04-02 23:16:32</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: 60 additions & 4 deletions docs/_static/LuaLib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ <h2>Data Types</h2>
<li><a href="#onChangeTurnNum">onChangeTurnNum (turnNumber)</a></li>
<li><a href="#onSelectWorldpkgdesc">onSelectWorldpkgdesc (selectedRecordName, selectedRecordGroup)</a></li>
<li><a href="#onfortificationlevelS">onfortificationlevelS (siegedSettlement)</a></li>
<li><a href="#onCalculateUnitValue">onCalculateUnitValue (entry, value)</a></li>
<li><a href="#onEndSiege">onEndSiege (xCoord, yCoord)</a></li>
<li><a href="#onStartSiege">onStartSiege (xCoord, yCoord)</a></li>
</details>
Expand Down Expand Up @@ -1148,7 +1149,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: 2024-04-01 14:12:12</p>
<p class="lastUpdatedMessage">Last updated: 2024-04-02 23:16:32</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 @@ -3105,6 +3106,10 @@ <h2><a href="#EOP_Events">EOP Events </a></h2>
<td class="summary">Called on specified fortificationlevel in a siege of a settlement.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#onCalculateUnitValue">onCalculateUnitValue (entry, value)</a></td>
<td class="summary">Called when the game calculates the value of a unit.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#onEndSiege">onEndSiege (xCoord, yCoord)</a></td>
<td class="summary">Called on the completion of the siege (in any way, with any outcome).</td>
</tr>
Expand Down Expand Up @@ -9751,7 +9756,7 @@ <h3>Fields:</h3>

</li>
<li><span class="parameter">getFort</span>
<span class="types"><a class="type" href="index.html#factionStruct:getFort">getFort</a></span>
<span class="types"><a class="type" href="index.html#regionStruct:getFort">getFort</a></span>



Expand Down Expand Up @@ -16544,6 +16549,12 @@ <h3>Fields:</h3>



</li>
<li><span class="parameter">onCalculateUnitValue</span>
<span class="types"><a class="type" href="index.html#onCalculateUnitValue">onCalculateUnitValue</a></span>



</li>
<li><span class="parameter">onEndSiege</span>
<span class="types"><a class="type" href="index.html#onEndSiege">onEndSiege</a></span>
Expand Down Expand Up @@ -24166,6 +24177,51 @@ <h3>Usage:</h3>
</span><span class="keyword">end</span></code></pre>
</ul>

</dd>
<dt>
<a name = "onCalculateUnitValue"></a>
<strong>onCalculateUnitValue (entry, value)</strong>
</dt>
<dd>
<div class="functionDescription">
Called when the game calculates the value of a unit.
</div>

<h3>Parameters:</h3>
<ul>
<li><span class="parameter">entry</span>
<span class="types"><a class="type" href="index.html#eduEntry">eduEntry</a></span>



</li>
<li><span class="parameter">value</span>
<span class="types"><span class="type">float</span></span>



</li>
</ul>

<h3>Returns:</h3>
<ol>

<span class="types"><span class="type">float</span></span>
newValue
</ol>



<h3>Usage:</h3>
<ul>
<pre class="example"><code class="language-lua" ><span class="keyword">function</span> onCalculateUnitValue(entry, value)
<span class="keyword">if</span> entry.eduType = <span class="string">"my_unit"</span> <span class="keyword">then</span>
<span class="keyword">return</span> value * <span class="number">2</span>
<span class="keyword">end</span>
<span class="keyword">return</span> value
<span class="keyword">end</span></code></pre>
</ul>

</dd>
<dt>
<a name = "onEndSiege"></a>
Expand Down Expand Up @@ -27749,7 +27805,7 @@ <h3>Fields:</h3>

</li>
<li><span class="parameter">getFort</span>
<span class="types"><a class="type" href="index.html#factionStruct:getFort">getFort</a></span>
<span class="types"><a class="type" href="index.html#regionStruct:getFort">getFort</a></span>



Expand Down Expand Up @@ -29308,7 +29364,7 @@ <h3>Fields:</h3>

</li>
<li><span class="parameter">getFort</span>
<span class="types"><a class="type" href="index.html#factionStruct:getFort">getFort</a></span>
<span class="types"><a class="type" href="index.html#regionStruct:getFort">getFort</a></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: 2024-04-01 14:12:12</p>
<p class="lastUpdatedMessage">Last updated: 2024-04-02 23:16:32</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 0dbdd67

Please sign in to comment.