-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRELEASE-NOTES
1620 lines (1376 loc) · 79.3 KB
/
RELEASE-NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Change Log for WolfMUD
This document details the main highlights for each release of WolfMUD. For
detailed information on changes please see the WolfMUD git repository:
git clone https://code.wolfmud.org/WolfMUD
v0.0.21 Released Sunday 14th August, 2022
==============================================================================
Added
- RecordJar has a new double integer type, e.g. "+1+2".
- New ARMOUR (integer) and DAMAGE (double integer) attributes.
- Players and Mobiles/NPCs can have natural damage and armour.
- Items can have damage and armour specified.
- New #EVAL (evaluate) admin command to help with debugging combat. Compares
attacker's combat score with defender's combat score.
- Who starts and ends a fight is now logged by the server to help settle any
disputes.
- Players can now have a gender of male, female or neutral.
- New OnCombat attribute for specifying player, mobile/NPC and weapon combat
messages.
- New msgfmt utility to help validate combat message formatting and output.
Changed
- Combat is now based on current health, the natural armour + armour of worn
items and natural damage + damge of worn or wielded items. Fighting action
is described using OnCombat messages.
- Mobiles/NPCs can now veto combat so they cannot be attacked. This is useful
for vendors and other 'important' mobiles/NPCs.
- Health and health regeneration has been rebalanced.
- Spider in the shed will now attack players.
- Zone files updated:
- tweaked mobile/NPC health
- vendors veto combat
- add armour and damage attributes to mobiles/NPCs, armour and weapons
- add genders to mobiles/NPCs
- add Oncombat messages to mobiles/NPCs and weapons
- minor clean-ups, fixes and improvements.
- Documentation in docs/zone-files.txt updated for INTEGER and DOUBLE INTEGER
types. Added new sections for ARMOUR, DAMAGE and ONCOMBAT attributes.
- Existing players are upgraded to have a natural ARMOUR of 10, natural
damage of 2+2 and a set of default unarmed combat actions.
- code comments reformatted using Go 1.19 'go fmt'.
Fixed
- Status update message no longer disrupt message de-spamming.
- In data/zinara.wrj the bladesmith had alias BAKER instead of BLADESMITH.
- In data/zinara.wrj fixed aliases and wearable attributes for lucky charm.
- In docs/zone-files.txt the GENDER attribute is now documented.
v0.0.20 Released Thursday 30th June, 2022
==============================================================================
Added
- New state.Log method added for commands to log with actor's UID prefix.
- New Opponents anyKey+anyName and Opponent refKey+refName in core/types.go
- New Combat events with basic combat event handler.
- New ATTACK command added to initiate combat. KILL is an alias for ATTACK.
- New term package for controlling the client terminal.
- New client.eat method to consume pending incoming data.
- Added StatusSeq asKey and asName to core/types.go for storing the ANSI
escape sequence to update the terminal status line.
- New state.StatusUpdate method to update terminal status line via mailbox.
Changed
- Source code for HIT command moved to core/combat.go
- Improved corpse descriptions.
- QUIT command updated to terminate combat.
- MOVE command updated to prevent combatants walking off when fighting.
- LOOK command now indicates combat at a location.
- Previous HIT command code removed and HIT aliased to ATTACK.
- Action events are not rescheduled if an action initiates combat.
- Updated core.client type to hold terminal width, height and ANSI escape
sequences.
- Text sent to the client is now folded using the terminal width minus 2
characters - Windows TELNET draws a scroll bar over the last two characters
on a line :(
- Prompt handling code has been removed, replaced by a status line.
- The mailbox suffix handling is no longer required and has been removed.
- There is no longer a need to nudge the actor off the prompt line in the
QUIT and $HEALTH commands.
- BotRunner updated to work with new terminal handling.
Fixed
- Thing.suspend returns false on failure to suspend due to stale event.
- When an event firesThing.schedule checks if the event was cancelled while
waiting to acquire BRL.
- Thing.schedule should only schedule future events when using dueIn.
- Mobiles/NPC now reset will full health.
- TELL/TALK and WHISPER commands improved when actor targets themself.
- Added crowd control to health event messages.
- Resetting of item usage moved from state.Quit and state.quitUniqueCheck to
Thing.Junk where it makes more sense.
- Body parts are no longer lost when quitting while using a unique item.
v0.0.19 Released Sunday 24th April, 2022
==============================================================================
WolfMUD v0.0.19 is a 90%+ rewrite of WolfMUD v0.0.18. Compatibility with
existing zone files and player files has been maintained. While these
release notes try to highlight differences between the two versions, see
the release notes for the v0.0.19 betas below for more details.
Every effort has been made to implement the features and functionality that
was previously available in v0.0.18. These release notes serve to document
any differences and additions in the v0.0.19 release.
The only change between v0.0.19 and v0.0.19-beta.6 are the release notes
and a tidy-up/clarafication of the build descriptions.
Upgrading Notes
- In data/config.wrj, Inventory.CrowdSize is now the minimum number of
players to be considered a crowd. Before it was the number of players
before they where considered a crowd. The default value has changed from 10
to 11 - 11 or more players is a crowd. See docs/configuration-file.txt for
more details.
- In data/config.wrj, a separate login timeout has been added: Login.Timeout
with a default value of 1m - 1 minute. See docs/configuration-file.txt for
more details.
- Per IP address connection quotas have been simplified. In data/config.wrj
Quota.Timeout and Quota.Stats are no longer used. A new Quota.Slots
configuration value has been added, which defaults to 0. Quotas now allow
up to Quota.Slots connections per Quota.Window per IP address. There are no
quote statistics, however there is a new Debug.Quota flag which provides
some additional information. See docs/configuration-file.txt for more
details.
- In zone and player files the Health field attributes have changed from:
[Old format] Health: FREQUENCY→ CURRENT→ MAXIMUM→ REGENERATES→
[New format] Health: AFTER→ JITTER→ CURRENT→ MAXIMUM→ RESTORE→
FREQUENCY has been replaced with AFTER+JITTER to bring Health in line with
other events. REGENERATES has been replaced with RESTORE as it is more
generic and can be reused on other similar fields. Existing player files
will be upgraded. See docs/zone-files.txt for more details. Zone files
should be reviewed and mobiles/NPCs updated as necessary.
- Players now have a new Permissions field. This can contain the value
'ADMIN' which grants access to all admin commands. Alternatively, access
can be granted to specific admin commands only by listing the specific
commands. For example:
Permissions: ADMIN
Permissions: #DUMP #GOTO
Per player permissions replace the Debug.AllowDump and Debug.AllowDebug
settings in data/config.wrj, which are removed. See the ADMINISTRATORS
section in docs/running-the-server.txt for more details.
Added
- Linux ARM64 is now officially supported with pre-built downloads available.
- The matcher now understands 'SELF'. For example: EXAMINE SELF, HIT SELF.
- The matcher now understands 'MY' to refer to items in your own inventory.
For example: EXAMINE MY SWORD, PUT APPLE MY BAG.
- The matcher now understands 'ANY' to refer to a random item when there are
multiple matches. For example: GET ANY APPLE, WIELD ANY SWORD.
- Duplicate messages sent to players are de-spammed so that fewer duplicates
will be seen.
- Imps and fungus slugs have been added to zinara_caves.wrj, the "Caves near
Zinara" zone.
- There are now corpses when the HIT command is used to kill something.
- A new /WHOAMI command has been added in case you forget which character is
logged in on which terminal.
- Zone and player files are now more Unicode friendly, including REF/@refs.
- Players now have a command history for up to thee previous three commands.
The history can be shown using /HISTORY or the abbreviation '/!'. Commands
can be replayed from the history using '!', '!!' and '!!!' respectively.
Changed
- The output for the #DUMP/#LDUMP commands have been updated to reflect how
items are stored internally. There is no Unicode #UDUMP variant yet.
- The #DUMP/#LDUMP commands can accept '@' to dump everything in the current
location - mnemonic is where you are 'at'. For example: #DUMP @
- New server statistics: A[n] O[n ±n] T[n ±n] E[n ±n] P[n max]
A[ n] - runtime allocations since last collection
O[n ±n] - runtime objects / change since last collection
T[n ±n] - Thing in the world / change since last collection
E[n ±n] - in-flight active events / change since last collection
P[n max] - current number of players / maximum number of players
- In zone and player files the leading '+' for bound qualifiers only may be
omitted. For example, SHORT:SWORD and +SHORT:SWORD are equivalent - but the
latter is preferred for consistency with non-bound qualifiers.
- Player names are now restricted to 15 characters during account creation.
- A mobile/NPC is now defined as anything that can self heal. Existing zone
files should be checked to make sure mobiles/NPCs, that are intended to be
mobiles/NPCs, have a Health record with at least MAXIMUM, RESTORE and
AFTER/JITTER attributes set.
- The /PROMPT command now has five styles:
NONE
CURSOR >
BRIEF H:30>
SHORT H:25/30>
LONG Health: 25/30>
The prompt does not currently colour current health based on percentage of
maximum health yet.
- The server no longer logs client connections and disconnections, unless
client IP addresses are being logged - Server.LogClient is set true. The
server will log player logins and players quitting:
[#UID-F] Login by: 16809599915800bb7a67d231daef3b9f
[#UID-F] Quitting: 16809599915800bb7a67d231daef3b9f
- The stock zones in data/zones have had many improvements and bug fixes.
v0.0.19-beta.6 Released Sunday 17th April, 2022
==============================================================================
Security
- Limit input data from client (potential DOS attack mitigation).
Currently no limits are put on the length of a command a player can send to
the server. As the input is stored in a []byte buffer, a malicious client
could cause the buffer to consume a lot of the memory. This could be used
as a DOS attack - this has not been seen in the wild and has not actually
been exploitable during testing.
The server now limits the size of the input accepted by the server. If a
client sends a command longer than the limit to the server then all of the
input is discarded and the message "You type too much!" is sent to the
client. The current input limit is 80 bytes.
Added
- New /PROMPT player command to check, list and change prompts.
- New core/state.Script method for executing scripting commands outside of
the core package.
- Per-player permissions can be set via a new Permissions field in the player
header record. Currently permissions can be 'ADMIN' or a specific admin
command. Admin commands are those prefixed with a hash '#'. Details for
setting up administrators added to docs/running-the-server.txt
- Player command history and recall for up to three commands added. The last
three commands can be listed using '/HISTORY' or the abbreviation '/!'. The
last three commands can be repeated using '!', '!!' and '!!!' respectively.
- ARM64 built target added to makefiles and release builds.
- New data/zones/quiet.wrj zone for testing in isolation, defaults disabled.
Changed
- The player's prompt is now selectable and perists in the player file. The
available prompts are: NONE, CURSOR, BRIEF, SHORT, LONG.
- The Debug.AllowDump and Debug.AllowDebug options have been dropped from the
server configuration and have been replaced by per-player permissions.
- The #DUMP/#LDUMP commands now show Int values as data/time or durations
where appropriate.
- In data/zones/zinara.wrj make curious brass lattice a little more curious.
Fixed
- Health events are now registered for mobiles / NPCs when they are loaded,
if they need healing.
- Health events are now registered for mobiles / NPCs when they are junked,
if they need healing.
- Events for anything junked are now suspended and resumed if a reset occurs,
as opposed to the thing being disposed of.
- The "... kills you ..." message from the HIT command correctly upper-cases
then name of what kills you.
- Players can no longer directly execute scripting commands with a dollar '$'
prefix.
- OnAction fixed for ugly imp in data/zones/zinara_caves.wrj
- Store player created date in Thing.Int[CREATED] as nanoseconds.
- Event dueAt timestamp now shown in UTC to match server logging.
- Don't log player connects and disconnects if not logging client IP address.
- Log when a player quits - either willingly or unwillingly (due to errors).
- In data/zones/reset.wrj drop invalid O9 reference and add item clean-up.
v0.0.19-beta.5 Released Sunday 27th March, 2022
==============================================================================
Added
- The matcher package has a new trimMatch function to remove leading
stopwords, modifiers, qualifiers and alias from an original input that
would have been used in a match.
- New TELL/TALK player command.
- New WHISPER player command.
- New map of in-game players added to core.state, players added by $POOF and
removed by QUIT command.
- New /WHO command to list other players currently in-game.
- New /WHOAMI command to remind yourself who you are.
- New Thing.selfHeals helper method.
- Mobiles/NPCs that are holdable can no longer be PUT into containers.
Changed
- The bots from the botrunner now TELL/TALK and WHISPER again.
- The data/zones/zinara.wrj zone file has been updated so that some NPCs will
directly address the player.
- Clean-up initial section, example zone file, field data types and @refs
section in docs/zone-files.txt
- Clean-up EXIT/EXITS entry in docs/zone-files.txt
- When unmarshaling a Thing current health is only set to maximum health if
current health is zero and Thing can self heal.
- An NPC is now anything that can self heal.
- Updated docs/zone-files.txt for self healing and mobiles/NPC.
- Updated data/zones/zinara.wrj to make sure all NPCs have Health so that
they behave properly.
- Documentation for KEYWORD and REF sections in docs/zone-files.txt has been
updated and improved. REF section now has examples of naming schemes.
- Documentation for NAME section in docs/zone-files.txt expanded and contains
details of 'a/as/some' to 'the' and upper/lower case conversions.
- Corrected who can see messages in CLEANUP section of docs/zone-files.txt
Fixed
- Delete Thing.Event map entries for suspended events.
- Suspend events scheduled by InitOnce/Init if Thing loaded disabled with a
suspended reset event.
- The maximum length of player names is now 15 letters. Previously no limit.
- Initialise World in core.state where it is defined, not world.Load.
- The SOME qualifier usage has been dropped from data/zones/zinara.wrj as it
will never match due to being dropped as a stop word.
- Improve some alias qualifiers in data/zones/zinara.wrj
- Fix nil panic when DOOR attribute used in a location's definition. The
DOOR attribute is now ignored.
- Fix body checks failing when all body slots a used for held, worn or
wielded items.
- Fix nil panic in REMOVE command when item to remove not found.
- Drop redundant check for "where.Is&(NPC|Player) != 0" in state.Take method.
- Added health to the core.preferredOrdering list in core/types.go
- Implement the minimum one second event period when ACTION, CLEANUP or RESET
are specified but AFTER, JITTER and DUE_IN are not defined as documented in
docs/zone-files.txt
- The world loader now correctly uppercases REFs in zone files. Previously a
lowercased REF would fail to match when used in, for example INVENTORY or
LOCATION fields.
- The pre-processor now identifies @refs with with Unicode letters correctly.
- Fixed sentance not ending with a period for DROP command.
- Fixed sentance not ending with a period for GET command.
- Don't register redundant event when unmarshaling a DOOR field.
- Type fixed in message for MOVE command.
Known Bugs / Issues
- If a mobile is loaded with current health < maximum health a health event
is not registered to regenerate health.
- If a mobile is holdable and junked when current health < maximum health a
health event is not registered to regenerate health when mobile resets.
- If a door is saved and reloaded its reset event is not suspended and
restored.
v0.0.19-beta.4 Released Sunday 27th February, 2022
==============================================================================
IMPORTANT FILE CHANGES
Configuration file changes:
- The Quota section has dropped Quota.Timeout and now uses Quota.Slots
- The Debug section has a new Debug.Quota
Server owners should check their data/config.wrj configuration files, details
of the new fields can be found in docs/configuration-file.txt
Zone and player file changes:
- The Health record now uses AFTER/JITTER instead of FREQUENCY to bring it
in line with other events.
- The Health record now uses RESTORE instead of REGENERATES.
Player files will be automatically upgraded. Details on the Health field can
be found in docs/zone-files.txt
Added
- New Thing.logEvent helper added. Updated documented Debug.Events flag in
docs/configuration-file.txt as the events logged have changed from queued,
cancelled or delivered to scheduled, suspended, cancelled or delivered.
- Event logging added for Thing Schedule/Suspend/Cancel events.
- Per IP address quotas are now implemented. These are configured via the
Quota.Slots and Quota.Window configuration settings in the data/config.wrj
file. The Quota.Timeout setting is no longer used. The documentation in
docs/configuration-file.txt has been updated.
- A new Debug.Quota setting has been added to data/config.wrj to write quota
debugging information to the server log. For details see Debug.Quota in the
data/config.wrj documentation.
- The #DEBUG command with MEMPROF, CPUPROF and PANIC sub-commands is now
implemented. The configuration Debug.AllowDebug needs to be set to true in
data/config.wrj to enable the #DEBUG command.
- New state.subparseFor method to allow commands to perform sub-commands for
an alternative actor.
- New Health attribute added for players and NPCs. Existing player files will
be upgraded when the player next logs in. Updated docs/zone-files.txt to
document new Health field.
- Health events, via a new $HEALTH command, have been added for players and
NPCs to regenerate Health.
- The build/newAcct script now creates accounts with HEALTH defined.
- New state.build method to construct dynamic prompts.
- New core.createCorpse function to create corpses of killed players/NPCs.
- New HIT command for testing Health, Health regeneration and a bit of fun.
- The matcher now has an ANY modifier to pick a random match for commands.
- Added #LDUMP command to write the dump output of a Thing to the server log.
- Imps and fungus slug mobiles added to the caves zone zones/zinara_caves.wrj
Changed
- The Thing Schedule, Cancel and Suspend methods are now wrappers to new
schedule, cancel and suspend methods to enable event logging.
- The state.Prompt method now takes fmt.Printf like parameters.
- All messages sent to a specific player are now flagged priority.
- In data/zones/zinara.wrj the frog, rabbit, mouse and cat have been updated
with a Health field. A 'HIT ANY PLAYER' action has been added to the frog
and rabbit.
- In data/zones/zinara.wrj 'the barkeep' is now 'a barkeep'.
- The bots now have "HIT ANY CREATURE" and "HIT ANY PLAYER" actions.
- The mailbox now stores the maphash of the last message seen instead of the
whole string of the message.
- Improved messages for TAKE/GET responses when used on players and NPCs.
- Allow leading '+' to be omitted from bound qualifiers in zone files.
- Updated actions in data/zones/zinara.wrj that target players to use ANY
modifier to target a random player.
- White-space clean-up in data/zones/zinara_caves.wrj
- Tidy up Debug flag section in docs/configuration-file.txt
Fixed
- The Thing.Event entry for an event is cleaned up if the event is cancelled.
- Server now enforces the Server.MaxPlayers configuration setting and will
turn away players if the server is full.
- The server now honours the Server.LogClient setting. If set to false, the
default, the client's IP address will not be logged. Instead the client IP
address will be replaced with '???'. For example:
[#UID-6] connection from: ???:35848
[#UID-6] client error: read tcp 127.0.0.1:4001->???:35848: i/o timeout
[#UID-6] disconnect from: ???:35848
- In docs/configuration-file.txt note that Server.Host may be left blank to
cause the server to listen on all available interfaces.
- The #GOTO/#TELEPORT command has been fixed.
- The mailbox.Suffix method no longer panics if the mailbox is invalid.
- A data race has been fixed when a player quits and is disposed of.
- The COMBAT veto is now handled by the Thing.Unmarshal and Thing.Marshal
methods.
- The Thing.Schedule method now handles stale events when they fire.
- The build/newAcct script now creates accounts with a BODY defined.
- The Thing.Junk and Thing.Free methods now cancel in-flight events.
- Minor grammar fix in zone-files.txt documentation.
- Fixed confusion of players and NPC/Player flags not working properly.
- Fixed TAKE/PUT command messages when used on a player.
v0.0.19-beta.3 Released Friday 24th December, 2021
==============================================================================
Added
- New config package to load the server configuration. Configuration is
coordinated by the main method, which also configures the packages. The
package configuration, while not idea does allow packages to be configured
differently for the testing framework.
- New stats package for runtime statistics logging. Statistics are
coordinated from the server main package
- core.Thing now records Thing and Event counts for statistics reporting.
- Added a panic handler to the client.receive method. Panic handler is
configured via the Debug.Panic setting in the server configuration.
Changed
- All setup locking is now coordinated through the server main method instead
of separately in world.Load and core.RegisterCommandHandlers functions.
- Client creation has been split into client.New to create the client and
client.Play to run the client.
- The core, world, client and stats packages now have package configuration.
- The #DUMP command availability is now configured via Debug.AllowDump in the
server configuration.
- Enable Thing debug logging showing when Thing created, freed and finalised.
Configured via Debug.Things in the server configuration.
Fixed
- The client.assemblePlayer method now frees temporary Thing via Thing.Free.
v0.0.19-beta.2 Released Wednesday 17th November, 2021
==============================================================================
Added
- Barriers are now implemented to restrict mobiles to a certain area or to
prevent mobiles going into a certain area. This implementation accepts only
setting ALLOW or DENY aliases.
- A suffix, that is appended to sent messages, can now be set for mailboxes.
- Stop word removal has been implemented. The current sto words are: A, AN,
FROM, IN, INTO, OF, OUT, SOME, THE, TO and WITH.
Changed
- Updated docs/zone-files.txt documentation for barriers with clarifications.
- The #DUMP command now looks for items at a location, then items carried by
the actor. To specifically look at items carried by the actor the 'MY'
qualifier can be used.
- The internal implementation of mailboxes has been cleaned up with a new
mailbox type.
- The player's prompt is now implemented using the new mailbox suffix. This
sets the groundwork for dynamic prompts that can display player statistics.
- The player's display for the front-end and entering/exiting the game has
been cleaned up.
Fixed
- An issue where failed lookups returned a zero value that also mapped to a
valid key has been fixed. For example if NameToDir[item.As[Blocker]] failed
it would return the zero value, which is mapped to the constant for North.
Failed lookups will now result in a "bad key" where appropriate: BadAsKey,
BadAnyKey, BadIntKey or BadRefKey.
- Notifications for the OPEN and CLOSE commands have been fixed.
- Corrected typo in function name, core.conatins -> core.contains
Known Bugs / Issues
- Network quotas are not implemented yet.
- IP addresses of players appear in the server log.
- Configuration settings are hard-coded and not via a configuration file.
- The commands #DUMP, #TELEPORT and #GOTO can be used by anyone.
- The #DUMP command output can be messy if there are long "words" that cannot
be broken on white-space.
- Statistics are not periodically logged by the server yet.
v0.0.19-beta.1 Released Sunday 31st October, 2021
==============================================================================
Added
- Player commands can now refer to SELF and MY. For example "examine self",
"drop my sword", "drop all my weapon". The MY reference currently only
works on items in a player's inventory. If a player drops an item it is no
longer considered theirs until they pick it up again.
Changed
- Nearly everything... the experiment branch has moved to the dev branch.
Version v0.0.19 will be a complete rewrite of WolfMUD v0.0.18 from the
ground up. The only code kept from v0.0.18 is the recordjar package. The
text package is mostly intact with some clean-up, Fold has been rewritten.
- The zone files are the same as v0.0.18 apart from a few fixed typos.
- The Makefile and build files are the same as v0.0.18, apart from a minor
tweak for retrieving versions from Git.
- The docs directory is from v0.0.18 and may be a little inaccurate.
- Existing player files should continue working 'as is'.
- Barriers to limit mobiles to an area are not implemented yet.
- Player health is not implemented yet.
- The player commands HIT, TALK, TELL, WHICH, WHISPER, WHO and /PROMPT are
not implemented yet.
- The behaviour of some player commands may differ to v0.0.18 and all player
commands need to be reviewed.
Known Bugs / Issues
- The player display when quitting needs cleaning up.
- Network quotas are not implemented yet.
- IP addresses of players appear in the server log.
- Configuration settings are hard-coded and not via a configuration file.
- The commands #DUMP, #TELEPORT and #GOTO can be used by anyone.
- The #DUMP command output can be messy if there are long "words" that cannot
be broken on white-space.
- Statistics are not periodically logged by the server yet.
- Removal of stop words not implemented yet. This means "examine apple" will
work while "examine the apple" will not.
v0.0.18 Released Sunday 11th April, 2021
==============================================================================
Module Mode
- WolfMUD now uses Go's module mode instead of the older GOPATH mode. As a
result the use of 'go get' to obtain WolfMUD is considered deprecated. The
preferred method of obtaining WolfMUD is Git and cloning the repository.
Alternatively the binary and source archives are provided for each release.
Added
- Zone files can use @refs to reference fields defined at another reference.
- Fields in a record jar can have an optional preferred ordering applied when
the record jar is written. The default preferred ordering for WolfMUD is
specified in the attr/ordering package and can be changed to suit.
- The preferred ordering of fields in a zone file is now documented and is
intended as a guide to ease collaboration between authors. Details can be
found in docs/zone-files.txt.
- New wrjfmt tool for formatting record jar files. See Known bugs / Issues.
- An optional Makefile is provided for building, testing and running WolfMUD
on Linux during development.
- An optional Makefile is provided for building WolfMUD releases on Linux.
- A new botrunner tool has been added to simulate players on the server for
load testing.
Changed
- The supplied zone files have been cleaned up and make use of the new @refs.
- Player files are now written out with the preferred field ordering.
- Minor performance improvement inlining state.CanLock check in state.AddLock
- Network writes to clients are now asynchronous. This improves performance
when handling player commands. Clients on a slow connection are handled
better and no longer hold up other players.
- All commands and tools should now be placed in the bin directory.
- Default data directory for binary, source and Git clones is ../data
- Default root directory for binary, source and Git clones is WolfMUD. The
instructions for Git clone on the website and in documentation is now:
git clone https://code.wolfmud.org/WolfMUD
- Most documentation in the docs directory has been rewritten/ improved.
Deleted
- The documentation in getting-started.txt has been incorporated into the
running-the-server.txt and compiling-from-source.txt guides.
Fixed
- Fixed an issue in record jars where the name of the free text field was
included at the beginning of the text if a named free text field was used
as opposed to an unnamed free text section.
- Fixed a formatting issue when writing out free text sections. Free text
sections are now unfolded and refolded when being written out.
- Fixed a comment in the text package which was causing the copyright notice
to appear as a package comment.
Known Bugs / Issues
- The new wrjfmt tool is a work in progress and has several limitations,
however it has been made available 'as is' due to the benefits provided
when used to clean up the zone files.
- Comments will be stripped from the record jar
- String lists will be compacted
- Camel cased field names will be title cased
- Named free text fields will become free text sections
Despite these limitations, it is very useful when formatting a zone file
and comparing the output with the original zone file, using a text diff
program, and manually applying changes.
- The new Makefiles for WolfMUD and building releases are currently only for
Linux and rely on Bash.
v0.0.17 Released Saturday 31st October, 2020
==============================================================================
Added
- New ref field added to Thing to store the original reference from the
record jar. Accessed via a new Thing.Ref method.
- New Inventory.SearchByRef method to search Inventory by Thing ref.
- New LoadHooks and SaveHooks methods added to Thing to provide hooks into
the post-unmarshaling and pre-marshaling processes.
- New ResetHooks added to Thing to provide hooks into the reset process.
- New Holding, Wearing and Wielding attributes to record what items a player
or mobile is using and how the items are being used.
- New saveHook added to Body attribute to make Holding, Wearing and Wielding
attributes available for saving to a record jar.
- Added a cuirass (ref: L11O1) and helmet (ref: L11O2) to stock inventory for
armourer in data/zones/zinara.wrj.
- Toy doll (ref: O11) wearing a dress (ref: O12) and hat (ref: O13) added to
pawn shop (ref: L8) in zinara.wrj - for testing and experimenting with
returning containers to their initial state including used items. Toy doll
has WAIT set on Reset.
- New WAIT value added to Reset attributes that cause mobiles/containers to
wait for their inventory items to be ready before resetting.
- New Inventory.SearchDisabled method added to search an Inventory disable
list for a Thing matching an alias.
- The Body attribute has a new RemoveAll method to unconditionally remove all
items being used.
Changed
- Loading players calls post-unmarshaling LoadHooks on Thing.
- Saving players via QUIT command calls pre-marshaling SaveHooks on Thing.
- The EXAMINE/EXAM command now details items being used by players and
mobiles.
- City guards (ref: M11 & M12) updated to wield a shortsword (ref: L13O1) and
wear a helmet (ref: L11O2), cuirass (ref: L11O3), leather breeches (ref:
L73O1) and boots (ref: L73O7). Mobiles have WAIT set on reset.
- Sweet flower girl (ref: M7) updated to wear a dress (ref: M7O2) and hold a
bunch of wild flowers (ref: M7O1). Mobile also has WAIT set on reset.
- Optimised Inventory move when from and to Inventory are the same.
- The $RESET command now implements waiting for mobiles/containers with the
new Reset WAIT value set.
- The $RESET command now calls Thing.ResetHooks to provide access to the
resetting process.
- #DUMP/#UDUMP/#LDUMP can now be used directly on disabled items.
- The JUNK command will now synchronise body slots when items are junked.
Fixed
- Duplicate 'reference' removed from message text in zones.loadZone when
overwriting duplicate references.
- Data race fixed when player killed just as they submit a command for
parsing.
- The Body attribute Hold, Wear & Wield methods now check for Body being nil.
- In data/zones/zinara.wrj remove duplicate aliases on the cotton shirt (ref:
L73O11), cotton trousers (ref: L73O12) and cotton dress (ref: L73O13).
v0.0.16 Released Thursday 10th September, 2020
==============================================================================
Added
- New Thing.Freed method added to use in place of 'len(Thing.Attrs()) == 0'
to reduce allocations and copying.
- All Attributes now have an Is method that return true if the Attribute
implements a particular interface - usually the interface named for the
attribute type.
- New Thing.FindAttr and Thing.FindAttrs methods which use the new Attribute
Is method to replace the current Find* methods.
- Removed Thing.Attrs method.
- Added Attribute.free method to free Attribute without locking.
- New Health attribute added. Players automatically upgraded on login.
- New player /PROMPT command to set/query current prompt.
- Experimental HIT command added for testing new Health attribute and health
regeneration. Can be vetoed via HIT or the more general COMBAT pseudo
command.
- New cmd.state.asParticipant method to allow an actor to script a command
for a participant.
- Players can be killed in-game, currently via the experimental HIT command.
- A hyphen '-' or underscore '_' can now be used in the name of a name/value
pair in a record jar file and will no longer be interpreted as a name/value
separator.
- A exclamation mark '!' can precede the name in a name/value pair list in a
record jar file and will not be treated as a name/value separator.
- Added a text.List convenience function for turning a []string into a string
that is comma separated except the last two elements which have 'and'
between them. For example: text.List("A", "B", "C") → "A, B and C".
- A new Body Attribute has been added allowing items to be worn, wielded and
held. Players are automatically upgraded on login.
- New REMOVE command to stop wearing, wielding or holding an item.
- New Wieldable, Wearable and Holdable Attributes added. Documentation in
docs/zone-files.txt updated. While Wieldable and Wearable have to be
defined on an item Holdable (in one hand) is applicable to all items except
players and mobiles. Holdable can be vetoed if something should not be
held. Specifically defining Holdable on an item can override the default
behaviour, for example to require two hands.
- New WEAR, WIELD and HOLD player commands added.
- Added Merkle's Fine Emporium (clothier, L73) with a selection of clothing
items that players can wear.
- Added a text.tree sub-package for producing textual tree graphs.
- Added new attr.Thing.DumpToLog helper method.
- Queued events now record when they are expected to fire. Queued events can
also be suspended and will record how long is left before they are due to
fire. Suspended events can be resumed to fire after the remaining time.
- The Action, Cleanup and Reset attributes have new Suspend and Resume
methods to suspend and resume their events.
- Added a attr.Reset.Spawnable method to check if an item is spawnable.
- Added a attr.Reset.Unique method to check if an item is unique.
- New SHOUT, TELL/TALK and WHISPER player commands added.
- New test zone reset.wrj added under data/zones, disabled by default. Old
test zone quiet.wrj removed.
- In the zinara.wrj zone file there are two new barriers. One to stop the
rabbit and frog from wandering out of the gardens, the other to stop random
creatures wandering into the gardens.
Changed
- Lazily allocate maps in message.Buffers.Silent to reduce allocations.
- $CLEANUP and $RESET commands updated to use new Thing.Freed method.
- All Attribute Find* methods reimplemented using Thing.FindAttr and
Thing.FindAttrs methods. Cleaner implementation causes an average 5%
performance hit to in-game commands. Needs revisiting.
- The event package now uses a reference to attr.FindName instead of manually
processing the result of calling attr.Thing.Attrs - a butt ugly hack that
allows attr.Thing.Attrs to be removed.
- The frontend package now locks the outermost Inventory of the player's
starting position when player is placed into the world.
- attr.Locate now uses the sync.rwmutex from the embedded Attribute instead
of allocating its own.
- Player prompt displays current / maximum health, dependant on prompt style.
- Default player prompt changed from StyleBrief to StyleShort.
- The frontend package now uses a player's attr.Locate.Where being set to nil
as an signal to exit, instead of checking if the last command was 'QUIT'.
This allows other means of exiting, such as being killed ;)
- The Dragon's breath tavern and the sheltered area in the garden have been
reinstated as sanctuaries - no fighting/combat allowed.
- The city guard's peacekeeper status has been partially restored - they can
prevent fighting, but cannot attack players killing things in return.
- The message.Buffer.Deliver has been optimised, avoids copying buffers.
- The QUIT command has been updated to sync body slots when forcibly junking
non-collectable items the player cannot keep.
- The DROP and PUT player commands have been updated to sync body slots when
a worn, wielded or held item is dropped or put somewhere.
- The INVENTORY/INV player command shows items being worn, wielded or held.
- Clarify SPAWN and unique item documentation for RESET in docs/zone-files.txt
- In docs/zone-files.txt the section on Alias/Aliases has been rewritten and
now includes details of qualified and bound aliases.
- Cleaned up chest, pouch and ball references and moved items from the tavern
to the trading post in the zinara.wrj zone file.
- Moved the curious brass lattice from the tavern to the pawn shop in the
zinara.wrj zone file.
- Added specific Holdable definition to rabbit and frog mobiles in zinara.wrj
so that they can be held by players - mobiles are not normally holdable.
- Moved bag and sack from tavern to the trading post in zinara.wrj zone file.
- The EXAMINE/EXAM command has been updated so that when used on another
player it describes items being worn, wielded or held.
- attr.Thing and all Attribute switched to new debugging scheme using new
text.tree package. Debugging information for attributes standardised.
- Removed ability to dump Thing by arbitrary memory address using #DUMP.
- Updated #DUMP to use new debugging scheme.
- The attr.Thing.Copy method has been renamed attr.Thing.DeepCopy and is
recursive into Inventory. The attr.Thing.Copy method has been reimplemented
and is not recursive.
- Removed Thing.ClearOrigins method as no longer used.
- In the zinara.wrj zone file the "weapon shop" is now "bladesmith workshop"
and has a selection of weapons to try with the new WIELD command.
- The game.init method has been renamed game.enter to better reflect its
purpose and to avoid confusion with package init methods.
- Updated the meaning of what is a collectable item in the Thing.Collectable
method. Updated junk.dispose method as it can no longer use the Collectable
method to determine if an item should be freed for garbage collection.
- The SAVE command now also saves a player's disabled items waiting for a reset.
- When a player exits the game any pending Reset events are suspended, when
entering the game any suspended Reset events are resumed.
- The attr.Inventory.Unmarshal method has been updated so that references
with a leading exclamation mark '!' are loaded disabled.
- The SAVE command cmd.save.fixInventory method, frontend.log.assemblePlayer
method, zone loader zone.linkupInventory and zone.linkupLocation methods
have been updated to understand disabled references. This means players can
be loaded with disabled items, usually because they are waiting for a
reset. Also items can be loaded disabled into zones via INVENTORY and
LOCATION fields. Documentation in docs/zone-files.txt updated with details.
- Added 'to' and 'with' as stop words in cmd.internal.stopwords so that
players can 'TALK with' and 'WHISPER to' other players.
- The street vendor in the zinara.wrj zone file now uses SHOUT instead of SAY
to attract potential customers.
Fixed
- Don't try logging a connection error if there isn't one.
- Thing.Freed only needs to take a read lock instead of a read-write lock.
- Missing comment added to attr.Name type.
- In frontend.Write don't write data to client if error already raised.
- Always send prompt to client, even if player.PromptStyle is StyleNone, so
that the text colour is always reset.
- Set stale attr.Locate,where to nil in Inventory.Remove method.
- In attr.Inventory.Remove set attr.Locate.Where on Thing removed to nil so
that we don't end up with a stale reference.
- The QUIT command should also notify any participant.
- Extraneous colour resets sent to clients reduced.
- The attr.Player.Write method no longer modifies the passed []byte and now
conforms to the io.Writer interface.
- Green and red balls used as test items removed from zinara.wrj zone file.
- Added TAVERN qualifier to tavern door in zinara.wrj zone file.
- Fixed aliases for entrance to the mages tower (L48), Mage's tower (L49),
entrance to temple (L53), entrance to warrior's barracks (L65) and magic
shop (L67) in zinara.wrj zone file. Fixed aliases for track near small cave
(L13) in zinara_south.wrj zone file.
- The attr.Locate.Copy method should include the origin in the copied data.
- Fix attr.Thing.SetOrigins method setting origins twice.
- The attr.Thing.SetOrigins method should include disabled Inventory items.
- The cmd.junk.dispose method should also dispose of disabled items.
- Reimplemented Reset.Spawn to fix item respawning nil panics, items not
resetting due to lost Reset events and duplication of unique items.
- Fix clean up of Reset event if event not seen and code shortcut taken.
- In attr.Thing.SetOrigins only set origin for items with a Reset attribute.
- Fixed data race in cmd.state between cmd.newState and cmd.state.sync methods.
- attr.Inventory.Move should be able to move disabled items instead of
silently failing.
- In junk.lockOrigins lock origins of disabled items.
Known Bugs / Issues
- If a player is wearing, wielding or holding items and completely log out of
the server the items will no longer be worn, wielded or held when they log
back in.
- Buying and selling are not currently implemented so items at shops, like
Merkle's Fine Emporium and the Bladesmith's workshop, can just be taken by
players so they have some items to test the new WEAR, WIELD and HOLD player
commands.
v0.0.15 Released Thursday 10th November, 2019
==============================================================================
Fixed
- Typo in data/zones/zinara.wrj for lady in pawn shop.
- A nil panic in the JUNK command triggered by a location issuing a CLEANUP.
v0.0.14 Released Thursday 31st October, 2019
==============================================================================
Added
- New ring buffer added for use with connection quotas.
- Per IP address connection quotas added.
- A text.Unfold function has been added to unfold folded text while keeping
significant whitespace.
- Support added for bound qualifiers allowing a qualifier to only be valid
for a specific alias. For example: '+SHORT:SWORD SWORD SHORTSWORD' allows
the item to be referred to as 'SWORD', 'SHORTSWORD' or 'SHORT SWORD' but
not 'SHORT SHORTSWORD'. The bound to alias does not have to be explicitly
specified. Given '+SHORT:SWORD' the bound qualifier 'SHORT' will be added
as will the alias 'SWORD'.
- Server stats now include number of allocations made since the last stat
line was logged. Shown in the stats line as 'A[ +n]'.
- Tests added for GET, DROP, PUT, TAKE, OPEN, CLOSE, EXAMINE, JUNK and READ
commands.
Changed
- Cleaned up error handling in client communication code.
- Documentation updated with HTTPS links.
- The server greeting and zone file descriptions are now unfolded when the
record jar file is read.
- The commands GET, DROP, PUT, TAKE, OPEN, CLOSE, EXAMINE, JUNK and READ now
use the new matcher code.
- The messages for the commands GET, DROP, PUT, TAKE, OPEN, CLOSE, EXAMINE,
JUNK and READ have been improved.
- Events now use a small cache for timers.
- Inventories are now implemented using a double linked list instead of a
slice. This reduces the bookkeeping complexity, storage and allocations.
- Players and Narratives are now in separate lists within an Inventory.
- The Inventory.Players method is now Inventory.Occupied to better reflect
its purpose. Inventory.Players now returns the players in an Inventory.
- The GET command can no longer be used to pick up another player.
- The PUT command can no longer be used to put another player into a
container.
- The Inventory.Compact configuration value is now obsolete.
- Matcher code rewritten and performance improved.
- Action, Cleanup and Reset attribute types now have a Pending method.
Fixed
- Connection logging now reports correct source file in log.
- Write timeout for client connections now set correctly.
- Frontend now delivers outstanding messages to client when closed.
- Test function TestFixDEL in client tests misnamed, should be TestClean.
- A gofmt issue in config/config.go has been fixed.
- Fields within a free text section in a record jar file should just be part
of the free text section and not recognised as fields.
- Indented record separators '%%' in a record jar file should be ignored when
found in a free text section.
- Line feeds should be preserved when reading record jar free text sections.
- String lists in a record jar should not be reordered when encoded/decoded.
- Alias qualifiers are now treated as distinct from aliases. This fixes the
bug where a qualifier would be recognised as a valid alias.
- Name of actor for LOOK command should be upper cased.
- The Thing.Collectable method no longer reports players as being collectable.
- Corner case in the matcher when switching from 'not enough' to 'unknown'
match results fixed.
- Matcher should only be returning unique results.
- The TAKE command now checks for a TAKEOUT veto before checking if item is
in the container.
- For Go 1.13 the server no longer uses command line arguments to set an
alternative data directory or configuration file. Instead it uses the
WOLFMUD_DIR environment variable. Documentation compiling-from-source.txt
and running-the-server.txt have been updated.
Known Bugs
- New search and matching item limits and item instances undocumented.
v0.0.13 Released Sunday 10th February, 2019
==============================================================================
Security
- An issue was found that allowed players to send arbitrary data to other
players via the SAY command. The arbitrary data could contain ANSI escape
codes and/or other control codes, the effectiveness of which are dependant
on the capabilities of the player's client. A malicious user could, for
example: send fake messages, send mock shell screens, ring the terminal
bell, set the terminal window title. At no time can the malicious player
obtain any information from other players, all data is still only sent to
the server. Players receiving potentially malicious data will always see
the game prompt after the data is sent to them indicating they are still
logged into the game.
Added
- New item search and matching code that allows ranges of items, specific
items and item qualifiers to be used by commands when requiring an item to
be specified. For example: get all ball, get 2nd ball, get green ball, get
all green ball, get 2nd green ball.
- New WHICH command that uses the new item search and matching. Mainly
intended for players to try out the new search and matching so as to
provide feedback.
- New helpers for testing commands provided in cmd/pkg_test.go
- Tests for WHICH command using new command testing helpers.
Fixed
- Added missing Start.Free method.
- Removed stutter from frontend.game methods.
- Corrected tabbing in v0.0.12 release note entry.
Known Bugs
- New search and matching item limits and item instances undocumented.
- Alias qualifiers, aliases with a leading '+' character, have not been
documented yet.
- Commands will recognise a qualifier as a valid alias. For example with
aliases '+GREEN' and 'BALL' commands will see the qualifier '+GREEN' as a
valid alias. So 'GET +GREEN' would work for the item when it shouldn't.