Difference between revisions of "NPL file"

From RRU Knowledge Base
(compiled not encrypted)
(redirect to main NERPs page (information moved))
Tag: New redirect
Line 1: Line 1:
{{WIP}}
#REDIRECT [[NERPs#NPL files]]
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 [[Programming Mission Objectives|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 <code>00 00</code>, [[Symbols]] end in <code>01 00</code>, and [[Parameters]] end in <code>02 00</code>.  Certain [[Special Parameters]] also end in <code>04 00</code> and <code>08 00</code>.  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 <code>04 00 00 00</code>.  Parameter #13, which is <code>GetCrystalsCurrentlyStored</code>, is <code>0D 00 02 00</code>.  Symbol #5, which is the ">" symbol, is <code>05 00 01 00</code>. 
 
Putting them altogether <code>GetCrystalsCurrentlyStored > 4</code> becomes <code>0D 00 02 00 05 00 01 00 04 00 00 00</code>.
 
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==
 
*[[Programming Mission Objectives]]
*[[Scripting Tutorials]]
*[https://github.com/jgrip/legorr Ogun's NPL compiler/decompiler]


[[Category:File formats in LEGO Rock Raiders]]
[[Category:File formats in LEGO Rock Raiders]]
[[Category:NERPs]]
[[Category:NERPs]]

Revision as of 09:58, 9 December 2018

Redirect to: