Great People Generation

Xyth

History Rewritten
Joined
Jul 14, 2004
Messages
4,106
Location
Aotearoa
One of the (few) things that Civ5 got right was how it handles Great People generation. I'm going to try and create something similar in HR for 1.21. A quick summary:

  • GPP are not accumulated civilization-wide, but instead per city.
  • GPP for each Great Person type accumulates in separate 'pools'
  • The first pool to fill to a defined threshold generates a Great Person in that city
  • That particular GPP pool is then reset to 0, other GPP pools are not affected
  • The threshold then increases for all pools in all of that player's cities
  • Cities that change ownership would have all GPP pools reset to 0 and inherit the new owner's threshold.

An important caveat: since I will be replacing a C++ routine with a Python routine this is guaranteed to have a negative impact on performance. The routine in question is called once per city per turn so it won't be negligible but I won't know how detrimental exactly until I've tried it. I don't think it will be too bad though, assuming I can keep my code as efficient and simple as possible. Personally I think the improved gameplay this change will bring is worth it. Hardest part is going to be redesigning the relevant parts of the UI.

Anyway, I'd like to hear your thoughts and questions on this, particularly if you have any concerns about the details or wider implications of this change.
 
I like it. If you can get it to work, I think the increased functionality will be well worth at least a modest performance hit. How much of a hit are we talking about, though?

The UI screens affected would be the individual city screens, the BUG GP display, and the F1 adviser, correct?
 
Interesting. I've been trying to work out the implications of this change. Here's what I have so far, from the perspective of a player hoping to maximize their Great Person yield.

Pro
  • No more GPP roulette! Great People are born in a predictable order.
  • The purity of a GPP pool is no longer an issue. You can hire the occasional Priest and build an Artist-inspiring National Wonder without affecting your next Great Person.
  • Stacking Wonders is not necessary. Wonders that give different types of GPP will contribute to different pools and don't need to be built in the same city.
  • City specialization is encouraged. To maximize your GPP, it's better to have all the Scientist buildings in one city, and the Merchant buildings in another, than to have a mix of both.
  • The "unlimited specialist" civics become much more important since you need to maximize GPP of a particular type.

Con
  • GPP generation is slower in general. You can't expect a steady stream of Great People from a single city with the Royal Cemetery and a grab-bag of random specialists.
  • Some Great People may be very hard to generate, especially Great Engineers. Unless you land the Pyramids or some such, you'll be limited to a single Engineer slot for a very long time, which will probably lose out to more popular GPP types, especially if the Cemetery keeps its free Priest. You might have to wait until Industrialism for your shot.
  • As you say, there may be performance issues.

Overall, I have to agree that the improved gameplay will be worth it.

EDIT: What happens if two or more GPP pools in a single city hit the threshold on the same turn? In Civ5, all the Great People are born, but the threshold goes up for each. This is still to the player's advantage, as you can, for example, pay 300/300/500 GPP for three Great People instead of 300/400/500. There should probably be a priority sequence for Great People generation.
 
1) GP birth rate is not slower, in fact it is alot faster unless you adjust the threshold.
Because when a gp is born, only its threshold is increased.
2) 2nd con is invalid as well. They do not complete with each other.
3) Keeping track of 7 bars for every city every turn is not an easy task, especially when calculations from those gpp modifiers are involved. Performance is definitely hit badly.
Plus the fact that city script data is already used to store some other data in hr already, unless you are not using script data to store these values
 
1) GP birth rate is not slower, in fact it is alot faster unless you adjust the threshold.
Because when a gp is born, only its threshold is increased.
2) 2nd con is invalid as well. They do not complete with each other.

I may have misinterpreted, but I took this

  • The first pool to fill to a defined threshold generates a Great Person in that city
  • That particular GPP pool is then reset to 0, other GPP pools are not affected
  • The threshold then increases for all pools in all of that player's cities

to mean that the thresholds for all Great People are increased, not just the particular type born.
 
Since pools are not reset, they wont be born slower since the rest are partially filled already even though threshold increased
 
I like it. If you can get it to work, I think the increased functionality will be well worth at least a modest performance hit. How much of a hit are we talking about, though?

Hard to quantify at this stage. Turn times will increase slightly for every city on the map but only by fractions of a second each I'd imagine.

The UI screens affected would be the individual city screens, the BUG GP display, and the F1 adviser, correct?

I think so. I've never worked with the Domestic Advisor screen before so that will be a challenge. I have a rough idea how to handle the cityscreen. Need to have a think about what information is desirable to place on the main screen.

EDIT: What happens if two or more GPP pools in a single city hit the threshold on the same turn? In Civ5, all the Great People are born, but the threshold goes up for each. This is still to the player's advantage, as you can, for example, pay 300/300/500 GPP for three Great People instead of 300/400/500. There should probably be a priority sequence for Great People generation.

The first city that has its turn will generate the Great Person and any subsequent cities that could have also produced one that turn will not, because the birth of the first one will have instantly raised the threshold. Usually this will mean that older cities beat newer cities.

A priority system would be too messy to implement.

  • GPP generation is slower in general. You can't expect a steady stream of Great People from a single city with the Royal Cemetery and a grab-bag of random specialists.
  • Some Great People may be very hard to generate, especially Great Engineers. Unless you land the Pyramids or some such, you'll be limited to a single Engineer slot for a very long time, which will probably lose out to more popular GPP types, especially if the Cemetery keeps its free Priest. You might have to wait until Industrialism for your shot.

1) GP birth rate is not slower, in fact it is alot faster unless you adjust the threshold.
Because when a gp is born, only its threshold is increased.
2) 2nd con is invalid as well. They do not complete with each other.

I may have misinterpreted, but I took this to mean that the thresholds for all Great People are increased, not just the particular type born.

Since pools are not reset, they wont be born slower since the rest are partially filled already even though threshold increased

We can handle thresholds in a number of ways: 1) universally to all GP types and all cities, 2) a separate threshold for each GP type, 3) each city having it's own threshold, or even 4) each city having it's own set of thresholds (one for each GP type). Each has its own pros and cons. Another option entirely would be to have 6 civilization-wide GP pools.

I'm currently proposing #1 but am open to considering one of the other options if we feel its superior gameplay-wise. I haven't thought through the all the technical aspects of the others yet though, so some may get vetoed in that regard. Ultimately though, the simpler the better, and the closer to BTS the better (especially for the AI).

3) Keeping track of 7 bars for every city every turn is not an easy task, especially when calculations from those gpp modifiers are involved. Performance is definitely hit badly.

Just 6 bars, Great Generals won't be affected by this. CyCity has getGreatPeopleUnitRate(index) which I presume takes all modifiers into account. Haven't tried it yet. If it doesn't there's always getGreatPeopleRateModifier(). If we want to add modifiers for individual Great People types it gets messier of course.

Plus the fact that city script data is already used to store some other data in hr already, unless you are not using script data to store these values

HR doesn't use city script data anymore. It was used for Corporations prior to 1.20 but we stripped that out. So yes, I'll be using city script data for this.
 
I hire a scientist and a merchant (for example) the same turn in the same city. Who will I generate?

Both. It would be possible to do a priority check or such in this situation though, if we just wanted one (which I think is preferable).
 
This was a bug in Civ V IMO.
Since by right, the threshold for the 2nd GP should be increased.
But if you intend to keep it like this similar to Civ V, then humans will manipulate the points such that they will reach at same turn to generate both at same turn.
 
We can handle thresholds in a number of ways: 1) universally to all GP types and all cities, 2) a separate threshold for each GP type, 3) each city having it's own threshold, or even 4) each city having it's own set of thresholds (one for each GP type). Each has its own pros and cons. Another option entirely would be to have 6 civilization-wide GP pools.

I'm currently proposing #1 but am open to considering one of the other options if we feel its superior gameplay-wise. I haven't thought through the all the technical aspects of the others yet though, so some may get vetoed in that regard. Ultimately though, the simpler the better, and the closer to BTS the better (especially for the AI).

