Community Patch for BNW

IIRC the lua just reads the key values from the DLL. around the +4 turns two cities gained land, so I'm wondering if the calcs are thrown out by that, and on the +11 turn three cities increased their pop, so that may be another factor.

However, the numbers are much better than the previous un-modded set, so I think that exploit can be closed as "fixed in the player enables the option / uses the micro-mod"
 
So I was wondering since you guys don't want to add new features or such, if you guys are willing to make a sort of a completely optional "vanilla expansion" to go with the patch.

By "vanilla expansion" I mean one that does not add any new game mechanics, but one that uses the patches' power (but not exclusively) to make all around improvements to the game. It isn't really an expansion, more like a large content patch.

The features I was thinking
- Tall/Wide issue fixed by balancing a bunch of core game features (if this doesn't go into the patch itself), possibly the biggest change
- Civilization-specific changes (korea not op anymore, improvements to weaker civs)
- Tweaks to make the military promotion tree make more sense, accompanied with some new units
- The whole well/wind plant/etc suggestion by gazebo
- Ruins are now villages and have more goodies
- Social policies changed and balanced
- More resolutions
- More spy options?
- Make tourism a bit more fun/viable?
- Tweaks and additions all around

The main philosophy of this content patch would be to add generalized changes mostly everyone wants/could do with without adding anything that changes the game considerably, otherwise making it "custom".

I wanna avoid the "this has been done here and here" argument, by the way - I'm talking about a single "master" patch containing changes to all aspects of the game, whereas mods tend to focus on certain issues, and it wouldn't be a good idea to just clump them all together.

If you guys are on board with this we can create another thread for it. I can't code though, so someone else would have to lead the effort, but I can offer help in art and brainstorming.
 
The one thing I have learnt modding Civ 5 is, like everything else in life, you cannot please all of the people all of the time.

... add generalized changes mostly everyone wants/could do with ..."

There is no such thing.

If I'd written my DLL with everything hard-coded on, there would be exactly zero people using it - as not even I play with everything that's in there.

... a single 'master' patch containing changes to all aspects of the game, whereas mods tend to focus on certain issues, and it wouldn't be a good idea to just clump them all together

Why? You will never get consensus. The great thing about the mod system in Civ 5 is that you can pick and choose which mods with which features you want.

The aim of this patch/thread is to provide the foundations (via a modded DLL) for other mods to build on - be that a small "tweak" mod, a revamp of a major aspect of game play (eg City State interactions), a total overhaul of the game mechanics (a la VEM/GEM/CEP) or a complete rewrite of the game as a Total Conversion (eg Ea). And by providing that common foundation to enable those mods to be used together (or on their own) as the player desires.

As such, the patch will contain only the DLL and any XML/SQL files to add required tables for the operation of the DLL and/or to update/add entries into existing tables (eg for hard-coded values being pushed into the Defines table). Additionally, with the exception of minor bug fixes (and there are remarkably few of those I have come across), everything by default will be "off" - it will be up to mods to switch on what they need. And as those mods are selected and enabled by the player there should be no unexpected behaviour caused by the DLL.

Exploits are not bugs, there may be solutions for them within the DLL but they will not be hard-coded as fixed - what if you want to play a few games of the research overflow exploit to see the effects for yourself?

Weak features are not bugs - there will not be "buffs" for them in the DLL. Neither are strong features bugs - similarly there will not be "nerfs" for them in the DLL.

What there will be in the DLL will be the tools to enable modders to efficiently "fix" those features as they see fit. If they need events that fire logically and consistently, and Lua API methods to access game core features, they should be added. Arbitrary decisions (eg, no negative happiness values for buildings) should be removed. New mechanics may be more efficiently implemented in C++ than Lua (although having written the river connection algorithms and a complete custom mission system for my Morindim civilization entirely in Lua, I remain to be convinced), in which case those mechanics can be added and then hooked up to the Lua events/api interface.

The huge advantage to expanding the existing Lua event/api interface rather than hard-coding some aspects into the DLL is that unknown future additions can be written in Lua. Back to the river connection algorithm - it's all in Lua with a couple of new events added into the C++ path-finding code to enable it. Want to write a mod to create city connections between airports? No problem, as the same events can be used for that. Want to create a Star Gate improvement and hook those into the city connection system? No problem, again the same events will suffice.

Think of the DLL as the gas, electric, water, sewerage, cable, etc connections and foundations for others to build upon.

Now, a problem with foundations is that nobody will buy them without show homes - so the patch will probably come with a few of those, in the form of example mods from the small tweaks to the full blown revamp (CSD). Do players have to use them - no.

As an example, my DLL currently has around 75 example mods (excluding the biggies of CSD and CivIV Diplo), but there are tens if not hundreds of thousands of possible mods that could be written using the new features in the DLL - most of which I can't even begin to imagine ... but others can.
 
I think you misread me. I said the content patch would be another element entirely, that would just be "featured" along the patch. Kind like those game CDs that came in with gaming magazines back in the day. To make myself clear: I'm not arguing for this patch to offer new content again. In fact the whole reason I'm proposing this is because you guys said you don't want new content.

Plus I'm not sure if you read this, but we were talking about multiplayer and gazebo asked you if through this community patch, multiplayer modding could be made possible. If it is, then large content patches / community mods like my idea would be NECESSARY, so that everybody has a similar basis to play with each other without always having to check what the other person has and have to match the other's configuration. This kind of content patch would have that in mind.

Also there's no reason why changes in a content patch wouldn't be configurable, maybe it could even have sort of an "options menu" or whatever. I just want something that addresses all problems at once rather than having to search through millions of mods, most of them which have some huge game element change attached to it, to find a fix for what most people seem to agree upon (i.e korea being overpowered, or tradition being much better than liberty).

I also said it would be a community effort, so changes would be make so that most people would agree with a confortable middle ground. Sure, if everybody could code then everybody would make their own perfect mod and no community effort would ever be necessary. But since only a handful of people can do it we would have to make something that people "can live with". You agree that tradition is OP but you disagree with my changes? Then maybe we can come up with something that is a bit more what you want and pleases both of us. That back and forth will ultimately result in something people can live with, and if people are still against it they can just either turn it off or not install the content patch.

PS: For the sake of naming things, "community patch" refers to your patch, while "content patch" refers to my idea.
 
I think the intention here is to do something like BUG for Civ4 to keep it working and running as a solid base. I'd agree with whoward that if there's a demand for a "community"set of fixes/mods, that's not really something that's easy to find.

CEP/GEM has been working on that to some degree or another for years and it is rare that there is wide agreement on a particular change ahead of time, or after the fact.

Weak features are not bugs - there will not be "buffs" for them in the DLL. Neither are strong features bugs - similarly there will not be "nerfs" for them in the DLL.
- this in particular is very wise counsel. If you want a community patch for content, then large community projects for that kind of balance need to be made more modular (like whoward), so that different feature changes can be turned off when desired, which then makes it complicated to do any MP option (which versions do you have turned on), or they need to be very scaled down versions of themselves dealing only with modest "bugs" rather than overall balance and feature new content.

The reason is that there's dozens of ways, and will be dozens more ways, to "fix" a particular problem. One person wants "More stuff" to the weak thing, the other reduces the overpowered thing. More stuff wins, say. When more is added to the weak thing, it upsets other balance points elsewhere in the game, and eventually it becomes a giant mess of whack a mole. Weaken stuff wins and the choices in the game can become boring and feel weak and ineffective (even if they remain relatively balanced). A third option is to change the overall feature entirely, which then upsets people who think that feature was fine just not well balanced.

It might eventually reach a point where people are generally happy with it, but that's the process that some kind of community modification involves.
 
Sorry, I may have missed it when the discussion shifted to a proposed new DLL.

Is the 'so-called science-overflow bug' now fixed?
Could it be as simple as a mathematical error and a possible lua delay in updating that TopPanel? Surely not. Firaxis with a team of crack coders and millions of dollars vs one man and his brain!

Seriously though, if it is indeed fixed you, Whoward69, deserve all the acclaim we can muster.

As much as I would like to think is, I can't help thinking there must be something else going on. Sure the requirements to exploit it may have been missed when it was first written, but after 2 expansions and a handful of patches no-one at Firaxis ever saw this?!

This is just making the wait until I can get back to my machine all the more painful. I want to see this code, before and after the 'fix'.
In the meantime watching from afar the work you ALL are doing will have to suffice.

Sent from my GT-I9305T using Tapatalk
 
Could it be as simple as a mathematical error and a possible lua delay in updating that TopPanel? Surely not. Firaxis with a team of crack coders and millions of dollars vs one man and his brain!

It wouldn't be the first time Whoward has quickly fixed a bug in the source code, nor the first time things that 'couldn't be done' have somehow, miraculously, been accomplished. :D

We fixed the 'AI can't purchase buildings/units' code (for the DLL) in just a few days, and multiple stupid problems in the dll in just minutes (looking at you, WC voting algorithms).

Regarding v1, I'll say that, with the changes I've made to the settler site locations, I've never seen the AI produce more well-placed, strategically-sound cities. Sure, the occasional city is settled in the middle of nowhere (usually by an overly-bold civ like America), but the vast majority are now nestled near chokepoints, on rivers, and on coasts. Plus, the AI is actually building relatively contiguous empires for once. Not perfect, mind you, but exciting stuff.

I think you misread me. I said the content patch would be another element entirely, that would just be "featured" along the patch. Kind like those game CDs that came in with gaming magazines back in the day. To make myself clear: I'm not arguing for this patch to offer new content again. In fact the whole reason I'm proposing this is because you guys said you don't want new content.

Fair enough. I'm not opposed to new content at all, mind you. I intend to release a few things bundled (optional of course) with v1 of the patch, just for fun. I'm just not going to try to go the CEP route. No offense to ExpiredReign (and everyone else working on CEP), but the community effort on stuff like balance can get...a little bogged down.

I think it is far more useful for us to produce an awesome, easy-to-use set of DLL functions for modders to easily be able to add their own buffs and tweaks to the game. If we do 'balance' fixes (a subjective thing, mind you), it'll be once we've pounded out the vast majority of the tasks on pg. 1 of this thread.

I can't code though, so someone else would have to lead the effort, but I can offer help in art and brainstorming.

Your desire for a balanced patch is a great place to start learning. Seriously, I can't stress this enough: dabble, experiment, learn! It isn't as hard as it looks, honestly. Just takes time. You'll learn quite a bit in the process. Plus, my theory with this DLL, and with CSD, has always been lifted straight from Gandhi: "be the change you want to see in Civ 5." I'm pretty sure that's what he said, anyways. :)

Still ironing out some bugs in v1, particularly naval invasion bugs. I see now why Firaxis just...didn't add escorts. Is tricky. I'll keep you all posted.

Cheers,
G
 
but the community effort on stuff like balance can get...a little bogged down.

Think 'bog' as in "La Brea Tar Pits" and you have a fairly good analogy.:)

