XML:OFGA: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (a few more flags)
Line 32: Line 32:
|valign="top"| <GunkFlags>
|valign="top"| <GunkFlags>
|valign="top"| flag
|valign="top"| flag
|  
| for more theoretic possible AGQG flags see ''onisplit -help enums''
: None
: NoCharacterCollision
: NoCharacterCollision
: NoObjectCollision
: NoCollision
: NoOcclusion
: NoOcclusion
: Invisible - used for collision boxes
: Invisible - used for collision boxes
: NoObjectCollision
: TwoSided
|-
|-
| <Geometry>
| <Geometry>
Line 56: Line 59:
| <Class>
| <Class>
| char[64]
| char[64]
| <font color="#777777">BINA3RAP</font>file_name<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font>
| <font color="#777777">BINA3RAP</font>''file_name''<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font>
|-
|-
|valign="top"| <Tag>
|valign="top"| <Tag>
Line 74: Line 77:
| X Y
| X Y
|-
|-
| <Flags>
|valign="top"| <Flags>
| flag
|valign="top"| flag
| ?
|  
:None
:NotInitiallyCreated
|}
|}



Revision as of 12:27, 6 March 2013

OFGA : Object Furniture Geometry Array
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

OBAN << Other file types >> ONCC

switch to OBD page

general information

  • The xml code on this page is compatible with onisplit v0.9.61.0 and v0.9.68.0
  • OFGA are level specific.
  • OFGA files were rarely used in game, only to get the bounding box of the geometry.
  • Nowadays they are used to import objects with no functions. (Doors, consoles, etc. becomes imported by their object collections. See ONLV for more information.)


tags

XML tag content type description
<OFGA id="..."> integer marks the beginning of OFGA content
<EnvParticle> "#" + integer ENVP instance number (#N)
<Elements> - You can put here quite any number of <OFGAElement> tags. The array is an int32.
<OFGAElement> -
<GunkFlags> flag for more theoretic possible AGQG flags see onisplit -help enums
None
NoCharacterCollision
NoObjectCollision
NoCollision
NoOcclusion
Invisible - used for collision boxes
TwoSided
<Geometry> link M3GMfile_name.oni (don't use file suffix)
<ENVP id="..."> integer Instance number. Use the one from <EnvParticle>.
<Particles> - You can put here quite a number of <ENVPParticle> tags. The array is an int16.
<ENVPParticle> - ENVP is used to store particles attached to objects or furniture: Locklights, lights, fire, smoke, steam, "electricity" etc. Loose particles are normally added to the level particle collection.
<Class> char[64] BINA3RAPfile_name.oni (don't use file prefix/suffix)
<Tag> char[48] Particle name for BSL commands. For some reason an underscore "_" will be added to the name. Examples:
FURN <Particle>test</Particle> + OFGA <Tag>streetlight</Tag> = test_streetlight
FURN <Particle></Particle> + OFGA <Tag>streetlight</Tag> = _streetlight
FURN <Particle>test</Particle> + OFGA <Tag></Tag> = test_
<Transform> matrix Float 3*3 + float X Y Z position of the particle. Can be used to orient and stretch the particles (decals, locklights, etc). (How?)
<DecalScale> integer, integer X Y
<Flags> flag
None
NotInitiallyCreated


Example 1

OFGAV_tctf_cruiser_tn.png

extracted OFGAV_tctf_cruiser.xml file led to the 8 M3GM instances

the single parts were then imported into Mod Tool

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <OFGA id="0">
       <EnvParticle></EnvParticle>
       <Elements>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_0</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_1</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_2</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_3</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_4</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_5</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_6</Geometry>
           </OFGAElement>
           <OFGAElement>
               <GunkFlags>Invisible NoObjectCollision</GunkFlags>
               <Geometry>M3GMV_tctf_cruiser_7</Geometry>
           </OFGAElement>
       </Elements>
   </OFGA>
</Oni>


Example 2

streetlights_tn_zps4d4f227f.png

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <OFGA id="0">
       <EnvParticle>#1</EnvParticle>
       <Elements>
           <OFGAElement>
               <GunkFlags>NoOcclusion</GunkFlags>
               <Geometry>M3GMstreetlight_0</Geometry>
           </OFGAElement>
       </Elements>
   </OFGA>
   <ENVP id="1">
       <Particles>
           <ENVPParticle>
               <Class>env_lensflare09</Class>
               <Tag>streetlight</Tag>
               <Transform>1 -4.559326E-08 1.35404189E-05 -1.354042E-05 -2.03512554E-05 1 -4.53176945E-08 -1 -2.03512554E-05 1.3262 63.5907 10.4082</Transform>
               <DecalScale>1 1</DecalScale>
               <Flags></Flags>
           </ENVPParticle>
           <ENVPParticle>
               <Class>env_lensflare09</Class>
               <Tag>streetlight</Tag>
               <Transform>1 -4.559326E-08 1.35404189E-05 -1.354042E-05 -2.03512554E-05 1 -4.53176945E-08 -1 -2.03512554E-05 1.3262 63.5907 -8.877</Transform>
               <DecalScale>1 1</DecalScale>
               <Flags></Flags>
           </ENVPParticle>
       </Particles>
   </ENVP>
</Oni>


export

The direct export ignores geometry with the flag "Invisible".

OniSplit -extract:obj out in/OFGA*.oni


You can also identify the single geometry parts by going through the xml file and then export the M3GM file of your interest.

OniSplit -extract:xml out in/OFGA*.oni
OniSplit -extract:obj out in/M3GM*.oni


import

Be sure your obj file contains triangulated meshes. Quads can give you visual glitches.

OniSplit out_folder -create:m3gm [-tex:texture_name] input_folder/file.obj
-tex argument is optional but you should use it to prevent bugs

After TXMP, M3GM and OFGA creation you can go on to furniture file.