Introduction to modding: Difference between revisions

m
tweaking BFW phrasing; linking to better definition of AI as found in video games
m (placing links to text related files)
m (tweaking BFW phrasing; linking to better definition of AI as found in video games)
Line 15: Line 15:


==Introduction to the Oni 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 game code, BungieFrameWork (BFW), and an upper layer with the Oni-specific code. The engine also consists of various subsystems, some of which have colorful animé-related names like [[wikipedia:Akira (film)|Akira]] (environment), [[wikipedia:Motoko Kusanagi|Motoko]] (graphics), and [[wikipedia:My Neighbor Totoro|Totoro]] (animation).
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 [[wikipedia:Akira (film)|Akira]] (environment), [[wikipedia:Motoko Kusanagi|Motoko]] (graphics), and [[wikipedia:My Neighbor Totoro|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.
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.
Line 28: Line 28:


==Introduction to the game data==
==Introduction to the game data==
A game can be compared to a theater play: in both cases, you have <u>stages</u>, <u>actors</u>, <u>scripts</u>, and <u>music</u>. A level is built so that when the player performs certain actions or reaches certain locations on the <u>stage</u>, further events are set in motion according to the <u>script</u>. The player is told what to do through various textual instructions, cutscenes, and/or voice acting (more <u>scripts</u>), and he interacts with [[wiktionary:artificial_intelligence|AI]] <u>actors</u>. <u>Music</u> will often play dynamically behind all this, changing along with the flow of events.
A game can be compared to a theater play: in both cases, you have <u>stages</u>, <u>actors</u>, <u>scripts</u>, and <u>music</u>. A level is built so that when the player performs certain actions or reaches certain locations on the <u>stage</u>, further events are set in motion according to the <u>script</u>. The player is told what to do through various textual instructions, cutscenes, and/or voice acting (more <u>scripts</u>), and he interacts with [[wikipedia:Artificial intelligence (video games)|AI]] <u>actors</u>. <u>Music</u> will often play dynamically behind all this, changing along with the flow of events.


In Oni's case, the <u>stages</u>, <u>actors</u>, and <u>music</u> (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 <u>scripts</u> 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.
In Oni's case, the <u>stages</u>, <u>actors</u>, and <u>music</u> (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 <u>scripts</u> 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.
Line 62: Line 62:


===Editing scripts===
===Editing scripts===
The easiest kind of modding is scripting. Scripts are written in the BungieFrameWork 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 [[wikipedia:Non-player_character|NPC]]s), give the level a logical flow of events, drive cutscenes, make the AIs play certain roles, and alter the level's appearance.
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 [[wikipedia:Non-player_character|NPC]]s), 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.
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.