BSL:BFW Scripting Language: Difference between revisions

m
removed __NOTOC__ directive
(wording; removed deleted Modification page and moved IGMD/global to knowledge database as it isn't really a useful tutorial, just documentation of a niche feature)
m (removed __NOTOC__ directive)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''BungieFrameWork Scripting Language''' (simply called '''BSL''') is what Oni's level scripts are written in. Being a game scripting language, BSL 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.
'''BungieFrameWork Scripting Language''' (simply called '''BSL''') is what Oni's level scripts are written in. Being a game scripting language, BSL 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 format, 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. Stored in plain-text format, 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__
 
==Getting started==
==Getting started==
*You may wish to first read either the Introduction or the Manual page under "Knowledge database" below. The Introduction is a quick reference, whereas the Manual includes an introductory lesson on programming concepts. It also documents known bugs in BSL and fixes/workarounds when available.
*You may wish to first read either the Introduction or the Manual page under {{SectionLink||Knowledge base}}. The Introduction is a quick reference, whereas the Manual includes an introductory lesson on 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 hands-on tutorials in writing BSL, see {{SectionLink||Tutorials}}.
*For a primer in writing BSL, see the "Tutorials" section below.
*To learn BSL by example, you can read the .bsl files in the IGMD folder or look at some of the mods linked from {{SectionLink||Script mods}} and draw connections between the scripting commands and the resulting events in the game.


==Script mods==
==Script mods==
Line 22: Line 22:
:Create completely new level logic from scratch.
:Create completely new level logic from scratch.


==Knowledge database==
;[[BSL:Tutorial/airport1_level_logic.bsl|Commented level script from Ch. 4 Airport]] (unfinished)
*[[BSL:Introduction|Introduction]]: A quick language reference, ideal for those with programming experience.
:A commentary explaining how an existing level's logic is scripted.
*[[BSL:Manual|Manual]]: The complete language reference on BSL, with more explanations for newbies and details for power users.
 
*[[BSL:Functions]] & [[BSL:Variables]]: All built-in functions and variables.
==Knowledge base==
*[[BSL:Defunct]]: Apparently-obsolete commands.
{| class="wikitable"
*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/]]: The directory structure of the game scripts.
|[[BSL:Introduction|Introduction]]
*[[BSL:Snippets]]: Useful snippets of code.
|A quick language reference, ideal for those with programming experience.
*[[IGMD/global|IGMD/global/]]: A global scripting folder which can be used for patching.
|-
*[[:Category:Scripting tasks]]: Scripting commands grouped by subject (work in progress).
|[[BSL:Manual|Manual]]
*[[BSL:List]]: List of all scripting commands (work in progress).
|The complete language reference on BSL, with more explanations for newbies and details for power users.
|-
|[[BSL:Functions|Functions]] & [[BSL:Variables|Variables]]
|All of the engine's built-in functions and variables.
|-
|[[BSL:Defunct|Defunct commands]]
|Apparently-obsolete commands.
|-
|[http://ssg.oni2.net/subfold/charas/charas.htm Characters], [http://ssg.oni2.net/subfold/consoles/consoles.htm Consoles] & [http://ssg.oni2.net/subfold/doors/doors.htm Doors]
|In-game IDs for each level of the game, useful when writing new scripts for those levels.
|-
|[[IGMD|IGMD/]]
|The directory structure of the game scripts.
|-
|[[IGMD/global|IGMD/global/]]
|A global scripting folder which can be used for patching.
|-
|[[BSL:Snippets|Snippets]]
|Useful snippets of code.
<!--|-
|[[:Category:Scripting tasks|Scripting tasks]]
|Scripting commands grouped by subject (unfinished).
|-
|[[BSL:List|List of built-in commands]]
|List of all scripting commands (unfinished).-->
|}


[[Category:BSL docs]]
[[Category:BSL docs]]