New Civics Screen

Spoiler :
Page example code for 1st tier.
Code:

<iCasteAttribute>2</iCasteAttribute>
<bPreventFounding>1</bPreventFounding>
<bPreventTraveling>0</bPreventTraveling>
<EducationUnitClass>UNITCLASS_SQUIRE</EducationUnitClass>
<RehibilitateUnitClass>NONE</RehibilitateUnitClass>
<LaborForceUnitClass>UNITCLASS_SQUIRE</LaborForceUnitClass>

iCasteAttribute = 2: Means this unit can not be military, Pages are only this
EducationUnitClass: This is the class the unit will promote to while being educated in schools etc.
LaborForceUnitClass: This is the class the unit will educate to while simply working in the settlement and in any profession.
RehibilitateUnitClass: Not part of this system, but if a unitclass is here this unit gains "education" from other Units that work in your Courts.

Squire example code second tier:
Code:

<KnightDubbingWeight>1000</KnightDubbingWeight>
<iCasteAttribute>3</iCasteAttribute>
<bPreventFounding>0</bPreventFounding>
<bPreventTraveling>0</bPreventTraveling>
<EducationUnitClass>UNITCLASS_NOBLEMAN</EducationUnitClass>

iCasteAttribute = 3: This sets it up so that the unit can be educated in Schools etc (may can be removed actually)
EducationUnitClass: This is the class the unit will promote to while being educated in schools etc.
KnightDubbingWeight = 1000: This sets it up so that this unit can be promoted while working in your Townhalls, Palaces, etc, gathering Fealty.
mmm nice :science::scan: do the education/laborforce/rehabilitate upgrades work independently of each other, and can you let a single unitclass have different unitclasses for each type of upgrade method? Does each method use a random chance per turn to promote (based on how much Bells/Education is produced) or add to a counter for each unit?

sorry for all the questions, Im like a kid in a candystore with all the new tags (or like a Page in a Luxury Food store:p)

:hmm: I guess you could even use this for negative "upgrades".. like if you give Proletarian <RehibilitateUnitClass>UNITCLASS_ADDICT , and then make UNITCLASS_ADDICT unlocked by a nasty Civic like Criminal Underworld or Organized Crime. Then if you use that Civic your Proletarians will slowly degenerate into Addiction! (it would need check for the unitclass being unlocked before promoting). IIRC civics can unlock Immigration for a unitclass separately of unlocking the unitclass itself.

I guess I could try a single Luxury Food replacement like Citizenship Papers yield like Lib Spit suggested, but it seems like everyone wouldn't use a single one (also in World History there's plenty of changes to the goods demanded by common and elite citizens with Civic/Tech changes across history). Perhaps there could be single DefaultGrowthYield and EliteGrowthYield caches which change to a new yield on a tech/civic change (or it caches which yield to check for each player, then checks that once per city per turn). Its not an urgent change though & if that's too bad for performance maybe we shouldn't.

How about if one of the citizen upgrade methods can be boosted by what percentage of their Demands get fulfilled? That would be really individualized, and also reward you for paying attention to demand fulfillment. :king: (If that's too complex individually, maybe another option might be to get a bonus to upgrades from a citywide Prosperity counter based on the overall Demand fulfillment rate for the city.)

I was just playing Victoria 2 (when I shouldve been modding :mischief::p) and I've been really impressed with its economy, which is sort of like new M:C in that there are many different citizen types who can each have a specific set of demands to fulfill (they go about this semi-independently like our Domestic Economy feature, so you don't have to tediously transport all their daily needs but can still view all the cool fiddly bits of supply/demand, techs and "civics" etc each contributing to their well being in small ways). When you govern well enough that their demands are fulfilled they slowly progress to the more advanced citizen types (which in turn have more demands which are harder to satisfy, but can make more money if you can keep up).:king::gold:
 
