Up to Main Index Up to Journal for December, 2018 JOURNAL FOR THURSDAY 6TH DECEMBER, 2018 ______________________________________________________________________________ SUBJECT: Barriers, shopkeepers, wardens and guards DATE: Thu 6 Dec 21:57:32 GMT 2018 After quite a delay, my work on barriers has finally been pushed out to the public dev branch, along with a few other changes. First barriers. A barrier field is defined as: Barrier: EXIT→<direction> DENY→<alias,alias…> ALLOW→<alias,alias…> Where EXIT is the direction being blocked such as North, South, etc. The DENY and ALLOW pairs take a comma separated list of aliases. If one of a mobile’s or player’s aliases match an alias in the DENY list they cannot pass through the barrier. This can be overridden if one of their aliases matches an alias in the ALLOW list. If an alias does not match the DENY list, they can pass through by default. For example: Barrier: EXIT→EAST DENY→NPC ALLOW→GUARD Here we are preventing any player or mobile from going east if they have an alias of NPC. However, as an exception, if they also have an alias of GUARD we let them through. A player can pass through as none of their aliases match the DENY list. The Barrier attribute can be specified directly on a location, in which case there can be only one barrier. However, a Barrier can also be defined on narratives which can then added to a location. In which case you can have as many as you want. You can also add a Barrier to an item, in which case it becomes a portable barrier that only has an effect when not being carried. I’ve included more details and examples in the code comments, and also updated the docs/zone-files.txt for the new functionality. By popular demand, the frequency of the mouse has been slowed down and it now lives in the dark alley near the rouge’s den. The mouse has also been penned in by a barrier. Poor thing :( I’ve added the gate wardens and city guards into the world. They don’t have their equipment yet and the guards are missing their peacekeeper behaviour. The shopkeepers: baker, bladesmith, armourer, old lady and Hewman the trader also make their first appearance. The shops are not quite open for business, you can’t buy and sell stuff yet. The cat, frog, rabbit and spider have had the CREATURE group alias added to them. These are used by some new barriers which have been added to stop them wandering into, or out of, certain areas. The barkeep, vendor and flower girl have had the NPC group alias added. For the MOVE command, veto checks are now more comprehensive. Previously only narratives in a location were checked. Now everything at a location is checked, including the location itself. While working on this I found a glitch in the way vetoes are checked. If you have a Door, which can veto movement when closed, and an actual Veto attribute, then only one veto will be checked. This has been fixed with the addition of FindAllVetoes to replace the older FindVetoes. I still need to check through the code for other places where vetoes are being checked, but for MOVE command it’s fixed. The MOVE command is also a little more performant - I’ve moved the veto checking to after the relocking for the destination location so that the veto checking only happens once instead of twice. Apart from a few typos, that’s everything that’s just hit the public dev branch. -- Diddymus Up to Main Index Up to Journal for December, 2018