Fork me on GitHub

Documentation for the Maniaplanet game operating system

You can import 3 types of items

Static objects are placed on maps, and are part of the static data of the map.
Dynamic objects and Characters can be placed on maps, as hints for the scripts, but are created / destroyed by scripts during gameplay.
To import a item, you must create a .item.xml file describing how to import it.

The asset files to import must be located in the folder :
{maniaplanet_user_dir}/Work/Items/{sub_folder_you_want}

To import an item, type the command :
NadeoImporter Item {Item.xml_Filename_Relative_To_WorkFolder}

Note 1 : For items using meshes and shapes, (static & dynamic objects), those must have been imported before Item import.
see the dedicated page : [mesh import](importer_mesh.html)

Note 2 : Once you have imported and item, the only way to play online with it to do it through a Title (add the items to the title during title creation)

Note 3 : Icon : if you want to see an icon for your item in the editor, you need to provide a icon file.
Unlike the other files which are explicitly referenced in the item.xml file, the icon file is automatically retrieved and imported.
The icon mus be a tga 64x64, it must have the same base name than the item.xml file and be placed in a sub folder icon.
see sample : Work/Items/Samples/DynamicObjects/Icon

Item.xml file structure

1. Item

<Item> root node attributes :

recap example for character items:

<Item Type="Character" Archetype="ShootMania\Items\Characters\ArenaPlayer.Item.gbx"
DefaultSkin="Skins\Models\StormManBig\A.zip" SkinFolder="Models\StormManBig"
Collection="SMCommon" AuthorName="NadeoSamples">

2. Phy and Vis

The physical and visual parts, <Phy> and <Vis> tags depends on the type of the item (see below).

Inside the <Phy> tag, there is all the information needed for the "physical" simulation of the item (ie : what will be simulated on client and on dedicated server).
Inside the <Vis> tag, there is all the information needed for the "visual" simulation of the item (ie : what will necessary only on client : meshes, lights, sounds, particles).

Referenced .Mesh.gbx and .Shape.gbx files that must be already imported.
Shape.gbx files are automatically generated along the the mesh.gbx when you import static meshes.

2.1 Static objects

recap example for static object :

<Item Type="StaticObject" Collection="Common" AuthorName="NadeoSamples">
    <Waypoint Type="Checkpoint"/>
    <Phy>
        <TriggerShape Type="mesh" File="Meshes/CheckpointTrigger.Shape.gbx"/>
        <MoveShape Type="mesh" File="Meshes/Checkpoint.Shape.gbx"/>
    </Phy>
    <Vis>
        <Mesh File="Meshes/Checkpoint.Mesh.gbx"/>
    </Vis>
</Item>

2.2 Dynamic objects

recap example for dynamic object :

<Item Type="DynaObject" Collection="SMCommon">
   <Phy>
      <TriggerShape Type="AABB" min="-0.4 0 -0.4" max="0.4 0.8 0.4"/>
   </Phy>
   <Vis>
      <Mesh File="Meshes/SampleArmor.Mesh.gbx"/>
      <LightBallSimple Radius="2" sRgb="0 1 0" Pos="0 0.3 0"/>
      <LocAnimSimple RotPeriod="1000" TransPeriod="1000" TransY="0.1"/>
   </Vis>
</Item>

2.3 Characters

a character inherits the physics from its archetype. however, you can tune some parameters:

there is no <vis> node for characters. the display is defined by the DefaultSkin attribute of the <Item> node.
recap example for character :

<Item Type="Character" Archetype="ShootMania/Items/Characters/ArenaPlayer.Item.gbx"
DefaultSkin="Skins/Models/StormManBig/A.zip" SkinFolder="Models/StormManBig"
Collection="SMCommon" AuthorName="NadeoSamples">
    <Phy>
        <CharPhyCustom Radius="1.2" EyesHeight="4.8" SpeedCoef="3"/>
    </Phy>
</Item>

3. Placement parameters : pivots, gridsnap, cube

in order to facilitate the item placement in the editor, you can define parameters

Note: If the item you are about to place (B) and the item which is already placed (A) do not have the same pivot-snapping distance value, only the lowest distance is used.