Difference between revisions of "Modding:PVEMissions:loot.xml"
From Galactineers
Jump to navigationJump to searchLInsoDeTeh (talk | contribs) (Created page with "{{DISPLAYTITLE:loot.xml}} Category:Modding:PVEMissions") |
LInsoDeTeh (talk | contribs) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:loot.xml}} | {{DISPLAYTITLE:loot.xml}} | ||
+ | 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. | ||
+ | ==File Defintion== | ||
+ | The contents of the file look like this: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <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> | ||
+ | </source> | ||
+ | |||
+ | ==Options== | ||
+ | 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: [[Modding:IDLists:ShipModules|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 [[Modding:PVEMissions:shipdefinitions.xml|shipdefinitions.xml]] file for that mission. | ||
+ | * '''<Resources>'''. Transfers resources to each player. It contains subnodes named '''<Item>''' with the following attributes: | ||
+ | ** '''Type''': Defines the resource type: 1 = [[Modding:IDLists:Blocks|Block]], 2 = [[Modding:IDLists:CollectableItems|Collectable Item]], 3 = [[Modding:IDLists:BuildableItems|Buildable Item]] | ||
+ | ** '''Index''': The Id taken from the according ID list of the ''Type'' defined before. | ||
+ | ** '''Amount''': The amount of items of that type given to the players. | ||
+ | |||
+ | The number of <ShipConstructionPlan>, <Money> and <Item> lines in the file may not exceed 6 added together. | ||
+ | |||
+ | ==Example== | ||
+ | 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 [[Modding:PVEMissions:shipdefinitions.xml|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. | ||
+ | |||
+ | |||
+ | |||
[[Category:Modding:PVEMissions]] | [[Category:Modding:PVEMissions]] |
Latest revision as of 12:30, 15 March 2016
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.
File Defintion
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>
Options
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:
- Type: Defines the resource type: 1 = Block, 2 = Collectable Item, 3 = Buildable Item
- Index: The Id taken from the according ID list of the Type defined before.
- Amount: The amount of items of that type given to the players.
The number of <ShipConstructionPlan>, <Money> and <Item> lines in the file may not exceed 6 added together.
Example
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.