Jump to content

XML:ONLV: Difference between revisions

415 bytes added ,  24 October 2021
m
copy-edit part 1
m (link fixes)
m (copy-edit part 1)
Line 1: Line 1:
{{XML_File_Header | prev=ONLD | type=ONLV | next=ONSK | name=Oni Game Level}}
{{XML_File_Header | prev=ONLD | type=ONLV | next=ONSK | name=Oni Game Level}}
{{finish}}
{{finish}}
;Todo list
;To-do list


* tips with cutscene charas: sync pelvis OBAN and partner TRAM
* Tips for cutscene characters: sync pelvis OBAN and partner TRAM
* notes on camera and film import ?
* Notes on camera and film import?
* make new demo level after implementation of final scene import/export, dae-based CRSA import/export, shared folder bugfix, ENVP recycler
* Make new demo level after implementation of final scene import/export, DAE-based CRSA import/export, shared folder bug fix, ENVP recycler
** try to clean page a bit
** Try to clean up page a bit
** also, import section of v0.9.99.0+ no longer supports node tags
** Also, OniSplit v0.9.99.0+ no longer supports node tags when importing, so instead of…


               <Import Path="env/lab_motorcycle.dae">
               <Import Path="env/lab_motorcycle.dae">
Line 16: Line 16:
               </Import>
               </Import>
   
   
use instead:
…we need to use:
   
   
               <Import Path="env/lab_motorcycle.dae">
               <Import Path="env/lab_motorcycle.dae">
Line 27: Line 27:




==Level releases, forum threads and wiki pages==
==Level releases and resources==
;Custom levels that have been created so far
===Fan-made levels===
{| class="wikitable sortable autosort by-column-3"
{| class="wikitable sortable autosort by-column-3"
!Date
!Date
Line 123: Line 123:
|}
|}


