BSL:BFW Scripting Language: Difference between revisions
(→Knowledge database: adding BSL:Defunct, orphaned till now) |
m (wording) |
||
Line 1: | Line 1: | ||
'''BungieFrameWork Scripting Language''' (simply called '''BSL''') is what Oni scripts are written in. Being a scripting language, it is far more limited in scope and usage than a | '''BungieFrameWork Scripting Language''' (simply called '''BSL''') is what Oni's level scripts are written in. Being a game scripting language, it is far more limited in scope and usage than a full programming language, as it was designed only to move events forward in the game, not to build complete programs. Specifically, BSL scripts are responsible for managing the player's objectives, directing AIs, creating environmental effects and choreographing cutscenes. | ||
Physically speaking, they are the .bsl files inside the [[IGMD|Oni/GameDataFolder/IGMD/]] folder. Being in plain-text, scripts can be edited with any word-processing program, such as the built-in Notepad (Windows) or TextEdit (Mac); the only requirement is that you must use the suffix ".bsl" for scripts instead of ".txt" (in Windows, you may have to turn on the displaying of file extensions to see the suffix). | Physically speaking, they are the .bsl files inside the [[IGMD|Oni/GameDataFolder/IGMD/]] folder. Being in plain-text, scripts can be edited with any word-processing program, such as the built-in Notepad (Windows) or TextEdit (Mac); the only requirement is that you must use the suffix ".bsl" for scripts instead of ".txt" (in Windows, you may have to turn on the displaying of file extensions to see the suffix). | ||
__NOTOC__ | __NOTOC__ | ||
==Getting started== | ==Getting started== | ||
*You may wish to first read either the | *You may wish to first read either the Introduction or the Manual page under "Knowledge database" below. The Manual page contains a broader introduction to programming concepts. It also documents known bugs in BSL and fixes/workarounds when available. | ||
*To learn BSL by example, you can read the .bsl files in | *To learn BSL by example, you can read the .bsl files in the IGMD folder or look at some of the mods linked below and draw connections between the scripting commands and the resulting events in the game. | ||
*For a primer in writing BSL, see the "Tutorials" section below. | *For a primer in writing BSL, see the "Tutorials" section below. | ||
== | ==Script mods== | ||
Script mods are great examples of what can be achieved simply by editing text files. They replace or add to Oni's .bsl files to spice up the gameplay and provide a more exciting experience to those who have finished the game. However, they can only change the way that game data is used; adding new characters or changing the layout of a level, for instance, would require editing the actual [[OBD|game data]]. When new levels are created, these naturally require new scripts to be written from scratch to work with the assets and drive the events in them. | |||
One ambitious example of a | One ambitious example of a script mod is [[AE:OTA|Oni Team Arena]]. Based on the desire for a [[multiplayer]] mode in Oni, and inspired by Unreal Tournament, OTA augments Oni's combat with a scoring system. Other script mods range from free-for-all arenas to objective-based missions and enhancements of the original levels. Older scripts, which need to be placed manually in IGMD, can be found [http://your-mom.oni2.net/Downloads.htm here] and [[User:Script_10k#Incomplete_.2F_ancient_scripts|here]]. Script mods packaged for use with the [[Anniversary Edition]] are [http://mods.oni2.net/mods/Script here], and totally new levels with their own BSL files can be found [http://mods.oni2.net/mods/New%20Level here] (these mods are meant to be installed through the AE Installer). | ||
==Tutorials== | ==Tutorials== | ||
Line 20: | Line 20: | ||
:There are lots of cool things to do by merely looking at the original scripts and changing a few parameters. | :There are lots of cool things to do by merely looking at the original scripts and changing a few parameters. | ||
;[[IGMD/global| | ;[[IGMD/global|Global patching]] | ||
:Want to script a "patch" that's effective in every level? | :Want to script a "patch" that's effective in every level? | ||
Line 29: | Line 29: | ||
*[[BSL:Introduction|Introduction]] (a quick reference, ideal for those with programming experience) | *[[BSL:Introduction|Introduction]] (a quick reference, ideal for those with programming experience) | ||
*[[BSL:Manual|Manual]] (the complete reference on BSL, with more details and explanations for newbies) | *[[BSL:Manual|Manual]] (the complete reference on BSL, with more details and explanations for newbies) | ||
*[[BSL:Functions]] | *[[BSL:Functions]] & [[BSL:Variables]] (all BSL functions and variables) | ||
*[[BSL:Defunct]] (seemingly obsolete BSL commands) | *[[BSL:Defunct]] (seemingly-obsolete BSL commands) | ||
* | *In-game IDs of [http://ssg.oni2.net/subfold/charas/charas.htm characters], [http://ssg.oni2.net/subfold/consoles/consoles.htm consoles] and [http://ssg.oni2.net/subfold/doors/doors.htm doors] (for use in scripts) | ||
*[[IGMD| | *[[IGMD|Directory structure of game scripts]] | ||
*[[BSL:Snippets|Useful snippets of BSL]] | *[[BSL:Snippets|Useful snippets of BSL]] | ||
*[[:Category:Scripting tasks|Scripting commands grouped by subject]] (work in progress) | *[[:Category:Scripting tasks|Scripting commands grouped by subject]] (work in progress) |
Revision as of 21:29, 14 April 2023
BungieFrameWork Scripting Language (simply called BSL) is what Oni's level scripts are written in. Being a game scripting language, it is far more limited in scope and usage than a full programming language, as it was designed only to move events forward in the game, not to build complete programs. Specifically, BSL scripts are responsible for managing the player's objectives, directing AIs, creating environmental effects and choreographing cutscenes.
Physically speaking, they are the .bsl files inside the Oni/GameDataFolder/IGMD/ folder. Being in plain-text, scripts can be edited with any word-processing program, such as the built-in Notepad (Windows) or TextEdit (Mac); the only requirement is that you must use the suffix ".bsl" for scripts instead of ".txt" (in Windows, you may have to turn on the displaying of file extensions to see the suffix).
Getting started
- You may wish to first read either the Introduction or the Manual page under "Knowledge database" below. The Manual page contains a broader introduction to programming concepts. It also documents known bugs in BSL and fixes/workarounds when available.
- To learn BSL by example, you can read the .bsl files in the IGMD folder or look at some of the mods linked below and draw connections between the scripting commands and the resulting events in the game.
- For a primer in writing BSL, see the "Tutorials" section below.
Script mods
Script mods are great examples of what can be achieved simply by editing text files. They replace or add to Oni's .bsl files to spice up the gameplay and provide a more exciting experience to those who have finished the game. However, they can only change the way that game data is used; adding new characters or changing the layout of a level, for instance, would require editing the actual game data. When new levels are created, these naturally require new scripts to be written from scratch to work with the assets and drive the events in them.
One ambitious example of a script mod is Oni Team Arena. Based on the desire for a multiplayer mode in Oni, and inspired by Unreal Tournament, OTA augments Oni's combat with a scoring system. Other script mods range from free-for-all arenas to objective-based missions and enhancements of the original levels. Older scripts, which need to be placed manually in IGMD, can be found here and here. Script mods packaged for use with the Anniversary Edition are here, and totally new levels with their own BSL files can be found here (these mods are meant to be installed through the AE Installer).
Tutorials
- Playing with the developer console
- The fastest way to start learning BSL is to just load the first level and open the dev console.
- Original logic modification
- There are lots of cool things to do by merely looking at the original scripts and changing a few parameters.
- Global patching
- Want to script a "patch" that's effective in every level?
- New logic from scratch
- Create completely new level logic from scratch.
Knowledge database
- Introduction (a quick reference, ideal for those with programming experience)
- Manual (the complete reference on BSL, with more details and explanations for newbies)
- BSL:Functions & BSL:Variables (all BSL functions and variables)
- BSL:Defunct (seemingly-obsolete BSL commands)
- In-game IDs of characters, consoles and doors (for use in scripts)
- Directory structure of game scripts
- Useful snippets of BSL
- Scripting commands grouped by subject (work in progress)
- List of all scripting commands (work in progress)