XML:TRIG: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (copy-edit)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{XML_File_Header | type=TRIG | prev=TRGE | next=TRMA | name=Trigger class }}
{{XML_File_Header | prev=TRGE | type=TRIG | next=TRMA | name=Trigger}}


===general information===
==General information==
* TRIG files are stored globally (in AE/AEInstaller/vanilla/level0_Final.dat)
* TRIG files are stored globally in level0_Final.dat.
* 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
* TRIG files were originally intended to hold the rail geometry, but the <BaseGeometry>-linked M3GM isn't used in-game; instead the trigger rail is part of the AKEV level geometry.
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''.


 
==File structure==
===file structure===
  TRIG
  TRIG
   |  
   |  
   +-- M3GM <BaseGeometry> (not used in sole [[XML:BINA/OBJC/TRIG|BINACJBOTrigger]] import, trigger rails must be part of the AKEV level geometry)
   +-- M3GM <BaseGeometry> (not used; trigger rails must be part of the AKEV level geometry)
         |
         |
         +-- PNTA <Points>
         +-- PNTA <Points>
Line 20: Line 19:
         +-- TXMP <Texture> (link to external file)
         +-- TXMP <Texture> (link to external file)


 
==XML tags==
===XML tags===
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=150px| XML tag
!width=150px| XML tag
!width=120px| content type
!width=120px| Content type
! description
! Description
|-
|-
|width=200px| <Color>
|width=200px| <Color>
|width=40px| color32
|width=40px| color32
| R G B A (ignored; was trigger color)
| RGBA value (ignored; was intended to be trigger color)
|-
|-
| <TimeOn>
| <TimeOn>
| int32
| int32
| laser is on for a number of frames (overruled by BINACJBOTrigger ?)
| Laser is on for this many frames (overridden by BINACJBOTrigger's <TimeOn> and <TimeOff> tags?)
|-
|-
| <TimeOff>
| <TimeOff>
| int32
| int32
| laser is on for a number of frames (overruled by BINACJBOTrigger ?)
| Laser is off for this many frames (overridden by BINACJBOTrigger's <TimeOn> and <TimeOff> tags?)
|-
|-
| <StartOffset>
| <StartOffset>
Line 56: Line 54:
|-
|-
| <Emitter>
| <Emitter>
| char[32] ?
| char[32]
| TRGEfile<font color="#777777">.oni</font>
| TRGEfile<font color="#777777">.oni</font>
|-
|-
| <Animation>
| <Animation>
| char[32] ?
| char[32]
| OBANfile<font color="#777777">.oni</font>
| OBANfile<font color="#777777">.oni</font>
|-
|-
Line 72: Line 70:
|}
|}


 
==3D model==
===embedded M3GM===
The 3D model for a laser trigger is in a TRGE, linked to from the <Emitter> tag. See [[XML:TRGE]] for extraction and creation of this geometry.
====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 [http://mods.oni2.net/node/38 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:trigger_tex input_folder/trigger.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.


{{XML}}
{{XML}}

Latest revision as of 14:45, 30 March 2021

TRIG : Trigger
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 level0_Final.dat.
  • TRIG files were originally intended to hold the rail geometry, but the <BaseGeometry>-linked M3GM isn't used in-game; instead the trigger rail is part of the AKEV level geometry.
  • The XML on this page is compatible with OniSplit v0.9.61.0.

File structure

TRIG
  | 
  +-- M3GM <BaseGeometry> (not used; 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 RGBA value (ignored; was intended to be trigger color)
<TimeOn> int32 Laser is on for this many frames (overridden by BINACJBOTrigger's <TimeOn> and <TimeOff> tags?)
<TimeOff> int32 Laser is off for this many frames (overridden by BINACJBOTrigger's <TimeOn> and <TimeOff> tags?)
<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

3D model

The 3D model for a laser trigger is in a TRGE, linked to from the <Emitter> tag. See XML:TRGE for extraction and creation of this geometry.