Balancing citystates: ignore/capture/alliance

Alpaca, what reference source did you use to learn this stuff? I don't want to keep pestering you with questions, and I feel I just don't know enough basic information on contexts or the like. I ask my brother for most help with Lua, but he's only familiar with the implementation in half life 2 - gary's mod, so doesn't know anything about the Civ-specific stuff.
 
Alpaca, what reference source did you use to learn this stuff? I don't want to keep pestering you with questions, and I feel I just don't know enough basic information on contexts or the like. I ask my brother for most help with Lua, but he's only familiar with the implementation in half life 2 - gary's mod, so doesn't know anything about the Civ-specific stuff.

Just trial&error mostly. I've been using Lua when modding ETW/NTW so I'm kind of used to the syntax but the context-stuff is civ-specific. I don't think anyone created documentation for it. I'm a quick study and have a good intuition so I can usually wheedle out the stuff I need to know in short time. I honestly don't mind giving tips and answering questions on my terms (such as in forum threads like this one) but I don't react too well to being bombarded with PMs because I feel obligated to answer people if they send me a message. You haven't done that, though, so we're good :lol:

I actually don't think it's a problem to make multiple maritime CS a bit worse for small empires than for large ones in terms of total food gained, but that's just my personal opinion I guess. Cultural and Military CS are already better for small empires so I don't see a problem having maritimes better for large empires. In fact, I think +1 food per city and +2/+3 in the capital is a pretty acceptable power-level.
 
Where it matters for me is if something's exciting... figuring out how turn an idea into an algorithm and implement it is exciting and motivating! Doing searches on dozens of poorly-documented files to try and figure out how Firaxis did things... not so much. :lol:

I think I got the globals working now, thank you for the help. This improved knowledge of contexts also helped me finally figure out how to hook in the top bar to InfoAddict (including a check if it's installed) so it solved two problems with one stone.
 
soooooooo, i cant speak for anyone else but i know the last 10 or so posts confused the hell outta me and im fairly good at math, lol.

Just wondering which mechanic you are now working to implement or maybe its the same as before just using a different method?
 
To put it in a few words: maritime city-states (MCS) would give 1:friend/2:ally food per era, distributed among all cities, with each city's allocation based on its population and status (puppet, capital, etc).

For example, if we have a 10:c5citizen: and 5:c5citizen: city, the first would get twice as much MCS food as the second because it's twice the population. If the 10:c5citizen: city is being razed, food that would normally go there it is distributed among other cities in the empire.

Does this make more sense? :)


Here's another example... say we have:

  • 10:c5food: from MCS
  • 5:c5citizen: capital
  • 10:c5citizen: city :c5trade: connected to the capital
  • 10:c5citizen: city not connected

The food to each would be:

  • 4:c5food: to capital
  • 4:c5food: to connected city
  • 2:c5food: to not-connected city

This is because the capital acts as a city twice its size (200% multiplier), while the non-connected city acts as one half its size (50%).

These would be the multipliers:

000% - :c5razing: Razing
050% - :c5puppet: Puppet
100% - :c5occupied: Occupied
200% - Resistance (avoid starvation)
200% - :c5capital: Capital
050% - Not :c5trade: connected to Capital
050% - Blockaded
00X% - "Avoid Growth" button checked (0% food if less than <80% of the empire is on avoid status)

So in other words, puppets get half as much MCS food, while capitals get twice as much, and cities on 'avoid growth' would generally get no MCS food. If a city gets less food it's sent elsewhere in the empire, and vice versa. The total amount of food to the entire empire would always be a fixed, unchanging number based on era and number of MCS friends/allies.
 
ok, i like that a lot. I like things that take a lot of factors into account. It makes it feel more realistic for a civ building game. Thanks for the clarification!
 
What wasn't clear to me from what you wrote is that a MCS gives a fixed amount of food, broken up as you explain, as per your earlier posts. This is as opposed to a version of vanilla, where the MCS gives as much total food as an allied civ can handle.
 
Right, I do still want to maintain a fixed amount of food from each MCS. I think the fact their bonus is unlimited in vanilla while cultural and militaristic are restricted is the main reason they're difficult to balance.


attachment.php


