How to edit .character files

Discussion in 'Tutorials' started by Flutters, Apr 15, 2019.

  1. Flutters

    Flutters Champion

    Joined:
    Sep 1, 2018
    Messages:
    41
    Likes Received:
    43
    Trophy Points:
    18
    Sorry if more official tutorials were planned, but it's been a while and there aren't any instructions on the forums yet on how to edit character files.

    Character files have the .character extension and their content is in XML format. You can use any text editor to edit them. They contain information about a civilization like equipped gear, advisors, milestones, available units/techs and more.

    How to change equipped gear
    Every equipped item has to be declared inside <traits> </traits> like this:
    <trait used="true" level="43" seed="65535" protounit="Gr_Civ_Villager">Tools_DHOC</trait>
    This will equip a greek villager with a fully maxed level 40 Divine Hammer of Construction.
    Item levels shown in-game are always 3 levels lower than the one shown in the game files.
    By default all items will have base stats. You can change this by providing a seed value. The one in this example (65535) means two stats will be maxed, and in the case of most villager tools all gathering rates (and hidden carry capacity bonuses) are "linked" with a seed offset so a seed which provides 2 maxed stats will be enough here.
    The protounit value is used to know which unit/building will have the item equipped. You can find them using aoedb.net or simply by editing already existing .character files with all units/buildings listed.
    Tools_DHOC is the name for the item, you can find them in traits.xml which is located inside Data.bar in the game files (you need to extract it with a third party program). It's easier to find what you're looking for if you search for their displayid shown in stringtablex.xml inside the game's DATA folder (not inside Data.bar). You can also use the game's public REST API or something else to find these names.
    An easy way to determine what stats a seed value will provide is to convert the seed value to hexadecimal. For example 65535 is equal to 0xFFFF in hexadecimal. 2 hexadecimal numbers are mapped to each stat, starting from the last 2 numbers. 0xFF is the maximum value and 0x00 is the lowest. However 0x00 will give base stats. So 16776961 (0xFFFF01) will make the first stat max nerfed, but the second and third ones max buffed. It's important to note this order depends on the order they're shown in traits.xml (not in-game) and there are also seed offset values for some items.
    The maximum possible seed number is capped at 2147483647 (0x7FFFFFFF), so it's impossible to have a maxed 4th stat. This explains why people claim they never saw a buffed Ancient Trojan Guard Chiton (they have a hidden carry capacity stat). I think this is probably not intended because it wouldn't make sense if it was intentional and it's the same value as the highest possible value in a 32 bit signed integer.

    How to add milestones
    You can enable their effects by adding their corresponding tech inside <activetechs> </activetechs> like this:
    <tech status="Active" persistentcitystatus="Active">C03_L30_A</tech>
    C03_L30_A is the name of the milestone, you can find them inside techtreex.xml located in the game's DATA folder.

    How to add advisors

    Currently I haven't found any way to make them work yet. I think they're unintentionally disabled in offline mode as of now.
     
  2. Loading...


  3. Exclusive0r

    Exclusive0r Hippikon

    Joined:
    Nov 5, 2018
    Messages:
    191
    Likes Received:
    63
    Trophy Points:
    28
    Thanks.
    Where do you actual assign characters, I tried in the scenario editor Player Values but I always ended up with basic civs :)
    I assume yo messed with the advisor section of the xml in the data/char xml's I have since reading this but cannot test them LoL
     
  4. Flutters

    Flutters Champion

    Joined:
    Sep 1, 2018
    Messages:
    41
    Likes Received:
    43
    Trophy Points:
    18
    In offline mode quests, crete or skirmish mode. I don't know if it's possible to use them in scenarios.
    I tried a few different ways to enable advisors, and even enabling their techs, but nothing worked.
     
    Ardeshir and Exclusive0r like this.
  5. Exclusive0r

    Exclusive0r Hippikon

    Joined:
    Nov 5, 2018
    Messages:
    191
    Likes Received:
    63
    Trophy Points:
    28
  6. kaithe

    kaithe Villager

    Joined:
    Jul 22, 2019
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    could someone maybe upload the traits.xlm file? becauce i failed to extract the data.bar

    I was also wondering what the </protounit> line is for in the char files?
    could it maybe be used to replace unit models like with the bandits, myceanen or seapeople??
     
  7. kaithe

    kaithe Villager

    Joined:
    Jul 22, 2019
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Oke i finally found a extracter that worked for the data.bar here

    and as i expected the </protounit> line can be used to use other units for your civ like the myceanen.
    You can even add advisors units which is great because advisors seem to be dissabled. You can even add advisor units from other civs.
     
  8. Kenji03

    Kenji03 Berserker

    Joined:
    Jul 17, 2018
    Messages:
    118
    Likes Received:
    95
    Trophy Points:
    28
  9. Pharos

    Pharos Long Swordsman

    Joined:
    Sep 21, 2019
    Messages:
    18
    Likes Received:
    9
    Trophy Points:
    3
    where that file can be found?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice