Load File: finalize first-click deterministic apply, add NoReturn, and align docs
- Stabilize Load File first-click behavior across mission/map/options/slots. - Fix map sequencing by rebuilding game-type scenario list before mission lookup. - Resolve mission-name miss to map index 0 fallback for selected game type. - Fix decal handling: map INI decal IDs to dropdown indices, clamp invalid indices, display actual decal IDs in UI labels, and avoid redraw-time decal overwrite. - Fix option apply timing and UI visibility issues, including Weapon Jam refresh. - Add NoReturn support end-to-end: parse/store in MW4Shell auto globals, expose script variable, and apply to respawn/no-return mission params and UI checkbox. - Update autoconfig spec to reflect actual parser/default/fallback behavior and add NoReturn examples.
This commit is contained in:
@@ -105,14 +105,14 @@ The system operates with <strong>two separate files</strong>:
|
||||
<li><strong>String values:</strong> Everything after <code>=</code> to end of line. Do <strong>not</strong> wrap in quotes. Example: <code>MissionName=ScarabStronghold - Attrition</code></li>
|
||||
<li><strong>Integer values:</strong> Raw decimal integer only. No quotes, no sign unless negative. Example: <code>GameType=2</code></li>
|
||||
<li><strong>Do not use comments</strong> (<code>//</code> or <code>;</code>). Parser behavior is not guaranteed. Keep the file clean.</li>
|
||||
<li><strong>Missing key:</strong> If a key is absent from its section, the corresponding lobby value stays at its current setting. No error is raised.</li>
|
||||
<li><strong>Missing section:</strong> If <code>[mission]</code> is absent, no game options are changed. If <code>[slot0]</code> is absent, no slots are changed.</li>
|
||||
<li><strong>Missing key:</strong> If a key is absent, parser defaults are used. For <code>[mission]</code> this means built-in auto defaults (not current UI values). For <code>[slotX]</code> fields, omitted numeric values default to <code>0</code> and omitted strings default to empty.</li>
|
||||
<li><strong>Missing section:</strong> If <code>[mission]</code> is absent, Load File still applies mission defaults. If <code>[slot0]</code> is absent, all slots are cleared and remain empty.</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>4. Section: <code>[mission]</code></h2>
|
||||
<p>Sets all game lobby parameters. This section is <span class="optional">optional</span> — omit it to leave game options unchanged and only configure slots.</p>
|
||||
<p>Sets all game lobby parameters. This section is <span class="optional">optional</span>, but if omitted, Load File applies built-in mission defaults (it does not preserve current UI values).</p>
|
||||
|
||||
<pre><span class="section">[mission]</span>
|
||||
<span class="key">MissionName</span>=<span class="value">ScarabStronghold - Attrition</span>
|
||||
@@ -127,6 +127,7 @@ The system operates with <strong>two separate files</strong>:
|
||||
<span class="key">FriendlyFire</span>=<span class="value">0</span>
|
||||
<span class="key">SplashDamage</span>=<span class="value">0</span>
|
||||
<span class="key">UnlimitedAmmo</span>=<span class="value">1</span>
|
||||
<span class="key">NoReturn</span>=<span class="value">0</span>
|
||||
<span class="key">WeaponJam</span>=<span class="value">0</span>
|
||||
<span class="key">AdvanceMode</span>=<span class="value">0</span>
|
||||
<span class="key">ArmorMode</span>=<span class="value">0</span></pre>
|
||||
@@ -138,7 +139,7 @@ Match is exact string equality, case-sensitive. Trailing/leading spaces are stri
|
||||
</p>
|
||||
<div class="warn">
|
||||
<strong>If the name is not found</strong> in the list for the selected <code>GameType</code>,
|
||||
mission selection silently fails — the dropdown stays at its previous value.
|
||||
map selection falls back to index <code>0</code> (first available map for that game type).
|
||||
No error is logged. All other parameters (Visibility, Weather, etc.) are still applied.
|
||||
The available mission names depend on what scenario files are installed on the machine;
|
||||
there is no static guaranteed list.
|
||||
@@ -246,28 +247,37 @@ Match is exact string equality, case-sensitive. Trailing/leading spaces are stri
|
||||
<tr><td><code>1</code></td><td>On — unlimited ammo <span class="default-tag">DEFAULT (console/arcade)</span></td></tr>
|
||||
</table>
|
||||
|
||||
<h3>4.12 <code>WeaponJam</code> — integer</h3>
|
||||
<h3>4.12 <code>NoReturn</code> — integer</h3>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
<tr><td><code>0</code></td><td>Off — pilots can respawn <span class="default-tag">DEFAULT</span></td></tr>
|
||||
<tr><td><code>1</code></td><td>On — no respawn ("No Return")</td></tr>
|
||||
</table>
|
||||
|
||||
<p><strong>Implementation note:</strong> this maps to <code>RESPAWN_LIMIT_PARAMETER</code> (on/off), with <code>RESPAWN_LIMIT_NUMBER_PARAMETER</code> forced to <code>0</code>, matching current lobby behavior.</p>
|
||||
|
||||
<h3>4.13 <code>WeaponJam</code> — integer</h3>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
<tr><td><code>0</code></td><td>Off <span class="default-tag">DEFAULT</span></td></tr>
|
||||
<tr><td><code>1</code></td><td>On — weapons can randomly jam</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>4.13 <code>AdvanceMode</code> — integer</h3>
|
||||
<h3>4.14 <code>AdvanceMode</code> — integer</h3>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
<tr><td><code>0</code></td><td>Off <span class="default-tag">DEFAULT</span></td></tr>
|
||||
<tr><td><code>1</code></td><td>On</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>4.14 <code>ArmorMode</code> — integer</h3>
|
||||
<h3>4.15 <code>ArmorMode</code> — integer</h3>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
<tr><td><code>0</code></td><td>Off <span class="default-tag">DEFAULT</span></td></tr>
|
||||
<tr><td><code>1</code></td><td>On</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>4.15 <code>TeamAllowed</code> — integer <span class="optional">(required for correct team/FFA slot display on first click)</span></h3>
|
||||
<h3>4.16 <code>TeamAllowed</code> — integer <span class="optional">(required for correct team/FFA slot display on first click)</span></h3>
|
||||
<p>Must match the <code>GameType</code> selected. Controls whether <code>Team</code> or <code>Skin</code> is applied to slots, and whether team dropdowns are shown.</p>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
@@ -275,7 +285,7 @@ Match is exact string equality, case-sensitive. Trailing/leading spaces are stri
|
||||
<tr><td><code>1</code></td><td>Team game ? slot <code>Team</code> field is used</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>4.16 <code>TeamCount</code> — integer <span class="optional">(optional, only when TeamAllowed=1)</span></h3>
|
||||
<h3>4.17 <code>TeamCount</code> — integer <span class="optional">(optional, only when TeamAllowed=1)</span></h3>
|
||||
<p>Number of teams. Valid range: 2–8. Default: <code>2</code>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -11,6 +11,7 @@ HeatOn=0
|
||||
FriendlyFire=1
|
||||
SplashDamage=1
|
||||
UnlimitedAmmo=0
|
||||
NoReturn=0
|
||||
WeaponJam=1
|
||||
AdvanceMode=1
|
||||
ArmorMode=1
|
||||
|
||||
@@ -12,6 +12,7 @@ HeatOn=0
|
||||
FriendlyFire=1
|
||||
SplashDamage=1
|
||||
UnlimitedAmmo=0
|
||||
NoReturn=0
|
||||
WeaponJam=1
|
||||
AdvanceMode=1
|
||||
ArmorMode=1
|
||||
|
||||
Reference in New Issue
Block a user