From PGE Wiki
Jump to: navigation, search




Sets the memory of all NPCs in the level of the given type. NPC ID is the type of NPC. Check the graphics folder to find the NPC number of the NPC type you want to target. OFFSET is the memory of those NPCs you want to change. Check the reference at the bottom of the document for some known memory offsets. OPERATION is the way you want to manipulate the memory (adding to it, multiplying from it, subtracting from it...) VALUE is what the value that OPERATION will perform on. DATA SIZE is the type of data in the NPC's memory. Check the reference at the bottom of the document to find the data size.


There are 6 types of OPERATION to be performed on VALUE: OPERATION = 0 = Assign. VALUE will be set. OPERATION = 1 = Add. VALUE will be added to the current value. OPERATION = 2 = Subtract. VALUE will be subtracted from the current value. OPERATION = 3 = Multiply. The current value will be multiplied by VALUE. OPERATION = 4 = Divide. The current value will be divided by VALUE. OPERATION = 5 = XOR. The current value will have a bitwise exclusive-or operation performed on it against VALUE.

There are 5 types of DATA SIZE that can be set b = byte (1 byte of memory) w = word (2 bytes of memory) dw = double word (4 bytes of memory) f = float / decimal (4 bytes of memory) df = double float / double precision decimal (8 bytes of memory)


// All enemies think they're underwater (use 0 to set memory for ALL NPCs)