City State Diplomacy Mod (Updated)

Thanks for the code. I didn't realize you were reusing the existing core function, I imagined you had written something specifically for this. My mistake.:lol:

I agree with you about the island CS being removed from this barbarian problem. It is just not as easy to muster a fleet to the area and land units may not be able to disembark when they arrive. (I have the same problem now with my emissaries and diplomats, there is always a CS unit on the tile that I want to land on and he wont get out of the way.)

The tests, are you talking of the global quests or the specific quests sent to the player?

If it is the specific ones then is it possible to have the CS ask for you to re-institute relations if another civ has become ally with them? Perhaps based on a perceived difference of ideologies or beliefs?

Distance I think could be used but perhaps in an inverse manner to the trade mechanism. CS relations 'should' be more fruitful the closer they are to you, based on the perspective of the CS. "A strong allied empire on my border is good for my city."

On the other hand, the militarily superior civ would perhaps be courted more by these minor civs, regardless of distance. "A weak allied empire on my border can't help me if the stronger aggressor wages war, I will be collateral damage."
 
Thanks for the code. I didn't realize you were reusing the existing core function, I imagined you had written something specifically for this. My mistake.:lol:

I agree with you about the island CS being removed from this barbarian problem. It is just not as easy to muster a fleet to the area and land units may not be able to disembark when they arrive. (I have the same problem now with my emissaries and diplomats, there is always a CS unit on the tile that I want to land on and he wont get out of the way.)

The tests, are you talking of the global quests or the specific quests sent to the player?

If it is the specific ones then is it possible to have the CS ask for you to re-institute relations if another civ has become ally with them? Perhaps based on a perceived difference of ideologies or beliefs?

Distance I think could be used but perhaps in an inverse manner to the trade mechanism. CS relations 'should' be more fruitful the closer they are to you, based on the perspective of the CS. "A strong allied empire on my border is good for my city."

On the other hand, the militarily superior civ would perhaps be courted more by these minor civs, regardless of distance. "A weak allied empire on my border can't help me if the stronger aggressor wages war, I will be collateral damage."

I was talking about tests for barbarian spawns, yeah. The rebellion code works similar to your point on ideology, though, since minors don't have ideology preferences, it is based on the ally's ideological desire. So, if your people want order, all of your 'rebellions' will be labeled 'proletarian.'

I try to use as many existing functions as I can - they're somewhat more stable, and less functions = faster dll.

I'm much happier with the new horde-spawning model. It is much easier for me to balance and scale for maps and speeds. I've included checks for lots of mountains/water that will disable a minor from handing out rebellion tests - accessing those kind of city-states is just not very easy for the AI.

G
 
Hey so some feedback on the horde mechanic. In my game on a 10 Civ map, King difficulity, the barbs have 4 cities according to Enhanced UI (I can only see one.) This seems like a lot.... Also unrelated groups of barbs are suffering penalties from unhappiness in combat.

The overall effect of this was CSs being constantly pillaged, really low pops and development.

On a somewhat related note, is it possible to release/easily allow for a version of the mod that only includes the WC resolutions and new quests?
 
Hey so some feedback on the horde mechanic. In my game on a 10 Civ map, King difficulity, the barbs have 4 cities according to Enhanced UI (I can only see one.) This seems like a lot.... Also unrelated groups of barbs are suffering penalties from unhappiness in combat.

The overall effect of this was CSs being constantly pillaged, really low pops and development.

On a somewhat related note, is it possible to release/easily allow for a version of the mod that only includes the WC resolutions and new quests?

I've been tweaking the barbs a lot. The version I posted earlier is very rough.

Regarding the latter point, I'm not sure what you are asking. You don't want the 'CSD' of CSD? :D

G
 
I've been tweaking the barbs a lot. The version I posted earlier is very rough.

Regarding the latter point, I'm not sure what you are asking. You don't want the 'CSD' of CSD? :D

G

Haha probably should have been more tactful...I REALLY love the WC stuff and I'd like a way to toggle off the Barb Hordes until it's more ironed out. As I'm writing this I realized my best option is probably to use an older version.
 
Haha probably should have been more tactful...I REALLY love the WC stuff and I'd like a way to toggle off the Barb Hordes until it's more ironed out. As I'm writing this I realized my best option is probably to use an older version.

No worries! You can turn them off in the settings for now.

Navigate to CSD(BNW)/DLL/AddDefines.sql. Find these values, and make the zeros into ones:

So,
Code:
INSERT INTO Defines (
Name, Value)
SELECT 'QUEST_DISABLED_HORDE', '[B]0[/B]';

INSERT INTO Defines (
Name, Value)
SELECT 'QUEST_DISABLED_REBELLION', '[B]0[/B]';

will look like...

Code:
INSERT INTO Defines (
Name, Value)
SELECT 'QUEST_DISABLED_HORDE', '[B]1[/B]';

INSERT INTO Defines (
Name, Value)
SELECT 'QUEST_DISABLED_REBELLION', '[B]1[/B]';

Save the file, and the quests won't fire. There are a lot of things you can tweak/turn on and off in that file, as well as the options.sql file. Some of them (like the AI) I'd leave alone, but policies etc. can be disabled. The only core features that can't be removed are the buildings and units, as they're key to a lot of the other data.
Cheers!
G
 
