Jump to content
XCOMUFO & Xenocide

Manufacturing Bug?


Arrow Quivershaft

Recommended Posts

I've noticed when working with manufacturing, if you order the engineers to build more than 218 laser cannons(at one time, IE number ordered-number built>218), the "Time to completion" counter wraps back to 0, independent of number of engineers...furthermore, anything built before the wrap doesn't show up in your stores, but still consumes any appropriate resources...this is how I ended up with a hole in my avenger fleet numbers.

 

I think this is because the number of engineer hours it takes is stored in two-byte location; the counter wraps back to 0 at 65535.(218 LCs take 65400 Eng. Hours to build) I tested this with some other items, and it seems that whenever the engineer hours fall above that number, it wraps. Would anyone be willing to check this on their game, or better yet use a code reader to find out?

Edited by Arrow Quivershaft
Link to comment
Share on other sites

you are completely correct, the game wraps around at 65535

 

many other places in the xcom series this number comes into play, most notably in xcom apocolypse in which you can get 65534 shields to appear in your inventory

Link to comment
Share on other sites

Not really an answer here but my 2 cents:

 

Take a look here. (Actually I wrote most of that myself)

 

You are right that the hours are stored in a 2 byte integer. However this is on a per item basis. AFAIK the total number of engineering hours for a production is not stored in a file. It would have to be computed to get the 'Days/Hours' left and is most likely in a 2-byte integer (They probably never thought people would try to build 200 LC's at once)

 

Some last comments:

I know when you start a new production it's a little goofy. It actually adds 1 more to the amount you said to build, and then sets the 'stored hours' to the time it takes to make one.

 

Also I'm not quite understanding what you mean by 'anything built before the wrap doesn't show up in the stores'. Do you mean other production queues? or does it still increase the number made (and thus decrease the number to make) but those items are not added?

Link to comment
Share on other sites

it think what happens is the total hours hit the wraparound or something, and the game resets the hours.

 

but according to this the number of items built appears tied to the number of hours, not the number of hours tied to the number of items built, which would cause a wraparound in the number of hours to cause a wraparound in the end result as well

Link to comment
Share on other sites

If I order 220 LCs, the first two will take time and money to produce, but when I'm done with the job, I'll only have 218 LCs in my stores. The easiest way to replicate this is trying to build two Avengers in one queue(68000 is more than the limit). It'll take the resources for two, and the space of two, but in the end, you'll only make one Avenger. (If you were building, say, Avengers 4 and 5, Avenger 4 will never exist, but #5 will. Fortunately, the unconstructed ship does not continue to take up hangar-space.)

 

And about your comment for LCs, I admit I'm milking for cash, but this same limit also prevents 2 avengers being built at the same time(a potentially more common occurence) or someone slamming out 700 chips of alien alloys.

Edited by Arrow Quivershaft
Link to comment
Share on other sites

It's really weird. I have tested this on my ye olde dos version but everything seems to be fine. Take a look at the screenshot.

 

post-10782-1171364047_thumb.jpg

 

Even if I've chosen 1000 tanks with laser cannons to be build, nothing happened ( 1 tank = 1200 engineer hours )

 

post-10782-1171364454_thumb.jpg

 

It is hard to believe that this game is actually working :)

Link to comment
Share on other sites

Give this a try: compare building 2059 UFO Power Units with 1 engineer against 2060 power units.

 

I let this game run a bit, and it seemed to continue building just fine. The hours to build looked off, but otherwise it seemed to keep building at the proper pace.

 

With more engineers (60 - 70 or so), it started to show values within 30 days, but kept wrapping around once the 30 days were over.

 

We are kind of pushing boundaries here!

 

- NKF

Edited by NKF
Link to comment
Share on other sites

Actually, Polrak, you'll notice that it the Laser-Tank production queue, it has clearly wrapped around at least once, as the production time is lower than for the laser cannons. By my calculations, it's wrapped 18 times...my numbers are a bit different that what shows, but only by two engineering days, so it's probably rounding error somewhere.

 

In fact, Laser cannons have wrapped too, though only once. It should take that poor Engineer 3750 DAYS to make all those LCs, (about 12 years.)

Link to comment
Share on other sites

I've come up with a list of exactly how many of each item is needed to be in production queue in order to trigger the wraparound. If you toggle between the two given numbers, you should notice the effect.

 

Fusion Ball Launcher: 163-164

Laser Cannon: 218-219

Plasma Beam: 131-132

Fusion Ball: 109-110

Tank/Laser Cannon: 54-55

Hovertank/Plasma: 54-55

Hovertank/Launcher: 46-47

HWP Fusion Bomb: 163-164

Laser Pistol: 218-219

Laser Rifle: 163-164

Heavy Laser: 93-94

Motion Scanner: 297-298

Medi-Kit: 156-157

Psi-Amp: 131-132

Heavy Plasma: 65-66

Heavy Plasma Clip: 819-820

Plasma Rifle: 79-80

Plasma Rifle Clip: 819-820

Plasma Pistol: 109-110

Plasma Pistol Clip: 1092-1093

Blaster Launcher: 54-55

Blaster Bomb: 297-298

Small Launcher: 72-73

Stun Bomb: 327-328

Alien Grenade: 327-328

Mind Probe: 54-55

Personal Armor: 81-82

Power Suit: 65-66

Flying Suit: 46-47

Alien Alloys: 655-656

UFO Power Source: 46-47

UFO Navigation: 40-41

Firestorm: 4-5

Lightning: 3-4

Avenger: 1-2

 

Since I'm not at home, I couldn't test them in game, so there may be slight variance; tell me if you don't see it with a given item.

Link to comment
Share on other sites

=(

 

GET BACK TO WORK!!!!

 

well that is actuly quite interesting only when i try it in my XCOM it usally gives it to me for free

and wraps to 0

but doesnt come up in my store well that is normal here

 

but has anyone tryed it with TFTD?

Link to comment
Share on other sites

  • 2 weeks later...
We are kind of pushing boundaries here!

 

- NKF

 

That's where the bugs usualy are.

 

 

Lets say we are testing a calculator that's got add, subtract, multiply and divide with a 10 digit screen.

 

Here are some tests we would do.

 

 

Basic Tests. count:4 expect to find about 25% of all bugs this way.

1. add two numbers

2. subtract a number from another

3. multiply two numbers

4. divide a number by another.

 

Boundary Tests. count:20 Expect to find about 70% of all bugs this way.

1. add two numbers that will be the biggest number the calculator can handle.

2. add two numbers that will be ONE MORE than the biggest number the calc can handle.

3. add 0 to a number

4. add the smallest possible negative number to one.

 

...and so on for all the operations. including divide by 0.

 

all other possible combinations. count:about 15 million expect to find 5% of all bugs this way.

1. add 1+1

2. add 1+2

... and so on.

 

 

A few of interesting things. One, we can find a lot of bugs by just doing the normal, expected things with a program. Two, most of the bugs lie at the boundaries. Three, to test even a very simple program requires a really large number of tests to completely test it all. Four, if you are smart about what you test, you can find a lot of bugs with a small fraction of full test coverage.

 

Now think about this, every screen in xcom is at least as complicated as the calculator.

Link to comment
Share on other sites

I was being tongue-in-cheek when I made that comment. ;)

 

- NKF

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...