Me being the visual person I am, this is how I think about it. What's currently in the beta is the blue line, and what I'm working on is the green line. Total food (area under each line) will be the same, just distributed to more cities.
 

Attachments

  • MCS.PNG
    MCS.PNG
    17.3 KB · Views: 235
Right, I do still want to maintain a fixed amount of food from each MCS. I think the fact their bonus is unlimited in vanilla while cultural and militaristic are restricted is the main reason the imbalance exists.

Totally agreed. Your final approach sounds fantastic.
 
Totally agreed. Your final approach sounds fantastic.

Agree as well, looks great and i cant wait to try it out tonight! Also thanks for adding the beta version notes on that first post of the beta testing thread, very very helpful!
 
I dunno, this sounds too complex to me.
What is wrong with just spreading it over all your cities, or your largest X cities?
There is lots of potential for confusion and rounding, and its very hard for the player to figure out what is happening at any given time.

For example, suppose I am in the medieval era, I have:
a) Size 12 capital
b) Cities size 10 and 9 connected to capital
c) City size 4 not connected to capital
d) Puppet size 6, not in resistance
e) Puppet size 8 in resistance.

I have two city state allies and one city state friend.

How much of a food bonus do I get to each of my cities?

The system should be such that it takes me only a few seconds to answer this question. Your mechanic doesn't seem to pass that test.
 
You look at the city and it shows the bonus, that's a few seconds. ;)

Can you calculate combat odds in your head from the strength and health of two units? No reason to avoid complexity if it makes a game fun. :goodjob:
 
Love that change, Thal. When I get a chance, I will try to hunt down whatever is causing the holdup in the function.
 
I got it working, no worries.

PHP:
local civRewards = {food=0, culture=0, spawnrate=-1}
...add to civRewards...
minorCivRewards[majorCivID] = civRewards
return minorCivRewards[majorCivID]

The problem was I didn't realize Lua tables were actually pointers, so things like this were setting the pointers to one another to both get garbage collected. They could have mentioned tables were pointers in the reference manual! :lol:

I added a deepcopy(table) function to my library and all is well.
 
You look at the city and it shows the bonus, that's a few seconds.
You should be able to figure out what the bonuses would be before you commit to spending the gold on purchasing the city state alliance.

Can you calculate combat odds in your head from the strength and health of two units?
I also dislike how little information is given to the player about combat outcomes, particularly given the increase in the randomness from the vanilla-patch.
However, at least you are given this information *before* you commit to the fight.

Being given the impact of the MCS only after you commit the gold isn't really good enough.

No reason to avoid complexity if it makes a game fun.
How is this mechanism more fun than a simpler mechanic, say for example:
a) Give +X food, spread across all your cities. [So for example, if X is 6 and you have 4 cities, then your largest 2 cities get +2 and your other 2 cities get +1.]
b) Give +X food spread over your largest Y cities.

I don't see how all the other complications improve gameplay or fun.
 
I dont really find it all that complicated, its not like the percentages are difficult. They are all double or half. Maybe it takes a bit longer to figure it out but you are still getting the same total food from the CS so you are investing for that number. In addition it makes it more important to connect your big cities to the capital and annex the puppets, etc. Also it gives more incentive to get rid of blockades and to have a bit of a navy.

Its probably just a difference in play style though cause i know for me id rather not bother with micro managing each food that i get from CS but at higher difficulties it might be more necessary, not sure.
 
I dont really find it all that complicated, its not like the percentages are difficult.
Could you please try to describe the result of the scenario I posted in #73 then?
That doesn't seem like a simple calculation to me.

but you are still getting the same total food from the CS so you are investing for that number.
In addition it makes it more important to connect your big cities to the capital and annex the puppets, etc. Also it gives more incentive to get rid of blockades and to have a bit of a navy.

These don't make sense to me. If its the same total food regardless of situation, then how is there any extra incentive to connect cities or annex puppets or remove blockades? If a city is blockaded, you just the bonus to some other city instead. Am I missing something here?

It doesn't add any strategic value that I can see, but it does mean that you have food yields constantly changing any time these parameters chance, which could potentially lead to a need for re-optimizing, which seems frustrating.
 
Back
Top Bottom