• Civilization 7 has been announced. For more info please check the forum here .

It's official - No nuclear Gandhi in Civ1

rahorvat

Warlord
Joined
Mar 12, 2023
Messages
152
Location
Croatia, EU
Working on OpenCiv1, I just run into a behavior code, and can confirm what Sid Meier already said: There is no nuclear Gandhi scenario in Civilization 1.

For those curious (Function F0_1403_000e, when randomizing leader characteristics):
C#:
this.oParent.GameState.Nations[nationID].Mood = this.oParent.MSCAPI.RNG.Next(3) - 1; // -1 = Friendly, 0 = Neutral, 1 = Aggressive
this.oParent.GameState.Nations[nationID].Policy = this.oParent.MSCAPI.RNG.Next(3) - 1; // -1 = Perfectionist, 0 = Neutral, 1 = Expansionistic
this.oParent.GameState.Nations[nationID].Ideology = this.oParent.MSCAPI.RNG.Next(3) - 1; // -1 = Militaristic, 0 = Neutral, 1 = Civilized

And for the static definitions:
C#:
public NationDefinition[] Nations = new NationDefinition[] {
    // Leader, Nationality, Nation, Mood, Policy, Ideology, ShortTune, LongTune
    new NationDefinition("", "", "", 0, 0, 0, 36, 36),
    new NationDefinition("Caesar", "", "Roman", 0, 1, 1, 24, 10),
    new NationDefinition("Hammurabi", "", "Babylonian", -1, -1, 1, 28, 14),
    new NationDefinition("Frederick", "Germans", "German", 1, -1, 1, 32, 18),
    new NationDefinition("Ramesses", "", "Egyptian", 0, 0, 1, 21, 7),
    new NationDefinition("Abe Lincoln", "", "American", -1, 0, 1, 19, 5),
    new NationDefinition("Alexander", "", "Greek", 0, 1, -1, 26, 12),
    new NationDefinition("M.Gandhi", "", "Indian", -1, -1, 0, 31, 17),
    new NationDefinition("", "", "", 0, 0, 0, 36, 36),
    new NationDefinition("Stalin", "", "Russian", 1, 0, -1, 25, 11),
    new NationDefinition("Shaka", "", "Zulu", 1, 0, 0, 22, 8),
    new NationDefinition("Napoleon", "French", "French", 1, 1, 1, 23, 9),
    new NationDefinition("Montezuma", "", "Aztec", 0, -1, 1, 20, 6),
    new NationDefinition("Mao Tse Tung", "Chinese", "Chinese", 0, 0, 1, 29, 15),
    new NationDefinition("Elizabeth I", "English", "English", 0, 1, 0, 27, 13),
    new NationDefinition("Genghis Khan", "", "Mongol", 1, 1, -1, 30, 16)};

Which means that the value is -1, 0 and 1 exclusively. For the rest of the game these constants stay the same.
 
Last edited:
It would be cool if one of the ways for a civ to respawn is for a Barb controlled city to become a civilization. Maybe have the odds increase every turn the same city is Barbarian.

The Superdome should be a wonder. Counts as a colosseum in every city.
 
It would be cool if one of the ways for a civ to respawn is for a Barb controlled city to become a civilization. Maybe have the odds increase every turn the same city is Barbarian.
The Sid specifically coded that barbarians should be just that, and not a nation (civilization).

The Superdome should be a wonder. Counts as a colosseum in every city.
The OpenCiv1 goal is to be true to its original as much as possible.
 
Presumably you could ALT+R until you eventually create nuclear Gandhi yourself though 🙃
No, the personality values are static (predefined) or randomized (to precisely [-1, 0, 1]). So, no, you can't do that ;)

Oh, I catch what you meant. Yes, randomizing the personality values with Alt+R could make Gandhi aggressive indeed! He, he 😂
 
He'll nuke your ass even without randomization if you're too strong and he has nukes while you don't. All AI civs will do that occasionally.
 
I'll do a correction on that: he'll nuke your ass even if you HAVE nukes, but he has much more. Just happened to me. Nasty mofo.

EDIT: I might have been too quick on this. I forgot that I was playing with tupi's hack, which fixes AI diplomats and some other behaviour for v.05. Playing over the same situation with the original v.05 .exe I did not get nuked when I had 2 nukes (as opposed to Ghandi's 3-4). I did get nuked if I disbanded them though. Here's a save if anyone cares to experiment.
 

Attachments

  • CIVIL0.MAP
    14.9 KB · Views: 4
  • CIVIL0.SVE
    37 KB · Views: 4
Last edited:
I'll do a correction on that: he'll nuke your ass even if you HAVE nukes, but he has much more. Just happened to me. Nasty mofo.

EDIT: I might have been too quick on this. I forgot that I was playing with tupi's hack, which fixes AI diplomats and some other behaviour for v.05. Playing over the same situation with the original v.05 .exe I did not get nuked when I had 2 nukes (as opposed to Ghandi's 3-4). I did get nuked if I disbanded them though. Here's a save if anyone cares to experiment.

The point is that there is no nasty integer overflow like in later editions :)

But, perhaps there is a scenario where that's possible even in Civ 1. The problem with patches is that the original game code is so complex and even GoTo function misbehaves overwriting stack space and few other data. This happens even if you don't use GoTo, because the AI uses GoTo often :badcomp:

So, in your scenario, it is even possible that this happens by mistake, and not by design :crazyeye:
 
Top Bottom