Monday, July 4, 2011

Hacking trap code

I've located the default code that handles traps (in go figure...). Now that I can access the trap code I can inject my own code into the trap process and package that up into the campaign. This allows me to do all kinds of fun things, like make non-conductive thieves tools to avoid electric damage and extra long tools so the rogue can work at a distance and avoid spike traps. This allows me to create a new category of item, thieves tools specialized for handling specific trap types. Since the tools still get used up it allows a one time "bypass" if the rogue has a set that matches the trap type. Tools that do not get used up versus traps are also now doable, so our rogues can now have a favorite set of tools instead of the disposables. This makes the thieves tool a much more significant item, both from a gameplay standpoint and from a role playing standpoint since you can now invest time in giving a set a story. ("You found the personal tool set of the Guildmaster!") Purposed tool sets are now also possible, such as a set that is +5, but only versus fire traps.

The other good thing about finding the trap code is that I can now use it in conjunction with the pickpocket system I have, so npcs will be able to trap their pockets to guard against thieves. Theoretically, the system could also be used to allow a pc to trap their own pockets for multiplayer or a PW, but I don't need that functionality for Crimmor.

I can't say I've done anything with the trap code yet. I've been working on another unrelated scripting project for Crimmor that's much more complicated but promises far greater results.

1 comment: