Civ IV traits in Civ V

Long time lurker, first time poster.

I love this mod to death. So much so that I cannot play with out it.

Today I attempted to make it compatible with Vice Virtuoso's Madoka Magica Civilization's Pack. I got the mod to work fine, but I cannot seem to get the dynamic leader names to work.

My file looks like this.

Spoiler :
-- Insert SQL Rules Here
--=======================================================================================================================
-- Leader_Traits
--=======================================================================================================================
CREATE TABLE IF NOT EXISTS
Leader_SharedTraits (
LeaderType text REFERENCES Leaders(Type) default null,
TraitOne text REFERENCES Policies(Type) default null,
TraitTwo text REFERENCES Policies(Type) default null);

INSERT INTO Leader_SharedTraits
(LeaderType, TraitOne, TraitTwo)
VALUES ('LEADER_HOMURA', 'POLICY_AGGRESSIVE_X', 'POLICY_PROTECTIVE_X'),
('LEADER_DEMON_HOMURA', 'POLICY_AGGRESSIVE_X', 'POLICY_IMPERIALISTIC_X'),
('LEADER_ORIGINAL_MADOKA', 'POLICY_DIPLOMATIC_X', 'POLICY_CHARISMATIC_X'),
('LEADER_MADOKA', 'POLICY_PROTECTIVE_X', 'POLICY_PHILOSOPHICAL_X'),
('LEADER_MAMI', 'POLICY_DIPLOMATIC_X', 'POLICY_INDUSTRIOUS_X'),
('LEADER_NAGISA', 'POLICY_FINANCIAL_X', 'POLICY_Creative_X'),
('LEADER_SAYAKA', 'POLICY_CREATIVE_X', 'POLICY_SEAFARING_X'),
('LEADER_KYOUKO', 'POLICY_EXPANSIVE_X', 'POLICY_SPIRITUAL_X');
==========================================================================================================================
-- Reference table for text keys. Use these to keep Leader names accurate.
-- [ICON_WAR] Aggressive
-- [ICON_HAPPINESS_1] Charismatic
-- [ICON_CULTURE] Creative
-- [ICON_INFLUENCE] Diplomatic
-- [ICON_FOOD] Expansive
-- [ICON_TRADE] Financial
-- [ICON_CITY_STATE] Imperialistic
-- [ICON_PRODUCTION] Industrious
-- [ICON_RESEARCH] Inventive
-- [ICON_GOLD] Mercantile
-- [ICON_GREAT_PEOPLE] Philosophical
-- [ICON_STRENGTH] Protective
-- [ICON_GREAT_EXPLORER] Seafaring
-- [ICON_PEACE] Spiritual
--==========================================================================================================================
UPDATE [Language_en_US] SET Text = 'Homura Akemi[ICON_WAR][ICON_STRENGTH]' WHERE Tag = 'TXT_KEY_LEADER_HOMURA';
UPDATE [Language_en_US] SET Text = 'Demon Homura[ICON_WAR][ICON_CITY_STATE]' WHERE Tag = 'TXT_KEY_LEADER_DEMON_HOMURA';
UPDATE [Language_en_US] SET Text = 'Madoka Kaname[ICON_INFLUENCE][ICON_HAPPINESS_1]' WHERE Tag = 'TXT_KEY_LEADER_ORIGINAL_MADOKA';
UPDATE [Language_en_US] SET Text = 'Ultimate Madoka[ICON_STRENGTH][ICON_GREAT_PEOPLE]' WHERE Tag = 'TXT_KEY_LEADER_MADOKA';
UPDATE [Language_en_US] SET Text = 'Mami Tomoe[ICON_INFLUENCE][ICON_PRODUCTION]' WHERE Tag = 'TXT_KEY_LEADER_MAMI';
UPDATE [Language_en_US] SET Text = 'Nagisa Momoe[ICON_TRADE][ICON_CULTURE]' WHERE Tag = 'TXT_KEY_LEADER_NAGISA';
UPDATE [Language_en_US] SET Text = 'Sayaka Miki[ICON_CULTURE][ICON_GREAT_EXPLORER]' WHERE Tag = 'TXT_KEY_LEADER_SAYAKA';
UPDATE [Language_en_US] SET Text = 'Kyouko Sakura[ICON_FOOD][ICON_PEACE]' WHERE Tag = 'TXT_KEY_LEADER_KYOUKO';




I added the mod reference, the file, and the updatedatabase lines to the core mod file as well, but still no luck.

Any ideas why I can't seem to get it to work?
 
I'm pretty sure -- makes the line into a comment in SQL, which is what you have at the beginning of all your UPDATE [Language_en_US] lines.

Note sure how SQL uses = or == at the beginning of a line
 
Have you tried it without the [] around Language_en_US ? Looking through some other sample mods that use SQL heavily as well as a couple of my own that use really SQL 101 level stuff I notice that none of the table names are wrapped by [].

I looked at a couple of mods that JFD made for civilizations, and I notice he doesn't use SQL for making changes to the Language_en_US table, he uses XML.

Follow this tutorial whoward69's enable logging tutorial and see what is in the file called Database.log. But we should probably move the rest of this conversation to a new thread. It's not fair to fill up the mod thread with endless trouble-shooting goop. Also, if still having troubles, see this tutorial whoward69's zip your mods and attach tutorial and add the zipped copy of the built version of your mod to the 1st post of a new thread. I'll keep an eye out for a new thread.
 
Long time lurker, first time poster.

I love this mod to death. So much so that I cannot play with out it.

Today I attempted to make it compatible with Vice Virtuoso's Madoka Magica Civilization's Pack. I got the mod to work fine, but I cannot seem to get the dynamic leader names to work.

My file looks like this.

SPOILER/SPOILER

I added the mod reference, the file, and the updatedatabase lines to the core mod file as well, but still no luck.

Any ideas why I can't seem to get it to work?

You gonna laugh when you see this. Open your SQL up in modbuddy an look at the "===========" line right between the leader trait table and the icon key. See how it's black? Game thinks you're trying to tell it something. So add "--" right before that line. Turns green, yeah? Save, build, boom, done. Otherwise you did a great job, everything is in order.

And feel free to post any problems you have in this thread. It's been really quiet lately so I don't think it'll bother anyone.
 
A few issues. The main one is the workshop is not being nice to me with the new update, so a direct download would be greatly appreciated.

For some reason, Hitler, Churchill, and Stalin refuse to display the icons next to their names, despite everything else working. The new version may inexplicably fix this, since the problem makes no sense in the first place.

Also, the UI part with the trait explanations has been taken over by TXT_KEY.
 
A few issues. The main one is the workshop is not being nice to me with the new update, so a direct download would be greatly appreciated.

For some reason, Hitler, Churchill, and Stalin refuse to display the icons next to their names, despite everything else working. The new version may inexplicably fix this, since the problem makes no sense in the first place.

Also, the UI part with the trait explanations has been taken over by TXT_KEY.

Strange. I just uploaded a direct download of the latest version. I will investigate the other issues when I have time. (It is midnight here...)

Edit: I just loaded up a game with Hitler and Stalin and checked the help menu. I'm not having any problems, so I think we need to determine what is the difference between your game and mine.
 
I do have a whole bunch of mods enabled, which is the difference. The new update did inexplicably fix the issues I was having.

New curiosities that have arisen are the trait information not even being an option on the UI now. The icons are present next to the leader's names, but I cannot confirm if the traits are active or not yet. They're not if mercantile applies to unimproved luxuries.

Edit: Okay, my neighbor is Lenin, who I gave charismatic, and info addict shows higher initial happiness, so the traits are working. Also, I forgot to mention on turn 0 the game does not force you to pick a technology. This means you can go a turn without putting science into something if you're not paying attention.

Edit Edit: Mercantile is not working, at least the luxury resource part of it. I'm not going to spend time verifying if the gold building boost works (if the tooltip's information on the tech tree is accurate, then it is not) if my civilization is currently gimped.
 
The resource does not need to be improved to have bonus gold. the best way to check mercantile is to mouse over the resource BEFORE you settle. once it is within your borders it should have +1 gold. Another way to check is to enter the Technology tree and look at Currency. The market should now say "Provides +2 gold and +35% GPT."

I'm not sure what is conflicting with the in game help, I was under the impression it was additive and therefore conflict free. I will admit that I neglected to update the text so it gives incorrect information on like 6 of the traits.

Edit: Also, I find In Game Editor to be the best tool for checking mod functionality.
 
Well I intended for this to be a normal game, not a mod testing one. And if the tooltip at Currency is supposed to be updated, then Mercantile is not working at all, because the yields for the cotton and silk in my borders are normal. I also enabled this mod near the end, so I don't see what would be conflicting.
 
Oh man. I can't believe I missed that. Thanks a ton.

Also, maybe you can help me with something else. I've been trying to add compatability for Leugi's Latin American civs, but I am having no luck at all. There must be something really dumb I'm not getting here.

Same as before:
Spoiler :
-- Insert SQL Rules Here
--================================================== ================================================== ===================
-- Leader_Traits
--================================================== ================================================== ===================
CREATE TABLE IF NOT EXISTS
Leader_SharedTraits (
LeaderType text REFERENCES Leaders(Type) default null,
TraitOne text REFERENCES Policies(Type) default null,
TraitTwo text REFERENCES Policies(Type) default null);

INSERT INTO Leader_SharedTraits
(LeaderType, TraitOne, TraitTwo)
VALUES ('LEADER_CESPEDES', 'POLICY_PHILOSOPHICAL_X', 'POLICY_AGGRESSIVE_X'),
('LEADER_LAUTARO', 'POLICY_AGGRESSIVE_X', 'POLICY_PROTECTIVE_X'),
('LEADER_EVITA', 'POLICY_EXPANSIVE_X', 'POLICY_CHARISMATIC_X'),
('LEADER_BELZU', 'POLICY_FINANCIAL_X', 'POLICY_SEAFARING_X'),
('LEADER_BOLIVAR', 'POLICY_IMPERIALISTIC_X', 'POLICY_PHILOSOPHICAL_X'),
('LEADER_NEMEQUENE', 'POLICY_MERCANTILE_X', 'POLICY_IMPERIALISTIC_X'),
('LEADER_GASPAR', 'POLICY_SEAFARING_X', 'POLICY_INVENTIVE_X'),
('LEADER_RAMON', 'POLICY_MERCANTILE_X', 'POLICY_INDUSTRIOUS_X'),
('LEADER_HUYUSTUS', 'POLICY_SPIRITUAL_X', 'POLICY_CREATIVE_X'),
('LEADER_PRESIDENTE', 'POLICY_CHARISMATIC_X', 'POLICY_DIPLOMATIC_X'),
('LEADER_CUNHAMBEBE', 'POLICY_EXPANSIVE_X', 'POLICY_DIPLOMATIC_X'),
('LEADER_KATARI', 'POLICY_PROTECTIVE_X', 'POLICY_CREATIVE_X');
-- ================================================== ================================================== ======================
-- Reference table for text keys. Use these to keep Leader names accurate.
-- [ICON_WAR] Aggressive
-- [ICON_HAPPINESS_1] Charismatic
-- [ICON_CULTURE] Creative
-- [ICON_INFLUENCE] Diplomatic
-- [ICON_FOOD] Expansive
-- [ICON_TRADE] Financial
-- [ICON_CITY_STATE] Imperialistic
-- [ICON_PRODUCTION] Industrious
-- [ICON_RESEARCH] Inventive
-- [ICON_GOLD] Mercantile
-- [ICON_GREAT_PEOPLE] Philosophical
-- [ICON_STRENGTH] Protective
-- [ICON_GREAT_EXPLORER] Seafaring
-- [ICON_PEACE] Spiritual
--================================================== ================================================== ======================
UPDATE [Language_en_US] SET Text = 'Carlos Manuel de Cespedes[ICON_GREAT_PEOPLE][ICON_WAR]' WHERE Tag = 'TXT_KEY_LEADER_CESPEDES';
UPDATE [Language_en_US] SET Text = 'Lautaro[ICON_WAR][ICON_STRENGTH]' WHERE Tag = 'TXT_KEY_LEADER_LAUTARO';
UPDATE [Language_en_US] SET Text = 'Eva Peron[ICON_FOOD][ICON_HAPPINESS_1]' WHERE Tag = 'TXT_KEY_LEADER_EVITA';
UPDATE [Language_en_US] SET Text = 'Belzu[ICON_TRADE][ICON_GREAT_EXPLORER]' WHERE Tag = 'TXT_KEY_LEADER_BELZU';
UPDATE [Language_en_US] SET Text = 'Simon Bolivar[ICON_CITY_STATE][ICON_GREAT_PEOPLE]' WHERE Tag = 'TXT_KEY_LEADER_BOLIVAR';
UPDATE [Language_en_US] SET Text = 'Nemequene[ICON_GOLD][ICON_CITY_STATE]' WHERE Tag = 'TXT_KEY_LEADER_NEMEQUENE';
UPDATE [Language_en_US] SET Text = 'Gaspar Rodriguez[ICON_GREAT_EXPLORER][ICON_RESEARCH]' WHERE Tag = 'TXT_KEY_LEADER_GASPAR';
UPDATE [Language_en_US] SET Text = 'Ramon Castilla[ICON_GOLD][ICON_PRODUCTION]' WHERE Tag = 'TXT_KEY_LEADER_RAMON';
UPDATE [Language_en_US] SET Text = 'Huyustus[ICON_PEACE][ICON_CULTURE]' WHERE Tag = 'TXT_KEY_LEADER_HUYUSTUS';
UPDATE [Language_en_US] SET Text = 'El Presidente[ICON_HAPPINESS_1][ICON_INFLUENCE]' WHERE Tag = 'TXT_KEY_LEADER_PRESIDENTE';
UPDATE [Language_en_US] SET Text = 'Cunhambebe[ICON_FOOD][ICON_INFLUENCE]' WHERE Tag = 'TXT_KEY_LEADER_CUNHAMBEBE';
UPDATE [Language_en_US] SET Text = 'Tupac Katari[ICON_STRENGTH][ICON_CULTURE]' WHERE Tag = 'TXT_KEY_LEADER_KATARI';


I have no idea why I cannot seem to get this to work.

I've also been kicking around the idea fo a 15th Trait, Despotic, that would be much better thematically for modded Civs like Demon Homur and Gaspar.

It would be something like +2 Happiness from untis garrisoned in cities and +2 happiness from Constabularies and Police Stations.

Originally i ahd kicked around the idea of something involving stationed spies and unhappiness reduction, but decided that would probably be out of my reach.
 
You don't have commas separating the two traits. For example:

('LEADER_CESPEDES', 'POLICY_PHILOSOPHICAL_X', 'POLICY_AGGRESSIVE_X'),

instead of what it currently is.
 
-_-...

I need to get my vision checked....

It worked like a charm. Thanks a ton.
 
Despotic? I like the sound of that. Let's you pretend you are an evil dictator. Perhaps it could eliminate the production and combat strength penalties from having an unhappy empire (But not the chance for revolt or growth penalty, else it may break the game).

In addition to garrisoned unit happiness and bonus happiness from Police Stations. What an odd game, where the mechanic for best oppressing your populace makes us say "Increases happiness" instead of "Jack booted thugs breaking skulls."

My only concern is I think Unhappiness penalties are hard coded, so eliminating some of them would make some ugly GUI occurances (Like, say, you mouse over your infantry and it says "-12% :c5strength: from Empire Unhappiness." , "+12% :c5strength: from Empire unhappiness."

I'll mull it over and see what I can come up with.
 
I believe the NiGHTS mod adjusted the unhappiness penalties didn't it? Maybe you could look there. I really like your idea.

And if you haven't already please feel free to add my compatability for Leugi to the official mod (I've fixed the post above that contains the code). The Seafaring traits in the Leugi compatability are actually placeholders for Despotic. I just hadn't gotten around to changing it at the time of posting.
 
Everything in my mod seems to be working just fine by itself although something is wrong with one of the Civs somewhere that causes Civ 5 to crash that I haven't isolated. But that isn't an issue with my mod or civ 4 traits. So I didn't have any reason not to release it. I've done a bunch of testing with Eirin, one of my favorite if a little overwpoered, civs. She needs inventive to fit her but the second trait could be Charismatic, Creative, Philosphical, or Spirtual and still fit her more or less. I toyed with swapping to spiritual but I didn't like how it ended up working out and I'll think I'll keep her on Charismatic which allows her to expand her population much more.
 
It seems so. Mercantile works fine for me. Although I've been fiddling around with my files substantially so there's a long-shot possibility I've just avoided some error or other.
 
Top Bottom