-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathcore-changes.txt
More file actions
8255 lines (7187 loc) · 446 KB
/
core-changes.txt
File metadata and controls
8255 lines (7187 loc) · 446 KB
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
-- POL100.3.0 --
05-10-2026 Turley:
Fixed: Healthbar updates of other mobs if the hp is greater then 0xffff
05-10-2026 AsYlum:
Fixed: NPCs with intrinsic AR had their ColdResistCap silently overwritten
with EnergyResistCap whenever any resist/damage/cap mod was changed.
04-22-2026 Turley:
Fixed: Statmsg pkt (0x11) was send way to often
Fixed: In case of a load error print the starting line number of the element
03-29-2026 Turley:
Changed: for sql connection mariadb connector is now used, since its compatible nothing changes except that the core nolonger needs mysql as external dependency.
03-15-2026 Turley:
Added: uo::DisplayDialogGump(chr_or_array, layout, textlines, x:=0, y:=0, flags:=0, gumpid:=0 )
non-blocking version of uo::SendDialogGump(), instead of blocking the script until the client interacts with the gump it returns immediately.
Sends event SYSEVENT_GUMP_RESPONSE{type=0x20000, source=chrref, response=0/IntHash} once the client reacted.
Where the response member has the same structure/logic as the return value of uo::SendDialogGump().
First param can be a single character reference or an array of character references to send the same gump to multiple clients.
Changed: uo::CloseGump(chr_or_array, gumpid, response:=0)
First param can now be a single character reference or an array of character references to close the same gump for multiple clients.
03-09-2026 Kevin:
Fixed: Passing a boat item descriptor struct which contains an `AlternateMultiID` member to
`CreateMultiAtLocation` now works correctly.
03-07-2026 Turley:
Fixed: configuration file reading failed in very rare cases due to missing thread-safety
02-22-2026 Turley:
Fixed: uoconvert showed wrong coordinates in the error msgs when too many static items exist in a block
-- POL100.2.0 --
02-16-2026 Turley:
Note: Pol 100.2.0 is now officially released
01-18-2026 Turley:
Fixed: ClassInstance memory estimate
01-17-2026 Kukkino:
Changed: FunctionReference no longer includes full program in its memory estimate.
01-10-2026 Turley:
Fixed: class method calls which have a known name, name of an existing obj method, now work
Fixed: now also if the method has parameters
01-10-2026 Turley:
Fixed: dynamic floor-like objects (height of 0) now block LOS like they do if they where static
01-07-2026 Turley:
Fixed: Since the switch to the new compiler .lst files had no sourcefile/sourceline infos, these are now again produced
01-04-2026 Turley:
Fixed: cfgmod::GetConfigInt overflow issue, now returns Error("Integer overflow error")
12-31-2025 Kukkino:
Fixed: Changing warmode no longer sends 0x77 packet (Update Player) packet to clients in range who cannot see the mobile (ex. when the character changing warmode is hidden).
12-15-2025 Kevin:
Fixed: Parsing issue introduced with regular expressions when using floating-point dividends
12-14-2025 Reloecc:
Added: uoconvert.cfg element StaticOptions extended by DiscardedWaterTiles.
Lists the tiles that will be discarded during the processing of solid statics,
where the map is at or below the same Z level as the static, allowing boats to bump into shores.
Defaults to tiles in the range from 0x1796 to 0x17B2 if not present in the config file.
StaticOptions
{
DiscardedWaterTiles 0x1796 0x1797 0x1798 ...
}
12-14-2025 Turley:
Fixed: With newer clients boat travellers and observers didnt get all objects send
11-18-2025 Kevin:
Added: Character script member logged_in, returning 1 if the character is present in the game world.
Will return 1 on NPC, and 1 for player characters that are either connected or disconnected
but waiting for the logoff timeout.
Changed: EquipScript/UnequipScript will now be given an OfflineCharacterRef
for the equip_on/equip_by and unequip_on/unequip_by parameters, allowing
scripts to access the mobile if the mobile is offline.
11-16-2025 Kevin:
Added: Support for creating regular expressions via `basic::RegExp( pattern, flags )` module
function and `/pattern/flags` language syntax.
Added: String methods `replace`, `find`, and `match` that accept a regular expression object.
Added: String method `find` now also accepts a regular expression object.
Fixed: `basic::SplitWords` module function with an empty-string delimiter will no longer hang
the process, and instead split the string into individual characters.
11-02-2025 Nando:
Changed: Config files now returns an error if a property name contains '{' or '}'. This
prevents mistakes when closing a config element, which could lead to the closing bracket
to be ignored.
09-28-2025 Kevin:
Changed: The `TypeOf()` and `TypeOfInt()` for a class instance has been changed from "Class" and 102 to "ClassInstanceRef" and 42.
The basic.em constant for class instance references was missing, and has been added as:
const OT_CLASSINSTANCEREF := 42;
09-06-2025 Kevin:
Fixed: Uninitialized functions now properly check for parameters for byref and rest parameters.
Added: Uninitialized function parameters can be marked as `default`, requiring constructed descendant classes to provide
a default value.
09-05-2025 Kevin:
Added: Escript now supports declaring class methods as uninitialized using the `uninit` keyword, requiring any constructed
descendant class to define the functions' implementation. This is a similar concept to "abstract methods" in other
programming languages like Java or C#:
class Shape()
uninit function area( this );
uninit function scale( this, factor );
endclass
class Circle( Shape )
function Circle( this, radius )
this.radius := radius;
endfunction
function area( this )
return 3.14159 * this.radius * this.radius;
endfunction
function scale( this, factor )
this.radius *= factor;
endfunction
endclass
See the Racalac Escript Guide for additional details.
09-04-2025 Kevin:
Fixed: Compiler bug when generating an inherited constructor for a child class when the base class' constructor doesn't exist.
09-02-2025 Turley:
Added: pol.cfg DefaultPriority to change the default priority of scripts without having to call os::Set_Priority()
Note: Be very carefull when changing this value since as long as scripts runs eg no client pkt can be handled.
Changed: the new default value of the script priority is now 10 (before it was 1)
Changed: pol.cfg WatchSysLoad output added units and show cpu time also on linux
Changed: pol.cfg WatchRPM output replaced cryptic entries and added more lines. These new lines show the statistics of the last minute about the runtime of the scriptscheduler and active scripts.
08-24-2025 Kevin:
Fixed: Under certain situations, the compiler would not find a parent class' static (ie. non-member) when used inside a child class.
08-19-2025 Kevin:
Fixed: Enum class constants can be used unscoped within their own enum class.
Fixed: Enum class constants can be used in case statement labels.
Fixed: Enum classes without an initializer now compile correctly.
08-17-2025 Kevin:
Added: Escript now supports declaring an enumeration as an "enum class", which scopes the enum's entries to the enum's name:
enum class Races
HUMAN := "Human",
ORC := "Orc",
ELF := "Elf"
endenum
print( Races::HUMAN ); // Prints: "Human"
08-16-2025 Kevin:
Added: New module function util::RandomUUID()
Added: util.em constants UUID_NIL and UUID_MAX
08-06-2025 Turley:
Changed: optimized generated instructions when using ShortCircuits
08-02-2025 Turley:
Fixed: when the client view range is changed the client gets first informed about the new range before potentially sending new objects
07-28-2025 Turley:
Added: ecompile.cfg setting ShortCircuitEvaluation (0/1) default 0 and ShortCircuitEvaluationWarning (0/1) default 1
if activated: in || and && expressions the second argument get only evaluated if the first operand is false for || and true for &&
Since it could be a breaking change the Warning setting was introduced to find all expressions which could break.
The warning will not be triggered for functions which are known to have no sideeffect eg Len.
Its no complete list just the most common ones.
Due to the fact that variable types are not known at compile time and methods can be overwritten it will warn if any method calls are performed.
Added: ecompile switch -S to activate ShortCircuitEvaluation independend of the cfg setting
07-22-2025 Kevin:
Added: ecompile switch -Z, ecompile.cfg setting GenerateAbstractSyntaxTree to write abstract syntax tree (AST) to file
07-10-2025 Turley:
Added: Compiler is now able to optimize:
- more (all?) constant operations. Eg 2*2.1 is now calculated at compiletime instead of runtime.
Before only a small subset of integer operations where calculated at compile time.
- ternary and elvis operator if its a constant expression. If statement where already optimized.
- while/dowhile/repeat loops if constant, eg by removing them completly "while(false)" or eg endless loop without runtime checks "while(true)"
07-03-2025 Kevin:
Added: New module function os::SendEmail and config file email.cfg
Fixed: Module function polsys::ReloadConfiguration will now return an error if there is an issue in a configuration file instead of
terminating the script
06-30-2025 Kevin:
Fixed: When a player unequips an item from another mobile and the movement of the item fails (eg. dropping item too far away), the item will
now be re-equipped on the same mobile and not the player.
06-28-2025 Kevin:
Added: os::Wait_For_Event now supports doubles for fractional seconds, eg. wait_for_event( 0.25 ) to wait 0.25 seconds, with a resolution
of 10ms (ie. 0.01).
06-28-2025 Kevin:
Fixed: Players can now drop an item directly onto an NPC's backpack from the NPC's paperdoll or directly onto a container within the backpack
when servspecopt.cfg MasterCanAccessNPCsBackpack is enabled.
06-25-2025 Kevin:
Added: servspecopt.cfg MasterCanAccessNPCsBackpack 0/1 default 0
If enabled, the core will allow a master to access (ie. use, move, target) his followers' backpack and the items within it.
06-23-2025 Kevin:
Added: Packet script method `assign( Packet other )`
Fixed: `packet.SetInt8()` will now correctly return an error if setting a value at an index outside the length of a fixed-length packet
06-22-2025 Kevin:
Fixed: Memory leak caused by equipped_by/unequipped_by parameter addition
06-20-2025 Kevin:
Added: servspecopt.cfg MasterCanClotheNPCs 0/1 default 0
If enabled, an NPC can be clothed by its master (via paperdoll)
Added: Characters that can clothe other characters -- either by being the NPC's master with servspecopt.cfg MasterCanClotheNPCs enabled
_or_ with clotheany privilege enabled -- can now modify equipment via paperdoll.
Added: Program parameter equipped_by to EquipScript/EquipTestScript and unequipped_by to UnEquipScript/UnEquipTestScript to reference
the player performing the (un)equip action. If there is no player performing the action (eg. equipping via uo module function
EquipItem, unequipping via DestroyItem, ...), then this program parameter will be the same.
Changed: Updated Script Types documentation for EquipScript/EquipTestScript and UnEquipScript/UnEquipTestScript to clarify that the first
character program parameter is the character having their equipment changed, ie. equipped_on or unequipped_from.
05-24-2025 Kevin:
Fixed: Array method `findIndex` no longer modifies the first element in the array.
05-16-2025 Kevin:
Fixed: Incorrect handling of realms causing crash in (a) character gotten item and (b) undo failed item move.
04-13-2025 Kevin:
Added: uoconvert now supports reading MultiCollection.uop
Added: uoconvert.cfg now allows multiple entries for the Boats properties in the MultiTypes element
Added: uoconvert.cfg now allows multiple entries for the Tiles property in the Mounts element
Removed: uoconvert.cfg no longer requires House or Stairs properties inside the MultiTypes element, and will be ignored if present.
03-05-2025 AsYlum:
Changed: Multi elements will check raw graphic instead of using itemdesc graphic definition
02-26-2025 Kevin:
Fixed: Hair and beard layers no longer appear on ground of human corpses at death
02-23-2025 Turley:
Added: Modulus (% and %=) for doubles. Meaning that eg 4%1.5==1.0 or 3.3%1.1==0
02-20-2025 Turley:
Fixed: saving datafiles if the folderstructure is no longer existing
Changed: start of the core now fails if the datastore.txt contains a datafile which no longer exists.
This can happen if datafiles where manually removed without updating the datastore.txt
02-19-2025 Kevin:
Added: Support for spread operator in dictionary and struct initializers. For example:
var first := dictionary{ 1 -> "one" };
var second := dictionary{ 2 -> "two" };
var joined := dictionary{ first..., second.... };
print( joined ); // dict{ 1 -> "one", 2 -> "two" }
See the Racalac Escript Guide for additional details.
Added: ecompile.cfg option FormatterEllipsisSpacing (default 0) to add space before ellipsis (...), eg `a ...` vs `a...`.
02-16-2025 Kevin:
Added: Escript support for sequence and index binding statements, for example:
var [ first, second, third ] := array{ "one", 2, "three" };
print( first ); // "one"
print( second ); // 2
print( third ); // "three"
var { name, color } := who;
print( name ); // who.name
print( color ); // who.color
See the Racalac Escript Guide for additional details.
Added: Iterator support for more objects: ConfigFileRef, SQLResultSet, SQLRow, String. These objects
can now be used in `foreach` loops, `...` spread operator, and the new binding statement.
Added: ConfigElemRef members can now be accessed via element index access, eg. `cfgelem["key"]`.
02-17-2025 AsYlum:
Fixed: Saving banned state of an account
02-07-2025 Turley:
Fixed: B9 feature flag was used from ssopt DefaultExpansion instead of the account expansion. Bug added with 02-04 changes
02-06-2025 Turley:
Improved: world save performance
02-04-2025 Turley:
Added: ssopt.cfg DefaultExpansion defines the default expansion for accounts. Supported values are T2A (default),LBR,AOS,SE,ML,KR,SA,HSA,TOL
Fixed: HSA (and TOL) expansion did not activate gothic and rustic tiles for customhouses
Fixed: save/load of npc/item hitchance
02-04-2025 AsYlum:
Fixed: ecompile -A could on Windows compile same files multiple times
02-01-2025 Kevin:
Fixed: Invisible items will now send the "hidden" flag if the character can see invisible items.
01-30-2025 AsYlum:
Fixed: Missing attack range properties defaults in itemdesc.
The implementation of new properties for min/max attack range increase added on 11-02-2024 contained a bug. You should check if your save files contain MinAttackRangeIncreaseMod, MinAttackRangeIncrease and MaxAttackRangeIncrease properties with suspiciously looking values like for example:
MinAttackRangeIncreaseMod -24931
MinAttackRangeIncrease -1120
MaxAttackRangeIncrease 32602
To fix your save files you need to remove offending lines. If you need help or guidance how to do this feel free to contact POL dev team for assistance.
01-28-2025 Turley:
Fixed: Performance regression of world save
01-20-2025 Kevin:
Added: util::RandomDiceRoll() new parameter `allow_negatives` (default: `0`). If `1`, a negative dice roll will be returned _as-is_, and
will not be capped at `0`.
Note: Since this change introduces a new parameter to a module function, you **MUST** recompile all your scripts!
01-19-2025 Turley:
Fixed: overflow/underflow errors when modifying several object members
01-17-2025 Turley:
Changed: uo::SaveWorldState if possible (eg no critical script) script gets suspended until both the critical and non-critical part of the save is over.
Returning in this case also a struct-member "ElapsedMillisecondsTotal" as the total time worldsave took.
Or error if any part of the worldsave failed.
Fixed: overflow/underflow error when modifying item.hp (min 0, max 0xFFFF)
01-14-2025 Turley:
Fixed: crash when disk is full during worldsave
Added: PolCore().worldsaved_at returns game clock time of last successful world save
01-04-2025 Kevin:
Added: Script object script method `stacktrace( options? )`
11-13-2024 Turley:
Added: regions.cfg ItemsDecay setting, if deactivated items will not decay in this area.
Added: multi.items_decay r/w member, defaults to also added itemdesc.cfg entry ItemsDecay (1/0 default 0). If set to 1 items in this multi will decay.
Note: These settings are strongly recommended instead of using CanDecay systemhook
11-09-2024 Kukkino:
Added: Added GetRealmDecay(realm) and SetRealmDecay(realm, has_decay) allowing to manipulate whether items decay on the ground in given realms.
11-02-2024 DevGIB:
Added: MinAttackRangeIncrease(min_attack_range_increase) and MinAttackRangeIncreaseMod(min_attack_range_increase_mod) to Mobiles and Items allowing people to have a dynamic modifier to the adjust a mobiles minimum attack range.
Min Attack Range Increase is used as a numeric modifier to the minimum range of a weapon, e.g. Base min Weapon range of 1 + attack range increase of 1 would make the minimum attack range 2.
Added: MaxAttackRangeIncrease(max_attack_range_increase) and MaxAttackRangeIncreaseMod(max_attack_range_increase_mod) to Mobiles and Items allowing people to have a dynamic modifier to the adjust a mobiles maximum attack range.
Max Attack Range Increase is used as a numeric modifier to the maximum range of a weapon, e.g. Base max Weapon range of 3 + attack range increase of 2 would make the maximum attack range 5.
11-01-2024 Turley:
Added: servspecopt.cfg AllowVisualRangeModification 0/1 default 0
MinimumVisualRange default 5
MaximumVisualRange default 24
if AllowVisualRangeModification is active client can define its update range
Added: client.visual_range member r/w
returns the client setting of visual range, or overwrites the current range.
If set to 0 the client given range will be used.
As long as the visual range is set via script the client can no longer modify the range.
VisualRangeMin/Max limit is not taken into account.
10-27-2024 Kevin:
Fixed: Correctly load packages when running ecompile in non-autocompile mode.
10-24-2024 Kevin:
Fixed: Correctly link method calls to base classes when using `super::`-scoped function calls.
10-20-2024 Kukkino:
Added: Added moved_at and position_changed_at members to characters. Values signify when was the last time character
walked or changed position (for example with walking or MoveObjectToLocation)
10-20-2024 Kevin:
Fixed: Correct behavior with classes when using a class-scoped variable as a function callee.
10-19-2024 Kukkino:
Added: DefaultVisualRange setting to servspecopt.cfg. This setting declares how far clients can see by default.
Note that the same value needs to be set on both server and in client (usually 18 or 21).
10-18-2024 Kevin:
Fixed: Correctly declare parameters in generated super() function as used.
Fixed: Correctly handle case insensitivity with classes.
10-17-2024 Turley:
Fixed: Fixed crash when too many items exists an a boat.
10-16-2024 Turley:
Fixed: os::OpenConnection with keep_connection did not stop correctly if the socket was closed from the other side
Changed: pol.cfg UseSingleThreadLogin is by default now active
in the general case it improves the performance and stability
pol.cfg renamed SelectTimeout to LoginServerSelectTimeout,
since its only used in this case.
The unit is now millisec and the new default is the former effective minimum value.
10-14-2024 Turley:
Added: pol.cfg LoginServerDisconnectUnknownPkts
during login process disconnect connection if unknown/non-allowed pkt is received
Fixed: improved performance when non allowed pkts arrive
10-09-2024 Kevin:
Added: Escript now supports classes! Classes are a way to bundle attributes (members) and functionality (methods) together:
class Fighter()
function Fighter( this, name )
this.name := name;
endfunction
function Attack( this, what )
print( $"{this.name} attacks {what}!" );
endfunction
endclass
var person = Fighter( "Alice" );
person.Attack( "Bob" );
See the Racalac Escript Guide for additional details.
09-27-2024 Turley:
Fixed: EScript formatter missing spaces while packing function refs, better packing of function calls in eg structs
09-12-2024 Turley:
Fixed: multiple problems with the EScript formatter
Added: more ecompile.cfg options for the formatter, see ecompile.cfg.example for details
FormatterBracketAttachToType, FormatterFormatInsideComments, FormatterAlignTrailingComments,
FormatterAllowShortCaseLabelsOnASingleLine, FormatterAllowShortFuncRefsOnASingleLine, FormatterAlignConsecutiveShortCaseStatements
Note: should be now "production" ready, default settings are just our personal preferences
08-30-2024 Kevin:
Added: Performance improvements to the compiler
08-27-2024 Reloecc:
Changed: ssopt.MobilesBlockNpcMovement now accepts values 0/1/2. Earlier 0 = false, 1 = true.
2 = new behavior, where npcs of the same master are allowed to walk on top of each other. Backward compatible.
08-24-2024 Kevin:
Fixed: Resolved an issue where the Z coordinate of objects on a boat was incorrectly
calculated during turns (introduced in the 07-08-2024 nightly build).
08-11-2024 Turley:
Changed: EScript Formatter
variable declaration list if it doesnt fit to the line, split on the commas.
if a newline happens while a parenthesis is open align the following line with this parenthesis.
08-08-2024 Kevin:
Added: Function Objects can now be called across different scripts.
For example, an item use script can pass to pass an "initializer"
function to another script that provides a new color for the item as
a parameter:
program item_usescript( who, item )
// Find the color changer process.
var color_changer := GetProcess( ... );
// Send it an event, containing the item and the initializer function.
color_changer.SendEvent( struct{
type := "new",
item := item,
initializer := @SetupItem
} );
// Wait for the script to send us a result.
do
if ( Wait_For_Event( 1 ) )
break;
endif
while ( true );
SendSysMessage( who, $"Item color changed: {item.color}" );
endprogram
function SetupItem( item, color )
Print( $"Changing color: {item.color} -> {color}" );
item.color := color;
endfunction
08-06-2024 Kevin:
Changed: Performance improvements handling function references in the executor during runtime.
These changes increases the Escript version, therefore a recompilation of all scripts is required.
08-05-2024 Kevin:
Added: Support for spread operator -- used to expand an array's elements into arguments of
a function call or elements of a new array.
For example, to pass an array's elements as arguments to a function call:
function SendMessageToPlayers( message, players... )
foreach player in players
SendSysMessage( player, $"[Server] {message}" );
endforeach
endfunction
var players := array{};
if (condition1)
// Add a single player to the array
players.append( player1 );
endif
if (condition2)
// Get an array of players from somewhere else
var more_players := GetMorePlayers();
// Set `players` to a new array of the elements from both `players` and `more_players`
players := { players..., more_players... };
endif
// Pass all the elements of `players` as arguments
SendMessageToPlayers( "Hello!", players... );
See the Racalac Escript Guide for additional details.
08-04-2024 Kevin:
Added: Support for variadic user functions -- user functions that accept any number of arguments.
For example, to define a function that sends a message to any number of players:
function SendMessageToPlayers( message, players... )
foreach player in players
SendSysMessage( player, $"[Server] {message}" );
endforeach
endfunction
SendMessageToPlayers( "Hello!", player1, player2, player3 );
See the Racalac Escript Guide for additional details.
08-03-2024 Kevin:
Added: House script method `set_multiid( int multiid | string name )`
08-02-2024 Kevin:
Added: Array script method `find(FunctionObject testFn)`.
Added: Array script method `findIndex(FunctionObject testFn)`.
Added: Array script method `map(FunctionObject mapFn)`.
Added: Array script method `reduce(FunctionObject testFn, [initialValue])`.
08-01-2024 Kevin:
Fixed: Resolved an issue where function expression assignments to locals and captures was mis-targetted.
Fixed: Resolved an issue where function expression captures were not being captured by reference.
07-31-2024 Turley:
Improved: EScript ECompile Formatter: formatting of if statements and function parameters
07-29-2024 Kevin:
Added: Compiler support for function expressions via syntax `@(param1, param2, ..., paramN) { ... }`.
For example, to get all hidden online players:
var all_hidden := EnumerateOnlinePlayers()
.filter( @( player ) {
return player.hidden;
});
See the Racalac Escript Guide for additional details.
07-28-2024 Kevin:
Added: Array script method `filter(FunctionObject testFn)`.
Added: The compiler now supports any expression as the callee for a function call,
eg: `var func := @FunctionObject; func( 1, 2, 3 )` or `func( 1 )( 2 )( 3 )`.
For now, only function references (ie. a variable that holds or a function
that returns a `@FunctionObject`) can be called in this manner.
07-21-2024 Kukkino:
Fixed: Changing realm will now send full status to player to prevent showing scaled hp/maxhp.
07-16-2024 Kevin:
Added: When using the debugger, an attached script's `Print()` calls will now show in the Debug Console.
The log message includes the source location of the `Print()` call.
07-14-2024 Turley:
Removed: pol.cfg SingleThreadDecay setting
Changed: syshook CanDecay: returning 2 skips further core checks.
Currently meaning that the item will decay even if inside of a multi and decayonmulti is false.
Returning true/false or 1/0 still have the same meaning.
07-13-2024 Kevin:
Fixed: An attacking character will now attack immediately when their opponent unhides.
07-11-2024 Kevin:
Fixed: A hidden, attacking character will now attack immediately when unhidden.
07-10-2024 Turley:
Fixed: Boat movement to the edge of a realm no more crashes
Fixed: Moving a Boat via MoveObjectToLocation checks realms boundary and returns an error if it doesnt fit.
06-14-2024 Kukkino:
Fixed: Performance of containers held weight computations in deeply nested scenarios
05-16-2024 Kevin:
Fixed: When removing a partial stack from a container, the `item` parameter in the container's
OnRemoveScript will now be the partial stack itself (instead of the pre-split stack).
Added: Parameter `split_from` to container OnRemoveScript
Added: Parameter `amount` to container CanRemoveScript
05-15-2024 Kevin:
Fixed: Client is now properly updated when adding a stack to a container which contains a matching
stack (a regression introduced in previous core change)
05-13-2024 Kevin:
Added: container.held_weight_multiplier, item descriptor HeldWeightMultiplier to dynamically
modify a container's held weight. For example, on a backpack (having weight 3 stones) that
contains items totalling a weight of 100 stone, setting this property to 0.5 would have the
backpack weigh 53 (3 + 100 * 0.5) stone. Similarly, setting this property to 2 would have
the backpack weigh 203 stone.
Fixed: Tooltip updates to client are now correctly triggered for some previously missing scenarios
(eg. dragging an item from a container).
04-24-2024 Reloecc:
Added: `NpcMinimumMovementDelay` parameter to `servspecopt.cfg`. It controls maximum movement speed of NPCs.
04-14-2024 Kevin:
Changed: Boat sails will now by default not collide with other objects in the
world. For example, large orc galleon ships "dock" properly at the coastline
with the ship's sails floating above the ground, and sails from multiple
boats can occupy the same space in the world.
Added: ServSpecOpt "BoatSailsCollide" 1/0 default 0.
This setting adjusts the behavior of boat sails' collision:
04-12-2024 Kevin:
Changed: For thread-safety, the debug password in pol.cfg may no longer be changed
when the server is running.
03-24-2024 Kevin:
Added: `lastrealm` parameter to WalkOnScript.
Added: Boat WalkOnScript now triggers in the same manner as other Multis and Items.
03-22-2024 Kevin:
Changed: Equipment shown on a human corpses will now only show what was equipped
at the time of the character's death. Previously, any equippable item
on the corpse would show as equipped.
Fixed: Hair items equipped on a corpse will no longer disappear when opening
the corpse.
Fixed: Containers with MaxItems 0 (default if unspecified) will correctly support
the maximum allowed items (3200.)
03-18-2024 Kevin:
Fixed: Crash when going to certain map edge locations in Tokuno.
Note: This change requires recreating realms via uoconvert.
03-16-2024 Kevin:
Added: item.weight_multiplier_mod to dynamically modify an item's weight.
For example, on an item that weighs 100 stone, setting this property
to 0.5 would have the item weigh 50 stone. Similarly, setting this
property to 2 would have the item weigh 200 stone.
03-14-2024 Kevin:
Added: ecompile option -W (watch mode) / ecompile.cfg option WatchModeByDefault
Ecompile now includes a daemon watch mode! When using this mode,
ecompile will stay running and watch for file system changes,
recompiling scripts if they (or their dependent includes or modules)
are changed. This works in conjunction with other options, such as -A
for watching all scripts in the distro, or -r for watching all
scripts in a specific folder.
Note: When using watch mode, threaded-compilation is disabled.
03-10-2024 Turley:
Added: mysql_connect now also accepts port param for non standard ports
Added: mysql_escape_string escapes given string
03-03-2024 Turley:
Fixed: unknown realm in startloc.cfg now stops starting the core
02-26-2024 Turley:
Added: ecompile option -F and -Fi
EScript formatter for .src and .inc (, .em) files, can be combined with -r and -A
-F prints the formatted source without touching thr original files
-Fi (inplace) formatting, rewrites the source file(s)
ecompile.cfg.example in the distribution contains all the options currently available (or online configuration files docs)
comments containing "format-off" disables the formatting until a comment containing "format-on" is found (or eof is reached)
this is a very early stage of the formatter, so dont expect perfect results
02-08-2024 Kukkino:
Added: POL now accepts proxy protocol v2 if configured to in Listener in `uoclient.cfg` listener.
Added: Gameservers in `servers.cfg` can now be filtered using `ProxyMatch` similar to `IPMatch` except for used proxy.
Fixed: Gameservers `AcctMatch` and `IPMatch` can now be used at both at once (both conditions need to match).
02-06-2024 Kevin:
Fixed: Compiler error with escaping `}` inside interpolated strings.
02-04-2024 Kevin:
Fixed: Compiler crash on handling error member initializers with no expression initializer, eg. `error{ errortext }`.
01-27-2024 Kevin:
Added: POL now exposes a Debug Adapter Protocol (DAP) server to provide debugging support. Any IDE or tooling that implements DAP, such as the vscode-escript extension (https://github.com/polserver/vscode-escript), can utilize this new debugging server. See pol.cfg setting DAPDebugPort.
01-23-2024 Turley:
Fixed: faster_cast_recovery/faster_cast_recovery_mod item member returned wrong value
Fixed: attribute cap tenth value storing
Fixed: reportables of mobiles should now load correctly
01-18-2024 Kevin:
Added: Escript keyword `uninit` to represent the uninitialized value.
Added: Escript keywords `true` and `false`, equivalent to `Boolean(1)` and `Boolean(0)` respectively.
Note: These keywords can be used anywhere a "simple value" is used, eg. expressions, constants, user function default parameters, etc. Additionally, these changes increases the Escript version, therefore a recompilation of all scripts is required.
-- POL100.1.0 --
01-18-2024 Kevin:
Note: POL 100.1.0 is now officially released.
01-18-2024 Kukkino:
Changed: A player that single-clicks a hidden mobile will no longer receive a "You see" message for that mobile.
01-12-2024 Turley:
Added: chr.buffs member. Returns the current active buffs added via addBuff as dictionary.
Key is the iconid and value a struct struct{name_cliloc, desc_cliloc, end_time, name_args, desc_args}
Changed: addBuff(int icon_id, int duration, int cliloc_name, int cliloc_descr, string arguments_desc, [string arguments_name]) new optional argument arguments_name.
Needs a client higher then 5.x and modifies the cliloc_name like argument_desc does for cliloc_descr.
01-10-2024 Kevin:
Added: Boat item descriptor `AlternateMultiID` and boat method `boat.set_alternate_multiid(position)` to facilitate changing a boat's graphic, for example switching a boat from a "normal" to a "damaged" graphic.
01-07-2024 Kevin:
Added: Boat control script can be specified via the `ControlScript` item descriptor. If none specified, defaults to existing `scripts/misc/boat.ecl`.
Fixed: Shard no longer crashes if boat control script does not exist.
01-06-2024 Kevin:
Added: Boat script is now properly considered as a control script for the boat.
Added: Boat piloting via mouse movements. Set pilot of a boat via `boat.set_pilot(who)`, clear via `boat.set_pilot(0)`, and retrieved via `boat.pilot`. See boat method `set_pilot` and member `pilot` for more details.
Added: Boat piloting events are sent to the boat's control script. See `SYSEVENT_BOAT_MOVEMENT` for more details.
12-31-2023 Vitor:
Added: MaxAnimID to pol.cfg to extend animation limit for characters. (default: 2048)
12-29-2023 Turley:
Fixed: os::OpenConnection when sending multiple messages there was a (very low) chance that the messages where send in the wrong order.
12-22-2023 Turley:
Fixed: Multis get now send/removed based on their footprint. Especially big multis had the problem (bigger then 32x32)
Fixed: login near 0,0 did not send items/mobiles nearby
12-20-2023 Turley:
Fixed: storing of doubles, before the precision was fixed to 6 now its possible to store in e.g. CProps 12345678.12345678
12-16-2023 Kukkino:
Changed: PerformAction( character, action, framecount := 5, repeatcount := 1, backward := ACTION_DIR_FORWARD, repeatflag := ACTION_NOREPEAT, delay := 1 ):
Now validates 'action' parameter against UACTION
12-10-2023 Turley:
Fixed: https support on windows for HttpRequest (broken since august)
Fixed: unpack of big double values on windows when it used e notation. (broken since...)
12-06-2023 Brndd:
Fixed: crash due to character.clearBuffs()
12-03-2023 Brndd:
Added: GetStandingLayers() now has a "includeitems" parameter which allows including or excluding items from the search (default: enabled).
Fixed: GetStandingLayers() now returns the height of results correctly.
Added: GetStandingCoordinates( x, y, radius := 0, minz := -128, maxz := 127, realm := _DEFAULT_REALM, movemode := "L", doors_block := 0 ):
This is a new EScript function that returns an Array of coordinates that are valid locations for a creature to stand on in a given radius around the given coordinates. One example use-case is finding valid spawning locations for NPCs within an area.
11-19-2023 Turley:
Fixed: possible deadlock in packethooks
11-16-2023 Nando:
Added: UoConvert smartness:
- MaxTileID is now detected from tiledata.mul (uoconvert) and tiles.cfg (POL).
- Default width/height for each map id
- map0 and map1 width can be estimated automatically based on a height of 4096
- better error handling
Changed: usedif=1 is now the default in uoconvert
Removed: UseNewHSAFormat in uoconvert.cfg. This will be detected automatically from
tiledata.mul size.
11-12-2023 Kevin:
Fixed: crash when control scripts end for a destroyed item
11-08-2023 Turley:
Fixed: crash due to NPCs after calling ReloadConfiguration
11-01-2023 Kevin:
Added: RestartScript() now can restart item control scripts. Similar to NPC scripts, the existing Item control script will terminate and a new one started.
10-28-2023 Ins:
Added: ServSpecOpt "UndoGetItemEnableRangeCheck" 1/0 default 0.
If enabled - on fail to equip item back on character (if it has been taken from character layer)
and on fail to put item back to backpack will check if item has been taken from position/container that is in default_accessible_range.
If origin position/container is not in default_accessible_range will skip try to put item to origin position/container (unless item is no_drop)
and as last resort will drop item at character position (feet). UndoGetItemDropHere executed before UndoGetItemEnableRangeCheck if both are set.
Added: ServSpecOpt "UndoGetItemDropHere" 1/0 default 0.
If enabled - on fail to equip item back on character (if it has been taken from character layer)
and on fail to put item back to backpack drops item at character position (feet), except no_drop items. Attempt to return item in
origin container will be skipped.
Fixed: Leftover items in corpse on client side.
Changed: Added ServerSpecOpt reload to ReloadConfiguration.
10-23-2023 Turley:
Changed: added movemode parameter to uo:FindPath, defaults to "L". Before the move mode was fixed to land, now its possible to use the FindPath functionality also for eg sea monsters
10-18-2023 Turley:
Added: print/syslog console_color parameter. When used with one of the basicio.em CONSOLE_COLOR constants, or a custom xterm formatting string the output to the console is formatted accordingly. Resets the formatting at the end. Xterm formatting is supported on Linux and Windows11. For syslog only the output to the console is modified not the logfile entry.
Added: pol.cfg EnableColoredOutput 1/0 to disable formatted output. Default is 1.
10-15-2023 Kevin:
Fixed: Changed return values and parameters used by storage module functions to match documentation.
09-03-2023 Ins:
Added: repsys.cfg General section "PartyHarmFullCountsAsCriminal 1/0" default 1.
If 0 OnHarm does not set mobile to criminal when they are in the same party.
08-30-2023 Kevin:
Fixed: Client character no longer stutters while moving the character and changing the 'poison' property.
08-29-2023 Kevin:
Fixed: Corrected implementation of previous OpenConnection race condition fix.
08-28-2023 Kevin:
Fixed: Fixed race condition causing random crashes with OpenConnection.
06-11-2023 Ins:
Added: New Character member .parrychance_mod +-int in thousandth. Additive modificator of the parry_chance from the defender when it has shield equipped.
05-24-2023 Kevin:
Fixed: Fixed crash when using mysql_fetch_row with a query that does not return any result (eg. UPDATE).
05-23-2023 Turley / Kevin:
Fixed: Corrected behavior of dropping items with NoDrop: An attempt from a character to move a no-drop item between regular containers (ie, both containers are not "no-drop exception") will now correctly place the item back into the original container (instead of the player's backpack).
05-15-2023 Kevin:
Fixed: Fixed an issue with GetConfigString behavior on large numeric property values.
05-13-2023 Kevin:
Changed: Modified functionality of combat.cfg setting WarmodeInhibitsRegen (backwards-compatible). Instead of a boolean 0/1, it is now an enumeration 0-4: none = 0 (default), both = 1, players only = 2, NPCs only = 3.
04-04-2023 Turley:
Fixed: Crash when EventQueue is full due to SpeechEvents
04-23-2023 Kevin:
Added: PackJSON() now accepts an option for `prettify`. If true, the output string will be indented with new lines.
03-19-2023 Kevin:
Added: OpenConnection() now accepts an option for ignore_line_breaks. If set to 1, the connection script will receive events for all incoming socket data and not be restricted to data ending in line breaks, with CRLFs included in the event's value. The connection's transmit method will also not append a CRLF to the message.
02-28-2023 Kevin:
Fixed: MultiRef.items now correctly includes items on the exterior stairs of custom houses.
02-27-2023 Kevin:
Fixed: DestroyItem(item) will now throw an error if item is a multi.
02-06-2023 Kevin:
Added: HTTPRequest() now accepts a flags parameter. If HTTPREQUEST_EXTENDED_RESPONSE is passed as flags, returns a Dictionary with members: 'status', the numeric HTTP status code; 'statusText', the reason phrase; 'headers', a Dictionary of key-values for each header; 'body', the response text body.
Added: http::WriteStatus(code, reason := "") to change the status of an HTTP response from the web server. If no reason is provided, one will be calculated from the code (if possible). This can only used once before WriteHeader(), WriteHtml(), and WriteHtmlRaw().
Added: http::WriteHeader(name, value) to write a header to an HTTP response from the web server. This function can be used to change the response's Content-Type from the default "text/html". This can only be used before WriteHtml() and WriteHtmlRaw().
02-05-2023 Kevin:
Fixed: Creating an item via item descriptor whose SaveOnExit property has been set to 0 will now properly not save the item during a world save.
01-11-2023 Turley:
Fixed: Placing items into a container failed since nightly of 01-05-2023
01-02-2023 Kevin:
Added: Target() option TGTOPT_ALLOW_NONLOCAL to allow targeting items owned by other characters (eg. in a snooped backpack).
Added: Member item.character_owner, returns the Character that owns the item, ie. the character whose backpack or equipped items contains the item.
Fixed: SnoopScript is properly persisted across saves when changed via item member item.snoopscript.
01-02-2023 Kevin:
Fixed: Custom Boat method scripts now properly execute.
12-19-2022 Kevin:
Added: SnoopScript to itemdesc.cfg Item descriptors which runs when a character double-clicks an item that is owned by a different character, eg. another character's backpack or an item within that backpack. This can be used to implement the Snooping skill.
12-17-2022 Turley:
Fixed: potential crash in client login phase
12-13-2022 Kevin:
Added: CreateItemInBackpack, CreateItemInContainer, and CreateItemInInventory now have an x and y optional parameter to specify location in container gump of where to create the item.
10-24-2022 Crowen(che666):
Fixed: uo.em Broadcast and unicode.em BroadcastUC renamed requiredcmdLevel parameter to required_cmdlevel to be consistent.
10-15-2022 Turley:
Fixed: crash when calling another method inside of a methodscript
09-27-2022 Brndd:
Added: CreateNPCFromTemplate() now has a "forcelocation" parameter, which allows creating NPCs even in invalid locations.
09-21-2022 Kevin:
Added: POLCore() member "poldir", returning the directory of the POL executable.
08-25-2022 Yukiko:
Added: uoconvert now surfaces the partial hue flag in tiles.cfg for tiles that have that flag set in tiledata,
eg. PartialHue 1
08-21-2022 Turley:
Fixed: PopupMenu request did not work when client canceled a request and sends a new one.
08-14-2022 Turley:
Changed: SendPopUpMenu supports now the new pkt format added with 6.x client, it will be automatically used if needed.
The new format does not support color, but removes the limitation of valid cliloc numbers.
Fixed: insurance reset performed after death didnt increase the revision.
07-01-2022 Kevin:
Added: Boolean property `item.cursed` and corresponding itemdesc.cfg `Cursed` property. There is no special core handling of cursed items, eg. gold coin objtype 0x0EED that is cursed can still be used for vendor transactions.
06-21-2022 Turley:
Changed: OpenXMLFile(file) returns Error if file does not exists, or any parsing error occurs.
Before it returned XMLRef in an error state, so 'if (!xml)' was and is a way to check for success.
06-16-2022 Kevin:
Fixed: Corrected objref documentation on Character.acct, Character.acctname, and Client.acctname.
Added: client.acct member to return Account object
Fixed: Accessing properties on a Client that do not exist no longer results in a shard crash.
04-29-2022 Kevin:
Fixed: `SendOverallSeason` now checks that connected clients have a character.
04-12-2022 Kevin:
Added: Boolean property `client.disable_inactivity_timeout`.
If true, the client will not be disconnected due to inactivity.
11-08-2021 Brndd:
Fixed: Outgoing packets with text field now correctly encode the text as CP-1252.
11-02-2021 Brndd:
Changed: SetString packet hook method will now write CP-1252 (extended ASCII) encoded text. This is what is used for the majority of packet fields that are not UTF-16.
Added: Added a new SetUtf8String packet hook method which will write UTF-8 encoded text.
09-11-2021 Kevin:
Fixed: party.AddMember(character) will no longer error if the character is a candidate of the party.
Changed: party.AddMember(character) will now error if passed an NPC.
08-30-2021 Nando:
Fixed: Possible infinite recursion of the attack hook if a character was moved by the attack hook
08-14-2021 Kevin:
Fixed: The remaining drop errors (too far away; location blocked) can now be disabled via the ShowWarningItem option.
08-11-2021 Kevin:
Fixed: User Functions that conflict with the same name as Module Functions will now result in a compilation error.
08-03-2021 Turley:
Fixed: loading of npcdesc AttackCProp and ShieldCProp
Fixed: loading of itemdesc NoDrop and NoDropException
Changed: either AttackSpeed or AttackDelay npcdesc entry need to exist for npc weapon creation.
Before only AttackSpeed lead to an creation.
07-22-2021 Turley:
Fixed: Fixed crash when too many items exists an a boat.
07-21-2021 Kevin:
Fixed: Fixed bug where a target couldn't be cancelled in some clients.
06-21-2021 Turley:
Fixed: HSA boat movement packets (0xF7 and 0xF6) overflow logic. It sends now the correct truncated object count and checks visibility of the objects it sends.
04-10-2021 AsYlum:
Fixed: Duplicated internal value for "speedhack" and "losany" privileges. When enabling "speedhack" privilege it also worked as "losany"
so LoS checks always returned true.
03-24-2021 Turley:
Added: os:OpenConnection argument keep_connection
defaults to 0, if set to 1 the connection is kept active on read timeout.
By default (old behaviour) the connection is closed when for 5 seconds no pkt was received (old behaviour).
03-14-2021 Kevin:
Added: Conditional operator: condition ? exprIfTrue : exprIfFalse
This new syntax allows you to efficiently return the result of one of the two expressions, depending on whether the conditon
expression evaluates to true or false.
03-11-2021 Kevin:
Added: Interpolated string expression: $"..."
This new expression syntax allows you to join multiple components into a string. Within the ..., you may specify zero or more:
- normal strings
- escaped characters, eg. \n
- {expression [: format]}, eg. {who.name} or {who.graphic : #x}
- {{ for a { character, and }} for a } character
A complete example:
$"Hello, {who.name}! You are player #{who in EnumerateOnlineCharacters()} online. Your graphic is {who.graphic : #x}."
... can replace an expression like ...
"Hello " + who.name + "! You are player #" + (who in EnumerateOnlineCharacters()) + " online. Your graphic is " + Hex(who.graphic)
... or ...
"Hello {1}! You are player #{2} online. Your graphic is {3:#x}".format(who.name, who in EnumerateOnlineCharacters(), who.graphic)
Since this change introduces new instructions, you **MUST** recompile all your scripts!
03-07-2021 Nando:
Added: RefreshDecayAfterBoatMoves in servspecopt.cfg. Defaults to true to maintain the old behavior. If this setting is true,
the items on deck will be refreshed after each movement or turn. You might want to disable this to implement item decay
on boats. Note that POL doesn't yet handle item decay on boats.
Fixed: HSA boat movement packets (0xF7 and 0xF6) will no longer overflow when too many items are on deck. Note that the packet
will be truncated and might be misinterpreted by the client or leave ghost items behind.
03-05-2021 Kevin:
Removed: The ability to generate the Escript wordlist via the -W argument to ecompile.exe has been removed. The Escript grammar can be
described by the ANTLR .g4 files in the repository.
03-04-2021 Kevin:
Removed: The old compiler has been removed from ecompile in favor of the ANTLR-driven 2020 compiler. This removes the ecompile.cfg
setting UseCompiler2020 as well as the ecompile.exe switches -g and -G. Any value of UseCompiler2020 in ecompile.cfg will be
ignored without warning.
-- POL100.0.0 --
02-28-2021 Nando:
Note: POL 100.0.0 is now officially released. This release marks the beginning of more frequent, rolling releases.
The next release will remove support for the old compiler. This is the *last chance* to test
if your scripts change when compiled with the new compiler. (See entry on 09-15-2020)
02-27-2021 Nando:
Added: Parameter "evmask" to EnableEvents(ev, range := -1, evmask := EVMASK_ALL).
The allowed values are EVMASK_ONLY_PC, EVMASK_ONLY_NPC, or EVMASK_ALL.
When set, an NPC or Item will only receive entered/leftarea events caused by a PC, NPC or all mobiles (the default behavior).
This parameter is useful, for example, to decrease the load when there are too many NPCs in the same area.
Added: Default mimetypes for .png, .js and .ico in the internal webserver
Added: Allow URLs/filenames with a hyphen (-) in the internal webserver
Fixed: Crash in SendPacket(), packet.SendPacket() and DisconnectClient() when the client was not yet logged in. Mostly affects packet hooks.
02-27-2021 Turley, Kevin:
Added: os::GetEnvironmentVariable(name:="")
Returns String value of given environment variable name. If name is empty, returns Dictionary of all allowed environment variables.
The pol.cfg setting AllowedEnvironmentVariablesAccess controls script access to this function. See documentation for more details.
02-22-2021 Kevin:
Fixed: Various compilation issues when using "\\" in scripts.
Fixed: Passing a string for the skill to CheckSkill() now correctly uses the mobile's skill.
12-17-2020 Turley:
Added: AppendConfigFileElem now checks if the file could be opened, returns an error if this fails.
12-9-2020 Turley:
Added: os::LoadExportedScript(scriptname, args:={})
Load and start program part of given script.
The optional args array will be unpacked and passed as single arguments to the program.
Script will be started non-critical or critical depending on the caller's state.
Blocks until the program part ends.
Returns array{ExportScript, return value} return value is the return value of the program or 1 if nothing was returned.
Added: ExportScript object
the script will remain loaded as long as the object exists.
member: .exported_functions array of exported function names
method .call(functionname, args:={})
Calls and blocks current script a exported function and returns the return value or 1 if no return value was given.
Like LoadExportedScript critical state depends on the caller's script.
Args see LoadExportedScript.
Added: packageref.dir member returns directory path
packageref.desc member returns description "pkg.name (pkg.dir)"
Changed: added optional parameter for syslog "log_verbose" if set to 0 only the text will be logged and printed, not the scriptname.
10-25-2020 Turley:
Changed: updated StrFormatTime to allow all format specifiers see http://www.cppreference.com/stddate/strftime.html for full list.
Removed restriction of 100 characters.
10-20-2020 Syzygy:
Changed: It is now a syntax error to have a string literal that spans multiple lines.
If you have code like this:
var a := "first line
second line";
change it to something like this (adjust padding as needed):
var a := "first line\n"
+ " second line";
10-17-2020 Syzygy:
Changed: Now using semantic versions for core versions.
polcore().version now returns a string like 100.0.0 rather than an integer like 100
09-15-2020 Syzygy:
Changed: Replaced the eScript compiler. (Added the new compiler, which is used by default)
The intent is that the new compiler will compile every script that used to compile,
and will compile to identical instructions in the .ecl files.
There are a few cases where the old compiler (or "OG compiler") and the new compiler differ:
- Functions that are included but not referenced now have to have valid syntax.
- It is now an error for a "case" statement to specify the same value more than once when selecting which block to execute.
- Some operator precedence levels have changed:
- postfix operators: now have highest precedence.
- bit shift, bitwise or, bitwise and: now have the same precedence as multiplication
- bitwise or, bitwise xor: now have the same precedence as addition
- "in": now has higher precedence than the comparison (< <= >= >) operators
- elvis: now has precedence just below addition, and above "in", and above comparison
- As an example, this means "x & 0xFF == y & 0xFF" no longer needs parentheses to mean "(x & 0xff) == (y & 0xFF)"
- All operator precedence levels are here: https://github.com/polserver/polserver/blob/master/lib/EscriptGrammar/EscriptParser.g4#L252
- The ordering of module function declarations (from .em files) and user function definitions:
- the OG compiler orders these in order of use
- the new compiler orders them alphabetically
- On 64-bit windows, the old compiler generates the wrong constant (-1) for hex values with the high bit set.
- Example: const EVENT_PEACEMADE := 0x90000000;
In order to ensure that the behavior of your scripts does not change, please perform the following steps:
- Run "ecompile -f -a -s -l -G" to run both compilers in "comparison mode" against all of your scripts.
- Fix any syntax errors.
- Remove duplicate "case" statement dispatch selector values.
- Add parentheses as needed to account for operator precedence.
- Repeat until both compilers produce the same output.
Here are some examples of changes that I had to make:
- https://github.com/polserver/ModernDistro/pull/28/files
- https://github.com/polserver/ModernDistro/pull/36/files
- https://github.com/polserver/ClassicDistro/pull/6/files
The OG compiler is still available. I'll remove it in a later version. If needed, you can use it by doing either of the following:
- pass "-g-" to ecompile
- set "UseCompiler2020 0" in ecompile.cfg
New ecompile.cfg options:
EmParseTreeCacheSize (default 25): The number of .em files to cache. This value is intended to be high enough to cache every .em file.
IncParseTreeCacheSize (default 50): The number of .inc files to cache. You might see a tiny speed boost by increasing this.
UseCompiler2020 (default 1): Whether or not to use the new compiler.
08-27-2020 Nando:
Changed: If "ShowGumpWarnings" in pol.cfg is disabled, it will also disable warnings about
overflow in the gump responses (B1 packet). Those messages may indicates the use of macro
tools or custom clients.
08-18-2020 Nando:
Added: Parameter "max_cmdlevel" to polsys::ListTextCommands(). Indicates the maximum cmdlevel to include in the list.
08-13-2020 Nando:
Changed: item.hitscript and item.onhitscript now always return the full path to the script (":pkgname:scriptname").
Before, if the item was defined on the same package as the script, only "scriptname" was returned.
POTENTIAL BREAKING CHANGE!
08-09-2020 Turley:
Added: new argument "outdir" for uoconvert tiles/landtiles/multis this allows to define a different directory then the current workdirectory for the produced cfgs
08-04-2020 AsYlum:
Added: polcore().last_character_serial returns last character serial assigned by core
polcore().last_item_serial returns last item serial assigned by core
08-03-2020 Kevin:
Added: Optional parameter exit_code to uo::Shutdown() to change the pol process' exit code.
08-03-2020 Syzygy:
Added: ecompile.cfg "VerbosityLevel" option (setting this is equivalent to ecompile -vN)
08-01-2020 Turley:
Added: attribute.em CheckSkill() accepts now also the attribute name instead of the skill id.
07-31-2020 Nando:
Fixed: Quality of any item can now be directly assigned from an ItemDescriptor. Before this only worked for Equipment (Armor & Weapons).
Fixed: Stackable items with different values of 'quality' will no longer stack.
07-28-2020 Kevin:
Fixed: Multiple scripts should not be allowed to call uo::SendTextEntryGump on the same character.
07-16-2020 DevGIB:
Added: SwingSpeedIncrease(swing_speed_increase) and SwingSpeedIncreaseMod(swing_speed_increase_mod) to Mobiles and Items allowing people to have a dynamic modifier to the calculated swing speed.
Swing Speed Increase is used as a % modifier to the calculated speed of a weapon, e.g. Weapon speed of 30 * swing speed increase of 100% would make the swing speed 60.
06-14-2020 Syzygy:
Fixed: A compiler optimization bug that could corrupt emitted instructions
if branches of an if statement were optimized out.
06-10-2020 Syzygy:
Changed: It is now a compile error if a script requires a terminator (semicolon, etc)
at its end-of-file. This fixes bug009 in the escript test suite.
05-07-2020 Syzygy:
Changed: Removed the "declare" keyword, which used to forward-declare functions.
It's unlikely that anything still uses this keyword after 17 years, but if
any of your scripts still forward-declare functions this way,
just delete the line.
04-28-2020 Syzygy:
Added: Elvis operator: short-circuit binary operator EXPR_LHS ?: EXPR_RHS
This operator evaluates the left-hand-side operand and keeps its value if it is a true value.
Otherwise, evaluates the right-hand side operand and uses its value instead.
This is a short-circuit operator: if EXPR_LHS is true, the code for EXPR_RHS won't be executed.
These can also be changed: A ?: B ?: C ?: D evaluates to the first true value from left to right.
It has lower precedence than the binary additive operators (+ -), and higher precedence than the binary comparison operators (> >= < <=).
These are equivalent with or without parenthesis:
a ?: b + c a ?: ( b + c ) // lower precedence than addition
a ?: b <= c (a ?: b) <= c // higher precedence than comparison
See also https://en.wikipedia.org/wiki/Elvis_operator
For example, you could change this:
var difficulty;
if(targetsquare.objtype)
difficulty := GetHarvestDifficulty("fish", targetsquare.x, targetsquare.y, targetsquare.objtype, who.realm);
else
difficulty := GetHarvestDifficulty("fish", targetsquare.x, targetsquare.y, locinfo.landtile, who.realm);
endif
to this:
var difficulty := GetHarvestDifficulty("fish",
targetsquare.x, targetsquare.y,
targetsquare.objtype ?: locinfo.landtile,
who.realm);
04-18-2020 DevGIB:
Added: ShowWarningCursorSequence to pol.cfg to silence "cursor out of sequence" errors.
03-19-2020 Kevin:
Added: New Server Specific Option (servspecopt.cfg) EnableWorldMapPackets. If enabled, the server will respond to client
requests for guild and party member locations. This option is disabled by default.
02-05-2020 Kevin:
Added: New SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT will keep attached scripts (eg. skill scripts, item use scripts) alive if the
character's client disconnects. Note that by default all references to the character will become invalidated; for example,
GetObjProperty(chr, "prop") will return an error. Enable SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES to bypass this.
Fixed: Scripts that have Set_Script_Option(SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES) can correctly access offline mobiles.
01-20-2020 Kevin:
Fixed: Huge Performance loss in Lower/Upper String functions.
01-18-2020 DevGIB:
Changed: Return type of XMLFile method .appendxmlnode() now returns the created node on success.
Changed: Return type of XMLNode method .appendxmlnode() now returns the created node on success.
Changed: Return type of XMLNode methods .setxmlattribute() and .removexmlattribute() now returns parent node on success.
01-12-2020 Kevin:
Changed: On Windows, the pol.cfg setting UoDataFileRoot will now default to the directory of the Ultima Online installation found in
the Windows Registry. This setting MUST be set for servers that do not have Ultima Online installed through the operating
system, and MAY be set to use custom a client data files directory.
01-04-2020 Turley:
Fixed: Tabulator and newline chars where disallowed in CChr and the sanitize step of strings. (introduced with unicode support)
01-03-2020 DevGIB:
Changed: POTENTIAL BREAKING CHANGE! Updated AddAmount() function to return the item reference on success instead of 1.
You'll need to check your scripts for AddAmount and make sure its not evaluated against 1 for success.
12-29-2019 Kevin:
Added: Added definitions for packets 0xFA (Open UO Store) and 0xFB (Update View Public House Contents).
12-28-2019 Turley:
Changed: house.house_parts member returns now when in edit mode the current (possible not yet confirmed)
list of parts instead of an error.
Changed: misc/customhousecommit.src no more has a third parameter elements.
Before this parameter was the only option to get the current working list,
but since the client is able to modify the house further especially when the script shows a confirm dialog the given list is outdated.
Its highly recommended in case of an confirm dialog to calculate the price again after gump confirmation!
Changed: syshook CloseCustomHouse now gets also called when client disconnects
Fixed: Several other bugs with custom houses
Thx Pumpkins!
12-28-2019 DevGIB:
Fixed: CustomHouses when no backup existed the foundation vanished on pressing revert.
12-12-2019 Turley: