Community Patch for BNW

Gazebo

Lord of the Community Patch
Supporter
Joined
Sep 26, 2010
Messages
18,399
Location
Little Rock
Community Patch for Brave New World​
I think it is safe to say that Firaxis will not be offering additional updates to Civ 5. This is fine, however there are still some outstanding mechanical issues that imbalance the game, cause problems and/or are simply odd quirks that should be ironed out. As such, I think we should spearhead a community-driven modification that patches these underlying problems. This patch will focus primarily on modifications to the dll, the goal of which is to create a community-wide dll that can be easily integrated into mods for maximum compatibility and increased gameplay options for modders and players.

Note: Civ 5 is a huge game. Making one change can affect the entire platform, so each change must be considered carefully. Before you contribute to this thread, consider what you are asking, and the ramifications of your request.

What does not qualify as a mechanical issue?

- Nerfs and buffs to Civilizations/Units/Buildings/Policies: These issues are important, to be sure, however other mods (such as CEP or Reform and Rule) are already working towards this goal. A simple rule is this: if it can be modified via XML or SQL, it is not a mechanical issue.

- Feature or quality of life requests: Entirely new features or QoL requests (i.e. UI improvements) are not a priority here. If there is a compelling mechanical reason to include a new feature (i.e. it will fix an existing problem), feel free to suggest it, however this is not intended to be an expansion or an extension of gameplay.

-Problems without solutions: If you post a request or a complaint, it is strongly encouraged that you also include a potential solution. Problems that can be solved quickly (because they have a ready-and-viable fix) will take priority over general complaints.

Goals

The Holy Grails
These changes represent long-term goals that will take much time - and energy- to complete!

  1. Pathfinding optimizations and improvement
  2. Unified yields tables and functionality
  3. Unified pre-requisites for all game objects - done (whoward)!
  4. Named universal bonuses for all game objects
  5. DLL efficiency and performance improvements

Part 1- Bugs: This phase will focus on fixing major game-breaking issues, specifically those related to the dll. For example, correcting the behavior of natural wonders, or improving the tactical AI. This is the largest phase, and will contain the majority of the patch's changes.

Current Tasks:​
  1. Settler site selection biases (strategic value, yield value, etc.) (v1)
  2. Starting settlers will move to nearby sites if they are better than the starting site. (v1)
  3. Settlers trained to hunt for strategic choke-points, both for water and impassable terrain. (v1)
  4. Naval invasions and AI military strategy performance (v1)
  5. Variable value goods/trades with AI based on friendship, quantity, proximity and happiness (v1)
  6. AI tactical performance improvements (v1)
  7. AI movement and embarkation logic improved (v1)
  8. Science Overflow Exploit fixed (v1)
  9. Minor Civ war exploits eliminated (v1)
  10. AI better able to target cities for assault (v1)
  11. Flavors and weights for AI military production, size, and behavior optimized (v1)
  12. AI naval quantity and performance improved (v1)
  13. Fix for Krakatoa offshore problem (v1)
  14. AI evaluation of player targets for war and player strength criteria modified (v1)

Part 2- Core Balance: This phase will focus on fixing imbalanced core mechanics, such as faith generated from Desert Folklore, AI competency, and tall v. wide penalties. These are balance changes that will affect all players regardless of choices they make during a game. Changes in this section will modify the DLL in order to enable XML/SQL/LUA modders to create or build their mods around the Community Patch.

Current Tasks:​
  1. Modifiable Great Work yields (v1)
  2. Tall v. Wide enhancements
  3. Additional granularity to AI difficulty (CSD)
  4. Additional promotion functions
  5. Free buildings scale with map-size
  6. Additional variables for building/unit production (NoWater, etc.), as well as beliefs and policies (v1)
  7. Policies allow for any building (instead of just food or culture) (v1)
  8. New traits for free buildings (v1)
  9. Minor Civ starting defensive unit options (v1)
  10. Spies scale with map-size (v1)
  11. Additional spy names (for scaling purposes) (v1)
  12. Fix diacritics for existing spies (v1)
  13. Policy discounts on buildings


Part 3- Customization: This phase will focus on creating LUA hooks within the DLL, as well as an improved LUA API. This will enable modders to add new features to the game without having to modify the dll.

Current Tasks:​
  1. Un-hardcode the tooltip methods added in G&K and BNW
  2. Improved LUA API
  3. Alphabetized Resolutions (LUA addition)

Where we are

The largest and most comprehensive DLL modification available at present is WHoward69's Combined DLL. It makes sense to use this DLL as the base of the community DLL (f he allows it), as it is modular (features can be enabled and disabled at-will) and very stable. Any changes requested for the community DLL should consider what is already included in this DLL.

Conclusions

So, without further adieu, let's get started!

If this is something that interests you, please let me know below. If you would like to help, either with organization, or coding, or brainstorming, please volunteer! The more minds that are involved in this project the better. We've already got a list of changes to be made, so the ball is about to get rolling.

Happy Civving,
Gazebo

Github Link: Github
 
Uhm... So we are going to have three expansion packs being created in the same time + Communitas? ^^
 
I'll shamelessly quote myself from the CSD thread:

Part 1- Bugs:
-lake victoria not being a lake, natural wonder mountains not being mountains,
-possibility to declare war on a minor, steal a worker and declare peace on the same turn (it's not a bug, it's a feature! ;-) ),
-AI ignoring heavily fortified units with stacked defensive boni,
-AI not capable of protecting embarked units with ships,
-(an oversight more than a bug): the plethora of diplomatic options available to AI is not available to a player; 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), overall limited interaction between AI and player,
-denouncement doesn't really do anything aside from making an AI hostile towards you for the rest of his life (or until ideology)*,
-AI not capable of specialising cities (building culture nationals, science nationals and wonders without any focus) - is it possible to weight different buildings on a city-to-city basis?*

Part 2- Core Balance:
-overpowering nature of Desert Folklore and Dance of Aurora which were clearly balanced for very small maps,
-insane effects of combining +% growth effects, the overall balance of fixed yield vs percentage boni,
-snow/ice tiles ignored (design oversight),
-fixed value of luxuries in trade*,
-possibility to sell useless resources which AI will buy only because he doesn't have them*,
-cities with access to rivers / cities with access to lakes / cities without fresh water issue,
-Observatory / Garden issue (very large % boni).

Part 3- Strategic Balance:
-10% growth for first 4 cities paired with % growth and +food for capital and happiness from capital in Tradition makes Liberty suck in comparison, as even when going wide the Tradition boni are much more beneficial (especially the unit free of maintenance when in garnison, plus happiness and growth for capital is always better than a minor boost in production in all cities)*,
-victory condition disparity - CSD tackled this issue and for now it seems that the attempt was successful.

* = not mentioned in CSD thread.
 
Uhm... So we are going to have three expansion packs being created in the same time + Communitas? ^^
I think the idea is complementary to expansion packs. From what I get, it would not introduce expansion-like changes (new mechanics, units, buildings and so on) or tweaks to current values (how good is an observatory, how good is a garden), but rather fix bugs, improve AI and add extra functions that are not enabled by default.

Then the expansion pack mods can build atop that new DLL and turn on/off the parts they want/need.

So, without further adieu, let's get started! I'm not sure that the Civfanatics forum is the best possible means of dealing with this problem, so I'm considering opening up a subreddit on Reddit specific to this project.
In my personal experience, forums work better for mod discussion that reddit which is a bit... disparate and not always conducive to a forth-and-back many good discussions have. Having your own subforum in a place like here works quite well in my experience.

I think a subreddit would supplement the forum though and allow non-Civfanatics members to chime in.
 
I think the idea is complementary to expansion packs. From what I get, it would not introduce expansion-like changes (new mechanics, units, buildings and so on) or tweaks to current values (how good is an observatory, how good is a garden), but rather fix bugs, improve AI and add extra functions that are not enabled by default.

Then the expansion packs can build atop that new DLL and turn on/off the parts they want/need.

Got the same idea, aside from the fact that knowing what might be tackled probably helps in creating tools for tackling said thing. So if we know that there is an issue with too much rewards for settling near a river, a tag to create buildings that require "no access to river" is created, and then some buildings may be added in other, more balance-focused projects.

There are some things that are obviously broken (AI, natural wonders that for some bizzare reason are not what they are supposed to be - like a mountain not being a mountain, radical disparity between strenght of pantheons or riddiculous oversights such as no hook to expand options to settle on snow) - or can only be fixed via dll, so what I get from it that a single monstrous dll will emerge to rule them all ;p
 
so what I get from it that a single monstrous dll will emerge to rule them all ;p

Precisely. The idea here is to more readily enable teams that create balance mods (like CEP) to have access to dll functions via lua, and to fix things that can only be fixed via the dll. Some balance will, of course, come into play (as some balancing occurs at the core level), but as I said, I'm not trying to step on CEP's toes.

