19,358
edits
m (copy-edit part 2) |
m (copy-edit part 3) |
||
Line 213: | Line 213: | ||
!width=120px| Content type | !width=120px| Content type | ||
! Description | ! Description | ||
|- | |- | ||
|valign="top"| <Level SharedPath="..."> | |valign="top"| <Level SharedPath="..."> | ||
Line 822: | Line 814: | ||
: '''Solution:''' Use either '''chr_lock_active ''AI_name''''' or '''chr_all_active = 1''' | : '''Solution:''' Use either '''chr_lock_active ''AI_name''''' or '''chr_all_active = 1''' | ||
=====Debugging (OniSplit v0.9.93.0+) | =====Debugging===== | ||
'''(OniSplit v0.9.93.0+)''' | |||
[[Image:OniBrowser.jpg|thumb|200px|right|OniBrowser displaying level geometry plus PF and ghosts.]] | [[Image:OniBrowser.jpg|thumb|200px|right|OniBrowser displaying level geometry plus PF and ghosts.]] | ||
Line 845: | Line 838: | ||
====<Textures>==== | ====<Textures>==== | ||
=====... used for exceptions===== | =====...used for exceptions===== | ||
The [[#textures_tag|textures tag]] is mandatory. | The [[#textures_tag|textures tag]] is mandatory. | ||
Line 926: | Line 919: | ||
OniSplit.exe -create:txmp out env/markers/*.tga | OniSplit.exe -create:txmp out env/markers/*.tga | ||
The flags Transparent, TwoSided and NoOcclusion are only set if the same texture source is used for diffuse and transparency and if transparency setting are enabled. See the subsection under "[[#... used for exceptions|... used for exceptions]]" called "TwoSided and transparent objects". | The flags Transparent, TwoSided and NoOcclusion are only set if the same texture source is used for diffuse and transparency and if transparency setting are enabled. See the subsection under "[[#...used for exceptions|...used for exceptions]]" called "TwoSided and transparent objects". | ||
'''Danger quads''' | '''Danger quads''' | ||
Line 1,015: | Line 1,008: | ||
: [[XML:BINA/OBJC/TRGV|TriggerVolume.xml]] | : [[XML:BINA/OBJC/TRGV|TriggerVolume.xml]] | ||
: [[XML:BINA/OBJC/WEAP|Weapon.xml]] | : [[XML:BINA/OBJC/WEAP|Weapon.xml]] | ||
=====Furniture.xml===== | =====Furniture.xml===== | ||
The AKEV core geometry is more or less | The AKEV core geometry is more or less the overall structure of the level while this furniture file adds standard objects (e.g. crates and desks) to it. | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=150px| XML tag | !width=150px| XML tag | ||
!width=120px| | !width=120px| Content type | ||
! | ! Description | ||
|- | |- | ||
| <Objects> | | <Objects> | ||
Line 1,068: | Line 1,052: | ||
|valign="top"| <Class> | |valign="top"| <Class> | ||
|valign="top"| link | |valign="top"| link | ||
| File path to an [[XML:OFGA|OFGA]] (*.oni) file. Make sure that the OFGA comes | | File path to an [[XML:OFGA|OFGA]] (*.oni) file. Make sure that the OFGA comes with the files it needs: M3GM and TXMP. | ||
OFGA can hold multiple | An OFGA can hold multiple M3GMs. That 3D content will then be integrated into the AKEV. | ||
|- | |- | ||
|valign="top"| <Particle> | |valign="top"| <Particle> | ||
|valign="top"| string | |valign="top"| string | ||
| This name gets written into <Tag> inside ONLV (ENVP section) and can be used with BSL commands | | This name gets written into <Tag> inside ONLV (ENVP section) and can be used with BSL commands, e.g. you can take control over a particle via '''particle BSL_name start'''. For more commands, see [[XML:BINA/OBJC/PART#BSL_support|HERE]]. | ||
Take care with the naming of new OFGA files. The particle name will be composed of 2 parts separated by an "_" underscore. '''Examples:''' | |||
: FURN <Particle>test</Particle> + OFGA <Tag>streetlight</Tag> = '''test_streetlight''' | : FURN <Particle>test</Particle> + OFGA <Tag>streetlight</Tag> = '''test_streetlight''' | ||
Line 1,091: | Line 1,073: | ||
<Oni> | <Oni> | ||
<Objects> | <Objects> | ||
[...] | |||
<Furniture> | <Furniture> | ||
<Header> | <Header> | ||
Line 1,103: | Line 1,085: | ||
</OSD> | </OSD> | ||
</Furniture> | </Furniture> | ||
[...] | |||
</Objects> | </Objects> | ||
</Oni> | </Oni> | ||
Line 1,109: | Line 1,091: | ||
=====Physics.xml===== | =====Physics.xml===== | ||
This file is for objects with "physics". Unlike AKEV core geometry or furniture, | This file is for objects with "physics". Unlike AKEV core geometry or furniture, these objects can be animated. | ||
: | : A small video tutorial on [https://www.youtube.com/watch?v=CFNseg_2UxA how to create a simple animated object] | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=150px| XML tag | !width=150px| XML tag | ||
!width=120px| | !width=120px| Content type | ||
! | ! Description | ||
|- | |- | ||
| <Physics> | | <Physics> | ||
Line 1,132: | Line 1,106: | ||
| <Object Name="..."> | | <Object Name="..."> | ||
| string | | string | ||
| Use | | Use a unique name for each object. | ||
|- | |- | ||
|valign="top"| <ScriptId> | |valign="top"| <ScriptId> | ||
|valign="top"| integer | |valign="top"| integer | ||
| Tested with BSL command ... | | Tested with BSL command... | ||
:obj_create | :obj_create ID [ID] | ||
:obj_kill | :obj_kill ID [ID] | ||
:env_anim | :env_anim ID [ID] | ||
:env_setanim | :env_setanim ID [ID] | ||
The | The scripting ID will be stored in the ONLV's OBOA instance. | ||
|- | |- | ||
|valign="top"| <Flags> | |valign="top"| <Flags> | ||
Line 1,155: | Line 1,129: | ||
|valign="top"| <Physics> | |valign="top"| <Physics> | ||
|valign="top"| flag | |valign="top"| flag | ||
| Optional tag | | Optional tag for an Object. | ||
:None | :None | ||
:Static | :Static | ||
:Linear | :Linear | ||
:Animated | :Animated | ||
:Newton (used with <Flags> FaceCollision to [https://www.youtube.com/watch?v=YICB7qugrtc make object pushable]) | :Newton (used with <Flags> FaceCollision to [https://www.youtube.com/watch?v=YICB7qugrtc make an object pushable]) | ||
:: For a pushable object don't use import sub-tags such as animation name, flags, etc. Just use <Import Path="..." '''/'''> or <Import Url="..." '''/'''> | :: For a pushable object don't use import sub-tags such as animation name, flags, etc. Just use <Import Path="..." '''/'''> or <Import Url="..." '''/'''> | ||
|- | |- | ||
Line 1,200: | Line 1,174: | ||
| <End> | | <End> | ||
| integer | | integer | ||
| Optional tag of Animation. Frame number. Used to define the end of an OBAN from | | Optional tag of Animation. Frame number. Used to define the end of an OBAN from a *.dae file. | ||
|- | |- | ||
| <Start> | | <Start> | ||
| integer | | integer | ||
| Optional tag of Animation. Frame number. Used to define the start of an OBAN from | | Optional tag of Animation. Frame number. Used to define the start of an OBAN from a *.dae file. | ||
|} | |} | ||
Line 1,210: | Line 1,184: | ||
;Example | ;Example | ||
For documentation | For documentation purposes, the file here has been trimmed down. | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> | ||
<Physics> | <Physics> | ||
[...] | |||
<Object Name="motorcycle"> | <Object Name="motorcycle"> | ||
<ScriptId>8</ScriptId> | <ScriptId>8</ScriptId> | ||
Line 1,228: | Line 1,202: | ||
</Import> | </Import> | ||
</Object> | </Object> | ||
[...] | |||
</Physics> | </Physics> | ||
</Oni> | </Oni> | ||
In this example OniSplit takes the "export.dae" | In this example, OniSplit takes the file "export.dae", looks at the parts it contains, and creates geometry files from it. | ||
* M3GMhubs_rear.oni | * M3GMhubs_rear.oni | ||
* M3GMhubs.oni | * M3GMhubs.oni | ||
* | * M3GMmotorcycle.oni | ||
It's | It's convenient that hierarchies are supported here. | ||
The motorcycle is made of 3 parts so 3 object animations ([[XML:OBAN|OBAN]]) will be created up to frame 880. Then OniSplit creates 3 more OBANs starting from frame 881. | The motorcycle is made of 3 parts so 3 object animations ([[XML:OBAN|OBAN]]) will be created up to frame 880. Then OniSplit creates 3 more OBANs starting from frame 881. | ||
The reason for the interruption at frame 880 is probably to give | The reason for the interruption at frame 880 is probably to give Barabas a little more camera time in the cutscene. | ||
;Notes about BSL usage: | ;Notes about BSL usage: | ||
The | The Vago Lab cutscene script uses the motorcycle objects and animations like this: | ||
env_show | env_show 8 0 # hide static motorcycle parts or else they would be visible | ||
# | env_show 9 0 # while Konoko is still riding her animated motorcycle | ||
env_show 10 0 # the static motorcycle is separated into objects 8, 9 and 10 | |||
# | # Static and animated objects are totally independent from each other. | ||
# | # They are stored in different arrays so their script IDs can use the same numbers. | ||
obj_create 8 10 # create animation-ready motorcycle parts | obj_create 8 10 # create all animation-ready motorcycle parts | ||
env_anim 8 10 # animate those parts (not necessary if OBAN flag is "AutoStart") | env_anim 8 10 # animate those parts (not necessary if OBAN flag is "AutoStart") | ||
# | # The first animations would loop because of "AutoStart", so get the | ||
# | # right timing to apply the other animations. "motorcycle02_stop" | ||
# | # and the others will not loop because they don't have "AutoStart". | ||
env_setanim 8 | env_setanim 8 hubs_stop | ||
env_setanim 9 | env_setanim 9 hubs_rear_stop | ||
env_setanim 10 | env_setanim 10 motorcycle02_stop | ||
obj_kill 8 10 # delete animated parts | obj_kill 8 10 # delete all animated parts | ||
env_show 9 1 # show static motorcycle | env_show 9 1 # show static motorcycle model where Konoko parks her bike | ||
=====Corpses.xml===== | |||
'''(OniSplit v0.9.96.0+)''' | |||
'''(Import)''' | '''(Import)''' | ||
CRSA can now be imported from an | CRSA corpses can now be imported from an XML file if registered in the master file. See [[#CRSA|HERE]]. (Two formats available.) | ||
Direct import is not yet supported by OniTools. | Direct import is not yet supported by OniTools. | ||
Line 1,282: | Line 1,250: | ||
---- | ---- | ||
For indirect import, see [http://oni.bungie.org/forum/viewtopic.php?id=2657 HERE] (OniTools v7.1.5+) how to get corpse data. | For indirect import, see [http://oni.bungie.org/forum/viewtopic.php?id=2657 HERE] (OniTools v7.1.5+) on how to get corpse data. | ||
Older | When you process your XML master file, use OniSplit version 0.9.94.0+. Older OniSplit versions like 0.9.86.0 may generate ONLV files that are not re-packable with newer versions. | ||
'''(Export)''' | '''(Export)''' | ||
With Neo's matrix to | With Neo's matrix-to-Euler code, the rotations can be recovered from CRSA. But due to the character's hierarchy, things get messy again (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/CRSA_to_Mod_Tool_wip.png</nowiki>, dead link). (WIP code (<nowiki>https://dl.dropboxusercontent.com/u/139715/temp/CRSA_to_Mod_Tool.txt</nowiki>, dead link)) | ||
A workaround might be to save characters without animations, destroy their hierarchy, apply the local rotations / global translation and glue everything together again. | A workaround might be to save characters without animations, destroy their hierarchy, apply the local rotations / global translation and glue everything together again. | ||
Line 1,297: | Line 1,263: | ||
==Level reimport== | ==Level reimport== | ||
===Export of static geometry=== | ===Export of static geometry=== | ||
After the oni files have been exported, the extraction of objects can fail if their textures can't be found. Those objects probably use textures stored in level 0. | After the .oni files have been exported, the extraction of objects can fail if their textures can't be found. Those objects probably use textures stored in level 0. | ||
In that case use the "-search" argument to make correct extractions. | In that case use the "-search" argument to make the correct extractions. The commands will look like this: | ||
OniSplit.exe -export level0_files level0.dat | OniSplit.exe -export level0_files level0.dat | ||
Line 1,316: | Line 1,282: | ||
* ''level''_turr.dae | * ''level''_turr.dae | ||
Reimporting | Reimporting DAE files (except for env_markers) will merge them with "env" (the core AKEV geometry). | ||
===Export of animated geometry and cameras=== | |||
'''(OniSplit v0.9.90.0+)''' | |||
This is also known as a scene export. All content exported by the scene file will be combined and saved in a single DAE. | |||
This is also known as scene export. All content exported by the scene file will be combined and saved in | |||
OniSplit.exe -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 ( | 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 ("lab"). | ||
<Scene> | <Scene> | ||
Line 1,353: | Line 1,320: | ||
</Scene> | </Scene> | ||
When you load the | When you load the DAE in [[Mod Tool|XSI]] you'll find the motorcycle and the intro cutscene camera. If you select the camera (for better visibility) and press play, you'll get to see the motorcycle intro animation that you know from the game. | ||
For real-time playback click on "Playback" option button and then "Real-Time Playback". | For real-time playback, click on the "Playback" option button and then choose "Real-Time Playback". | ||
;File structure | ;File structure | ||
* The scene contains one or more '''nodes'''. | * The scene contains one or more '''nodes'''. | ||
* Each node represents '''either one 3D object or one camera''' whereby the node name determines the object name inside the | * Each node represents '''either one 3D object or one camera''' whereby the node name determines the object name inside the DAE. | ||
** 3D objects do have a '''<Geometry>''' tag. | ** 3D objects do have a '''<Geometry>''' tag. | ||
** Cameras do have a '''<Camera />''' tag. | ** Cameras do have a '''<Camera />''' tag. | ||
** Each 3D object or camera can have '''one or multiple <Animation>''' tags. Multiple animations will be combined. | ** Each 3D object or camera can have '''one or multiple <Animation>''' tags. Multiple animations will be combined. | ||
** 3D objects can be organized in a '''hierarchy''' that | ** 3D objects can be organized in a '''hierarchy''' that is created with the help of '''sub-nodes'''. Each sub-node can also have animations. | ||
;Scene import | ;Scene import | ||
According to Neo that feature is still under development. RIP. | |||
===Recycle object lists=== | ===Recycle object lists=== | ||
The following files can be reused under <Objects> without any drawback: | |||
* BINACJBOCharacter.xml | * BINACJBOCharacter.xml | ||
* BINACJBOFlag.xml | * BINACJBOFlag.xml | ||
Line 1,383: | Line 1,349: | ||
* BINACJBOWeapon.xml | * BINACJBOWeapon.xml | ||
===Lock lights=== | |||
Door lock lights must be transferred by hand from old an ONLV (ENVP instance) to a) a new ONLV or b) an OBJC particle file. | |||
For method b), you could use [http://mods.oni2.net/system/files/extract_ENVP.txt THIS] script. The advantage is that you don't need to edit the new ONLV afterwards. | |||
For method b) you could use [http://mods.oni2.net/system/files/extract_ENVP.txt THIS] script. | |||
The advantage is that you don't need to edit the new ONLV afterwards | |||
===OBJC and vertex coloring=== | |||
* Object (XML) import via <Object> tag (master XML file) will get you objects without any vertex coloring. (OniSplit will pick *.oni class files from the shared folder.) | |||
* Object (DAE) import via <Model> tag (master SML file) should get you objects with vertex coloring, but no BSL functions. In that case you must add the corresponding OBJC files by hand. | |||
You can choose between these two methods for consoles, triggers, turrets and furniture without particles. Doors and furniture ''with'' particles always require the XML method. | |||
===Manual reimport of physics=== | ===Manual reimport of physics=== | ||
Don't want to make a scene.xml and physics.xml file? All animated physics can be restored if you aren't afraid of post-editing ONLV. | Don't want to make a scene.xml and physics.xml file? All animated physics can be restored if you aren't afraid of post-editing the ONLV. | ||
# Look | # Look in the original level folder and copy the OBAN and M3GM files to your project's output folder. | ||
# Create your level. Then convert the new ONLV to | # Create your level. Then convert the new ONLV to XML. Now you are able to compare the new and old ONLV file. | ||
# Get all original OBOA instances that aren't doors or empty. | # Get all original OBOA instances that aren't doors or empty. | ||
# Each OBOA has a <Geometry> tag which links to an M3GA instance by | # Each OBOA has a <Geometry> tag which links to an M3GA instance by ID. Collect all the M3GAs that are used by your OBOAs. | ||
# Add these collected OBOAs and M3GAs to | # Add these collected OBOAs and M3GAs to your new ONLV. Make sure that your M3GA IDs aren't already taken; change them if necessary. | ||
# Save ONLV and convert to oni. Make package or plugin | # Save the ONLV and convert to .oni. Make a package or plugin and test your reimported level. | ||
===Demo files=== | ===Demo files=== | ||
Level 19 reimport (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/Level_19_reimport.zip</nowiki>, dead link) | |||
For example, it imports animated objects from *.dae files which result in a few bugs: Konoko's | Demo files were already provided at the top of this page (Chapter 3 — Vago Biotech), also a reimport, but it uses a bit different setup. For example, it imports animated objects from *.dae files, which result in a few bugs: Konoko's motorcycle is too low, at another point it is completely missing, and the van at the end of the level has some strange unnecessary gunk attached. | ||
In this second demo, the ENVP and OBOA/M3GA instances were manually reimported. So, if you | In this second demo, the ENVP and OBOA/M3GA instances were manually reimported. So, if you enjoy REing stuff, try to make sense of the second demo, too. | ||
Known issues are: | Known issues are: | ||
* Doors and trigger don't have vertex shading. (Also not possible with normal level creation.) | * Doors and trigger don't have vertex shading. (Also not possible with normal level creation.) | ||
* Consoles tend to have | * Consoles tend to have a collision issue with the player, keeping him trapped. (Jump backwards to escape.) | ||
** This issue might get solved by using a | ** This issue might get solved by using a single BINACJBOConsole.xml file. Or we can try to edit the collision boxes of compound_cons.dae. | ||
So now, how about accessible towers and underground passages or ventilation shafts? ;D The [http://mods.oni2.net/node/119 Prone Mode mod] is so useless right now; let's change this! | |||
==Level export== | ==Level export== | ||
This section is only about | This section is only about XML files. For DAE exporting, see [[#Level_reimport|HERE]]. | ||
Most parts of an Oni level are contained by ONLV and AKEV. For AKEV's XML tags, see [[XML:AKEV|HERE]]. | |||
You would only want to export those two files as XML if you want to check if a texture or an object really made it into the level or not. | |||
===ONLV=== | ===ONLV=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=150px| XML tag | !width=150px| XML tag | ||
!width=120px| | !width=120px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign="top"| <ONLV id="..."> | |valign="top"| <ONLV id="..."> | ||
Line 1,455: | Line 1,408: | ||
|valign="top"| <Environment> | |valign="top"| <Environment> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[XML:AKEV|AKEV]] via '''file''' name (AKEV''name'' | | Link to [[XML:AKEV|AKEV]] via '''file''' name (AKEV''name'', don't use file suffix .oni) | ||
: Level geometry. | : Level geometry. | ||
|- | |- | ||
Line 1,461: | Line 1,414: | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[#OBOA|OBOA]] via '''instance''' number (#''N''). | | Link to [[#OBOA|OBOA]] via '''instance''' number (#''N''). | ||
: The OBOA instance holds doors, animated objects (usually for | : The OBOA instance holds doors, animated objects (usually for cutscenes) and pushable objects (which are not used the original game due to unfinished physics code). | ||
|- | |- | ||
|valign="top"| <SkyBox> | |valign="top"| <SkyBox> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[XML:ONSK|ONSK]] via '''file''' name (ONSK''name'' | | Link to [[XML:ONSK|ONSK]] via '''file''' name (ONSK''name'', don't use file suffix .oni) | ||
: This is the | : This is the skybox. | ||
|- | |- | ||
|valign="top"| <Characters> | |valign="top"| <Characters> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[XML:AISA|AISA]] via '''file''' name (AISA''name'' | | Link to [[XML:AISA|AISA]] via '''file''' name (AISA''name'', don't use file suffix .oni) | ||
: This "AI Setup Array" is an alternative character list. [[XML:BINA/OBJC/CHAR| | : This "AI Setup Array" is an alternative character list. [[XML:BINA/OBJC/CHAR|BINACHAR]] is more powerful. | ||
|- | |- | ||
|valign="top"| <ObjectQuadMap> | |valign="top"| <ObjectQuadMap> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[#ONOA|ONOA]] via '''instance''' number (#''N''). | | Link to [[#ONOA|ONOA]] via '''instance''' number (#''N''). | ||
: This "Object Array" holds functional objects | : This "Object Array" holds functional objects – doors, furniture, turrets, triggers and consoles. In addition, it appears that the engine only searches for door-type objects. | ||
|- | |- | ||
|valign="top"| <Particles> | |valign="top"| <Particles> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[#ENVP|ENVP]] via '''instance''' number (#''N''). | | Link to [[#ENVP|ENVP]] via '''instance''' number (#''N''). | ||
: | : These "Environment Particle" are traditionally only used for door lock lights and particles used by [[XML:OFGA|OFGAs]]. | ||
|- | |- | ||
|valign="top"| <Corpses> | |valign="top"| <Corpses> | ||
|valign="top"| link | |valign="top"| link | ||
| Link to [[#CRSA|CRSA]] via '''instance''' number (#''N''). | | Link to [[#CRSA|CRSA]] via '''instance''' number (#''N''). | ||
: This is a "Corpse Array". It's used to | : This is a "Corpse Array". It's used to spawn dead characters such as Chung in Chapter 1. | ||
|} | |} | ||
===OBOA=== | ===OBOA=== |