Difference between revisions of "Talk:SOLDIER.DAT"

From UFOpaedia
Jump to navigation Jump to search
(Some data and reply)
Line 24: Line 24:
  
 
- [[User:Bomb Bloke|Bomb Bloke]] 05:41, 6 November 2006 (PST)
 
- [[User:Bomb Bloke|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.
 +
 +
<table cellpadding="2" border="1" style="background:#E8E8E8;border:2px #696969 solid;border-collapse:collapse; text-align:center">
 +
<th {{StdDescTable_Heading}}>Value</th><th {{StdDescTable_Heading}}>Unit</th><th {{StdDescTable_Heading}}>Death Item</th><th {{StdDescTable_Heading}}>Fr</th><th {{StdDescTable_Heading}}>Le</th><th {{StdDescTable_Heading}}>Ri</th><th {{StdDescTable_Heading}}>Re</th><th {{StdDescTable_Heading}}>Un</th>
 +
<tr><td>4</td><td>Sectoid</td><td>HP Clip</td><td>127</td><td>0</td><td>115</td><td>116</td><td>117</td></tr>
 +
<tr><td>5</td><td>Snakeman</td><td>Plasma Rifle</td><td>118</td><td>119</td><td>120</td><td>121</td><td>122</td></tr>
 +
<tr><td>6</td><td>Ethereal</td><td>PR Clip</td><td>123</td><td>124</td><td>125</td><td>126</td><td>18</td></tr>
 +
<tr><td>7</td><td>Muton</td><td>Plasma Pistol</td><td>4</td><td>16</td><td>8</td><td>15</td><td>10</td></tr>
 +
<tr><td>8</td><td>Floater</td><td>PP Clip</td><td>14</td><td>20</td><td>20</td><td>0</td><td>0</td></tr>
 +
<tr><td>9</td><td>Celatid</td><td>Blaster Launcher</td><td>0</td><td>0</td><td>25</td><td>0</td><td>35</td></tr>
 +
<tr><td>10</td><td>Silacoid</td><td>Blaster Bomb</td><td>0</td><td>24</td><td>18</td><td>0</td><td>10</td></tr>
 +
<tr><td>11</td><td>Chryssalid</td><td>Small Launcher</td><td>15</td><td>6</td><td>0</td><td>8</td><td>8</td></tr>
 +
<tr><td>12</td><td>Reaper</td><td>Stun Bomb</td><td>0</td><td>7</td><td>8</td><td>9</td><td>0</td></tr>
 +
<tr><td>13</td><td>Sectopod</td><td>Alien Grenade</td><td>5</td><td>10</td><td>0</td><td>8</td><td>21</td></tr>
 +
<tr><td>14</td><td>Cyberdisc</td><td>Elerium-115?</td><td>8</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>15</td><td>Male Civilian</td><td>Variable</td><td>1</td><td>3</td><td>5</td><td>5</td><td>5</td></tr>
 +
<tr><td>16</td><td>Female Civilian</td><td>Psi-Amp</td><td>0</td><td>0</td><td>52</td><td>0</td><td>80</td></tr>
 +
<tr><td>17</td><td>Zombie</td><td>Unknown</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>18</td><td>Invisible</td><td>Mind Probe</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>19</td><td>Invisible</td><td>Sectoid Corpse</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>20</td><td>Invisible</td><td>Snakeman Corpse</td><td>80</td><td>0</td><td>104</td><td>0</td><td>80</td></tr>
 +
<tr><td>21</td><td>Invisible</td><td>Ethereal Corpse</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>22</td><td>Invisible</td><td>Muton Corpse</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>23</td><td>Invisible</td><td>Crashes (FLT?)</td><td>0</td><td>80</td><td>0</td><td>104</td><td>0</td></tr>
 +
<tr><td>24</td><td>Invisible</td><td>Celatid Corpse</td><td>0</td><td>0</td><td>104</td><td>0</td><td>160</td></tr>
 +
<tr><td>25</td><td>Invisible</td><td>Silacoid Corpse</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>26</td><td>Invisible</td><td>Chryssalid Corpse</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
 +
<tr><td>27</td><td>Invisible</td><td>Reaper1 Corpse</td><td>0</td><td>160</td><td>0</td><td>104</td><td>0</td></tr>
 +
<tr><td>28</td><td>Invisible</td><td>Reaper2 Corpse</td><td>0</td><td>0</td><td>104</td><td>0</td><td>160</td></tr></table>
 +
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.

Revision as of 21:36, 6 November 2006

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.

ValueUnitDeath ItemFrLeRiReUn
4SectoidHP Clip1270115116117
5SnakemanPlasma Rifle118119120121122
6EtherealPR Clip12312412512618
7MutonPlasma Pistol41681510
8FloaterPP Clip14202000
9CelatidBlaster Launcher0025035
10SilacoidBlaster Bomb02418010
11ChryssalidSmall Launcher156088
12ReaperStun Bomb07890
13SectopodAlien Grenade5100821
14CyberdiscElerium-115?80000
15Male CivilianVariable13555
16Female CivilianPsi-Amp0052080
17ZombieUnknown00000
18InvisibleMind Probe00000
19InvisibleSectoid Corpse00000
20InvisibleSnakeman Corpse800104080
21InvisibleEthereal Corpse00000
22InvisibleMuton Corpse00000
23InvisibleCrashes (FLT?)08001040
24InvisibleCelatid Corpse001040160
25InvisibleSilacoid Corpse00000
26InvisibleChryssalid Corpse00000
27InvisibleReaper1 Corpse016001040
28InvisibleReaper2 Corpse001040160

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.