<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Patching MechCommander&#8217;s &#8220;left arm bug&#8221; for fun and profit	</title>
	<atom:link href="https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/feed/" rel="self" type="application/rss+xml" />
	<link>https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/</link>
	<description>Data-driven decision making is the only way to go</description>
	<lastBuildDate>Tue, 09 Jun 2026 06:08:22 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: MHLoppy		</title>
		<link>https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/#comment-41264</link>

		<dc:creator><![CDATA[MHLoppy]]></dc:creator>
		<pubDate>Wed, 06 May 2026 14:08:00 +0000</pubDate>
		<guid isPermaLink="false">https://mhloppy.com/?p=3954#comment-41264</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/#comment-41250&quot;&gt;Vana&lt;/a&gt;.

RIP to your modding attempt.

It is possible to do a jump-to-the-end-and-back kind of thing (I do this with my patching work on RoN) but initially setting it up is a bit more involved because you need to basically allocate more space to the program. If you / someone were doing a bigger patch it&#039;d be worth doing (it gives you virtually infinite space), but for a once-off like this probably not. There are also alternative ways to implement larger changes which you could look into at that point (which may be more sensible, tbh), but since this is what I&#039;ve used in RoN it&#039;s the method I know best. If you have the space you &lt;em&gt;can&lt;/em&gt; add something more-or-less completely new, but you would have to do it in a way that understands the state of the system (registers, stack, memory) at the moment your new code starts, how to change that state to do what you want (including how to have the state set up the way that individual functions need so that you can call them), and then how to restore it to the original state once you&#039;re done so that the program can continue executing its original code (restoration is straightforward though). If you jump in to tweak something then you don&#039;t really have to understand as much of the state or how to change it, since you don&#039;t necessarily need to know how to e.g., pull pilot info or weapon info into registers / memory so that you can actually use/read/manipulate it; the scope of what needs to be understood is very limited so long as the change you&#039;re making is small.

For the way the function is set up, it&#039;s &lt;em&gt;possible&lt;/em&gt; that this is the result of compiler and the original function was more readable in its original C++ or whatever. Since I don&#039;t really know how the weapon data is handled so it&#039;s hard for me to say, and I don&#039;t have grounded experience in how compilers specifically modify code structure when doing C++ -&gt; assembly / machine code.

Yep, large-in-torso and small-in-arms seems to be how it&#039;s set up. Not really sure why ¯\_(ツ)_/¯

If MC2 is fussy about something it seems like there&#039;s a good chance MC1 would be as well given how surprisingly similar they&#039;ve looked under the hood so far. You might also be able to look at some of the existing MC1 modding - maybe somebody has some anecdotal experience with how it works given that a few people have already added weapons and stuff.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/#comment-41250">Vana</a>.</p>
<p>RIP to your modding attempt.</p>
<p>It is possible to do a jump-to-the-end-and-back kind of thing (I do this with my patching work on RoN) but initially setting it up is a bit more involved because you need to basically allocate more space to the program. If you / someone were doing a bigger patch it&#8217;d be worth doing (it gives you virtually infinite space), but for a once-off like this probably not. There are also alternative ways to implement larger changes which you could look into at that point (which may be more sensible, tbh), but since this is what I&#8217;ve used in RoN it&#8217;s the method I know best. If you have the space you <em>can</em> add something more-or-less completely new, but you would have to do it in a way that understands the state of the system (registers, stack, memory) at the moment your new code starts, how to change that state to do what you want (including how to have the state set up the way that individual functions need so that you can call them), and then how to restore it to the original state once you&#8217;re done so that the program can continue executing its original code (restoration is straightforward though). If you jump in to tweak something then you don&#8217;t really have to understand as much of the state or how to change it, since you don&#8217;t necessarily need to know how to e.g., pull pilot info or weapon info into registers / memory so that you can actually use/read/manipulate it; the scope of what needs to be understood is very limited so long as the change you&#8217;re making is small.</p>
<p>For the way the function is set up, it&#8217;s <em>possible</em> that this is the result of compiler and the original function was more readable in its original C++ or whatever. Since I don&#8217;t really know how the weapon data is handled so it&#8217;s hard for me to say, and I don&#8217;t have grounded experience in how compilers specifically modify code structure when doing C++ -> assembly / machine code.</p>
<p>Yep, large-in-torso and small-in-arms seems to be how it&#8217;s set up. Not really sure why ¯\_(ツ)_/¯</p>
<p>If MC2 is fussy about something it seems like there&#8217;s a good chance MC1 would be as well given how surprisingly similar they&#8217;ve looked under the hood so far. You might also be able to look at some of the existing MC1 modding &#8211; maybe somebody has some anecdotal experience with how it works given that a few people have already added weapons and stuff.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Vana		</title>
		<link>https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/#comment-41250</link>

		<dc:creator><![CDATA[Vana]]></dc:creator>
		<pubDate>Wed, 06 May 2026 10:38:53 +0000</pubDate>
		<guid isPermaLink="false">https://mhloppy.com/?p=3954#comment-41250</guid>

					<description><![CDATA[Got distracted personally with MC1 and MC2. Unfortunately the thing I really wanted doesn&#039;t seem to work in the way I was hoping to find.

Weapons - a 6-pack a day keeps the Elementals away, but if you load up on racks, watch your back?

It looks like magic-wise, it&#039;s a lot more doable to tweak a variable or slightly rearrange existing functions than to add something truly new? Unless you can jump all the way to the end of the file instead of looking for a cave, do whatever you like, then jump back up. Probably inefficient but this function seems like it&#039;d only be used once a mission. Idk anything about assembly beyond a vague impression of it being horrible though.

The long chain of if() &#038;&#038; if() seems like a really bad way to do it when they could have just set a flag or something on the weapon def.

If I&#039;m reading it right, small guns go to arms first, big ones go to torsos first? Backwards from how most of the game&#039;s mechs are canonically laid out but it does mean losing an arm costs less firepower and the PC games almost never have different firing arcs for arms.

Last LBX... wonder if weapons need their ammo to be in the same location, or if they can only feed from their own ammo bin. The Mechcommander 2 mech defs seem emphatic about part order. But again, out of scope.

Def very neat that you were able to sort it out.]]></description>
			<content:encoded><![CDATA[<p>Got distracted personally with MC1 and MC2. Unfortunately the thing I really wanted doesn&#8217;t seem to work in the way I was hoping to find.</p>
<p>Weapons &#8211; a 6-pack a day keeps the Elementals away, but if you load up on racks, watch your back?</p>
<p>It looks like magic-wise, it&#8217;s a lot more doable to tweak a variable or slightly rearrange existing functions than to add something truly new? Unless you can jump all the way to the end of the file instead of looking for a cave, do whatever you like, then jump back up. Probably inefficient but this function seems like it&#8217;d only be used once a mission. Idk anything about assembly beyond a vague impression of it being horrible though.</p>
<p>The long chain of if() &amp;&amp; if() seems like a really bad way to do it when they could have just set a flag or something on the weapon def.</p>
<p>If I&#8217;m reading it right, small guns go to arms first, big ones go to torsos first? Backwards from how most of the game&#8217;s mechs are canonically laid out but it does mean losing an arm costs less firepower and the PC games almost never have different firing arcs for arms.</p>
<p>Last LBX&#8230; wonder if weapons need their ammo to be in the same location, or if they can only feed from their own ammo bin. The Mechcommander 2 mech defs seem emphatic about part order. But again, out of scope.</p>
<p>Def very neat that you were able to sort it out.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
