ModMod Theoretical Discussion: Governments

I agree with pretty much everything in the last four or so posts.

Will keep this in mind - I'll start off small then. ;)

I think the new yield has to be brought in sooner rather than later, though.
 
The potential withheld within this topic is immense. I would like to know a couple of things for my own mods as well:

In the OP, it is mentioned by Sneaks that it is possible to add a new tag to the Buildings.xml topic. How is this possible (Without overriting the original)? Also, the new Governence yield. Thal, would this hypothetically be possible to create a tile yield from? I ask because I'm potentially interested in using it to create culture as an actual yield instead of an addon.
 
\CiVUP - Civ V Unofficial Patch\Yield Library

With CiVUP it's easy to add a new ":c5citystate: Governance" yield produced by building, policies, traits, specialists, and so on. Everything you need is in the yield library I created. However, I think the code to display yields on the map terrain is in the game core. It's possible to store the information "tile A has N governance yield"... but I don't think it could be displayed.


Creating a new building tag is very simple with CiVUP.

  1. Create the tag.
  2. Create code to read the tag.
  3. Create a tooltip. (optional)

For example, the Museum has a :c5culture: culture per :c5citizen: population tag:
Spoiler :

1. Tag created in CiVUP - General.sql:
Code:
ALTER TABLE Buildings ADD CulturePerPop integer default 0
2. Tag scanned in YieldLibrary.lua:
PHP:
function M_GetBaseYieldFromPopulation(city, yieldType)
    local yield = 0
    if yieldType == YieldTypes.YIELD_CULTURE then
        for building in GameInfo.Buildings("CulturePerPop != 0") do
            if city:IsHasBuilding(building.ID) then
                yield = yield + building.CulturePerPop * city:GetPopulation() / 100
            end
        end
    else
        yield = city:GetPopulation() * city:GetYieldPerPopTimes100(yieldType) / 100
    end
    return yield
end
3. Tooltip added:
AT - BuildingStats.xml
Code:
<BuildingTags>
    <Row><Type>CulturePerPop</Type> <Value>data_BuildingTags.CulturePerPop / 100</Value></Row>
</BuildingTags>
AT - Tips - Language_en_US.xml (and other language files)
Code:
<Language_en_US>
    <Row Tag="TXT_KEY_PRODUCTION_BUILDING_CULTURE_PER_POP">
        <Text>[ICON_CULTURE] Culture per [ICON_CITIZEN] Citizen: {1_num}</Text>
    </Row>
</Language_en_US>
(Note: this simple system to add tags is part of the AutoTips I created, and CiVUP in general, so it requires the unofficial patch.)


If you need anything added to CiVUP for this project, just modify the files and send me the information (keep track of which files you change). For example, Sneaks recently added some code to CiVUP's city view to support his Empires Enhanced Mod.
 
Alright, noted.

I'm gonna start work on this once I've done some work for Uni that I should really get started on ;)

Keep adding ideas though guys, I'm looking forward to this!

EDIT: Well, just taking a look through the code: Wow, Firaxis sure did copy a lot of it from Civ IV.

One thing I'm having trouble with is seeing how to alter or create new 'windows', eg. the Policies window. I may need some guidance in the right direction here.
 
If you're looking for ideas:

The D.U.C.K.S. mod from a while back had a similar sort of thing, Piety instead of governance though. Also, I would reccomend looking at NiGHTS and Procylon's Call to Power mod. NiGHTS features a Governments screen that works through free buildings, and PCTP features multiple social policy trees
 
Will do. It may help me with the modding side of things as well.

Also, just as a disclaimer: I'm not going to be focussing on balance for the first few implementations, just functionality!
 
I'm confused here. Having "three types" for each system of government would be far, far worse for the UI. Think of it in terms of the policy tree: What you're suggesting is that each individual policy is a whole section in itself, instead of being part of a bigger "whole".

No, I don't. You had 8 x 3 types. I said, better to just make it 24 types per se.

But that's what made these features so great - they WEREN'T together. They were istinctly seperate things. You could worry about Religion while ignoring Espionage and vice versa. I think that making them all work in the same way is effectively just doing exactly what Civ 5 did with policies: Restrict choice by the player.

No they weren't. Religion made you a lot of money, it gave culture and happiness and it had an effect with Diplomacy, be it how much other leaders liked you or as a multilateral forum via the Apostolic Palace. Espionage was more separate but it was always a decision how much you want to invest, you couldn't do it in both. Corporations at last were meshed with Ressources and very alike to the present city state-system.

One thing I'm having trouble with is seeing how to alter or create new 'windows', eg. the Policies window. I may need some guidance in the right direction here.

Is that even possible having a new window? It certainly would be nicer than having the Buildings as a stand in for the governments. But is it worth the coding time?

------------

to the general topic.

So what would the new Governance yield do? Just for changing governments a la you can chose a new one when the bucket is full? Sounds unfun and inflexible...

