XML:TRIG: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (copy-edit)
 
(7 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}}
{| 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 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
 


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

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.