Jump to content


Photo

Manufacturing Bug?


  • Please log in to reply
14 replies to this topic

#1 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 12 February 2007 - 12:58 PM

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, 12 February 2007 - 12:59 PM.


#2 Blehm 98

Blehm 98

    Colonel

  • [Global Moderators]
  • PipPipPipPipPip
  • 2,626 posts

Posted 12 February 2007 - 03:31 PM

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
Top Secret Xenocide Status report

BF2 Hackers =5SF= have busted
]sD[ Engageo <-- couldn't get him banned though, no screenshot of him ingame
]sD[Nomisser
an AK guy
The anti-logarithm of the logarithm of X plus the logarithm of Y equals X times Y, or 10^(logX + logY) = XY
Posted Image
I hate spider solitaire...

#3 Pi Masta

Pi Masta

    Sergeant

  • Xenocide Recruit
  • 68 posts

Posted 12 February 2007 - 03:33 PM

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?

#4 Blehm 98

Blehm 98

    Colonel

  • [Global Moderators]
  • PipPipPipPipPip
  • 2,626 posts

Posted 12 February 2007 - 03:40 PM

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
Top Secret Xenocide Status report

BF2 Hackers =5SF= have busted
]sD[ Engageo <-- couldn't get him banned though, no screenshot of him ingame
]sD[Nomisser
an AK guy
The anti-logarithm of the logarithm of X plus the logarithm of Y equals X times Y, or 10^(logX + logY) = XY
Posted Image
I hate spider solitaire...

#5 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 12 February 2007 - 04:44 PM

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, 12 February 2007 - 04:48 PM.


#6 pokrak

pokrak

    Sergeant

  • Forum Members
  • PipPipPip
  • 28 posts

Posted 13 February 2007 - 05:08 AM

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.

prod.jpg

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

prod2.jpg

It is hard to believe that this game is actually working :)
grandpa wears fat laces..

#7 NKF

NKF

    Commander

  • [Global Moderators]
  • PipPipPipPipPipPip
  • 4,798 posts

Posted 13 February 2007 - 05:21 AM

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, 13 February 2007 - 05:22 AM.

Lord High Generalissimo Ruler Supreme of Norm's Anti Pedant Society (NAPS).

Number of members: 1

#8 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 13 February 2007 - 10:58 AM

It produces them fine, but at least for me, they don't show up in my storage/sale pile. It's easiest to note, as I said, with two avengers.

#9 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 13 February 2007 - 02:42 PM

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.)

#10 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 13 February 2007 - 03:54 PM

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.

#11 Patrick1994

Patrick1994

    Sergeant

  • Forum Members
  • PipPipPip
  • 62 posts

Posted 14 February 2007 - 08:42 AM

=(

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?
Halo Will Live On In All Of Us
Posted Image
FINISH THE FIGHT 2007
-November 2007-

#12 Arrow Quivershaft

Arrow Quivershaft

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 15 February 2007 - 12:49 PM

School is not the same as work, especially between classes.

No, I haven't tried this with TFTD, because I don't have a copy. (yet!)

#13 SaintD

SaintD

    Captain

  • Xenocide Recruit
  • 195 posts

Posted 23 February 2007 - 07:55 PM

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.

#14 NKF

NKF

    Commander

  • [Global Moderators]
  • PipPipPipPipPipPip
  • 4,798 posts

Posted 23 February 2007 - 11:31 PM

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

- NKF
Lord High Generalissimo Ruler Supreme of Norm's Anti Pedant Society (NAPS).

Number of members: 1

#15 SaintD

SaintD

    Captain

  • Xenocide Recruit
  • 195 posts

Posted 06 March 2007 - 09:50 PM

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

- NKF



I know, all the stats get Zombie worked up. Finding bugs does the same for me. B)