These issues are important, to be sure, however other mods (such as CEP or Reform and Rule) are already working towards this goal. A simple rule is this: if it can be modified via XML or SQL, it is not a mechanical issue.

I think one could add LUA to that as well.
G
 
I think you can safely forget about treading on any toes with regard to CEP. I'm holding down the fort at the moment and I'm pretty 'light-on-my-feet'.:D

Any advances towards making CivV a better game should focus on just that, not whether another team is doing the same or similar. CEP will happily fall into line with these DLL changes and simply use SQL/XML/lua to add functionality to other things that don't come under the purview of this mod.

One of the biggest aspects of the game that CEP was/is looking at, and hasn't fully integrated properly yet:cry:, is the lack of consistency in yields and the various ways they are generated, utilized and then displayed.

You should be able to take an existing trait/belief/policy/building/etc. that works with a yield and use it to create another that works with some other yield. This doesn't always happen.
CEP's YieldLibrary is the method used to try and fix some of these problems but as it is still in need of updates, and the other UI files need to be modified to access these new yields, it is an unwieldy solution that often creates new problems of compatibility.
Is this an area that this mod would look at? Perhaps it comes under: Core Balance?
 
This is great news, thanks Gazebo. Especially now that CEP has basically entered a state of near-rigor mortis and seems to be going nowhere, this project comes at the perfect time.

Also second using whoward's dll mod as a starting point, and making the patch compatible with CEP (or maybe even merge CEP into it? I haven't seen Thal in ages, so maybe he'll embrace the idea, he hasn't seemed terribly enthusiastic about developing CEP since last summer).
 
I had a few hours to relax this evening, so I went ahead and knocked out a big chunk of Thanerion's wish list. I'm going to run some tests on it tomorrow, but all-in-all it was easier than I though it would be.

Here are the (very rough) changes, pulled from a textfile I've been logging my work on:

Balance
Dance of the Aurora - +1 to improved bonus and luxury resources on tundra
Desert Folklore - +1 to improved bonus and luxury resources on desert

Added requirement for resource and improvement for terrain-based pantheons (above)

Alternatives to River tiles - added NO water building modifier
More expensive, higher maintenance but same bonus
Water Mill -> Well
Garden -> Bath
Hydro Plant -> Wind Plant (bonus applies to grassland)

Balance Observatory, national college
Observatory - 25% bonus, +1 Science from mountains - mountain within 2 tiles instead of neighboring
National College - 25% bonus, added a specialist
AI

Greater Penalties for attacking CSs early on
BALANCE_MINOR_ANCHOR_ATTACK (-10) - reduce base influence level by 10 for every minor attacked with every minor (psychic minor link activate!)
25% chance of reducing # of minors attacked every time you make friends with a CS for the first time. (raising level above back towards zero)

Jerk Cooldown - 40 turns of blocked peace with minor for team/player that attacks it. LUA tooltip to show cooldown time.

Diplomacy - demands for denunciation, war (TBD)

Fixes
Natural Wonders
XML changes
Logical 'passable' wonders (Solomon, Reef, El Dorado) made passable. Krakatoa locked to a landmass (island, etc.). Victoria a lake (duh).
Mountain yields
XML changes - new mountainyields table
Snow/Ice Yields

