CBP Events and Decisions Compatibility

Is the 3uc/4uc project holding you up? is there anything we could prioritize?
Detailing me all the information that the decisions shouldn't be interferring with. (Venetian Arsenale decision needs to be removed since we already have the Arsenale)
 
But- ... didn’t I already do that?

a detailed account of every UC that we have added can be found here
 
Last edited:
Do you have a GitHub for this project?

Anyway, VP changed XP at slower game speeds recently, but the XP from the lua function InitUnitFromCity does not get modified by game speed. What I've found is that SetExperience is not adjusted by game speed, but ChangeExperience is. So to fix the issue, just replace SetExperience with ChangeExperience.

For reference, its in line 130 of EventsAndDecisions_Utilities.lua.
 
But- ... didn’t I already do that?

a detailed account of every UC that we have added can be found here
I don't monitor the UC project like a hawk. This is appreciated.

Do you have a GitHub for this project?

Anyway, VP changed XP at slower game speeds recently, but the XP from the lua function InitUnitFromCity does not get modified by game speed. What I've found is that SetExperience is not adjusted by game speed, but ChangeExperience is. So to fix the issue, just replace SetExperience with ChangeExperience.

For reference, its in line 130 of EventsAndDecisions_Utilities.lua.
Very nice.
 
Very nice.

Further to this, I did more tinkering, and realised the InitUnitFromCity doesn't always give the correct TrainedFreePromotion of the city, because the lua function IsPromotionValid does not work as expected; it does not check the UnitPromotions_UnitCombats table, as we want it to.

A better option is to include LeeS' Unit Spawn Handler, and use his CheckPromotionValidity function. So, my InitUnitFromCity looks like this now:

Code:
function InitUnitFromCity(pCity, iUnitType, iNum)
    local tUnits = {}
    pPlayer = Players[pCity:GetOwner()]
    for i = 1, iNum do
        pUnit = pPlayer:InitUnit(iUnitType, pCity:GetX(), pCity:GetY())
        if not(pUnit:JumpToNearestValidPlot()) then return tUnits end
       
        table.insert(tUnits, pUnit)
       
        pUnit:ChangeExperience((pCity:GetDomainFreeExperience(pUnit:GetDomainType()))) -- ChangeExperience instead of SetExperience, so that VP's game speed adjustment applies
        for promotion in GameInfo.UnitPromotions() do
            iPromotion = promotion.ID
            --print("Obtained promotion ID")
            sPromoString = promotion.Type
            --print("sPromoString was passed as : " .. sPromoString)
                if (pCity:GetFreePromotionCount(iPromotion) > 0 and CheckPromotionValidity(iUnitType, sPromoString, false)) then
                --print ("Promotion of ID: " ..iPromotion.. " determined to be valid")
                pUnit:SetHasPromotion(iPromotion, true)
                --print("Promotion given to unit")
            end
        end
    end
    return tUnits
end
 
Fantastic.

For my upcoming and final CBP E&D update:
  • Removed all Events here and moved them to the Community Events. (CBP Decisions then? lol)
  • Morality Reworked:
    • No longer uses the normal events to try to grab morality(There are too many events for me to compile now)
    • Morality is now on a 0-100 scale instead of a weird negative-positive scale.
    • Morality are now activated upon settling a city or having a Merchant of Venice pop up.
      • These actions pop up 1 out of 15 events(from 4) that are unique and question your morality.
    • Fixed bug where if you liberate a dead civilization, they would always start malevolence lol.
    • Benevolence Reworked
      • These are the self-righteous, the passive-aggressive, the trustworthy, and the gifted. These are the one that represent the "goodness" and caring from man.
      • Scale from 61-100.
      • AI-flavored for the food and culture.
      • Passive diplomatic bonuses with themselves (+15).
      • Charity Process unlocked at Philosophy.
        • Converts 20% of your Production to Food.
        • Converts 20% of your Production to Culture.
        • Farming and Art Processes disabled.
      • Cities may contribute toward the treasury, science fund, or the arts depending on their population. (Chance: 1% per turn+0.1% per Citizen; Yield: +50 per Citizen)
      • Ironically they love each other so much they get an additional diplomatic bonus (+15).
      • -20% Building Maintenance Cost.
      • Unlocks the Path to Enlightenment
        • Destructible World Wonder
        • Locks the owner to the path of enlightenment. Choosing any path no longer decreases their mortality.
        • All melee units(including naval units) has a chance to enlighten their enemies toward the path of enlightenment adding to their ranks (+25 HP upon defeating a unit).
          • Units retain this ability until their death even if the Path of Enlightenment is destroyed.
    • Pragmatic Reworked
      • These are the justified, the honorable, the mysterious, and the zealous. These are the one that represent the "balance" and content from man.
      • Scales from 41-60.
      • AI-flavored for the religious and the scientific.
      • Passive diplomatic bonuses with themselves (+15).
      • Chastise Process unlocked at Engineering.
        • Converts 20% of your Production to Faith.
        • Converts 20% of your Production to Science.
        • Science and (Prayer) Processes disabled.
      • Gain an additional Trade Route.
      • -10% Unhappiness Modifiers.
      • -10% Gold Cost in Buying Units/Tiles/Buildings.
      • Unlocks the Path of Balance
        • Destructible World Wonder
        • Locks the owner to the path of balance. Choosing any path no longer changes their mortality.
        • Recon, Siege, Mounted, and Armored units find their balance of combat on this path. (+25% Defense against all combat).
          • Units retain this ability until their death even if the Path of Balance is destroyed.
    • Malevolence Reworked
      • These are the radicals, the warlike, the enterprising, and the insentience. These are the one that represents the "disorder" of and control from man.
      • Scales from 0-40.
      • AI-flavored for the gold-hungry and offensive.
      • Passive diplomatic respect with themselves (+15).
      • Chaos Process unlocked at Currency.
        • Converts 20% of your Production to Gold.
        • Converts 20% of your Production to City Defenses.
        • Wealth and Defense Processes disabled.
      • Any civ trading with malevolent civs yields +5 Gold for the civs while trading with other civs net them an additional +5 gold per route.
      • +5 City Defense Strength in all Cities.
      • Melee Units(including naval units) spread chaos and fear amidst their enemies splashing 3 damage to nearby enemies.
      • Unlocks the Path of Destruction
        • Destructible World Wonder
        • Locks the owner to the path of destruction. Choosing a benevolence path no longer increases their mortality.
        • All ranged units(including naval units) have a chance to ignite destruction toward the enemies they fire at. Dealing additional damage if they cannot escape from their projectiles.
          • Units retain this ability until their death even if the Path of Destruction is destroyed.
  • Decisions Rework in Progress
 
Last edited:
Seems good. I was going to bring up yield inflation concerns from morality, but this seems to alleviate that while making it more interesting.

Will this still be dependent on community events? I find that they create a high amount of yield inflation, so I think there should be an option to play without.
 
Seems good. I was going to bring up yield inflation concerns from morality, but this seems to alleviate that while making it more interesting.

Will this still be dependent on community events? I find that they create a high amount of yield inflation, so I think there should be an option to play without.
The Community Events is undergoing a huge rework addressing yield inflation.
 
I think Austria's decision which gives them +15 Influence per great person expended is overpowered, because of the UA and how early they can get it. Maybe it should be unlocked later, and the influence per great person should be much lower, somewhere between +2 and +5.
 
Last edited:
Depending on how hot this weather is and whether or not my computer and I can work on it.
 
Was wondering when is the estimated completion of the final version would be out >.<
Not rushing you really oh great one!
 
Was wondering when is the estimated completion of the final version would be out >.<
Not rushing you really oh great one!
Still have to find a workaround around the upgrade bug.
 
Spoiler :
Fantastic.

