Quest Implementation: Ceremonial Chamber
Original Link (now dead) - http://acdm.turbinegames.com/featuredarticles/?action=view&article_id=140
Quest Implementation: Ceremonial Chamber
By Alicia Brown
It's not rabbits players are hunting here, but if characters in Asheron's Call: Dark Majesty wish to survive this room, they will still need to be vewy, vewy quiet. In our growing series of "implementation" articles, focused on aspects of the Gaerlan quest, we bring you details on the creation of the Ceremonial Chamber, also known by some as the Room of Silence.Orion wanted to impose a certain reverence for this room - it is a Ceremonial Chamber, after all! He wanted a room that a player had to pass through without talking. All was well with you and your party so long as this simple rule was observed. However, if you ever chose to speak out loud (emotes, fellowship chat and private tells didn't count), you'd be punished.
To implement this idea, he created an invisible NPC who stood in the middle of the room and reacted if it heard public chat. The technology to react to public chat had always existed but no one had ever used it before. Orion thought he had the perfect opportunity to implement a new idea utilizing existing technology. Unfortunately, as he discovered late in the development cycle, there was a perfectly good reason why no one had ever used it previously: It didn't actually work!
So it was time to call in the Big Guns - srand to the rescue! She ran through the code and found the problem: Sure, the message was coming in that someone had spoken but it was never hooked up to trigger the combat code.
It wasn't hard to create this relationship, but doing so led to a new problem. The original design required the NPC to react to speech by casting a specific spell. The combat code, however, uses a "general aggression" script, where a creature would start doing his attack - whatever that attack might be. But that attack can't simply be limited to spell-casting. Thus, while the creature could be given spells and the ability to use them, there was no way to guarantee it would actually cast them. Even if all weapons were removed, it could default to attacking players with its fists - and there was no way to stop it! So while they could give this NPC the spells Orion desired and the NPC would be triggered to attack when it heard chat, the NPC might cast the spells or, then again, might just start beating you up! Being beaten up by an invisible untargetable entity was not what Orion had in mind. As he put it, "That's just crazy!"