XML:TRIG: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (hmpf)
(+ temp + cat // one more to move)
Line 1: Line 1:
__TOC__
{{XML_File_Header | type=TRIG | prev=TRGE | next=TRMA | name=Trigger class }}


{{Template:XMLModdingHints}}
===general information===
{| border=0 cellspacing=20 cellpadding=0 align=center
| The xml code on this page is compatible with onisplit '''v0.9.61.0'''
|}
 
'''general information'''
* TRIG files are stored globally (in edition/GameDataFolder/level0_Final)
* TRIG files are stored globally (in edition/GameDataFolder/level0_Final)
* TRIG files are intended to hold the rail geometry but <BaseGeometry> (M3GM) isn't used in sole [[OBD_talk:BINA/OBJC/TRIG|BINACJBOTrigger]] import, the trigger rail is part of the AKEV level geometry
* TRIG files are intended to hold the rail geometry but <BaseGeometry> (M3GM) isn't used in sole [[XML:BINA/OBJC/TRIG|BINACJBOTrigger]] import, the trigger rail is part of the AKEV level geometry
 
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
 


'''file structure'''


===file structure===
  TRIG
  TRIG
   |  
   |  
   +-- M3GM <BaseGeometry> (not used in sole [[OBD_talk:BINA/OBJC/TRIG|BINACJBOTrigger]] import, trigger rails must be part of the AKEV level geometry)
   +-- M3GM <BaseGeometry> (not used in sole [[XML:BINA/OBJC/TRIG|BINACJBOTrigger]] import, trigger rails must be part of the AKEV level geometry)
         |
         |
         +-- PNTA <Points>
         +-- PNTA <Points>
Line 27: Line 21:




 
===XML tags===
==XML tags==
{| class="wikitable" width="100%"
 
!width=150px| XML tag
===TRIG===
!width=120px| content type
 
! description
{|
|-
{{table}}
|width=200px| <Color>
|width=200px| <Color>
|width=40px| color32
|width=40px| color32
Line 80: Line 73:




===M3GM===
===embedded M3GM===
'''export'''
====export====
 
You would need to cut TRIG instance so that only the M3GM and its connected instances remain and convert it to oni.
You would need to cut TRIG instance so that only the M3GM and its connected instances remain and convert it to oni.
:    onisplit -extract:xml output_folder input_folder\TRIGfile.oni
:    onisplit -extract:xml output_folder input_folder\TRIGfile.oni
Line 95: Line 87:




'''import'''
====import====
 
There are some tags which make together the mesh but you basically need to know that you can replace that content with data from another M3GM.
There are some tags which make together the mesh but you basically need to know that you can replace that content with data from another M3GM.


Line 107: Line 98:


Remember to change the links (#N) and instance IDs of the new data.
Remember to change the links (#N) and instance IDs of the new data.
{{XML}}

Revision as of 12:23, 9 November 2012

TRIG : Trigger class
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

TRGE << Other file types >> TRMA

switch to OBD page

general information

  • TRIG files are stored globally (in edition/GameDataFolder/level0_Final)
  • TRIG files are intended to hold the rail geometry but <BaseGeometry> (M3GM) isn't used in sole BINACJBOTrigger import, the trigger rail is part of the AKEV level geometry
  • The xml code on this page is compatible with onisplit v0.9.61.0


file structure

TRIG
  | 
  +-- M3GM <BaseGeometry> (not used in sole BINACJBOTrigger import, trigger rails must be part of the AKEV level geometry)
        |
        +-- PNTA <Points>
        +-- VCRA <VertexNormals>
        +-- VCRA <FaceNormals>
        +-- TXCA <TextureCoordinates>
        +-- IDXA <TriangleStrips>
        +-- IDXA <FaceNormalIndices>
        +-- TXMP <Texture> (link to external file)


XML tags

XML tag content type description
<Color> color32 R G B A (ignored; was trigger color)
<TimeOn> int32 laser is on for a number of frames (overruled by BINACJBOTrigger ?)
<TimeOff> int32 laser is on for a number of frames (overruled by BINACJBOTrigger ?)
<StartOffset> ? ?
<AnimScale> int32 ?
<BaseGeometry> link M3GM instance number (#N)
<BaseGunkFlags> flag ?
<Emitter> char[32] ? TRGEfile.oni
<Animation> char[32] ? OBANfile.oni
<ActiveSound> char[32] OSBDfile.amb.oni
<TriggerSound> char[32] OSBDfile.imp.oni


embedded M3GM

export

You would need to cut TRIG instance so that only the M3GM and its connected instances remain and convert it to oni.

onisplit -extract:xml output_folder input_folder\TRIGfile.oni
onisplit -create output_folder input_folder\cutfile.xml

version hint:

onisplit v0.9.61.0 can extract M3GM only as obj
onisplit v0.9.41.0 can extract M3GM as obj or dae

Convert the M3GMfile.oni to obj:

onisplit -extract:obj output_folder input_folder\M3GMfile.oni


import

There are some tags which make together the mesh but you basically need to know that you can replace that content with data from another M3GM.

You can create M3GM meshes from obj files.

onisplit -create:m3gm output_folder -tex:weapon_tex input_folder/weapon.obj
-tex is optional
The TXMP file must created separately (if needed).

Then you can convert the file to xml and replace the TRIG's old M3GM xml code.

Remember to change the links (#N) and instance IDs of the new data.