Talk:SOLDIER.DAT
Why would Missions and Kills be signed? You're never going to have negative values. Shouldn't they be unsigned??
- Danial
You would think that, wouldn't you? At least that's what I would've done in their place. You can't owe a few kills or missions!
But if you enter values of 0xFFFF into each, the base screen shows -1. Hence why they're signed.
- NKF
Zombie, I've changed back your recent change to offset 63, as you've been mislead a bit by corrupt data...
The files MAN_A.SPK through to MAN_N.SPK do not exist in a normal install of UFO, I'm afraid, and it was never intended for Soldier.Dat to point to them. They are simply the file names I chose when I coded my custom uniform mod, so that aliens wouldn't display as troopers in the inventory screens anymore. I later added the same effect to my map editer as well. This affected the inventory screens and nothing else, by tweaking UnitRef[1] - The installation of either of my programs obviously adds the required MAN files to your game (as referring to any MAN file that does not exist causes a crash).
On the other hand, modifying Soldier[63] apparently changes the way the unit appears in the battlescape display, as well as what it turns into when it dies! This means that it is not only used to determine UnitRef[1] when battle begins, but UnitRef[0]/[38] as well, and most likely others...
That is to say, this byte gets set when you give a trooper armor. Armor dictates how a unit appears. However, it also indicates a units defensive values, and what item it will turn into when it dies. You didn't mention defense in your edit, but I would assume it also gets set to garbage when you fiddle with this offset.
I'll check this with a byte comparer when I get the time. With any luck, this'll also show me any remaining UnitRef offsets that are affected by this one. I'll update the article when I get some results.
- Bomb Bloke 05:41, 6 November 2006 (PST)
My fault, but problems like these could easily be avoided with a readme file indicating what modifications are made to the game files. Never thought that an editor had modding chunks tossed in. That'll teach me a lesson.
Changing the armor field in soldier.dat ([63] or [062] or whatever the darn offset is), changes the image sprite in the battlescape without too many problems, but running through your unit list in the equip screen will crash the game if the number here is greater than 3 as there aren't any MAN.spk images to refer back to. Like you mention, the actual armor attributes are garbage (albeit consistent garbage as the numbers do not change). Just for giggles I did a couple dry runs with varying values to see what would happen to the death item and armor attributes. This may or may not be useful.
Value | Unit | Death Item | Fr | Le | Ri | Re | Un |
---|---|---|---|---|---|---|---|
4 | Sectoid | HP Clip | 127 | 0 | 115 | 116 | 117 |
5 | Snakeman | Plasma Rifle | 118 | 119 | 120 | 121 | 122 |
6 | Ethereal | PR Clip | 123 | 124 | 125 | 126 | 18 |
7 | Muton | Plasma Pistol | 4 | 16 | 8 | 15 | 10 |
8 | Floater | PP Clip | 14 | 20 | 20 | 0 | 0 |
9 | Celatid | Blaster Launcher | 0 | 0 | 25 | 0 | 35 |
10 | Silacoid | Blaster Bomb | 0 | 24 | 18 | 0 | 10 |
11 | Chryssalid | Small Launcher | 15 | 6 | 0 | 8 | 8 |
12 | Reaper | Stun Bomb | 0 | 7 | 8 | 9 | 0 |
13 | Sectopod | Alien Grenade | 5 | 10 | 0 | 8 | 21 |
14 | Cyberdisc | Elerium-115? | 8 | 0 | 0 | 0 | 0 |
15 | Male Civilian | Variable | 1 | 3 | 5 | 5 | 5 |
16 | Female Civilian | Psi-Amp | 0 | 0 | 52 | 0 | 80 |
17 | Zombie | Unknown | 0 | 0 | 0 | 0 | 0 |
18 | Invisible | Mind Probe | 0 | 0 | 0 | 0 | 0 |
19 | Invisible | Sectoid Corpse | 0 | 0 | 0 | 0 | 0 |
20 | Invisible | Snakeman Corpse | 80 | 0 | 104 | 0 | 80 |
21 | Invisible | Ethereal Corpse | 0 | 0 | 0 | 0 | 0 |
22 | Invisible | Muton Corpse | 0 | 0 | 0 | 0 | 0 |
23 | Invisible | Crashes (FLT?) | 0 | 80 | 0 | 104 | 0 |
24 | Invisible | Celatid Corpse | 0 | 0 | 104 | 0 | 160 |
25 | Invisible | Silacoid Corpse | 0 | 0 | 0 | 0 | 0 |
26 | Invisible | Chryssalid Corpse | 0 | 0 | 0 | 0 | 0 |
27 | Invisible | Reaper1 Corpse | 0 | 160 | 0 | 104 | 0 |
28 | Invisible | Reaper2 Corpse | 0 | 0 | 104 | 0 | 160 |
I couldn't find out what item the Cyberdisc "unit" gives up when it dies, as the explosion happens even with Stun Bombs. I assume it's Elerium-115 as it follows the normal item list. The male civilian is a tough nut to crack also. I saw a death item of a Laser Rifle and a Small Rocket a few times - it's probably random or semi-random. Still, you can't stand over the "corpse" and pick up the item as it is invisible in the equip soldier screen. The Zombie is also strange as it cannot be killed by incendiary, most likely a hacked armor value will make the game assume you are wearing a suit of armor greater than Personal and apply the 0% modifier. A value of 23 will crash the game if you try and kill the unit so it's just an assumption that the death item is a Floater corpse.
I should also mention that some of the invisible units higher up on the list are probably tanks as the sound usually correlates to image. This doesn't hold for units lower in the list as I heard a movement noise of a Pistol or Rifle shooting rapidly for one of them! Strange stuff, but it can probably all be tied together once we know where the pointers are going.