Giter VIP home page Giter VIP logo

atlas's Introduction

HaloScript is a comprehensive language support extension for all iterations of the Halo Script language used in the Halo: The Masterchief Collection Mod Tools. HaloScript provides:

  • Autocompletion
  • Documentation on all HaloScript functions
  • Hover descriptions for HaloScript elements
  • Function argument hints
  • Syntax highlighting
  • Snippets
  • Error Checking

Supported Games

Game Language
Halo 1 MCC hsc1
Halo 2 MCC hsc2
Halo 3 MCC hsc3
Halo ODST MCC hsco
Halo Reach MCC hscr
Halo 4 MCC hsc4

Getting Started

Setting the language

This extension contributes each game's Halo Script iteration as a separate language. Once you've opened a hsc file, you can select the correct HaloScript language for your current file from the Status Bar.

Status Bar

HaloScript Languages

The HaloScript syntax comes in two flavours, the classic lisp styled syntax used in Halo 1 - Halo Reach, and the newer C-like syntax featured in Halo 4.

You can set the default .hsc file language by editing your user settings.json file. For example to set Halo 4 Script as the default you would add:

    "files.associations": {
        "*.hsc": "hsc4"
    },

HaloScript is compatiable with any VSCode theme. Dark (Visual Studio - C/C++) is the theme used in the examples below.

Using Snippets

Snippets are templates you can add to help you quickly add code to your scripts. HaloScript includes a large number of snippets for quickly creating template scripts, variables and loops. Snippets are also the method for quickly accessing the various enum values present in HaloScript.

If snippets are not showing when you start typing, you can press CTRL+SPACE to trigger Intellisense. Snippets can be distinguished from other autocomplete suggestions by the square icon. Once the snippet is highlighted, you can press TAB to insert it. Certain snippets included multiple parts, you can use TAB to jump between these.

The full snippets list can be accessed through the Command Palette (shortcut CTRL+SHIFT+P), and selecting Insert Snippet.

Snippets in Halo Reach Script

Autocompletion

HaloScript offers automcompletion for functions, built-in globals, value types, script types, and keywords. Autocomplete suggestions will show as you type. Use TAB to accept the autocomplete suggestion.

Autocomplete suggestions will also display relevant information, such as descriptions and accepted arguments for a function. When accepting an autocomplete suggestion for a function, parentheses will be automatically inserted if they are not already present.

Autocompletion in Halo 4 Script

Argument Hints

Argument hints are displayed when writing out a HaloScript function. These hints will highlight the structure of the arguments required for a function, the function description, the current argument to input, and a description of the type of argument to supply.

Arguments that end with ? are optional.

Argument Hints in Halo 2 Script

Hover Descriptions

Simply hover over any HaloScript function, built-in global, value type, or keyword to prompt a description of that item.

Hover Descriptions in Halo ODST Script

Extension Recommendations

TabOut lets you use the tab key to jump out parentheses using TAB. This will make it a much smoother experience to work with HaloScript given its heavy use of parentheses.

Script Compilation

Script compilation directly from VSCode is supported for Halo 4 only. While editing a Halo 4 Script file you can use the Command Palette (shortcut CTRL+SHIFT+P) to access the command Compile Scenario Scripts or simply right-click in the editor and select the command from the context menu.

Note that script compilation will only work correctly while editing a scenario script file. Compilation directly from a global or object script file is not supported.

Hover Descriptions in Halo ODST Script

Error Checking

HaloScript includes a basic level of debugging. The extension will report unmatched opening and closing parentheses, with plans to expand error checking further in the future.

Credits

Alexis Jonsson - Icon design

Crisp - Extension Developer

2.2.1

atlas's People

Contributors

alexisjonsson avatar iloveagoodcrisp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.