#Civ 6 wiki catapult tv#
In early 2012, 21 years after the original Civilization was released, a TV Tropes user named Tunafish claimed that a bug existed in Civilization that caused Gandhi to be much more aggressive. However, he has a fixed 70% probability of getting "Nuke Happy" as his secondary agenda, which causes him to focus on building nukes, appreciate civilizations that do, and disdain civilizations that do not. Gandhi's fixed goal is "Peacekeeper": Gandhi is much less likely to start wars, and disdains civilizations that do, as well as appreciating those that do the opposite. Each leader has two agendas: the first is constant and based on each leader's personal history, and the second one (as well as a third one in Civilization VI: Gathering Storm) is chosen randomly at the start of each game. Ĭivilization VI introduced a secret agenda mechanic that regulates the artificial intelligence behavior. To bring more diversity to the gameplay, at the start of each game, Civilization V adjusts these parameters by adding a random value between −2 and +2 to each of these two values in the case of Gandhi, this means the "Build Nuke" and "Use Nuke" parameters will never go lower than the maximum rating: 10 out of 10. The next three leaders have a value of 8, and most leaders have a value between 4 and 6. Gandhi is actually one of the most peaceful leaders in Civilization V, but his artificial intelligence parameters that control building and using of nuclear weapons have the value of 12, which is the highest of any leader. Gandhi's high values of "Build Nuke" and "Use Nuke" favors are clearly visible Appearances Īn artificial intelligence configuration of Civilization V. One possible origin of the legend could be India's tendency to discover nuclear technology before most of its opponents because of the peaceful scientific nature of this civilization. During wars, India could use nuclear weapons just like any other civilization, but Gandhi would not use nuclear weapons more often than Abraham Lincoln or any other peaceful leaders. According to Sid Meier, since all integer variables are signed by default in both C and C++ (the programming languages of Civilization and Civilization II respectively), overflow would not have occurred if Gandhi's aggression were set to -1 moreover, the government form doesn't affect AI aggressiveness at all, so Gandhi's aggression level remained the same throughout the game.
A leader with an aggression level of 255 would act the same way as a leader with an aggression level of 3.
#Civ 6 wiki catapult code#
Additionally, based on his memories of Civilization's source code, Reynolds stated that there was no unsigned variable in this section of code and that leaders could not act more aggressively than the most aggressive leaders of the game. In reality, according to the Civilization II lead game designer Brian Reynolds, there were only three possible aggression levels in Civilization, and even though Gandhi's AI had the lowest possible aggression level, he shared it with one third of all leaders. According to other sources, the bug first appeared in Civilization II. The bug was supposedly fixed in later versions of the game, but the developers liked it so much they decided to re-implement it in successive games as an easter egg and joke. This led to India suddenly attacking other civilizations with nuclear missiles. In Civilization's technology tree, nuclear weapons are generally unlocked only after democracy, so Gandhi's aggression level would have already spiked by the time India became nuclear-capable. The negative value would therefore result in an integer overflow (specifically an integer underflow), with the value being stored as 255 and Gandhi becoming about 25 times more aggressive than the most aggressive leaders in the game.
However, the aggression level was stored as an 8-bit unsigned integer variable that could only store values in the range from 0 to 255 (or 2 8-1). In the case of Gandhi, this would lead to an aggression level of −1. Once the AI changed its government form to democracy, which was preferred by peaceful nations such as India, its aggression level decreased by 2. Indian leader Mahatma Gandhi was the only leader in the game with the lowest possible aggression rating of 1 and, as a result, was only able to wage defensive wars. Other sources say the scale went from 1 to 12. On a six-digit odometer, the zero is preceded by 999999 in an eight-bit integer variable, zero appears after 255Īccording to the legend, each leader's artificial intelligence in Civilization had a parameter that described his or her aggression on a scale from 1 to 10, with 1 being least aggressive and 10 most aggressive. Integer overflow can be explained with an odometer.