View Single Post
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old April 2nd, 2010, 02:26 PM
If you want to replace the behavior of one thing with different behavior, Hero Lab supports that as well. The obvious approach is to preclude the replaced thing based on a source id and add the new thing as dependent on the source id.

This approach works fine in most cases, but not in some. What if the thing you want to replace is bootstrapped by something else? In that case, the old thing will still be bootstrapped. A simple example is weapons in the d20 system. There are lots of magic longswords that all bootstrap the basic behavior for the longsword thing. If you want to change the damage of all longswords in your game, you would have to replace all those magic swords as well.

Fortunately, Hero Lab has this situation covered. If you want to change the behavior of a specific thing, you can use the integrated "replace" mechanism. To use this, create your replacement thing normally - often as a modified copy of the thing being replaced. Then enter the unique id of the thing to be replaced within the "Replaces Thing Id" field in the Editor (or use the "replaces" attribute in the XML).

Once your new thing is in place, every instance where the replaced thing is referenced is automatically updated to refer to your replacement thing. In the example above, creating a new longsword and specifying that it replaces the built-in longsword will cause ALL longswords to use the new thing you added. Hero Lab does all the work for you to hook everything up properly.
rob is offline   #5 Reply With Quote