Jump to content

Alien Loadouts Of Weapons


Zombie

Recommended Posts

I have been meaning to work on this problem for a while now. Alien weapon loadouts seem to change with respect to game-time as well as difficulty level. Well, that's my theory after witnessing hundreds of missions using Mind Control to set up testing scenarios.

 

After a little friendly prodding, Bomb Bloke was nice enough to write a logger to grab alien weapons and equipment loadouts and even customized the layout for me so that it was Excel friendly. Last night I spent some time gathering loadouts pseudo-manually (meaning I had to control the loading of the game. That got tiring really fast though, so I decided to try and automate it with AutoHotKey. My first 5 or 6 attempts failed miserably as I automated the entire process (from double clicking the lodder, to loading the mission). Also, the automation process would "choke" at certain points. I later determined that the logger itself required a lot of time to go to the desktop, log the values and then reenter the game. After setting the sleep to around 7000, I finally was able to limp past that screen only to encounter another problem at a different screen. Bummer. More tweaks to the sleep settings enabled a clean run so I turned the process into a loop. Bingo! Now I was gathering numbers automatically without user intervention. :)

 

As we know, the only weapons/items an alien could possible carry is a Heavy Plasma, Heavy Plasma Clip, Plasma Rifle, Plamsa Rifle Clip, Plasma Pistol, Plasma Pistol Clip, Blaster Launcher, Blaster Bomb, Small Launcher, Stun Bomb, Alien Grenade or a Mind Probe. That's it. It's also fortunate as we don't have to log a thousand different items. :)

 

First thing on my list was a beginner level Small Scout. I found one almost as soon as I started the game and decided to shoot it down as there are no Power Sources to destroy potential aliens or equipment (darn, those Small Scouts rarely land). Later missions with larger craft will be less troublesome as they tend to land more often (and if they don't, I can force them to land by editing the game files). I do not know what type of mission it was on as I didn't have time to check the game files, but it was a Sectoid nonetheless.

 

Right, so I ran the logger for some time last night and again this morning. It bailed to the desktop for some reason, but I gathered 551 loadouts. That should be good enough for a quick understanding. After importing the data into Excel, I immediately removed a few columns which the alien didn't carry (Blaster Launcher/Bomb, Small Launcher/Stun Bomb). It also never received an Alien Grenade. Now, from what I observed, the Sectoid Soldier always carried a Mind Probe. It didn't matter what else it was carrying either: 100% of the time it had one. The Heavy Plasma was always loaded with one clip and the alien never carried a spare. This scenario happened approximately 20% of the time. The Plasma Rifle was was always loaded with a Plasma Rifle Clip, and it carried a Plasma Pistol Clip as it's spare! This scenario happened 30% of the time. Finally, the Plasma Pistol was always loaded with one clip and the alien always carried a spare Plasma Pistol Clip. This scenario happened 50% of the time.

 

I'm unsure at this point if the Plasma Rifle/Plasma Rifle Clip/Plasma Pistol spare Clip was a mistake by the programmers, or whether it was intentionally done to create ammo shortages for the bigger weapons and give you a reason to use the Plasma Pistol more often. As it stands, you will get 130% Plasma Pistol Clips from each mission (on average). Interesting stuff nonetheless.

 

If my computer is up to the task, I'll try and log some more values tonight to get to the regulated 1000-2000 trials. That should nail the percentages down to a closer value, but I suspect not much will change with the addition of these extra trials as the percentages haven't changed much so far. Will keep you updated on my progress. :)

 

- Zombie

Link to comment
Share on other sites

I'm not really sure about that Plasma Pistol clip rather than Plasma Rifle clip thingie, but I saw that those Aliens never carry spare ammo for their Rifles and Heavies. I noticed that when checking my stores and noticing that there are far more guns than ammo (as used clips get "thrown away" - what about all that fine Elerium in there!?).

This situation changed only as I started to kill/stun Aliens before they could fire away and waste MY precious ammo, hehehe. Those circumstances forced me into using Laser Rifles all the time, except on terror missions, where my soldiers carry a mixed load of Plama weaponry and Laser Rifles.

My theory is that it was intentionally programmed this way to prevent players from mowing everything down on the battlefield w/ heavy plasma. This would make the game really boring.

 

You impress me again and again with your skills to quantify stuff the game does! :)

 

Edit: I obviously took the ammo aout of the stunned/dead Alien's guns before the mission ends. Otherwise this would not work due to the used ammo being thrown away.

Link to comment
Share on other sites

I have been meaning to work on this problem for a while now. Alien weapon loadouts seem to change with respect to game-time as well as difficulty level. Well, that's my theory after witnessing hundreds of missions using Mind Control to set up testing scenarios.
They definitely change in response to research.

 

