Double down?

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
One key problem I've found with modding the game is the difficulty of working with low yield numbers - the game can't display 1.5 food on a tile.

Here's a wild thought... what if all yields, costs, everything was doubled, scaling the whole system up to higher numbers that allow more fine-tune control? Is this even feasible... have any modders experimented with something like this?

Most of the scaling process would be simple sql statements, but I'm wondering if anyone knows something vital hardcoded in the C++ that we might not have access to.
 
I believe someone has done this, but I'm not sure who. I nkow it's eben talked about a few places. I personally thought bumping food reqs for pop to 3 would be a good way to add more tweaking, but 4 would do the same thing (and allow even more levels of variation).

The reason I've been rethinking this is because I want my mod to feel as natural as possible when its complete. Civ, AFAIK, has always required 2 food per pop, and IDK if I want to stray from that, even if it would allow balance to be easier. *If possible* I would want to change the current numbers at not change a core assumption of the community.

Obviously this may not be a big concern to you, and it may not have as much of a psychological influence as I might suspect. I do think it would allow for easier balancing and tweaking.
 
Just be careful, there are a few things in the game that can't be doubled.

For instance, the growth equation is 15 + 8x + x^1.5, where x = (size-1). So doubling food production could be compensated for by doubling the 15 and the 8, but you can't double the x^1.5 term. Same goes for Maritimes; you can adjust part of the equation but not the other, so if food outputs were all doubled, Maritimes would be even weaker.

Or less obviously, how about the AIs? If I offer the AI a luxury resource and he is willing to buy it for 300 gold, and then I go and double the gold output of every tile... he'll still offer 300 gold, even though the new value should be 600.

And then there are UI issues. The icons for yield on a tile go 1-4, then use a larger icon for 5+. If you double all yields, then nearly every tile will use one of those larger icons, and it'll be harder to evaluate yields at a glance.
 
@JohnnyW
That's very true, which is why I'm asking to get more perspectives. It wouldn't be unprecedented: warriors went from 2:strength: to 6:c5strength:, allowing more precise adjustment of unit balance throughout the game.

@Spatzimaus
x^1.5 is doubled with a 2 coefficient. Don't forget doubling food production would also involve doubling food cost per population and other factors. The maritime food bonus has a variable that can be doubled from 1 to 2 easily enough. Likewise, the AI trade value is another variable...

That's exactly what I'm looking for though, things that might not be modifiable, most likely regarding the AI. I haven't explored the AI stuff much which is why I'm asking.
 
Sure, and movements went from 1-2 to 2-5, so I'm not saying that it can't be done by the developers if/when they make Civ6. Just that, with the way Civ5 is structured, it won't be transparent to the user if you wanted to do something like this in a mod; the gameplay experience would change, even if only a little. The balance between the things you could mod and the things hard-coded in the engine would be skewed, in some cases significantly.

Besides, the unit power increase is self-contained; the only things unit strengths ever checked against was each other, and the equation used meant that doubling or tripling all units at once would have no impact on the odds. Yields aren't that simple; there are MANY sources for, say, food (city-states, terrain types, feature types, buildings, improvements, resources, etc.), so it's a lot more work than just increasing unit strengths. The two just aren't equivalent.
 
There's indeed many things affected in this regard but I'd be willing to do the work. It'd have tangible benefits in improving gameplay, as it's insanely difficult to balance things in a game where yields are mostly 0-2. The problem is identifying what might require the full SDK and what can be done with current tools, which is what I'm wondering. :)
 
Doubling food production would be compensated for by doubling food cost per population, instead of growth. The maritime food bonus has a variable that can be doubled from 1 to 2 easily enough. Likewise, the AI trade value is another variable...

