City State Diplomacy Mod (Updated)

Hi Gazebo

From BuildingRules.sql it loook like you set requirements for national Wonders to be that you must have the required building in 75 % of your cities if you use CEP. CEP has however (unfortunately) removed that tweak so now it uses the default "100 % of cities requirement". It should probably be removed from the BuildingRules.sql file. Could we just set "VALUES ('USING_CEP', 1);" for now?

Nice release - fantastic that you still keep on updating and improving this gret mod! :)

\Skodkim
 
- All aspects of mod except for buildings, promotions and units re-written in SQL and made optional. You can now run CSD with nothing but the core, compatible elements. This has been a long time coming, but should make compatibility much, much easier.

Sorry, Gazebo, but can you please explain what this means? All the same, I can't wait to give it a go ;-).

Aussie.
 
Hi Gazebo

From BuildingRules.sql it loook like you set requirements for national Wonders to be that you must have the required building in 75 % of your cities if you use CEP. CEP has however (unfortunately) removed that tweak so now it uses the default "100 % of cities requirement". It should probably be removed from the BuildingRules.sql file. Could we just set "VALUES ('USING_CEP', 1);" for now?

Nice release - fantastic that you still keep on updating and improving this gret mod! :)

\Skodkim

Ah, I didn't know that (I don't regularly use CEP right now). I'll edit that out later. You can, as you said, turn off CEP support in the options.sql, so it isn't a critical problem (hooray for SQL). Thanks for catching that. If you see anything else let me know.

Sorry, Gazebo, but can you please explain what this means? All the same, I can't wait to give it a go ;-).

I separated out all the features (policies, traits, ai, text, etc.) and re-did them in SQL so that, using the options.sql file, you can go in and enable/disable features you don't want or that are incompatible with mods you are using. At the bare minimum you'll be able to just use the buildings, units and promotions, all of which are simple XML additions and don't cause compatibility problems. Disabling some things (like the AI, for example) will, of course, make the AI less adept at using the mod, however it will help other modders or players diagnose compatibility woes.

The mod is, by default, set up to function the same as always, so v.12 will look and feel like previous versions (with some small tweaks and changes.
 
Sounds fantastic, Gazebo, & very handy :).

I confess that I've been playing "mod free" recently, but only to get my list of "achievements" up. Once I am done with my current game, I reckon I'll start a new one with several mods in place-most especially this one :).

Aussie.
 
Hi Gazebo

I get the following error messages in database. log when using CSD (no dll) v12:

Spoiler :
[6303.844] columns StrategicViewType, TileType are not unique
[6303.844] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[6315.731] no such table: ContentPackage.LocalizedText
[6318.648] columns StrategicViewType, TileType are not unique
[6318.648] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[6324.779]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6358048 71469024
PageCache: 7 13
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5943504 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 6
------------------------------
[6325.278]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6359224 71469024
PageCache: 7 13
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5944680 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 6
------------------------------
[6343.453] no such column: Type
[6344.389] 1 values for 3 columns
[6344.389] near "s": syntax error
[6344.560] no such column: Type
[6346.042]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6418704 71469024
PageCache: 8 14
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5970552 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 12
------------------------------
[6353.468] no such column: Type
[6353.468] In Query - select * from Natural_Wonder_Placement where Type = ? LIMIT 1


Cleared cache/moduserdata prior to launch and no other mods invoved.

Hope you can this - I'd love to start a game using CSD! :cry:

\Skodkim
 
Hi Gazebo

I get the following error messages in database. log when using CSD (no dll) v12:

Spoiler :
[6303.844] columns StrategicViewType, TileType are not unique
[6303.844] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[6315.731] no such table: ContentPackage.LocalizedText
[6318.648] columns StrategicViewType, TileType are not unique
[6318.648] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[6324.779]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6358048 71469024
PageCache: 7 13
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5943504 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 6
------------------------------
[6325.278]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6359224 71469024
PageCache: 7 13
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5944680 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 6
------------------------------
[6343.453] no such column: Type
[6344.389] 1 values for 3 columns
[6344.389] near "s": syntax error
[6344.560] no such column: Type
[6346.042]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 6418704 71469024
PageCache: 8 14
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 5970552 58811760
Scratch: 0 0

Largest Allocations:
Malloc: 262144
PageCache: 1172
Scratch: 6664

Prepared Statements:
Current: 12
------------------------------
[6353.468] no such column: Type
[6353.468] In Query - select * from Natural_Wonder_Placement where Type = ? LIMIT 1


Cleared cache/moduserdata prior to launch and no other mods invoved.

Hope you can this - I'd love to start a game using CSD! :cry:

\Skodkim

That artdefines shouldn't affect the mod - probably just a consequence of reusing assets from settlers/missionaries/archaeologists for the diplo units. Not sure about the other errors, but the mod was working without a hitch yesterday evening during my playtests (both simulated and not). Are you encountering a crash or gameplay error?
 
That artdefines shouldn't affect the mod - probably just a consequence of reusing assets from settlers/missionaries/archaeologists for the diplo units. Not sure about the other errors, but the mod was working without a hitch yesterday evening during my playtests (both simulated and not). Are you encountering a crash or gameplay error?

Haven't started yet and am hesitant to do so. I was refering to this part:

[6343.453] no such column: Type
[6344.389] 1 values for 3 columns
[6344.389] near "s": syntax error
[6344.560] no such column: Type


\Skodkim
 
Haven't started yet and am hesitant to do so. I was refering to this part:

[6343.453] no such column: Type
[6344.389] 1 values for 3 columns
[6344.389] near "s": syntax error
[6344.560] no such column: Type


\Skodkim

I've not seen those pop up before – let me take a look and I'll get back to you.

Edit: added 'not'
 
Skodkim,
Took a quick look and I'm not seeing any sql errors in the debugdatabase. It may just be an artifact of the sql database generally. These statements are not throwing up a file name, so whatever the problem is isn't specific to any part of CSD. There was one small text typo that I fixed, but that's it. I think you're good to go.
G
 
Skodkim,
Took a quick look and I'm not seeing any sql errors in the debugdatabase. It may just be an artifact of the sql database generally. These statements are not throwing up a file name, so whatever the problem is isn't specific to any part of CSD. There was one small text typo that I fixed, but that's it. I think you're good to go.
G

so you're not getting the messages in database.log?

I'll start a new game in the morning. It's getting late now.

Thanks for checking!

\Skodkim
 
I dont like bugs :badcomp:

And I was faitly uncomfortable with the lwo lines in database.log that says "1 values for 3 columns" and "near "s": syntax error" ao I just spent the last hour disabling CSD folders and in later attempts individual files to locate the problem.

Turns out that:
  • "1 values for 3 columns" is not in the log if Gameplay.sql is removed
  • "near "s": syntax error" is not in the log if GameplayText.sql is removed
That being said I can't see what (if anything) should be wrong with the two files but I guess your coding skills are better than mine :D

Furthermore the "no such column: Type" message disappears if the policies folder is removed but I didn't spend time narrowing this down as I've seen this message before and don't think it's that important.
I've attached the full set of testresults (database.lof saved as txt-files) in case you'd like to see it. I've made a small comment in the bottom of each file saying what's been done.

Hope it helps - or can help you confirm that its not important. Thanks for all the effort with updating this mod :goodjob:

\Skodkim
 
"1 values for 3 columns" is not in the log if Gameplay.sql is removed

Incorrect quoting - 2 missing and 1 misplaced single quotes
Code:
INSERT INTO CitySpecialization_Flavors (
CitySpecializationType, FlavorType, Flavor)
SELECT 'CITYSPECIALIZATION_GENERAL_ECONOMIC[B][COLOR="Magenta"][SIZE="4"]'[/SIZE][/COLOR][/B], [B][COLOR="Red"][SIZE="4"]'[/SIZE][/COLOR][/B]FLAVOR_DIPLOMACY[B][COLOR="Red"][SIZE="4"]'[/SIZE][/COLOR][/B], 10[B][COLOR="Magenta"][SIZE="4"]'[/SIZE][/COLOR][/B]
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

Repeated fifteen times on similar INSERTs
 
Incorrect quoting - 2 missing and 1 misplaced single quotes
Code:
INSERT INTO CitySpecialization_Flavors (
CitySpecializationType, FlavorType, Flavor)
SELECT 'CITYSPECIALIZATION_GENERAL_ECONOMIC[B][COLOR="Magenta"][SIZE="4"]'[/SIZE][/COLOR][/B], [B][COLOR="Red"][SIZE="4"]'[/SIZE][/COLOR][/B]FLAVOR_DIPLOMACY[B][COLOR="Red"][SIZE="4"]'[/SIZE][/COLOR][/B], 10[B][COLOR="Magenta"][SIZE="4"]'[/SIZE][/COLOR][/B]
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

Repeated fifteen times on similar INSERTs

Fantastic Whoward! Do you have any input to the syntax error?

\Skodkim
 
"near "s": syntax error" is not in the log if GameplayText.sql is removed

Two unescaped single quotes - they need to be doubled-up (ie {single-quote}{single-quote})

Code:
UPDATE Language_en_US
SET Text = 'If the unit is inside a City-State[COLOR="red"][B][SIZE="4"]'[/SIZE][/B][/COLOR]s territory that you[COLOR="red"][B][SIZE="4"]'[/SIZE][/B][/COLOR]re not at war with, this order will have the unit conduct a Diplomatic Mission, giving you a large amount of [ICON_INFLUENCE] Influence with the City-State. If you use a Great Merchant in this way, you will also receive a large amount of [ICON_GOLD] Gold. This action will consume the unit.'
WHERE Tag = 'TXT_KEY_MISSION_CONDUCT_TRADE_MISSION_HELP' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_TEXT' AND Value= 1 );
 
Two unescaped single quotes - they need to be doubled-up (ie {single-quote}{single-quote})

Code:
UPDATE Language_en_US
SET Text = 'If the unit is inside a City-State[COLOR="red"][B][SIZE="4"]'[/SIZE][/B][/COLOR]s territory that you[COLOR="red"][B][SIZE="4"]'[/SIZE][/B][/COLOR]re not at war with, this order will have the unit conduct a Diplomatic Mission, giving you a large amount of [ICON_INFLUENCE] Influence with the City-State. If you use a Great Merchant in this way, you will also receive a large amount of [ICON_GOLD] Gold. This action will consume the unit.'
WHERE Tag = 'TXT_KEY_MISSION_CONDUCT_TRADE_MISSION_HELP' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_TEXT' AND Value= 1 );

Great, great, great!! :king:

Will update my local files and try ASAP

\Skodkim
 
Shouldn't it be.
SELECT 'CITYSPECIALIZATION_GENERAL_ECONOMIC', 'FLAVOR_DIPLOMACY', '10'

??

\Skodkim
 
Shouldn't it be.
SELECT 'CITYSPECIALIZATION_GENERAL_ECONOMIC', 'FLAVOR_DIPLOMACY', '10'

??

\Skodkim

10 is a number not a string so it doesn't need quoting (SQLite doesn't happen to care if you do, but it's unnecessary)
 
I've tried updating Gameplay.sql but now I get the following error message:

"[2588.446] near "WHERE": syntax error"
The code now goes (with ' around the numbers - tried without too):

Spoiler :
Code:
-- AI Approach Changes 

UPDATE Defines
SET Value = -40
WHERE Name = 'MINOR_APPROACH_IGNORE_DIPLO_GRAND_STRATEGY' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = -40
WHERE Name = 'MINOR_APPROACH_WAR_DIPLO_GRAND_STRATEGY' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = -10
WHERE Name = 'MINOR_APPROACH_IGNORE_CULTURE_GRAND_STRATEGY' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 20
WHERE Name = 'MINOR_APPROACH_PROTECTIVE_DIPLO_GRAND_STRATEGY_NEIGHBORS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 10
WHERE Name = 'MINOR_APPROACH_FRIENDLY_RESOURCES' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 10
WHERE Name = 'MINOR_APPROACH_PROTECTIVE_RESOURCES' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 20
WHERE Name = 'MINOR_APPROACH_FRIENDLY_FRIENDS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 25
WHERE Name = 'MINOR_APPROACH_PROTECTIVE_FRIENDS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 3
WHERE Name = 'MINOR_APPROACH_FRIENDLY_PROXIMITY_NEIGHBORS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 7
WHERE Name = 'MINOR_APPROACH_PROTECTIVE_PROXIMITY_NEIGHBORS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = -3
WHERE Name = 'MINOR_APPROACH_CONQUEST_PROXIMITY_NEIGHBORS' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = -7
WHERE Name = 'MINOR_APPROACH_PROTECTIVE_PROXIMITY_CLOSE' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = -5
WHERE Name = 'MINOR_APPROACH_IGNORE_PROXIMITY_CLOSE' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 4
WHERE Name = 'MINOR_APPROACH_FRIENDLY_PROXIMITY_FAR' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 8
WHERE Name = 'MINOR_APPROACH_FRIENDLY_PROXIMITY_DISTANT' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 100
WHERE Name = 'MINOR_CIV_PRODUCTION_PERCENT' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 100
WHERE Name = 'MINOR_CIV_GROWTH_PERCENT' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE Defines
SET Value = 100
WHERE Name = 'MINOR_CIV_GOLD_PERCENT' AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

-- City Specializations

INSERT INTO CitySpecialization_Flavors (
CitySpecializationType, FlavorType, Flavor)
SELECT 'CITYSPECIALIZATION_GENERAL_ECONOMIC', 'FLAVOR_DIPLOMACY', '10'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO CitySpecialization_Flavors (
CitySpecializationType, FlavorType, Flavor)
SELECT 'CITYSPECIALIZATION_COMMERCE', 'FLAVOR_DIPLOMACY', '10'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

--City Strategies

INSERT INTO AICityStrategy_Flavors (
AICityStrategyType, FlavorType, Flavor)
SELECT 'AICITYSTRATEGY_LARGE_CITY', 'FLAVOR_DIPLOMACY', '15'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AICityStrategy_Flavors (
AICityStrategyType, FlavorType, Flavor)
SELECT 'AICITYSTRATEGY_CAPITAL_UNDER_THREAT', 'FLAVOR_DIPLOMACY', '-50'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AICityStrategy_Flavors (
AICityStrategyType, FlavorType, Flavor)
SELECT 'AICITYSTRATEGY_CAPITAL_NEED_SETTLER', 'FLAVOR_DIPLOMACY', '-50'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE AICityStrategy_Flavors
SET Flavor = -35
WHERE AICityStrategyType = 'AICITYSTRATEGY_MEDIUM_CITY'
AND WHERE FlavorType = 'FLAVOR_DIPLOMACY'
AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE AICityStrategy_Flavors
SET Flavor = -70
WHERE AICityStrategyType = 'AICITYSTRATEGY_SMALL_CITY'
AND WHERE FlavorType = 'FLAVOR_DIPLOMACY'
AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

-- Economic Strategies

INSERT INTO AIEconomicStrategy_Player_Flavors (
AIEconomicStrategyType, FlavorType, Flavor)
SELECT 'ECONOMICAISTRATEGY_NEED_HAPPINESS', 'FLAVOR_DIPLOMACY', '30'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIEconomicStrategy_Player_Flavors (
AIEconomicStrategyType, FlavorType, Flavor)
SELECT 'ECONOMICAISTRATEGY_EXPAND_TO_OTHER_CONTINENTS', 'FLAVOR_DIPLOMACY', '10'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIEconomicStrategy_Player_Flavors (
AIEconomicStrategyType, FlavorType, Flavor)
SELECT 'ECONOMICAISTRATEGY_EXPAND_LIKE_CRAZY', 'FLAVOR_DIPLOMACY', '5'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE AIEconomicStrategy_Player_Flavors
SET Flavor = 20
WHERE AIEconomicStrategyType = 'ECONOMICAISTRATEGY_GS_CULTURE'
AND WHERE FlavorType = 'FLAVOR_DIPLOMACY'
AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

UPDATE AIEconomicStrategy_Player_Flavors
SET Flavor = -50
WHERE AIEconomicStrategyType = 'ECONOMICAISTRATEGY_GS_CONQUEST'
AND WHERE FlavorType = 'FLAVOR_DIPLOMACY'
AND EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIEconomicStrategy_Player_Flavors (
AIEconomicStrategyType, FlavorType, Flavor)
SELECT 'ECONOMICAISTRATEGY_GS_SPACESHIP', 'FLAVOR_DIPLOMACY', '12'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIEconomicStrategy_Player_Flavors (
AIEconomicStrategyType, FlavorType, Flavor)
SELECT 'ECONOMICAISTRATEGY_GS_SPACESHIP_HOMESTRETCH', 'FLAVOR_DIPLOMACY', '-75'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

-- Military Strategies

INSERT INTO AIMilitaryStrategy_Player_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_EMPIRE_DEFENSE', 'FLAVOR_DIPLOMACY', '-20'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIMilitaryStrategy_Player_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_EMPIRE_DEFENSE_CRITICAL', 'FLAVOR_DIPLOMACY', '-60'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIMilitaryStrategy_Player_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_AT_WAR', 'FLAVOR_DIPLOMACY', '-80'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

-- Military City Flavors

INSERT INTO AIMilitaryStrategy_City_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_EMPIRE_DEFENSE', 'FLAVOR_DIPLOMACY', '-20'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIMilitaryStrategy_City_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_EMPIRE_DEFENSE_CRITICAL', 'FLAVOR_DIPLOMACY', '-60'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

INSERT INTO AIMilitaryStrategy_City_Flavors (
AIMilitaryStrategyType, FlavorType, Flavor)
SELECT 'MILITARYAISTRATEGY_AT_WAR', 'FLAVOR_DIPLOMACY', '-80'
WHERE EXISTS (SELECT * FROM CSD WHERE Type='CSD_AI' AND Value= 1 );

What am I doing wrong here? :confused:

Sorry - a real noob when it comes to sql :sad:

\Skodkim
 
Top Bottom