Introduction to modding: Difference between revisions

m
fixing WP redirect; other link tweaks
m (link fix)
m (fixing WP redirect; other link tweaks)
Line 13: Line 13:


==What engine does Oni run on?==
==What engine does Oni run on?==
Oni runs on a custom engine that could be built for Windows, the Macintosh and the PlayStation 2 (console games are not easily modded, so we don't work with the PS2 version of Oni). The engine 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 could be built for Windows, the Macintosh and the PlayStation 2 (console games are not easily modded, so we don't work with the PS2 version of Oni). The engine consists of various subsystems, some of which have colorful animé-related names like [[wp:Akira|Akira]] (environment), [[wp:Motoko Kusanagi|Motoko]] (graphics) and [[wp: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. Thus, fans had to explore the wild jungle of the raw game data and create modding tools through reverse-engineering. It took over seven years to unlock most of the game's secrets, but we can now mod almost all types of data effectively, allowing us to create entirely new levels and characters.
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. Thus, fans had to explore the wild jungle of the raw game data and create modding tools through reverse-engineering. It took over seven years to unlock most of the game's secrets, but we can now mod almost all types of data effectively, allowing us to create entirely new levels and characters.
Line 24: Line 24:


==How is the game data structured?==
==How is the game data structured?==
A game can be compared to a theater play: in both cases, you have <u>stages</u>, <u>scripts</u>, <u>actors</u>, and <u>music</u>. 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 interacts with [[wikipedia:Artificial intelligence (video games)|AI]] '''actors''' along the way. '''Music''' 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>scripts</u>, <u>actors</u>, and <u>music</u>. 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 interacts with [[wp:Artificial intelligence in video games|AI]] '''actors''' along the way. '''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 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" inside GameDataFolder/IGMD/. The player's progress is stored in persist.dat next to the Oni application.
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 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" inside GameDataFolder/IGMD/. The player's progress is stored in persist.dat next to the Oni application.
Line 56: Line 56:


===Editing scripts===
===Editing scripts===
The easiest kind of modding is scripting. Scripts are written in BSL, the BFW Scripting Language, and stored as plain-text files with the suffix .bsl in 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 BSL, the BFW Scripting Language, and stored as plain-text files with the suffix .bsl in sub-folders inside GameDataFolder/IGMD/. Scripts take a lifeless level and spawn characters in it (Konoko and the AI-driven [[wp: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 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. 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 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. 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.