Formats:Script

From PBnWModdingWIKI

Contents

Location

\data\Scripts\BW2

Description

These are the Black & White 2 Virtual Machine 'scripts'. The specific script loaded depends on the SET_LAND_NUMBER directive used in a BWE file. If SET_LAND_NUMBER(0) was called, the game will attempt to load \data\Scripts\BW2\land0.chl. If this fails, the loading process will not be finished, nor aborted.

Format

The scripts always seem to start with the following:

 4C 48 56 4D 0C 00 00 00 28 01 00 00   -   L H V M 0x0C 0x00 0x00 0x00 ?? 0x01 0x00 0x00
 |__________|__|________|__|________|
   LHVM      |        |   |   |
(Lionhead   Always    |    \   -- Always 01 00 00?
  Virtual     0C   Always    ---- This seems random
 Machine?)    ?    00 00 00?

Notes

  • There seems to be a compiler/interpreter in \PlugIns\ScriptLibraryR.dll
  • Please use the discussion page to help if you have anything to share regarding the binary format.