Jump to content

GLM Air defense bug?


Zomis

Recommended Posts

Hey all,

 

I've encountered a bug with Apoc a couple of times, late in the game when I have lots of money and 2 bases and transports stuff between them this happens. Suddenly Base 1 gets loaded with a lot of GLM Air Defense! (I don't remember exactly how many but I think that it WAS NOT 32767, 65535, 255, or any usual digital number).

 

Someone more than I have encountered this?

 

I want to encounter this bug early in the game so I can sell them for a lot of money :blink:

Link to comment
Share on other sites

Sounds like you were transferring more of them than you actually own.

 

I can't recall how it's done with known equipment, but for any unresearched equipment that is global to both the air and ground transfer screens, it's easy.

 

See, say you have 10 unresearched shields. You deliver all of these from the air screen. Then you go to the ground vehicle screen and it still says you have 10 of the unresearched shields in storage, so you transfer them again. When this happens, you end up sending 20 unresearched shields. That's 10 more than you actually own, leaving the total number of objects in that base: -10.

 

The game seems to forget to properly update the item counters for the different screens for unresearched items. If you know how bits and bytes, data wrap around and all that other interesting junk they teach in lots of computer courses, you'll know why it's happening. It's to do with Wrap-Around™.

 

Anyway, -1 items would wrap around to 65, 535, -2 would wrap to 65, 534, -3 = 65, 532, etc

 

 

- NKF

Link to comment
Share on other sites

Which means that 16 bit (two byte) integers are used to store that info.

 

Wrap-Around™? https://www.angelfire.com/games3/jeffy90/images/smilies/sarcastic.gif

 

The proper geek term is Overflow. https://www.angelfire.com/games3/jeffy90/images/smilies/wink.gif

Link to comment
Share on other sites

The idea is this, right? In a computer, numbers can be stored in lots of different ways.

 

The reason is, you have to set aside amounts of memory to use for storage. Given that there is an infinite amount of numbers, how much memory is needed? https://www.angelfire.com/games3/jeffy90/images/smilies/sarcastic.gif

 

Well, that depends on the numbers you NEED. Given that your stock piles should always be positive, and you can't have half an object, you need an unsigned integer, where "unsigned" means "can't be negative" and integer means "no fractions allowed".

 

The more memory you set aside, the bigger the number can be. In this case, two bytes are used, and that lets you count up to about 65 thousandish.

 

Each digit in the binary number counts for a different amount. For example, in decimal, you have 1, 10, 100, 1000 and so on. Binary goes 1, 2, 4, 8, 16, etc. But the absolute highest place in the binary number is also used as the flag to note that the number is negative, if the number was signed (ei if the number is allowed to be negative). In this case the final number is pretty much equal to half your stock, due to some other technical stuff that I can't be bothered going into. https://www.angelfire.com/games3/jeffy90/images/smilies/wink.gif

 

Righty?

 

So, if you transfer more kit then you have, the number goes negative. This lights up the big huge chunky number columns, and your stock goes through the roof.

 

I suppose you could call it an underflow error, really... https://www.angelfire.com/games3/jeffy90/images/smilies/sarcastic.gif

Link to comment
Share on other sites

The first time that I encountered the problem I "fixed" it by re-loading an earlier saved game. When it happened subsequently, I thought about it a bit and tried to work out what had gone wrong. Like the others have said, it's to do with stocks going spuriously negative and sending the reported stock level "round the clock" and round the bend! Anyway, it's fixable if you can find a way to return one of the crazy-value items to storage.

 

When it happened to me, it was the stock level for a piece of armour that went haywire and I fixed it by going to the "equip soldier" screen amd removing the relevant piece of kit from a soldier. So the problem is easily fixed when you know how and you can do something similar with craft equipment - just send a vessel to the base, go to the "equip vessel" screen and unload one of the crazy-quantity items.

 

Hmmm... I have just noticed that you refer to GLM arrays. I had a problem with those and it was caused by something else... erm... it's somewhere in another thread here. As the unforgettable whosit said unforgettably "I'll be... " erm..."back" Yeah. that's it: "I'll be back"

Link to comment
Share on other sites

I found my earlier post and it's in the Apocalypse thread "Organization becoming under alien control."

 

My GLM stock levels went nuts after Transtellar went hostile and I tried to transfer an artefact between bases by selling it from Base A and then buying it back at Base B. The artefact was a vessel cloaking device and I thought at first that I had successfully transferred it but an unfortunate side-effect was that stock levels for two other items got corrupted, one being GLMs .

 

 

I coudn't fix the problem, other than by reloading a saved game.

Link to comment
Share on other sites

Hey, with the sheer amount of cash you'll get from selling a small portion of it at 100% the items price before the price depreciates, you'll be able to fill up all the available bases on the map and stock them to the brim with troops, techs and still have a bit left over!

 

Keep in mind that your cash also behaves in the same manner as the equipment storage (only it's much larger, a signed long I think). :blink:

 

- NKF

Link to comment
Share on other sites

I was aware that I could have sold the excess stocks but it was my first run through Apocalypse (still proceeding) and I didn't want to corrupt the game play so severely. Besides, I had an intriguing new artefact to research. :blink:

 

It turned out to be a vessel cloaking device so it wasn't especially important but it's the only one that I have found so far.

Link to comment
Share on other sites

A cloaking device... I don't use them, but it's nice to research everything. https://www.angelfire.com/games3/jeffy90/images/smilies/smile.gif

 

If I remember rightly, Tammy caught a live Overspawn. How, I don't know. Nor does she. One day I'm going to go after one of those things with a ton of stasis missiles.

 

A signed long? Lesse, off the top of my head, that's 31 bits of number (and one for the sign). 2^30? Can't do that in my head. https://www.angelfire.com/games3/jeffy90/images/smilies/wink.gif Well... can't be bothered anyway. https://www.angelfire.com/games3/jeffy90/images/smilies/tongue.gif

 

But the point is, the bug can be a double edged sword - collect too much money, and you'll probably end up with a negative amount. You've been warned! https://www.angelfire.com/games3/jeffy90/images/smilies/oh.gif

Link to comment
Share on other sites

Yes, I agree about vessel cloaking devices. I don't use them either but if I had lost the chance to research it I'd have been constantly wondering whether I had missed something vital. I'll know next time, of course.

 

The long, incidentally, has a range of about 4,000 million, give or take a financial billion or two, so we'll need more than $2,000,000,000 before funds go negative. Sounds to me like a job for NKF. :blink:

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