Up to Main Index Up to Journal for December, 2018 JOURNAL FOR SUNDAY 16TH DECEMBER, 2018 ______________________________________________________________________________ SUBJECT: Pesky nil panics during resets finally fixed + maps! DATE: Sun 16 Dec 19:59:43 GMT 2018 While working on improving, and fixing, veto processing I accidentally left the server running for an extended period of time. It threw a nil panic processing a reset event again :( I’d already tried to fix the problem twice, and was sure I’d nailed it. Obviously not. So I laid aside my work on vetoes and started pulling the code apart again. It took over a week pouring over many gigabytes of log files, with additional logging and PrintStack all over the place, until I finally realised what had gone so horribly wrong. More than once I thought it was something really fundamental in the design, accompanied by horrible visions of starting all over again :s Back in September last year I introduced disabled items in inventories to simplify bookkeeping and solve a locking problem. In doing so there was a subtle change in the mechanics of respawning and resetting. Previously the original item was given to the acquiring player and a copy of the original was made and scheduled for a reset. With the changes the copy was given to the acquiring player, and the original reset. As the copy was being reset the origins of the item and any content had to be corrected by calling SetOrigins. With the new mechanics doing so caused some very strange and subtle issues — for example the random nil panics caused when some of the copied inventories no longer existed for the reset. To fix the problem I’ve added a new ClearOrigins which is called on the copied item given to the acquiring player or mobile. Along the way I’ve also fixed a few other minor bugs and nits. A quick list: - attr: Clear, not set, origins on reset (Fixes nil panics) - attr,has: Add ClearOrigins to Thing - cmd: Correct order of imports in $ACTION - attr: Make Origin check in Thing.Collectable more thorough - attr: Drop redundant FindLocate and SetWhere in Disable - cmd: Use Inventory.Everything() in MOVE command - zone: Use Inventory.Everything() in zone loader - attr: Use Inventory.Everything() in Thing - attr,has: Add Everything method to Inventory - cmd: Fix get when actor has no Inventory - docs: Add maps for main, stock zones. - data: Fix pen mouse in alley + stop other creatures entering Worthy of note, a mobile without an inventory no longer panics if they get or take items. The mouse is now really penned into the alley — I missed out an additional barrier. Finally, I’ve added maps! For a while now people have been asking for maps of the three stock zones. I have now had some time to create them. You’ll find them in zone-maps.txt in the docs directory. A preview! CITY OF ZINARA This map is for the city of Zinara as provided in the zinara.wrj zone file. When referenced in zone-links it has the mnemonic Z. L70-L57 MAP KEY | # = door L56 ± = up & down | § = zone link L29 L41-L40 L55 L49 S = starting location | ± | | | L34-L33-L30 L42 L39 L46-L48 | | | | L32-L31 L38 L18 L45 L16 | | | | | | L35 L28-L27-L26-L25-L17-L14-L15-L19-S20 | | | | L36 L66 L58 S01-L03#L05-L06 L43 # | | | X | | | L37 L65 L59 L02-L04 L07-L08 L44 | | | | L64-L63-L62-L61-L60-L24-L10-L09-L12-L21-S22 | | | | | L72 L23 L11 L50 L13 | L51-L67 | L54-L53-L52 | L68 | L69-L71 § SZ:L1 SOUTH OF ZINARA This map is for the zone south of Zinara as provided in the zinara_south.wrj zone file. When referenced in zone-links it has the mnemonic SZ. Z:L69 MAP KEY § ℓ = loop back to self L01 § = zone link | L02 | L03 | L04 | L09-L05-L07 | | | L13-L10-L06-L08 | | | § L11 L12 ZC:L1 ℓ CAVES NEAR ZINARA This map is for the caves near Zinara as provided in the zinara_caves.wrj zone file. When referenced in zone-links it has the mnemonic ZC. SZ:L13 MAP KEY § nsewud = one way exit in L01 direction given | * = location appears L02 multiple times | ± = up & down !26-L05-L03-L06 ℓ = loops to self | ± § = zone link L04 L07 *25 !12 ! = doesn't exist | |d n | | +-wL08-L09-*10-!11 | s± | | *25 | *28 | sℓ n | ℓL24-*27e*24 | s ℓ | *10 | L13-L14 *21 ± n ℓ L15 ℓ*23-*28e*27 ± nℓ ℓ L16-L17-L19-*21 | | | L18-L20-L22 ± L29 I still haven’t finished with the vetoes yet, but should have some time this week. For now all of the above changes, including the maps, are on the public dev branch. -- Diddymus Up to Main Index Up to Journal for December, 2018