XML:TRBS: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (+ cat)
Line 269: Line 269:
     </Instance>
     </Instance>
|}
|}
{{XML}}

Revision as of 14:36, 8 November 2012


Template:XMLModdingHints

general information

  • TRBS files are stored globally (in edition/GameDataFolder/level0_Final)
  • these files are used by ONCC
  • they contain 5 models differing in ("LOD") level of detail (triangle number)


extraction

onisplit -extract:xml output_folder input_folder/TRBSname.oni


creation

onisplit -create output_folder input_folder/TRBSname.xml


example

TRBSkonoko_body_high.xml (extracted with onisplit v0.9.68.0)

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <TRBS id="0">
       <Elements>
           <Link>TRBSkonoko_body_high_TRCM1.dae</Link> <!-- 300 triangles -->
           <Link>TRBSkonoko_body_high_TRCM2.dae</Link> <!-- 842 triangles -->
           <Link>TRBSkonoko_body_high_TRCM3.dae</Link> <!-- 1250 triangles -->
           <Link>TRBSkonoko_body_high_TRCM4.dae</Link> <!-- 2038 triangles -->
           <Link>TRBSkonoko_body_high_TRCM5.dae</Link> <!-- 3294 triangles -->
       </Elements>
   </TRBS>
</Oni>


custom TRIA

Onisplit creates the TRIA instance on its own.

When extracting a TRBS with onisplit v0.9.41.0 the TRIA instance gets exposed. Then it can be modified by hand to change the hierarchy of body parts.

In the table you can see examples of TRIA instances: one from Konoko and one from a more or less hypothetical hex-hound.

Onisplit v0.9.58.0 and lower needs a dae file where the body part names are strictly correct but the order doesn't matter. The result will be always a standard TRIA.
Onisplit v0.9.68.0 and higher(?) tolerates unusual body part names but it takes the order serious to build the hierarchy.
In other words, when building a custom hierarchy with new onisplit versions you don't need any longer to edit the TRIA instance in xml.

Note that the head could be at a different location in the order. As result the head animation would be applied to a different body part.

Normally such overlay animation have "Head" as "<UsedBones>", if your new model's head isn't the 11th part you need to change it.

A character with non-standard TRIA needs a complete set of new animations, those animations must be created based on that new TRIA.


Changing the body part order

Inside Mod Tool, the objects have an order which can be seen in the Schematics. The user can influence that order by using the Reorder Nodes Tool [I].

Taking this into account it should be possible to let Mod Tool generate a TRMA file fitting to TRBS.


example

standard TRIA hexhound TRIA
   <Instance id="8" type="TRIA">
       <Elements>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>1</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>2</Child>
               <Sibling>4</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>1</Parent>
               <Child>3</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>2</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>5</Child>
               <Sibling>7</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>4</Parent>
               <Child>6</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>5</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>8</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>7</Parent>
               <Child>9</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>8</Parent>
               <Child>10</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>9</Parent>
               <Child>0</Child>
               <Sibling>11</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>9</Parent>
               <Child>12</Child>
               <Sibling>15</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>11</Parent>
               <Child>13</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>12</Parent>
               <Child>14</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>13</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>9</Parent>
               <Child>16</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>15</Parent>
               <Child>17</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>16</Parent>
               <Child>18</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>17</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
       </Elements>
   </Instance>
   <Instance id="4" type="TRIA">
       <Elements>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>1</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>2</Child>
               <Sibling>3</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>1</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>4</Child>
               <Sibling>5</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>3</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>6</Child>
               <Sibling>7</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>5</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>8</Child>
               <Sibling>9</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>7</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>0</Parent>
               <Child>10</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>9</Parent>
               <Child>11</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>10</Parent>
               <Child>12</Child>
               <Sibling>13</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>11</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>10</Parent>
               <Child>14</Child>
               <Sibling>16</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>13</Parent>
               <Child>15</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>14</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>10</Parent>
               <Child>17</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>16</Parent>
               <Child>18</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
           <TRIAElement>
               <Parent>17</Parent>
               <Child>0</Child>
               <Sibling>0</Sibling>
           </TRIAElement>
       </Elements>
   </Instance>