Help Request for Flavor project

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
Khalighnayao on discord and I have been working on improving our list of flavors for improving the AI for the selection mechanism it uses for Developing Leaders (as well as to improve the leader personality definitions quite a bit.)

This leaves some other places where a bunch of new flavors need to be considered in those game objects that will need to be reviewed. He's got the Developing Leaders and Complex Traits he's been working on but this leaves us with a few other game objects that will be needing immediate updating on Leader Flavors.

One of them, a VERY important one, is Techs.

If I can use the new flavors only for the new techs that would be great - that way I don't have to come up with some temporary new tag for those. But to do that, I need someone to review all the techs we currently HAVE and consider them for this NEW list of flavors that are much more expanded than what we have now.

Some of the old flavors may even be completely retired or split up and won't even be IN the game soon. There's a few programming spots I'll need to update as a result.

Anyhow, the rules for this project would be that we can select as many flavors for a tech as are actually applicable and those that do apply should get a rating between 1 and 10 for how strongly they apply.

If you want to help and you need more guidance, cool let me know. I will also need help wherever else flavors are going to apply - I think civics are another place for them?

Flavors on the game objects help to give that object, as a selection, more weight to leaders that have those flavors on their personality xmls so that, for example, if a leader has a flavor of gold weighted at 5 and a tech has a gold weight of 5, they will be multiplied together to add that +25 to the AI weight for that leader to select going after that tech as a priority, so they help the leader selections to vary.

Anyhow, here's the list of the old flavors:
FLAVOR_CULTURE
FLAVOR_GROWTH
FLAVOR_MILITARY
FLAVOR_SCIENCE
FLAVOR_PRODUCTION
FLAVOR_CULTURE
FLAVOR_RELIGION
FLAVOR_GOLD


And here's the expanded list of flavors that need to be employed from here:
FLAVOR_HAPPINESS
FLAVOR_HEALTH
FLAVOR_MILITARY_QUALITY
FLAVOR_MILITARY_QUANTITY
FLAVOR_MILITARY_ATTACK
FLAVOR_MILITARY_DEFENSE
FLAVOR_POLITICS
FLAVOR_RELIGION_ACCEPTANCE
FLAVOR_RELIGION_DEDICATED
FLAVOR_TRADE
FLAVOR_PROPERTY_CONTROL_CRIME
FLAVOR_PROPERTY_CONTROL_DISEASE
FLAVOR_PROPERTY_CONTROL_AIR_POLLUTION
FLAVOR_PROPERTY_CONTROL_WATER_POLLUTION
FLAVOR_PROPERTY_CONTROL_EDUCATION
FLAVOR_PROPERTY_CONTROL_TOURISM
FLAVOR_MILITARY
FLAVOR_RELIGION
FLAVOR_PRODUCTION
FLAVOR_GOLD
FLAVOR_SCIENCE
FLAVOR_CULTURE
FLAVOR_GROWTH
FLAVOR_ESPIONAGE
FLAVOR_FOOD
FLAVOR_COMMERCE


Khalig's work on things has been incredible and should really help a lot to improve our leaders and if we can get a bit of help updating flavors in other places in the xml, we can proceed MUCH faster in our projects as they are coming together rapidly now.

Anyone willing to help with this? Have any questions? We could use a team of assistance on this project and divide up the techs and civics list perhaps. Anyhow, comments, questions, concerns, offers? Thanks!
 

ranagrande

Chieftain
Joined
Aug 4, 2009
Messages
37
I'd be interested in helping with this. I do have some questions, though.

First, how are we collecting these? Are we just sending a list of numbers to you, or do we need to know the coding?

How do AI's select techs? Do they just choose one at a time, or will they make longer tech paths? If the former, should flavor weights take into account techs that don't necessarily match the given flavor but are prerequisites for techs that do?
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
First, how are we collecting these? Are we just sending a list of numbers to you, or do we need to know the coding?
I was thinking on this earlier. I'll probably make a quick and easy google spreadsheet and that way anyone who wants to help can do so in realtime and just get in and take it an item at a time here and there, myself included. Then once all techs or all civics or whatever are done, I can just race through and put them all into the xml. The xml coding is easy formatting but this would be the faster way to think it through for now I think.

How do AI's select techs?
There's quite a bit of coding in the dll to help the AI determine which techs to value and when and why that takes into account current game state variables, known needs that certain upcoming techs can provide (if at war, then rate war techs higher), an evaluation of the honest raw value of a tech itself (but it can find one to beeline which can lead to lesser techs being prioritized so as to get to the beelined techs faster), optimizing for 'first to tech' unclaimed benefits, and so on and so on and then a personality factor.

The personality factor IS the flavor of the tech and IF and how strongly that flavor matches to the flavors of the leader XML. Since the leader XMLS are gunning for an update, all these other game objects that have flavors need to have theirs updated to the varieties in the new list. If a flavor is 0 and a leader has that flavor of 10, then that tech doesn't add any flavor value to the selection strength. But if a flavor is 5, and the leader has a 10 in that flavor value than an additional 50 pts is added to the total numeric weight of making that the selected tech.

Then, IIRC, there is also a little random value assigned to each tech selection possible as well. The tech with the highest weight comes back the one the leader selects to aim for. Every now and then the leader may reevaluate but usually once it's selected a tech it sticks with that selection until it gets it and has to evaluate again. I think big changes in the game like war can cause another evaluation check.

If the former, should flavor weights take into account techs that don't necessarily match the given flavor but are prerequisites for techs that do?
It might. I'm not 100% sure on some of those details. The last person to really get into the coding on leader tech selections was Koshling and I have an understanding enough to follow and find out those kinds of answers if I wanted to and implement deeper thinking like that if I wanted to but for now it's not a strong priority. I just know that we need to update the flavors for the techs themselves so we have to think directly on what the tech is about to come up with the flavor ratings and yes it can be a LITTLE arbitrary, even possibly a touch misleading.

Classically, only 2 flavors were given per tech, even per leader - I don't want any of us to feel so constricted. If you want to give some value in every flavor to a tech, fine as long as it deserves it. I do think it looks deep enough at techs past what it can research NOW that we don't need to give tourism flavor to a tech that has nothing to do with tourism but does appear to lead to a tourism tech a little later. The tech tree CAN be subject to shifting and when we do, we don't usually review the flavors of the tech - it should remain considering pretty much just the tech itself and let the code find the later tech as a desired target for its own reasons.

I'll start up that spreadsheet today.

I THINK it's buildings, techs, and civics that need flavors. Units and promos do not. I'll look later to see if other game objects will need to be considered as well.


On a side note- welcome to the team then ranagrande! Another in a growing list of awesome people!
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,395
Location
Poland
Yep, trait, building, tech and civic infos have flavors.
But religion and unit infos also have flavors too.

For example UNIT_AGENT has

Code:
<Flavors>
                <Flavor>
                    <FlavorType>FLAVOR_ESPIONAGE</FlavorType>
                    <iFlavor>1</iFlavor>
                </Flavor>
            </Flavors>

RELIGION_JUDAISM has
Code:
<Flavor>
                   <FlavorType>FLAVOR_MILITARY</FlavorType>
                   <iFlavor>0</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_RELIGION</FlavorType>
                   <iFlavor>2</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_PRODUCTION</FlavorType>
                   <iFlavor>0</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_GOLD</FlavorType>
                   <iFlavor>2</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_SCIENCE</FlavorType>
                   <iFlavor>2</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_CULTURE</FlavorType>
                   <iFlavor>2</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_GROWTH</FlavorType>
                   <iFlavor>2</iFlavor>
               </Flavor>
               <Flavor>
                   <FlavorType>FLAVOR_ESPIONAGE</FlavorType>
                   <iFlavor>1</iFlavor>
               </Flavor>
           </Flavors>

Leader Head infos is what demands flavours, like Agent with Espionage flavor of 1 will be more likely to be built by leaders that have Espionage flavor.
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
Unit flavors shouldn't be necessary to update for now because nowhere in the planned outlook would they require any - though for an automative mechanism of compiling flavors on techs based on the flavors of what the tech gives access to, it could be helpful later to assign flavors to them, particularly with the military flavors being split into more layers of depth as they are now and maybe we can build into the selection system SOME cause for those flavors to matter later as well. But suffice it to say I don't need units to get any adjustments or updates at the moment.

Leaderheads are something Khaligh was going to address. It's interesting that religions have flavors... that's not very difficult to update but that's good to know - thanks Rax!
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
I was able to find and figure out how to use Koshling's xml scanning tool (used for more limited functionality than what I was originally trying to do with it, this thing is amazing!) and now our Flavor Update Project document has ALL Techs, Civics, Buildings, and Religions listed. I wonder if we'll need corporations too... anyhow, it's an overwhelming list but if we can all try to nip away at it here and there it would help I think.

Again...
https://docs.google.com/spreadsheet...rcznJPofyWWIrlBx0WtXFP8FU/edit#gid=1313519094

There is some question as to whether we will still need Military and Religion as normal flavors at the moment... let me get with Khalig on that.
 
Last edited:

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,395
Location
Poland
I was able to find and figure out how to use Koshling's xml scanning tool (used for more limited functionality than what I was originally trying to do with it, this thing is amazing!) and now our Flavor Update Project document has ALL Techs, Civics, Buildings, and Religions listed. I wonder if we'll need corporations too... anyhow, it's an overwhelming list but if we can all try to nip away at it here and there it would help I think.

Again...
https://docs.google.com/spreadsheet...rcznJPofyWWIrlBx0WtXFP8FU/edit#gid=1313519094

There is some question as to whether we will still need Military and Religion as normal flavors at the moment... let me get with Khalig on that.
You got no cost buildings in spreadsheet

I cleared up all lists - that scanning tool apparently caught some bullcrap like overrides and no cost stuff.
 
Last edited:

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
You got no cost buildings in spreadsheet

I cleared up all lists - that scanning tool apparently caught some bullcrap like overrides and no cost stuff.
Perfect way to start.

Also still determining with Khalig whether some of the original legacy categories that have been divided up still also need the more generic flavor in the game still. They may. We'll soon know.
 

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,395
Location
Poland
Why do we even need specific property control flavors? Is it equivalent of yields and commerces?
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
Why do we even need specific property control flavors? Is it equivalent of yields and commerces?
Because we have traits that focus on those as their specialty, as well as civics and so on. Without them, we are a bit too 'interpretive'. It helps to be able to say there are leaders that specifically care about those things above other things. There are lots of buildings that only manipulate crime - ok, so crime as a whole CAN be assumed to manipulate gold and happiness factors, but it's a lot more than that and as we move forward into some other projects here, crime and disease in particular will get a lot more varied potentially in results. And that's where it began to become necessary. Things like tourism - you can see some leaders really being enamored with the idea of enhancing tourism. Some could be highly focused on bringing up Education.

It is even possible that we could put negative values on some of these things (up to -10) so that we have some leaders that LIKE to nurture crime as a strategy, for example. Or those that want a low Education to keep his people stupid so that he can go to war without so much weariness or change civics easier.
 
Last edited:

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
Khalig had the idea to assign these by an automatic assignment mechanism based on the tags that are used and deriving a value there, then compiling all the objects on techs and getting a compilation for tech flavors from what the tech gives.

I'm looking at a very large list here, I think we all are, thinking, wow this is pretty enormous as a project, but then is it equally as enormous to think of figuring out how to autocost based on tag usage as we sorta have with traits (though we've done it with human interpretation)? There's a LOT of building, civic, etc... tags. That would be a very different way to approach this. I'm curious what everyone thinks about that though. Initially I'm thinking if we all just kinda dive in with a human interpretive approach, for now it would be faster to compile - even if imperfect because we're all establishing a different sense of judgement perhaps.

Any ideas as to how we can make this kind of project not so monstrous?
 

ranagrande