;OCF threads about level creation
===Forum tutorials on level creation===
* '''[http://oni.bungie.org/forum/viewtopic.php?id=2087 "Creating the Lair - A level tutorial"]'''
* '''[http://oni.bungie.org/forum/viewtopic.php?id=2087 "Creating the Lair - A level tutorial"]'''
* [http://oni.bungie.org/forum/viewtopic.php?pid=53026 "Creating a Custom Oni Level (s10k video tutorials)"]
* [http://oni.bungie.org/forum/viewtopic.php?pid=53026 "Creating a Custom Oni Level (s10k video tutorials)"]
Line 132: Line 132:
* [http://oni.bungie.org/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]
* [http://oni.bungie.org/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]


;Wiki pages about levels
===Wiki pages on level creation===
* [[New_levels]]
* [[New levels]]
* [[Lightmapping_levels]]
* [[Lightmapping levels]]
* [[SketchUp_tutorials_and_tips|SketchUp tutorials and tips]]
* [[SketchUp tutorials and tips]]


;Free texture resources
===Free asset sources===
* [http://vk.com/gameready various game meshes]
* [http://vk.com/gameready Various game meshes]
* [http://tutorialsforblender3d.com/Textures/Textures_index.html various game textures]
* [http://tutorialsforblender3d.com/Textures/Textures_index.html Various game textures]
* [https://www.textures.com various game textures]
* [https://www.textures.com Various game textures]


==Concept phase==
==Engine limitations==
Be aware of limitation of level and engine.
First you should be aware of the limitations that Oni will place on your level.


* triangle limit of a game level: ca. 520.000 (500.000 to be on save side)
* The triangle limit of a game level is approx. 520,000 (consider it 500,000 to be on the safe side).
* {{ModTool}} can save dae files with max. 64.000 triangles per object
* {{ModTool}} can save DAE files with a maximum of 64,000 triangles per object.
* when polygons are too tightly packed the cam will look at too many of them and glitches appear: the visible GQs (GunkQuads) limit is 8192 (2^13), higher numbers will cause render bugs and call BSL message "Exceeded max visible GQs ''number''"; limited solutions to this:
* When polygons are too tightly packed, the camera will look at too many of them and glitches will appear. The limit on visible GQs (Gunk Quads) is 8,192 (2<sup>13</sup>), and higher numbers will cause render bugs and produce the console error message "Exceeded max visible GQs ''number''". There are limited solutions to this:
** decrease the gs_farclipplane_set value
** Decrease the '''gs_farclipplane_set''' value.
** hide objects by [[#.3CModel.3E|env_show]]
** Hide objects via '''[[#.3CModel.3E|env_show]]'''.
** hide objects by ''level design''
** Hide objects by ''level design''. For example, departments in a building could be quite detailed because the view of the other departments/rooms is blocked by walls.
*** for example departments in a building could be quite detailed because the view at the other departments/rooms is blocked by non-transparent walls
* The camera can look at 2,049 transparent textures at once; one more, and Oni crashes.
* The camera can look at 2049 transparent textures at once, one more and Oni crashes.
* Characters are visible ''only'' within world coordinates {-4,099, -4,099, -4,099} to {4,099, 4,099, 4,099}.
* characters are visible ''only'' within 4099|4099|4099 and -4099|-4099|-4099 world units
* Geometry stops outside of (roughly) world coordinates -4,228 to 4,228 on the X and Z axes (vertical axis not tested).
* geometry stops at ca. X=4228|Z=4228 and -4228|-4228 (height not tested)
* '''chr_debug_spheres = 1''' visualizes the collision spheres of characters, so you can check if they will fit through an entrance.
* chr_debug_spheres = 1 visualizes collision spheres of characters, then you can check if they fit through a new entrance


==Notes on Mod Tool and Google SketchUp==
Re-saving a DAE file in Mod Tool which was originally made in SketchUp can result in a surprising change in size within Oni. This is due to a difference in the specification of a scale unit.


==Notes on Mod Tool and Google Sketchup==
: For example, the SketchUp DAE file may have: <tt><unit meter="0.0254000" name="inch" /></tt>
Re-saving a dae file - that was originally made in Sketchup - in Mod Tool can result in a surprising change in size within Oni.
: And the re-saved Mod Tool DAE file may have: <tt><unit meter="0.1" name="decimetre"></unit></tt>


That due to a difference in the length specification.
In that case you'll need to open the new DAE in a text editor and change the length specification back.


: For example Sketchup dae file has: <unit meter="0.0254000" name="inch" />
==Level import with OniSplit v0.9.82.0+==
: Re-saved Mod Tool dae file has: <unit meter="0.1" name="decimetre"></unit>
You can download OniSplit [http://mods.oni2.net/node/38 HERE] (it also comes with the [[AE]] and is found in the Tools directory of the installation).


In that case you would need to open the new dae inside a text editor and change the length specification again.
The level import demo files can be downloaded [http://mods.oni2.net/node/299 HERE].


First, put '''OniSplit.exe''' into the second '''lab''' folder alongside the XML files.


==Level import with OniSplit [http://mods.oni2.net/node/38 v0.9.82.0+]==
Look at the file '''build.cmd'''. These are the two important lines:
'''Demo files'''
 
Demo files can be downloaded [http://mods.oni2.net/node/299 here].
 
First put the new "OniSplit.exe" into the second "lab" folder alongside the xml files.
 
There's a "build.cmd" file. Those two are the important lines:


  OniSplit.exe -create:level out lab.xml
  OniSplit.exe -create:level out lab.xml
  OniSplit.exe -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 creates the *.oni files from a master.xml file, in this case '''lab.xml'''. Once finalized, the resulting .oni files can be put into a new [[Making a mod package|AE package]].


The second line creates level archives which can be used '''for fast tests'''. They don't require you to install a package.
The second line creates level archives which can be used for fast tests. They don't require you to install a package through the AE Installer.


Instead of "nosep" you can now also use "pc" for the import. Mac does still use "sep".
Instead of "-nosep" you can now also use "-pc" for the import. Macs, however, do use "-sep".


If the game crashes while loading (at ca. 90% progress), be sure that the texture's x and y (pixel) dimension are power of two: 512, 256, 128, 64, etc.
If the game crashes while loading at ~90% progress, be sure that the texture's x and y dimensions are powers of two: 64, 128, 256, 512….


If the game crashes while loading (at ca. 50-60% progress), be sure that the BINACJBOCharacters/AISA file has a player character.
If the game crashes while loading at ~50-60% progress, be sure that the BINACJBOCharacters or AISA file has a player character defined.


If the game crashes while loading (at ca. 5-10% progress), check if all textures were inside the "out" folder.
If the game crashes while loading ~5-10% progress, check if all your textures were inside the "out" folder.


: You can extract the AKEV file to xml, then search for the [[XML:AKEV#TXMA|TXMP array]].
:You can extract the AKEV file to XML, then search for the [[XML:AKEV#TXMA|TXMP Array]].


: [http://mods.oni2.net/system/files/AKEV_texture_checker.txt THIS] script checks which textures are missing by comparing the AKEV*.xml with its *.oni files folder. Adapt the two paths so that it works for you. Alt + 4, insert code, then F5.
:[http://mods.oni2.net/system/files/AKEV_texture_checker.txt THIS] script checks which textures are missing by comparing the AKEV*.xml with its *.oni files folder. Change the two paths so that it works for you: Alt+4, insert code, then F5.


"TXMP_marker_door" and "TXMP_marker_ghost" will be missing in the demo's "out" folder.
"TXMP_marker_door" and "TXMP_marker_ghost" will be missing in the demo's "out" folder.


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 build.cmd to prevent a crash.
  OniSplit.exe -create:txmp out env/markers/*.tga
  OniSplit.exe -create:txmp out env/markers/*.tga


===The master xml file===
===The master xml file===