Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > Civ3-General-Archive > An Explanation of the Trillion Dollar from AI cheat(NOT BUG)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
jadlakha is offline jadlakha
Warlord

Apr 2001
time: 05:16
  Old Post 04-12-2001 04:19
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
An Explanation of the Trillion Dollar from AI cheat(NOT BUG) Support Apolyton, buy Civilization 2

Well first of all this is not a bug and I think Firaxis or Infrogames or whoever should not even worry about this issue because its not a bug. ITS A CHEAT. This cheat in no way hinders gameplay whatsoever, its up to the human to take advantage of it, people need to stop complaining about it. If you dont like this cheat then dont use it, why should you care that someone else in there own single player game takes advantage of it?

Anyways onto the main point. Although I have a limited knowledge of C++, from what I do know this error has to do with the fact there is a limit on the size of integer a computer can handle. For civ 3 I would assume that asking money from other civs would be declared as an int since nobody is going to make more then 32,000 or so gold and 32,000 is the limit for what the computer can handle for int variables. A solution would be probably to change it to a long. Longs are the same as int variables except they can go much higher without the computer returning incorrect data. Actually the variable may already be a long, I dont know, if thats the case the only solution would be to limit the number of digits in the per turn or lump sum box to 4 or 5. That way the most you could ask for would be 9,999 and the AI would reject that since its not out of the range of the 32,000 so the cpu could do the calculatiosn without errors. This is just a thought and please correct me if Im wrong. And I hope you'll can even understand what Im talking about.

Libertarian is offline Libertarian
King

Nov 2001
time: 00:16
  Old Post 04-12-2001 04:39
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Full PM-box? Change here!

I think it's unsigned long, isn't it? Assuming 32-bit development tools. That would be easy enough to test.

cassembler is offline cassembler
Prince
Loud Cow Productions
Oct 2001
time: 23:16
  Old Post 04-12-2001 04:46 Visit cassembler's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Remove this text

I agree with what you're saying about it being a cheat and not a bug. I reminded of Civ1 where you could hold down shift and hit f1, f2, f3, f4... and you'd get the cheat mode. It was something you had to consciously do.

ham50 is offline ham50
Settler

Sep 1999
time: 05:16
  Old Post 04-12-2001 05:08
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Suffering from ads?

It is probably not the data type they used, but what they used to control how the AI deals with the gold transactions. When it goes 9999999999999, the function breaks, dropping the variable without the computer checking to see if the amount can be taken from the other civ. Since the flag that says "DO NOT DO THIS" did not pop up, the computer assumes that the number is ok, and gives it away, causing the AI's gold to go negative. The best way to fix this would be to check if the civ has a negative number for it's gold if the transaction were to take place. If it is, then it won't do it.

This is a bug, I doubt the programmers thought that typing in a large number should give the player that amount.

adaMada is offline adaMada
King
"The Iron" Stadium, Ubergorsk, Apolytonia (C3DG)
Mar 2000
time: 00:16
  Old Post 04-12-2001 07:24
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Call to Power 2

If i'm correct (i'm probably not), with what I know about programming (which is probably wrong ), if they want to make the variable as large as possible, they'd use an unsigned double. As that can hold MANY more digits then the input box, that'd eliminate the problem... however, a more elegant (read -- less memory intensive) solution would be to, as ham said, limit the number of digits allowed in the box... either way, it shouldn't be a huge fix for faraxis...

-- adaMada

sophist is offline sophist
Prince

Nov 2001
time: 23:16
  Old Post 04-12-2001 09:38
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Remove this text

This is clearly a signing bug. They didn't declare the variable as unsigned somewhere (like in the routines to handle calculations of whether a deal was valid), so when comparing 999999 against 0, it comes out as less rather than more and screws it up. That's it.

As far as memory use goes... 4 bytes does not a memory problem make. An unsigned 4-byte integer is plenty to hold the gold you get in this game. C'mon now.... memory? Elegance? Puh-lease.

chazmyrr is offline chazmyrr
Settler

Nov 2001
time: 05:16
  Old Post 05-12-2001 03:17
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Suffering from ads?

It's not clear to me that the problem is in the variable that contains what you type so much as the one that measures how desperate the AI is. When I ran into this, I had an AI civ on the ropes very early in the game. I decied to ask for everything I could to get peace. I clicked all the techs. The advisor said it's acceptable. I click all the cities. The advisor said it's acceptable. I ask for all the gold in his treasury. Acceptable. I ask for 10 gold per turn. Acceptable. I up it to 50 per turn. Acceptable. Continue until I reach 50k per turn. Acceptable. Decide it's bug and start a new game.

I know that the AI is capable of pulling units and money out of thin air. I have watched the AI do this repeatedly. I'm not saying that there isn't a problem with the input box, but my experience leads me to suspect that if the AI is desperate enough, it will manufacture whatever gold per turn it takes to buy peace.

wervdon is offline wervdon
Prince

Nov 2001
time: 23:16
  Old Post 05-12-2001 05:27
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Inflate your Upload Space

Actually, Im pretty sure that the AI doesnt go into negative gold when you use this cheat, from best I can tell its impossible for anyone to go into negative gold.

As a test, I tried to see what would happen when Im the one giving away more gold than I have. I ran the test by giving another civ a "gift" of the amount of gold per turn I was taking in, and all my treasury gold. (Ironically they'd refuse to accept it if I offered them more gold per turn than I had coming in), then change my tax rate so that I had 0 gold in my treasury and negative gold per turn counting the gold I was sending to them. What happened? I sat at 0 gold, and ran about three turns, before I was satisfied. From best I could tell, they was still getting my gift each turn, and I wasn't being forced to sell off improvements or units (unless it was done without my knowledge, but the negative per turn stayed the same).

Nadexander is offline Nadexander
Warlord
Saratoga, California
Mar 2001
time: 21:16
  Old Post 05-12-2001 05:37
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Re: An Explanation of the Trillion Dollar from AI cheat(NOT BUG) Help yourself to an AD-FREE life

Not only is this a bug, its a very common programming error. Simple failure to check inputs properly. Should be corrected in the patch.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:16.
Apolyton Time is 00:16.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0403 seconds (89.64% PHP - 10.36% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net