1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

City State Diplomacy Mod (Updated)

Discussion in 'Community Patch Project' started by Gazebo, Oct 18, 2010.

  1. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    Ahh! I should've guessed that is what you meant. Thanks for the quick clarification.

    Not that you need any more compliments, but your diplomacy tweaks have made the game a much more intriguing affair. Well done.
    I'm currently in a minor war with the Iroquois and I was about to, at least I thought so, become the next host of the WC and get the extra votes that should see me get my plans passed more easily. Anyway, as I had the most votes by 1, I assumed I would get there. Nope, sorry, Babylon apparently likes them more than me and voted for them instead. Now I have another wait to bolster my vote-base before trying again. This sort of thing would just never happen and the whole affair could easily become boring with just the vanilla diplomacy. CSD has re-invigorated the game for me, and I would assume many, many others.
    You have my vote for the gaming WC!!:D
     
  2. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    Great to hear! You'll laugh, but that change (AI voting for friends in WC if they can't secure the leadership votes independently) has earned more praise than anything else, and it was truly a 5 minute modification to the DLL! I love it.

    I've just about wrapped up v23. As I said, whoward has the dll right now, so once that's settled, I'll release the newest version. I should probably get around to compiling that version change list...later.

    Also, since it is fairly certain that CiV will not receive any additional patches from Firaxis, I'm considering starting up a means of organizing a community patching effort for the dll. Building off of the combined dll of whoward (as it is encompasses almost all dll changes in the community), we'd start compiling a list of outstanding bugs, mechanical imbalances in the game, and odd quirks that can only be fixed via the dll. Once compiled, we would then slowly whittle them down, starting with the biggest problems first. This wouldn't be a 'balance patch' (i.e. we wouldn't step on CEP's toes), it would be designed around fixing AI problems, creating as many optimizations as possible, and addressing flaws in game design. We could even include a list of highly-requested new LUA methods to help expand the game to future, non-dll mods.

    Daunting, yeah, but I think it would be worth the effort. Community patches to Civ IV made huge improvements in the AI's performance, and I think the same could be possible for CiV.

    Thoughts?
    G
     
  3. Argentino

    Argentino Chieftain

    Joined:
    Jan 31, 2014
    Messages:
    38
    Gender:
    Male
    Location:
    Buenos Aires
    Well, you may be a great coder. (Firaxis just got BURNNNNEEEEDDD)
    ---

    DLL "patch" sounds awesome, there's a lot of talent in this forum and I'm sure you can get it working great.

    All of my non-coding friendly support.

    Cheers
     
  4. thanerion

    thanerion Chieftain

    Joined:
    Dec 15, 2013
    Messages:
    64
    .23 looks extremely fine, though we've dumped our previous .23 game in favour of testing the AI modifications and I can already tell you that they will need more early boosts - what I see is that they don't have much to do, so they overbuild military units and wander around aimlessly. The fact that it's completely possible to build Hanging Gardens while no AI has even entered classical era is a bit weird, though we'll see how it works in future eras.

    As for the combined patch idea it's brilliant, there are many bugs and oversights in civ that could certainly use fixes, such as lake victoria not being a lake, natural wonder mountains not being mountains, copper not counting towards mint (with +1 gold) and many more, possibility to declare war on a minor, steal a worker and make peace on the same turn (this option is heavily abused on immortal and diety and usually needs to be - but I guess now that AI's modified it's not a "lesser evil") etc. I don't even count graphic ones corrected by the mods to speed up animations.

    AI doesn't realise that he can attack an entrenched unit with bonuses (fortify, fort, great general, upgrades) with 2 or 3 shooters to whittle it down and assumes that if he deals 4-10 damage per strike it's not worth to attack and simply moves around the fortified unit aimlessly. In addition to this, what has been repeated as a major downside of AI since the game went live - it still isn't able to fight on the water or launch a naval invasion.
    Imbalances like "making a capital in any other place than by the river is almost never worth it in the long run", and if it doesn't even have fresh water to build a garden then you're screwed, observatory which provides insane science boost (should be 5-10% science per mountain in the workable area of the city, not a +50% if you are simply 1 tile from a mountain) or the overpowering nature of Desert Folklore and Dance of Aurora which were clearly balanced for very small maps, insane effects of combining +% growth effects or similar. We also strangely lack industrial/atomic "arctic stations" that would provide Snow with some yields, as well as making mountains workable (if not possible to improve - they could at least grant 2 production, +1 food with some building, maybe some more production to be weaker than mines on hills but still workable).

    Diplomacy is a bit sour due to the fact that AI can talk to you about units near his borders but you can't confront him, you can't talk one AI into denoucing another (while he can talk to you about this) and mods that provide some possibilities usually don't code AI to know what these functions are for and/or change a lot of other things (such as enabling people to trade techs, which can unbalance the game even more).
     
  5. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    Any suggestions for boosts? Also, what difficulty were you playing on (and when did you download v23)? Did you adjust the difficulty value in the options.sql file? Sorry for the barrage of questions!

    Also, your suggestions for the dll are great – any idea how to fix those problems gameplay-wise? Some of them (such as the Garden and Observatory issues) fall more in line with changes already being done by CEP, however others (such as the natural wonders) are what I'm looking for.

    G
     
  6. thanerion

    thanerion Chieftain

    Joined:
    Dec 15, 2013
    Messages:
    64
    Emperor / 2 is the difficulty - newest version of CSD. We'll probably adjust it to 3 and see how this goes, but right now I would certainly provide the AI with some minor tech boost in the beginning - like +% to research or growth (actually, the growth thing is probably more important) - because AI does not have any idea where to build - it just pops on the place it started - which often causes it's capital to be small, lack production and suck in general. And before, it had a whole plethora of buffs to aid it - now it doesn't have anything and we see things like 3 players on Emperor / 2 reaching Classic with 2 cities, Stonehange, Temple of Artemis already built, building Roman Forum, Hanging Gardens and the one that already has Temple and Roman Forum easily finishes Great Lighthouse, a settler from 2nd city, and even manages to snipe Collosus, while the one with Stonehange and Hanging Gardens builds Great Wall. In this time, science guy makes a settler, builds Great Library (which was not possible before) and easily settles two more cities before switching to Oracle. And for 2 games out of 3, not a single AI managed to reach Classic before both wonders from mathematics and Oracle were completed. In the third case, one AI reached classic (Babylon).

    Gameplay wise:
    - stacking boni to strenght - if we can't force AI to calculate that 3 units will outdamage the healing of a fortified unit or at least make AI ignore fortify boni while making ranged attacks, we could decrease boni stacking (and recalculate them with diminishing returns instead of adding boni on top of each other),
    - naval invasion - there is a code to escort settlers with warriors, why is there no code to escort embarked units with ships?
    - "I need to build by the river or I am screwed" - enable Garden to be build anywhere (the belief that gives +2 happiness from Gardens is comparable to +2 from temples this way), but let the bonus scale: +10% basic, +5% if near a river, lake or oasis - garden was too strong anyway. Indonesia may keep their full 25% gardens with no requirements no matter where they are - the civ sucks anyway ;p - this is a major issue not only for gardens, but an overall game design oversight - you won't notice it unless you are playing on hotseat or MP and see the difference it makes in the long run,
    - I also consider observatory to be a design oversight - it should be possible to build one if you are 1, 2 or even 3 tiles from a mountain, but the bonus should be varied with the number of mountains and not as overpowering as it is right now (5% per mountain seems reasonable),
    - building for cities that do not have fresh water that provides access to fresh water would be an alternative,
    - a building that provides boni similar to Hydro Plant but perhaps weaker and availible exclusively for cities with no access to rivers,
    - there was a mod called "Lake Victoria fix" where the guy changes Lake Victoria to be considered a lake - maybe something similar is possible for natural wonder mountains, which are not mountains (and you can't build observatories, Machu Picchu etc. when settled near them) - on the other hand, when I was near mount Sinai and near a regular mountain, Machu Picchu was built on mt. Sinai ;p
    - Dance of the Aurora and Desert Folklore provide boni when the tundra/desert tile in question is not improved,
    - "God tiles" - tiles with unmodified yield of 3+ hammers/food - sheep, deer, stone on grassland / plains, atols, oasis', salts, cows, wheat almost everywhere with the sole exception of no-floodplain desert etc. If it can be upgraded, it shouldn't provide a basic yield of 3. These completely flip the early game - if you don't have them, sucks to be you.
     
  7. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    I think what I'll do for the AI is add an extra citizen to each city when plopped (based on difficulty), and have a diminishing growth mod for the ancient and classical periods.

    I've got some free time today in-between bursts of writing, so I'll tackle these. They're pretty simple changes, actually. The fix for the Aurora/Deserts is literally two lines.

    Tactical AI: I'll increase AI interest in taking down high defense targets, if it wouldn't incur too much damage on the unit attacking.

    Naval AI: They commented out the code for the old settler escort over water, but I'll see if I can enable it for unit invasions.

    For buildings that require fresh water (garden et. al.), I've created a building hook that will allow us to make buildings that are only available if you do not have fresh water. This can let us create alternatives to Gardens. My thought here is that, rather than modifying Gardens to be weaker, let's just make the non-water version the same strength, but increase maintenance and build cost (this will give incentive to fresh water, but it will not make it mandatory).

    Observatory and National College simply need to have their bonii split amongst other science buildings. That's something we can do via sql.

    Natural Wonders shouldn't be too hard to fix - we'll see.

    Dance/Desert pantheons now require a bonus/luxury resource and improvement on the tile in order to qualify for the +1 faith. Easy change, brings them back in line with other resource/improvement-specific pantheons (while still allowing them to be stronger by virtue of the risk of settling in barren lands).

    Yield tiles can be fixed with SQL as well, so that's easy enough.

    I should probably split this discussion off into its own thread. Let's carry this on in a new thread I'll start over in the base modding forum.
    G
     
  8. Sesostris

    Sesostris Chieftain

    Joined:
    Sep 8, 2013
    Messages:
    34
    Hi.

    First off: Great concept, I love it! :D

    Unfortunately, I can't get it to work. :(

    I'm also using the Communitas package, but I've followed the instructions for getting them to work together (delete CSD cityview.lua, changing the CSD policy option in Options.sql), still no go.

    What happens is that when I build the Scrivener's Office (the first diplomatic building I build, it shows up as it should in the city view. But when I advance to the next turn, all buildings are gone from the city view:
    Before

    After

    It's happened exactly like this in every game I've tried. No errors in Lua.log.

    CSD options file

    Other mods in effect:
    • Calypso's Colored Religious Icons (Basic) (v 4)
    • Communitas v3.16 (CEG, CAT, CIN)
    • Communitas Map
    • Diplomacy Values (BNW) (v 4)
    • Ethiopia Color Fix (v 1)
    • InfoAddict (v 22)
    • Ingame Editor (v 39)
    • UI - Great Work Manager (v 10)
    • Unit Adjustments (v 2)
    • Wonder Race (v 4)

    Some of the time I've had Enhanced User Interface in effect too, but it doesn't seem to affect the situation. Any help would be greatly appreciated. CSD sounds awesome, and I really want to try together with CEP.
     
  9. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    You really shouldn't have to do anything to get CSD & CEP to work together.

    Both mods use code to make checks and ensure they play nicely together. Maybe the CEP postings on compatibility need updating, I'll check. You shouldn't have to delete CityView.lua to use both these mods, CEP's version uses the functionality of CSD but adds simple checks to ensure CSD is active in the mod list first before using them.

    The first thing I would look at is the newest version of EUI that has an enhanced CityView with bc1's great new production queue. If there is anything likely to cause a problem like what you have described, I would look there. That isn't to say EUI is problematic, far from it, just that it makes sizeable changes to the file in question, compared to CSD or CEP together.

    I have been using both mods regularly together for some time now and never seen the problem described. I also on occasion use EUI, though not recently.

    Having said that, my recent postings in the Communitas forum show I have some reservations with CEP's ability to keep pace with the changes made by other mods, based on the fact we, Communitas, lack a skilled lua coder at the moment. I'm truly hoping the Community Patch DLL project will remove the need for most of the custom lua functions that make using this mod and CEP and EUI a pain to maintain. If everyone has the same functions to work with, every mod will just work together. (in theory)
     
  10. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    Sorry to hear about the problem.

    Sounds like a cityview.lua conflict due to the scrivener office's Great Diplomat yield. If a cityview file is overwriting CSD's that'll happen, as without that yield the cityview file will stop loading.

    I'd look through your mods for another mod that modifies that file. If I could guess, I'd look at the UI- Great Works Manager. You can get a program like notepad++ to scan all the files in your mods folder for cityview.lua. Let me know what you find.

    Cheers,
    G
     
  11. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,468
    Location:
    Near Portsmouth, UK
    Not that one, it doesn't touch the city view screen, but adds an extra popup when right-clicking the tourism in the top panel
     
  12. Sesostris

    Sesostris Chieftain

    Joined:
    Sep 8, 2013
    Messages:
    34
    Thanks for the feedback. I'll try to to fresh installs of the mods, and then play with only CEP and CSD active to see if that works. I'll report back if I discover that the issue was caused by something other than an error on my part.
     
  13. Sun Ce of Wu

    Sun Ce of Wu Warlord

    Joined:
    Sep 5, 2009
    Messages:
    103
    Gender:
    Male
    Location:
    Italy
    Hi, I love this mod. In my latest play, i noticed that there is a bug in the "Active resolutions" part of the Congress view.
    The only active resolutions is Endowement to the Arts, but I get also the description (but I forgot to check if the effect was really active) of the "complementary resolution" (that for Engeneers, Scientist and Merchants).
    PS: if I'm not wrong, it is partially incompatibile with City State Leader II, since both modify the citystate screen.
    PPS: the screen is half in Italian and half in English since I'm making a modmod to having it in full Italian (when i finish it I can send the files so you could use in the main release, if you want)
     

    Attached Files:

  14. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    In your modmod, did you create different text strings for the two different resolutions? To make the header on those unique (the food/science & production/culture headers), I had to create two new text strings in the dll:

    Code:
    		<Row Tag="TXT_KEY_LEAGUE_OVERVIEW_EFFECT_SUMMARY_POSITIVE_GREAT_PERSON_RATE_SCIENCEY">
    			<Text>Boost to [ICON_FOOD]/[ICON_RESEARCH] for Civilizations with Scores below global average. +{1_GreatPersonRateMod}% generation rate for {2_GreatPersonList}</Text>
    		</Row>
    		<Row Tag="TXT_KEY_LEAGUE_OVERVIEW_EFFECT_SUMMARY_POSITIVE_GREAT_PERSON_RATE_ARTSY">
    			<Text>Boost to [ICON_PRODUCTION]/[ICON_CULTURE] for Civilizations with Scores below global average. +{1_GreatPersonRateMod}% generation rate for {2_GreatPersonList}</Text>
    		</Row>
    If you don't do that, it will show both.
    G
     
  15. Pacalon

    Pacalon Chieftain

    Joined:
    May 18, 2014
    Messages:
    13
    Question on the newest version. I noticed it has a TopPanel.lua now. Wondering on compatibility as far as Enhanced User Interface goes; I know I need to delete the CityView.lua, do I need to remove that TopPanel one as well to prevent any conflicts?
     
  16. Inawordyes

    Inawordyes In a word: Illyria

    Joined:
    Jul 19, 2013
    Messages:
    210
    Location:
    East Coast, US
    Now I'm curious about this as well (having downloaded the new version but not yet having had a chance to play with it and so didn't notice the above yet), because CIV Diplo has a TopPanel.lua that is supposed to be removed to use it with EUI, and it may be incompatible with CSD otherwise when used in conjunction with Whoward's SuperDLL. I guess I'd add to the above and ask whether or not CSD's current TopPanel is compatible with EUI's TopPanel, and/or have you and bc1 been conferring to add the necessary backwards-comparability to EUI?
     
  17. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    Wow, I never noticed that either! Now I'm wondering about CEP.:confused:

    With just a cursory glance through the three options available, EUI, CSD & CEP. All three add different things specific to each mod but none will be compatible with each other. Somehow we will need to combine them into a unified TopPanel or, and I highly doubt this is possible, make the whole TopPanel modular and have each mod provide just the functionality it needs. Based on the extent of the code each has added, this will not be straightforward.
     
  18. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,034
    Gender:
    Male
    Location:
    Little Rock
    CSD's TopPanel.lua adds tooltips for WC resolutions like the Endowment for the Arts. It is not mandatory, so feel free to delete it. It wouldn't be too hard to integrate into EUI or CEP - it is only a couple of lines. I marked the changes I made with 'CSD' - if you are feeling industrious, you can simply integrate that change into your own EUI/CEP lua file.
    G
     
  19. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    As I said, a "cursory glance".

    I will take your word for it being minimal and get to work on adding the changes into the CEP version.

    Thanks.

    Edit:

    "Minimal", compared to the vanilla that is.
    Anyway, it was as easy as you said, and the change literally took less than 10 seconds. I will add the updates to the GitHub repo and make a new version available immediately.
     
  20. Inawordyes

    Inawordyes In a word: Illyria

    Joined:
    Jul 19, 2013
    Messages:
    210
    Location:
    East Coast, US
    As I am not really that proficient in LUA (but I am in copy-paste!) but I would really like to incorporate the tooltips into the EUI TopPanel so that I can use CSD completely and correctly, where exactly would I put the new stuff in the file (I assume it's just the two sections, Science from Allies and Science from Funding from League, since they're the only two marked with 'CSD" like you mentioned above?)? Haha, I don't feel noobish for asking, but I wouldn't have if I wasn't :crazyeye: stumped and couldn't figure out on my own where to place it.
     

Share This Page