Chieftain
Joined
Aug 4, 2009
Messages
37
Should buildings and other things unlocked be accounted for in tech weights? There are lots of techs that don't offer anything of a particular flavor, but give access to buildings that do. Will the AI be able to choose a tech because it wants the building, or do we need to nudge it there first?
 

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,395
Location
Poland
Should buildings and other things unlocked be accounted for in tech weights? There are lots of techs that don't offer anything of a particular flavor, but give access to buildings that do. Will the AI be able to choose a tech because it wants the building, or do we need to nudge it there first?
Nope as buildings and units might get different tech requirements eventually.
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
I'm kinda thinking more that that's exactly how I'd figure out what a tech should be flavored towards, by looking at what it unlocks. Mind you, this does mean that it can easily end up flawed later, which then gets back to the argument that it might be better to work out a tag to flavor translation on buildings (and maybe units for this purpose), civics, etc, and then summarize and normalize in the code at mod load to determine flavors on the techs... Which would mean that rather than going about this as an evaluation of flavors, we should perhaps be looking at an evaluation of tags on buildings and so on to determine how to translate those tags to an expression of flavors first? That way if a building does change tech prereq, the code auto adapts the flavors for the tech...

The problem there is that a lot of the nature of something is in more than just the tags on a clinical evaluation level. How would we tell the code that a unit is Military, Defensive rather than Offensive based on its tags alone?
 

Maltazard

Prince
Joined
Nov 19, 2008
Messages
304
A basic starting point would be differentiating units that can't receive defensive bonuses as purely offensive. Cavalry, tanks, a few siege units. Or, you could create two new subclasses in the ongoing unit review, and distribute them accordingly, making it more accurate. Most units would be both offensive and defensive but not all.
 

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,192
Location
Las Vegas
A basic starting point would be differentiating units that can't receive defensive bonuses as purely offensive. Cavalry, tanks, a few siege units. Or, you could create two new subclasses in the ongoing unit review, and distribute them accordingly, making it more accurate. Most units would be both offensive and defensive but not all.
Yeah, but this is considering the possibility of just looking at stat tags alone to determine flavors - obviously there are some tags that ARE good indicators for def vs off - maybe it could be done. We could also just do like a basic declaration somewhere as a tilt to help the tags to culminate in a flavor determination too. Something much more simple than assigning the flavors as a whole.

Maybe it could be done and we should be looking to establish the formulas, by tag and tag value, for the code to determine flavor rather than going through all the objects...

In which case we need to be looking at the tags and creating the formulas there rather than looking at the objects themselves. Which would mean I need to take our document and get a list of all tags for civics, buildings, etc...

This would make it work much more like the traits do but without the effort applied to get the traits to all measure their WORTH in terms of the flavors as much.
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,309
Let's be honest:
This mod is only about 10% fully cooked, and that's if we're generous about it.
Just imagine your grandkids playing C2C v.123 and laughing at their classmates playing Civ X, where you can roleplay each unit CK3-style, but you can only play 10 units per civ.
While in C2C v.123 you also can roleplay units, but on Pit's map v.10.10 with my modmod letting you play any of the 300 existing civs simultaneously.
Just kidding... or am I?
:crazyeye::crazyeye::crazyeye::crazyeye::crazyeye::crazyeye::crazyeye::crazyeye::crazyeye::crazyeye:
 

ranagrande

Chieftain
Joined
Aug 4, 2009
Messages
37
Yeah, but this is considering the possibility of just looking at stat tags alone to determine flavors - obviously there are some tags that ARE good indicators for def vs off - maybe it could be done. We could also just do like a basic declaration somewhere as a tilt to help the tags to culminate in a flavor determination too. Something much more simple than assigning the flavors as a whole.

Maybe it could be done and we should be looking to establish the formulas, by tag and tag value, for the code to determine flavor rather than going through all the objects...

In which case we need to be looking at the tags and creating the formulas there rather than looking at the objects themselves. Which would mean I need to take our document and get a list of all tags for civics, buildings, etc...

This would make it work much more like the traits do but without the effort applied to get the traits to all measure their WORTH in terms of the flavors as much.
This is probably the way to go. There will necessarily be some overlap between offense and defense for instance, but there should be enough to set them apart. Like Maltazard said, units that don't receive defensive bonuses can be considered purely offense. There are lots of buildings that add defensive bonuses to a city, and those are all purely defense.

Is it possible for the tags to be dynamic? The earliest example I'm thinking of is the Cave Dwelling tech, which is great militarily for both Attack and Defense. But once someone else builds the Neanderthal Culture wonder, it has much less military value, and that all on defense now with caves and the option to promote to City Garrison.
 
Top Bottom