The fastest way I have to make Plasma Pistol and Plasma rifle disappear from alien loadouts, is to research them. [This works reliably even in Jan. 1999.] I've taken to researching only the Heavy Plasma (and its clip) to maximize the effectiveness of armor in the early game.

Link to comment
Share on other sites

I'm quite convinced that if you are able to come up with a few good patterns, you should be able to locate the relevant locations in the executable. I've seen some parts of the executable that look as though they're filled with obdata references.

 

When you see recurring 34s and 35s (Heavy Plasma + clip), represented by " and # ascii characters and 40s and 41s (Blaster Launcher and clip) represented by ( and ) ascii characters (in particular ()))) - blaster and four clips) , you can't help but wonder what they're meant to be.

 

Try doing a quick search in MS-Edit for ()))) in the executable. You'll have to skip the first search item, as that's not relevant, but the second one should dump you in a section filled with what look like obdata references. From there, if you look across to the left you'll see a set of characters that look like "#,#, and if my guess is correct, that's the obdata references for heavy plasma, heavy plasma clip, alien grenade, heavy plasma clip. That's quite a common standard loadout for an alien soldier. Actually, this set repeats itself quite a bit here.

 

Another interesting observation is that the blaster launcher reference that's found has two other sets that come after it, with some other information between them. You often encounter three sets of blasters in missions that contain them. Coincidence?

 

I'm just guessing but perhaps the numbers beside them might include information like alien rank to give it to and where the respective items are to be placed?

 

- NKF

Link to comment
Share on other sites

I think you are correct NKF. That is one part of the executable I haven't decoded yet and the patterns look hopeful. Apparently there are 21 bytes per record starting (in MS-Edit with 100 column widths) at 470,477. Not sure what all of them do yet, but I'll try fooling with them a bit once I have something solid to stand on. :)

 

Just as an update to my progress, I was able to knock out 1143 Small Scout trials. There was no deviation from the results I reported earlier in terms of loadout. The Sectoid soldier always carried a Mind Probe, the HP was always loaded with a HP clip, the Plasma Rifle was loaded with a PR clip plus the strange PP clip spare and the PP was loaded with a PP clip plus a spare. The final frequency? 19.86% HP/HPclip, 29.22% PR/PRclip, 50.92% PP, 131.06% PPclip and 100% Mind Probe. So it does look like a 20, 30, 50% distribution of weapons.

 

Also, I was able to crank out 272 Medium Scout missions. In total, there were 817 Sectoids with the rank of Soldier for an average of 3 per mission and there were 411 Sectoids with the rank of Navigator for an average of 1.5 per mission. This is right on-spec with the OSG's information on rank loadout per UFO. The soldiers had a standard loadout of either HP+1HP clip+AG, PR+2PR clips or PP+2PP clips. The Navigators got a standard loadout of HP+1HP clip, PR+1PR clip or PP+1PP clip+MP. In short, The soldiers got spare clips while the navigators did not and if the soldier got a Heavy Plasma it also got an Alien Grenade. Navigators only got one one clip and those with a Plasma Pistol also received a Mind Probe.

 

Since the Sectoid Soldiers who carried a Plasma Rifle in a Medium Scout didn't get a Plasma Pistol spare clip, my theory is that the Small Scout was mis-programmed to have the wrong loadout. Tsk, tsk, tsk. :)

 

This might be enough data to start a search of the executable in the area you mentioned NKF. Will let you know what I find. Thanks for the heads up. :)

 

- Zombie

Link to comment
Share on other sites

I'm surprised nobody posted the executable info on loadouts yet. Then again, it has only been less than a day. Still, I stayed up way past my bedtime and knocked another one out of the park so to speak. Here it is:

  1. Byte 1: Mission Type. Ranges from 5 (Small Scout) to 15 (last mission on Mars). Have no idea why it only starts at 5, so a little editing may be in order. :)
  2. Byte 2: Indicates Rank of alien. 1=Commander, 2=Leader, 3=Engineer, 4=Medic, 5=Navigator, 6=Soldier, 7=Terrorist type #1, 8=Terrorist type #2. Again, no idea why the terrorists are split up. Perhaps it is mainly for the Muton who have multiple species to choose from.
  3. Byte 3: Minimum # of aliens on Beginner/Experienced Skill levels. That's right, this controls the number of aliens which spawn in a mission!!!
  4. Byte 4: Minimum number of aliens on Superhuman skill level. If you are counting with me, there's still three skill levels missing: Experienced, Veteran and Genius. Doesn't need to be programmed as it is just the average of the two minimums.
  5. Byte 5: Randomizing factor for the number of extra aliens to spawn. The actual amount is a random number betwen 0 and this number.
  6. Byte 6: Unknown. Darnit, I decoded the entire thing except for this byte! Looks like a percentage of some sort. Other than that I have no idea. More testing is in order here.
  7. Bytes 7-11: Weapon loadout #1. This is always the "light" weapons loadout such as Plasma Pistols.
  8. Bytes 12-16: Weapon loadout #2. This is the "middle-weight" weapons loadout. Mostly for the rifles and sometimes the Small Launcher.
  9. Bytes 17-21: Weapon loadout #3. This is the "heavy weapons" loadout. Mostly reserved for the Heavy Plasmas and Blaster Launchers.

There isn't a variable for the place to put the weapons, as the primary weapon is always placed in the right hand, a clip loaded into it and the rest is dumped on the right leg (in the order they appear in the exe loadout). Simple really. As for the Blaster Launchers/Bombs, Engineers and Leaders have this set as their heavy weapons loadout for base missions (X-COM and alien, see? I wasn't going crazy!) while Engineers, Leaders and Commanders have it as their heavy weapons loadout for a Battleship. The only place where the Blaster Launcher is a guaranteed loadout (ocurrs in all 3 loadout sections) is for the Ethereal Soldiers in the underground base mission on Mars. :)

 

I should mention that I crunched some more numbers on the Medium Scout last night/this morning. It always seems like the light weapons loadout is equipped 50% of the time, the medium is equipped 30%, and the heavy, 20%. This corresponds exactly to the Small Scout's loadout distributions, so the probabilities may be hard-coded somewhere. (The Navigators are no exception either, they have the same distribution as the soldiers). I suspect the only time where the distribution chance would vary is when one (or more) of the weapons in the loadout has been researched as Zaimoni pointed out.

 

So in closing (for now at least), I would like to thank everyone here for your input and suggestions. With your help we solved another little mystery. Thanks again! :)

 

- Zombie

Link to comment
Share on other sites

So where in the executable are these bytes? :)

 

By the way, clips don't get loaded into weapons until the battle actually starts. When the gear is assigned to aliens, they all go to their leg slot (number 2).

 

Could be that there were some mission types that never made it into the game. For example, there are two unused craft layouts in the maps folder. There was also supposed to be appearances from some "Men in Black" clones (though really, X-Com has their role anyway).

Link to comment
Share on other sites

Apparently there are 21 bytes per record starting (in MS-Edit with 100 column widths) at 470,477.

That's where you find the bytes.

 

Ok, so two possible mission types never made it into the game. How do you explain that the numbering starts at 5 (meaning there are 5 unused mission types)? I did have some time yesterday to edit the mission type variable. At least for the Small Scout (type 5), editing its mission type to anything other than 5 crashes the game when you enter the battlescape. I tried values 0-4 and 6-15 and none would allow me in (in fact, it refused to spawn the weapons for my crew). :)

 

Right, so I verified that byte 2 is rank. And if you change the rank to one of the terrorists (7 or 8) is spawns terrorists. Surprisingly, the game correctly picks the appropriate terrorist(s) which are associated with the race of the alien. So for instance, if the craft has Sectoids on it and you change one of the ranks to terrorist, the game spawns Cyberdiscs. :)

 

Also, I fooled with the min number of aliens variable and the randomizer. Have you ever been on a mission with 15 Sectoid Commanders? Well, I have and it wasn't pretty. :) For some reason the game didn't want to spawn the 40 Commanders which I ordered. This is probably due to the small map size and the limited number of spawn points. Bigger ships = bigger maps = more spawn points so I may have more luck there. Finally, I editied some numbers in for the unknown byte 6. Didn't seem to do anything. But it may have to deal with the loadout or another stat on the number of aliens on a mission.

 

By the way, I successfully equipped the aliens with the unused items in obdata.dat. I was hoping one of the unused weapons would work with them. Nope, but I got close. I just have to edit the "weapon" which has the appearance of a normal pistol (or is it a rifle?) clip so that it acts like a laser. The game apparently needs ammunition for it. :) Ever see a bunch of Sectoids running around with 5 clumps of Elerium each? I did (via editing), and now I have 7400 units in my inventory after only one mission! :)

 

- Zombie

Link to comment
Share on other sites

Ok, so two possible mission types never made it into the game. How do you explain that the numbering starts at 5 (meaning there are 5 unused mission types)? I did have some time yesterday to edit the mission type variable. At least for the Small Scout (type 5), editing its mission type to anything other than 5 crashes the game when you enter the battlescape. I tried values 0-4 and 6-15 and none would allow me in (in fact, it refused to spawn the weapons for my crew). :)
0..4 may index the human-constructed craft. [say, if the aliens reverse-engineered the Lightning....]
Link to comment
Share on other sites

You're using the CE version these days aren't you, Zombie? Any particular errors it gives when it crashes out?

 

I wouldn't know what the other mission types are. They were never used, so my guesses are really just guesses. :)

Link to comment
Share on other sites

You're using the CE version these days aren't you, Zombie? Any particular errors it gives when it crashes out?

For testing, yes I always use the CE version. So after the loadout screen for my men (pretty easy to figure out who was going to get what when you don't have any weapons to pick from) the game briefly (

 

@zaimoni: why would the aliens want to reverse engineer the Skyranger though? :)

 

- Zombie

Link to comment
Share on other sites

Maybe if Mythos had thought of a good reason, the aliens would have done it. :)

 

If the game lets you see your men in their craft, then that means a map has at least been generated. Check GeoData.Dat in your MisDat folder for info on what craft the aliens are using, etc...

Link to comment
Share on other sites

If the game lets you see your men in their craft, then that means a map has at least been generated. Check GeoData.Dat in your MisDat folder for info on what craft the aliens are using, etc...

Good point. Let me check that out and report back. :)

 

- Zombie

Link to comment
Share on other sites

  • 1 month later...

This has nothing to do with EU's loadouts, but I just got done decoding TFTD's alien loadouts from the executable. What is different in TFTD's loadout is mostly grenades. And lots of them. For instance, if an alien only carried a single grenade in EU, it probably carries 2 in TFTD. There are even some all-Sonic Pulser loadouts listed. (I remember seeing this one time after MC'ing an alien: it had nothing in it's hands and when I released MC, it proceeded to throw a Sonic Pulser. It did this for a few rounds before I gave up and killed it). The blade and lances are usually not wihout a full compliment of pulsers either. Unsurprisingly, the blade and lances are hard to find and only show up in a select few loadouts. No wonder I always have trouble getting them. :blush:

 

- Zombie

Link to comment
Share on other sites

  • 2 weeks later...
They definitely change in response to research.

 

The fastest way I have to make Plasma Pistol and Plasma rifle disappear from alien loadouts, is to research them. [This works reliably even in Jan. 1999.] I've taken to researching only the Heavy Plasma (and its clip) to maximize the effectiveness of armor in the early game.

Hold on here. I just ran some tests on this and it seems as though the phase-out of certain plasma-based weapons does not happen after you research them. For instance, researching the Plasma Pistol + Plasma Pistol Clip doesn't keep it from showing up on a mission.

 

For my test, I started a brand new game on Beginner skill level. To that saved game I copied over research.dat from a previous game where I had researched only the PP+PPC combo (hopefully, this isn't what is causing the trouble but it at least allows me to have those topics done before the first craft arrives). I also did some minor editing to make things easier (soldiers: for increased stats and Psi, and craft: to add Psi-Amps and a few Laser Rifles). When my base detected a Small Scout, I sent my men in to see what the Sectoid carried. After about 5 reloads, I saw a Sectoid Soldier carrying the Plasma Pistol kit. If researching it would knock it out of the mix, you wouldn't see that kit represented anymore. I also copied research.dat from another saved game where I had just the PP+PPC and the Plasma Rifle + PR clip topics researched. It didn't seem to stop the Sectoid from toting the Plasma Pistol either. Things I did not check: researching the Heavy Plasma to see if that had an effect, or the distribution of the weapons the Sectoid carried.

 

So far though, it appears that research isn't tied to disappearance of the Plasma Pistol (at least what I checked). Is time the culprit? It could. But this still needs more researching to uncover anything new. Will let you guys know what I find out. :blush:

 

- Zombie

Link to comment
Share on other sites

Hold on here. I just ran some tests on this and it seems as though the phase-out of certain plasma-based weapons does not happen after you research them. For instance, researching the Plasma Pistol + Plasma Pistol Clip doesn't keep it from showing up on a mission.

 

For my test, I started a brand new game on Beginner skill level. To that saved game I copied over research.dat from a previous game where I had researched only the PP+PPC combo (hopefully, this isn't what is causing the trouble but it at least allows me to have those topics done before the first craft arrives). I also did some minor editing to make things easier (soldiers: for increased stats and Psi, and craft: to add Psi-Amps and a few Laser Rifles). When my base detected a Small Scout, I sent my men in to see what the Sectoid carried. After about 5 reloads, I saw a Sectoid Soldier carrying the Plasma Pistol kit. If researching it would knock it out of the mix, you wouldn't see that kit represented anymore. ....

All that proves is that research.dat doesn't control the knockout. That doesn't change the knockout working in vivo (strictly speaking: Collectors' edition CD-ROM install minimally modified with XCOMUtil to run on W2K). For reference: researched sequence in the test game is Laser Weapons, Laser Pistol, Laser Rifle, Plasma Pistol, Plasma Pistol Clip.

 

I tested this by save-scumming a Large Scout after researching Plasma Pistol in late Jan 1999. It didn't show up once in ten Battlescapes, so clearly the probability was squashed to near-zero.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...