Difference between revisions of "Talk:Why civilians go rogue"

From UFOpaedia
Jump to navigation Jump to search
m
Line 2: Line 2:
 
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.  
 
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).  
+
All units in the [[Info#Battlescape|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.  
 
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.  

Revision as of 13:17, 24 December 2005

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

Patience

Yes, patience little rhinocerous beetle. It's far too crude to be used as-is, but I'll make it available in the main section anyway, spelling errors and everything. It's just too - well, I'll borrow a phrase - head-hurty to read the way it is. Even to me, and I wrote it!

- NKF

"Yes, patience little rhinocerous beetle." ehehhehehe!!! EsTeR