Jump to content

XML:ONLV: Difference between revisions

1,363 bytes added ,  20 August 2013
m
Pathfinding on uneven ground + BNV debugging
m (Level releases: City Level Part 1)
m (Pathfinding on uneven ground + BNV debugging)
Line 57: Line 57:




==Level import with onisplit [http://mods.oni2.net/node/38 0.9.82.0]==
==Level import with OniSplit [http://mods.oni2.net/node/38 v0.9.82.0+]==
'''Demo files'''
'''Demo files'''


Line 66: Line 66:
There's a "build.cmd" file. Those two are the important lines:
There's a "build.cmd" file. Those two are the important lines:


  onisplit -create:level out lab.xml
  OniSplit.exe -create:level out lab.xml
  onisplit -import:pc out level3_Final.dat
  OniSplit.exe -import:pc out level3_Final.dat


The first line create the *.oni files from a master.xml file, in this case "lab.xml". If final, the oni files can be put into a new AE package.
The first line create the *.oni files from a master.xml file, in this case "lab.xml". If final, the oni files can be put into a new AE package.
Line 88: Line 88:


You can add this between the other two lines in the build.cmd to prevent a crash.
You can add this between the other two lines in the build.cmd to prevent a crash.
  onisplit -create:txmp out env/markers/*.tga
  OniSplit.exe -create:txmp out env/markers/*.tga




Line 157: Line 157:
|
|
;AGQG (Gunk) flags (trimmed list)
;AGQG (Gunk) flags (trimmed list)
see ''onisplit -help enums'' for more flags
see ''OniSplit -help enums'' for more flags
:None
:None
:NoCollision
:NoCollision
Line 201: Line 201:
|
|
;AGQG (Gunk) flags (trimmed list)
;AGQG (Gunk) flags (trimmed list)
see ''onisplit -help enums'' for more flags
see ''OniSplit -help enums'' for more flags
:None
:None
:NoCollision
:NoCollision
Line 559: Line 559:
The Room tag is mandatory. It contains an import path to BNV data (*.dae) which is used to create pathfinding grids. For technical information on BNV see [[OBD:AKVA|HERE]].
The Room tag is mandatory. It contains an import path to BNV data (*.dae) which is used to create pathfinding grids. For technical information on BNV see [[OBD:AKVA|HERE]].


For example:
Exemplary code piece of the master xml file:
  <Import Path="env/lab_bnv.dae"/>
  <Import Path="env/lab_bnv.dae"/>


Line 565: Line 565:


* Those ''rooms'' are in fact horizontal planes, they are used to determine the area where pathfinding will be calculated. Areas without ''rooms'' won't have pathfinding at all.
* Those ''rooms'' are in fact horizontal planes, they are used to determine the area where pathfinding will be calculated. Areas without ''rooms'' won't have pathfinding at all.
* ''Ghosts'' are vertical planes. You need at least one ''ghost'' to connect two parallel ''rooms''.
* ''Ghosts'' are vertical planes. You need at least one ''ghost'' to connect two ''rooms'' at parallel edges.
* ''Ghosts'' are very often standing in a 90° fashion but it's also possible to use other angles (like seen in [http://edt.oni2.net/images/Hideout_BNV.jpg HERE])
* Place the ''ghost'' where AI shall be able to transit from one room to another. Be careful with the ''ghost'''s width.
* Place the ''ghost'' where AI shall be able to transit from one room to another. Be careful with the ''ghost'''s width.
* Actually, those horizontal and vertical planes can have any name and don't need any texture.
* Actually, those horizontal and vertical planes can have any name and don't need any texture.
Line 595: Line 596:
* ai2_chump
* ai2_chump
:: spawns a friendly striker that follows the player if possible, makes also pathfinding grids visible
:: spawns a friendly striker that follows the player if possible, makes also pathfinding grids visible
* ai2_chump_stop = 1
:: striker stops to follow you
* ai2_chump_stop = 0
:: striker follows you again
=====Pathfinding on uneven ground=====
Pathfinding works on slight uneven ground (see '''''tolerance values''''').
For bigger surface irregularities we can use a trick. The problematic polygons can be saved to an dae file and then referenced in the model section as an individual object. Then the <GunkFlags> tag needs to be '''''GridIgnore'''''. Additionally we create a plain (invisible if necessary) under the object so that Oni doesn't think there's a hole.
For example this trick can bypass [https://dl.dropboxusercontent.com/u/139715/temp/bad_BNV.png pathfinding problems with pyramids.]
=====Debugging (OniSplit v0.9.93.0+)=====
* '''env_show_ghostgqs = 1''' makes the ghost quads visible
** the original ghost quads can't be seen, Neo: "they are not included in the octtree and bsp tree"
** to see them you must use the -debug option in the level creation command (available with OniSplit '''v0.9.93.0+''')
OniSplit.exe -create:level ''output_folder'' '''-debug''' ''input_folder''/''master_xml_file''.xml




Line 672: Line 692:
Marker textures aren't imported automatically. Add those textures to the final package / plugin, e.g. by some sort of batch code.
Marker textures aren't imported automatically. Add those textures to the final package / plugin, e.g. by some sort of batch code.


  onisplit -create:txmp out env/markers/*.tga
  OniSplit.exe -create:txmp out env/markers/*.tga




Line 1,024: Line 1,044:
In that case use the "-search" argument to make correct extractions. In total the commands will look like this:
In that case use the "-search" argument to make correct extractions. In total the commands will look like this:


  onisplit -export level0_files level0.dat
  OniSplit.exe -export level0_files level0.dat
  onisplit -export levelX_files levelX.dat
  OniSplit.exe -export levelX_files levelX.dat
  onisplit -extract:dae levelX_geometry levelX_files/AKEV*.oni -search level0_files
  OniSplit.exe -extract:dae levelX_geometry levelX_files/AKEV*.oni -search level0_files


Possible output files:
Possible output files:
Line 1,035: Line 1,055:
* ''level''_env_markers.dae
* ''level''_env_markers.dae
* ''level''_furn.dae
* ''level''_furn.dae
* ''level''_script_''N''.dae (by onisplit v0.9.90.0)
* ''level''_script_''N''.dae (by OniSplit v0.9.90.0+)
* ''level''_trig.dae
* ''level''_trig.dae
* ''level''_turr.dae
* ''level''_turr.dae




===Export of animated geometry and cameras (onisplit v0.9.90.0)===
===Export of animated geometry and cameras (OniSplit v0.9.90.0+)===
This is also known as scene export. All content exported by the scene file will be combined and saved in one single dae.
This is also known as scene export. All content exported by the scene file will be combined and saved in one single dae.


  OniSplit -extract:dae path_to/output_directory path_to/scene.xml
  OniSplit.exe -extract:dae path_to/output_directory path_to/scene.xml


For the following example the scene.xml must be present in a folder containing all files used by the scene. In this case it's level3_Final (biolab).
For the following example the scene.xml must be present in a folder containing all files used by the scene. In this case it's level3_Final (biolab).
Line 1,501: Line 1,521:




==Ideas for onisplit==
==Ideas for OniSplit==
'''bugfixes'''
'''bugfixes'''


8,452

edits