<p></p>
<p>Textbox conditionals, Team/Order and the <code>swap out hero</code> and <code>delete hero</code> commands all ensure there's always one hero in the active party. But I just noticed that the <code>swap by position</code> has no such check! <code>swap by position(0,4)</code> gives you an empty party. You can walk around as usual with an invisible hero and talk to NPCs. The Spells, Equip and Status menus refuse to open.</p>
<p><code>swap by name</code> is a wrapper around <code>swap by position</code> but isn't affected because it doesn't swap empty slots.</p>
<p>While this is obviously a bug, fixing it breaks scripts of this sort:</p>
<pre><code>swap by position(0, 4)  # swap out leader
swap by position(findhero(hero: Tom), 0)  # new leader
</code></pre>
<p>So it might be a good idea to preserve backcompat by delaying calling <code>forceparty</code>.  A gamelist scan from 3 years ago shows 1952 uses of swapbyposition in 192 games (not counting swapbyname).<br>
I'm not sure where a delayed call should be put, though.</p>
<p>Incidentally, <code>forceparty</code> automatically swapping in a hero can be annoying when your trying to make a particular hero the leader, so I thought a command to swap heroes into different slots all at once would be pretty useful, e.g <code>setup party(hero: bob, hero: misa, -1, -1, hero: dusty)</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/1111">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZXTVF5LBOJFBN5ZOTLRLKHHBANCNFSM4MCYEJGA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AMWGWZVIHK6JOJZB3OYRBT3RLKHHBA5CNFSM4MCYEJGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4I37LV2Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/1111",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1111",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>