Creating a level: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page covers level creation from scratch. See [[Modifying an existing level]] if you simply want to change a vanilla level in the game.
{{update|The tutorials on the now-defunct Oni Central Forum, under the section "Links to Forum Tutorials", should be merged into this article.}}
This page covers level creation from scratch. See [[Modifying an existing level]] if you want to change a vanilla level in the game.


==Level releases and resources==
==Level releases and resources==
Line 17: Line 18:
|-
|-
|2019/09/16
|2019/09/16
|[http://oni.bungie.org/forum/viewtopic.php?id=2965 Omega Tournament]
|[https://web.archive.org/web/20240527004257/http://oniforum.bungie.org/viewtopic.php?id=2965 Omega Tournament]
|31
|31
|-
|-
|2016/02/13
|2016/02/13
|[http://oni.bungie.org/forum/viewtopic.php?id=2947 AI Battle]
|[https://web.archive.org/web/20160224173743/http://oni.bungie.org/forum/viewtopic.php?id=2947 AI Battle]
|7
|7
|-
|-
|2014/01/19
|2014/01/19
|[http://oni.bungie.org/forum/viewtopic.php?id=2698 Wilderness Preserve]
|[https://web.archive.org/web/20211202225410/http://oni.bungie.org/forum/viewtopic.php?id=2698 Wilderness Preserve]
|17
|17
|-
|-
|2013/09/07
|2013/09/07
|[http://oni.bungie.org/forum/viewtopic.php?id=2656 Island]
|[https://web.archive.org/web/20201127180732/http://oni.bungie.org/forum/viewtopic.php?id=2656 Island]
|29
|29
|-
|-
|2013/07/12
|2013/07/12
|[http://oni.bungie.org/forum/viewtopic.php?id=2640 City]
|[https://web.archive.org/web/20201127175459/http://oni.bungie.org/forum/viewtopic.php?id=2640 City]
|28
|28
|-
|-
|2013/06/01
|2013/06/01
|[http://oni.bungie.org/forum/viewtopic.php?id=2619 Fight Club]
|[https://web.archive.org/web/20201029102326/http://oni.bungie.org/forum/viewtopic.php?id=2619 Fight Club]
|25
|25
|-
|-
|2012/05/12
|2012/05/12
|[http://oni.bungie.org/forum/viewtopic.php?id=2357 Old China]
|[https://web.archive.org/web/20220701102842/http://oni.bungie.org/forum/viewtopic.php?id=2357 Old China]
|24
|24
|-
|-
|2012/03/18
|2012/03/18
|[http://oni.bungie.org/forum/viewtopic.php?id=2302 Boss Battle]
|[https://web.archive.org/web/20211202220454/http://oni.bungie.org/forum/viewtopic.php?id=2302 Boss Battle]
|23
|23
|-
|-
|2012/02/12
|2012/02/12
|[http://oni.bungie.org/forum/viewtopic.php?id=2271 De Dust Deluxe]
|[https://web.archive.org/web/20201029113554/http://oni.bungie.org/forum/viewtopic.php?id=2271 De Dust Deluxe]
|22
|22
|-
|-
|2012/01/23
|2012/01/23
|[http://oni.bungie.org/forum/viewtopic.php?id=2242 Parkour Challenge 2]
|[https://web.archive.org/web/20201029114415/http://oni.bungie.org/forum/viewtopic.php?id=2242 Parkour Challenge 2]
|21
|21
|-
|-
|2012/01/16
|2012/01/16
|[http://oni.bungie.org/forum/viewtopic.php?id=2235 Parkour Challenge]
|[https://web.archive.org/web/20211205145843/http://oni.bungie.org/forum/viewtopic.php?id=2235 Parkour Challenge]
|21
|21
|-
|-
|2011/07/25
|2011/07/25
|[http://oni.bungie.org/forum/viewtopic.php?id=2001 Mini-Partenon]
|[https://web.archive.org/web/20201029103607/http://oni.bungie.org/forum/viewtopic.php?id=2001 Mini-Partenon]
|5
|5
|-
|-
|2011/10/03
|2011/10/03
|[http://oni.bungie.org/forum/viewtopic.php?id=2024 Muro's Lair - Preview]
|[https://web.archive.org/web/20201029113340/http://oni.bungie.org/forum/viewtopic.php?id=2024 Muro's Lair - Preview]
|20
|20
|-
|-
|2011/07/03
|2011/07/03
|[http://oni.bungie.org/forum/viewtopic.php?id=1957 Hexagon]
|[https://web.archive.org/web/20201029113724/http://oni.bungie.org/forum/viewtopic.php?id=1957 Hexagon]
|16
|16
|-
|-
|2011/06/23
|2011/06/23
|[http://oni.bungie.org/forum/viewtopic.php?id=1938 Junkyard]
|[https://web.archive.org/web/20201029104928/http://oni.bungie.org/forum/viewtopic.php?id=1938 Junkyard]
|15
|15
|-
|-
Line 81: Line 82:
|-
|-
|2010/11/08
|2010/11/08
|[http://oni.bungie.org/forum/viewtopic.php?id=1736 Arena of Hurt (OTA)]
|[https://web.archive.org/web/20210117150652/http://oni.bungie.org/forum/viewtopic.php?id=1736 Arena of Hurt (OTA)]
|7
|7
|-
|-
|2010/11/06
|2010/11/06
|[http://oni.bungie.org/forum/viewtopic.php?pid=50565#p50565 Martian Colony] AKA "Silly World"
|[https://web.archive.org/web/20201029105217/http://oni.bungie.org/forum/viewtopic.php?pid=50565#p50565 Martian Colony] AKA "Silly World"
|5
|5
|-
|-
|2010/02/15
|2010/02/15
|[http://oni.bungie.org/forum/viewtopic.php?id=1506 Maze]
|[https://web.archive.org/web/20201029113916/http://oni.bungie.org/forum/viewtopic.php?id=1506 Maze]
|5
|5
|-
|-
Line 95: Line 96:
|[http://mods.oni2.net/node/4 Arena of Pain]
|[http://mods.oni2.net/node/4 Arena of Pain]
|30
|30
|-
|2024/05/20
|[https://gamebanana.com/mods/514707 Kitsune: Chapter 1]
|20
|}
|}


===Forum tutorials on level creation===
===Forum tutorials on level creation===
* '''[http://oni.bungie.org/forum/viewtopic.php?id=2087 "Creating the Lair - A level tutorial"]'''
* '''[https://web.archive.org/web/20201029114347/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)"]
* [https://web.archive.org/web/20201127172559/http://oni.bungie.org/forum/viewtopic.php?pid=53026 "Creating a Custom Oni Level (s10k video tutorials)"]
* [http://oni.bungie.org/forum/viewtopic.php?id=1515 "Creating new levels"]
* [https://web.archive.org/web/20201127180431/http://oni.bungie.org/forum/viewtopic.php?id=1515 "Creating new levels"]
* [http://oni.bungie.org/forum/viewtopic.php?pid=33838 "Create levels with pathfinding grids"]
* [https://web.archive.org/web/20201029114358/http://oni.bungie.org/forum/viewtopic.php?pid=33838 "Create levels with pathfinding grids"]
* [http://oni.bungie.org/forum/viewtopic.php?id=2000 "More questions about levels"]
* [https://web.archive.org/web/20210117145338/http://oni.bungie.org/forum/viewtopic.php?id=2000 "More questions about levels"]
* [http://oni.bungie.org/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]
* [https://web.archive.org/web/20201029103906/http://oni.bungie.org/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]


===Wiki pages on level creation===
===Wiki pages on level creation===
* [[Creating a level]] (you are here)
* [[Creating a level]] (you are here)
* [[Modifying an existing level]]
* [[Modifying an existing level]]
* [[New levels]]<!--notes and comments by geyser that should be revisited / merged with this page-->
* [[New levels]] (a historical document)
* [[Lightmapping levels]]
* [[Lightmapping levels]] (an experiment)


===Free asset sources===
===Free asset sources===
* [http://vk.com/gameready Various game meshes]
* [https://3dwarehouse.sketchup.com/ 3D Warehouse] – architectural models (also see the [https://3dwarehouse.sketchup.com/collection/236901867937c4ed5fbaf4019d18db23/New-content-for-Oni curated collection] by geyser)
* [http://web.archive.org/web/20230601050258/http://tutorialsforblender3d.com/Textures/Textures_index.html Various game textures]
* [https://www.turbosquid.com/ TurboSquid] – various models, including architecture
* [https://www.textures.com Various game textures]
* [https://www.textures.com Textures.com] – wide variety of textures


==Engine limitations==
==Engine limitations==
Line 193: Line 198:
:The '''surface of a polygon''' is also named face. The '''direction''' of a face in '''defined by its normal'''. If an object seems to have a hole, it might be that the polygon just has a '''flipped normal''' and is therefore wrongly rendered (displayed on screen).
:The '''surface of a polygon''' is also named face. The '''direction''' of a face in '''defined by its normal'''. If an object seems to have a hole, it might be that the polygon just has a '''flipped normal''' and is therefore wrongly rendered (displayed on screen).
;Normal
;Normal
:Faces and even vertices themselves have directions. The normals of vertices determine how smooth or sharp edges are will appear.
:Faces and even vertices themselves have directions. The normals of vertices determine how smooth or sharp edges will appear.
;Vertex (plural<nowiki>:</nowiki> vertices)
;Vertex (plural<nowiki>:</nowiki> vertices)
:A point within a polygon.
:A point within a polygon.
Line 204: Line 209:
:Polygons made of 4 points. Planes. Rectangles.
:Polygons made of 4 points. Planes. Rectangles.
:Internally, all quads get converted into two triangles and will affect the maximum triangle count accordingly.
:Internally, all quads get converted into two triangles and will affect the maximum triangle count accordingly.
;Geometry
:Objects made of tris and/or quads.
;Level
;Level
:The term "level" is often used to shorten "level map" (buildings and terrain).
:The term "level" is often used to shorten "level map" (buildings and terrain).
;Geometry
;Geometry
:Oni differentiates between basically 3 types of geometry:
:Level geometry can be objects made of tris and/or quads.
:* Static objects (sometimes also name AKEV core geometry)
:Oni differentiates between basically 3 types of level geometry:
:* Static objects (sometimes also named AKEV core geometry)
:* Animated objects
:* Animated objects
:* Pushable objects (not used in the original game)
:* Pushable objects (not used in the original game)
;Static geometry
;Static geometry
:* '''Unique level geometry with no functions''' (AKEV core geometry such as buildings and streets).
:* '''Unique level geometry with no functions''' (AKEV core geometry such as buildings and streets).
:* '''Repeating objects''' are flagged as '''furniture (FURN)''' although they can be outdoor objects such as boxes and containers. <!--Oni's story plays out most often inside buildings. So, there you go. -->FURN objects were used to be imported by an object collection, an CJBO. Nowadays, furniture collections can be used (again) for imports, but the individual objects are stored as OFGA files. This modularity is known in many game editors (like the Unreal Engine Editor). So, '''OFGA are nothing else than "game assets".''' The drawback of OFGA is that they '''will not import with any vertex shading'''. Only their '''geometries''', attached '''particle''' and '''gunk flags''' get copied into final (baked) level geometry.
:* '''Repeating objects''' are flagged as '''furniture ([[Creating_a_level#Furniture.xml|FURN]])''' although they can be outdoor objects such as boxes and containers. <!--Oni's story plays out most often inside buildings. So, there you go. -->FURN objects were used to be imported by an object collection, an CJBO. Nowadays, furniture collections can be used (again) for imports, but the individual objects are stored as [[XML:OFGA|OFGA]] files. This modularity is known in many game editors (like the Unreal Engine Editor). So, '''OFGA are nothing else than "game assets".''' The drawback of OFGA is that they '''will not import with any vertex shading'''. Only their '''geometries''', attached '''particle''' and '''gunk flags''' get copied into final (baked) level geometry.
:* '''Objects with actual functions''' (CJBO such as doors, consoles, triggers)
:* '''Objects with actual functions''': [[XML:BINA/OBJC/CONS|CONS]], [[XML:BINA/OBJC/DOOR|DOOR]], [[XML:BINA/OBJC/TRIG|TRIG]], [[XML:BINA/OBJC/TURR|TURR]]
:** Some types of CJBO (spawn lists of weapons, characters, powerups and of course flags and patrol paths) are not considered as level geometry.
;[[XML:AKEV#AGQG|Gunk flags]]
;[[XML:AKEV#AGQG|Gunk flags]]
:Properties directly associated with the polygons. Among others, these can be: Transparent, TwoSided, NoCollision, Invisible, NoObjectCollision, NoCharacterCollision, NoDecals, Furniture, Impassable.
:Properties directly associated with the polygons. Among others, these can be: Transparent, TwoSided, NoCollision, Invisible, NoObjectCollision, NoCharacterCollision, NoDecals, Furniture, Impassable.
Line 251: Line 254:


BSL scripts bring levels fully to life. The logic is mostly event driven whereby different checkpoints and conditions must be reached.
BSL scripts bring levels fully to life. The logic is mostly event driven whereby different checkpoints and conditions must be reached.
* Checkpoints are actually [[XML:BINA/OBJC/TRGV|trigger volumes]] that can recognize entering and exiting character.
* Checkpoints are actually [[XML:BINA/OBJC/TRGV|trigger volumes]] that can recognize entering and exiting characters.
* The second most important source of events are [[XML:BINA/OBJC/CHAR|character (script) functions]], especially the die function of enemies.
* The second most important source of events are [[XML:BINA/OBJC/CHAR|character (script) functions]], especially the die function of enemies.
** To support good and less good players alike NPC characters can feature the UpgradeDifficulty flag. Also, BSL scripts can detect the current [[BSL:Game_status|difficulty level]].
** To support good and less good players alike, NPC characters can feature the UpgradeDifficulty flag. Also, BSL scripts can detect the current [[BSL:Game_status|difficulty level]].
* [[XML:BINA/OBJC/TRIG|Laser triggers]] are mostly used to control [[XML:BINA/OBJC/TURR|turrets]]. [[XML:BINA/OBJC/CONS|Consoles]], triggers and [[XML:DOOR|door]] unlocking are used to set up simple "riddles”.
* [[XML:BINA/OBJC/TRIG|Laser triggers]] are mostly used to control [[XML:BINA/OBJC/TURR|turrets]]. [[XML:BINA/OBJC/CONS|Consoles]], triggers and [[XML:DOOR|door]] unlocking are used to set up very simple "riddles”.
* The creation of cut scenes is time consuming quality work. Due to missing tools for streamlining the workflow it is totally okay for you to skip this.
* The creation of cut scenes is time-consuming quality work. Due to missing tools for streamlined workflows, it is totally okay for you to skip this.
** New synconized FILM, OBAN and TRAM files are required for cut scenes. Not to mention sound files for dialogue.
** New synchronized FILM, OBAN and TRAM files are required for cut scenes. Not to mention sound files for dialog.


==The master XML file==
==The master XML file==
Line 286: Line 289:
'''Common mistake:'''
'''Common mistake:'''


CJBO files '''need relative paths to the resource instead of just file names'''. Taking consoles, for example: a standard export to XML gives you "console_data". But to use the shared resources these must be paths like "'''consoles/console_data.oni'''" as they are stored in '''shared/console/'''. Note how the demoed '''shared''' folder is placed next to the [http://mods.oni2.net/node/299 project ("lab")] folder and the XML master file points to it using "../shared".
A few CJBO files '''need relative paths for resources'''. Inserting only a file name will not work. Let us take consoles for example: A relative path to a console should look like this: "'''consoles/console_data.oni'''". The resources are stored in '''shared/console/''' but since the XML master file points to the starting folder via "../shared", it will be omitted in all actual resource paths. If you need, look into the files of the [http://mods.oni2.net/node/299 demo project "lab"]. '''Doors''' and '''furniture''' also require relative paths.
 
'''lab/lab.xml'''
<?xml version="1.0" encoding="utf-8" ?>
<Oni>
    <Level SharedPath="../shared">
    ...
 
'''lab/Console.xml'''
<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <Objects>
        <CONS Id="4695">
            <Header>
                <Flags>Gunk</Flags>
                <Position>944.1944 -27 29.37764</Position>
                <Rotation>3.623707E-05 270 0</Rotation>
            </Header>
            <OSD>
                <Class>consoles/console_data.oni</Class>
                ...
|-
|-
| <Environment>
| <Environment>
Line 393: Line 416:
|valign="top"| <Import>
|valign="top"| <Import>
|valign="top"| link
|valign="top"| link
| File path. Supported files:
| File path to an OBJC (collection) file. Supported collection files for <Import> are:
: [[XML:BINA/OBJC/CHAR|Character.xml]] (has to contain player character if there's no AISA file with it)
: [[XML:BINA/OBJC/CHAR|Character.xml]] (has to contain player character if there's no AISA file with it)
: [[XML:BINA/OBJC/CONS|Console.xml]]
: [[XML:BINA/OBJC/CONS|Console.xml]]
Line 409: Line 432:
: [[XML:BINA/OBJC/WEAP|Weapon.xml]]
: [[XML:BINA/OBJC/WEAP|Weapon.xml]]


'''NOT''' supported (you need to import as regular .oni file):
The following two collection files are '''NOT''' supported. You need to copy them as regular pre-compiled *.oni files into your mod package:
: [[XML:BINA/OBJC/MELE|Melee.xml]] (overrides global MELE; not used in vanilla levels)
: [[XML:BINA/OBJC/MELE|Melee.xml]] (overrides global MELE; not used in vanilla levels)
: [[XML:BINA/OBJC/CMBT|Combat.xml]] (overrides global CMBT? not used in vanilla levels)
: [[XML:BINA/OBJC/CMBT|Combat.xml]] (overrides global CMBT?; not used in vanilla levels)
 
'''Inside''' the following three supported collection files, provide links to pre-compiled (*.oni) class files: console, door and furniture collections. Use relative paths such as:
:: <code>'''consoles/'''console_data'''.oni'''</code>
:: <code>'''doors/'''TCdouble'''.oni'''</code>
:: <code>'''furniture/'''V_tctf_bigvan'''.oni'''</code>
 
When you are unsure about the folder structure refer back to the [http://mods.oni2.net/node/299 level import demo].
|-
|-
| <Films>
| <Films>
Line 755: Line 785:
By default, a Mod Tool scene has one Infinite light, but it doesn't shine in every direction so you might want to add more Infinite lights. Let's say one Infinite light for each direction (+X, -X, +Y, -Y, +Z, -Z) with an intensity of circa 0.25 (night) or 0.75 (day).
By default, a Mod Tool scene has one Infinite light, but it doesn't shine in every direction so you might want to add more Infinite lights. Let's say one Infinite light for each direction (+X, -X, +Y, -Y, +Z, -Z) with an intensity of circa 0.25 (night) or 0.75 (day).


The illumination of those lights can be integrated into the vertex color property. There's some information [http://oni.bungie.org/forum/viewtopic.php?pid=29089#p29089 on OCF here]; the quoted information is in triplicate, so don't get confused by that: at first it's detailed, then summarized, then as a checklist.
The illumination of those lights can be integrated into the vertex color property:
 
Basically, you can go with the checklist:
 
* Property > Color At Vertices Map
* Property > Color At Vertices Map
* Property > Render Map
* Property > Render Map
Line 1,124: Line 1,151:
|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 with the files it needs: M3GM and TXMP.
| File path to a '''pre-compiled [[XML:OFGA|OFGA]] (*.oni) file'''. Use it as part of a relative path. Make sure that the OFGA comes with the files it needs: M3GM and TXMP.


An OFGA can hold multiple M3GMs. That 3D content will then be integrated into the AKEV.
An OFGA can hold multiple M3GMs. That 3D content will then be integrated into the AKEV.
8,452

edits