I agree with #1. Although I put "slower GP generation" under Con, that was written from a player's perspective, and I don't think slower GP generation is bad for the mod in general. HR has more specialist slots and more GPP bonuses than the base game, anyway, so I don't think we need to do anything to compensate.

I hire a scientist and a merchant (for example) the same turn in the same city. Who will I generate?
Both. It would be possible to do a priority check or such in this situation though, if we just wanted one (which I think is preferable).
This was a bug in Civ V IMO.
Since by right, the threshold for the 2nd GP should be increased.
But if you intend to keep it like this similar to Civ V, then humans will manipulate the points such that they will reach at same turn to generate both at same turn.

Yes, this was the situation I was talking about. I would definitely implement a priority check, since specialist slots are available much earlier in HR compared to Civ5, so player manipulation will be an issue. After spawning the first Great Prophet, it would be pretty easy and exploitative to grow a designated city to a decent size, build a Library, Theatre, and Market, leaving the Cemetery for last, and simultaneously hire a Priest, Artist, Merchant, and Scientist for four Great People at minimum cost.

To keep things simple, I suggest the priority check should follow the order of the specialists in the city screen: that is, Spy, Engineer, Merchant, Scientist, Artist, Priest. That roughly matches the power of the corresponding Great People.
 
Speaking of Great People, is there any chance of having platyping's Enhanced Great People mod component incorporated into HR?
 
Certainly some parts of it. I encourage everyone to take a look at it and give me your thoughts on which abilities would be worthwhile additions to HR and which wouldn't work so well:

That's a nifty little mod. Some abilities look quite interesting while others seem a tad overwhelming. Here are my suggestions for abilities to add to HR. The goal is to pick abilities that are valid alternatives to current options without completely overshadowing them. Changes and additions in red.

Great Artist
1. Great Work
2. Concert Tour: +1:) and +100:culture: in every city*
3. Cultural Diplomacy: +1 relations with all civilizations
4. Found Barilla, Bombay Dyeing, De Beers
5. Join City
6. Discover Technology
7. Start Golden Age

Great Engineer
1. Hurry Production
2. Excavation: discover random Mine or Quarry resource
3. Resupply: heals all units, restores attack and movement of all units
4. Found Rio Tinto, Toyota, Vinci
5. Join City
6. Discover Technology
7. Start Golden Age

Great General
1. Warlord
2. Construct Armory
3. Rally: recruit 1 conscript for every 2 population in target city
4. Found East India Company
5. Join City
6. Discover Technology
7. Start Golden Age

Great Merchant
1. Trade Mission
2. Commodify: discover random Orchard or Plantation resource
3. Grand Voyage: reveal World Map of all known civilizations
4. Found Hudson Bay, McDonalds, Taiyo
5. Join City
6. Discover Technology
7. Start Golden Age
+ may explore rival territory

Great Prophet
1. Found Religion
2. Construct Shrine
3. Pilgrimage: spread state religion to 6 cities in empire and 3 foreign cities*
4. Mediator: enforces 10 turn peace with all civilizations
5. Join City
6. Discover Technology
7. Start Golden Age
+ invisible to all units

Great Scientist
1. Construct University
2. Cultivation: discover random Farm or Pasture resource
3. Urbanization: +1 population and +1:health: in all cities
4. Found BASF, General Mills, Nestle
5. Join City
6. Discover Technology
7. Start Golden Age

Great Spy
1. Infiltrate
2. Found Intelligence Agency
3. Coup: influence the civics or state religion of target civilization
4. Found Aramco
5. Join City
6. Discover Technology
7. Start Golden Age
+ may explore rival territory, invisible to all units


