1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

New Civics Screen

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Aug 1, 2013.

  1. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,760
    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:
     
  2. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    Yeah with WH, I eventually plan to explore the code and see if I can add in the extra yields etc. but first I have to find and indentify all the bits of code for it.

    Right now I am back in the Wasteland working on Alpha 4.
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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".
     
  4. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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.
     
  5. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    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.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Are you referring to the Anarchy mechanic or something else that was mentioned?
     
  7. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    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!
     
  8. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,760
    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.
     
  9. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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.

    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..

     

    Attached Files:

  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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:
     
  11. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,760
    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.
     
  12. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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.
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    :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:
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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!
     
  16. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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!
     
  18. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    Yeah my problem is just wrapping my head around downloading the alternate branch, and how all that works...

    It is one of those headaches I have yet to face.. That and I am neck deep in the next version of FTTW...

    But it is sounding properly epic!
     
  19. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    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.
     
  20. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    Wow...

    Looks like we are going to have to think carefully about tech categories for WH, this could be a really interesting feature!
     

Share This Page