S. P. Gardebiter said:
I have no idea for the secound one though
You just could specify a adress range for the npc's, weapons and so on.
If someone changes the offsets, his/her own bad luck, I guess.
The offsets are no problem. You can just look them up in the pointer table - in fact, any editor worth its salt should do that. Of course if you relocate the pointer table, well there's only so much code can do...
And wherever you're looking in the code, it's always the same set of instructions: 80x86 assembly. There's no reason, for instance, a weapon can't mess around with a specific NPC's data (for instance, a shrink ray could set a "shrink" flag on its target) so restricting the code to one specific subset of functions (ex, the weapon update routines) won't change much. It's really a problem of code content: if it were as simple as just translating stuff into instructions, as I've said, we'd have all downloaded a decompiler and figured out everything there is to know about CS by now.
To be perfectly honest, I've started writing a decompiler just for the fun of it (in ACE, a scripting language we use at work that's probably also used by a group of middle-eastern engineers living in a cave somewhere) to see what I can work out. What's doable is isolating functions by dynamically creating a parse tree by following jumps and calls. But if you already know where the functions are located (as would be the case with an editor) that doesn't help much.
Still, I'm going to Germany late this september. Little vacation - I've always liked the german language and Germany sounds like a hell of a nice place. When I go there, I will treck all the way over to your house and beat you with a giant papier-maché trout for making me take on yet another project. ;D