modding-guide

Modding Infotips (tooltips)

You can mod the infotips this way: https://github.com/jakobharder/anno1800-mod-loader/blob/main/doc/modloader11.md#patching-infotip-exportbin You can extract the vanilla “data\infotips\export.bin” file with the FileDBReader (https://github.com/anno-mods/FileDBReader/releases) and the FileFormat “infotip.xml”. Alternatively I attached the extracted file in the modding discord channel here: https://discord.com/channels/578443209940926465/1146098268850376816/1149910673678159964

For valid text-embed commands (I mean these [Selection Object …] things you find in the file and texts), see the textsourcelist.json file from the game (unfortunately a bit outdated though..) or this huge list of textsource commands lua ENUMs while you can not directly use the wording from the link since it is lua form, see also textembeds )

Enums

Infotips are called InfoTipData in the code and are adressed as usual by Guids. Infotips use a lot of numbers to express operations. By default all non-defined integer values are 0. We have to test and find out the meaning ourself. Here what we already found out (no guarantee that it is correct):

Code Snippets

To add a separator line (but they are as buggy as the vanilla lines below headers. Sometimes they are visible, sometimes not..)

<InfoElement>
  <ElementType>6</ElementType>
  <VisibilityElement>
    <ElementType>
      <ElementType>2</ElementType>
    </ElementType>
    <OperatorType />
  </VisibilityElement>
  <Text>
    <Style />
  </Text>
</InfoElement>