Difference between revisions of "Modding:PVEMissions:loot.xml"

From Galactineers
Jump to navigationJump to search
(Created page with "{{DISPLAYTITLE:loot.xml}} Category:Modding:PVEMissions")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:loot.xml}}
 
{{DISPLAYTITLE:loot.xml}}
 +
 +
 +
==File Defintion==
 +
The '''loot.xml''' file defines the loot/rewards for the players, when they win the mission. 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]].
 +
* '''<Money>'''. Transfers a certain amount of money to each player. The attribute '''Amount''' defines the amount of money transferred. The maximum value is ''9999''.
 +
* '''<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.
 +
 +
==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]]

Revision as of 12:24, 15 March 2016


File Defintion

The loot.xml file defines the loot/rewards for the players, when they win the mission. 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.
  • <Money>. Transfers a certain amount of money to each player. The attribute Amount defines the amount of money transferred. The maximum value is 9999.
  • <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.

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.