Lua obj manipulation for hardco(re)der
Posted: Thu Feb 18, 2010 6:57 pm
Ok, it must be something a bit backward-awkward-compatible, but here is something I just thought of:
Using the obj.archetype table as a metatable for the instance exvar[id] table:
For each base dsb function that looks for info into an instance's archetype, INSTEAD look for the same info in the exvar[id] table.
So that the info is not lost or copied every time, for each instance that is spawned or qswapped, do: set metatable of "exvar[id]" to be "obj.arch"
I hope I make sense. That would allow some very interesting stuff to be done quite easily.
Using the obj.archetype table as a metatable for the instance exvar[id] table:
For each base dsb function that looks for info into an instance's archetype, INSTEAD look for the same info in the exvar[id] table.
So that the info is not lost or copied every time, for each instance that is spawned or qswapped, do: set metatable of "exvar[id]" to be "obj.arch"
I hope I make sense. That would allow some very interesting stuff to be done quite easily.