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

Community Patch for BNW

Discussion in 'Community Patch Project' started by Gazebo, May 15, 2014.

  1. Lord Tirian

    Lord Tirian Erratic Poster

    Joined:
    Nov 30, 2007
    Messages:
    2,724
    Location:
    Liverpool, UK
    Regarding city combat:
    Spoiler Thoughts on city combat :
    I definitely do. I think cities should be weaker, but perhaps a bit tougher (in terms of hit points) to compensate.

    That would make actual siege units more interesting for quick conquest, but also allows melee units to take cities in more prolonged sieges (since weaker cities means the double hit from the counter-attack and ranged city attack won't just wipe out all melee units). Ranged non-siege units with two tiles range are absurdly powerful against cities at the moment anyway, so shifting city strength to city endurance would help there as well, I believe.

    Giving city defence upgrades better bombard abilities makes them more worthwhile to build, too. I'd start out with cities with range 1, with walls boosting it to range 2 (walls = towers for ranged attacks) and the arsenal unlocking indirect fire, while the castle and military base would mainly boost city strength.

    Forts need a slight buff, too, I feel, at least do something like granting units inside the equivalent of the cover promotion and the ability to not leave the fort while attacking (otherwise you leave the fort when you attack and just get caught out in the field and somebody else takes the fort). Probably by allowing the first attack from the fort tile to not consume a movement point, allowing you to move back. At the moments, forts are a bit useless unless you built literal walls of them or have a lot of good choke points (and then you'd just use a citadel, I guess).


    Regarding tall vs. wide:
    Spoiler Thoughts on expansion :
    I don't think that tall vs. wide is fundamentally broken in Civ5, I think the bigger issue is the speed of expansion. Essentially, settling is something that needs a "cooldown", on some level, I think, settler costs need to increase with every settler built (akin to the increasing faith purchase costs).

    This is, I think, less clunky than having penalties after founding a new city and is kind of in line with other Civ5 concepts (GP costs, SP costs, faith costs etc. increasing for every step) and means you need at least a few high-production cities to continue settling - unlike an army, you can't distribute the settler cost.

    The settler cost increase will eventually make settling almost unfeasible on its own, but allows you to still do it if you're really, really determined. It means Liberty with its settler cost decrease and free settler would suddenly increase in value (which would be a good thing). The cost escalation could then just scale with the number of civilisations or city states or map size.


    Cool, I'll have a look. I'm attempting to do something with the DLL, though, just managed to get it to compile... let's see whether I can eventually wrap my head around it...
     
  2. happyturtle

    happyturtle Mrs GrumpyOldCivver

    Joined:
    Dec 7, 2009
    Messages:
    860
    What I dislike about Tall vs Wide is the National Wonder / pre-requisite building system. Every city needs a barracks, opera house, market, etc, making every city feel interchangeable. Bluh!

    As for city strength, I think population should be part of the factor - not just defensive buildings. The units may have breached the wall, but they still need to go in and actually possess the city, possibly fighting street to street and house to house.
     
  3. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
  4. Lord Tirian

    Lord Tirian Erratic Poster

    Joined:
    Nov 30, 2007
    Messages:
    2,724
    Location:
    Liverpool, UK
    That's already part of the initial city occupation, though, isn't it? And I think population should be reflected in the hit points a city has, but not necessarily in its combat strength.
    Hmmm, I think the "free movement" has an advantage over that though: you can still move back, then it's the same as the "No Followup From Cities", functionally, but you can also stay out (if there's a reason) or use your movement to move another tile. Perhaps even just make it a general "units starting in a fort move to an adjacent tile for free".

    It gives forts/citadels a bit of projection capability, which would be nice and make them more useful in general - it means stationing your units in them is good, because you can then move out more quickly.
     
  5. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
    Unfortunately free movement is just that, a free movement point. So the unit could attack from the fort, kill the unit, follow-up into that tile and then move into any one of the adjacent 6 tiles (and not just the one with the fort). Worse still, if the dead unit was on a road or a railway, then that one free movement point could take them a very long way.

    The only other realistic option is to pop-up a dialog "remain in fort/citadel/city or follow up" but that becomes very tedious.

    In practice it works well as is, what's more, the AI can take full advantage of it for no extra logic.
     
  6. Wodhann

    Wodhann South American Norse God

    Joined:
    Feb 27, 2014
    Messages:
    1,507
    Why do you guys think it's necessary to nerf the city defense system, though? Do you think it's too hard to conquer cities as of now? If that's the case I sort of disagree. I like that cities are hard to take. Maybe defense should be nerfed to wide empires only, and as you said, had something to do with corruption.

    But the whole "settlement/colony" idea is an interesting one. Recently settled cities start with no territory around it and very little defense, and you have to construct a certain building (the "City Hall" or something) in order for it to become an actual city with territory.
     
  7. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,047
    Gender:
    Male
    Location:
    Little Rock
    It wouldn't necessarily be a nerf, mind you – I'm less concerned with the end result as I am the process of getting there – I'd like to see defense bonuses come from discrete choices, and to see those choices compromised if a player's empire is unhappy. That latter element is the part I'm most interested in, as it would give the high culture/tourism 'Tall' player a means of combating the 'Wide' player if they are of different ideologies. All that unhappiness could weaken the defenses of the Wide player's cities.

    Agreed – I'll look at the (rather arcane) code.

    I think health, sure, but 'strength?' Seems somewhat arbitrary to me.

    Fair enough - if you all have a better means of dealing with National Wonders (a problem I also see), let me know. I've thought, perhaps, that National wonders should be build-able by GPs (as they were in Civ IV), but that'd entail a fair bit of code.


    In any case, it seems like there is enough interest here to at least implement a few of these changes as modular elements of the patch.

    Awesome! If you need any pointers you know where to ask.

    G
     
  8. Wodhann

    Wodhann South American Norse God

    Joined:
    Feb 27, 2014
    Messages:
    1,507
    The National Wonder system does "punish" aggressive settling though.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
    I don't. But some people do/will. So the DLL should provide the mechanisms to implement such changes (possibly via XML, but more likely via Lua). It will then be up to other modders as to what those "nerfs" are and up to the player to decide if they want to use those mods.
     
  10. mystikx21

    mystikx21 Deity

    Joined:
    Feb 18, 2006
    Messages:
    3,229
    Location:
    ohio
    Gazebo, changes to city defence has been in CEP for a long time. All it really took was modifying the base formula so cities are lower defensively without investing in defences and making city defences add more hit points (much more in most cases). It's a simple xml edit now that hit points are part of the base game for buildings. It works pretty well there and can be re-balanced for changes in unit strengths using a spreadsheet in seconds.

    This is the sort of rebuilding the wheel stuff that I'd advise against spending a lot of time trying to fix and argue over. :) Ditto wide-tall arguments (endless and recurrent as they are). Borrowing stuff from what has already been done would cut down on the amount of work and discussion involved if it needs to make its way into the main mod here.

    What isn't in CEP is something like range bonuses for city bombardment from city defence buildings (or the palace?). That's a modular function that would be of use to modders elsewhere if it could be made into a simple data edit.
     
  11. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,047
    Gender:
    Male
    Location:
    Little Rock
    I'm aware of CEP's changes- I wouldn't modify the dll to achieve that. I also don't think that CEP has the monopoly on good ideas. I love CEP, but CEP, and civ, are only as good as the dll they are built on. If we can bring new functionality into the equation (such as your idea, which is sound), why not? Seems like a win-win.

    My 'I would do it this way' was a statement of preference as to the end gameplay goal, not my dll methodology. I do, however, intend to add additional functions to modify the values of cities in a more granular fashion, specifically for happiness.

    The discussions here are great, and are intended to guide our efforts in expanding the dll's possible functions (I feel like I've said that a dozen times now). :) I don't want to stifle discussion, as this is intended to be a creative project.
    G
     
  12. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    I'm more than happy to spend time on this project, not sure how much I can actually do, but what the heck!

    @Gazebo
    Are you working from a repo of source like the one maintained by whoward69 & Gedemon?
    If so, where? If not, why not?

    On a somewhat related topic. I mentioned here the need to have yields be in some sort of unified place to make hacky lua code redundant. Well, following my posting in the CSD thread for an update on the CSD UI code I found a perfect example of this. Those tooltip functions in TopPanel.lua that you added, and I copy/pasted into CEP, bugged out the game in CEP in such a weird way I had a time tracing it. The logs were telling me to look in files that neither CSD or CEP actually made any changes to, hence my asking for a list of recent changes, and that database values weren't there when in fact they were!
    The problem, the YieldLibrary code devised by Thalassicus didn't have any reference to those functions and I needed to add them in.

    All this has both heightened my desire to see this DLL go somewhere and freaked the hell out of me as to my lack of coding skill. 'Rusty' just isn't an adequate enough description. Still, I have plenty of time on my hands so I can slog through it.
     
  13. mystikx21

    mystikx21 Deity

    Joined:
    Feb 18, 2006
    Messages:
    3,229
    Location:
    ohio
    - I would not be suggesting it does. There's a lot of stuff I'd be prepared to dump that hasn't been as thoroughly thought out and discussed along the way to arrive at different balances or use good ideas from elsewhere if they seem to work better. The point was more that if CEP has edited something rather basic, chances are good that that is a function that's already available easily to modders for data edits.

    More radical changes, including some done by CEP, are not (as expired is demonstrating by wading through the lua functions). I'd bet that there are many mods out there that use more significant adjustments that could use a simpler way to get there.
     
  14. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    Until advised otherwise, I have grabbed a copy of the Combined DLL source and will look through it for things to stuff up fix.
    I'm assuming we are only looking through code that pertains to the 2nd expansion and the original code that isn't changed, leaving any 1st expansion code alone as it more than likely is changed in the 2nd?
     
  15. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
    Three DLLs (vanilla, G&K, BNW) three code bases (CvGameCoreDLL, CvGameCoreDLL_Expansion1, CvGameCoreDLL_Expansion2 respectively) - why Firaxis did it like this I do not know!

    There are some shared headers in CvGameCoreDLLUtil\include - primarily of interest are CvEnums.h and CvDLLUtilDefines.h

    How to compile the DLL is here, note that you will need to install VS-2008 for the tool set, but you can then use VS-2010 or VS-2012 for a nicer development environment.

    DLL Tutorials are linked in my sig
     
  16. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    So let me get this straight, if I want to change function A to do X I would need to change the three DLLs? Assuming of course that this is gamewide function, not something specific to BNW code.

    Thanks for the link to the 'How to' page. I already had it bookmarked. Don't know why, I must have been feeling adventurous some time ago.

    Would you say there is much need to get the latest Visual Studio? I already have the 2010 version.
     
  17. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
    This thread is concerned only with BNW ("Community Patch for BNW") - ie the CvGameCoreDLL_Expansion2 DLL/code, but yes, if you wanted to make agnostic changes you would need to mod all three code bases and distribute the three different versions of the DLL. I choose not to do this with my modded DLL (porting from G&K to BNW when it was released) as it was just too much work (even for shared methods the code can be different enough to make it a right PITA)

    I use VS-2010, partly because that's what ModBuddy installed many, many years ago, but mainly because I'm too lazy to risk upgrading to VS-2012
     
  18. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    I'm with you on that!
     
  19. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,498
    Location:
    Near Portsmouth, UK
    I've split the "Holy Grail 3: Unified Prereqs" off into its own thread
     
  20. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,047
    Gender:
    Male
    Location:
    Little Rock
    Absolutely! And we shall do our best to bring them such simplicity! I did not mean for my post to sound - well - mean; I appreciate your concerns, as I would hate to tread upon work that could be completed more easily via SQL/XML.

    Don't fret! It becomes more and more clear once you start looking through it. Use Whoward's tutorials, as they're wonderful. Also, I'd recommend browsing through CvPlayer.cpp and CvPlayer.h, particularly the DoTurn() function. That function shows you the basic structure of a turn, thus the means by which almost all other files, and functions, are called upon. And don't worry about trying to patch the game for every expansion, as the combined dll is oriented towards BNW (and it'll hard enough as-is to get that working as we want).
    G
     

Share This Page