Lets say I grab an address from an instruction that leads to the exact location of a dynamic inventory storage that I can later null out with DB 00 00 00 00 or add my own sequence of default items in bytes. The address is stored in inventory, but to gain access to the exact address I need to use [inventory]. Using it in the table is fine and dandy, but wasn't there a way to do this in assembler? Why does this not work as simple as:
It's just the way CE works, and it's not ASM. You can use lua to do it, but it needs to be allocated in another script. You could just nest a "reset" script under the main one.
Also if "inventory" is to be an address (which you use it that way) you should make it 64 bits. It would probable work fine but if you only allocate 1 byte, you can run into problems.
{$lua}
[ENABLE]
if syntaxcheck then return end
writeInteger('[inventory]', 0) // this will write a 32 bit integer to the address stored at "inventory".
[DISABLE]
People have this convoluted impression that CE Lua is something scary. All it takes is practice and doing everything you were used to do in ASM.. in Lua. Or even combine the two. Exit your "comfort" zone. See it as learning something new. If you wanna stay at that same boring knowledge level, so be it