Notes
  • All Great People should have some abilities in common: Join City, Discover Technology, and Start Golden Age. Great Generals and Spies were lacking some of these abilities, so they have been added.
  • To diversify the corporations somewhat, the East India Company requires a Great General (as it did employ private armies and came to dominate the Indian subcontinent) and Aramco requires a Great Spy (as its fortunes were tied to political currents, including war shortages, government concessions, and threats of nationalization).
  • In a major change for Great Spies, they may now construct Intelligence Agencies NOT Scotland Yards. Intelligence Agencies, with their 50% espionage bonus, are comparable to Universities and appropriate to the Great Spy. It makes no sense for every city to have one, either, which is why they are removed as an ordinary build item. Scotland Yard, with its 100% espionage bonus, is more akin to a National Wonder. It should be redesigned as such, or removed altogether.
  • Furthermore, Great Spies now have the ability to influence the civics or state religion of a rival civilization. This is meant to replace the espionage missions of the same name, which were too powerful when endlessly repeatable.
  • Turning to new abilities, discovering new resources should work well with HR's redesigned buildings, improvements, and corporations. The ability has been suggested for Engineers, Merchants, and Scientists, for a variety of resources.
  • Abilities marked with an * should be scaled as appropriate. The Great Artist's Concert Tour provides +100 culture to every city on Normal Speed, i.e. 10 times the amount needed for the first border pop. Other speeds require other values. Similarly, the Great Prophet's Pilgrimage spreads the state religion to 6 domestic cities on Standard size maps, i.e. twice the number that can be drafted per turn, and 3 foreign cities. Other map sizes require other values.
  • The Great Merchant's Grand Voyage is restricted to revealing the World Map of all known civilizations as opposed to the world map as a whole. That makes more sense in game terms; I hope it can be coded. Meanwhile, Great Prophets pick up "invisible to all units," which allows them to explore unsettled wilderness without harassment from barbarians. This contrasts nicely with the Great Merchant's "can explore rival territory," which lets them explore civilized lands. The Great Spy, of course, gets both bonuses.
  • Beyond that, I rejected quite a few modded abilities for being overpowered (upgrades all improvements in empire & set city as holy city), redundant (+2XP on all units when you can attach a warlord & purges non-state religions when you have inquisitors), or unpleasant (throw rivals into 4 turn anarchy & instigate rivals to declare war on target civilization.)
  • There are enough abilities left over to add an eighth ability to all Great People, if there's interest.
 
Okay, I now have working code for the GPP scheme described in the first post. No interface changes yet. I did a semi-scientific performance test and the results were quite promising. Difference of just a few milliseconds at most per city each turn. One notable factor helping with this is that the standard DLL routine loops through all defined units twice to find great people types and my code eliminates the need for this.

Interface changes are the next task. I have a fairly good idea of what I want to do with the city screen but I'm not sure what to do about the bar on the main screen. Any suggestions? Under this scheme, what information would you want to have displayed there?
 
I'm torn between two possibilities for the main screen. Ales_ summed up the first one nicely (basically the same as currently, just showing whichever bar will fill next).

I'm not sure how feasible (or even desirable) the second is, but I wonder if it would be possible to have multiple small bars similar to the one for Great Generals? One per type of GP? (That might be information overload for the main screen, though. You don't want to cram in too much raw data at the top level.)
 
That's a nifty little mod. Some abilities look quite interesting while others seem a tad overwhelming. Here are my suggestions for abilities to add to HR. The goal is to pick abilities that are valid alternatives to current options without completely overshadowing them. Changes and additions in red.
[/LIST]

Seems like a well-parsed list-- avoiding gimmicky or oddball entries-- and I like the overall idea of these enhanced capabilities for GP. Thanks to Azoth and Xyth.
 
To Azoth's list: Neat suggestions. I especially like the resource discovery options.

That said I can see a few issues with some of the options:

Great Artist:
Concert Tour. I assume this buff is temporary. A good alternative name would be "propaganda".
Cultural Diplomacy. This buff needs to be temporary, and very short at that. Don't hand out diplo bonuses like candy. They are game-winningly strong when stacked.

Great Merchant:
Grand Voyage. Broken and unrealistic. You could generate an early GM and instantly know where everyone and all the inhabited landmasses are. Even on a continents map. The ability should at most give you the maps of a single rival civ.