I'm glad those 'bugs' are finally getting their just rewards.
I've said before and I'll keep on saying it: Well done guys, fantastic job.

Sent from my GT-I9305T using Tapatalk
 
Is the 'so-called science-overflow bug' now fixed?
Could it be as simple as a mathematical error and a possible lua delay in updating that TopPanel? Surely not. Firaxis with a team of crack coders and millions of dollars vs one man and his brain!

I very much doubt Firaxis even looked at it - why would they? It's not stopping sales of a fast approaching end-of-life product. They have moved on to Civ:BE; they have no need to expend resources looking back to a "bug" that is not encountered by the vast majority of their player base.

The fix is in CvTeamTechs::SetResearchProgressTimes100() - search for "MOD_BUGFIX_RESEARCH_OVERFLOW" - but you'll need to follow the spaghetti code back to CvPlayer::doResearch() where they multiply the overflow by the player's research modifier before passing it to SetResearchProgressTimes100() via ChangeResearchProgressTimes100()
 
straight from Gandhi: "be the change you want to see in Civ 5." I'm pretty sure that's what he said, anyways.

And there was me thinking it was "my words are backed by nuclear weapons" :p
 
It's not stopping sales of a fast approaching end-of-life product.

This is perhaps the sagest piece of information posted when it comes to bug-fixing. Thanks.