I'd like to elaborate on the Stability system here. You start at +10 stability and every action you do gives you a permanent minus or bonus. Theocracy f.e. gives you +1 stability/governance per Temple. Trade Routes give you one and Open Borders, Constructing Wonders, certain Buildings (City Hall, Police Station, Court Houses) and so on. Founding Cities lowers the counter, as does losing wars and acquiring new tiles, annexing and puppeting cities and so on. The idea is that expansion makes your empire bigger but you do need a certain infrastructure to control the new Citizens. So it's a continuous struggle for balance. As stated above, Happiness could be the controlling factor for population where excess results in Golden Ages, while Stability is the controlling factor for wide empires and result in revolutions (on the lower end) and also Golden Ages on the higer end.

Now where do Governments come in? They allow you to generate the necessary stability via your playstyle. For Example Monarchy gives you stability per garrison thus helping wide empires (per city effect) but also having synerchy with Honor and Tradition. Imperialism/Colonialism gives you stability per ressource controlled so go on gather those ressources. They would have other effects as well. In the Antiquity, for example this could be [government wonders in "x"]:

Monarchy "Royal Palace"
For empires with problems in happiness and stability. Allows you to expand peacefully or militarily early on. [+1 happiness and stability per garrison, the "Royal Palace" gets additional x stability, gold and experience for units].

Republic "Senate"
For empires with no problems in stability. Rather gives up stability bonuses for enhanced yields [+15% science and +15% gold empire wide, -1 stability per city]

Tribal Council "Field of Mars" (got a better idea?)
à la the Mongols, Huns, Aztecs or any other militaristic society. Gives stability bonuses for pillaging or razing. [+1 stability per 0.5 conquered population, +25% while building units or enhanced barracks]

In the Middle Ages, Theocracy [good for stability and yield x, needs infrastructure], Feudalism [for undeveloped big empires, enhances farms and pastures and so on], Trade Federation/City States Federation à la Venice, Genoa, Hansa, the Dutch, etc. [stability and gold for luxury ressources, worse military]. The Early Modern Age gives you Colonialism/Imperialism [better settlers, overseas colonization and strategic ressources give stability; meant are empires with a Monarch that go all over the world like Portugal, Spain, England, Russia], Bureaucracy [Empires "at home" like the HRE, the Ottomans, Austria-Hungary etc. ; enhanced capital, needs infrastructure for stability] and Liberal Democracy [enhances Growth, Science and Gold, bad in stability]. The Modern Age fills up with Social Democracy [latest government, NOT better than Lib Democracy but gears you to a Culture victory instead of a Science victory with better culture, still bad at stability], Communism [stability for wide empires and good for building up infrastructure and buildings, so that new cities can become viable also in the modern era] and Fascism [Needed for Conquest victory].

So each era should offer you a choice between playing styles or victory conditions.. Huh, got a bit carried away here, sorry. ;)

Last but not least, I'd advocate for the governments being adopted by building National Wonders costing 1 or so few hammers that you can build them in one turn. Government adoption needs to be fast so that you can react. Building them should result in a drop of stability for a few turns if that is possible. Thus peaceful and revolutionary Changes are possible, it just depends on your starting level. An example: There are 6 levels of stability: Very stable, stable, balanced, unstable, very unstable, collapsing. Unstable and below have certain maluses like lower science [lower production and gold is bad as you need those to get out of those levels]. So if you change from Fascism to Liberal Democracy, you drop to unstable and you need to wait 3 turns before the effects of Lib Dem kick in and bring you back up to Balanced.
 
Is that even possible having a new window? It certainly would be nicer than having the Buildings as a stand in for the governments. But is it worth the coding time?
It is possible, quite a few mods have done it, but my goodness, I'm having difficulty working in the Civ5 code. I honestly feel it's a step back from the modular modding of Civ IV: BtS.

Aside, I really like your ideas, actually.

Again, it comes down to how well I can get my head around the coding, but, I'd love to implement a lot of what you said, especially regarding stability. I feel that "governance" is more just a means to an end, that is, having some way of switching governments with a cost involved, but "stability" is the main reason /for/ having to switch governments in the first place, apart from the different bonuses, if that makes sense.

EDIT: Man, I can add buildings, wonders, and attributes to this modmod, but I'm having trouble adding the yield and making it work. Difficult times ahead.
 
I guess Thal can help with the yield, he did it once with culture, not? That asides, I'm just pouring out ideas so that I don't have to write on my paper ;)

The central question still is what governance should do for an effect. It could later on f.e. be connected to espionage, if that is wanted, complete with a new building line: Court House - City Hal - Policy Station - Information Agency. But it doesn't have to, if it is geared towards playstyles, it is sufficiently self-sufficient. Still, it is then a fine line to walk between allowing Flexibility in chosing the governments and making the choices viable, so not predetermined.
 
Haha, I think Thal has better things to do ;) I'll do my best to learn it myself! I managed to do so in Civ4 anyway. But hey. Help would always be appreciated!

And, I think for now at least, espionage is a distant feature.

I think that at the moment, Governance's only effect is to have some kind of value in 'buying' governments, if that makes sense. I don't think having production used to create governments makes a huge deal of sense.

EDIT: Also, as far as I know, the system of stability you suggested - sort of a 'second' happiness - is impossible at this point to implement, unfortunately.
 