For my upcoming and final CBP E&D update:
  • Removed all Events here and moved them to the Community Events. (CBP Decisions then? lol)
  • Morality Reworked:
    • No longer uses the normal events to try to grab morality(There are too many events for me to compile now)
    • Morality is now on a 0-100 scale instead of a weird negative-positive scale.
    • Morality are now activated upon settling a city or having a Merchant of Venice pop up.
      • These actions pop up 1 out of 15 events(from 4) that are unique and question your morality.
    • Fixed bug where if you liberate a dead civilization, they would always start malevolence lol.
    • Benevolence Reworked
      • These are the self-righteous, the passive-aggressive, the trustworthy, and the gifted. These are the one that represent the "goodness" and caring from man.
      • Scale from 61-100.
      • AI-flavored for the food and culture.
      • Passive diplomatic bonuses with themselves (+15).
      • Charity Process unlocked at Philosophy.
        • Converts 20% of your Production to Food.
        • Converts 20% of your Production to Culture.
        • Farming and Art Processes disabled.
      • Cities may contribute toward the treasury, science fund, or the arts depending on their population. (Chance: 1% per turn+0.1% per Citizen; Yield: +50 per Citizen)
      • Ironically they love each other so much they get an additional diplomatic bonus (+15).
      • -20% Building Maintenance Cost.
      • Unlocks the Path to Enlightenment
        • Destructible World Wonder
        • Locks the owner to the path of enlightenment. Choosing any path no longer decreases their mortality.
        • All melee units(including naval units) has a chance to enlighten their enemies toward the path of enlightenment adding to their ranks (+25 HP upon defeating a unit).
          • Units retain this ability until their death even if the Path of Enlightenment is destroyed.
    • Pragmatic Reworked
      • These are the justified, the honorable, the mysterious, and the zealous. These are the one that represent the "balance" and content from man.
      • Scales from 41-60.
      • AI-flavored for the religious and the scientific.
      • Passive diplomatic bonuses with themselves (+15).
      • Chastise Process unlocked at Engineering.
        • Converts 20% of your Production to Faith.
        • Converts 20% of your Production to Science.
        • Science and (Prayer) Processes disabled.
      • Gain an additional Trade Route.
      • -10% Unhappiness Modifiers.
      • -10% Gold Cost in Buying Units/Tiles/Buildings.
      • Unlocks the Path of Balance
        • Destructible World Wonder
        • Locks the owner to the path of balance. Choosing any path no longer changes their mortality.
        • Recon, Siege, Mounted, and Armored units find their balance of combat on this path. (+25% Defense against all combat).
          • Units retain this ability until their death even if the Path of Balance is destroyed.
    • Malevolence Reworked
      • These are the radicals, the warlike, the enterprising, and the insentience. These are the one that represents the "disorder" of and control from man.
      • Scales from 0-40.
      • AI-flavored for the gold-hungry and offensive.
      • Passive diplomatic respect with themselves (+15).
      • Chaos Process unlocked at Currency.
        • Converts 20% of your Production to Gold.
        • Converts 20% of your Production to City Defenses.
        • Wealth and Defense Processes disabled.
      • Any civ trading with malevolent civs yields +5 Gold for the civs while trading with other civs net them an additional +5 gold per route.
      • +5 City Defense Strength in all Cities.
      • Melee Units(including naval units) spread chaos and fear amidst their enemies splashing 3 damage to nearby enemies.
      • Unlocks the Path of Destruction
        • Destructible World Wonder
        • Locks the owner to the path of destruction. Choosing a benevolence path no longer increases their mortality.
        • All ranged units(including naval units) have a chance to ignite destruction toward the enemies they fire at. Dealing additional damage if they cannot escape from their projectiles.
          • Units retain this ability until their death even if the Path of Destruction is destroyed.
  • Decisions Rework in Progress