Great Prophet:
Mediator. Imagine how annoying this ability would be in the hands of the AI. You just barely scraped together an attack force and only have a short time window to strike against the resident warmonger before he reaches tech parity. Suddenly some douche on another continent uses one of these. Also imagine how broken these would be in tight space/culture races (both in the hands of the player and the AI). Too powerful and un-fun.

Great Scientist:
Urbanization. I assume the health bonus is temporary.
 
Seems like a well-parsed list-- avoiding gimmicky or oddball entries-- and I like the overall idea of these enhanced capabilities for GP. Thanks to Azoth and Xyth.
To Azoth's list: Neat suggestions. I especially like the resource discovery options.

That said I can see a few issues with some of the options:

Thanks for the feedback.

Great Artist:
Concert Tour. I assume this buff is temporary. A good alternative name would be "propaganda".
Great Scientist:
Urbanization. I assume the health bonus is temporary.

The buffs are intended to be permanent, actually. If you think about it, they're very similar to the resource discovery options. A new resource provides a permanent +1:) or +1:health:, plus an extra bonus when paired with a building, and a higher tile yield. A second copy of resource you already have gives you the option to trade for a resource of your choice. Concert Tour and Urbanization sacrifice the tile yield and building bonuses in exchange for a little extra culture or population. I think they're reasonably balanced.

Great Artist:
Cultural Diplomacy. This buff needs to be temporary, and very short at that. Don't hand out diplo bonuses like candy. They are game-winningly strong when stacked.

Yeah, this is a concern. You'd pay a heavy price to stack diplo bonuses, since Artists are among the weakest specialists, and you'd be giving up the benefits of other Great People - every diplo bonus is one less University or trade mission or religion - but you could do it. Even then, good diplo wouldn't win you the game on its own. Even a diplomacy victory requires you to get to the right technology to build a Wonder or have enough population to be nominated. Still, I can see the potential for abuse. I'm not sure a temporary bonus is the right solution, though. Instead, it could be a one-shot ability, to be used only once per game. Or it could work like a Golden Age. The first takes one Great Person, the second takes two, and so forth. (Note that the original mod gives all Great People the Diplomacy ability.) What do you think?

Great Merchant:
Grand Voyage. Broken and unrealistic. You could generate an early GM and instantly know where everyone and all the inhabited landmasses are. Even on a continents map. The ability should at most give you the maps of a single rival civ.

Well, you'd only get the World Maps of *known* civilizations, so you couldn't spy on rivals on other landmasses before meeting them in person. I think it's useful to compare this ability to the Trade Mission. In the early game, a trade mission will net you around 800 gold, rising to over 2500 gold towards the late game. That's enough gold to BUY the maps of every civilization outright, with plenty left over. And you can always get map info for free with Open Borders, or even without, as Great Merchants can explore rival territory. So the ability doesn't seem broken. It will give you the maps of civilizations who won't trade with you when you can't be bothered to scout them out the slow way. You could then resell those maps, but you'd always make more gold on a trade mission.

Great Prophet:
Mediator. Imagine how annoying this ability would be in the hands of the AI. You just barely scraped together an attack force and only have a short time window to strike against the resident warmonger before he reaches tech parity. Suddenly some douche on another continent uses one of these. Also imagine how broken these would be in tight space/culture races (both in the hands of the player and the AI). Too powerful and un-fun.

I think I explained this ability poorly. A mediator would stop all wars against the player who uses him; and prevent any civilization from declaring war in the next 10 turns but only against that particular player. A mediator on another continent would never affect you, the player. The ability is actually very similar to the mediator event (which gives the player the option to immediately end a current war) and the Apostolic Palace/United Nations peacekeeping mission (which ends all wars against a target player.) In both cases, war can't be re-declared for 10 turns. So, sure, having a Great Prophet lying around in a tight space or culture race would be useful (but it would mean one less Scientist or Artist who could actually contribute to the victory) but since the ability can be replicated in other ways, I don't see it as too powerful.

I actually think the Great Engineer "Resupply" ability might be too strong. Healing all your units AND restoring their attack and movement effectively doubles your army strength for one turn. I'm thinking of reshuffling that bonus, adding an eighth ability, and calling it Draft 2.
 
Top Bottom