So... you are moving onto Beyond Earth when exactly? :D

Sent from my GT-I9305T using Tapatalk
 
Alright, I've been sitting on v1 for a bit, so I'll toss what I've got out here for you all to stare at with me. It works, though there may be some bugginess with the naval invasion code I'm still working on.

Here's how to install:

1.) Download the zipped file here (download will appear in a bit).

2.) Make sure you have whoward's combined DLL installed, with all relevant mods you want to use with that.

3.) Drag the 'CustomModOptions.xml' and 'CvGameCore_Expansion2.dll' from the zipped file above into the v51 folder of the 'DLL - Various Mod Components (v 51)' mod. Overwrite where necessary.

4.) Install the Community Patch v1 mod.

5.) If using CSD, delete the CityStateDiploPopup.lua in the ~\MODS\City-State Diplomacy Mod (CSD) for Brave New World (v 23)\Assets\UI\InGame\Popups folder.

6.) Load all of the mods like normal.

7.) Play!

There are settings and variables to tweak in the Community Patch v1 folder- CoreModOptions.xml and CommunityMods.sql at the root of the mod are where to look.

None of the 'Test Files' in the Test Files folder are active - if you want to activate them, you'll need to remove the _ in front of the Test File and Art folders.

I've also included the Source Code, largely so that Whoward can tell me what all I've bungled, but also so that the more intrepid of you can see how far along we are. To recall a previous post, here's what is in v1 (not including all of Whoward's latest changes which we'll need to merge later:

- Whoward's unified prerequisites (built into v51 of his dll)
- Whoward's tactical and military enhancements (rewrite of Smart AI built into v51 of whoward's dll)
- Settler site selection logic vastly improved. True choke-point and strategic location logic created, as well as smart site choices based on relative strength of neighbors and border real estate between two empires. In short, the AI will build tighter empires that are focused on strategic locations and closing gaps between empires.
- Smarter naval invasions and better general invasion/war start logic. The AI will hit harder, with larger armies and navies, and will be more aggressive on the assault if outnumbering their opponents. The AI will also choose to land assaulting troops in friendly territory, if possible, before declaring war or assaulting a coastal city.
- The AI will do a better job of focus-firing high-priority targets, and will view units in forts and defensive terrain as 'hard-points' to be eliminated more quickly. The AI will focus on killing units with lower health if possible, and will be more capable of sustaining a siege.
-The value of all trade goods will vary based on a myriad of factors, including relative happiness of the buyer and seller, personal relationship, comparative military strength, border proximity, and the total quantity of all luxury goods held by a player. For example, if a player has a lot of luxury goods (more than the AI), the AI will value their own goods more. Friends and allies will receive discounts, however the AI will be more shrewd when trading with unfriendly neighbors. Strategic goods will be valued greater if two players are neighbors, or if the other player is stronger than the AI. In short, relationships are not the only factors at stake now.
- Declaring war on a city-state now causes a 30-turn period of forced war with the city-state (you cannot make peace). Your base influence with all city-states is lowered by 10 for every unprovoked war such as this.
- The AI will fortify units that are not on sentry or doing anything else useful (this will save some pathfinding cpu cycles). The AI will also keep airplanes in place unless mustering for war or at war.
- Additional religious, building and player XML tables created for plot-type yields, improvements, or resources. The latter will, for example, allow Dance of the Aurora to require improvements. Plot-type yields will allow buildings to modify mountain etc. yields without resorting to LUA. Examples can be found in the Test Files folder.

