Modding:Giving Creatures Inventory Items: Difference between revisions

m
no edit summary
imported>CaptainTechnicality54384
(Created page with "Category:Modding == Preset Inventory == Add an inventoryobject to the object <inventoryobject Blueprint="Lives1"></inventoryobject> == Random Inventory == The best mode...")
 
mNo edit summary
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Modding]]
[[Category:Modding]]{{Modding Info}}{{Stub}}
The examples below require merging an XML tag into an existing object. For more information about how to merge tags, refer to [[Modding:Objects]].
 
== Preset Inventory ==
== Preset Inventory ==
Add an inventoryobject to the object
Add an inventoryobject to the object.


<syntaxhighlight lang="xml">
  <inventoryobject Blueprint="Lives1"></inventoryobject>
  <inventoryobject Blueprint="Lives1"></inventoryobject>
</syntaxhighlight>


== Random Inventory ==
== Random Inventory ==
The best modern way is to add a tag:
The best modern way is to add a tag:


<syntaxhighlight lang="xml">
  <tag Name="InventoryPopulationTable" Value="MyNewSnapjawPopulationTableWhatever"></tag>
  <tag Name="InventoryPopulationTable" Value="MyNewSnapjawPopulationTableWhatever"></tag>
</syntaxhighlight>


...and add the matching population table via a populationtables.xml file in your mod.
...and add the matching population table via a populationtables.xml file in your mod.
Line 16: Line 22:


Builder classes directly on the inventory part:  
Builder classes directly on the inventory part:  
<syntaxhighlight lang="xml">
  <part Name="Inventory" Builder="InventoryChestJunk3or4"></part>
  <part Name="Inventory" Builder="InventoryChestJunk3or4"></part>
</syntaxhighlight>
{{Modding Navbox}}