Interesting features that I decided to make over 3 months... here's the actual changelog over next 2 weeks:
  • Moving CBP E&D Events to Community Events (except the one meant for CBP E&D).
  • Removed the scaler element. So if a decision cost 500 Gold in the Medieval Era and 1000 Gold in the Renaissance Era. It will stay that way. (although yield inflation still exist, it was for the better good for modder's compatibility).
  • Fixed a bug where Great Diplomats were earning one extra paper cuz of Lua (they'll still earn you 1 magistrate)
  • Removed one generic decision.
  • Morality Rework:
    • Let's make it simple. No more confusing stuff.
      • Settle cities to make moral decisions which now have 20 random events(so you can't get tired... right?)
      • Conquering a city gives you 10 random events. (if a city was recently captured, you can't get the event again so no re-capturecapture)
      • Unlocking a new Era and then choosing what to do with your future.
  • Alignment Rework (No more beneficient and maleficient)
    • You can no longer dictate a City-State's "attitude toward major civ" when you conquer them.
    • Benevolent
      • Do 50 good-boy points.
      • Earning any more than 100 good-boy points will have its remainder converted to Culture (5x to 1) per City.
      • Start at the Renaissance Era with this alignment and your original Capital(if lost, yikes), the proto-National Visitor Center (100% Culture from Improvements, World Wonders, and National Wonders is added to Tourism).
        • Earn a modest sum of 500 Culture from the benevolent culture.
      • Allying a City-State make their attitude Friendly or Irrational (95-5).
      • AIs who love Food and Culture(and defense) will favor this.
      • Benevolent AIs treat you better when you are benevolent (+25).
      • Self-Righteous: Units earn +5% Combat Strength in friendly territories.
      • Trustworthy (Medieval Required): Cities will find sponsors who seem to be willing to donate their art of culture or they might donate more for some incentives...
      • Gifted (Medieval Required): Cities finding gifts of food from city-states... and finding ways on how to use that gift to its full purpose.
      • Zealous (Renaissance Required): Cities will occasionally give you an option to spawn a free unit or up your City's Defense by +5 and decreasing your Distress by -25% temporarily for 50 Turns.
    • Pragmatic
      • Start with this alignment.
      • Start at the Renaissance Era with this alignment and your original Capital(if lost, yikes) receive +1 Trade Route.
        • Earn a nice sum of 500 Faith on this pragmatic philosophy.
      • Allying a City-State make their attitude Neutral or Irrational (75-25).
      • AIs who love Happiness and Faith(and diplomacy) will favor this.
      • Pragmatic AIs appreciate your efforts when you are pragmatic (+10).
      • Justified: Won't earn bad diplomatic opinions from other alignments (Benevolent and Malevolent have a -20 to each other).
      • Mysterious (Medieval Required): Cities will randomly receive a box at its doorstep.. could it be Faith or more than just that?
      • Passive (Medieval Required): Cities will sometime spur into random WLTKD of 10 Turns.
      • Honorable (Renaissance Required): Cities will spontaneously receive an honorable mention from a great authority.. omens of happiness to come for 50 Turns.
    • Malevolent
      • Do 50 bad-boy points.
      • Earning any more than 100 bad-boy points will have its remainder converted to Gold (10x to 1) per City.
      • Start at the Renaissance Era with this alignment and your original Capital(if lost, yikes) receives +10 Unit Supply.
        • Earn a great sum of 500 Gold and Golden Age Points for this malevolent society.
      • Allying a City-State makes their attitude Hostile or Irrational (95-5).
      • AIs are flavored with Production and Gold(and offense) will flavor this.
      • Malevolent AIs respect your power when you are malevolent (+15).
      • Radical: Units earn +10% Combat Strength in hostile territories.
      • Enterprising (Medieval Required): Cities will randomly find gifts of gold on its doorstep or choosing to bribe city-states for influence instead.
      • Insentience (Medieval Required): Cities recognize the need for labor. Granting you a random amount of production... or even more when sacrifcing a citizen!
      • Warlike (Renaissance Required): Cities can ready its people toward war granting +20 Experience for any newly-trained units or pump out +2 Supply for 50 Turns.
  • You may see the decision rework on this page: https://civ-5-cbp.wikia.com/wiki/Civilization_Decisions (which is still in progress, when it is done then you can assume CBP E&D might be close to getting its release)
You may also feel free to quote any of these changelog and discuss why it should be changed. I have an open mind.
 
Last edited:
Do you already know about the bug where America gets the two copies of sugar early for their unique event?
 
Do you already know about the bug where America gets the two copies of sugar early for their unique event?
huh. They should be getting it at the 5th choice.. which I checked the code it should yes?
 
Back
Top Bottom