But if you accumulate Governance so that you can chose a Government, where's the difference towards the Social Policy System? Just that you can change if you have enough Governance accumulated? The best way then to play would be to time it so exactly that you have enough gov the turn you need it and then stop producing it when you don't need it anymore. There'd be no use in having it on its own. You can make it add to the GA counter.

The real sense of governments would be that you can change it quickly to adapt to your needs of the moment. That's why I set the "costs" of the building to 1 Hammer. They don't cost anything that way. You can also give it a "buy %" so that you can buy it for 1 gold.

the governments should be flexible and offer interesting playstyle options. In my above examples, Monarchy is good for expansion, peacefully and through war, while Tribal Council help you conquer stuff. Republic gives you more gold and science, but makes you vulnerable, Theocracy enhances Production and happines. Feudalism helps Civs with a lot of land but few buildings, Trade City State Federations helps Civs with a lot of buildings, but few land.

Governance as a yield to buy these governments just makes the whole thing inflexible... Better something unrealistic (hammers building governments) but it helps the gameplay...
 
Ah, I think you've misunderstood me.

It's used for purchasing, yes, but not in the same way as culture.

Having a larger amount of governance gives positive effects to your Civ, depending on which style of government you have. For example, if you are a Monarchy, then the more governance you have, the better the effects for expansion are. This goes up to a certain point over time, at which point, yes, Governance becomes as good as it will ever get, and then caps.

Governance can, however, also go down due to certain factors, eg. unhappiness, debt, etc., which means that you need to continue to have an income of governance, lest you lose the positive effects. (And maybe go into negative effects?) This is the big thing that I'm not sure if it's possible to do, but, I suspect it would be.

It then 'costs' governance to switch governments, which means you go back to zero: And all the positive effects are gone, until you build up enough governance to get them back.

I hope that clears that up!
 
So it works a bit like the Arabian UA? The more "luxuries"/"Governance" you get, the better results you have. And if you switch, you use up some of it. That sounds intriguing and a very good way to solve it. The problems I see:

1) Balancing the effects: You cannot do absolute bonusses and the range of the other bonuses are difficult to balance (minimum and maximum).
2) Minus-Governance would be needed, yes!
3) I would also disadvise direct benefits like + 25 % culture as these screw up the balance of the other systems. Better having + % unit building than + % production.

Again, the most important thing is flexibility and playstyle/victory condition-adaptibility, as these two are what is missing from the Social Policy system. For example a government that helps you get City States can be good if you don't have the culture to go for Patronage. Or a government allowing for some Science a la Rationalism when you've gone Piety, resulting in a say Pacifistic Theocracy!
 
Sounds good to me, glad we're on the same page now!

Well, I'll explore the code a bit more in the days to come while I'm in between doing Uni work, and then I'll get to implementing the features.
 
Do we want flexibility? I suppose that is fine as long as the flexibility isn't an obvious choice. In CIV it was a no-brainer for every nation to switch to the new civic when it was unlocked. If my situation changes slightly and I get to change governments, isn't it just making every playstyle stronger? It won't actually change the way people play.
 
I'll make some additions to YieldLibrary.lua to help you get started. What do you want to call it?

  • Law
  • Governance
  • Stability
  • Polity
  • ???
(The name can easily be changed later.)
 
I think the simplest route for government change would be the culture one I posted above.

What do you mean, GamerKG? You mean that switching governments costs 1 policy adoption and that's all (that is, without building any national wonder)? Or you mean "1 policy adoption"+"building national wonder"?

For me, both choices are fine for the first version, as long as they are easy to implement. :)

EDIT: I missed some relevant new posts before posting. :(

Perhaps switching governements should require more effort than building a 1 hammer (or 1 gold) national wonder. Recall the Anarchy turns in previous Civ games. If your country is at war, I would not like to see players be at Fascism at even turns (to attack enemies with some attack bonus) and at Democracy at odd turns (to have economy bonuses). The process should require some effort. Culture policy points, governance points, happiness, or something.

By the way, if switching governments requires spending some "governance points", then switching the government would be harder in nations which had several government switching in the last turns. However, I feel that it is the other way around! Think about modern Africa, where many nations have had many forms of government since their independence, about 50 years ago. Each new revolution happens, precisely, because of the lack of stability/governance of the previous government. That is, if nations are unestable, then they have more government changes!
 
Thal, We should simply make the yield library system modular in the way I did notification panel rather than simply require constant overwrites ( the old ingame.XML issue). I'll look into this today.
 
@Sneaks
That'd be great if you can figure out a way to do it. :) There's many steps in the yield chain, and some "yields" work radically different than others (experience and happiness). It's complex enough it might not be feasible to completely standardize things the way notifications are.

In version 108.3 beta (link) I added some basics for "YIELD_LAW". It's in the yield tables and has a tooltip name. The name can be changed, this is just a starting point for you all to work from. :)
 
By the by, its fully possible to change yields displayed on map terrain. However, its more of a to accomplish, as you would essentially need to account for how to deal with a scenario of one of every yield displaying. Otherwise, I have edited this before at high success (I built the Call to Power Project yieldmap that calculates and displays increments of 5s).
 
Back
Top Bottom