XML:TRIG: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (Created page with "__TOC__ {{Template:XMLModdingHints}} {| border=0 cellspacing=20 cellpadding=0 align=center | The xml code on this page is compatible with onisplit '''v0.9.61.0''' |} '''general...")
 
m (copy-edit)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__
{{XML_File_Header | prev=TRGE | type=TRIG | next=TRMA | name=Trigger}}


{{Template:XMLModdingHints}}
==General information==
{| border=0 cellspacing=20 cellpadding=0 align=center
* TRIG files are stored globally in level0_Final.dat.
| The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* 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'''.
 
'''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 [[OBD_talk:BINA/OBJC/TRIG|BINACJBOTrigger]] import, the trigger rail is part of the AKEV level geometry
 
 
 
'''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; trigger rails must be part of the AKEV level geometry)
         |
         |
         +-- PNTA <Points>
         +-- PNTA <Points>
Line 25: Line 18:
         +-- IDXA <FaceNormalIndices>
         +-- IDXA <FaceNormalIndices>
         +-- TXMP <Texture> (link to external file)
         +-- TXMP <Texture> (link to external file)


==XML tags==
==XML tags==
 
{| class="wikitable" width="100%"
===TRIG===
!width=150px| XML tag
 
!width=120px| Content type
{|
! Description
{{table}}
|-
|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 63: 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 79: Line 70:
|}
|}


==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.


===M3GM===
{{XML}}
Are there 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 v0.9.61.0 refuse to create a single M3GM. Instead, use OniSplit [http://mods.oni2.net/node/38 v0.9.41.0]
 
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.

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.