Introduction to modding: Difference between revisions
m (changing link from http->https) |
m (link fixes) |
||
Line 79: | Line 79: | ||
'''''Talk about AKEVs and related data here. Mention Mod Tool, [[SketchUp_tutorials_and_tips|SketchUp]].''''' | '''''Talk about AKEVs and related data here. Mention Mod Tool, [[SketchUp_tutorials_and_tips|SketchUp]].''''' | ||
* tutorial: [[ | * tutorial: [[Authoring_custom_camera_animations]] | ||
====Textures==== | ====Textures==== | ||
'''''Mention [https://www.gimp.org/ Gimp], Paint.NET.''''' | '''''Mention [https://www.gimp.org/ Gimp], Paint.NET.''''' | ||
* tutorial: [[ | * tutorial: [[Modifying textures|Modifying textures (TXMP)]] | ||
====Characters==== | ====Characters==== |
Revision as of 16:06, 10 March 2021
This page is unfinished. Can you fill in any missing information? |
This page provides an introduction to modding that does not assume that you have prior modding experience or knowledge of the Oni engine. Links to more technical parts of the wiki are interspersed below or can be accessed directly from the wiki's Main Page.
Introduction to modding
Modifying, or "modding", a game is generally easier than creating one, because you might only be changing some of the game's existing elements, or creating a limited amount of new data. Nevertheless, modding can be an intimidating field to get into. Our community does not have the polished modding tools of the big engines like Unreal (but we're getting better). You should have a DIY personality and a high tolerance for technical details. If this page seems like a chore to read, for instance, then you are definitely not ready for Oni modding :-) We do not yet have any modding solutions with a big red button that says "easy".
Like learning a new language, modding your first game is always the hardest, but after that you can more easily pick up new ones. If you take things one step at a time, you can learn a lot from Oni about how to make games in general; in fact, many game developers started out as modders. Additionally, there are lots of different ways for someone to mod; whether your interest is in coding, art, sound, 3D modeling, or general game design, 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.
- Go to the Oni Mod Depot to see what kinds of mods are available, or;
- Install the Anniversary Edition to try out the mods, or;
- Continue reading to get an overview of the game engine.
Introduction to the Oni engine
Oni runs on a custom engine that Bungie could build for both Windows and the Macintosh (later, PlayStation 2 support was added, however console games are not easily modded, so we do not work with the PS2 version of Oni). At the time development started, Bungie did not yet have a true 3D engine, and Oni's lead coders intended their work to be reused in future cross-platform Bungie titles, so the engine is separated into a lower layer of general-purpose game code called BungieFrameWork (usually referred to as simply BFW), and an upper layer called Oni with Oni-specific code. The engine also consists of various subsystems, some of which have colorful animé-related names like Akira (environment), Motoko (graphics), and Totoro (animation).
Unfortunately, the game was rushed to completion during a change of ownership, and it was not possible for the developers to release any tools or information to aid the fans in modding. The game data also reflects Oni's rocky development, being assembled somewhat haphazardly, containing unused and duplicate resources, and also missing a number of resources that the engine looks for during gameplay. One good thing that can be said about the engine is that it is solid enough to run smoothly over top of the errors that it regularly encounters in the data. That being said, it's easy to crash the engine when modding, as is the case with all game engines.
Due to the lack of modding tools/information at the time of Oni’s release, fans had to explore the wild jungle of raw game data and create modding tools through reverse-engineering. It took over seven years to unlock most of the game's secrets –- and the work is still ongoing. But to make a long story short, we can now mod almost all types of data effectively, allowing us to create entirely new levels and characters. Now we're turning our focus to making tools that are user-friendly so artists can work more freely.
Altogether, we have identified over 100 types of resources (often called "file types" on this wiki, and "tags" in many other game modding communities) in the game data, however we only directly edit about half of these. It may sound intimidating at first, but depending on the kind of modding you want to do, you might be able to start working with only a little knowledge of the engine.
- Go to Oni for the full story on Oni's development, or;
- Go to History of Oni modding to read about the community's accomplishments up until now, or;
- Continue reading to learn about the game data files.
Introduction to the game data
A game can be compared to 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 on the stage, further events are set in motion according to the script. The player is told what to do through various textual instructions, cutscenes, and/or voice acting (more scripts), and he interacts with AI actors. Music will often play dynamically behind all this, changing along with the flow of events.
In Oni's case, the stages, actors, and music (and other sounds) are all packed together into files inside GameDataFolder/ that end in ".dat", ".raw", and, on Macs, ".sep". The level0_Final data files provide resources for all levels, and when you load a Chapter, an additional set of data files provide the level-specific resources for that Chapter (e.g. level12_Final for Chapter 10). The scripts are stored in separate, plain-text files ending in ".bsl", in GameDataFolder/IGMD/. The player's progress is stored in persist.dat, next to the Oni application.
- Go to Oni (folder) for information on each file, or;
- Go to Game data terminology to learn the precise terms for Oni's data, or;
- Continue reading to learn the general process of modding.
Introduction to the modding workflow
The general order of events in creating a mod is (1) unpacking the resources you wish to edit, (2) editing them, and (3) re-packing them into Oni's level data. These days, you can rely entirely on the Anniversary Edition Installer to re-pack your data, which means that you just need to know how to create the kind of mod package that the AEI requires. If you are only creating a script mod, then you don't need to unpack any data, but you'll still need to know how to place your script(s) in a mod package.
Add something here about how to find a given resource.
Data unpacking
The game data cannot be edited easily until our tools convert it into something more modder-friendly. Thus you will usually start by using OniSplit to break level data files (a .dat file supplemented by a .raw file, and on the Mac a .sep file as well) into their component resources (.oni files), then converting those resources into something editable. The editable format you arrive at will depend on the kind of data you're editing. It might be plain-text, XML, PNG, Collada, WAV, etc.
Third-party tools
If you are scripting, then you might need nothing more than a text editor. For editing textures, you might only need a free bitmap editor. For creating levels or characters, you'll need a full 3D modeling package. Thankfully, since Oni is graphically primitive, you won't need to know as much about modeling as with a modern game, and there are free modelers available (but not as good as the commercial ones). Our recommendations for tools will be found under the appropriate subsections of "Modding resources", below.
Community tools
Talk about scripting assistants, XmlTools, Vago, and other tools we've made, and which are available from within the AEI.
Mod creation
To see how mods normally look and how they are distributed and installed, you should download the Anniversary Edition and choose to install some mods. You can then look at the packages that have been downloaded to AE/AEInstaller/packages/.
- Go to OniSplit's page to learn how to unpack and reassemble the game data, or;
- Go to XmlTools' page to learn how to smartly alter the game data during mod installation, or;
- Go to Making a mod package to learn how to assemble a mod, or;
- Continue reading to learn about the types of modding you can perform.
Introduction to areas of modding
The data which Oni relies upon comes from scripts, game data (resources), and persist.dat.
Editing scripts
The easiest kind of modding is scripting. Scripts are written in the BFW Scripting Language and stored as plain-text files with the suffix .bsl in the sub-folders inside GameDataFolder/IGMD/. Scripts take a lifeless level and spawn characters in it (Konoko and the AI-driven NPCs), give the level a logical flow of events, drive cutscenes, make the AIs play certain roles, and alter the level's appearance.
Scripting is the easiest way to mod because you can work with existing game data, and only have to modify BSL files using a text editor. It's quick and easy to see the results of your work (just reload the level), and you have lots of accessible examples to learn from (14 levels' worth!). That being said, scripts sometimes reference game resources in technical ways, so you will have to learn how certain data types work in order to script effectively.
- Go to the BSL namespace to start learning about scripting, or;
- Continue reading to learn what's involved with editing resources.
Modding resources
Broadly speaking, Oni's resources can be broken down as: environments (architecture, triggers, and furniture), characters (class data, models), weapons (ditto), text (diary pages, objectives, subtitles, etc.), and sound (music, voice-overs, and sound effects). However, new levels do not require all this data to be made from scratch. You might decide to re-use a level or some of its resources, or make a new level populated with existing characters, etc.
- Go to the XML namespace to get a plain-English introduction to the types of game data and learn the (relatively) user-friendly XML modding technique, or;
- Go to the OBD namespace to learn more technical details about the game data, or;
- Continue reading to start down the path to modding specific kinds of resources.
Environments
Talk about AKEVs and related data here. Mention Mod Tool, SketchUp.
- tutorial: Authoring_custom_camera_animations
Textures
Mention Gimp, Paint.NET.
- tutorial: Modifying textures (TXMP)
Characters
Characters in Oni are built with a simple 19-part skeleton. Talk about ONCCs and related data here. Mention Mod Tool, Blender.
- tutorial: Importing character models (TRBS)
- tutorial: Adding spawnable characters to a level (CHAR)
- tutorial: Adding character classes (ONCC)
- tutorial: Tweak animation (TRAM)
Talk about OBANs and TRAMs here. Mention Mod Tool.
- 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 variant need to be set. For all I know this works with animations exported from Oni and modified in Softimage. If you come up with a completely new animation it should work as long as the skeleton is similar to the one used in Oni.
Weapons
- tutorial: Importing_weapon_models
Text
As long as you don't confuse IDs of instances and stick to the structure, these types shouldn't pose a problem.
Important text-related file type are:
Less important (rarely used) file:
Not important:
Sound and Music
- Instructions on importing sounds and links to conversion tools can be found HERE.
Need some inspiration?
To get ideas, play some existing mods (which you can install with the AE), or look at the pages below.