user11571: I am building a IR-based laser tag system. The basics are working fine. One feature, that I want to have, is different weapon modes with different ranges.
How can I change the range of an IR transmitter with as little hardware as possible, or at best, completely in software?

user20245: Consider using a Sharp Distance Sensor in addition to your shoot / confirm-hit inferred LED & receiver.
This Sharp distance sensor is specified to detect objects that reflect IR light from 100 cm-500 cm. 

How can I change the range of an IR transmitter with as little
  hardware as possible, or at best, completely in software?

I believe the sensors produce an analog output that can feed into an Arduino's ADC.  So software (by itself) can be used to adjust the threshold distance.
Similar devices I have used have a narrow sensing field.  They only reported the distance to objects directly in front of them.  Also, I found they were effected by defective (burning out?) florescent light sources.  We assumed failing florescent light sources produced IR radiation similar in frequency as used by the sensor's IR emitter.  Also, the analog output is slightly stair stepped in the unit we tested.  I say this in case you were expecting to use increase relative accuracy of several readings if not precision of any given reading.

user16417: Instead of modifying the TX power, why not make the receiver read the light level. You just need to transmit some data, like the weapon ID.
If it works you could send more information, including how stable the weapon that hit the target was, during the shoot, using an accelerometer.

user20245: Let us assume you are using an ordinary inferred LED and a type of inferred detector used in remote control entertainment equipment.
Inferred LED modulation is simple and is well documented on the web.
The inferred receiver is a complex device.  It contains, among other features, an Automated Gain Control (AGC) circuit and a Phase Locked Loop (PLL) circuit.  The AGC adjusts the gain and makes it impossible to gauge the power of one IR source relative to another. The PLL "locks onto" the signal.
Consider using and adjusting the power of a secondary inferred LED transmitter transmitting at the same time as the primary LED transmitter is being received. The secondary inferred LED transmitter is local to the inferred LED receiver and transmits a unique code.  The primary inferred LED transmitter is part of the opponent's equipment and transmits a unique code.  Slowly reduce the power of the secondary inferred LED source until the code switches from the secondary source to the primary source.  The power used by the secondary inferred LED when the switch occurs should be proportional to the distance to the primary inferred LED.
In the above scenario we have used the AGC to "hide" the primary source until we reduced the power of the secondary source to just below that of the primary source.  And we used the PLL to "lock onto" the strongest signal.

11571: <p>I am building a IR-based laser tag system. The basics are working fine. One feature, that I want to have, is different weapon modes with different ranges.</p>

<p>How can I change the range of an IR transmitter with as little hardware as possible, or at best, completely in software?</p>
 20245: <p>Consider using a Sharp Distance Sensor in addition to your shoot / confirm-hit inferred LED &amp; receiver.</p>

<p><a href="https://www.adafruit.com/products/1568?gclid=CLOo8qn-ms0CFZM6gQodhnYIPg" rel="nofollow noreferrer">This Sharp distance sensor</a> is specified to detect objects that reflect IR light from 100&nbsp;cm-500&nbsp;cm. </p>

<blockquote>
  <p>How can I change the range of an IR transmitter with as little
  hardware as possible, or at best, completely in software?</p>
</blockquote>

<p>I believe the sensors produce an analog output that can feed into an Arduino's ADC.  So software (by itself) can be used to adjust the threshold distance.</p>

<p>Similar devices I have used have a narrow sensing field.  They only reported the distance to objects directly in front of them.  Also, I found they were effected by defective (burning out?) florescent light sources.  We assumed failing florescent light sources produced IR radiation similar in frequency as used by the sensor's IR emitter.  Also, the analog output is slightly stair stepped in the unit we tested.  I say this in case you were expecting to use increase relative accuracy of several readings if not precision of any given reading.</p>
 16417: <p>Instead of modifying the TX power, why not make the receiver read the light level. You just need to transmit some data, like the weapon ID.</p>

<p>If it works you could send more information, including how stable the weapon that hit the target was, during the shoot, using an accelerometer.</p>
 20245: <p>Let us assume you are using an ordinary inferred LED and a type of inferred detector used in remote control entertainment equipment.</p>

<p><a href="https://learn.adafruit.com/using-an-infrared-library/sending-ir-codes" rel="nofollow noreferrer">Inferred LED modulation is simple and is well documented on the web</a>.</p>

<p><a href="http://www.vishay.com/docs/80069/circuit.pdf" rel="nofollow noreferrer">The inferred receiver is a complex device</a>.  It contains, among other features, an Automated Gain Control (AGC) circuit and a Phase Locked Loop (PLL) circuit.  The AGC adjusts the gain and makes it impossible to gauge the power of one IR source relative to another. The PLL "locks onto" the signal.</p>

<p>Consider using and adjusting the power of a secondary inferred LED transmitter transmitting at the same time as the primary LED transmitter is being received. The secondary inferred LED transmitter is local to the inferred LED receiver and transmits a unique code.  The primary inferred LED transmitter is part of the opponent's equipment and transmits a unique code.  Slowly reduce the power of the secondary inferred LED source until the code switches from the secondary source to the primary source.  The power used by the secondary inferred LED when the switch occurs should be proportional to the distance to the primary inferred LED.</p>

<p>In the above scenario we have used the AGC to "hide" the primary source until we reduced the power of the secondary source to just below that of the primary source.  And we used the PLL to "lock onto" the strongest signal.</p>