Have fun, and report back your luck (or misfortune).
G
 
The functionality of applying yield specific Happiness bonuses would be something we could add and remove with Lua? I can imagine it could be used in the inevitable "Piety imbalances" discussion. I'd personally find it useful, elsewhere, too. I mean, probably.

Also, is there not some way to have a pool of extra spies from which civilisations draw names? For compatibility with custom civs.
 
Also, is there not some way to have a pool of extra spies from which civilisations draw names? For compatibility with custom civs.

The city name code could be hijacked and reworked - first take spy names from civs not in the game (which would almost certainly be enough), then take spy names not currently in use by civs in the game, finally just call them "Spy 1", "Spy 2" etc.
 
For those not on a 50Mb link ... so don't want a 41Mb download ... see post #219
 
The functionality of applying yield specific Happiness bonuses would be something we could add and remove with Lua? I can imagine it could be used in the inevitable "Piety imbalances" discussion. I'd personally find it useful, elsewhere, too. I mean, probably.

Also, is there not some way to have a pool of extra spies from which civilisations draw names? For compatibility with custom civs.

The yield-specific happiness bonuses are editable in sql in the mod (see the HappinessDefines.sql file). I've disabled the bonuses now, but the values can be edited in that file. I'd leave the threshold at zero for now, as the top bar shows odd numbers if you go below the threshold while still at a positive integer (i.e. 4 becomes -4 if the threshold is 5). I just need to edit the lua file, but I wanted to minimize those kind of edits for now.

Also, thanks Whoward for uploading a smaller version of the stuff – high-speed internet has spoiled me of the idea that 50mb is a large download! :)

Regarding the extra pool of spies, I'm not sure what you are asking. The spy names are simply pulled from xml files (like Great People), so you would just need to have each custom civ with their own xml file of spy names. If, however, you are wanting a catch-all set of spy names, I think whoward's answer makes sense.

I'll update my file later today with a much minimized file (in size) and, once I've nipped the escort bug, I'll re-release v1. This is by no means a full release, so the version will stick at 1 until we're happy with what exists in this one.
G
 
The spy names are simply pulled from xml files (like Great People), so you would just need to have each custom civ with their own xml file of spy names.

Which works fine for new civs designed for the patch (or even old ones retro-fitted) but will break all the existing mod civs :(

The "city name like" fall back method will be required.
 
Alright, I fixed the nagging crash, so the game can actually be played now! I've uploaded the v1 to the dropbox. Here's the link.

I separated out the source code for those of you who just want the mod. Here's the source code.

All changes above still the same, though I've added checks for additional choke-point maneuvers (water choke-points), as well as limits on the times when the AI should and should not rebase airplanes (this greatly limits the back-and-forth behavior of airplanes, and boosts endgame turn speeds enormously, at least for me). Escorts are still hit-or-miss; getting the AI's stars aligned for an escort is somewhat tricky. No crashing, just not always being used. I'll keep exploring.

Anyways, have fun, and report back. The few test games I've run have seen much more aggressive and competent AI sieges, infinitely better city placement, better deal logic, and, overall, just a better playing AI. Yay!

Cheers,
G
 
I came over this thread a few days ago, and it's great to see a community patch for Civ5.

However, here's a few notes and questions:
- Why was v2 released before v1?
- Where is the changelog?
- Is this patch developed in an open manner, with a public repository? Where can we look at the individual commits?
- Is the "community patch" a collaborative process (in the code sense, not talking about suggestion here)? If yes, how do we participate in the process? (GitHub?)
- Where is the changelog (again)?
- The install process is somewhat cumbersome. A single, unifying patch would be easier to install (include the v51VMC code in the patch)
 
Back
Top Bottom