Pet bonding system
Posted: Fri Mar 04, 2011 6:30 am
OK so I have been playing around with the idea of a pet bonding system on my shard but what I really want to pull off would require a bit of implementation into the POL Core. I've been messing with the source code a bit so I'm beginning to discover what I'm getting into and what can and should be changed. But I want a chance to also give this to the community so you can script your own customized pet bonding systems for your shards. My idea is of course to handle as little as possible by the core and pass this off to scripts and hooks so you can do what you want. So here is what I'm thinking of at this moment:
- Implementing NPC.bonded - Boolean value. (Already implemented this)
- Possibly implement a CanDie hook for NPCs or if NPC.bonded = 1, handle NPC death more like player death where a corpse is created but the actual mobile is not destroyed, just .dead gets set to true and add a call to deathbonded.src instead of death.src. (The first would probably be a harder implementation, the second I've already done in my core but it takes away a small bit of customization)
- A Resurrect function will likely be needed but it shouldn't be too much of a problem.
- Should ghosts of NPCs only be visible by their .masters?
- Everything else should be handled by AI scripts...
Completely open to discussion here but as I said, I'm looking to export things to scripts so you can customize instead of hardcoding it into the core.
- Implementing NPC.bonded - Boolean value. (Already implemented this)
- Possibly implement a CanDie hook for NPCs or if NPC.bonded = 1, handle NPC death more like player death where a corpse is created but the actual mobile is not destroyed, just .dead gets set to true and add a call to deathbonded.src instead of death.src. (The first would probably be a harder implementation, the second I've already done in my core but it takes away a small bit of customization)
- A Resurrect function will likely be needed but it shouldn't be too much of a problem.
- Should ghosts of NPCs only be visible by their .masters?
- Everything else should be handled by AI scripts...
Completely open to discussion here but as I said, I'm looking to export things to scripts so you can customize instead of hardcoding it into the core.