The loot.xml file defines the loot/rewards for the players, when they win the mission. All resources and items in the loot will be placed in a 'loot box'. The loot box for each player spawns in the sandbox world near the green question mark of the PVE mission location. A ship can interact with it and take the money/resources from the box.
The contents of the file look like this:
<Loot> <Unlock ShipModuleId="132" /> <Money Amount="1000" /> <ShipConstructionPlan Id="Rosinante" /> <Resources> <Item Type="1" Index="6" Amount="20" /> <Item Type="3" Index="2" Amount="10" /> </Resources> </Loot>
The <Loot> node can contain the following subnodes:
- <Unlock>. Unlocks a ship module in he ship designer. The attribute ShipModuleId defines the ship module to unlock. The Id's can be looked up here: Ship Modules ID List. There can be a maximum of 6 <Unlock> nodes in the file.
- <Money>. Transfers a certain amount of money to each player. The attribute Amount defines the amount of money transferred. The maximum value is 9999. There can be only one <Money> node in the file.
- <ShipConstructionPlan>. Provides a new ship construction plan for research to each player. The attribute Id is one of the IDs defined in the shipdefinitions.xml file for that mission.
- <Resources>. Transfers resources to each player. It contains subnodes named <Item> with the following attributes:
The number of <ShipConstructionPlan>, <Money> and <Item> lines in the file may not exceed 6 added together.
In the above example, the following things are given as a reward to the players:
- The ship module with the Id 132 (the 'Caranum Logo' sticker) will be unlocked in the ship designer.
- A total of 1000 credits will be added to the loot box.
- A ship constraction plan for a ship from the shipdefinitions.xml file with the Id 'Rosinante' will be added to the loot box.
- 20 blocks (Type = 1) of the material 'Red Granite' (Index = 6) will be added to the loot box.
- 10 buildable items (Type = 3), the 'White Buoy' (Index = 2) will be added to the loot box.