Removing all flavor from major civs

Fimbulvetr

Emperor
Joined
Nov 5, 2009
Messages
1,268
Location
Austria
The civilizations are a bit too unique for my tastes, their individual bonuses being to strong and too imblanced to really judge how bad the AI really is, so I'm trying to remove all these bonuses, unique districts/buildings/units as well as agendas.

Spoiler code :

Code:
DELETE FROM Districts
      WHERE TraitType NOT NULL;

DELETE FROM Buildings
      WHERE TraitType NOT NULL;

DELETE FROM Improvements
      WHERE TraitType NOT NULL
      AND TraitType NOT LIKE 'MINOR_CIV_%';

DELETE FROM Units
      WHERE TraitType NOT NULL
      AND TraitType <> 'TRAIT_BARBARIAN';

DELETE FROM Traits
      WHERE TraitType NOT LIKE 'MINOR_CIV_%'
      AND Name LIKE 'LOC_TRAIT_LEADER_%';'

DELETE FROM Traits
      WHERE TraitType LIKE 'TRAIT_CIVILIZATION_%';

DELETE FROM Traits
      WHERE TraitType LIKE 'TRAIT_AGENDA_%';

DELETE FROM Agendas;

DELETE FROM StartBiasFeatures;
DELETE FROM StartBiasResources;
DELETE FROM StartBiasRivers;
DELETE FROM StartBiasTerrains;

If this works remains to be seen, my question for now is just: Did I miss anything, or should this properly remove all uniqueness from all major civilizations?


edit: yes, improvements, thanks.
 
Last edited:
Unique improvements, thanks, I was forgetting that one. It is tied to traits but like districts, buildings und units, the foreign key 'TraitType' is set to 'ON DELETE SET DEFAULT' where default is NULL, meaning all unique improvements would be available to everyone if I just delete the trait but leave the improvements table untouched.

If I were to create only one plain civilization and want to start a game with just plain civs, everyone would have the same name, leader and color, that would be confusing. If I add a plain copy of every civ I could get around that, but would still have to manually choose these plain civs every time, if I just leave all civs at random I'd get a mix of normal and plain civs. The simplest solution seemed to me to not leave any normal major civs in the game, only plain ones.
 
Code:
(snip)

This is the content of the No_Flavor.modinfo file in its No_Flavor folder inside the game's DLC folder. I can activate it just fine, unique properties seem to be completely removed, no one has any agenda. But everyone's settler starts in the same tile so there is obviously some kind of error. How do I find out what's wrong, is there some debug output somewhere?
 
Last edited:
There is no difference between DLC folder and mods folder, and I can find the dlc one more easily.

I had a look at the logs and couldn't find anything, so I had to fly blind - assuming that all civs just need at least one trait and possibly one agenda, I created one empty trait and agenda, and every leader/civ uses that one. Now when I try to start the game I see no units at all, just an map with nothing revealed. This time lua.log ends with ''
Code:
LoadScreen: OnLoadGameViewStateDone
EndGameMenu: Player 2 has achieved a victory! (2)
So player 3 of 3 has a victory. Most likely because the other 2 don't exist, at least they aren't mentioned in Game_PlayerScores.csv, only the 3rd one.
Next idea: create a different empty trait for everyone, so everyone gets his own. I have my doubts that this will change things but this is the only idea I could come up with.

Anyway, here's the code, if anyone could help, that would be appreciated. Yet again I don't know why this isn't working as intended.
Spoiler code :

Code:
INSERT INTO Types (Type,Kind) Values ('TRAIT_CIVILIZATION_NONE','KIND_TRAIT'),('TRAIT_LEADER_NONE','KIND_TRAIT'),('TRAIT_AGENDA_NONE','KIND_TRAIT');

INSERT INTO Traits (TraitType,Name,Description) Values ('TRAIT_CIVILIZATION_NONE','No Civilization Trait','This civilization trait does nothing'),('TRAIT_LEADER_NONE','No Leader Trait','This leader trait does nothing'),('TRAIT_AGENDA_NONE','No Agenda Trait','This agenda trait does nothing');

INSERT INTO Agendas (AgendaType,Name,Description) Values ('AGENDA_NONE','No Agenda','This agenda does nothing'),('AGENDA_NONE_HIST','No Historical Agenda','This historical agenda does nothing'),('AGENDA_NONE_RAND','No Random Agenda','This random agenda does nothing');
INSERT INTO RandomAgendas (AgendaType) VALUES ('AGENDA_NONE_RAND');

INSERT INTO AgendaTraits (AgendaType,TraitType) Values ('AGENDA_NONE','TRAIT_AGENDA_NONE');

UPDATE HistoricalAgendas SET AgendaType='AGENDA_NONE_HIST';

CREATE TABLE NFLeaders (
    LeaderType TEXT NOT NULL,
    TraitType  TEXT DEFAULT 'TRAIT_LEADER_NONE',
    PRIMARY KEY (LeaderType)
    );
INSERT INTO NFLeaders (LeaderType) SELECT DISTINCT LeaderType FROM LeaderTraits WHERE LeaderType <> 'LEADER_BARBARIAN' AND LeaderType <> 'LEADER_DEFAULT' AND LeaderType NOT LIKE 'LEADER_MINOR_CIV_%';
INSERT INTO LeaderTraits (LeaderType,TraitType) SELECT LeaderType,TraitType FROM NFLeaders;

CREATE TABLE NFCivs (
    CivilizationType TEXT NOT NULL,
    TraitType        TEXT DEFAULT 'TRAIT_CIVILIZATION_NONE',
    PRIMARY KEY (CivilizationType)
    );
INSERT INTO NFCivs (CivilizationType) SELECT DISTINCT CivilizationType FROM CivilizationTraits WHERE CivilizationType <> 'CIVILIZATION_BARBARIAN';
INSERT INTO CivilizationTraits (CivilizationType,TraitType) SELECT CivilizationType,TraitType FROM NFCivs;

DELETE FROM Districts
      WHERE TraitType NOT NULL;

DELETE FROM Buildings
      WHERE TraitType NOT NULL;

DELETE FROM Improvements
      WHERE TraitType NOT NULL
      AND TraitType NOT LIKE 'MINOR_CIV_%';

DELETE FROM Units
      WHERE TraitType NOT NULL
      AND TraitType <> 'TRAIT_BARBARIAN';

DELETE FROM Traits
      WHERE TraitType NOT LIKE 'MINOR_CIV_%'
      AND Name LIKE 'LOC_TRAIT_LEADER_%'
      AND TraitType NOT LIKE '%_NONE';

DELETE FROM Traits
      WHERE TraitType LIKE 'TRAIT_CIVILIZATION_%'
      AND TraitType NOT LIKE '%_NONE';

DELETE FROM Traits
      WHERE TraitType LIKE 'TRAIT_AGENDA_%'
      AND TraitType NOT LIKE '%_NONE';


DELETE FROM Agendas WHERE AgendaType NOT LIKE 'AGENDA_NONE%';

DELETE FROM AiLists WHERE (LeaderType NOT NULL AND LeaderType NOT IN (SELECT TraitType FROM Traits))
      OR (AgendaType NOT NULL AND AgendaType NOT IN (SELECT TraitType FROM Traits));

DROP TABLE NFLeaders;
DROP TABLE NFCivs;

DELETE FROM StartBiasFeatures;
DELETE FROM StartBiasResources;
DELETE FROM StartBiasRivers;
DELETE FROM StartBiasTerrains;
 
Last edited:
Turns out StartBias breaks everything if I just delete all entries. I would never have guessed, but testing step by step I finally found out. I think I have it working now.
 
Back
Top Bottom