Spoiler :
do the education/laborforce/rehabilitate upgrades work independently of each other, and can you let a single unitclass have different unitclasses for each type of upgrade method? Does each method use a random chance per turn to promote (based on how much Bells/Education is produced) or add to a counter for each unit?
Spoiler :


I don't have time for a full reply but to answer your questions; they work independently, use can use different classes for each one, and at the moment they add to a counter just like education using EDUCATION_THRESHOLD, but I like the idea of it being random instead of a static number.

It could be like once that counter is 85% full, you could start to get a chance each turn to be promoted. Then if you never randomly promote it will auto promote at like 125%, to simulate slow learners:) Some Units could actually have a Civilian Promotion called "Fast Learner".
 
How about if one of the citizen upgrade methods can be boosted by what percentage of their Demands get fulfilled? That would be really individualized, and also reward you for paying attention to demand fulfillment. :king:

That's a decent idea and prolly wouldn't be to complex. We need to fill out the Unit Demands system for M:C so to get a better idea how it is all going to work first though.

I was reading in my History book yesterday about the American Colonization Society's efforts to recolonize the slaves back to Africa in the 1800's. The book says, "Most colonizationists admitted slavery was an evil, but they also viewed it as a deeply rooted social and economic institution that could not be eliminated only gradually and with the cooperation of slaveholders." But it cost to much to move them, some didn't want to go, plus they were being born too fast, so the movement failed in the end as only a few thousand slaves were ever recolonized.

That reminded me of what Nightinggale said about the troubles of changing Civics. Civics choices should be a huge decision for the player, because it will have lasting effects and not be easy to change once done.

We have cumulative Anarchy times for each Civic which shuts down Hammer Production, Building Production, Hurry ability, and the ability to Join settlements, and we have the Initial Cost of changing Civics.We also have a Resolution Timer that prevents you from changing Civics again for a certain time. So, what could be other consequences?

The Initial Cost could get higher with each change. And perhaps as mentioned some Civics can not be changed to others unless you first Change to a more "similar" Civic or Perhaps a less costly one. Yeah, maybe there could be a "cost limit" set as well, that depends on other factors including Traits you have.

I thought about a Religious "Reformation" Civic, which would act as a go between Civic in that the Reformation's main benefit is that it Decreases Anarchy times as well as Costs when chaning Civics. So, if you know a big Civic change will be coming soon with the discovery of a new Tech, like Feudalism, you could change to Reformation in preparation.

I've already added a new Trait that sets a Max on Anarchy times. We could also add one that sets a Max on Initial Costs.

Lastly, I've added Civic Buttons in latest Civic Effect push..
https://onedrive.live.com/redir?res...095&authkey=!AIsQXXbQnipz7Zk&ithint=file,.rar

To do List
  • add Tech Requirements
  • add Anarchy Times
  • add Civic Buttons
  • add Buttons for new Units
  • review Tech, Trade Perk, and Civic bonuses and play test
  • add New Unit Pedia Help Text
  • add Help Text for Allow Immigration code
    [*]add GameSpeed modifiers etc.
 
I still like the rebellion mechanic for this, most major reforms came with a civil war, unless the leadership had sufficiently unified the nation under their rule.

Are you referring to the Anarchy mechanic or something else that was mentioned?
 
No the Vanilla Col. Mechanic of spawning the 'REF'

So that you need at least 50% loyalty to start a civic shift, and then the 'enemy' will be spawned from towns that lack sufficient loyalty. So if you make a change at 100% loyalty, no problem, if not... then father and son may face each other upon the field of battle to decide the fate of this burgeoning empire!
 
If the Anarchy condition can act as a moddable Censure condition, it will be easy enough to tweak and balance it as needed to make them penalize enough while not being crippling. I think you shouldn't have to add rules that are too complex or path-dependent since the AI will not be able to plan for that effectively and so would be at a disadvantage vs humans.

