darkpanda
Dark Prince
- Joined
- Oct 28, 2007
- Messages
- 823
Due to popular demand (actually only kirkham7 asked for it, I think) while trying to hack CIV randomness without altering CIV.EXE, I have gone through the "Tribal Hut" reward algorithm, and I lay it below for everyone to see:
Obviously, some kind of random cheating is possible to control the huts outcomes, but as you can see, the result also depends on other game factors that are more difficult to control...
So to answer a few questions:
And as far as hacking CIV.EXE, there are plenty of possibilities: change the default units for Skilled Mercenaries, disable the possibility of barbarians, bypass the advance "pre-requisite" check so you could discover Space Flight in 3980 BC (some kind of StarGate or Atlantis mode )
- If the Civ searching the hut is Barbarians OR the Unit searching the hut is category 1 (air) -> nothing happens; interestingly, this means that enemy Civs also benefit from tribal huts visits...
- Compute the distance to the nearest city (any owner)
- Random call: 0, 1, 2 or 3
- If 0:
- If distance to nearest city is equal to or larger than 4:
- If Map square land value is equal to or above 13 => You have discovered an advanced tribe
- Else => You have discovered valuable metal deposits worth 50$
- Else => You have discovered a friendly tribe of skilled mercenaries
- 50% chance of getting Legion or Cavalry
- If distance to nearest city is equal to or larger than 4:
- If 1:
- If current turn is 0 (year 4000 BC) OR current year is later than 1000 AD => You have discovered valuable metal deposits worth 50$
- Else You have discovered scrolls of ancient wisdom:
- Randomly select a Civ Advance ID among the 72 of them
- If the player already has it OR doesn't have all prerequisistes to that tech, increment to next Advance ID (modulo 72) and loop back to previous step (do this for a maximum of 1000 loops)
- Else give the Advance to the Civ
- If 2: => You have discovered valuable metal deposits worth 50$
- If 3:
- If the distance to the nearest city is less than 4 OR if the Civ has no city yet => You have discovered a friendly tribe of skilled mercenaries
- 50% chance of getting Legion or Cavalry
- Else => You have unleashed a horde of barbarians!
- If the distance to the nearest city is less than 4 OR if the Civ has no city yet => You have discovered a friendly tribe of skilled mercenaries
- If 4: => You have discovered a friendly tribe of skilled mercenaries (this can actually never happen since random values are only in the range {0 .. 3})
- If 0:
Obviously, some kind of random cheating is possible to control the huts outcomes, but as you can see, the result also depends on other game factors that are more difficult to control...
So to answer a few questions:
- kirkham7: Is it possible that huts always give a new city? -> No, since it also depends on proximity to another city, and land value of the hut square; kind of makes sense, you wouldn't to build a city on a mountain or hill, I guess, although the value threshold could have been lower than 13...
- urbancaver: Is it possible to always get an Advance? How many advance can you get? -> YES, and technically speaking, you could get ALL advances through huts, provided you visit enough huts before 1000 AD... I need to try this one out, seems too good to be true...
And as far as hacking CIV.EXE, there are plenty of possibilities: change the default units for Skilled Mercenaries, disable the possibility of barbarians, bypass the advance "pre-requisite" check so you could discover Space Flight in 3980 BC (some kind of StarGate or Atlantis mode )