• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Creating a Leader

Bonyduck Campersang

Odd lookin duck
Joined
Dec 11, 2022
Messages
4,637
XML:
<Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <FlavorType>FLAVOR_OFFENSE</FlavorType>
      <Flavor>7</Flavor>
    </Row>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <FlavorType>FLAVOR_DEFENSE</FlavorType>
      <Flavor>6</Flavor>
    </Row>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
      <Flavor>6</Flavor>
    </Row>
 
And how do these biases work? Is it a scale between 0-1?

XML:
<Diplomacy_Responses>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <ResponseType>RESPONSE_DEFEATED</ResponseType>
      <Response>TXT_KEY_LEADER_ADUD_DEFEATED%</Response>
      <Bias>1</Bias>
    </Row>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <ResponseType>RESPONSE_EXPANSION_SERIOUS_WARNING</ResponseType>
      <Response>TXT_KEY_ANOTHER_EXPANSION_SERIOUS_WARNING%</Response>
      <Bias>1</Bias>
    </Row>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <ResponseType>RESPONSE_FIRST_GREETING</ResponseType>
      <Response>TXT_KEY_LEADER_ADUD_FIRSTGREETING%</Response>
      <Bias>1</Bias>
    </Row>
    <Row>
      <LeaderType>LEADER_ADUD</LeaderType>
      <ResponseType>RESPONSE_GREETING_HOSTILE_HELLO</ResponseType>
      <Response>TXT_KEY_LEADER_ADUD_GREETING_HOSTILE_HELLO%</Response>
      <Bias>1</Bias>
    </Row>
 
And how do these biases work? Is it a scale between 0-1?

From the code (CvGame.cpp)
"The original design was to select a random text key (of uniform probability) from the set
Jon later decided that he wanted to specify a bias for each diplomacy response such that certain ones would appear more frequently."

So Bias is just an integer, but given how the Response string is used, it's probably not really used any more
 
FLAVOR_CITY_DEFENSE only seems to be used as a bias when picking policies and beliefs.
FLAVOR_DEFENSE is used for those and also picking promotions, deciding how many units to build to protect the homeland and if the AI is likely to start a war
 
Back
Top Bottom