[BNW] Mod disabling all (including mod) World Wonders?

Pawelec123456

Chieftain
Joined
Jun 29, 2016
Messages
33
I am looking for a mod disabling all World Wonders as I find them way too overpowered, especially early on. The problem is I used to play with JFD's mods and EE which add new World Wonders. Is there any way to make all players unable to build World Wonders just like CS's are (possibly without disabling the World Council project mods)?

Converting all World Wonders to National Wonders would do similar things balance-wise, but I guess that's harder to do.
 
I am looking for a mod disabling all World Wonders as I find them way too overpowered, especially early on. The problem is I used to play with JFD's mods and EE which add new World Wonders. Is there any way to make all players unable to build World Wonders just like CS's are (possibly without disabling the World Council project mods)?

Converting all World Wonders to National Wonders would do similar things balance-wise, but I guess that's harder to do.

Code:
INSERT INTO Civilization_BuildingClassOverrides (CivilizationType, BuildingClassType, BuildingType) SELECT a.Type, b.Type, NULL FROM Civilizations a, BuildingClasses b WHERE B.MaxGlobalInstances = 1;

CREATE TRIGGER C15_CivWonderTrigger
AFTER INSERT ON Civilizations
BEGIN
INSERT INTO Civilization_BuildingClassOverrides (CivilizationType, BuildingClassType, BuildingType) SELECT NEW.Type, Type, NULL FROM BuildingClasses WHERE MaxGlobalInstances = 1;
END;

CREATE TRIGGER C15_WonderWonderTrigger
AFTER INSERT ON BuildingClasses
WHEN NEW.MaxGlobalInstances = 1
BEGIN
INSERT INTO Civilization_BuildingClassOverrides (CivilizationType, BuildingClassType, BuildingType) SELECT Type, NEW.Type, NULL FROM Civilizations;
END;

Any unintended side effects are unintended.

Making them into National Wonders would be similar, but I guess it depends on how deep you want the change to go: if you just want each civ to be able to build every wonder, then that's easy enough (and is actually easier than this tbh :p); having Building prereqs on top of that would be harder, since you'd have to come up with them and do them manually effectively.
 
lua

unzip and copy the mod into your game's mods folder. enable the mod and no player should be able to construct world wonders, regardless of whether the wonder is part of the base game or is added by some other mod.
 

Attachments

  • Disable_All_Wonder.zip
    1.4 KB · Views: 130
Well this is awkward...

but yea LeeS' is less likely to have unintentional side effects so go for that one tbh.
 
LeeS' one works like a charm, but the savegames made with it enabled cannot be loaded ("not all mods are enabled" error).
 
Last edited:
You leave all mods enabled that were enabled when you 1st created the savedgame and you must always go through the mods menu and click next to get to the modded games loadgame, startgame menu.
 
I'm not a noob, I know precisely how to do that. The thing is I cannot get to run the saved game with exactly the same mods enabled. I'm running local game files verification via Steam to see if the problem wasn't caused by uninstalling JFD's Civ Selection Screen mod from the DLC folder.

EDIT: so the verification didn't find any errors and the problem persists. It is connected directly with the Disable_All_Wonder - the error shows only if the mod is enabled and disappears when I disable it, no matter what mod combo I use. The workaround was to set 'Affect Saved Games' to 'no'.

EDIT2: After extensive testing I concluded that the LUA solution is actually more buggy than simple SQL disable/delete. And given how the mod is intended to work I went for the most drastic of possible solutions and simply deleted the SQL entries from Buildings database. The problem is the World Congress Projects should remain untouched:
Code:
DELETE FROM Buildings
WHERE UnlockedByLeague != 1 AND BuildingClass IN
(SELECT Type FROM BuildingClasses WHERE MaxGlobalInstances == 1);
The downside is it has to be run last, because the trigger:
Code:
CREATE TRIGGER NoWonderRemoval
AFTER INSERT OR UPDATE ON Buildings
WHEN (NEW.UnlockedByLeague != 1) OR (NEW.UnlockedByLeague IS NULL);
BEGIN
DELETE FROM Buildings
WHERE UnlockedByLeague != 1 AND BuildingClass IN
    (SELECT Type
    FROM BuildingClasses
    WHERE MaxGlobalInstances == 1)
END;
is ran every time a dummy building is added, slowing down the loading process a lot. I decided to keep it disabled by default.
 
Last edited:
Top Bottom