No building of world wonders by AI (civ 5 gods & kings)

simon26333

Chieftain
Joined
Jan 18, 2013
Messages
2
I've created a mod for civilization 5 that stops the AI building world wonders, leaving them for humans only :)

install
0. download attached
1. extract the zip including the folder itself to
C:\Users\[profile]\Documents\My Games\Sid Meier's Civilization 5\MODS
2. start the game choose mods
3. check the mod (green checkbox)
4. click next etc
5. repeat steps 2-4 if reloading the game (or every time you want the mod to be active)
 

Attachments

  • ExclusiveWonders.zip
    1.5 KB · Views: 4,661
Thank you! I'd tried to write a similar mod myself with Lua, but it didn't work when I installed it.
 
Well, technically this mod won't disallow AI to build wonders because it only changes flavors. I suppose if a wonder is the only thing in an AI's build list, it will built it...

If you wanted to remove even the possibility of AI building a wonder, you could do it like this...

Code:
INSERT INTO Civilization_BuildingClassOverrides  (CivilizationType, BuildingClassType, BuildingType)
SELECT 'CIVILIZATION_EGYPT', 'BUILDINGCLASS_PYRAMIDS', NULL;
 
Well, technically this mod won't disallow AI to build wonders because it only changes flavors. I suppose if a wonder is the only thing in an AI's build list, it will built it

For all practical purposes no it never will, as the AI always has something else it can put production towards. I have tested it.

I disabled FLAVOR_WONDER because (I think) it would be useless to the AI, the AI can build National Wonders through the other flavors. Redirecting Wonders to null I would have thought would also stop the human player building them (but I don't know).
 
If you can't beat the AI's Wonder programme this is surely your solution. I wonder how many people will use it.
 
So much easier with Lua

Code:
function OnCityCanConstruct(iPlayer, iCity, iBuilding)
  -- Is this building a World Wonder?
  -- (Note.  We should optimise this by caching a list of building IDs (iBuilding) which are world wonders at load time)
  if (GameInfo.BuildingClasses[GameInfo.Buildings[iBuilding].BuildingClass].MaxGlobalInstances == 1) then
    -- Yes, so only humans may build it
	return Players[iPlayer]:IsHuman()
  end
end
GameEvents.CityCanConstruct.Add(OnCityCanConstruct)
 
Isnt this just cheating?

When i think mod i think of new content or gameplay rebalance not crippling the already terrible AI
 
Is it possible to create a mod so that only one can start building the wonder? If I start building the great wall, no one else can start to build the great wall.

So when someone start the building of a wonder the option to build that wonder disappear from the other player.
 
I tried this mod on brave new world and it didn't work. Do u have an updated version? Or does anyone know of a way I can stop the ai building them?
 
I tried this mod on brave new world and it didn't work. Do u have an updated version? Or does anyone know of a way I can stop the ai building them?

I downloaded it a couple days ago and it's working like a charm. Maybe you have to start a new game?
 
Just signed up for advice on this:

I'm trying to make a scenario on a Giant Earth map (with true start locations mod) that gives Wonders to their rightful historical builders, i.e. Egypt gets the Pyramids, Greece gets Artemis etc. This is really for greater historical immersion and I'd probably just disable it for all games not played on the Earth map.

I'm just wondering if this is feasible/possible? I have zero modding/programming experience, have read a couple of lua tutorials, I know basically how the Firetuner works to troubleshoot and have crudely adapted the custom traits tutorial thing posted very recently; my idea being to add the Wonders to the unique trait, free with their corresponding tech (no build-time). I've removed syntax errors but my code is surely incomplete as it has no effect.

I'm wondering if my above approach is even possible, or if there is an easier way? I could post the code I have so far, I know it's very incomplete and I'm probably missing quite a few elementary components.

1) Would this be worth creating a new thread?

2) If my above method of giving Wonders to their historical civilizations is misguided or impossible, what other methods would you suggest? Would it be easier/possible to disallow all civilizations except the correct one, and simply keep the build-times?

If nothing else works, I think I'll simply use this mod and remove Wonders entirely. I'd probably have to design an entirely new UA for Egypt though, probably adapting from an old Civ installation.
 
hi,

anyone else used the mod ?

i really hate it if another civ build wonders which a mine (all wonders are mine :))

In a first go i have no problem, no wonders build. But now the $§&"$§ city states do want wonder after wonder and the AI ignore the mod and build these wonders.
I know that in this mod function this way that the AI don't desire to build wonders, but it looks that there is no line in the mod who prohibit the AI from trying to impress the city states...

I have no idea where to get the info how this line could look like and i think the lines "FramedArchitect" wrote are only an example .. in this case that egypt couldn't build the pyramids. Same with whoward69
 
Top Bottom