Thursday, November 1, 2012

"Why can't I use his medkit?"

Yes, it's another XCOM post. Last night, my Twitter stream exploded with frustration at the inconvenience and immersion-breaking of one particular mechanic that crops up a lot. My friend JPH has already written about it on his site, but I wanted to look at why it happens and why we expect it to behave differently. That frustration is caused by the inability to pick up and use medkits carried by other soldiers.

There's always a need for a medkit, because your soldiers in such a brutal tactical game WILL be shot, and if you don't keep their health topped up they WILL die. The trouble arises when your soldier with a medkit goes down, critically wounded, and needs to be stabilised. You need a medkit to stabilise a critically wounded soldier, but you'd expect that that would be no problem - after all, if the medic's down, they have a medkit you can use. Easy, right?

Wrong. You can't use somebody else's medkit, and it's because of how the game logic works. Unfortunately, the developers took some shortcuts in making this happen, and one of the shortcuts makes using other people's medkits impossible.

We need to consider the soldier as a bundle of abilities. These abilities are either intrinsic (shoot weapon, move, reload weapon) or extrinsic (throw grenade, fire rocket [EDIT: Jarenth has pointed out that the rocket is actually a class-specific intrinsic ability, down in the comments], use medkit, use stunner). the intrinsic ones are easy enough, but the extrinsic ones are provided by skeuomorphic metaphors (remember that big fancy word? Keeps cropping up, doesn't it?) that are presented by the interface as swappable "items". You want your soldier able to throw a grenade? Put the grenade in that slot. Want a medkit use instead? Put the medkit in that slot. You do all this wrangling of "items" at your leisure, in the barracks or in the pre-mission setup phase.

And then you go into battle. Now what happens is your soldiers are each defined by the abilities they have. For a tactical game, this makes sense; each soldier is a bundle of code, and all you really need to do is keep track of state; has he used the grenade ability, has he used the fire weapon ability (and how many times since the last time he used the reload weapon ability) and so on. When a soldier throws a grenade, you generate a "grenade" projectile, run the animation, and apply the damage around the point of impact, and increment the "times grenade ability has been used" counter for that soldier. Your game logic works fine, there's no noticeable departure from real life.

Until the medic goes down. Now, you have a soldier who's on a countdown timer; go too long, and the soldier will die. The soldier needs someone to use the "stabilise" ability on him; and that ability is conferred by having been given a medkit "item" back in the loadout screen. Unfortunately, the game's been coded in such a way that the logic can't cope with a soldier gaining a new ability in the middle of a mission. You start with what you start with, and that's all you have until the end of a mission. This is why your soldiers don't gain levels until after the mission's over. It's also why you can't use the medic's own medkit to stabilise him.

The problem here is essentially the skeuomorphic way the game has you select abilities, by picking "items". People expect that, since they gave the medic a medkit "item", he'll have a medkit "item" on the battlefield. Unfortunately, there isn't any such thing as an item on the battlefield; grenades are produced on demand, stunners are particle effects, and so on. If your rookie with the stunner goes down, but you have another trooper who should be able to pick up his stunner and go use it, sorry; that second trooper can't, because the stunner is really a flag in game code to say "unit can use stun ability", and the game logic can't handle adding abilities mid-mission. Similarly, if your heavy weapons trooper with the two grenades falls over and dies, the remaining troops can't replenish their grenade stocks or throw the heavy's grenades, because the grenades don't actually exist.

The stunner and grenade issues are exactly the same problem, but they don't have the impact of the medkit issue. There will always be another chance to stun the required kind of alien; there will always be another way to deal with the aliens attacking you; but if your soldier dies for want of stabilisation, he's gone forever. This is why it's highly advisable to make certain at least two of your troops have medkits; and highly advisable for those to be Support class, with the upgrade giving them three squares more movement. Unfortunately, the game as shipped does not have the solution I would have applied to the medkit problem: if a soldier is critically wounded and has a medkit with any number of uses remaining (since medkits can confer up to three uses), then any soldier within a certain radius may use an action point to stabilise the dying soldier, at the cost of using up all remaining medkit uses. I don't think it would be possible to add in the ability to actually pick up and use another soldier's medkit, but it was distinctly unfair to prevent stabilisation because the soldier attempting the action didn't prep for it before the battle, when the soldier being stabilised DOES have the resource needed.

There really isn't any good in-universe reason why soldiers can't "use the medic's medkit to get him stable". It only makes sense when looked at from a coding perspective, which is why it was a bad design choice.


  1. Interesting notion. Plus, I learned a new word today.

    Mild side-track: would you say the ability to launch rockets is intrinsic or extrinsic? You peg it as extrinsic in your post, but that doesn't really work for me: For a soldier of the Heavy class, it's literally impossible not to be able to fire a rocket at the start of a mission; for a soldier of any other class, it is literally impossible to ever gain the ability to do so.

    1. Good point. I'll edit that. I was seeing it as extrinsic because it's tied to the rocket launcher "inventory item", but of course there's nothing to swap for that, so it's an intrinsic for Heavies.


After some particularly vile spam showed up, I have disabled the ability to comment as a nonny-mouse.