-
Notifications
You must be signed in to change notification settings - Fork 45
/
Changelog.txt
3810 lines (3218 loc) · 257 KB
/
Changelog.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
Dates are in DD/MM/YYYY format.
---- 0.56d (former eXperimental branch, now simply Sphere-X, forked from 0.56d) --------------------------------------------------------------
---- 11/04/2016
10-04-2016, Coruja
- Changed: Food level won't decrease on GM chars anymore.
- [sphere_msgs.scp]: Removed messages 'npc_text_murd_*'.
- [sphere_speech.scp]: Moved hardcoded speech commands 'I must consider my sins', 'I resign from my guild' and 'I resign from my town' to scripts.
IMPORTANT: It's HIGHLY recommended update this script, or these speech commands will stop working.
18-04-2016, XuN
- Removed TAG.OVERRIDE.MAXWEIGHT and added ModMaxWeight on it's place for Banks and Corpses.
- Fixed stackable items not checking maxweight on corpses.
- Removed all references to MEMORY_WAR_TARG since they are not needed anymore, targets are handled by 'Attacker' now.
- Added back old HitChance formula under CombatDamageEra = 0
- Updated checks on @NotoSend trigger: it will not check anymore if ARGN1 > NOTO_INVUL, so you can create custom notoriety.
19-04-2016, Coruja
- Fixed: Protection spell not working correctly if COMBAT_ELEMENTAL_ENGINE combat flag is disabled.
---- X1 (Milestone 1 opened) ------------------------------------------------------------------------------------
14-05-2016, XuN
- Fixed: Pets not gaining Karma (it can be blocked through @KarmaChange trigger, no reason to stop it from the source).
- Fixed: Killing pets and/or bonded pets not giving karma (same reason as above).
- Fixed: Hits being canceled when going out of range and COMBAT_STAYINRANGE was enabled, it should happen when it is disabled.
- Fixed: Attack delay broken when COMBAT_PREHIT is disabled because of using as SetTimeOut animDelay instead of iSwingDelay.
- Fixed: Weird crash related to a change on CChar:OnTick()
(Not really fixed, just reverted the code because I couldn't track what is exactly causing it and seems to happen when there are ~100 clients
online, so I'm not going to mess a lot with it, it's not cool to use 100 players to do tests :) ).
- Attempt to log and stop a crash related to the CNetworkOutput.
- Fixed: NPC_FightMagery not correctly checking if the NPC can use magic skills and creating some infinite loops under certain circumstances.
15-05-2016, XuN
- Updated Fight_IsActive function with NPC's skills and one Attacker's check.
- Fixed: NPCs not ending combat when their target is far away from them and calling Attacker_Delete() @CombatDelete with argn=2 (Distance) to give control over it.
- Fixed: GUARD ME making pet following you instead of guarding you (Thanks Shamino).
- Fixed: NPCs being dumb before they reach their target.
- Updated a bit CChar::OnTick.
17-05-2016, Nolok
- Fixed: speech color for NPCs on Enhanced Clients being always "yellow". Achieved this by forcing (only for EC) system (0) talkmode instead of say (3).
This workaround works only if the speech packet sent by Sphere is Unicode (instead of ASCII), so you'll need to set SAY_DEF_UNICODE in sphere_msgs.scp to 1.
- Added: SpeechColorOverride property (players only, R/W) to override client speech hue. (CHANGED in 01/11/2018)
This will not affect Words of Power hue, you can use spell triggers for this (WOP hue on Enhanced Client will still be set by the client, regardless of the hue sent by the server).
SpeechColorOverride = 52 (or 0x34), which is the default yellow hue for player speech, disables the override.
Remember: SpeechColor property is read-only for players and R/W for NPCs. For players, it contains the last speech hue sent by the client. For NPCs, its value
will be used to set their speech hue.
- Fixed: SpeechColor not overriding the speech hue for NPCs. SpeechColor = 946 (or 0x382), which is the default gray hue for NPC speech, disables the override.
- Changed: If a hue is not specified, SAY and MSG will use SpeechColor or, if set, SpeechColorOverride.
19-05-2016, Nolok
- Fixed: wrong parsing when an unicode prompt response packet is received.
29-05-2016, Kaylala (Khaos)
(Source)
Gump Enums, New Container Defines, Misc Switches from Prop Attributes to Flags, Added AlterItem Prop.
- Added: uofiles_enums.h - New Gump Enums for several new containers, cards, and other miscellaneous assets.
- Added: CContainer.cpp - definitions for the new Container Gump assets.
- Updated: Tables - Removed Only<Race/Sex> as these are unused.
Split the NoDropTrade back into separate flags as they also have separated CliLocs.
Moved over Balanced, BattleLust, and BloodDrinker as they are now being checked as Item Attributes.
These all are now stored on Items only.
cItemBase_props.tbl had AlterItem added to it.
- Updated: Several old Props that are checked in Can's and Attr.
These got a minor update switching the checks to force any 1 set in individual props to just work with those Can's and Attr's.
- Added: New Attr list from base pack reflecting EA attributes and changes from some props to a more appropriate Attr setting where no values are truly needed.
This should save on some memory consumption.
Note: More needs to be switched over and I am trying to get this and the Base Packs completely up to date and somewhat synchronized with the most efficient methods Xun and I can think of.
30-05-2016, XuN
- Fixed CanUse not inheriting from the higher item (ie: i_boomerang_blah not inheriting CanUse from i_boomerang).
- Fixed Statf_War not clearing in every situation when calling Attacker_Clear().
- Added RecipeAlchemy,RecipleBlacksmith, RecipeBowcraft, RecipeCarpentry, RecipeCartography, RecipeCooking, RecipeInscription,
RecipeTailoring, RecipeTinkering (all of the current SKF_CRAFT skills).
- Changed back Region Flags to dword, they do not need to store higher values yet.
- Added PayGold() method to control payment values with it's own trigger:
ON=@PayGold:
Argn1 = Gold to pay.
Argn2 = Payment type ( 0 = Train, 1 = Buy , 2 = Hire).
src = The NPC receiving the money.
argo(if any) = The stack of gold used to pay (ie: training)
- OWNER is now RW, it can be used to set NPC's owner directly without the need of custom functions.
- Added NEWSUMMON, working as NEWNPC and NEWITEM, eg:
serv.newsummon=c_ogre,15
new.p=<p> // Will summon an ogre for 15 seconds on your position, not giving
the second param will result in default timer according to your magery skill.
29-05-2016, Kaylala (Khaos)
- Updated: Tables - Removed Balanced, BloodDrinker, and BattleLust from BaseBaseDef tables
and CObjBase tables since they were moved. Moved Bane and SplinteringWeapon to CItem tables.
- Added: Attr_SplinteringWeapon to CItem.h.
- Added: SplinteringWeapon, Balanced, and Bane to Item Properties and removed them from Obj
handling. All now use ATTR_*.
- Added: Missing recipes: RecipeMasonry and RecipeGlassblowing. They might not have their
craft skills, but they have recipes and synergy with Carpentry and Alchemy. Separated as
they would on EA for others using a custom system.
30-07-2016, Nolok
- Updated the README.md file with fundamental informations about this fork.
- Fixed: REGIONTYPE section could not accept landtile types with index > 163. Extended this limit to 255.
This also extends the maximum number of pages in a book.
- Fixed: Sphere crashing sometimes just before saying Defmessages: npc_generic_gone_1 and npc_generic_gone_2.
- Changed: The redefinition of a resource will always be notified, even without DEBUGF_SCRIPTS enabled in Sphere.ini.
30-12-2016, Nolok
- Fixed EFFECT duration (bLoop variable) on Enhanced Client. Given the same bLoop or the same packet, Enhanced Client shows the effect for a much shorter amount of time
than Classic Client. To be the EFFECT statements more portable between the two clients, if the client is the EC then bLoop is multiplied by 3.
10-05-2017, Nolok
- Fixed: Resources page not being stored correctly. This solves a bug with books and REGIONTYPEs.
- Fixed: <ACTION> returned the skill defname but its value could only be set via the skill key
(example: <ACTION> returns skill_hiding, but ACTION=skill_hiding didn't activate the skill, you need to use ACTION=hiding).
Solved this dicrepancy making ACTION return the skill key. Compatibility with older scripts is
not broken, since the skill key or defname can be compared regardless to both another key or defname.
-> This fixes also ACTION being stored in saves (via skill defname) but not set at the server startup.
- Changed: ACT and ACTP are now stored in the save files, in order not to break actions performed during the save process
at the server restart.
- Fixed: TAG.MATOVERRIDE containing wrong or no defname.
- Fixed: Server crashed when calling some functions with invalid argument (IsDigit, IsSpace, IsAlpha, IsAlnum).
- Changed: Added/removed some debug and warning messages; updated some other messages and enabled them also in non-debug builds.
-> Consider now the debug build as usable (it's pretty useful for finding bugs in the source or in the scripts).
- Changed: Increased the text capacity of the console on Windows.
12-05-2017, Nolok
- Fixed: PARTY.CREATE wasn't working properly.
13-05-2017, Nolok
- Added: Now BOUNCE calls triggers @DropOn_Self and @ItemDropOn_Self on the char's backpack.
If a RETURN 1 is performed and a new CONT has not been set via scripts on the trigger call, the item is dropped on ground,
otherwise the item is left in the new CONT.
- Fixed: Item drop sound not being played if BOUNCE dropped item on ground.
16-05-2017, Nolok
- Added: Now FACE can also accept the coordinates of the point towards which the char should look.
- Added: Now ACTP behaves like every other point (so you can also extract x, y, z, statics, etc).
- Fixed: RESMAKE returning val and key without a space character to separate them (e.g.: 2Logs).
20-05-2017, Nolok
- Added: Print the stack trace when an ASSERT fails, in order to ease the debug process.
- Changed: Better formatting of the stack trace.
22-05-2017, Nolok
- Fixed: Garbage Collection deleting (and reporting) only a fraction of the unplaced objects. Fixed also incorrect formatting of the "invalid code".
- Added: Now the Garbage Collection report prints the script file name and the line where the object was created.
This only works for objects added in the scripts through the keywords: NEWITEM, NEWNPC, NEWSUMMON, NEWDUPE, DUPE (and ITEM/ITEMNEWBIE since 24/09/2017).
04-07-2017, Nolok
- Fixed: random ranges ( e.g.: {i_dagger 1 i_gold 1} ) sometimes returned a totally random and unexpected value.
If the value was used to create an item, it could either create a random item or not create it at all, without logging any error.
- Fixed: vendors couldn't re-sell the items bought from the players.
- Fixed: with the current User Interface (the blue one, not the orange which is older) of the Enhanced Client, in the buy gump
the paperdoll of the vendor often was missing on the left.
IMPORTANT: with the same UI of the EC the buy gump may not work, because it doesn't show the items in stock.
This occurs with the new UI (blue) and not with the old (orange) because the new one wants the vendor to have
its name inclusive of the title. If the "the" keyword and the following title aren't found, the code of the interface
generates an internal error and halts the execution of the remaining code (which renders the items in the list).
As example: if the vendor name is Greg the items don't show, but if you set the NAME (and not the TITLE property)
to Greg the Butcher ("the" word is mandatory) the items are finally shown.
Since the client retrieves the name with the tooltip data (Cliloc 1042971) the server sends, if you want a workaround
to this requirement, you can leave untouched the NAME property and send a custom name cliloc which contains also the work/trade title:
ADDCLILOC 1042971, <NAME> The <QVAL <ISEMPTY <TITLE>> ? Vendor : <TITLE>>
- Fixed: Tracking skill could not track brain_berserk npcs.
- Changed: updated error and warning messages related to resources redefinition.
04-09-2017, Nolok
- Added: the ID of an item can be overridden after its creation by a random template (which must return a non-container type item).
Remember though that this is inefficient and that the preferred way is to use a { } random range.
20-09-2017, Nolok
- Fixed: very old bug which caused arguments of scripts instructions being silently parsed in the wrong way (if they
contained a {} range) and generating unwanted behaviour. Example: parsing "SOUND {2 3}, 1" resulted in reading 3 arguments
"{2", "3}", "1", instead of 2 "{2 3}" and "1".
- Changed: removed the '-' symbol as a range argument separator.
- Updated: now, when parsing weighted ranges, only the randomly extracted argument will be completely parsed and resolved,
instead of parsing recursively each argument of the range. Maybe, this can reduce the cpu usage on big servers by a little.
21-09-2017, Nolok
- Fixed: getting the name from a name pool sometimes failed.
22-09-2017, Nolok
- Fixed: since adding an item to an NPC triggers @(Item)EquipTest trigger, doing RETURN 1 in @EquipTest or @ItemEquipTest resulted in the object created
but not placed in the world. Now, if the character is an NPC, the item is automatically bounced into the pack even if doing RETURN 1.
- Changed: @EquipTest and @ItemEquipTest triggers are now called only when trying to equip equippable items. Before, they were called also when dropping or
creating an item to be equipped or bounced to the pack of a NPC.
24-09-2017, Nolok
- Fixed: TDATA3 and TDATA4 for t_container were not working.
TDATA3 stores the minimum X of an object placed inside a container as the first 16 bits, while the last 16 bits store the minimum Y.
TDATA4 stores the maximum X and maximum Y in the same way. Example:
TDATA3=((45 << 16) | 65) // MinXY = ((X << 16) | Y)
TDATA4=((100 << 16) | 100) // MaxXY
- Added: the Garbage Collection report prints the script file name and the line where the object was created also for items created with ITEM or ITEMNEWBIE keywords.
- Fixed: Linux console not showing colored text.
- Fixed: Linux version crashing during the shutdown cleanups.
29-09-2017, Nolok
- Fixed: ACTARG1/2/3 values being zeroed or corrupted after the execution of any skill trigger.
Now they are zeroed before the @PreStart trigger (so after @Select) and when we are done with the skill (success, abort, failure).
! As of r2567 (of 05-10-2017) this cleanup isn't done anymore before the @PreStart trigger but only at the end of the skill!
Also ACTDIFF is now set and cleared in the same situations of ACTARGs.
- Fixed: FORCONT, FORCONTID, FORCONTTYPE second argument (the maximum number of subcontainers to be searched in) could only be a plain number, not an expression.
- Fixed: for crafting skills, crafting difficulty didn't increase with the required skill value.
- Added: for skills Enticement, Peacemaking and Provocation, if ACTARG1 is set to the UID of the instrument to play, it will be played the sound of that instrument.
- Added: TAG.BARDING.DIFF is now used to determine the difficulty of Enticement, Peacemaking and Provocation skills. If this tag isn't set, the old behaviour is used.
10-10-2017, Nolok
- Fixed: object created but not placed in the world when trying to make a player equip non-equippable items; now they are bounced to the pack.
This fixes also the items in the NEWBIE section not being added (sometimes, and for some kind of items) at the character creation.
- Fixed: bug occurring when doing REMOVE and RETURN 1 in @(Item)EquipTest trigger fired on an NPC.
- Changed: ACTARG1/2/3 values are now cleared only when we are done with the skill (success, abort, failure).
21-10-2017, Nolok
- Fixed: if the client's LIGHT property was set, the Night Sight flag was ignored when calculating the light level to send to the client.
- Fixed: the client didn't get the new light level nor when the sector's LIGHT property was overridden, neither when the client's LIGHT property was changed.
- Added: warning message if AllowLightOverride ini flag is set to 0 but we are trying to manually set the sector's LIGHT property.
22-10-2017, Nolok
- Fixed: when using the meditation skill, if the SKF_NOSFX flag was set, the bufficon wasn't added.
- Fixed: ACTARG1/2/3 weren't zeroed at skill success, abort or failure if the SKF_SCRIPTED was set.
- [Port from 0.56d, 13-02-2017, Coruja] Changed: Spellbooks now store spell offset / max spells using TDATA3/TDATA4 instead MOREZ/MOREX.
- [Port from 0.56d, 21-04-2017, Coruja] Changed: Mount memories now can have their own i_mt_* ITEMDEFs instead use DEFNAME=i_mt_* directly on base items (usually 'boat parts').
23-10-2017, Drk84
- [Port from 0.56d, 14-02-2017, Coruja] Fixed: Combat Hit Chance formulas incorrectly assuming that defender is always using the same combat skill as the attacker.
24-10-2017, Drk84
- [Port from 0.56d, 19-09-2017, Coruja] Fixed: Client 'Open Spellbook' macro making the client crash if it tries to open the requested spellbook gump when the spellbook item is not loaded yet.
24-10-2017, Nolok
- Fixed: using ADDCIRCLE without the second argument caused sphere to crash. Also, its use on non t_spellbook items was incorrectly allowed.
- Fixed: MODMAXWEIGHT of a new player or item was a random number instead of zero.
- Fixed: corpse MORE2 held an invalid UID instead of the killer's.
- [Port from 0.56d, 15-10-2017, Coruja]
Fixed: MODMAXWEIGHT property not working correctly.
Changed: Updated 'weight' tooltip on containers.
24-10-2017, Drk84
- [Port from 0.56d, 27-09-2016, Coruja] Fixed: Worldsave not saving DAM/ARMOR properties set manually on chars/items already placed on world.
28-10-2017, Drk84
- [Port from 0.56d, 08-05-2016, Coruja] Fixed: Explosion potions not working correctly.
- [Port from 0.56d, 07-02-2017, Coruja] Fixed: Hidden/Invisible chars not getting revealed when being stumbled.
29-10-2017, Nolok
- Added: now the logout console message shows also the character's name.
30-10-2017, Drk84
- [Port from 0.56d, 17-10-2016, Coruja] Fixed: NPCs losing 'statf_spawned' flag after server restart.
- [Port from 0.56d, 30-01-2017, Coruja] Fixed: ML/SA/HS/TOL doors not working correctly.
01-11-2017, Drk84
- [Port from 0.56d, 12-01-2017, Coruja] Fixed: Char death counting kill/fame/karma gain for killers that started the attack but don't have caused any damage yet.
05-11-2017, Drk84
- Added SkillAdjusted commmand, returns the skill value adjusted by the stat bonus.
The stat bonus are BONUS_STR, BONUS_DEX, BONUS_INT and BONUS_STATS and they can be found in sphere_skills.scp
Normally you can see the skill values adjusted by the stats bonues by checking the value of the skill in the Skill Menu when the "Show Real" option is turned OFF,
The adjusted skill value is used by Sphere for calculating the chance of success for NON-combat skills (and also ResistingSpells), in the scripts there was no
"short-way" to display the correct chance of success unless using a lot of multiplication and division.
Usage: SkillAdjusted.skillnumber or SkillAdjusted.skillkey (Example: SkillAdjusted.1 or SkillAdjusted.Anatomy)
Example calculating chance of success by scripts:
ON=@SkillStart
local.skillFlag =<serv.skill.<argn1>.flags>
if !(<local.skillFlag>&SKF_FIGHT)
if <actdiff> >= <skilladjusted.<argn1>>
sysmessage @50 <serv.skill.<argn1>.name>: <fval randbell(<eval (<skilladjusted.<argn1>>) - <actdiff>>,100)>%
else
sysmessage @50 <serv.skill.<argn1>.name>: <fval 1000 - randbell(<eval (<skilladjusted.<argn1>>) - <actdiff>>,100)>%
endif
endif
06-11-2017, Nolok
- Changed: renamed CLIENTISSA command to CLIENTISENHANCED.
- Fixed: BADSPAWNS not working.
- Fixed: using SKILLCHECK, SEX, ANIM, MAKEITEM without proper arguments could not work or even crash the server.
07-11-2017, Nolok
- Fixed: beard not added at the character creation with the 2D client.
- Fixed: character creation on the Enhanced Client didn't add the face or the gargoyle horns.
08-11-2017, Drk84
- Fixed: wrong sound played when a human male character get hit.
- Fixed: monsters and animal sometimes executing the wrong animation when attacking.
09-11-2017, Nolok
- Fixed: RAND(x) not returning a value between 0 and x - 1 (instead it returned a value between 0 and x).
09-11-2017, Drk84
- [Port from 0.56d, 12-03-2017, Coruja] Added: Basic internal packet filters that will make Sphere avoid crash or consume excessive resources when under DDoS attack.
10-11-2017, Nolok
- Updated NPC ally groups. Before this commit, they included the creatures up only to the LBR expansion. This affects the NPC hostility
calculations and the Provocation skill.
- Added: override for an hardcoded behaviour of Provocation. If the provoked character is in the same ally group of the targeted character, at the skill @Success
the skill execution was (and still is) aborted. Now on skill @Start trigger ACTARG3 is set to 1 if the characters are in the same ally group, otherwise it's 0.
Then, if you want to always allow the Provocation, put ACTARG3=0 in @Start or @Success.
- [sphere_msgs.scp] Added: PROVOCATION_KIND defmessage to be shown if the Provocation skill is aborted due to provoked and target characters being in the same ally group.
12-11-2017, Nolok
- Fixed: nested random ranges not being parsed correctly.
- Fixed: random ranges ignoring the last element-weight couple.
- Changed: ADD command does not show anymore the console error if the argument is invalid. The sysmessage is still displayed.
05-12-2017, Drk84
- [Port from 0.56d, 05-09-2016, Coruja] Fixed: TimerCall setting on sphere.ini using wrong time format (hours instead minutes) to call f_onserver_timer function
13-12-2017, Drk84
- Possible fix for stat cap issue when the sum of the players stats are at StatCap -1.
23-12-2017, Nolok
- Added: trigger @NPCActWander. It is called each step an NPC does while wandering. ARGN1 = 0 if it will continue to wander, 1 if randomly deciding to stop, 2 if deciding to stop because
after looking around it found something interesting; ARGN2 = 1 if it's returning to home, 0 otherwise.
RETURN 1 stops decisions for this step, so it will not return to home, do another step or stop wandering (again, for this step).
- Updated: NPCs when wandering around now do "look around", doing in fact some AI checks.
This also makes the trigger @NpcLookAtChar fire more times than before.
- Updated: if DEBUGF_ADVANCE_STATS is enabled in the .ini, the gain chance will be shown also on non-debug builds.
29-12-2017, Nolok
- Fixed: wrong sound played when using BARK, shrinking/unshrinking a pet, pet receiving a speech command.
- Fixed: playable characters (men, elves and gargoyles) NPCs should not make random noises when wandering around.
- Added: debug message when trying to retrieve the SOUND property from an NPC whose property wasn't set.
29-12-2017, Drk84
- Fix for the spellchanneling item property.
03-01-2018, Drk84
- (Source) Added missing parenthesis to MulDivLL and MulDiv.
03-01-2018, Nolok
- Fixed: when playing a sound from a character from Samurai Empire and later expansions, it was chosen the wrong sound ID for the given action. This is caused by the different
order of IDs in the sound file after that expansion. Also, updated the script pack (sphere_defs.scp and sphere_monsters.scp) with a lot of new and corrected old sounds.
Still, some sounds are missing.
- Fixed: some rare combat-related crashes.
- Added: SOUNDACT_RAND, SOUNDACT_IDLE, SOUNDACT_NOTICE, SOUNDACT_HIT, SOUNDACT_GETHIT, SOUNDACT_DIE defs to the scripts. They are meant to be used with BARK,
which has always accepted as parameter the sound type (even if the wiki at this day doesn't say so), not the sound ID (use SOUND for this).
- Updated: now when an NPC is looking around it can play different sounds depending on its AI choices.
05-01-2018, Nolok
- Added: SOUNDIDLE, SOUNDNOTICE, SOUNDHIT, SOUNDGETHIT, SOUNDDIE CharDef properties. When a creature emits a sound linked to an action, the sound ID of the corresponding override,
if set, will be used instead of obtaining it from the SOUND property. Set one of these overrides to -1 if you don't want that action-related sound to be played.
14-01-2018, Drk84
- Fixed: The effect value of spells that equips a "memory item" on a character (Bless, Curse and so on) was calculated twice, also causing to ignore the
value of local.effect.
25-01-2018, Nolok & Drk84
- Changed the way ACTARG1/ACTARG2/ACTARG3 are saved, they will be saved only if their value is different from 0 and the character's action is a valid skill or is one
of the action that uses ACTARG1/ACTARG2/ACTARG3 (NPCACT_FLEE, NPCACT_TALK, NPCACT_TALKFOLLOW, NPCACT_RIDDEN).
- Reverted the following changes made in a precedent commit for avoiding conflict with Spellcasting or custom scripts.
Removed the call to Skill_CleanUp method inside the trigger checks in Skill_UseQuick.
Removed the reset of ACTARG1/ACTARG2/ACTARG3 inside the Skill_CleanUp method.
27-01-2018, Nolok & Drk84
- Fixed: crash occurring when an NPC cleared its Attackers.
- Fixed: magic-capable NPCs often did not attack or cast spells when they should instead start to attack.
29-01-2018, Nolok
- Added: ini setting MaxLoopTimes is now controlling also the TIMERF executions. If too many TIMERFs are executed in the current tick, the loop will be aborted and a warning will be issued.
If it value is 0, there will be no limit (still it is suggested to set a value, even very high, because have just a distraction when writing some kind of scripts and you can cause a deadlock).
31-01-2018, Drk84
- Fixed: when a character started to attack, the first swing was started after an incorrect amount of time.
This was done by reverting an old supposed (and broken) fix for a combat exploit, which we couldn't recreate.
31-01-2018, Nolok
- Fixed the multi-threading and async networking system, which was disabled long time ago because of its instability.
- Added ini flags: NetworkThreads (specify how many new network threads do you want), NetworkThreadPriority (priority of the dedicated networking threads),
UseAsyncNetwork (enable/disable asynchronous packet sending).
02-02-2018, Drk84
- [Port from 0.56d, 22-01-2018, Coruja] Fixed: Spells being disturbed even when they have INTERRUPT=0.0 set.
14-02-2018, Nolok
- Fixed: ARGN2 of @Login trigger storing a wrong value.
- Changed: like Source, also this branch now uses 64 bits internal tick count, instead of the old 32 bits.
- Updated SphereCrypt.ini.
- [Port from 0.56d, 20-03-2017, Coruja] Fixed: Message 'World save completed in X seconds' not showing correct timing precision on Linux builds.
- [Port from 0.56d, 01-10-2017, Coruja] Fixed: Lightsource items not updating tooltip after toggle light state.
- [Port from 0.56d, 03-10-2017, Coruja]
Fixed: AutoTooltipResend .ini setting not working on equipped items.
Fixed: Summoned NPCs not showing smoke effect when they got released.
- [Port from 0.56d, 26-12-2017, Coruja] Fixed: 'memory_guard' memories not being removed after its linked item get deleted.
- [Port from 0.56d, 27-01-2018, Coruja] Fixed: Items placed on char backpack not checking char weight limit correctly before get equipped.
- [Port from 0.56d, 30-01-2018, Coruja] Fixed: Items not getting amount stacked when dropped on ground.
16-02-2018, Nolok
- Updated: VisualRange maximum value is now 24 (this maximum value is valid for Classic Clients 7.0.55.27+ and probably all the Enhanced Client versions;
prior client versions support a maximum value of 18).
- Changed: DistanceTalk, DistanceWhisper, DistanceYell ini settings can now have two special values: if -1 it will never be heared, if 0 it will be heared
if the distance from the source to the listener is <= the listener's VisualRange.
- Fixed: multi placement is now checking if there's enough space around the target using the multi size instead of a fixed size area of 18 tiles.
- Fixed: internal CAN checks not working for high value CAN flags.
- Fixed: rare time overflows in internal checks.
17-02-2018, Nolok
- Fixed: items not being dropped on ground and being kept on the dragging layer when dragging an item too heavy and aborting the dragging action.
18-02-2018, Nolok
- Fixed: when an overloaded player drags an equippable item on himself, it returned to its previous location on the ground instead of at the player's feet.
24-02-2018, Drk84
- Fixed: Unhandled [TYPEDEF 40] error when creating a "chair" item, this was caused by the removal of typedef t_chair in the scripts pack.
07-03-2018, Nolok
- Fixed: light sources didn't change their light type according to their MOREZ.
Remember: a light source needs the CAN_I_LIGHT CAN flag and the LightSource Tiledata flag.
- Fixed: characters always had the CAN flag MT_EQUIP, even when it wasn't set in the script.
- Fixed: a lot of buggy internal CAN checks.
- Added: CANMASK item and char property. This property is a bitmask, like the CAN property, and stores the CAN flags to be dynamically switched on or off from the base CAN property.
When retrieving the CAN property, now it is first XORed with CANMASK (the return value will be CAN ^ CANMASK), so in other words:
If a flag set in the CANMASK is also set in CAN, the flag is ignored;
If a flag set in the CANMASK isn't set in CAN, the flag is considered as set.
- Changed: the CAN property now is READ-ONLY and can be set only in the ITEMDEF/CHARDEF sections.
This change ensures that the CAN property of an object will always be synchronized with the current ITEMDEF/CHARDEF.
Retrieving the CAN value (<CAN>) will return the ITEMDEF/CHARDEF CAN modified with the CANMASK.
To retrieve the base CAN value, use <SERV.ITEMDEF(defname).CAN> or <SERV.CHARDEF(defname).CAN>.
08-03-2018, Nolok
- Fixed #28: skills not failing correctly when ACTDIFF was -1. Among the other bugs, this also permitted to spam spells without delay.
11-03-2018, Nolok
- Fixed #30: player couldn't move items in the backpack.
13-03-2018, Nolok
- Fixed: BOUNCE (and commands like MAKEITEM which at some point bounce some items) did not check if the container could actually hold the item, so ignoring
the maximum items count, the maximum weight of its content, the size of the item, etc.
15-03-2018, Nolok
- Fixed: a GM could shoot through impassable items (like walls) with ranged weapons.
- Fixed: couldn't shoot through windows with ranged weapons when the Advanced LOS algorithm was on.
16-03-2018, Nolok
- Fixed: NPCs could move to points they shouldn't be able to reach/walk on.
- Fixed: characters couldn't equip some items.
19-03-2018, Nolok
- Fixed: summoned monsters with BRAIN_BERSERK didn't decrease owner's CurFollower property when killed.
- Fixed: BRAIN_BERSERK monsters hitting more times than normal during combat.
- Fixed: bonded pets losed their pet status and their master after they died.
- Fixed: corpses being always created with the front falling animation, never with the backwards falling one.
20-03-2018, Nolok
- Added: .ADD command accepts as a second parameter the amount of the item to create. Usage: .add i_gold, 500
- Fixed: starting locations of the Enhanced Client's character creation wasn't working.
- [Port from 0.56d, 27-11-2016, Coruja]
Added: Support for items health bar on HS clients >= 7.0.30.0. Added the CAN flag 'can_i_damageable' to enable health bar on items (MORE1L = cur hitpoints / MORE1H = max hitpoints).
- [Port from 0.56d, 30-11-2016, Coruja]
Fixed: Server crash when custom clients connect using invalid client version.
- [Port from 0.56d, 22-12-2016, Coruja]
Fixed: Enhanced clients not able to login on accounts with no created chars.
- [Port from 0.56d, 24-12-2016, Coruja]
Added: Support for character face style on enhanced clients. It works like hairs/beards, just create the item and equip it on character.
[Sphere.ini] Added: new FEATURE_EXTRA_ROLEPLAYFACES feature to enable extra roleplay face styles on character creation
- [Port from 0.56d, 25-12-2016, Coruja]
Removed: Support for CHARLIST function on enhanced clients, they don't have support for this packet anymore, so disabling it will prevent client crash.
- [Port from 0.56d, 17-01-2017, Coruja]
Fixed: Functions SYSMESSAGELOC / SYSMESSAGELOCEX using wrong default color.
- [Port from 0.56d, 16-06-2017]
Added: New item property PICKUPSOUND to override default pickup sound for items (it can be used together with DROPSOUND).
- [Port from 0.56d, 02-01-2018, Coruja]
Fixed: ENHANCEPOTIONS item property only working when FEATURE_AOS_UPDATE_B .ini feature is enabled.
- [Port from 0.56d, 19-02-2018, Coruja]
Fixed: Sphere console not closing correctly when it get closed before load startup files.
Fixed: Multis (houses/boats) not being loaded at proper distance when client is walking.
- [Port from 0.56d, 14-03-2018, Coruja]
Fixed: Server function 'f_onaccount_connect' not being called correctly when AccApp=2 (free/auto account) is set on sphere.ini.
- [Port from 0.56d, 19-03-2018, Coruja]
Fixed: Multi placement making players get stuck when place the multi over his own char.
Fixed: Multi placement being incorrectly blocked by region flags region_flag_underground, region_flag_guarded, region_flag_safe.
23-03-2018, Nolok
- Fixed: ATTACK command didn't set maximum priority to attacking the specified character over the others.
- Added: .ini setting CombatArcheryMovementDelay. If the COMBAT_ARCHERYCANMOVE CombatFlag isn't set, use that value to set the seconds after which a player, after he stopped moving,
can start again a new combat swing with a ranged weapon.
- [Port from 0.56d, 19-04-2016, Coruja] Fixed: Protection spell not working correctly if COMBAT_ELEMENTAL_ENGINE combat flag is disabled.
- [Port from 0.56d, 21-04-2016, Coruja] Added: New guild functions ISALLY/WEALLIANCE/THEYALLIANCE, they work exactly in the same way as ISENEMY/WEWAR/THEYWAR but used to set alliances instead of wars.
- [Port from 0.56d, 29-04-2016, Coruja]
Fixed: Hidden (statf_hidden|statf_invisible) chars not being revealed when others chars walk over him.
Fixed: Vendor buy menu showing wrong char 'gold available' value.
25-03-2018, Nolok
- Added: .ini option flag OF_NoPaperdollTradeTitle. If set, the trade title will not be shown on the paperdoll.
- Fixed #32: GOLD function wasn't working correctly for values > 65535.
- Fixed: some exceptions were sometimes generated when an NPC looked around for the best character to attack.
- Fixed: some noto checks weren't considering the Incognito status of the character.
- Fixed: green noto was sent for party members only if tag.PARTY_CANLOOTME == 1.
- Changed: '?' console command shows better informations.
- [Port from 0.56d, 08-05-2016, Coruja] Fixed: Functions SKILLLOCK/STATLOCK not updating the lock icon on client skills/stats window.
- [Port from 0.56d, 07-06-2016, Coruja]
Added: Missing features on Incognito spell
- It will change char name to a random human/elf/gargoyle male/female name instead of using always Man/Woman.
- It will change char body/hair/beard to a random color temporarily.
28-03-2018, Nolok
- Fixed: combat animation now has the same duration as the combat swing (before, it had a fixed duration of ~ 0.7 s). On the 2D/Classic Clients, the Gargoyle playable character animations still have
a fixed duration, because to show those animations we need to send a new animation packet, which doesn't support a variable duration. On Kingdom Reborn and Enhanced Clients, the animation still has
a fixed duration, because both the old and the new packets generates here a fixed duration animation.
- Fixed #33: CanSeeLOS not parsing correctly the char UID when passed as argument.
- Fixed #36: Poison spell extremely bugged when MAGICF_OSIFORMULAS was enabled.
- Changed: added upper limit (65535) to the .ini setting ItemsMaxAmount.
- Fixed: GOLD, NEWGOLD ignoring the ItemsMaxAmount .ini setting.
- Fixed: duped char not inheriting the brain.
31-03-2018, Drk84
-Fixed: "CRIMINAL 0" not removing the criminal memory item.
01-04-2018, Nolok
- [sphereCrypt.ini]: Added encryption key for Classic Client 7.0.62.x and Enhanced Client 4.0.62.x.
- Changed: added a limit of 25.000.000 to GOLD and NEWGOLD functions, to avoid making sphere hang or crash when using too high values.
- Fixed: the new animation packet wasn't working properly when attacking with a bow or a crossbow.
- Fixed: temporarily animated items, when their timer reached zero, never appeared to return to their original state (even if they actually did) when using some clients.
- Fixed: some items (like lanterns, fruits, crops...) accepted as valid MORE1/2 or TDATA1/2/3/4 only an item ID and generated an error if that was a defname.
- [Port from 0.56d, 02/06/2017, Coruja] Changed: Misc fixes and improvements on training items (Training Dummy, Pickpocket Dip and Archery Butte).
- [Port from 0.56d, 06/06/2017, Coruja]
Fixed: Throwing weapons not working correctly.
Added: Missing animation of throwing weapons returning after throwing them.
- [Port from 0.56d, 16/06/2017, Coruja] Improved Throwing weapons returning animation.
- [Port from 0.56d, 02-01-2018, Coruja] Changed: Improved how ranged weapons handle ammo.
04-04-2018, Nolok
- Fixed: wrong NEWBIE set added at the character creation (gargoyle in place of the human one, if the player was a human).
- Changed: a client now logouts instantly if its account PLEVEL is >= 2, that is, starting from the the Counselor priv.
Before this change, it logged out instantly only if the GM mode was activated, regardless of the plevel.
10-04-2018, Nolok
- Added: SERV.TILEDATA to read directly from the tiledata.mul the item properties.
Use SERV.TILEDATA.TERRAIN(id).property to get a specific property for a given landtile id. Retrievable properties: FLAGS, UNK, INDEX, NAME.
Use SERV.TILEDATA.ITEM(id).property to get a specific property for a given item id. Retrievable properties: FLAGS, UNK5, WEIGHT, LAYER, UNK11, ANIM, UNK19, HEIGHT, NAME.
Probably the most useful usage of these keywords is to retrieve the paperdoll gump id of an item: <SERV.TILEDATA.ITEM(<DISPIDDEC>).ANIM> + offset,
where the offset is 50000 for male gumps and 60000 for female gumps.
- Fixed: .show command sometimes showing a truncated command argument.
14-04-2018, Nolok
- Fixed: MEMORY function was overwriting the old memory flags, instead of adding new ones.
- Fixed: Client sometimes didn't receive an update when a char notoriety flag changed.
- Changed: removed CHARGESCUR and CHARGESMAX item properties, which were only partially supported. Use USESCUR and USESMAX instead.
15-04-2018, Nolok
- Fixed: tooltips sometimes not being updated.
- Fixed: t_crops and t_foliage weren't working correctly.
20-04-2018, Nolok
- Fixed: some functions (like SKILLCHECK, TEXTF and others) didn't parse the arguments correctly.
- Fixed: setting P for an item or a char didn't send an updated position to clients.
28-04-2018, Nolok
- Added: CombatParryingEra ini flag. It controls the parrying behaviour:
01 = pre-SE parrying chance formula (not using the Bushido skill). Mutually exclusive with 02 flag.
02 = SE parrying chance formula (using the Bushido skill). Mutually exclusive with 01 flag.
010 = can parry with a shield
020 = can parry with a one-handed weapon without a shield
040 = can parry with two handed weapons
- Fixed: parrying chance was too high if the Parrying skill was > 100.0.
29-04-2018, Nolok
- Fixed: parrying chance didn't scale correctly with Dexterity.
- [Port from 0.56d, 18-04-2018, Coruja] Changed: Small improvements on tooltip engine (containers weren't resending their tooltip after their weight changed,
and some tooltips weren't updated for items with an expired timer).
30-04-2018, Drk84
- Added behaviour for the Focus skill, the skill is used automatically and only when FEATURE_AOS_UPDATE_B is enabled.
The Focus skill increase, passively, the amount of stamina gained by 1 for each 10% points of skill value and increase by 1 the amount of mana gained for
each 20% points of skill value.
02-05-2018, XuN
(Source)
Added the basics of an ECS: CEntity and CComponent so we can split into modules (components) the core of the current big classes (CObjBase, CItem, CChar).
- CEntity act as a wrapper for CObjBase (at the moment) storing a list of CComponent* inside and redirecting some basic code to all of them (r_Write, r_WriteVal, r_Load, r_LoadVal, r_Verb and r_GetRef) and provides also a GetComponent(COMP_TYPE) for external interaction.
- CComponent acts as a wrapper for each module of code and, as abstract, class requires the above functions to be on them for overriding (these must return true if something was executed on them, so CEntity will stop to try them on other CComponents or false if not so the loop continues). For items these components must be added on CItem::CreateBase, eg:
case IT_SPAWN_CHAMPION:
{
pItem = new CItem(id, pItemDef);
pItem->SubscribeComponent(new CCSpawn(pItem));
pItem->SubscribeComponent(new CCChampion(pItem));
break;
}
Changed CItemSpawn into a CComponent 'CCSpawn'
Changed CItemChampion into a CComponent 'CCChampion'
Changed CCFaction into a CComponent.
(Server)
Fixed NPCs not casting/fighting continuously and going to wander randomly (CChar::NPC_Act_Idle()), also reformatted some files.
Fixed some Spell's related stuff not returning correctly the spell required for NPCs.
(Scripts)
SPAWNS:
-Added Keywords SpawnID, TimeLo, TimeHi and MaxDist, explained below.
-Changed AT* to r_GetRef so it finds out the object on the n position and works over it.
*There were no major changes on Spawns however i'll leave here a brief explanation of how they work along the new keywords and the updated AT* behaviour.
-TYPES = t_spawn_item, t_spawn_char. Each one generates a different type of objects in the game (it may be revised in the future to merge both*, not soon anyway).
-SPAWNID/MORE/MORE1(R/W) = spawn's ID (can be an Item/Template of items(for t_spawn_item) or a Char/Template of chars(for t_spawn_char)).
NOTE:MORE2 works different for each spawn type.
-MORE2/COUNT(R) on t_spawn_char: returns the total spawned characters.
-MORE2/PILE(R/W) on t_spawn_item: Total amount of items that may be generated at once.
-MOREX/TIMELO(R/W) = Minimum spawn time in minutes.
-MOREY/TIMEHI(R/W) = Maximum spawn time in minutes.
-MOREZ/MAXDIST(R/W) = Maximum spawn distance (for both distance away of the spawn (for Items and Chars) when created and max distance to get away from spawn(for NPCs)).
-MOREP(R/W) = the three MOREX,MOREY,MOREZ grouped as one prop (same as TIMELO,TIMEHI,MAXDIST).
-AT*(R/W) = Access the object in the N position and reads/writes/executes the given text, eg: at.0.remove, <at.0.str>...
-AMOUNT(R/W) = Total amount of objects this spawn can have at the same time.
-ADDOBJ(W) = Adds to the spawn an object with the given uid (must be a valid uid).
-DELOBJ(W) = Deletes from the spawn an object with the given uid (must be a valid uid).
-START(W) = Forces the spawn to start spawning.
-STOP(W) = Stops the spawn and removes everything it created.
-RESET(W) = Froces an STOP and then START it again.
Simple explanation:
1) When double clicking on an STOPPED spawn (nothing has yet spawned from it) START is called.
2) One object is generated within a distance of MOREZ/MAXDIST.
-For t_spawn_item the amount of items generated each time is equal to a random value between 1 and PILE.
-for t_spawn_item the maximum distance the NPC can wander away is set equal to MAXDIST
3) The spawn's timer is set to a value (in minutes) between MOREX and MOREY (TIMELO and TIMEHI).
4) 2 and 3 are repeated while COUNT < AMOUNT, when COUNT reachs or surpases (it may happen with custom behaviours added from scripts) AMOUNT only 3 will be repeated (nothing will be spawned but the timer will be set again).
05-05-2018, XuN:
[Port from 0.56d, 20-01-2017, Coruja]
Added: New function MAPWAYPOINT to add/remove waypoints on client radar map (enhanced clients only).
Syntax: MAPWAYPOINT ObjectUID, WaypointType
Waypoint types:
0 = Remove waypoint
1 = Corpse
2 = Party Member
4 = Quest Giver
5 = New Player Quest
6 = Healer
11 = Shrine
12 = Moongate
14 = Green Dot
15 = Green Dot (flashing)
[Port from 0.56d, 02-04-2018, Coruja]
Added: New char trigger @UserUltimaStoreButton, fired when click on 'Ultima Store' button on new clients 7.0.62+
06-05-2018, XuN
Added Damageable Items functionality allowing them to have HP bars, only for items that have CAN_I_DAMAGEABLE flag on CAN or CANMASK properties and for clients 7.0.30+
To modify their HP use HITS and MAXHITS on them
[Sphere.ini]
-Added RegenItemHits to control the update period of those items' hp.
08-05-2018, Drk84
- Fixed #79: Protection spell AR stacking when COMBAT_ELEMENTAL_ENGINE is disabled.
08-05-2018, XuN
House triggers:
-Added @HouseDesignCommitItem for each commited item, with args:
local.id=ID of the item
local.p.x=x location
local.p.y=y location
local.p.z=z location
local.visible=0 or 1 (non-visible items are things like doors and signs)
return false will remove this item from the commit.*
*if not return false a local.MaxZ will check the P.Z value of the item and update it if it's higher than the old one.
-Changed @HouseDesignCommit: added local.MAXZ(Read Only) returning the value of the top placed item.
Added character storage for it's own houses:
- Added AddHouse uid(WO): Adds the given uid to the player's house.
If the player current count of houses is greater than the limit he has, the house will be redeeded.
- Added DelHouse uid(WO): Deletes the given uid from the player's list (Will not delete the house)(-1 clears the whole list).
- Added Houses(RO): Return the houses on the player's list.
- Added GetHousePos uid(RO): Returns the position of the given UID on the houses list (-1 if not found).
- Added MaxHouses(RW) to Accounts and Chars, when created they read this new setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars).
- Added REF to 'HOUSE.x' to access the house in the Nth position, eg: house.3.Redeed, local.house_p=<house.1.p>
Note: Houses generated before this change will not be updated on the player's list, instead the player will still have the memory with color=MEMORY_GUARD (0x100)
linked to the house,since there was no default behaviour other than this and each house script handles it differently, there will be no hardcoded update
to the new system, each house system should be updated according to it's behaviour (ie: removing the memory and setting AddHouse <HouseUID>)
-Added MaxHouses(RW) property for accounts, Default = Serv.MaxHousesAccount.
-Added MaxHouses(RW) property for chars (meant for players), Default = Serv.MaxHousesPlayer.
* Setting MaxHouses = 0 for Players will skip the setting and read it from it's Account.
* Setting MaxHouses = 0 for Players and Accounts will allow to build without limit.
Massive changes on multis (houses for now).
[sphere.ini]:
- Added MaxHousesAccount = Max houses an account can have (default 1).
- Added MaxHousesPlayer = Max houses one player can have (default 1).
- Added AutoHouseKeys = 1 to generate keys for multis on creation, 0 to disable.
Updated [sphere_def.scp]:
[DEFNAME house_types]
house_private=0
house_public=1
house_guild=2
[DEFNAME house_transfer_types]
transfer_nothing = 0 // Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
transfer_lockdowns = 01 // Transfer LockDowns
transfer_addon = 02 // Transfer Addons
transfer_all = 04 // Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.
Updated [sphere_defs_types_hardcoded.scp]
[TYPEDEFS]:
t_multi_addon=201 // AddOns, the deed must have attr_magic to bypass placement checks and allow the addon to be placed inside houses.
New keys added to [MULTIDEF ] (and updated [multis_houses.scp] with them):
-BaseStorage (RW): Base limit of item storage for this multi.
-BaseVendors (RW): Base limit of vendor capacity for this multi.
-LockdownsPercent (RW): Base LockdownsPercent value for this multi.
(Read the House Storage support revisions for more info.)
Added internal storage for Owner, Coowners, Friends, Bans, Locked down items (Lockdowns), Vendors and House Components.
-House Permissions:
// Owner
- Added SetOwner uid(WO): Sets the owner's uid to the new one (will remove the House from previous owner (if any) and delete his keys for this house).
Forces AddHouse <multi_uid> on the Owner
- Added IsOwner uid(RO): Returns 1 if the given uid is the owner.
// Coowners
- Added AddCoowner uid(WO): Adds the given character uid to the coowner list.
- Added DelCoowner uid(WO): Deletes from the coowners list the given uid (-1 to clear the whole list)*.
- Added GetCoownerPos uid(RO): Returns the position of the given UID on the coowners list (-1 if not found).
- Added Coowners(R): Returns the total count of Coowners.
// Friends
- Added AddFriend uid(WO): Adds the given character uid to the friend list.
- Added DelFriend uid(WO): Deletes from the friend list the given uid (-1 to clear the whole list).
- Added GetFriendPos uid(RO): Returns the position of the given UID on the friend list (-1 if not found).
- Added Friends(R): Returns the total count of friends.
// Bans
- Added AddBan uid(W): Adds a char with the given UID to the Ban list.
- Added DelBan uid(W): Deletes from the Ban list the given UID (-1 clears the whole list)*.
- Added GetBanPos uid(R): Returns the position of the given uid on the Bans list (-1 if not found).
- Added Bans(R): Returns the total count of Components.
// Locked down items
- Added LockItem uid: Adds the given UID to the LockDown*
- Added UnlockItem uid: Removes the given UID from the LockDown list (-1 clears the whole list)*.
- Added GetLockedItemPos uid(R): Returns the position of the given UID on the Components list (-1 if not found).
- Added Lockdowns(R): Returns the total count of Lockdowns.
// Vendors
- Added AddVendor uid: Adds the given UID to the Vendors' list.
- Added DelVendor uid: Removes the given UID from the Vendors' list (-1 clears the whole list)*.
- Added GetVendorPos uid(R): Returns the position of the given UID on the Vendors list (-1 if not found).
- Added Vendors(R): Returns the total count of Vendors.
// Components
- Added AddComponent uid(W): Adds a Component with the given UID.
- Added DelComponent uid(W): Deletes from the Components list the given UID (-1 clears the whole list)*.
- Added GetComponentPos uid(R): Returns the position of the given UID on the Components list (-1 if not found).
- Added Components(R): Returns the total count of Components.
- Added GenerateBaseComponents(W): Regenerates the components the house has on the [MULTIDEF ] (this does NOT delete current components nor recode/remove current keys).
- Added DeleteAllComponents(W): Removes all current components.
* Passing as param -1 (or 0FFFFFFF) will clear those lists but nothing more, it won't remove the objects, clear; attrs, props, events, etc; applied, it must be done before clearing the list.
- Added REF to OWNER, COOWNER.x, FRIEND.x, BAN.x, LOCKDOWN.x, VENDOR.x, COMPONENT.x, to access the objects inside and work on them, eg: OWNER.say I'm da Boss!, local.coowner=<coowner.13.uid>, etc
-Keys management:
- Added AutoHouseKeys setting on sphere.ini to set wether the multis should generate keys automatically or not.
- Added AddKey uid(RW),fDupeOnBank:
uid: The uid of the char to give this key to.
fPlaceOnBank: if set to 1 will place the key in the char's bank, otherwise it will be bounced to the backpack.
(When reading it, eg: ref1=<AddKey uid>) returns the UID of the generated key.
- Added RemoveKeys uid(WO): Removes all the keys linked to this house for the character with the given uid.
-Moving Crate support:
- Added MovingCrate(RW):
When setting to a container's UID, if there was any other existing MovingCrate, it's contents will be transfered to new crate.
When the multi is being deleted all linked items will be transfered to the current Moving Crate and the crate to the owner's bank (if any),
a TAG.MULTI_UID with the multi's uid will be set on the crate.
When accessing to the Moving Crate via script a new one will be created if the existing does not exist.
Moving Crates created by the server will have 't_moving_crate' TYPEDEF event applied.
- Added MoveLocksToCrate: Moves all Locked Down items to the Moving Crate (Faster than MoveAllToCrate uid,x,TRANSFER_LOCKDOWNS).
- Added MoveAllToCrate iTransferType(WO):
Moves to the Moving Crate all the items inside the multi that meets the following requirements:
A) Are linked to the multi.
B) Are not multi's components.
If a container's uid is given, the Moving Crate will be transfered to that container.
iTransferType: Type of items being transfered:
TRANSFER_NOTHING = 0x0 // Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
TRANSFER_LOCKDOWNS= 0x1 // Transfer LockDowns, if there's only need of transfering lockdowns use MoveLocksToCrate)
TRANSFER_ADDON = 0x2 // Transfer Addons
TRANSFER_ALL = 0x4 // Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.
AddOns support:
-Added t_multi_addon: Works like current multis&addons but will not count towards the House's limit.
It's just a type definition to alter how these items works inside 'real' multis, but the current items using it (ie: m_fountain_white) will work the same excepting that they won't create keys by default.
- Redeeding
-Houses with search for TAG.DEED_ID to generate the new deed, if not value is set i_deed will be used, i_deed will be set by default on new placed multis.
-Added Redeed(WO) fShowMsg, fMoveToCrate: Redeeds the multi to the OWNER's backpack (if there is no owner, there is no redeed).
fShowMsg: if true shows the Bounce Msg for the deed.
fMoveToCrate: if true places the Moving Crate item in the owner's bank instead of on his backpack.
-Removing a t_multi or t_multi_addon will move all of it's items to the Moving Crate, move it to owner's Bank and Redeed the multi to it's owner's backpack.
-House Storage support:
-BaseStorage(RW): Limit of storage allowed by default = 489 (Max 65535).
-IncreasedStorage(RW): Increased % of storage allowed (Max 65535%).
-MaxStorage(RO): Returns the maximum storage allowed: BaseStorage + ((BaseStorage / IncreasedStorage)/100) (Max 65535).
-CurrentStorage(RO): Returns the current storage used.
-BaseVendors(RW): Limit of Vendors allowed by default = 10 (Max 255).
-MaxVendors(RO): Returns the maximum Vendors allowed: BaseVendors + ((BaseVendors / IncreasedStorage)/100) (Max 255).
-LockdownsPercent(RW): Base percent of allowed Lockdowns (Max 255).
-MaxLockdowns(RO): Total Lockdowns allowed based on MaxStorage: + ((MaxStorage / LockdownsPercent)/100) (Max 65535).
eg:
- Base Storage = 400
- IncreasedStorage = 20%
- MaxStorage = 480 (BaseStorage + ((BaseStorage / IncreasedStorage)/100))
- LockdownsPercent = 25
- MaxLockdowns = 240 MaxStorage - ( MaxStorage - ((MaxStorage * LockdownsPercent)/100))
-Added HouseType(RW): Set/Gets the house type (0 = private, 1 = public, 2 = guild)
-Doors placed as components now have t_house_door TYPEDEF applied as event.
-Containers placed as components now have t_house_container TYPEDEF applied as event.
-All components of each house now have t_house_component TYPEDEF applied as event.
-t_house_lockdown is added/removed from items when locking/unlocking them from the house.
Note: These events are applied on house COMPONENTS read from [MULTIDEF ], if you add any component ingame with AddComponent you will have to set them too.
Updated [sphere_defs.scp]:
[TYPEDEFS]:
t_multi_addon=201 // AddOns, the deed must have attr_magic to bypass placement checks and allow the addon to be placed inside houses.
[DEFNAME house_types]
house_private=0
house_public=1
house_guild=2
[DEFNAME house_transfer_types]
transfer_nothing = 0 // Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
transfer_lockdowns = 01 // Transfer LockDowns
transfer_addon = 02 // Transfer Addons
transfer_all = 04 // Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.
Added to [MULTIDEF ]:
-BaseStorage (RW): Homologue to the House property BaseStorage.
-BaseVendors (RW): Homologue to the House property BaseVendors.
-LockdownsPercent (RW): Homologue to the House property LockdownsPercent.
-Changed: now t_multis will be saved too in spheremultis.scp along with t_multi_custom.
10-05-2018, Drk84
- Added @EffectRemove trigger for characters,
Argo: the spell item.
Src: the caster.
Default object: the target of the spell.
Argn1: the spell number.
Return 0: remove the spell memory item but don't execute the default spell behaviour when the spell item is removed.
The trigger works similarly to @EffectAdd but is fired when a spell memory item is removed (and after the @Destroy trigger of the item)
The trigger is needed if you plan to use return 0 in the @EffectAdd trigger, otherwise the default spell behaviour will be executed when the spell item get removed.
Example
I cast a curse spell and I have a return 0 in my @EffectAdd trigger, no default curse effect are applied but when the spell expires the curse item
will be removed and the spell target will get the additional stats from the expired curse! Using return 0 in @EffectRemove will prevent this
Additional notes:
Both @EffectAdd and @EffectRemove with return 0 can conflict with Poison and Poison Fields spells or scripts that call the poison function, that's because the
poison status and effect is applied no matter what.
For Summoning spells, returning 0 in @EffectRemove will prevent the summon to disappear.
10-05-2018, Nolok
- Fixed: false-positive speedhack check when trying to walk on a disabled map.
11-05-2018, XuN
- [Port from 0.56d, 07-02-2017, Coruja]:
- Fixed: Char flag 'statf_hovering' (gargoyle fly ability) not clearing when gargoyle chars polymorph into non-gargoyle char ID.
11-05-2018, Nolok
- Changed: disabled the usage of FORINSTANCES without an argument, since that's an unclear and error prone way to use it.
- Updated: Sphere now has a better logging of standard C++ exceptions, meaning better informations in the case of a pure C++ error.
12-05-2018, XuN
Expanded some Ship new features to Ships:
- Added AddShip uid(WO): Adds the given uid to the player's ship.
If the player current count of ships is greater than the limit he has, the ship will be redeeded.
- Added DelShip uid(WO): Deletes the given uid from the player's list (Will not delete the ship)(-1 clears the whole list).
- Added Ships(RO): Return the ships on the player's list.
- Added GetShipPos uid(RO): Returns the position of the given UID on the ships list (-1 if not found).
- Added MaxShips(RW) to Accounts and Chars, when created they read this new setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars).
- Added REF to 'SHIP.x' to access the ship in the Nth position, eg: ship.3.Redeed, local.ship_p=<ship.1.p>
Note: Ships generated before this change will not be updated on the player's list, instead the player will still have the memory with color=MEMORY_GUARD (0x100)
linked to the ship,since there was no default behaviour other than this and each ship script handles it differently, there will be no hardcoded update
to the new system, each ship system should be updated according to it's behaviour (ie: removing the memory and setting AddShip <ShipUID>)
- Added MaxShips(RW) property for accounts, Default = Serv.MaxShipsAccount.
- Added MaxShips(RW) property for chars (meant for players), Default = Serv.MaxShipsPlayer.
* Setting MaxShips = 0 for Players will skip the setting and read it from it's Account.
* Setting MaxShips = 0 for Players and Accounts will allow to build without limit.
Houses and Ships:
Added a new ITEMDEF property MultiCount. Setting it to 0 will add no value towards the house limit (the house will be still present but not counted) and setting it to 3 (eg for castles) will count more for placement checks, etc
Cleaned up multi's placement checks and commented them.
Updated the checks too to work OSI like:
- No chars can be inside the multi's rectangle.
- The multi must have nothing blocking it in a +1 radius of its base rectangle
- Additionally a +5 tiles check must be done on Top and Bottom preventing this house to block the entry of others (or the others to block this).
13-05-2015, XuN
- Added support for CItemStone* (Guild and Towns) on multis.
- Added CMultiStorage to CItemStone so guilds/towns can have houses and ships (same syntax than for chars).
- Expanded key's generation to ships with a new ini setting.
- Added to sphere.ini:
// Do ships generate keys automatically?
AutoShipKeys=1
// Max houses a guild can have (default 1).
MaxHousesGuild = 1
// Max ships a guild can have (default 1).
MaxShipsGuild = 1
14-05-2018, Nolok
- Fixed: multiple party related exceptions.
- Fixed: calling RESTEST on a container item caused an exception.
15-05-2018, XuN
- Added suport for Secured Containers, added some ADDTOCALLSTACKs and removed fUpdateFlags from Un/LockItem.
- Added t_house_secure to Secured containers.
- Added Secure uid(WO): Adds the given uid to the Secure Containers list.
- Added Release(RO): Deletes the given uid from the Secure Containers' list (Will not delete the container)(-1 clears the whole list).
- Added GetSecuredContainerPos uid(RO): Returns the position of the given UID on the secure containers list (-1 if not found).
- Added GetSecuredContainers(RO): Returns the total count of secured containers.
- Added GetSecuredItems(RO): Returns the count of items inside all the secured containers (Just inside secured containers, not on locked containers).
- Added REF to 'SECURED.x' to access the secured container in the Nth position, eg: secured.3.count, local.access=<secured.1.tag0.access>
17-05-2018, XuN
- Fixed attr decay not being removed from locked/secured items, fixed wrong cals for SecuredContainersCount and SecuredItemsCount from their script counterpars and now locked items that are placed where a component is added via customize are moved to the Moving Crate.
- Added AddOn list and basic support like for the rest of the lists:
- Added AddAddon uid(WO): Adds the given uid to the addon's list.
- Added DelAddon(RO): Deletes the given uid from the addon's list (Will not delete the addon)(-1 clears the whole list).
- Added GetAddonPos uid(RO): Returns the position of the given UID on the addon's list (-1 if not found).
- Added GetAddonCount(RO): Returns the total count of addons.
- Added REF to 'ADDON.x' to access the addon in the Nth position, eg: addon.3.components, local.id=<addon.1.defname>
Added @Redeed trigger for multis (t_multi, t_ship, t_multi_custom, t_addon)
argn1=ID of the deed (Default=i_deed)
argn2=1 (Default = 1). If set to 1 all items will be moved to the Moving Crate (and Addons redeeded).
argn3=1 If set to 1 the Moving Crate will be transfered to Owner's Bank (if there is any).
Note: the crate is moved to the OWNER's bank, not SRC.
If argn2 = 0 then argn3 will be not used regardless of the value it has.
SRC = Player doing the redeed (If Any). When the multi is being removed there is no SRC (also when an Addon is being redeeded from internal functions).
ARGO = The deed.
return 1 will prevent the deed from being created, but will not block the code from argn2 and argn3
Added @HouseDesignBegin trigger for t_multi_custom, called when the player enters on design mode
argn1: If set to 1 Redeeds all addons on the multi. (Default = 1)
argn2: If set to 1 Transfer all Locked Items and Secured containers to the Moving Crate (default = 0)
argn3: If set to 1 Ejects from the house all chars inside the house excepting the player entering in design mode,
if set to 2 Ejects everyone from the house
if set to 0 doesn't eject anyone.
All chars ejected will be moved to the House sign.
return 1: Forces the char to exit Customize mode.
WARNING: Forcing the char to exit here and setting argn1=0 in @HouseDesignExit will make it enter in customize mode, exit, enter... infinitelly, hence crashing the server with an infinite loop.
17-05-2018, Nolok
- Fixed: FORCONTTYPE wasn't working (issue #100).
20-05-2018, Nolok
- Fixed: triggers @UserUltimaStoreButton, @UserVirtue, @UserVirtueInvoke and @UserWarMode weren't firing (issue #102).
20-05-2018, XuN
Redeed now creates the deed before calling the @Redeed trigger and the deed gets renamed automatically.
- Added ARGO to @Redeed trigger, being argo the deed.
- added to sphere_msgs 'DEED_NAME': "Deed to a %s"
- Fixed placed houses being moved 1 tile east from where they should.
22-05-2018, Nolok
- Fixed: FORINSTANCES caused an exception in Nightly builds, but not in the Debug ones (issue #88).
25-05-2018, Drk84
- Changed: The defmessage DEFMSG_COMBAT_ATTACKO (*%s is attacking %s!*) will use the EMOTE_DEF_COLOR setting found in sphere_msgs.scp instead of always use the gray color hue.
26-05-2018, Nolok
- Fixed: COMBATF_PREHIT didn't fire the triggers in the correct order, also fixed a possible exploit while using PreHit (issue #108)
- Added: COMBATF_PREHIT_NORANGE to allow starting the close-combat swing at distance; the blow will still be landed only when entering in range.
- Fixed: After each combat hit the current combat skill was halted (actually it failed), then the same action was started again. This resulted in
the @Fail, @SkillFail, @Start, @SkillStart triggers to be fired at each hit.
- Fixed: NPCs doing extra AI actions (wandering, food, etc checks) after each hit in combat. This caused sometimes the current combat action to be resetted
and then forced again, erasing the NPC combat data, which ultimately results in the NPC hitting twice in a few tenths of seconds.
13-06-2018, Nolok
- Changed: reverted the combat animation to not being "smooth". Now by default the swing animation has a fixed duration of 1 second (minimum anim delay/duration possible) and then the char waits the recoil time
before being able to start again the combat swing. This is done to match OSI style. The "underground" work is different now and it is working in this way: first a timer is started to wait for
the recoil time (ARGN1 in @HitTry). When the timer has ended, the combat swing animation starts, also the timer is started again, but to wait for the animation to end (anim and timer duration are equal to
LOCAL.AnimDelay in @HitTry, and the default value is 1 second). Ended this second timer, the damage is dealt (Issue #111).
- Added: .ini CombatFlag COMBAT_ANIM_HIT_SMOOTH to enable the old smooth combat. There's no delay between hits (in @HitTry LOCAL.AnimDelay is = 0), but the swing animation duration
(ARGN1 in @HitTry) is in this case equal to the delay you should have waited before starting a new swing.
- Fixed: COMBAT_PREHIT wasn't working correctly (Issue #113, #108).
- Changed: .ini CombatFlag COMBAT_PREHIT_NORANGE renamed to COMBAT_SWING_NORANGE, to avoid confusion with COMBATF_PREHIT.
- Added: LOCAL.Swing_NoRange to @HitCheck trigger. -1 force disables the Swing_NoRange behaviour for the current hit, 0 leaves it dependent to the COMBAT_SWING_NORANGE ini CombatFlag,
while 1 force enables the Swing_NoRange behaviour (Issue #112).
- Added: RETURN -2 into @HitCheck trigger continues the execution of the default combat code. This is useful if you want to use @HitCheck to only change LOCAL.Swing_NoRange.
20-07-2018, XuN