Talk:Why civilians go rogue

From UFOpaedia
Revision as of 14:58, 16 November 2005 by EsTeR (talk | contribs)
Jump to navigation Jump to search

Brief

This section is actually intended to be a technical explanation on why they go rogue after being mind controlled - not just a brief on how it's done. I cannot explain why stunning them does this at this time, but it'll come eventually.

All units in the Battlescape have an ownership flag (i.e. belongs to Alien, X-Com, Civilian), and a flag that tells the game that the unit is currently under mind control (which is a binary flag and contains Yes/No, True/False or if you prefer, zero or non-zero values only).

When a unit is mind controlled, the ownership flag is automatically set to the mind controller's side and the temporary mind control flag is set to true. At the end of the turn, the game checks all units to se if they've got the temporary mind control flag set to true. If found, it is set to false, and then the ownership flag is flipped to the other team's side.

The ownership flags look like the following:

X-Com = 0 Alien = 1 Civilian = 2

On the computer, true/false statements are done with 1's and 0's. 1's are actually meant to be non-zero valus, and can be be any number except 0's.

So, when you mind control a civilian, their flag changes to Owner = 0, Under Mind Control = 1

At the end of the turn, the game finds that the civilian is under mind control, it sets this to 0 and flips the ownership flag from a 0 to a non-zero. This is done by a simply binary NOT function (or a set of conditional statements that effectively achieve the same thing).

A NOT function simply inverts a zero into non-zeroes, and non-zeroes into zeroes. On the computer a non-zero value is often simply expressed as a 1.

Notice what's going wrong here? It's flipping a 0 into a 1, which is the value for an alien unit instead of remembering what faction the unit originally belonged to. In fact, the game does not store this information at all.

It's almost as if civilians were either added in as an afterthought, or the programmers never ever expected players were going to use mind control on the civilians (aliens don't do it on civilians as a general rule - not that they possibly could not, they just don't have any instructions to do so).

For scoring purposes, civilians killed when they are under civilian control will deduct a certain amount of points from your final score. However, a civilian under alien control (or your control, if you manage to fudge things a bit with Zombie's stun/Mind Control combination) will only add or subtract their 'unit value' to the score. Because their unit value is 0, they cost nothing.

A unit value is a number all your units get that tells the game how much to add or subtract when soldiers or aliens are killed. Civilians have this too. However scores are also awarded in other ways.

That's it in an overly elaborate nutshell.

- NKF


Good job, NKF! This should all be moved to the article itself --MikeTheRed 18:13, 1 Nov 2005 (PST)


Uhhem....Uhhem...NKF, move cough, the article! EsTeR