NPL file

From RRU Knowledge Base
Revision as of 12:07, 8 December 2018 by An Owl Called Josh (talk | contribs) (compiled not encrypted)

This article is an unfinished work in progress or contains transferred information that needs to be rewritten or reformatted to fit our standards. Please excuse the mess and do not mark for deletion.

One of several Level Files located in a Mission's level folder, the NPL file is the compiled version of the NRN file (more specifically the NRM file), which controls all the mission objectives for a level. The NPL file is not easily human-readable, and can only be read using a Hex-Editing Program. The game processes a level's mission objectives from this file, rather than the NRN file, and must be edited in order to make changes to the level.

Description of Script Format

All script from the NRN file is compiled into four bytes (two little-endian 16-bit words) for each scripted number, parameter/function, and symbol.

Numbers end in 00 00, Symbols end in 01 00, and Parameters end in 02 00. Certain Special Parameters also end in 04 00 and 08 00. The first 16-bit word in each pair indicates the number, or the number that a symbol or parameter has been given. For example, the number 4 is 04 00 00 00. Parameter #13, which is GetCrystalsCurrentlyStored, is 0D 00 02 00. Symbol #5, which is the ">" symbol, is 05 00 01 00.

Putting them altogether GetCrystalsCurrentlyStored > 4 becomes 0D 00 02 00 05 00 01 00 04 00 00 00.

This compiled code can be rather confusing at first, but once you figure out the patterns, it's as easy as searching for a string and changing it.

Also See