1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Leader personality matrix

Discussion in 'Civ4 Strategy Articles' started by fengertao, Mar 1, 2006.

  1. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    Diplomatism is very important in CIV, you must know the personality of other country leader to do good Diplomatism.
    The personality of leaders is defined in Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml. However, it is in XML format, very hard to get a clear version and very hard to compare aspect among leader.
    I Have write a small Java application convert the xml to a excel file (another reason is to practice my XML programming). and I make some comment to some important attribute and to some leader. maybe the comment incomplete or inaccurate, your comment are welcome.
    If somebody think this table is useful, I will try to convert and post more matrix, right now I'm think about handicap matrix.
    -------------------------------------------------------------------------
    @March 20 2006
    3 more matrix uploaded:Handcaip, Technology and Unit.
    Acturely, only Handicap.zip are very useful, other 2 zip file isn't so useful.
     

    Attached Files:

  2. kingjoshi

    kingjoshi King

    Joined:
    May 28, 2002
    Messages:
    1,745
    Location:
    Columbus, OH
    Thanks. Btw, could you also give the source? Did you use xerces xml parser?
     
  3. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    Very interesting, fengertao! I also made Excel spreadsheets of LeaderheadInfos and HandicapInfo, you can find the links in my sig. Any chance that you provide us this xml-xls convertor?
     
  4. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    Very glad to see that some friend like see my source.
    As my code, acturely it is ugly because it is write for quick result.
    (1)this application cannot run on DB other than excel, the reason is I'm to lazy to calculate the max length of each column, so I hard code the column length to 50. if some column longer than 50, in Excel it will run okey, but other DB maybe trunked or crushed.
    (2)still need a little manual analsys on XML, to find out the "Composit Element" and the maximam element number. Also because I'm too lazy. Maybe I can do it in future.
    (3)lot of variable/method of a bad name, very few comment and lots of duplicated code

    the attachment is the source code.
    the logic is defined in PlainXML2Table.java and Column.java.
    the parameter is hardcoded in LeaderChar2Table.java

    I run the App in SUN JDK 1.4.2, write Excel file by JDBC-ODBC bridge.
    to run it:
    (1) define ODBC source by windows control panel
    (2) modify the parameter of LeaderChar2Table.java (at least you need modify xmlPath and dbUrl)
    (3) compile and run LeaderChar2Table
     

    Attached Files:

  5. Zombie69

    Zombie69 Chieftain

    Joined:
    Nov 22, 2005
    Messages:
    1,898
    Can't Excel import XML already?
     
  6. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    @Zombie69
    I have Office 2000 in my PC, and I Havn't find the "import" function.
    Is this a new feature of Office XP? or this feature is hided too depth to find out in Office 2000.
     
  7. kingjoshi

    kingjoshi King

    Joined:
    May 28, 2002
    Messages:
    1,745
    Location:
    Columbus, OH
    Office XP can open up an XML file. But it's quite different in it's output.

    It becomes a 3MB file that's horrendous...
     
  8. DaveMcW

    DaveMcW Chieftain

    Joined:
    Oct 8, 2002
    Messages:
    6,489
    You can count on any leader with 8+ iBasePeaceWeight to leave you alone.
     
  9. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    If you have too weak army, and bad attitude, there are chance even Gandhi (iBasePeaceWeight = 10)will declare war against you
     
  10. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    Sorry to everybody, yesterday attached LeaderCharMatrixSrc.zip cannot run at all because I do a bad modify before upload.
    I have fixed it and uploaded agin.
    this version still cannot process tag format as
    <Goodies>
    <GoodyType>GOODY_HIGH_GOLD</GoodyType>
    </Goodies>
    I will fix it and upload new version.
     
  11. Zombie69

    Zombie69 Chieftain

    Joined:
    Nov 22, 2005
    Messages:
    1,898
    I only have Office 2000 myself and i'm pretty sure you can do it there.
     
  12. PieceOfMind

    PieceOfMind Drill IV Defender Retired Moderator

    Joined:
    Jan 15, 2006
    Messages:
    9,312
    Location:
    Australia
    Thanks fengertao!:goodjob: This looks really handy.
     
  13. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    3 more matrix uploaded into this thread
     
  14. cabert

    cabert Big mouth

    Joined:
    Dec 14, 2005
    Messages:
    7,710
    Location:
    France
    someone cares to explain the different values (thanks for the first one DaveMcW for iBasePeaceWeight)
    What is iWarmongerRespect? you get +2 from alexander if your army is strong?

    some are obvious :
    iTechTradeKnownPercent
    * Mansa Musa 0
    * Tokugawa 100
     
  15. maltz

    maltz Chieftain

    Joined:
    Jan 24, 2006
    Messages:
    967
    In the personality matrix I can see that Monty is stated as "never build wonders".

    In my current game actually Monty did so well that he built both the Pantheon and the Oracle. Here is the screenshot.

    monty_wonder.jpg
     
  16. atreas

    atreas Chieftain

    Joined:
    Jan 10, 2006
    Messages:
    799
    Location:
    Greece
    It's strange - it's true that Monty is on "never build wonders". Perhaps the Deity level that you play affects him maltz :). (Btw, it's Parthenon).

    Another thing: the easier way to import an XML file in Office is just to use Access (and then, if you like it, you can export them to Excel).
     
  17. fengertao

    fengertao Chieftain

    Joined:
    Feb 27, 2006
    Messages:
    12
    The Oracle are building in Teotihuacan & Tenochtitlan, So Monty build it by self instead of highjack from somebody else.

    In the screenshot the cost of Oracle are 450 Hammers, so this is a marathon speed game. don't know other game setting.

    Maybe there are modifier for "'iWonderConstructRand" base on game setting (map type, map size, game speed, diffculty ...). I havn't the game in hand, will try to check this later.
     
  18. cabert

    cabert Big mouth

    Joined:
    Dec 14, 2005
    Messages:
    7,710
    Location:
    France
    for the monty mystery, i can think of three good reasons:
    - random personnalities checked
    - modifiers to iWonderConstructRand, when (as example) AI is first o have a tech and/or has the specific ressource
    - game mechanics going on BEFORE iWonderConstructRand even comes into account. I mean it may well be that regardless of this personnality variable, an AI with a tech leading to very high value wonders (as oracle) and with the specific ressource don't even think twice and start building, but not as a random fact, so don't make a calculation based on iWonderConstructRand.

    my 2 cents
     
  19. maltz

    maltz Chieftain

    Joined:
    Jan 24, 2006
    Messages:
    967
    In this game Monty does have Marble to start. He didn't found Hinduism (Elizebeth did), but seemed to use the free tech from Oracle to found Judaism (so at least he has Priesthood to build Oracle). It only gave him diplomatic trouble, though, as he is the only Judaism Civ in the Pangaea.

    BTW I didn't check the random personality box. The game was Deity, Marathon, Standard Pangaea, 14 Civs.
     
  20. cabert

    cabert Big mouth

    Joined:
    Dec 14, 2005
    Messages:
    7,710
    Location:
    France
    so it seems that there is a game mechanic somewhere that says "Go for oracle hen you have marble, on a deity marathon standard pangea game";)

    No kidding, I'm pretty sure there are modifiers/game rules for prince+ levels, as well as for specific ressources. When you see an AI going for Masonry, you know he's got stone or marble. It would make no sense going for Masonry and not using it, would it?
     

Share This Page