[BNW] How do flavors actually work?

Iconian

Chieftain
Joined
May 16, 2021
Messages
73
How do flavors work, most specifically with regard to unit/building costs and usefulness?

Let's say there's a combat unit that costs 25 production and has 5 attack, and another unit that costs 150 production and has 10 attack. How should I assign each of them with Offense/Defense flavors, and how would the AI interpret those flavors?

The more expensive unit is going to be a lot better at pure attack, as long as cost isn't considered. But for the cost the cheaper unit is probably preferable in a lot of situations.

Does the AI look at the cost of things, in addition to the flavors? Or does the AI not factor in the build cost, and instead just looks at how high the flavor of something is, determining what to build with the flavor exclusively in mind?
 
i haven't done much with the flavors.
but i believe a -999 flavor tells the ai too not ever build something.
150 will make the ai build it with top priority.
i believe the ai does take a slight consideration into the build time im not sure so don't quote me, i know they at least take cost into consideration when dealing with other certain matters but im not positive about units. the only ai stuff i've done has been in the ai defines regarding technologies and settlement mostly i like to make the ai's B line more in the tech tree and settle more cities.
the higher the flavor the higher the priority for the ai, but you must also think more like the ai as to the purpose of the unit. the ai will be building specific things for specific reasons
you should consider what you want the difference between the 2 units to be.
it should probably be recon defense and offence.

what i would do is make the defense or recon flavor higher on the 5 strength unit higher then that of the 10 strength.
this would hopefully have the ai use the weak units as recon risking the weak units early on or to build a weak but fast defensive.

in theory i believe this is how it goes.

since the strength is 5 and 10 lets look at a civ unit like that the warrior

<Row>
<UnitType>UNIT_WARRIOR</UnitType>
<FlavorType>FLAVOR_RECON</FlavorType>
<Flavor>1</Flavor>
</Row>
<Row>
<UnitType>UNIT_WARRIOR</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>
<Row>
<UnitType>UNIT_WARRIOR</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>

lets make the 5 strength more defense oriented
(since it is weak it should prioritize defense where it has the homefield advantage and a city to defend it and vise versa)

<Row>
<UnitType>UNIT_5 STRENGTH</UnitType>
<FlavorType>FLAVOR_RECON</FlavorType>
<Flavor>1</Flavor>
</Row>
<Row>
<UnitType>UNIT_5 STRENGTH</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>1</Flavor>
</Row>
<Row>
<UnitType>UNIT_5 STRENGTH</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>

lets make the 10 strength more offensive oriented

<Row>
<UnitType>UNIT_10 STRENGTH</UnitType>
<FlavorType>FLAVOR_RECON</FlavorType>
<Flavor>1</Flavor>
</Row>
<Row>
<UnitType>UNIT_10 STRENGTH</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>2</Flavor>
</Row>
<Row>
<UnitType>UNIT_10 STRENGTH</UnitType>
<FlavorType>FLAVOR_DEFENSE</FlavorType>
<Flavor>1</Flavor>
</Row>

these tell the ai how to use the unit not just build it.
since the offence is higher the ai will be more likely to build these when mounting an attack.
it will also use this unit more when fighting being more likely to attack enemy units with this unit.
 
Last edited:
if the ai does factor build cost for units it will probably be in the ai defines or global defines or another defines file. again, I'm not positive but it might be a good start point for someone looking into that.
 
Last edited:
Top Bottom