Yield Changes:
Spoiler :
<Building_MountainPlotYieldChanges>
<Row>
<BuildingType>BUILDING_FORGE</BuildingType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_MONASTERY</BuildingType>
<YieldType>YIELD_FAITH</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_BROADCAST_TOWER</BuildingType>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_MILITARY_BASE</BuildingType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_IRONWORKS</BuildingType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_ORACLE</BuildingType>
<YieldType>YIELD_FAITH</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_MACHU_PICHU</BuildingType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_CRISTO_REDENTOR</BuildingType>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_OBSERVATORY</BuildingType>
<YieldType>YIELD_SCIENCE</YieldType>
<Yield>1</Yield>
</Row>
</Building_MountainPlotYieldChanges>
<BuildingClasses>
<Row>
<Type>BUILDINGCLASS_WELL</Type>
<DefaultBuilding>BUILDING_WELL</DefaultBuilding>
<Description>TXT_KEY_BUILDING_WELL</Description>
</Row>
<Row>
<Type>BUILDINGCLASS_BATH</Type>
<DefaultBuilding>BUILDING_BATH</DefaultBuilding>
<Description>TXT_KEY_BUILDING_BATH</Description>
</Row>
<Row>
<Type>BUILDINGCLASS_WIND_PLANT</Type>
<DefaultBuilding>BUILDING_WIND_PLANT</DefaultBuilding>
<Description>TXT_KEY_BUILDING_WIND_PLANT</Description>
</Row>
</BuildingClasses>
<Building_TerrainYieldChanges>
<Row>
<BuildingType>BUILDING_LABORATORY</BuildingType>
<TerrainType>TERRAIN_SNOW</TerrainType>
<YieldType>YIELD_SCIENCE</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_KREMLIN</BuildingType>
<TerrainType>TERRAIN_SNOW</TerrainType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_AQUEDUCT</BuildingType>
<TerrainType>TERRAIN_SNOW</TerrainType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>
</Row>
</Building_TerrainYieldChanges>
<Building_FeatureYieldChanges>
<Row>
<BuildingType>BUILDING_LABORATORY</BuildingType>
<FeatureType>FEATURE_ICE</FeatureType>
<YieldType>YIELD_SCIENCE</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_KREMLIN</BuildingType>
<FeatureType>FEATURE_ICE</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_AQUEDUCT</BuildingType>
<FeatureType>FEATURE_ICE</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<BuildingType>BUILDING_HARBOR</BuildingType>
<FeatureType>FEATURE_ICE</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>1</Yield>
</Row>
</Building_FeatureYieldChanges>
<Terrain_Yields>
<Row>
<TerrainType>TERRAIN_SNOW</TerrainType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
</Terrain_Yields>

Combat

AI will prioritize units on defenseless terrain and forts
AI will prioritize units it can kill this round
AI will simply fortify if too dangerous to move (embark usually)
AI will push harder on the attack at the beginning of a war (if it has the numbers)
Turned off patrolling (waste of AI cycles)

Reduced priority on TACTICAL_POSTURE_WITHDRAW - was interfering with other tactical moves b/c of high priority

AI_TACTICAL_MAP_DOMINANCE_PERCENTAGE (15) - lowered, AI more likely to keep at a war (will not 'feint' as often)

Army size and push increased
Increase MUFORMATION size and required size for all attacks

Naval invasions
Increase and added more ships to all naval missions
Sent naval attack/escort along with invasion force
Check for friendly city on continent to launch 'naval' assault from (embark, form up, then attack, rather than attacking directly from sea)

A lot of work, but I think it'll pay off in the long run. Until whoward finishes the latest combined DLL I'm going to have this hooked into CSD's DLL. It will eventually spin off as its own beast outside of CSD.

Thoughts? Praise? Horror?
G
 
Interesting, looks good on paper, though I think it'd be interesting to see what people who are better players than I am think about it... Regarding the passable natural wonders: can people settle on top of a passable wonder?

And another "agreed" on contacting Ninakoru, I think he has also posted the source in that thread, if he's willing to allow incorporation into other people's code, it'd be interesting to see his work being folded into this (together with whoward's mega-DLL).

Something else: number of spies, I've brought it up in CSD before, but I think the non-scaling with map size is a general issue. In any case, there are only ten names and the game reaaallly doesn't like running out of spy names. Hence, adding more names and making sure the game can use them is important for mods and is, I think, within the scope of this.
 
Could you explain a bit about your rationale for adding a yield to Snow?

I can, although it's hard to justify snow yields compared to tundra without a specific building (such as an arctic station granting +1 food for flat snow / +1 production for hill snow for the refrigeration ice, mining, snow-dwelling animals etc. and +1 beaker Petra style (could also improve tundra)) - snow should not be inhabitable - if there are some resources (iron, oil, uranium, sea resources, some cool tundra tiles) nearby, snow should be a completely valid, though not perhaps preferable settling ground. Arctic Stations also should provide a way to forward the cause of science (this makes more sense than adding science to jungle tiles and trading posts - unless we would be able to build trading posts on snow :p). This just seems logical, in line with what we see in the world, and good for the game on top of this (opening additional grounds to settle).
 
Since we're already talking about general balance overhauls and Ninakoru, he had two rounds of minimal balance patches, here and here. There's some interesting discussion in these threads that's worthwhile reading, especially the attempts to do something about ranged dominance are interesting.
 
Note post #16 in this thread

Oh... pity. Still, maybe he did (or would) make his code available. If not, what he did is still a good #todo list. I wish I could help with something myself, but it will take quite a lot of time before I actually learn anything (though I am trying to understand how stuff works). Someday perhaps.

Edit: Just read a post by Lord Tirian further in the thread linked by whoward saying that the code is available somewhere.
 
Top Bottom