Introduction to modding

From OniGalore
Revision as of 02:23, 8 April 2013 by Iritscen (talk | contribs) (starting a rewrite)
Jump to navigation Jump to search
Unfinished building-60px.jpg

This page is unfinished. Can you fill in any missing information?
If it is not clear which part of the page is unfinished, ask on the talk page.

Introduction to modding

No easy button.png

Creating or modding a game is like writing a theater play: in both cases, you have stages, actors, scripts, and music. A level is built so that when the player performs certain actions or reaches certain locations, further events are set in motion. The player is told what to do through various textual instructions, voice acting, and cinematics (cutscenes).

Modding can be an intimidating field to get into, but taking things one step at a time, you can learn a lot about how to make games. Like learning a second language, modding your first game is always the hardest, and then you learn the common points that games share and you can more easily pick up new ones. Additionally, there are lots of different ways for someone to mod; whether your talent is art, sound, modeling or design in general, there's something for you to do, and collaborating with others to divide the work according to your abilities can lead to a memorable, rewarding creative experience. Because of the DIY nature of our work here, it's recommended that you have an interest in, or at least a high tolerance for, technical details. We do not yet have any modding solutions with a big red button that says "easy".

Introduction to the engine

Oni runs on an engine that was custom-written for the game. At the time development started, Bungie did not yet have a true 3D engine, and it appears that the lead coders intended their work to be reused in future Bungie titles. In the course of events, this never happened. However, as a result of this advance planning, the Oni engine (which does not have a name per se) is built in an industrial, abstracted way in two major layers: the BungieFrameWork (BFW), which contains general code for a 3D engine, and the code for Oni itself, which adds game-specific stuff like AI and the combat system. Altogether, we have identified 124 types of resources in the game data, however only about 88 (and a half) are used.

Due the non-existence of modding tools at the time of Oni’s release, fans had to tame the wild jungle of raw game data and create modding tools on their own. It took over seven years to unlock most possibilities –- and the work is still ongoing. Read the full story HERE. The short version is that we can now mod almost all types of data effectively, meaning we can create entirely new levels with new characters, new scripts, new voice acting, and new music.

It may sound intimidating at first, but many of the data types (often called "file types" on this wiki, and "tags" in many other game modding communities) fold into each other, such that you only need to know a few file types well, and the rest are created for you. Depending on the kind of modding you want to do, you might be able to start modding with only a little knowledge of the engine.

Kinds of modding

Scripting

The easiest kind of modding is scripting. Scripts are written in Bungie Script Language and stored as *.bsl files, that's why we often say "BSL mods". They build up the level logic, simply said they make the level to appear logic/intelligent, they give basic commands to game engine. Spawn enemies there if player reaches point X, give them weapons, start cutscene , etc..

Characters

Levels

OBD refers to Oni Binay Data. Script commands are useless when their addressed resources don't exist. A BSL command might say "ai2_movetoflag characterA 7" (characterA moves to point 7) but the actual movement animation and flag comes from the binaries, in this case called TRAM and FLAG. Every resource has a four-letter-acronym. (Make sure to check out the talk pages, they might contain additional information such as XML documentations.) For example, TRAM stands for Totoro Animation. Nowadays, TRAM can be converted to XML almost bug-free. XML files can be read and rewritten more easily by hand but still lacks user-friendliness when it comes to a few special file types.

RAICOMthrow_fw_kick_TN.png

An "appetizer screenshot".


Some binary resources don't suit XML. These are 3D objects and animations, sounds and textures, they become converted into their native formats.
By modding it is often meant that you can also create complete new resources.

  • 3D objects (characters, objects, levels) and animations can be modified/created in Mod Tool, SketchUp is also good for levels.
  • Texture can be modified/created in your favorite graphic program: GIMP, Photoshop, etc. – as long as these programs outputs files in formats that can be reconverted.


In any case make sure to download AE which provides you a sophisticated modding framework.


TIP:

Copy the edition folder. Then you have:

  • one AE installation to create mods whereby you can use self-made level plugins and so on
  • one AE installation to test your own final mods, if no problems appears it's ready for release

Tools, documentations and tutorials

BSL


OBD

file converting in general


3D


Animation

You need to add some stuff to that file to make it actually work as an animation. In particular the animation type, from/to states and varient needs to be set.
For all I know this works with animations exported from Oni and modified in Softimage. If you come up with a completly new animation it should work as long as the skeleton is similar to the one used in Oni.
Note that the geometry that is present inside the Collada file is used to compute the "vertical extents" so it better be the same or close to the one the animation is intended for.
The biggest problem are the attacks. While it's not difficult to add attacks to the xml file, computing the necessary "extents" is not going to be easy. I guess in the end I'll have to add some command to OniSplit to do it.
Edit: attack extents becomes automatically calculated with onisplit v0.9.55.0 and newer


HEX


Sound

  • Instructions how to import sounds and links to conversion tools can be found HERE.


Textures


Need some inspiration?

Play some existing mods to get ideas (start with the AE), or look at the pages below.