Modding XML Data in The Witcher 3

From Witcher Wiki
Jump to: navigation, search

Accessing XML files[edit | edit source]

To access XML files, you need to unpack it from bundle files - Unpacking The Game.

Items Stats[edit | edit source]

Items stats are specified in files def_item_* in gameplay/items (NG) and gameplay/items_plus (NG+) folders.

Gwent Cards[edit | edit source]

Gwent cards stats are specified in files def_gwint_battle_king_cards.xml and def_gwint_cards_final.xml in gameplay/items (NG) and gameplay/items_plus (NG+) folders.

Loot[edit | edit source]

Gwent cards stats are specified in files def_loot_* in gameplay/items (NG) and gameplay/items_plus (NG+) folders.

Traders Inventory[edit | edit source]

Traders inventory is specified in gameplay/items/def_loot_shops.xml and gameplay/items/def_loot_shops.xml files.

Remember that changes made in gameplay/items will be visible only in New Game, and gameplay/items_plus in New Game+.

Traders[edit | edit source]

<loot name="example trader"	player_level_min="0"	player_level_max="0"	quantity_min="999"	quantity_max="999"	chance="-1">
  • loot name - Name of the trader.
  • player_level_min, player_level_max - Not used, always set to 0 for traders.
  • quantity_min - Minimum amount of coins trader will have.
  • quantity_max - Maximum amount of coins trader will have.
  • chance - Not used, always set to -1 for traders.
    Note: If you want the chance to be a value like 20%, 35%, 50%, or 75%, you need to modify chance to chance=".20" for 20%, chance=".35" for 35%, chance=".50" for 50%, or chance=".75" for 75% percent. A value of 1 equals 100%, and anything above 1 will not be interpreted by The Witcher 3. This information relates to version 1.31 of the game. It is true for files like def_loot_monsters.xml, def_loot_shop.xml, etc.

Items In Traders Inventory[edit | edit source]

<loot_entry name="example item"    player_level_min="0"	player_level_max="0"	quantity_min="3"	quantity_max="5"	chance="-1"/>
  • loot_entry name - Name of the item.
  • player_level_min - Minimum level player needs to buy item.
  • player_level_max - Not used, always 0.
  • quantity_min - Minimum quantity of the item trader will have.
  • quantity_max - Maximum quantity of the item trader will have.
  • chance -Chance for the item to appear in trader inventory. -1 means it will be always there.
    Note: If you want the chance to be a value like 20%, 35%, 50%, or 75%, you need to modify chance to chance=".20" for 20%, chance=".35" for 35%, chance=".50" for 50%, or chance=".75" for 75% percent. A value of 1 equals 100%, and anything above 1 will not be interpreted by The Witcher 3. This information relates to version 1.31 of the game. It is true for files like def_loot_monsters.xml, def_loot_shop.xml, etc.

Packing XMLs[edit | edit source]

To see any changes in game, you need to pack modified xmls and include packed bundle file with metadata in your mod, also make sure you have original folder structure before packing. To pack xmls, use MODkit