Nope, sorry. Doubling food cost per population would be necessary, but you'd ALSO need to double the food requirement for growth as well. For instance, let's say (hypothetical numbers) that my city generates 12 food, has 4 citizens (8 food req.), and needs 40 food to grow. 12-8=4, so it takes 10 turns to grow.
If I double the production (to 24) and increase the food consumption to 4 per (-16), then I now have a surplus of 8. If I don't change the 40 required food, I now only take 5 turns to grow. So for this to work, I HAVE to increase the growth requirement to 80 as well.

As for Maritimes, there are two bonuses: the amount given to all cities, and the extra amount given to your capital. There's also a pre-Renaissance/post-Renaissance thing. Before the patch, I think only one of the two bonuses was editable, but looking in the AIDefines file they're both there now, so that complaint goes away.

And I haven't found anywhere to explicitly set the base trade values. The GlobalAIDefines file has plot value multipliers, but I haven't seen anything about trades.

Anyway, bottom line, a LOT of things can be doubled, but anything with an exponent in it can't. So you'll have to go through the XML to see how many of those there are. And there may or may not be a few things purely internal to the engine.
 
Yeah I've thought about doing this a couple of times already. I would actually go all the way and increase everything by a factor 10 or so. Grass would yield 10, pops would consume 10. This would allow a much more fine-grained balancing but, if you use the basic unit of 10 enough times, not be much more difficult to understand or remember. And in cases where you need it for balance, you can use an arbitrary number. In that system, for example, a monument would also add 10 culture while an artist could yield something like 7 or 8.

A problem is with balancing additive vs multiplicative. If growth still depends on an additive number (food surplus), balancing it against some kind of food multiplier becomes more difficult. Say you now have 25-20 = 5 food surplus. If you multiply by 10 you get 50 food surplus, which means you must needs modify the formula for growth, which is perhaps not satisfyingly possible without DLL access because it has too few degrees of freedom. As long as everything stays multiplicative, this isn't a problem (production or culture for example) but it makes a difference for things where you have both incomes and expenses, like gold or food, and things depend on the balance of the two.

Another problem is the human brain. We're just not well able to process more than three significant digits, for some people it's even hard to process two. So 71 is ok but 7281 is difficult. This goes double for doing calculations with it: How much is 15% of 8926 again? So you face a trade-off: Sacrifice display accuracy by rounding to a multiple of some number when displaying, or confuse players.

All in all, I still think it could work. But I agree with Spatzi that there are probably a number of more subtle issues. Citizen AI uses power-laws, to determine which tile to work, for example. Anything that's non-linear will be need to be rebalanced significantly and manually.

Edit: You can actually see some effects of this in PWM where I scaled up the gold economy. Everything needs to be more expensive to compensate for the higher tile yields and sometimes the balance will feel a little off.
 
Hm, so basically it just boils down to it should have been designed around higher yields in the first place. Still, something to put on the todo list for if we ever get the SDK... though with the firings before release and people leaving later, I'm starting to wonder if that will ever happen. :sad:
 
Not releasing the full SDK would be a definite sign to the community that the Civ series is a sinking ship. Hopefully they aren't so desperate....

But I'm impressed about your will to improve the game, guys!
 
I moved my economy from base 1 to base 5. So it can be done. Most things you can find and modify.

Some things are a little more resistant. For instance, the Barb Camp gold is one item that I can't seem to change, even though there is a globaldefine that seems to be exactly what I need.

Things like maritime food, city state gold, and AI diplomatic gold weightings are all found in various places though. Just a matter of finding most of them.

And yeah, it is a lot of work. I think it took me 10-20 hours of work just to move most of the buildings, terrain, improvements, growth, etc over to the base 5.

Feels better though. Smoother and more Empire like at the same time.

I know you have different reasons in mind, but it is doable.
 
I moved my economy from base 1 to base 5. So it can be done. Most things you can find and modify.

Some things are a little more resistant. For instance, the Barb Camp gold is one item that I can't seem to change, even though there is a globaldefine that seems to be exactly what I need.

Things like maritime food, city state gold, and AI diplomatic gold weightings are all found in various places though. Just a matter of finding most of them.

And yeah, it is a lot of work. I think it took me 10-20 hours of work just to move most of the buildings, terrain, improvements, growth, etc over to the base 5.

Feels better though. Smoother and more Empire like at the same time.

I know you have different reasons in mind, but it is doable.

Barb camp gold is in handicap infos
 
You're welcome, took me a while to find it there, too. All hail grep!

Yeah, finding all of those little things is hard, since they're scattered across dozens of files. The one that's killing me, right now, is that I want to add a more advanced Settler unit, but I can't actually find anywhere to set a flag to tell it that this unit can perform the Settle action.

To the original point, what'd really help is if someone could find a way to create new icons to represent 5, 6, 7, 8, and 9 food/gold/production/culture/science, so that you could set the threshold to using the big icon to be 10+. Just adding a longer row of icons isn't really a good long-term solution, I mean something more like the pips on dominoes or dice.
 
Yeah, finding all of those little things is hard, since they're scattered across dozens of files. The one that's killing me, right now, is that I want to add a more advanced Settler unit, but I can't actually find anywhere to set a flag to tell it that this unit can perform the Settle action.

To the original point, what'd really help is if someone could find a way to create new icons to represent 5, 6, 7, 8, and 9 food/gold/production/culture/science, so that you could set the threshold to using the big icon to be 10+. Just adding a longer row of icons isn't really a good long-term solution, I mean something more like the pips on dominoes or dice.

I agree on the numbers. There is a guy looking into it for me. I am giving it long odds, but if I get a solution I will let you know. :)
 
I've heard that people have looked into creating new "small" in-text icons, but some limitation of the current tools prevents doing so. I don't think there's any such limitation on the "large" normal icons however. I don't know which variety yields use.
 
@Spatz: Try the Found element in the Units table. There's also a "FoundAbroad" for Conquistador-style settling (which I hear is broken and allows local settling for now, but will eventually- hopefully- be fixed).

@Thal: It really seems like it'd be both doable and beneficial. As was noted, the difficulty is finding the loose ends. It's pretty straightforward math to show that percentage multipliers will work the same way. The UI issue is the biggest- I hate the idea of seeing a giant food basket, a giant hammer, and a giant gold bar on every tile my cities work even outside a golden age- maybe a half-icon could work here? UI is (ironically, since it was my first job out of school) not my area of expertise. However, it'd be nice- I'm sure I'm not the only one who thinks that road (and thus railroad) maintenance is too high -only- because they couldn't make it a half gold.
 
I've heard that people have looked into creating new "small" in-text icons, but some limitation of the current tools prevents doing so. I don't think there's any such limitation on the "large" normal icons however. I don't know which variety yields use.
Those would be 'fonticons', and ISTR SSeckman saying that he wasn't aware of a way to add more ones, and they wanted to make it better and more extensible (and hoped to do so). The problem isn't in the XML definitions (except in that the XML doesn't define enough); it's that they're all hardcoded to come from a single file, and it's unclear if that file can be replaced in a mod.
 
@Spatz: Try the Found element in the Units table. There's also a "FoundAbroad" for Conquistador-style settling (which I hear is broken and allows local settling for now, but will eventually- hopefully- be fixed).

@Thal: It really seems like it'd be both doable and beneficial. As was noted, the difficulty is finding the loose ends. It's pretty straightforward math to show that percentage multipliers will work the same way. The UI issue is the biggest- I hate the idea of seeing a giant food basket, a giant hammer, and a giant gold bar on every tile my cities work even outside a golden age- maybe a half-icon could work here? UI is (ironically, since it was my first job out of school) not my area of expertise. However, it'd be nice- I'm sure I'm not the only one who thinks that road (and thus railroad) maintenance is too high -only- because they couldn't make it a half gold.

They could have made it a half gold, they did for unit maintenance. They didn't choose to, however.
 
Back
Top Bottom