Skip to content

Commit

Permalink
Updated EOP Docs for version: M2TWEOP-2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieEldridge committed Jul 7, 2023
1 parent fe02963 commit 0eaee3f
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 85 deletions.
24 changes: 21 additions & 3 deletions docs/M2TWEOP_LAUNCHER_SETTINGS.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>Configuring the EOP launcher and settings<a class="headerlink" href="#config
<section id="configure-the-ui">
<h2>Configure the UI<a class="headerlink" href="#configure-the-ui" title="Permalink to this headline"></a></h2>
<section id="note-remember-that-json-does-not-allow-comments-so-do-not-copy-these-examples-directly">
<h3>Note: Remember that JSON does not allow comments so do not copy these examples directly.<a class="headerlink" href="#note-remember-that-json-does-not-allow-comments-so-do-not-copy-these-examples-directly" title="Permalink to this headline"></a></h3>
<h3>Note: Remember that JSON does not allow comments so do not copy these examples directly<a class="headerlink" href="#note-remember-that-json-does-not-allow-comments-so-do-not-copy-these-examples-directly" title="Permalink to this headline"></a></h3>
</section>
<section id="eopdata-uicfg-json">
<h3><code class="docutils literal notranslate"><span class="pre">eopData/uiCfg.json</span></code><a class="headerlink" href="#eopdata-uicfg-json" title="Permalink to this headline"></a></h3>
Expand All @@ -142,7 +142,7 @@ <h3><code class="docutils literal notranslate"><span class="pre">eopData/uiCfg.j
<span class="s2">&quot;playBackgroundMusic&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> <span class="o">//</span> <span class="n">Whether</span> <span class="n">music</span> <span class="n">should</span> <span class="n">play</span> <span class="n">automatically</span> <span class="n">when</span> <span class="n">starting</span> <span class="n">the</span> <span class="n">launcher</span>
<span class="s2">&quot;useM2TWEOP&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span> <span class="o">//</span> <span class="n">Whether</span> <span class="n">EOP</span> <span class="n">should</span> <span class="n">be</span> <span class="n">enabled</span> <span class="n">when</span> <span class="n">running</span> <span class="n">the</span> <span class="n">mod</span>
<span class="s2">&quot;useVanillaCfg&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span> <span class="o">//</span> <span class="n">Don</span><span class="s1">&#39;t read the modCfgFile but just read medieval2.preference.cfg</span>
<span class="s2">&quot;modTitle&quot;</span><span class="p">:</span> <span class="s2">&quot;Divide and Conquer: AGO&quot;</span><span class="p">,</span> <span class="o">//</span> <span class="n">Sets</span> <span class="n">the</span> <span class="n">title</span> <span class="n">of</span> <span class="n">the</span> <span class="n">launcher</span> <span class="n">window</span> <span class="ow">and</span> <span class="n">the</span> <span class="s2">&quot;Run&quot;</span> <span class="n">button</span>
<span class="s2">&quot;modTitle&quot;</span><span class="p">:</span> <span class="s2">&quot;Divide and Conquer: AGO&quot;</span><span class="p">,</span> <span class="o">//</span> <span class="n">Sets</span> <span class="n">the</span> <span class="n">title</span> <span class="n">of</span> <span class="n">the</span> <span class="n">launcher</span> <span class="n">window</span> <span class="ow">and</span> <span class="n">the</span> <span class="s2">&quot;Run&quot;</span> <span class="n">button</span> <span class="ow">and</span> <span class="n">helps</span> <span class="n">aid</span> <span class="n">detection</span> <span class="n">of</span> <span class="n">your</span> <span class="n">mod</span> <span class="k">for</span> <span class="n">the</span> <span class="n">Discord</span> <span class="n">Rich</span> <span class="n">Presence</span> <span class="n">features</span>
<span class="s2">&quot;runButtonColor&quot;</span><span class="p">:</span> <span class="s2">&quot;123,40,145,185&quot;</span><span class="p">,</span> <span class="o">//</span> <span class="n">Color</span> <span class="n">of</span> <span class="n">the</span> <span class="n">run</span> <span class="n">button</span> <span class="ow">in</span> <span class="n">this</span> <span class="nb">format</span> <span class="p">(</span><span class="n">red</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">green</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">blue</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">alpha</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">))</span>
<span class="s2">&quot;runButtonHoverColor&quot;</span><span class="p">:</span> <span class="s2">&quot;145,40,145,175&quot;</span> <span class="o">//</span> <span class="n">Hover</span><span class="o">/</span><span class="n">highlight</span> <span class="n">color</span> <span class="n">of</span> <span class="n">the</span> <span class="n">run</span> <span class="n">button</span> <span class="ow">in</span> <span class="n">this</span> <span class="nb">format</span> <span class="p">(</span><span class="n">red</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">green</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">blue</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">),</span> <span class="n">alpha</span><span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">255</span><span class="p">))</span>
<span class="p">}</span>
Expand All @@ -167,12 +167,30 @@ <h2>Configure the Game<a class="headerlink" href="#configure-the-game" title="Pe
<section id="eopdata-gamecfg-json">
<h3><code class="docutils literal notranslate"><span class="pre">eopData/gameCfg.json</span></code><a class="headerlink" href="#eopdata-gamecfg-json" title="Permalink to this headline"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;isBlockLaunchWithoutEop&quot;</span><span class="p">:</span> <span class="n">false</span> <span class="o">//</span> <span class="n">Should</span> <span class="n">we</span> <span class="n">stop</span> <span class="n">the</span> <span class="n">mod</span> <span class="n">running</span> <span class="k">if</span> <span class="n">EOP</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">enabled</span> <span class="p">(</span><span class="n">Read</span> <span class="n">more</span> <span class="n">about</span> <span class="n">this</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">FAQ</span><span class="p">)</span>
<span class="s2">&quot;isBlockLaunchWithoutEop&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> <span class="o">//</span> <span class="n">Should</span> <span class="n">we</span> <span class="n">stop</span> <span class="n">the</span> <span class="n">mod</span> <span class="n">running</span> <span class="k">if</span> <span class="n">EOP</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">enabled</span> <span class="p">(</span><span class="n">Read</span> <span class="n">more</span> <span class="n">about</span> <span class="n">this</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">FAQ</span><span class="p">)</span>
<span class="s2">&quot;isDiscordRichPresenceEnabled&quot;</span><span class="p">:</span> <span class="n">true</span> <span class="o">//</span> <span class="n">Should</span> <span class="n">we</span> <span class="n">enable</span> <span class="n">Discord</span> <span class="n">Rich</span> <span class="n">Presence</span>
<span class="p">}</span>
</pre></div>
</div>
</section>
</section>
<section id="id1">
<h2>Configure the Game<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<section id="eopdata-discordrichpresencecfg-json">
<h3><code class="docutils literal notranslate"><span class="pre">eopData/discordRichPresenceCfg.json</span></code><a class="headerlink" href="#eopdata-discordrichpresencecfg-json" title="Permalink to this headline"></a></h3>
<p>If Discord Rich Presence is enabled, EOP will write information about your campaign to this file which is then read and used to update your Discord Rich Presence status.
It is recommended not to write manually to this file.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;factionName&quot;</span><span class="p">:</span> <span class="s2">&quot;Kingdom of Gondor&quot;</span><span class="p">,</span>
<span class="s2">&quot;turnNum&quot;</span><span class="p">:</span> <span class="s2">&quot;55&quot;</span><span class="p">,</span>
<span class="s2">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;On the campaign map 🗺️&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Rich Presence is enabled for the following mods</p>
<a class="reference external image-reference" href="https://cdn.discordapp.com/attachments/713369537948549194/1124290437734223912/image.png"><img alt="" src="https://cdn.discordapp.com/attachments/713369537948549194/1124290437734223912/image.png" /></a>
</section>
</section>
</section>


Expand Down
28 changes: 23 additions & 5 deletions docs/_sources/M2TWEOP_LAUNCHER_SETTINGS.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Configure the UI

#### Note: Remember that JSON does not allow comments so do not copy these examples directly.
#### Note: Remember that JSON does not allow comments so do not copy these examples directly

#### ```eopData/uiCfg.json```

Expand All @@ -14,7 +14,7 @@
"playBackgroundMusic": false, // Whether music should play automatically when starting the launcher
"useM2TWEOP": true, // Whether EOP should be enabled when running the mod
"useVanillaCfg": true, // Don't read the modCfgFile but just read medieval2.preference.cfg
"modTitle": "Divide and Conquer: AGO", // Sets the title of the launcher window and the "Run" button
"modTitle": "Divide and Conquer: AGO", // Sets the title of the launcher window and the "Run" button and helps aid detection of your mod for the Discord Rich Presence features
"runButtonColor": "123,40,145,185", // Color of the run button in this format (red(0-255), green(0-255), blue(0-255), alpha(0-255))
"runButtonHoverColor": "145,40,145,175" // Hover/highlight color of the run button in this format (red(0-255), green(0-255), blue(0-255), alpha(0-255))
}
Expand All @@ -31,13 +31,31 @@
}
```


### Configure the Game

#### ```eopData/gameCfg.json```

```
{
"isBlockLaunchWithoutEop": false // Should we stop the mod running if EOP is not enabled (Read more about this option in the FAQ)
"isBlockLaunchWithoutEop": false, // Should we stop the mod running if EOP is not enabled (Read more about this option in the FAQ)
"isDiscordRichPresenceEnabled": true // Should we enable Discord Rich Presence
}
```

### Configure the Game

#### ```eopData/discordRichPresenceCfg.json```

If Discord Rich Presence is enabled, EOP will write information about your campaign to this file which is then read and used to update your Discord Rich Presence status.
It is recommended not to write manually to this file.

```
{
"factionName": "Kingdom of Gondor",
"turnNum": "55",
"status": "On the campaign map 🗺️"
}
```
```

Rich Presence is enabled for the following mods
![](https://cdn.discordapp.com/attachments/713369537948549194/1124290437734223912/image.png)
57 changes: 33 additions & 24 deletions docs/_sources/faq.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,43 @@ suggest new entries in our discord!
--------------------------------------------

.. glossary::
*Where can I download M2TWEOP?*
The latest version of M2TWEOP is located on the "Releases" tab of the M2TWEOP github, here: https://github.com/youneuoy/M2TWEOP-library/releases. You need to download the archive with the word "M2TWEOP" in the title and the extension '.zip' (e.g M2TWEOP-beta-2.14.zip)
*Where can I download M2TWEOP?*
The latest version of M2TWEOP is located on the "Releases" tab of the M2TWEOP github, here: https://github.com/youneuoy/M2TWEOP-library/releases. You need to download the archive with the word "M2TWEOP" in the title and the extension '.zip' (e.g M2TWEOP-beta-2.14.zip)

*How do I install M2TWEOP?*
Just unpack the downloaded archive into the folder with your modification.
*How do I install M2TWEOP?*
Just unpack the downloaded archive into the folder with your modification.

*I installed M2TWEOP. How can I run a modification using it?*
Run M2TWEOPGUI.exe, specify your mods config file (e.g TATW.cfg) and hit 'Run Mod'.
*I installed M2TWEOP. How can I run a modification using it?*
Run M2TWEOPGUI.exe, specify your mods config file (e.g TATW.cfg) and hit 'Run Mod'.

*I heard that M2TWEOP allows you to write plugins in the lua programming language. How to do it?*
Read https://youneuoy.github.io/M2TWEOP-library/_static/LuaLib/index.html or watch a tutorial here: https://youtu.be/hUvbcz8i7Wk
*I heard that M2TWEOP allows you to write plugins in the lua programming language. How to do it?*
Read https://youneuoy.github.io/M2TWEOP-library/_static/LuaLib/index.html or watch a tutorial here: https://youtu.be/hUvbcz8i7Wk

*How can I prevent users from running my mod without having EOP enabled?*
You should run the M2TWEOP launcher, check the "Block modification launch without EOP" parameter in the settings ("game" submenu). Next, you should replace all "type" fields in your "export_descr_unit.txt" file with "eopOnlyType". After that, your mod will not work unless the user launches it with EOP.
*How can I prevent users from running my mod without having EOP enabled?*
You should run the M2TWEOP launcher, check the "Block modification launch without EOP" parameter in the settings ("game" submenu). Next, you should replace all "type" fields in your "export_descr_unit.txt" file with "eopOnlyType". After that, your mod will not work unless the user launches it with EOP.

*How can I use M2TWEOP and ReShade together?*
1. Delete d3d9.dll in Medieval 2 folder if you have one there already
2. Install ReShade like normal
3. Rename d3d9.dll in Medieval 2 folder added by ReShade to dxgi.dll
4. Run mod via M2TWEOP like normal
*How can I use M2TWEOP and ReShade together?*
1. Delete d3d9.dll in Medieval 2 folder if you have one there already
2. Install ReShade like normal
3. Rename d3d9.dll in Medieval 2 folder added by ReShade to dxgi.dll
4. Run mod via M2TWEOP like normal

*How can I open the M2TWEOP Console, Reload the Script or use the Map Viewer?*
* CTRL+1 = Open Console
* CTRL+9+1 = Reloads `luaPluginScript.lua`
* CTRL+2 = Open EOP Map Viewer
*How can I open the M2TWEOP Console, Reload the Script or use the Map Viewer?*
* CTRL+1 = Open Console
* CTRL+9+1 = Reloads `luaPluginScript.lua`
* CTRL+2 = Open EOP Map Viewer

*How can I convert a non-EOP save to an EOP save?*
1. Make a copy of your save
2. Rename the copy to **M2TWEOPTEMPgameSaveDONTTOUCHTHISFILE.sav** (Make sure it ends in .sav and the file type is .sav)
3. Compress it into a .zip archive
4. Rename the .zip archive to something like *Bree.sav* (Make sure it ends in .sav and the file type is .sav)
*How can I convert a non-EOP save to an EOP save?*
1. Make a copy of your save
2. Rename the copy to **M2TWEOPTEMPgameSaveDONTTOUCHTHISFILE.sav** (Make sure it ends in .sav and the file type is .sav)
3. Compress it into a .zip archive
4. Rename the .zip archive to something like *Bree.sav* (Make sure it ends in .sav and the file type is .sav)

*Does the mod increase the faction limit?*
No. Removing the faction limit is complicated and will be extremely time consuming. It's not as simple as just changing the value. Perhaps in the future.

*What's the best way to write and debug EOP Lua scripts?*
We suggest you use `Visual Studio Code <https://code.visualstudio.com>`_ and the following `extension <https://marketplace.visualstudio.com/items?itemName=sumneko.lua>`_ because it enables linting, Intellisense and inline documentation for each EOP function.


--------------------------------------------
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 @@ -272,7 +272,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-05-28 14:08:00</p>
<p class="lastUpdatedMessage">Last updated: 2023-07-07 19:34:23</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
2 changes: 1 addition & 1 deletion docs/_static/LuaLib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,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-05-28 14:08:00</p>
<p class="lastUpdatedMessage">Last updated: 2023-07-07 19:34:23</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
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 @@ -272,7 +272,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-05-28 14:08:00</p>
<p class="lastUpdatedMessage">Last updated: 2023-07-07 19:34:23</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
1 change: 1 addition & 0 deletions docs/articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ <h1>M2TWEOP’s Tutorials<a class="headerlink" href="#m2tweop-s-tutorials" title
<li class="toctree-l2"><a class="reference internal" href="M2TWEOP_LAUNCHER_SETTINGS.html#configure-the-ui">Configure the UI</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2TWEOP_LAUNCHER_SETTINGS.html#configure-the-battles">Configure the Battles</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2TWEOP_LAUNCHER_SETTINGS.html#configure-the-game">Configure the Game</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2TWEOP_LAUNCHER_SETTINGS.html#id1">Configure the Game</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="_static/Introduction_to_ImGui_v3.pdf#http://">Gui scripting basics by Erken, PDF file</a></li>
Expand Down
Loading

0 comments on commit 0eaee3f

Please sign in to comment.