I guess it could be interesting to have some attacks by a parent Civ be possible before Revolution. The best way to implement that would likely be to mod some Events which can spawn some hostile units near a city, which can trigger when an Anarchy censure condition is active, or can trigger when your parent civ is very upset with you. (Maybe these could be spawned with AlwaysHostile so they could attack a city or two while not necessarily making you have to be at war with that parent civ.) Or, these spawned units could be owned by the generic Barbarian civ that owns Bandits etc; they could capture a city or two during Anarchy which you'd have to win back later.
 
No the Vanilla Col. Mechanic of spawning the 'REF'

So that you need at least 50% loyalty to start a civic shift, and then the 'enemy' will be spawned from towns that lack sufficient loyalty. So if you make a change at 100% loyalty, no problem, if not... then father and son may face each other upon the field of battle to decide the fate of this burgeoning empire!

Ahh, kk that sounds like an interesting concept for sure, however, out of the scope of current objectives. I'll think on that some more.

If the Anarchy condition can act as a moddable Censure condition, it will be easy enough to tweak and balance it as needed to make them penalize enough while not being crippling. I think you shouldn't have to add rules that are too complex or path-dependent since the AI will not be able to plan for that effectively and so would be at a disadvantage vs humans.

That is a good idea. I did a thorough search again, currently the hardcoded Anarchy or "Disorder" effects are:

  • Improvements do not upgrade
  • No Production
  • Can not Hurry
  • No City Growth
  • Units can not Join Settlements

There is no indication that you are under Anarchy so I will need to add Icons somewhere, perhaps adding a new Censure effect as you say.

We could set up Anarchy effects in perhaps EraInfos and depending on the Era you have different Anarchy effects.

Besides those listed would there need to be more effects? If we want to make them moddable then we would need to add an Anarchy Civic option, like "bCausesAnarchyEffects". Or, we could add each effect separate, along with any other effects to make it more modder friendly.

I made another push to Git for Civics and fixed up the Pedia for units that Promote in cities..

 

Attachments

  • squirehelp.jpg
    squirehelp.jpg
    33.2 KB · Views: 187
Ok, I am getting things done faster than I expected today. I just made another push to Civic Effects. The first version is basically in place. This coming week I'll be playtesting things and making necessary adjustments so if anyone else wants to download the current version and test things out that would be great. At least to make sure I've added all necessary files. Remmember you will need to download the new Art files posted earlier. I haven't had a chance yet to playtest today, so there maybe immediate issues.

Alfred the Great has a few extra techs I forgot to remove is one issue, sure there is more that will pop up:crazyeye:
 
Well the idea for making Anarchy effects moddable would be to simply make the Anarchy condition a Censure in CivicInfos that is active when you're in Anarchy. Then it's easy to flexibly mod and adjust any kind of effects you want for it using CivicInfos and TraitInfos without needing to add any new code or tags.
 
Well the idea for making Anarchy effects moddable would be to simply make the Anarchy condition a Censure in CivicInfos that is active when you're in Anarchy. Then it's easy to flexibly mod and adjust any kind of effects you want for it using CivicInfos and TraitInfos without needing to add any new code or tags.

Hmm, all the Censure code is pretty much hardcoded. You can change the effects in CivicInfos but you can not add more or take away Censures with ease. The three are coded in GlobalDefinesAlt.

So, the simplest solution would be to add a New Civic called Global_Effect_Anarchy, add it to GlobalDefinesAlt and just apply it when you are in and out of Anarchy. THen any effects you add to Global_Effect_Anarchy Civic will be applied during Anarchy. That would be really simple to do.

The Censures code needs to be redone to be modder friendly, however, that is not a project that I want to work on any time soon.

Edit:
Ok, this morning I've added a new Global_Effect_Anarchy civic that takes effect during times of Anarchy. At the moment this adds no extra penalties but can be edited to do so. Also, added an Anarchy timer button to main screen hud.
 
I have made a few bug fixes in the Civic Effects branch and pushed them. I added the Confirmation effect to Establishing a Trading Post so you can be sure if you want to loose a Unit or not. I need to add help text that lets you know if you will sacrifice the unit. As I am play testing I am taking notes on things to add and such, so I plan to add...

  • An Event that pops up when you acquire your first Civic that asks you if you want to change your Civics.
  • Add Icons or Help Text that show which Luxury Units and Default Units you will produce and perhaps any Random Bonus Units.
  • Add a Bonus counter to Father Points so you can track what your bonuses are.
  • Add help text that lets you know if you will sacrifice the unit when Establishing Trading post or Establishing a Mission.

So, far I am enjoying the new Civic Effects. In my current game I have acquired Free Market so now I am connecting routes to villages to my settlements so I can build Trading Post and then gain the Bonus to research. I bet the AI can be easily adjusted to do this as well.
 
I have made a few bugs in the Civic Effects branch and pushed them.
:eek:
Why would you make bugs and commit them??? wait, it actually said bug fixes :lol:

I added the Confirmation effect to Establishing a Trading Post so you can be sure if you want to loose a Unit or not.
Adding the same thing to found city would likely be beneficial as they are all linked to the B key. I learned the hard way that B is linked to build city and bombard when I was attacking natives in RaR and that build city takes priority :cry:
 
:eek:
Why would you make bugs and commit them??? wait, it actually said bug fixes :lol:


Adding the same thing to found city would likely be beneficial as they are all linked to the B key. I learned the hard way that B is linked to build city and bombard when I was attacking natives in RaR and that build city takes priority :cry:

Ha ha, funny stuff;)

Well when you made that one push to Civic Branch you must have reapplied the infinit loop bug in the Immigration code. Anyway, I just refixed it and also I have added more help text to the population Growth Help text in your Cities. This will show your default Unit, Luxury Unit, and any random units... I shall return!
 

When you get the chance to play test this and give feedback that would be great. I'll be spending a couple weeks on play testing and tweaking perhaps. I added a new effect in that iTreasureModifier in TraitInfos.xml can be used by none Natives to gain more gold when you raid settlements. I need to get mastrude back on board, oh Mastrude!
 
While the Civics/Techs system is undergoing renovation, one feature I would most love to see brought back from the original Inventor modcomp is that Techs can actually belong to several Categories (such as Military, Cultural, Religious, Industrial, Economic etc). There is still the tag <InventionCategory> in M:C, but it's not really used since everything has to have MEDIEVAL_TECH in this tag. If belonging to categories were brought back, this could be used to let leaders/techs/civics grant a discount to research in certain tech categories by a TraitInfos tag; and maybe could even allow easier viewing of the tree by using one tab per category like the Founding Fathers screen does. What do you think?:king:

Here's one for orlanth. Just made a new push to Civic Screen branch.

Added BonusTechCategories to Traits. This will allow you to set a bonus when researching certain tech Categories. M:C only has two "tech" categories that being MEDIEVAL_TECH and MEDIEVAL_TRADE_TECH. This Bonus currently only works for those two in M:C

I have added one example in the xml to Mercantile trait in that it offers a +25% bonus to Trading Points earned.

I have made adjustments to the Python and XML files for this change. MEDIEVAL_TECH has had its placement moved in the CivicInfos.xml to the 4th position. If you add new Tech Categories you will need to add them after MEDIEVAL_TECH as the Python code checks for Tech Categories >= 4. So, anything after 4 is considered a Tech Category. I have not fully tested this yet as M:C only has the two categories but it should work in theory ;)

Also, along with these changes is a new GlobalDefineAlt.xml tag SHOW_TECH_CATEGORIES. When this is set to 1 the Tech Category will appear in the Tech Tree instead of the "Materials" Icon.

When we merge this with Nightinggales current changes with Jit arrays we can look into adding this effect to researched Techs as well.
 
Top Bottom