All Projects → byxor → NeverScript

byxor / NeverScript

Licence: GPL-3.0 License
A scripting language for Neversoft Games (QB)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to NeverScript

natuna-fivem
Typescript/Javascript Bundled FiveM Framework with single module engine that runs on Javascript runtime. Powered with NodeJS.
Stars: ✭ 21 (+50%)
Mutual labels:  qb
cubiql
CubiQL: A GraphQL service for querying multidimensional Linked Data Cubes
Stars: ✭ 40 (+185.71%)
Mutual labels:  qb
     __                    __           _       _   
  /\ \ \_____   _____ _ __/ _\ ___ _ __(_)_ __ | |_ 
 /  \/ / _ \ \ / / _ \ '__\ \ / __| '__| | '_ \| __|
/ /\  /  __/\ V /  __/ |  _\ \ (__| |  | | |_) | |_ 
\_\ \/ \___| \_/ \___|_|  \__/\___|_|  |_| .__/ \__|
                                         |_|        
           The QB programming language.
----------------------------------------------------

Screenshot of the compiler being used

NeverScript is a programming language that targets Neversoft's custom scripting engine (QB).

This project contains:

  • A NeverScript -> QB compiler.
  • A QB -> NeverScript decompiler.
  • A PRE/PRX generator (QB files are usually bundled into PRE/PRX files).

These tools are intended to work with games such as:

  • Tony Hawk's Pro Skater 3 (THPS3)
  • Tony Hawk's Pro Skater 4 (THPS4)
  • Tony Hawk's Underground (THUG1)
  • Tony Hawk's Underground 2 (THUG2)
  • Tony Hawk's Underground Pro (THUG Pro)

All of these games use variations of Neversoft's scripting engine. We're primarily targetting THUG2 here, but I'm sure compatibility with other games can be worked in later based on user needs.

Getting started

Other useful resources:

Usage

Compiling a NeverScript file:

$ ns -c path/to/code.ns

This will create a new QB file: path/to/code.qb

  • Use -o path/to/output_file.qb to change the name of the generated file.
  • Use -showHexDump to see the bytecode generated by the compiler.
  • Use -decompileWithRoq to see output from the roq decompiler (blub syntax).

Decompiling a QB file:

Not implemented yet.

Generating a PRE/PRX file:

You can generate a pre/prx file by providing a pre spec.

$ ns -p myPreSpec.ps -o bundle.pre

This will read the pre spec from myPreSpec.ps and create a new PRE file: bundle.pre

  • Use -showHexDump to see the bytes of the pre file.

What's a pre spec?

This is a text document containing many "items".

Each "item" consists of:

  1. The source path (the file to bundle).
  2. The destination path (inside the pre file).

Here's an example of a pre spec containing 4 items:

C:\mod\build\qb\_mods\byxor_debug.qb
qb\_mods\byxor_debug.qb

C:\mod\build\qb\_mods\byxor_menu.qb
qb\_mods\byxor_menu.qb

C:\mod\build\qb\_mods\byxor_math.qb
qb\_mods\byxor_math.qb

C:\mod\qdir.txt
code\qb\qdir.txt

Note

  • Only pre version 3 is supported at the moment.
  • None of the items inside the pre file will be compressed.
  • You can use relative paths too.

Special Thanks

  • Gone, Morten, Sk8ace - For sharing their comprehensive knowledge of the QB format.
  • Source, Edem - For contributing to NeverScript's development through code and ideas.
  • CHC, Skater1014 - For working on cool things.

If you're on this list, you've been a valuable member in making this project possible. Thank you.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].