/
core-changes.txt
7580 lines (6552 loc) · 404 KB
/
core-changes.txt
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.1.0 --
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:
Fixed: Poison/invul status for newer clients, when mobile didnt move
10-05-2019 Turley:
Changed: ECompile reports warnings and errors to cerr instead of printing everything to cout.
Exit code of ECompile is 1 when at least one file fails to compile.
Added: ecompile.cfg ErrorOnFileCaseMissmatch (default 0)
commandline flag -c
Leads to a compilation error if the capitalization of the include directive does not match the filename.
This has only a meaning on windows.
The existing warning is now an official warning meaning that the error on warning flag leads also to an abort.
Added: pre/post increment/decrement unary operator (++i, i++, --i, i--) for integer and doubles.
++i is the same as writing i+=1 or i:=i+1
i++ returns the old value, thus its equal to j:=i; i+=1;
Since it is an unary operator it can be directly used as function parameter or eg while loops.
Instead of writing
while (i<5)
i+=1;
...
you can directly write
while (++i<5)
...
Note: The operators are only implemented for numbers but this includes also eg. arrays or members when it represents a number. So ++a[1], ++who.fire_resist_mod are also valid.
Performance wise is i:=i+1 the slowest then i+=1 then i++ then ++i. (i++ is slower since it returns the old value).
10-03-2019 Turley:
Fixed: min/max damage visualization in the statbar are now cropped between 0 and 65k like damage calculation.
09-30-2019 Nando:
Changed: Changed default of GetProcess(pid) from 0 to -1 due to compatibility issues with scripts using CInt()'s result directly.
PIDs are now enforced to never represent negative numbers. Please update your os.em and recompile your scripts.
09-26-2019 DevGIB:
Added: Script objects now have package member which returns a PackageRef. e.g. script.package.name = "GuildStone".
09-21-2019 Turley:
Changed: The core is now Unicode aware!
A normal String object can hold unicode.
Files can now be stored in utf8 with or without BOM.
For backward compatibility if invalid unicode is detected while compiling/file reading ISO8859 will be assumed.
CAsc and CAscZ are normally no more needed, most incompatible changes are due to the fact that the old unicode array used for uctext is now replaced by an normal string object.
Changed: The following incompatible changes where made:
party.cfg
OnPublicChat second parameter is now a string object
OnPrivateChat third parameter is now a string object
ChangePublicChat second parameter is now a string object
ChangePrivateChat third parameter is now a string object
unicode.em
RequestInputUC return value no more contains member uc_text
CharRef.clientinfo struct return value member video_description and langcode is now a string
PacketObj.getunicodestring()/getunicodestringflipped() return a string
TextCmd arguments are now (CharRef, String, [langcode=String])
SpeechEvent no more contains uc_text member
scripts/misc/charprofile.ecl fourth parameter is a string
Changed: all places which currently accept an UnicodeArray can now also receive a String (UnicodeArray just for backward compatibility)
cliloc.em SendSysMessageCL, PrintTextAboveCL, PrintTextAbovePrivateCL
npc.em SayUC
party.em SendPartyMsg, SendPrivatePartyMsg
unicode.em BroadcastUC, PrintTextAbovePrivateUC, PrintTextAboveUC, RequestInputUC, SendSysMessageUC
uo.em SendCharProfile
PacketObj.setunicodestring()/setunicodestringflipped()
CharRef.addbuff()
Note: Item/Mobile names need still to be in ASCII format.
Note: In the case of an unicode string as parameter for the following functions the unicode replacement will be automatically used, with ENU as langcode:
Broadcast -> BroadcastUC
PrintTextAbovePrivate -> PrintTextAbovePrivateUC
PrintTextAbove -> PrintTextAboveUC
RequestInput -> RequestInputUC
Say -> SayUC
SendSysMessage -> SendSysMessageUC
08-26-2019 Nando:
Changed: Improved how the debug, www and aux servers handle connections. They should be faster and more stable now. Minor issues fixed.
08-21-2019 DevGIB:
Fixed: Missing default on GetProcess( pid ), this is now GetProcess( pid:= 0 ) to align with docs and functionallity. Please update your os.em file and recompile.
07-12-2019 DevGIB:
Fixed: Initalization error with the new AOS props causing items with no props set to inject random numbers on server boot.
Changed: Fixed issue with moving a character to a shadow realm within the same screen, the core would not correctly send mobile serials to the characters client on relocation and you would still see inaccessible characters in the shadow realm.
Changed: Fixed some incorrect dates on the change log.
06-18-2019 DevGIB:
Changed: Fixed SendQuestArrow() function to use arrow id's rather than an actual object reference. This allows for multiple arrows to be sent to the client and cancelled individually by storing them in a cprop to be recalled later.
When sending SendQuestArrow() the function will return the arrows id for further processing.
06-17-2019 DevGIB:
Changed: Fixed default for OS::Start_Skill_Script on script_name attribute to be string like required.
06-17-2019 DevGIB:
Added: Support for LowerReagentCost, SpellDamageIncrease, FasterCasting, FasterCastRecovery, DefenceIncrease, DefenceIncreaseCap, LowerManaCost, Hitchance,
Luck, FireResistCap, ColdResistCap, EnergyResistCap, PhysicalResistCap, and PoisonResistCap and their subsequent mods to UObject as dynaprops.
Changed: Elevated Luck to UObject and added related LuckMod.
Added: Support for new prop changes to the status bar packet.
Added: Resistances will now be limited to caps by core, unless caps aren't set or are 0.
Added: CoreIgnoresDefenceCaps to servspecopt.cfg which defaults to 0. If set to 1 core will not calculate resistances and defence increase limits set on the mobile.
04-26-2019 Nando:
Changed: Improved connection handling. Linux won't be limited to 1024 clients anymore, recent Windows shouldn't be affected besides some slight performance gain.
Note: POL now requires at least Windows Vista / Server 2008. Let us know if Windows XP was important to you.
Removed: pol.cfg option "ListenPort". It was deprecated since 2012 (and likely didn't work). You should use a Listener in uoclient.cfg.
Removed: pol.cfg option "Multithread". It was deprecated since 2016 and unstable. Also removed the method OS::System_RPM(), which was only useful for singlethreaded POL.
04-26-2019 Turley:
Added: pol.cfg setting "LoginServerTimeout". Defines a timeout for new connections to the loginserver.
Defaults to 10 minutes, should give enough time to select a character.
03-19-2019 Kevin:
Changed: attributes::GetAttribute now accepts an optional parameter to specify the precision of the attribute
value returned. Use ATTRIBUTE_PRECISION_NORMAL (default) to use the existing precision, or
ATTRIBUTE_PRECISION_TENTHS to get the value in tenths.
Since this is a change to the module function's number of arguments, you MUST recompile your scripts.
03-08-2019 Yukiko:
Changed: pol.cfg settings HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem.
This positive logic is consistent with all other console output settings.
Default setting is one (1). The output be displayed by default. Set to zero (0) to suppress.
02-18-2019 Skinny:
Added: pol.cfg HideWarningGump and HideWarningItem.
Many players macros generate warnings messages on the console, causing flooding, especially if you have lots of players online.
You can enable setting HideWarningGump=1 and HideWarningItem=1 in the pol.cfg. Default value is 0.
02-02-2019 Yukiko:
Added: uoconvert.exe will now surface the AnimID for equippables to tiles.cfg. This can be used to look-up the gump pic for wearables that are displayed on the paper doll. Add this number to 50000 for male gumpart or 60000 for female gump art. The resulting number will be the gump art that is displayed in the paper doll.
01-21-2019 Nando:
Changed: account.split() will now return an AccountRef to the new account instead of "true".
01-17-2019 Kevin:
Fixed: Vendor purchases could overflow
01-01-2019 Turley:
Changed: DepletedFunction hook now receives a second parameter: reason
The values are:
0: Regenerate, 1: Damage, 2: Movement, 3: Death, 4: Resurrect, 5: Script
12-30-2018 Turley:
Added: vitals.cfg optional entry DepletedFunction
gets called once the vital reaches 0.
Given Argument is character reference
Like the other entries the syntax is ScriptName:ExportedFunctionName
12-21-2018 Turley:
Fixed: CPU usage of UseSingleThreadLogin
11-27-2018 Nando:
Added: Top-level items can now receive ENTEREDAREA and LEFTAREA events.
11-25-2018 Yukiko:
Changed: The order of a couple of functions listed in uo.em. They were out of alphabetical order.
Added: To uo.em ListItemsInBoxOfObjType( objtype, x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM)
The function returns an array of all items in the bounds of the coordinates matching the ObjType specified.
Added: To uo.em ListObjectsInBoxOfClass( POL_Class, x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM)
The function returns an array of all items in the bounds of the coordinates matching the POL_Class specified.
10-22-2018 Turley:
Fixed: Undefined behaviour after ~20 days due to overflow in time measurment. This fixes both internal time measurments e.g. for repeating tasks, swing,.. and for the EScript function ReadMilliSecondClock() see below.
Changed: ReadMillisecondClock() returns now a double instead of an integer to allow higher uptimes.
10-13-2018 Turley:
Added: syshook.cfg SystemMethod for defining object class method scripts.
Like itemdesc method scripts overriding builtin methods is possible, the builtin method can be called when prefixing with _.
For UObject classes like shown in the objref docs the inheritance is respected
so methods defined for items will be usable in weapons and methods defined in equipment override uobject methods.
Valid cfg keys are:
uobject, item, equipment, lockable, map, multi, armor, weapon, door, container, boat,
house, spellbook, corpse, npc, character, client, account, party, guild
Itemdesc/Npctemplate specific method scripts will still be first checked.
Note: uoclient.cfg MethodScript entry is deprecated
10-12-2018 DevGIB:
Changed: Added -1 as acceptable return from ConsumeAmmunition hook which will make the core continue with the normal ammunition checks.
10-07-2018 Turley:
Added: array.sorted_insert(obj, sub_index:=0, reverse:=0)
assumes an already sorted array and inserts given obj. sub_index and reverse parameter have to match the sorting criteria of the array.
10-06-2018 DevGIB:
Added: ConsumeAmmunition syshook to hook the cores check for ammunition consumption during combat. Hook should return 1 if combat is to go ahead and 0 if the weapon should not fire.
09-07-2018 DevGIB:
Changed: FindObjtypeInContainer(container, objtype, flags :=0 ) to recurse all containers from base container.
Added: Constants FINDOBJTYPE_RECURSIVE, FINDOBJTYPE_IGNORE_LOCKED and FINDOBJTYPE_ROOT_ONLY to UO.EM
Added: Flags to FindObjtypeInContainer() for only accessing root container, and bypassing locked container checks.
Note: THESE CHANGES TO FindObjtypeInContainer() WILL EFFECTIVELY CHANGE THE DEFAULT FUNCTIONALITY OF THE FUNCTION AS DEFAULT IS NOW TO RECURSE SUB CONTAINERS.
Added: Additional documentation to the Racalac escript guide to include additional information supplied by Yukiko.
07-27-2018 DevGIB:
Added: ListStaticsNearLocationOfType( x, y, z, range, objtype, flags := 0, realm := _DEFAULT_REALM ) to get a struct of statics near a location which match an objtype.
Added: ListStaticsNearLocationWithFlag( x, y, z, range, flags, realm := _DEFAULT_REALM ) to get a struct of statics near a location which have matching flags in the tiledata.
07-29-2018 Turley:
Added: ecompile.cfg NumberOfThreads
forces N number of threads to be used for compilation, default is 0 which like before autodetects the number.
cmd param -T can now be optionally extended with a number to override the cfg setting
07-19-2018 DevGIB:
Added: EncodeBase64(String) and DecodeBase64(String) to basic.em to enable people to encode and decode strings using base64 without requiring an escript function.
04-02-2018 Bodom:
Removed: polcore().compiledate and polcore().compiletime
Added: polcore().compiledatetime
03-19-2018 Nando:
Fixed: Crash at shutdown when POL hasn't been correctly started.
02-26-2018 Nando:
Added: uoconvert now supports UOP files and will use them by default. If there is no
map[N]LegacyMUL.uop in the UODataFileRoot, uoconvert will fall back to the
old map[N].mul files. You can force uoconvert to convert from the old MULs by using
readuop=0.
02-10-2018 Nando:
Changed: POL099 is officially released after almost 10 years. Starting the work on POL100.
-- POL099.1 --
02-11-2018 Nando:
Added: range parameter to Accessible(chr, item, range := ACCESSIBLE_DEFAULT).
Valid values: range >= 0, range == ACCESSIBLE_DEFAULT or range == ACCESSIBLE_IGNOREDISTANCE.
The default range will be defined as the servspecopt entry "DefaultAccessibleRange". If that
entry doesn't exist, the "DefaultDoubleclickRange" will be used instead (which defaults to 2).
Fixed: Accessible(chr, item) now checks for the distance to the item. Differently from the distance
of 2 tiles the docs stated, the allowed distance before was about 18 tiles. To recover the old behavior,
use ACCESSIBLE_IGNOREDISTANCE as range.
-- POL099 --
02-06-2018 Turley:
Fixed: fileaccess.cfg: Not specifying Directory entry behaves like before and gives access to all directories. (broken since 01-05-2018)
02-05-2018 Turley:
Added: Operator @
used to receive a function object, which can later be used to call the underlying function with the same parameters/return value via the method ".call(..)"
Note: This object can only executed in the same script instance where it was created and cannot be saved/loaded from datafiles/cprops.
Note: Use cases:
function genericItemLoop(func)
for item in ...
// complicated checks
func.call(item);
endfor
endfunction
function changecolor(item)
item.color:=6;
endfunction
...
genericItemLoop(@changecolor);
genericItemLoop(@changeY);
// (fast) function table, instead of "if" cascade
var look=dictionary;
look["blubb"]:=@doSomething
look["blah"]:=@doSomethingElse
...
look[mykey].call();
Changed: Version number of ecl files, recompilation needed.
01-07-2018 Kevin:
Added: basic::UnpackJSON(string)
Given a string in JSON format, returns an eScript object representing that JSON value.
Added: basic::PackJSON(expr)
Given an eScript expression (Int, Dbl, String, Array, Struct, Dict), returns a serialization of the object in JSON format.
01-05-2018 Turley:
Added: fileaccess.cfg Directory entry
Can be definied multiple times in package syntax.
::config means config rootfolder, :mypkg:test means subfolder test of mypkg. Has only a meaning if AllowRemote is given. Limits the access to given folder and its subfolders.
Added: New type Boolean
== != ! operators are implemented
use new basic.em function Boolean(1/0) to create such type.
see testsuite/escript/boolean in the sources for detailed scripts of what is possible.
01-04-2018 Kevin:
Added: os::HTTPRequest(url, method := "GET", options := struct{})
Creates an HTTP request, and returns the returned data as a string.
12-23-2017 Turley:
Added: os:PerformanceMeasure(delta_seconds, max_scripts)
Monitors for given number of seconds the instructions of all scripts. Returns:
struct with the following members:
total_number_observed - number of scripts alive in the timespan
total_instructions - sum of all instructions of the observed scripts
scripts - array of structs (max number is given max_scripts param) sorted by instructions amount
each scripts entry has the following members:
name - script name, if attached with name/npctemplate
instructions - number of executed instructions
pid - PID of the script
percent - percent of the total instruction amount
12-20-2017 Turley:
Changed: Doubled the speed of custom method resolution.
10-20-2017 DevGIB:
Changed: Added assume_string flag to OS::OpenConnection() to allow you to force the connection script to run as AUXSVC_ASSUME_STRING script option before the script loads in case of fast responding connections.
10-11-2017 DevGIB:
Changed: Added params to OS::OpenConnection() to allow you to pass parameters to the script that is run for the connection.
09-23-2017 Turley:
Added: array.sort(int sub_index:=0) the optional parameter specifies the index used for sorting in the case of an array of arrays
09-10-2017 Turley:
Added: poltool uncompressgump
unpacks and prints content of a compressed gump
only parameter is a filename, which needs to contain a single 0xDD packetlog
Added: item member no_drop 1/0 r/w (itemdesc NoDrop)
if set no drop of this item is allowed
container/npc member no_drop_exception 1/0 r/w
(itemdesc/npctemplate NoDropException)
if set this container/npc is a valid target even if no_drop is set for the item
08-03-2017 Nando:
Fixed: Shutdown crash when using character method scripts.
07-31-2017 Nando:
Fixed: Interactive commands could cause a crash when used inside a run-to-completion script
(e.g., syshooks, scripts ran via OS::run_script_to_completion() and method scripts). The
interactive commands will now return an error if the script can't be blocked.
(Note: this does not apply to critical scripts, which *can* block).
Affected commands:
UO::Target(), UO::TargetCoordinates(), UO::TargetMultiPlacement(), UO::SelectMenuItem(),
UO::SendDialogGump(), UO::SendGumpMenu(), UO::SendTextEntryGump(), UO::SendInstaResDialog(),
UO::SelectColor(), UO::SendPopupMenu(), UO::RequestInput(), Unicode::RequestInputUC()
07-23-2017 DevGIB:
Added: _DEFAULT_TEXT_REQUIREDCMD := 0 to uo.em which allows to set a minimum cmd level that broadcasts will be sent to.
Changed: Broadcast( text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, requiredcmdlevel := _DEFAULT_TEXT_REQUIREDCMD )
adding requiredcmdlevel argument which allows you to set a minimum cmd level that the broadcast will be sent to.
Changed: No longer require a PID for GetProcess( pid := "" ), not selecting a PID will use the PID of the parent script.
07-17-2017 Kevin:
Fixed: PrintTextAbove*CL() now behaves similarly to PrintTextAbove*() functions, displaying the
object's description instead of "System".
05-28-2017 Turley:
Removed: pol.cfg entry to disable assertions. A crash will anyway happen, thus it makes no sense and only hides the real reason.
05-28-2017 Nando:
Fixed: Crash when using SplitWords() in a script that was compiled with outdated .em files.
05-01-2017 Turley:
Fixed: Item.house property gets now reset on component remove
11-29-2016 Boberski:
Added: Support for TOL (Time of Legends) expantion.
10-23-2016 Nando:
Added: Member character.carrying_capacity (read only)
Returns the current carrying capacity of a character, defined as:
(40 + 3.5*STR + chr.carrying_capacity_mod)*ssopt.carrying_capacity_mod
Note: Characters can go above their carrying_capacity, but they will spend
much more stamina to move according to movecost.cfg. Don't treat this
as max_weight.
08-28-2016 Turley:
Fixed: Calculation of NPC AOS resistance/damage values
Added: Member object.specific_name
returns 1 if a custom name is set. if its still the original (eg itemdesc) returns 0
03-27-2016 Nando:
Added: Option "ThreadStacktracesWhenStuck" to pol.cfg. Useful to debug the core when
no clock movement occurs for more than 30 seconds. Defaults to false.
03-25-2016 Nando:
Fixed: Crashes when receiving very big packets.
03-24-2016 Nando:
Fixed: Crashes after deleting a component (hold, tillerman, plank) of a boat
03-23-2016 Nando:
Fixed: Possible crashes when a script teminates while executing a SQL command.
03-21-2016 Nando:
Fixed: Possible crashes when handling a client's response to menus
created with CreateMenu()
03-02-2016 Nando:
Changed: POL will default to use multithreading (Multithread = 1 in pol.cfg).
Note: Multithread=0 is deprecated and likely buggy. It's possible that it doesn't
even work at the moment. Because every OS should support threading by now,
we see no reason to maintain two separate systems. Singlethread support will
be removed in the next version.
03-02-2016 Nando & Turley:
Fixed: Possible crashes when sending events to npcs whose event queues were full.
02-29-2016 Nando & Turley:
Fixed: Data races when dealing with clients. Some other not-reproducible crashes
should also go away now.
02-15-2016 Nando:
Changed: UO::SendQuestArrow(x := -1, y := -1, target := "")
This function will now work for HSA clients (version > 7.0.9), which
require a larger packet. Target is ignored for older clients, but is
required (and must be a valid Item or Character reference) for HSA
clients.
Added: UO::SingleClick(who, what)
This function will emulate a single-click from the client, sending
the character name, guild and tags or the item description. Note
that the client may display the item description wherever it had
clicked before. "what" can be either a serial, item or character.
01-31-2016 Bodom:
Added: CProp profiler: helps detecting unused CProps.
It can be enabled by using the new pol.cfg option "ProfileCProps".
For better results, should be enabled before startup.
Impacts on performance very slightly, but consumes an average of
300 bytes of extra RAM for every CProp used.
New polsys.em function LogCPropProfile() can be called to dump
the profiling information into cpprofile.log.
01-30-2016 Bodom & Nando:
Fixed: Spoofing prevention on packet 0xD7 (custom housing)
01-22-2016 Bodom:
Fixed: Minor bug in ecompile allowing Double literals in the form "2d4".
These were incorrectly interpreted as "2e4", meaning 20000 and
leading to confusion with dice rolls. The compiler now issues
an error instead.
01-20-2016 Bodom:
Added: New Item.house property, returns a reference to the house if the
item is a component of it (listed in House.components()).
This is the intended replacement for the previously removed CProp
"house_serial": use item.house.serial instead of
GetObjProperty(item, "house_serial").
12-27-2015 Bodom & Nando:
Fixed: Linux crash on shutdown
12-26-2015 Bodom:
Fixed: Bug in String.format()
String tags were not correctly processed.
"{name} you hit level {level}".format(struct{name:="Jane Doe", level:=4})
now correctly formats as "Jane Doe you hit level 4" instead of
"Jane Doe you hit level <invalid index: #2>"
12-18-2015 Bodom:
Added: New eScript escape sequence in strings "\xAA". Allows to specify a
single character by its binary value (\x01 to \xFF). The value must
always be 2 digits long, in hex, case insensitive (eg. \xA is not
valid).
12-05-2015 Bodom:
Added: Buff Bar support
New Character's addBuff(), delBuff() and clearBuffs() methods,
please see docs for details and explanation.
0xDF packets are automatically sent when needed (eg. at relogin).
Buff Bar status is not saved, maybe it will be in future.
11-28-2015 Bodom:
Added: New Client object properties last_packet_at and last_activity_at
11-01-2015 Bodom:
Added: mysql_query() now supports a third "parameters" (array) argument.
It can be used to safely replace "?" placeholders inside the query
with corresponding array entries.
10-27-2015 Bodom:
Added: New pol.cfg option AllowMultiClientsPerAccount (default: false)
When true, allows multiple characters from the same account to be
logged in at the same time
Fixed: Items' CProps were loaded again from itemdesc.cfg at startup when deleted
10-18-2015 Bodom:
Fixed: MoveItemToContainer could stack non-stackable items in some circumstances
10-07-2015 Bodom:
Removed: "house_serial" CProp is no longer set by core for house components
Fixed: Exception when editing a custom house with components outside of the
house
10-06-2015 Bodom:
Fixed: Fixed crash condition (stack overflow) when unequipping last armor
piece weared by an NPC and then receiving an hit.
Changed: Intrinsic armor now takes precedence over equipped armor (is was the
opposite before). Anyway, using both of them could lead to unexpected
behavior so it is not a good pratice.
10-02-2015 Bodom:
Added: Intrinsic Shield support, works just like intrinsic weapons
New extobj.cfg entry "Shield" (defaults to 0x1F022)
New item must be defined in itemdesc.cfg
// Intrinsic Shield template - special pseudo Shield for NPCs
Armor 0x1F022
{
Name intrinsicshield
Graphic 1
MaxHP 1
SaveOnExit 0
}
09-30-2015 Bodom:
Added: MoveItemToContainer parameter add_to_existing_stack can now be 2 for "auto" behavior
The function will try to add the item to an existing stack and just try move the
item inside the container if no stack is found
09-29-2015 Bodom:
Fixed: When a robe is already equipped before resurrect, no longer destroy it to
equip the death robe
Fixed: When HonorUnequipScriptOnDeath is on, item's unequip and unequiptest scripts
were called twice on death and in the wrong order
09-27-2015 Bodom:
Fixed: Armor were not calculated correctly for NPCs wearing equip
Fixed: Allow changing graphic of equipped items again if the new graphic has the same layer
09-25-2015 Bodom:
Added: New uo.em function SendPopUpMenu( to, above, menu ).
Added: On pop-up menu request (single click) "misc/popupmenu.ecl" is called.
Fixed: When using MapDiff, tiles could disappear in some circumstances
09-24-2015 Bodom:
Added: New keyword AttackCProp on npcdesc.cfg allows defining CProps for
intrinsic weapons.
Fixed: Hp/MaxHp updates to nearby clients were still using the real value
instead of the 1000-based ratio when sending the 0xa1 packet.
Fixed: Hp/MaxHp updates were sent twice to the originating character.
09-12-2015 Bodom:
Fixed: Bug in loading POL098 and older data files: boats were rotated leaving
dynamic elements like plank and tillerman on the old position.
09-08-2015 Bodom:
Fixed: Bug in LAN IP address identification (some IPs in 172.16.0.0/12 were skipped)
09-06-2015 Nando:
Added: Data integrity check will test if the item serial is valid (serial >= 0x40000000) when loading items.
Fixed: Items could be created with character serials if the wrong values were saved in data/pol.txt.
Note: Character serials must be in the range 1 to 0x3FFFFFF (inclusive), while item serials must
be between 0x40000000 and 0x7FFFFFFF (inclusive).
09-06-2015 Bodom:
Added: New Item.process property
Returns reference to the controlscript, if any running
Changed: Script.attached_to now returns a reference to the Item when called on a ControlScript
Added: New servspecopt.cfg option DefaultCharacterHeight (1-32)
This will be the default (and never changed so far) height of Characters
and NPCs. Default value is 15. Back in the POL095 days is was 9, so consider
9-15 as your "safe" play range. Anything outside that range could cause weird
movement behavior. Even small changes will have a great impact on LOS
calculations and, more in general, on the combat system.
It is also used to calculate wether a Character can fit under a low
passage (e.g. dungeon stairs).
Keep in mind a Titan and a Slime will have the same height.
09-05-2015 Bodom:
Changed: Process ids (pid) no longer start from 1 but from 0x01000000.
This should have no practical effect.
Added: Allow specifying an arbitrary Gump id in SendDialogGump()
Custom gump ids must be in the range 1-0xFFFFFF. If no gumpid is given,
the old behavior of using the pid will still be used (so that this
does not break backward compatibility).
It is now possible to organize the gumpids in a constants file and have
the same gump to always be sent with the same id. This way the client
will recognize it and, if the player moved it last time, it will
reposition it where the player liked it: this should be a nice
interface improvement.
It is now possible to implement the Virtues gump, since it needs a
pre-defined gumpid of 0x01CD to work.
Changed: CloseGump() now accepts a gumpid instead of a pid. For scripts not
using custom gump ids, its behavior is the same as before.
09-03-2015 Bodom:
Added: Item insurance support, new Item.insured property (0/1)
An insured item behaves on death like a newbie item, except that the insured flag gets reset back
to 0 after every death. If the item for some reason (e.g. when backpack is full) will get dropped
instead, the insured flag will be reset anyway. Insured items are not stackable with normal items
but they can still be sold to vendors.
Hint: this feature can also be used in conjunction with CanDie sys hook to determine via script which
items a player will drop on death; since the CanDie hook is called exactly one moment before death you
can use it to insure the items that you don't want to fall on the corpse.
Added: RepSys NameColor and HighLightColor hooks can now return -1 to let the core run the builtin code.
08-27-2015 Bodom:
Added: New eScript keyword: unused
This keyword can now be added before a variable name in function or program block declarations.
It has no effect on the resulting compiled code, but instructs the compiler not to issue a warning if
the following variable will not be used. The compiler will instead fire a warning if the interested
variable will then be used later in the code. Examples:
program onremovescript( character, container, unused item, unused item_amount, movetype )
// Here the variables item and item_amount are needed in the program declaration but will not be used,
// the unused keyword prevents warnings to be triggered
endprogram
function myfunc( parameter1, unused parameter_for_future_use )
// Same as above: parameter_for_future_use is not used and unused prevents the warning message
endfunction
07-27-2015 Turley:
Added: array.cycle([count])
will move array backwards or forwards in-place as it were a conveyor belt.
{1, 2, 3}.cycle()
Will make it:
{3, 1, 2}
Accepts a negative value as a shift to move different direction
Changed: string.format()
Now actually faster than string concatenation in eScript
Fixes a bug where {:d} formating could cause an arbitrary number shown instead of a real value
tag errors are slightly more intuitive and compact.
Note: Patches submitted by andenixa
02-08-2015 Turley:
Added: PolCore().memory_usage member, returns current process usage in KB
Changed: 0xF1 Freeshard list pkt is now allowed during login state,
thus its possible to create eg a UOGateway pkthook for this pkt
01-31-2015 Turley:
Added: uo::ListMobilesInBox( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM )
like ListObjectsInBox but returns only mobiles.
Changed: uo::List*InBox functions accept as z parameters LIST_IGNORE_Z
Thx @ andenixa
Added: uo::GetMidpointCircleCoords( xcenter, ycenter, radius )
based on given center coordinates and radius returns array of x,y structs which represent a circle
Thx @ andenixa
The array of coordinates is sorted, which means that its easily possible to only use every second point
09-12-2014 Nando:
Fixed: Client crash with clients older than 7.0.9.0 but newer than 7.0.0.0, because of wrong size in
boat movement packets.
07-12-2014 Nando:
Fixed: Items were not disappearing from the character's backpack after being moved to the corpse.
Fixed: Items were disappearing from the corpse when an equippable item was moved/inserted into it.
11-13-2014 Nando:
Added: EnforceMountObjtype property in pol.cfg. Will enforce that only items with the mount
objtype (as defined in extobj.cfg, default 0x1F021) can be mounted.
Fixed: Inconsistency when handling mount objects that would trigger an assertion for equipping
items with the mount objtype but a bad graphic.
Note: To be equipped as a mount, the item must be in the mount tiles list of uoconvert.cfg.
This ensures that the item has layer 25 and the equippable flag, otherwise it won't
be considered equippable.
11-05-2014 Nando:
Added: polsys::Realms() will now report how many offline mobiles and multis there are.
Added: "ShowRealmInfo" option in pol.cfg (default to false). Will report every once in a while
the number of items, mobiles and multis per realm.
Added: uo::ListOfflineMobilesInRealm(realm) method to return the list of offline mobiles in a
specific realm. Useful for moving the offline mobiles out of a shadow realm before
deleting it.
Fixed: Crash bug when deleting shadow realms while an offline mobile or a multi were still in it.
Fixed: Top-level items were not properly counted when moved between realms.
10-29-2014 Nando:
Fixed: Crash bug when deleting item directly from a corpse.
10-19-2014 Turley:
Added: AnimXlate.cfg for newer clients
Added: example animxlate.cfg:
defines which graphics support mount translation
and per graphic type how to translate animation from older clients to newer (7.0.9.0)
see cfg for description of possible entries.
09-23-2014 Nando:
Changed: Corpses will no longer send the full list of contents before being open. Only the equipped
items will be shown. This should decrease slowdowns in areas with many corpses.
09-21-2014 Nando:
Fixed: Corpses will now equip items that are placed on them, even if they don't have an OnInsert script.
Fixed: Possible crash when items having layers larger than 25 were placed/removed from corpses.
06-07-2014 Tomi:
Fixed: using DestroyItem or SubtractAmount on an item 'gotten' it will now first release the item and then destroy it
Fixed: NPCs looks for players for enter/leftarea events when, these were only looking for npcs
- moved with MoveObjectToLocation function
- on every move
- unhide
- npc creation
Fixed: Destroying an equipped item now calls unequip scripts
Fixed: Changing cmdlevel with chr.cmdlevel := or chr.SetCmdLevel() sends updates correctly to see concealed characters
Old Commits:
Changed: pol.cfg MinCmdLevel checked already during the first accountlogin, so now it doesnt let those connections go all the way to char creation anymore.
Fixed: Crash during character creation where equipment realm was not updated and pol crashed when unequipping/equipping.
Fixed: Setting Enter/Left area event listening for npcs on range 32 did never send the left area on distance 33
05-26-2014 Turley:
Added: character.last_textcolor readonly member returns last textcolor of the character. Values are between 2 and 1001. Returns 0 if not yet spoken.
(will not be saved inside of the datafile)
05-06-2014 Tomi:
Added: Realm entry to startlocs.cfg, The earlier MapID still needed for the client to show the map correctly, but realm is needed for the server to put the character during creation in the correct realm, default value "britannia"
04-05-2014 Turley:
Fixed: multi.items returns now all toplevel items inside of the multi
03-15-2014 Turley:
Changed: sql functions connect, select and query perform the communication part in background while script itself
is stopped (like eg Target()). Which means that these time consuming functions do not block the complete shard.
Removed sql module from runecl, since it no more compatible.
03-01-2014 Nando:
Added: Character.temporally_criminal is true when a criminal timer is running on the character.
Note: The old property chr.criminal stays the same: it is true when the character is temporally
criminal or a murderer.
02-27-2014 Tomi:
Fixed: changing cmdlevel now updates correctly which concealed characters you see
Fixed: crashes when parent script is killed before child script returns
Fixed: crashes when reporting error in an armordesc entry defined in config\itemdesc.cfg
02-25-2014 Tomi:
Added: Boat Smooth move for clients which support it ( HSA+ )
Added: boat.em flags ( These flags are ignored for boat movements sent to old than HSA clients )
const BOAT_SPEED_ONE_TILE := 1;
const BOAT_SPEED_SLOW := 2;
const BOAT_SPEED_MEDIUM := 3;
const BOAT_SPEED_FAST := 4;
Changed: boat.em functions
MoveBoat( boat, facing ) to MoveBoat( boat, facing, speed := BOAT_SPEED_ONE_TILE )
MoveBoatRelative( boat, direction ) to MoveBoatRelative( boat, direction, speed := BOAT_SPEED_ONE_TILE )
Note: The same functions are used to move boats for older and never clients, older clients ignore the speed parameter, but the speed paramter is required for smooth move.
The clientversions are checked in core to determine what type of boat movement will be sent
02-01-2014 Tomi:
Fixed: Customhousing exterior stairs delete is now working, commiting does not readd them anymore
Fixed: Customhousing changing floor is now sending a full msg instead of short msg, so no more synch needed after changing floors until you can start working on it
01-20-2014 Nando:
Added: DisableNagle option in pol.cfg to disable Nagle's algorithm, default to 0. In theory, latency should improve if DisableNagle=1.
01-20-2014 Turley:
Fixed: Made the sql module atleast a bit script friendly. Removed the mysql_free_result function since the result objects automatically get destroyed on scope exit.
Passing the sql objects as function parameters is now also possible. mysql_close is now also senseless, but kept it for anyone who wants to directly close the connection.
Boolean check for the connection object performs now a ping and returns false if the connection is lost (eg. timeout)
12-31-2013 Turley:
Added: Print small backtrace on crash/passert failure, should help a bit without the need of the dump.
Works only under Windows 64bit
Changed: optimized world object storage and usage. Should improve eg pkt sends and scales better.
11-03-2013 Tomi:
Fixed: Container Max Weight works now like it did earlier before _mod changes, all values <= 0 sets it as 0xFFFF max weight
10-25-2013 Turley:
Fixed: newbie flagged backpack caused endless loop on death
10-21-2013 Tomi:
Added: polsys::FormatItemDescription( desc, amount := 1, suffix := "" )
This formats the desc using Pols built in Singular/Plular formatter
10-04-2013 Turley:
Fixed: \= operation
10-01-2013 Tomi:
Fixed: Container.locked works again
09-25-2013 Tomi:
Added: character.DisableSkillsFor( duration ) method to disable skills that are started with start_skill_script or by scritps defined in attributes.cfg for duration ( seconds )
This method overrides the default Delay setting in attributes.cfg if used ( for example if on failing a skill you want no delay just set it to 0 )
This can also be used to disable skills for example during an event or pvp
Added: item.name_suffix for adding crafter marks or such
item.desc returns the formatted name and suffix added to it without formatting if it exists
item.name does not include this suffix, so that can be used to get the item name without formatting and without suffix
09-21-2013 Tomi:
Changed: Pol doesnt send "I am frozen" messages anymore when paralyzed, now it sends in all those cases "I am paralyzed" messages
09-20-2013 Tomi:
Fixed: Invul changes now sends the healthbar color correctly for UOKR and later clients
Fixed: All repsys changes now send the update correctly to yourself and all client around you