I've been tweaking the barbs a lot. The version I posted earlier is very rough.

You're not kidding with that one. This test game I'm in had poor Ragusa conquered by barbarians very early on.
They were then liberated by China, that took me by surprise I would've thought they would keep it. Just to prove my point they proceeded to attack them with a view to capture.:eek::crazyeye:

I stepped in with gifted units and some strategically placed units of my own and they, China, stopped the campaign. Very soon afterward a barb horde event occurred. I soon quelled that problem.
As Ragusa was still a bit too far from my homelands I wasn't going to settle near them until I could found some strong cities with support. In the meantime 2 barb camps appeared and needed clearing and another horde event was spawned within about 100 turns of the first.

As far as I could tell Ragusa is the whipping boy of the game, perhaps because it was one of a few CSs that was on a large landmass, not an island.

Apart from that, the CS AI is very good at military conflict. I enjoy seeing CS allies take cities from major civs AND keep them. They are also very accomplished at taking care of these barbarian events by themselves.

Having said that, there still is a LOT of tweaking to take place. IMO.
Perhaps an options setting that changes the timing of the events. Maybe from not used to every 'x' turns or 'x' eras. I think the events can at times take over TOO much.


Edit:
Looks like I was ninja'd before I could finish posting.
 
You're not kidding with that one. This test game I'm in had poor Ragusa conquered by barbarians very early on.
They were then liberated by China, that took me by surprise I would've thought they would keep it. Just to prove my point they proceeded to attack them with a view to capture.:eek::crazyeye:

I stepped in with gifted units and some strategically placed units of my own and they, China, stopped the campaign. Very soon afterward a barb horde event occurred. I soon quelled that problem.
As Ragusa was still a bit too far from my homelands I wasn't going to settle near them until I could found some strong cities with support. In the meantime 2 barb camps appeared and needed clearing and another horde event was spawned within about 100 turns of the first.

As far as I could tell Ragusa is the whipping boy of the game, perhaps because it was one of a few CSs that was on a large landmass, not an island.

Apart from that, the CS AI is very good at military conflict. I enjoy seeing CS allies take cities from major civs AND keep them. They are also very accomplished at taking care of these barbarian events by themselves.

Having said that, there still is a LOT of tweaking to take place. IMO.
Perhaps an options setting that changes the timing of the events. Maybe from not used to every 'x' turns or 'x' eras. I think the events can at times take over TOO much.


Edit:
Looks like I was ninja'd before I could finish posting.

Yeah...

It was a proof-of-concept with no balance. Now, the crisis quests fire based on CS wealth, and they are thrown into the global quest pool to be drawn at random (weighted), so it is no longer a 'countdown' like it was. In the games I've run, I see about 3 a game. Enough to make fun, not enough to be awful. I see no rebellions, mainly because the AI has insane happiness all the time.

The last, and final feature of v23 is now ready and will be in the version I'm rolling out now: a new WC resolution called 'Cold War.' It fills out the economic and diplomatic elements of the WC, and is awesome for flavor. Here's the description:

Ideological differences have pushed the world into a cold war, and economic and political factions are forming based on ideology alone. While this resolution is active, players may only make [ICON_INTERNATIONAL_TRADE] Trade Routes with civilizations that follow the same ideology, or with allied City-States. Furthermore, [ICON_INFLUENCE] Influence levels with allied City-States do not decline. [NEWLINE][NEWLINE]Available once any Civilization discovers Atomic Theory.

Works well, and brings some interesting tactical gameplay, as lost CSs are lost trade partners once your current trade route with them ends (or immediately, when the quest fires).
G

Here's the link: City-State Diplomacy Mod v23

Also, I opted not to have CS trade routes cancel immediately after losing a CS ally, as the back-and-forth over CSs can get a bit extreme near the end of the game, and that'd be annoying.
 
Thanks for the instructions. I poked around the files and figured it'd be those values but wanted to be sure. I'll give the new version a shot (with hordes and rebellion) after my current game is through.
 
Thanks for the instructions. I poked around the files and figured it'd be those values but wanted to be sure. I'll give the new version a shot (with hordes and rebellion) after my current game is through.

Sounds great. I just finished up another quick run of debugs and balance. I'll line it all out later (what I've added/changed for v23). We're getting really close to a final version. Probably won't be truly final until next week (heading out of town for the weekend). This will be my last update until next Wednesday, so you all should have time to put it through its paces.

Here's the link: CSD v23 - Latest Version

Cheers,
G
 
Be sure to take out the 'debug files' when you package the final release.

I got a nice 24 Mb Program Debug Database file in my zip.:D :mischief:
 
Sorry, has been a while, but finally found some time to work on the pioneer icon, see the attached screenshot. It's not quite final yet - it's too bright compared to other Civ5 icons and hence looks a bit washed out when scaled down, but I think it's getting there... what do people think?
 

Attachments

  • 2014-05-05_00002.jpg
    2014-05-05_00002.jpg
    50.5 KB · Views: 68
Apologies to the user that actually spotted this first, and was then told there wasn't any issue (by me:eek:), I tried to find the post and missed it.

There is an issue with CEP & CSD at the moment. CEP has NULLed the PolicyBranchType column of the Buildings table, to prepare it for some major reworking, and in so doing has removed the prerequisite of which ideology is needed to build the CSD wonders.

As I had been testing only the early stages of the game, before getting into that stage, I completely missed it. Oops!

I'll get a fix sorted immediately and you can either get the fix from GitHub or check the Communtas page here in the forum.
 
Okay the fix is in. Easier than I thought, just had to look for something 'CSD' specific to use.:D

You can get the updated version from GitHub, although only the source is found there at the moment. Sorry no new 'official' release as yet.

Or, you can get it from a posting I have in the Communitas forum page here.

Unfortunately, until Thalassicus returns from his sabbatical, Steam users are left high and dry. Sorry for that, I have no way of accessing the official Steam page used by Communitas as it is linked solely to only one user, Thalassicus.:cry:

@Gazebo

I am really liking the progress of these new changes, they don't appear to be as severe and rarely do they focus on just one poor CS.
Prague came under attack from a horde and unfortunately I couldn't get there before it was taken over by barbarians. Good news, after liberating it I have a friend for life.:)
As you can surmise I haven't yet tried out the new ideological wonders, or anything in the late-game. Looking forward to it now.

Keep up the good work.:goodjob:
 
Okay the fix is in. Easier than I thought, just had to look for something 'CSD' specific to use.:D

You can get the updated version from GitHub, although only the source is found there at the moment. Sorry no new 'official' release as yet.

Or, you can get it from a posting I have in the Communitas forum page here.

Unfortunately, until Thalassicus returns from his sabbatical, Steam users are left high and dry. Sorry for that, I have no way of accessing the official Steam page used by Communitas as it is linked solely to only one user, Thalassicus.:cry:

@Gazebo

I am really liking the progress of these new changes, they don't appear to be as severe and rarely do they focus on just one poor CS.
Prague came under attack from a horde and unfortunately I couldn't get there before it was taken over by barbarians. Good news, after liberating it I have a friend for life.:)
As you can surmise I haven't yet tried out the new ideological wonders, or anything in the late-game. Looking forward to it now.

Keep up the good work.:goodjob:

Great to hear. I think 2-3 barbarian crises per game is a fair amount- any more than that would be quite the distraction. Rebellions are much more controllable by players, so they have been easier to balance.

Switching the camp-spawning mechanism to focus on wealth and population definitely helps prevent the same quest from firing over and over on a single CS. Plus, excluding hard-to-reach CSs has helped the major civ AI a lot. I'm not sure if the AI is intentionally waiting until a CS falls to barbs to help, or if it is just targeting a now-enemy CS, but the AI tends to liberate CSs very shortly after they are captured. I've seen quite a few defenses as well by the major civ AI, so it knows what it is doing.

I did tweak the Grand Temple to give one vote per 5 followers instead of 4 - a slight, but necessary nerf, as runaway global religions were simply too strong in the WC. Most of the other changes are simply AI-improvement techniques and tweaks, as well as a re-write of the new settler/pioneer/colonist code to make it independent of technology level (this will allow modders to use the CSD code-base to make their own custom settlers, if they want). I may also scale back the number of votes granted by the ideology national wonders. We will see. Thus far, the AI tends to win a diplo victory around 1950 (if one of them can win it), and they do so without having to bribe another civ, which I wanted. I'm going to change the wording of the 'Elect World Leader' to be a bit more...nefarious sounding. Just a bit. Seems too happy as it is now. :)

I'm going to submit the new dll to whoward when I get back. I'll wait until I've heard from you all on the changes, he's had time to update his dll, and I've played a game or two myself, before I release v23. That way, all versions of csd are sync'd up.

Cheers,
G
 
Done with the pioneer icon, I added it to the imgur album here: CiV Graphics
Spoiler Click for Preview :


Also, I updated the icons for the Crystal Palace and Olympic Village - I originally made them sliiightly too large (by 1 px in radius), so they obscure part of the default frame. If you want to fix that with, use the updated version... (not a big issue, I'm probably the only person who's bothered by that! :p )
 
Done with the pioneer icon, I added it to the imgur album here: CiV Graphics
Spoiler Click for Preview :


Also, I updated the icons for the Crystal Palace and Olympic Village - I originally made them sliiightly too large (by 1 px in radius), so they obscure part of the default frame. If you want to fix that with, use the updated version... (not a big issue, I'm probably the only person who's bothered by that! :p )

Excellent, thanks! Also, I'm pretty sure I resized them by 1px when I put them on CSD's custom art palette. I'll check and see – if not, I'll re-do it, as that will annoy me as well! :)

You've made some excellent artwork here – if you are interested in doing any more art in the future, I could use a bit of help on the Roman Forum and Summer Palace. The art I have is not bad (Seek produced the Roman Forum's art back in 2009, and the Summer Palace is mine), but it contrasts a bit with what is in CSD now. No pressure, but if you feel the desire, your art is greatly appreciated.

Cheers,
G
 
Top Bottom