work in progress on publishing docs
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="dark">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Spearhead Persistence</title> <!-- Google Fonts -->
|
||||
|
||||
<link rel="stylesheet" href="/style/prism.css">
|
||||
<link rel="stylesheet" href="/style/style.css">
|
||||
|
||||
<script src="/js/prism.js"></script>
|
||||
<script src="/js/site.js"></script>
|
||||
<style>
|
||||
.side-nav a.active {
|
||||
font-weight: bold;
|
||||
color: #4fc3f7;
|
||||
}
|
||||
</style>
|
||||
<script type="module" src="/js/components.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<app-header></app-header>
|
||||
</header> <main>
|
||||
<div class="reference-container">
|
||||
<app-sidebar></app-sidebar>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<h1>Persistence</h1>
|
||||
|
||||
<p>
|
||||
Spearhead comes with a custom Persistence option. <br />
|
||||
It will even save burned out vehicles to give players a consistent battlefield even after the
|
||||
restart. <br />
|
||||
</p>
|
||||
<p>
|
||||
Most is pretty straightforward, however, some zones are somewhat special. <br />
|
||||
Underneath you'll see all special zones listed.
|
||||
</p>
|
||||
|
||||
<h2 id="settings">Settings</h2>
|
||||
<p>
|
||||
To see the full config check: <a href="./Reference.html#Configuration">Reference</a>
|
||||
</p>
|
||||
|
||||
<h2 id="feedback">Feedback</h2>
|
||||
<p>
|
||||
Since this feature is still very much in development, please let any issues be known as soon as
|
||||
possible and as concise as possible so a fix can be made quickly. <br />
|
||||
Currently implemented is local file storage. <br />
|
||||
If enough interest is expressed, cloud-based persistence would be possible. <br />
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<span class="lua-comment">... Rest of config</span>
|
||||
<span class="lua-variable">Persistence</span> <span class="lua-operator">=</span> {
|
||||
<span class="lua-comment">--- io and lfs cannot be sanitized in the MissionScripting.lua</span>
|
||||
|
||||
<span class="lua-comment">--- enables or disables the persistence logic in spearhead</span>
|
||||
<span class="lua-variable">enabled</span> <span class="lua-operator">=</span> <span class="lua-keyword">false</span>,
|
||||
|
||||
<span class="lua-comment">--- sets the directory where the persistence file is stored
|
||||
--- if nil then lfs.writedir() will be used.</span>
|
||||
<span class="lua-variable">directory</span> <span class="lua-operator">=</span> <span class="lua-keyword">nil</span>,
|
||||
|
||||
<span class="lua-comment">--- the filename of the persistence file. Should end with .json for convention, but any text extension should do.</span>
|
||||
<span class="lua-variable">fileName</span> <span class="lua-operator">=</span> <span class="lua-string">"Spearhead_Persistence.json"</span>
|
||||
}
|
||||
<span class="lua-comment">... Rest of config</span>
|
||||
</pre>
|
||||
|
||||
<h2 id="basic-behavior">Basic Behavior</h2>
|
||||
<p>
|
||||
While playing the mission, Spearhead is keeping track of all units killed. <br />
|
||||
These units are stored in memory internally and written to file. <br />
|
||||
This happens every 2 minutes AND during the "onMissionStop" event to make sure the mission is as
|
||||
up-to-date as possible without having to call IO methods on each event.<br />
|
||||
</p>
|
||||
|
||||
<h2 id="misc-units">Misc Units</h2>
|
||||
<p>
|
||||
Miscellaneous units will follow basic behavior. <br />
|
||||
These are units that are part of a stage but are not in a mission or airbase. <br />
|
||||
These units will be replaced by a static "DEAD" unit after a mission restart at the location it was
|
||||
killed. <br />
|
||||
Due to blue units spawning afterwards, it's generally best to not have these units move through or
|
||||
over areas where BLUESAMS and Airbase units will spawn after a stage completion.
|
||||
</p>
|
||||
|
||||
<h2 id="missions">Missions</h2>
|
||||
<p>
|
||||
Missions follow the same logic as Misc Units. <br />
|
||||
</p>
|
||||
|
||||
<h2 id="blue-sams">Blue SAMs</h2>
|
||||
<p>
|
||||
For Blue SAMs, due to placements easily overlapping between red and blue units within a BLUESAM
|
||||
trigger zone, red units that overlap with blue units will be deleted. <br />
|
||||
This will ensure that the blue units are placed as needed. <br />
|
||||
</p>
|
||||
|
||||
<h2 id="airbases">Airbases</h2>
|
||||
<p>
|
||||
Airbase units will also be checked for overlap. As the blue units will be spawned after the RED
|
||||
unit. <br />
|
||||
Units that were alive when the stage was completed will be removed. Units that died will have
|
||||
corpses spawned. <br />
|
||||
</p>
|
||||
|
||||
<h2 id="warehouses">Warehouses</h2>
|
||||
<p>
|
||||
Currently, warehouses are not implemented and therefore warehouses are not persisted. <br />
|
||||
When supply missions and logistics get implemented, warehouses will be persisted as well. <br />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<p>© 2025 Spearhead Project</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user