Added new protected property for CChar class to track a player's currently controlled pets/followers/summons, and renamed the on tracking all pets owned:
GenericList<CChar *> activeFollowers
GenericList<CChar *> petsControlled -> petsOwned
Added new JS Character Methods to view/manipulate follower list:
GetFollowerList()
AddFollower( npcObject )
RemoveFollower( npcObject )
Added new JS Character Property to fetch current count of followers character has:
.followerCount
Added new GM commands for spitting out information on all pets/followers a player has, in the following format: Name: %s | ID: %i | Serial: %i | x: %i | y: %i | z: %i | world: %i | instanceID: %i
'listpets
'listfollowers
Replaced most instances of GetPetList in code and scripts with GetFollowerList, as that's what we actually care about for the most part
Updated code and relevant scripts to make use of AddFollower and RemoveFollower functions where appropriate
Modified code for restoring pet loyalty upon feeding pet; by default it now restores 10/100 loyalty per time pet is fed, while if CoreShardEra setting in UOX.INI is set to AoS expansion or higher, loyalty is instantly restored to max when pet is fed (regardless of amount)
Updated AreaCharacterFunction and AreaItemFunction JS Functions to still work if third parameter (socket) is provided as null
Modified code and relevant scripts that teleport pets/followers along with player to only do so for pets/followers using the "follow" wandermode with player as follow target
Updated some instances of code and script that checked for both controlSlot AND maxFollowers requirements - now only checks maxFollowers if controlSlots is set to 0 in ini
Added function _restorecontext_() {} to a couple more scripts:
js/commands/targeting/tele.js
Updated error message shown when attempts are made to add deleted objects to refreshQueue, to include name, ID and serial of the object in question
Fixed an issue that prevented onBuyFromVendor() and onBoughtFromVendor() JS Events from triggering when attached to NPC shopkeepers
Fixed an issue with help gump that prevented password management section from working as intended (js/server/misc/helpgump.js)
Fixed an issue where UOX3 would fail to load pre-HS multi.mul files
Added chess board to Misc->Games add menu (dfndata/items/ItemMenu.bulk.dfn)
Fixed an issue with 'move (alias for 'telestuff) command that referenced the wrong variable name (js/commands/targeting/tele.js)
When a player is teleported via the GM 'wholist menu, any pets within range are now also brought along for the ride
Consolidated error-reporting for JS Functions, Object Methods and Object Properties to provide more context (scriptID, filename, line number) when something goes wrong
Added some missing shield IDs (0xA649, 0xA64A, 0xA831, 0xA832) to IsShieldType() function
MAXRANGE item property previously only worked for ranged weapons; now it works for melee weapons too, and potentially allows melee weapons with combat range longer than 1 tile
MAXRANGE item property can now be used to define max combat range for melee weapons
Fixed an issue (non-critical) with .PlaceInPack() JS Method that would cause UOX3 to try adding items marked for deletion to refreshQueue and spam console with errors
Added missing AI scripts to summoned Blade Spirits and Energy Vortexes (dfndata/npc/magicsummon.dfn)
Fixed an issue with weight calculation for hireling backpacks (js/npc/ai/hireling.js)
Fixed an issue with the 'fix command, which would in most cases set character's Z to -1 regardless of location, but now adheres to map elevation instead
Fixed an issue with Pack AI (js/npc/ai/pack_ai.js) that prevented pack members from attacking target correctly (thanks Dragon Slayer)
Fixed an issue with DoesMapBlock JS Function that incorrectly checked for 6 function arguments, when it actually requires 8
Fixed an issue with DoesDynamicBlock JS Function that incorrectly checked for 8 function arguments, when it actually requires 9
Fixed an issue with runebook script (js/item/runebook.js) that prevented players from being able to use recall charges without having spellbook with spell in inventory
Fixed issues with placement of tall items on ground/floor, and with stacking of items in houses
Fixed incorrect alias for woodland armor (dfndata/items/gear/armor/other/armor/wood.dfn - thanks Dragon Slayer)
Fixed a critical issue with script context sometimes changing while executing a script, because of events in other scripts being triggered. Affected scripts can be safeguarded against this by the addition of a dummy callback function anywhere in the script: function _restorecontext_() {}
Fixed an issue with non-animal pets not gaining loyalty when being fed (thanks Dragon Slayer)
Added new JS Object Methods for Chars/Items/Multis to fetch list of custom tags associated with object:
.GetTagMap() // Gets list of persistent custom tags associated with object
.GetTempTagMap() // Gets list of temporary custom tags associated with object
Added new JS commands ('GETTAGMAP and 'GETTEMPTAGMAP) that spits out details of custom tags associated with targeted object (js/commands/custom/misc-cmd.js)
Added new JS command ('USEITEM) that acts as a short-cut for double-clicking on targeted item (js/commands/custom/misc-cmd.js)
Updated 'ADD # and 'ADD ITEM # JS commands to support targeting a container directly and adding the new item inside (js/commands/targeting/add.js)
Updated axe script to only perform lumberjacking skill-check when there's still wood available in a given area, and to play appropriate animations for Gargoyle players (js/item/axe.js)
Updated script for gameboards to make generated pieces newbiefied so they won't appear on ground if board decays (js/item/gameboards.js)
Updated script for stablemasters to avoid relying on global variables (js/npc/ai/stablemaster.js)
Updated names of items crafted with runic hammers to include the material name of the hammers used to craft them (js/skill/craft/crafting_complete.js)
Fixed a small issue with Detect Hidden skill that would return the wrong message if players found anyone hiding nearby (js/skill/detecthidden.js)
Fixed an issue that prevented tile overrides in dfndata/maps/tiles.dfn from loading properly
Added entries for a couple of walls with missing no-shoot flags to tile overrides in dfndata/maps/tiles.dfn
Updated JS Method .SoundEffect() to support optional third argument (creatureSoundNum) to play creature-defined sounds from dfndata/creatures/creatures.dfn. New syntax:
.SoundEffect( soundID, allHear[, creatureSoundNum] ) // 0=SOUND_STARTATTACK, 1=SOUND_IDLE, 2=SOUND_ATTACK, 3=SOUND_DEFEND, 4=SOUND_DIE
Added new Character JS Methods:
.SetRandomName( nameListID ) // apply a random name from specified namelist to character
.FindItemSection( sectionID ) // find item in player's backpack with specified sectionID
Added new Socket JS Method:
.OpenContainer() // Opens specified container for socket
Fixed an issue where casting Wall of Stone inside a multi would lead to the wall of stone never expiring, because it was not correctly marked as a field spell
Reduced combat message spam; attacking messages now only appear when attacking targets who are not already fighting the attacker
Added a new character state - "passive combat mode" - primarily used by players when they tab out of combat. Tabbing out of combat will prevent the character from retaliating in combat if they're already fighting someone
Fixed several issues with dropping items through floors, tables and generally not being placed correctly when dropped inside multis
Hard-defined the Z-level at which some jewellers in Britain spawn to deny them rooftop access (spawn_felucca_town_britain.dfn and spawn_trammel_town_britain.dfn)
Added system messages informing shard staff with elevated command privileges why they are getting 100% skill check success, and no spellcast delay
Added some validation checks for attacker object in onDamage JS event in several scripts
Enabled onSellToVendor, onSoldToVendor, onBuyFromVendor and onBoughtFromVendor JS events to also run if attached to NPCs
Disabled location check for 'addmulti command
Implemented Taxidermy Kits for creating trophy house addons (Dragon Slayer)
Fixed an issue related to open doors in houses that would prevent the placement of house-addons because of an incorrect distance check (Xuri)
Fixed an issue with placement of house addons that would allow them to be placed in locations blocked either by other items or by parts of the multi itself (such as walls) (Xuri)
Co-Authored-By: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com>
Base multis created with CreateBaseMulti() JS function or BuildBaseMulti() C++ function no longer require valid 'house/boat' locations to spawn
Fixed an issue where no reagents were consumed when casting recall/gate spells via spell icons in runebooks (js/item/runebook.js)
Spawn Regions will now more accurately spawn objects near desired heights supplied via PREFZ tags. Using PREFZ=20 will attempt to spawn NPCs on the second floor of a building with ground level at Z 0, for instance.
Added a new DFN tag usable in Spawn Regions to define a definite Z level at which to attempt to spawn objects (skips some steps in the process and assumes the defined Z is a valid Z):
DEFZ=# // Defines a definite Z level to attempt to spawn an object at
Updated banker AI script (js/npc/ai/banker.js) with some extra validation checks, system messages and to take max weight capacity of bankbox into account
Player vendors in existing houses no longer teleport to new houses placed by owner nearby
Fixed script issue with demolishing house with player vendors in them
Fixed an issue where setting prices for items on player vendors would permanently overwrite the buy-value of the item. Player vendor prices are now stored as a separate property (but saved as part of the VALUE tag), also accessible by the following JS Item property:
.vendorPrice
Item description and vendor price are now cleared from items bought from player vendors
Tooltips for items with new descriptions or vendor prices in player vendor backpacks are now correctly updated
Only books, keyrings and unlocked containers can now be marked 'Not for Sale' in a player vendor's main/root backpack
Any items on player vendors can now be marked as 'Not for Sale' if placed within a container that has a price tag
Added additional feedback messages to players for various interactions with player vendors
Fixed a bug where player vendors would lose loyalty and 'go wild' like pets when not fed regularly
Split up some of the longer item lists in the 'add menu to prevent freezes on original 2D client
Fixed an issue with onDyeTarget event where the dyetub and target object parameters were not set properly
Fixed some incorrect casting animation-related variable assignments for AI_HEALER and AI_EVIL_HEALER
Fixed an issue with pets not going wild from lack of loyalty to their owners when at zero loyalty
Addressed issues with idle/fidget animation setup that could cause NPCs to blink out of existence
Removed stray semicolon behind control statement related to triggering of OnFacetChange JS event
Fixed an issue with Bless spell when cast from item
Some minor code cleanup
Misc cleanup and standardization of style and naming conventions in code and scripts
Added missing code for showing race in paperdoll based on ini setting
Players can no longer use Polymorph spell while incognitoed, or while under effect of tribal paint
Players can no longer use Incognito spell while polymorphed, or while under the effects of tribal paint
Facial hair is now removed from players who are under the effects of Incognito spell that changes their gender for female
Added new JS Events:
onCarveCorpse( pUser, iCorpse ) // Triggers for iCorpse when being carved by pUser
onFacetChange( mChar, oldFacet, newFacet ) // Triggers for character when moving between facets
onDyeTarget( pUser, dyeTub, targItem ) // Triggers for dyeTub when player tries dying an item
Added new JS Functions to create houses (from house.dfn) and base multis (using raw multi IDs):
CreateHouse( houseID, x, y, z, worldNum, instanceID );
CreateBaseMulti( multiID, x, y, z, worldNum, instanceID );
Added new JS Character/Item Method:
.HasScriptTrigger( scriptID ) // Returns true if script with scriptID is present on object
Added new JS commands for GMs in js/commands/custom/misc-cmd.js
'addhouse houseID // Add house from house.dfn at target location
'addmulti multiID // Add base multi from client multi files at target location
NOte, many method calls are passing copies of collections. Did not change, as that could change functionality (unlikely), but this is a syntax only exerersize.
Just changing value (copes) to reference (and provide a const/nonconst method) would see a noticeable speed difference.
Fixed a server crash caused by a couple of items in "stone walls 4" section of add-menu that were missing their ID in ItemMenu.bulk.dfn (thanks, Humility)
Fixed an issue where items added to house (multi) definition would not be attached to the house if their coordinates were not within the boundaries of the house. This prevented the usage of house foundation multis with custom stairs, for instance.
Updated 'decorate save command to not save items that are inside multis (the multis themselves are not saved anyway!)
Fixed some issues that would crash decorate script when attempting to use event subcommands without event names
Renamed 'fixcontweight command to 'fixcont and updated it to also fix maxItems property for containers that don't already have that set
Updated container world file template for Felucca with containers with proper maxWeight and maxItems seet
Updated admin welcome gump (js/server/misc/admin_welcome.js) to also include containers (previously missing) and disable facets that don't have any decorations yet. Anyone who already used the admin welcome gump to place default decorations for their shards can use 'decorate load containers to add the missing containers.
Changed how house addons are marked as addons; they will no longer have their item type set to 201 (IT_HOUSEADDON), as this would override any existing item type functionality of the items being setup as addons (like the dresser, which is a container). Instead, house addons are now marked with a custom tag "addon", which is used by scripts like axe.js to identify them as house addons instead of relying on the item type.
Uncommented the dresser house-addon from 'add menu, as it now works as intended
Added house-addons to ArchitectShopping SHOPLIST so they can be bought from Architect shopkeepers for roughly the cost of the material it would have taken to craft them. This is a temporary solution until crafting these have been implemented.
Updated default region spawn file to evict the beekeeper from Skara Brae bank to make room for some actual bankers! The beekeeper is now tending to the bees outside the bank instead.
Fixed issue where NPC vendors would not restock more than 1 leather tunic and/or leather gloves, because of a missing restock tag in the DFN entries for those items
Removed kindling from the shoplist of Armourer vendors
Bananas are now edible
Bowyer shopkeepers will now restock more than 1 shaft and/or feather
Provisioner shopkeepers will now restock more than 1 candle, lantern, various masks, kindling, flour
Jeweler shopkeepers will now buy some gems (star sapphire and tourmaline) they were previously not so interested in
Bowyer shopkeepers now sell fletching tools
Added fletcher's tools as newbie item for players starting with Bowcraft/Fletching skill
NPC shopkeepers now spawn with full stocks of goods, instead of the bare minimum
Fixed item weight tooltip for pileable items appearing in vendor shoplists
Fixed an issue where selling items to NPC shopkeepers would sometimes not visually remove the items from player's backpack
Fixed missing base_item inheritance and missing restock property for mount statues sold by animal trainers/stablekeepers, which prevented them from being presented for sale
Hairs and Beards no longer count towards the total item count showing for corpses
All leather containers are now dyable
Animals that belong in the Arctic (polar bears, snow leopards, walrus) will no longer spawn in forests and jungles
Hellhounds will no longer spawn in forest and jungles; they can now only be found in dungeons
Silver Serpents have been removed from the "weakforestlist" NPCLIST, because they are anything but
GM/Admin characters can now drag immovable items out of their own backpack even with "allmove" disabled
A tip to enable "allmove" or modify item's movable property now shows for GMs attempting to pick up immovable items from the ground
Hungry creatures with AI type 6 (AI_ANIMAL) will no longer suicide by indiscriminately attacking creatures with AI type 2 (AI_EVIL), but will instead only attack "peaceful" animals, or - if really hungry - other types of predatory animals (including humans...)
Fixed incorrect non-combat music entry [MUSICLIST COMBAT] section of dfndata/regions/regions.dfn
Added new music section to dfndata/regions/regions.dfn
[MUSICLIST DEATH] // Plays music from this list for players who are in the realm of the dead
Assigned different MOREZ value to each explosion potion (dfndata/item/magic/potions.dfn) to make distinguishing between them easier
Updated item stacking code to disallow stacking items that have different more, morex, morey, morez, buyvalue or sellvalue
Fixed issue where monsters would erroneously show context menu entries with skill training options
Fixed issue where some iron ore in GM add menu was showing up and being added as a brazier instead
Added baseRange and maxRange to 'tweak menu (js/command/targeting/tweak.js)
Added new Item property that can be used to associate an item with a custom server event:
DFN Tag:
EVENT=eventName // Name of event in one word, with no spaces
JS Property:
.event
Updated 'get, 'set, 'tweak and 'areacommand commands to support the new event property
Extended 'decorate command with some additional features to support saving, loading and unloading event decorations (example: xmas, halloween, etc):
'decorate saveevent eventName // Save all items with event property matching eventName to event_[eventName].jsdata
'decorate loadevent eventName // Load all items from event_[eventName].jsdata and assign eventName to their event property
'decorate unloadevent eventName // Clear up all items associated with eventName
Added some new house addons to house.dfn, and in the 'add menu, under Deeds > Houseaddon Deeds:
loom (south)
small forge
anvil (south/east)
spinning wheel (north/south/east/west)
small bed 1 (south/east)
small bed 2 (south/east)
large bed 1 (south/east)
large bed 2 (south/east)
training dummy (east)
training dummy (south)
pickpocket dip 1 (east)
pickpocket dip 2 (east)
dresser (east) // Disabled, doesn't work as container after being turned into addon
dresser (south) // Disabled, doesn't work as container after being turned into addon
abattoir (stone pentagram)
flour mill (east)
flour mill (south)
oven (east)
oven (south)
large forge (east)
large forge (west)
large forge (north)
large forge (south)
Updated some house addons (bear rugs, pentagram) to be added from top-left to bottom right, for more consistency when placing items
Added a code-check when placing house-addons to see if there's space in multi to place addon at selected location, starting from coordinates of target location and checking tiles east and south of that location based on the addon's SPACEX and SPACEY settings in house.dfn
Added new script (js/server/house/houseAddonUse.js) that will restore the double-click functionality of some house addons that would lose their regular functionality in the process of becoming house addons, as their item type changed. The same script also adds some extra functionality to a couple of other house addons (looms and spinning wheels), allowing players to choose between using the addons and then targeting materials like yarn or wool or using the materials and then targeting the addons
Fixed an issue with the interior decorator tool that would allow using it outside one's house
Updated dictionary files
Extended Character JS Method DoAction() to support two additional parameters - frameCount and playBackwards - which define the length of the animation (defaults to 7) and whether the animation should be played backwards (defaults to false). Note that this only works for old-style animations, and thus is not available for Gargoyle characters. Updated method syntax:
.DoAction( actionID ) // Old animation packet
.DoAction( actionID, null, frameCount) // Old animation packet with frameCount
.DoAction( actionID, null, frameCount, frameDelay ) // Old animation packet with frameCount, frameDelay
.DoAction( actionID, null, frameCount, frameDelay, playBackwards) // Old animation packet with frameCount, frameDelay, playBackwards
.DoAction( actionID, subActionID ) // New animation packet
Extended fishing JS script to include:
Fishing special fishing nets, big fish, messages in a bottle/SOS messages and associated shipwreck treasures, with chances of attracting sea serpents, deep sea serpents, water elementals and krakens while fishing.
Enhanced detection of fishing in shallow vs deep water, with deep water now being defined as any water tile that's 16 or more tiles away from the nearest land area.
Updated timer system, LoS checks,
Implemented SOS messages and shipwreck locations, with areas valid for potential shipwreck locations being defined in a new section of regions.dfn named [SOSAREAS], which follows the same syntax as the INSTALOG section in the same file. Once a message in a bottle is opened, a SOS message is generated with coordinates for a random shipwreck location, which players can sail to and fish near in order to find a sunken treasure (and other items).
Implemented shipwreck treasures, which come in 3 levels of quality (with an optional 4th quality level available), with increasing amount of gold, gems, scrolls, reagents and magic items (coming in next commit!) per quality level of treasure
Implemented special fishing nets, which can be used to fish up a variety of sea creatures (sea serpents, deep sea serpents, water elementals, kraken), which have a high chance of having SOS bottles on their corpses when defeated
Updated fishinglist.dfn, itemlist.dfn and lootlist.dfn to support new fishing updates
Updated movable state of various items that can be fished up (pillows, some pieces of furniture) to ensure players can move them!
Renamed ORERESPAWNAREA ini setting to RESOURCEAREASIZE (it's also used for ore, and logs) and reduced it from 10 to 8 to divide each world into 8x8 sized resource areas
Fixed a bug where the new fish resource type was not getting regenerated or saved properly
Added INSTANCEID support to INSTALOG section of regions.dfn, and added default WORLD and INSTANCEID entries to all areas
Fixed an issue with Runebooks (js/item/runebook.js) where the coordinates of a rune location would not be displayed properly
Separated map coordinate function from Runebook script to its own script (js/server/data/map_coordinates.js), which other scripts can call upon to get map coords using TriggerEvent() JS function
Ported sextant implementation from code to JS (5033=js/item/sextant.js), and removed the hard-coded version of this.
Updated Item DFN entry for sextants to include script=5033 tag
Fixed a bug in handling of the LOOT tag for NPCs where server would crash if a number was specified behind the item/itemlist to add as loot
The DFN tags PACKITEM and LOOT are now handled similarly when used for NPCs and Items respectively. PACKITEM can be used for adding items with specific IDs, or "list objects" from itemlists.dfn, while LOOT can be used to add items from lootlists.dfn. One big difference between these is that if the optional amount parameter is specified for either tag when used with itemlists/lootlists (PACKITEM=listObject,amount vs LOOT=lootlist,amount), PACKITEM will add the specified amount of the specified/randomly chosen item, while LOOT will add X amount of random items.
Updated implementation of ITEMLISTs and LOOTLISTs to support an optional weighting system, which can be used to adjust the probability of some items being chosen from these lists over other items. In the below example, specialfishingnet has a weight of 10, while the blank entry has a weight of 90, making it 9 times more likely for the blank entry to be chosen than the specialfishingnet! Note that higher weighted items should be sorted first for this to be accurate:
[LOOTLIST shipwreck_treasure_special]
{
90|blank
10|specialfishingnet
}
Using bladed weapons on stacks of fish will now cut the entire stack at once, instead of one fish at a time
Updated DFN entries for various sea creatures (dfndata/npc/seacreatures.dfn) to adjust color of NPCs, loot and NPC AI
Extended functionality of JS Function DoMovingEffect() to allow a set of coordinates as source location, without having to specify a character as either the source or target of the effect
Fixed an issue with sea creatures being unable to pathfind in shallow water due to underwater land tiles being treated as blocking
Moved fishing skill out of code and into js for more user friendly control
Added js/item/magicfish.js for the magic fish food
Added support for new Skills DFN tag:
SKILLDELAY=# // Delay in seconds before another skill can be used after using this skill. Overrides global delay from UOX.INI
Updated skill cSkills::SkillUse() to use skill-specific skill delays if set for a given skill, or global delay from ini if not. Also added a check to see if skill delay timer has been modified by onSkill JS event before attempting to set a default timer
Updated skill delays to better match ~pub15 era:
Reduced global SKILLDELAY setting in UOX.INI from 2 to 1 second
Detecting Hidden skill now has a default skill delay of 10 seconds
Herding skill now has a default skill delay of 10 seconds
Hiding skill now has a default skill delay of 10 seconds, with shorter delays (global skill delay) for trying to hide while in combat or for successfully hiding
Meditation skill now has a default skill delay of 10 seconds, with shorter delays (global skill delay) for failing due to hands being occupied or already being at max mana
Peacemaking skill now has a default skill delay of 10 seconds for failed skill checks, and 5 seconds delay for successful ones
Poisoning skill now has a default skill delay of 10 seconds
Provocation skill now has a default skill delay of 10 seconds
Remove Trap skill now has a default skill delay of 10 seconds
Stealing skill now has a default skill delay of 10 seconds
Stealth skill now has a default skill delay of 10 seconds
Tracking skill now has a default skill delay of 10 seconds
Veterinary skill now has a default skill delay of 10 seconds
Fixed an issue with global JS Timer object that would reference the wrong timerIDs
Extended global JS timer object to include timers from socket as well (marked with SOCK_ prefix):
.SOCK_SKILLDELAY // Delay before the next time player can use another skill
.SOCK_OBJDELAY // Delay before next time player can use another object
.SOCK_SPIRITSPEAK // Timer that tracks remaining duration of player's Spirit Speak
.SOCK_TRACKING // Timer that tracks remaining duration for player's Tracking skill
.SOCK_FISHING // Timer that tracks remaining duration for player's Fishing skill
.SOCK_MUTETIME // Timer that tracks remaining duration a player remains muted
.SOCK_TRACKINGDISPLAY // Timer that tracks interval between each time tracking display is updated
Updated various JS scripts to use the new Timer.TIMERNAME with .GetTimer()/.SetTimer() JS Methods for Characters and Sockets
Updated Persecution ability for player ghosts to use the skill delay of the Spirit Speak skill, if set
Updated Persecution ability to base mana damage primarily on player's Spirit Speak skill rather than their Intelligence
In order to cut down on the amount of messages sent from server to players trying to spam-use objects/skills, UOX3 now only sends a maximum of one message for object use delay and one message for skill use delay while the delay timers for these are in effect. This resets on the next successful use of an object or skill. This is tracked via bools in cSocket class:
bool objDelayMsgShown
bool skillDelayMsgShown
Converted DELAY tag in spells.dfn to use seconds (with decimals) instead of tenths of a second, which was not precise enough. This controls the cast time of spells. What would previously say DELAY=10 (10/10ths of a second) now says DELAY=1.0 (1 second)
Added support for new Spells DFN tag to control delay until damage takes place after casting a spell, replacing UOX.INI setting COMBATEXPLODEDELAY, which is no longer used:
DAMAGEDELAY=# // Delay in seconds (decimal) until a direct damage spell deals its damage
Added support for a new Spells DFN tag to control cast recovery time, during which additional spells cannot be cast:
RECOVERYDELAY=# // Delay in seconds (decimal) until player can cast another spell
Added new setting in UOX.INI to control whether player spellcasting gets interrupted upon equipping/picking up items:
ITEMSINTERRUPTCASTING=1 // If enabled, spellcasting gets interrupted by equipping/picking up items. Defaults to enabled.
All direct damage spells by default have a 1.0s delay before damage (and VFX) is applied, except Explosion which has a 2.5s delay
All spells by default have a cast recovery duration of 1.0s; from the moment a spellcast is completed/moment targeting cursor appears, the player will be unable to cast any other spell for the duration of the cast recovery
Reagent checks and skill-check now take place AFTER the spellcast animation, not before!
Spell cast times now follow this formula, though values set per spell and can be modified: 0.25 + ( spellCircle * 0.25 )
Overhauled spell sound FX and VFX for for all spells
Players can no longer cast spells while holding items on the cursor
Fixed Magic Trap, Magic Untrap, Magic Lock and Magic Unlock not being usable on containers in one's own backpack
Fixed an issue that caused Magic Trap to deal between 50 to 100 damage to the player. New damage: 5 to 10, depending on Magery skill
Fixed an issue where Magic Untrap spell would completely remove traps from spawn containers instead of disable them
Fixed an issue where Telekinesis spell would not set off traps on containers properly
Added additional FX for Teleport spell played at player's original location before the teleport took place
Fixed a bug where creatures summoned with the Summon Creature spell were not dispellable
Fixed an issue where the Reveal spell would not reveal players hidden using the Hiding skill
Dispel and Mass Dispel spells are no longer guaranteed to succeed at dispelling summoned creatures. Instead, the chance to dispel is based on the following simple formula, with dispelChance capped at 95% to always leave some chance for a creature to resist a dispel:
dispelChance = ( 50 - ( targetResistSkill - casterMagerySkill )) / 1.5
The targetResistSkill is based on the highest value of the summoned creature's spell resistance skill and the spell resistance skill of its summoner
Fixed an issue where the Create Food spell attempted to create an invalid item
Fixed issue where code that checked for valid drop locations for items didn't allow negative z values (Dragon Slayer)
Fixed issue where players could drop items on blocking map tiles like water or mountains (Dragon Slayer)
Fixed issue where some JS functions like CheckStaticFlag, CheckDynamicFlag, DoesStaticBlock, DoesDynamicBlock and DoesMapBlock would not work correctly when passed negative Z values
Fixed issue where context menu were listing skills to train from NPCs based on effective skill rather than base skill
Fixed issue where NPCs would offer skills for training even if those skills were not above the minimum 60 skillpoints
Updated clilocID used for Gump JS Method AddToolTip - as well as for some item/character tooltip data - from 1050045 to 1042971 for improved client compatibility
Human/Elf/Gargoyle NPCs with spellcasting capabilities will now play a casting animation and briefly stop moving when they cast spells
Updated NPC spellcasting code to help NPCs make a bit better choices of what spells to cast during combat. Now they take their own health percentage into account, and cast more offensive spells when at near full health vs more defensive spells as their health drops
Fixed an issue where Hirelings wouldn't always immediately start following their new owners
Fixed a bug where the Earthquake spell could incorrectly add NPC characters marked for deletion to the refresh queue
Updated skills and stats of all implemented human NPCs (including vendors) to better match the state of those NPCs around the time of Pub15
Fixed SPATTACK values for a couple of NPCs that were still using values based on spell bitmask instead of spell circle value
Updated stats of Jukan and Meer NPCs (dfndata/npc/lbrraces.dfn) to match stats from official LBR guide
Added support for an optional third parameter for Character/Socket JS Method .CustomTarget() to allow highlighting targeting cursors as neutral (0, default aura), harmful (1, red aura), helpful (2, blue aura). A value of 3 will cancel the currently active targeting cursor. New syntax:
myChar/mySock.CustomTarget( targetID, txtToSay, cursorType ) // supported cursorTypes: 0 = neutral, 1 = harmful, 2 = helpful, 3 = cancel current target cursor
Various target cursors triggered by code (like hard-coded spells, some pet commands) also make use of these cursorTypes
Added JS command to reload dictionaries
'reloaddictionaries
Fixed a server crash related to casting of spells
Fixed some issues with Line-of-Sight checks related to items under/above ground, LoS checks between different floors of buildings, etc.
Updated handling of skill-training keywords to be based on language-independent keyword IDs rather than trying to match player-input text to specific skill-names
Updated animal-trainer/stablemasterscript (js/npc/ai/stablemaster.js) with several changes:
Fixed an issue where the same pet would be stabled in all available slots if payment was taken from player's bank account instead of their backpack
Fixed an issue where stablemaster would not pause walking for a while when a player interacts with them
Converted all system messages and text messages in stablemaster script to dictionary entries
Added new NPC AI type to source - AI_STABLEMASTER (9) - and assigned this to animal trainers. This is used to identify this type of NPCs for the purpose of displaying relevant context menus
Reworked banker AI script (js/npc/ai/banker.js) to use triggerwords from client instead of hard-defined strings, to work better with multiple languages (and work with all relevant triggerwords)
Fixed a bug with banker AI script (js/npc/ai/banker.js) that prevented players from using the "withdraw" command
Re-added NPC AI 8 to banker NPCs (dfndata/npc/male_vendors.dfn and female_vendors.dfn) so code can check for presence of this AI when handling context menus
Removed remaining hard-coded banking functionality - all handled by script anyway
Added new context menu option for NPC bankers - Open Bankbox
Updated code handling of context menus to only show context menus when relevant:
Open Paperdoll - Shows for all characters with a paperdoll
Open Backpack - Shows for player's character, pack animals and hirelings
Open Bankbox - Shows for banker NPCs (if within 8 tiles)
Buy/Sell - Shows for vendor NPCs (if within 8 tiles, and if they have anything for sale/are buying anything)
Added new context menu entries for pets, which can be used if player is within 12 tiles of pet:
Command: Kill
Command: Stop
Command: Follow
Command: Stay
Command: Guard
Add Friend
Remove Friend
Transfer
Release
Added new context menu entries for stablemasters/animal trainers:
Claim All Pets
Stable Pet
Added new context menu entries for Escort Quest NPCs
Ask Destination (if within 3 tiles)
Accept Escort (if within 3 tiles)
Abandon Escort
Added new context menus for NPCs that can teach skills to players (limited to max 10 per NPC)
Train [skillName]
Added new AI script for NPC hirelings (3204=js/npc/ai/hireling.js), who can be hired to follow the player around for a limited amount of time, and function the same way as pets. In addition to the regular pet commands, these speech commands are supported:
hire // The hireling will respond with the cost to hire them
dismiss // Replaces the "release" command for pets; will dismiss the hireling
patrol // The hireling will patrol between it's current location and a second targeted location nearby
move // The hireling will try to shuffle out of the way
fetch // The hireling will try to fetch a targeted item
drop // The hireling will drop to the ground all loot they're currently carrying
report // The hireling will report on the remaining time they're hired for
Added new NPC DFN tag used by code to detect hireling NPCs for the purpose of displaying context menus:
HIRELING // No additional value/data needed for tag
Added new context menu entries for Hireling NPCs, in addition to the ones for regular pets:
Hire // Can be used within 3 steps of the hireling, who will respond with cost to hire them
Dismiss // Replaces the "release" command for pets, will dismiss the hireling
Added HIRELING tag and SCRIPT=3204 to and updated stats of various NPCs that will be hireable:
m_fighter, f_fighter, m_beggar, f_beggar, m_peasant, f_peasant, m_sailor, f_sailor, m_pirate, f_pirate
Added new hireling NPC:
m_paladin, f_paladin
Added new UOX ini setting to enable/disable context menus
CONTEXTMENUS=1/0 (defaults to 1)
Added new Item JS Method to check if an item's ID is on a specified food list
.IsOnFoodList( foodList ) // Returns true/false if item's ID is on specified foodList
Added new OMNIVORE food list and assigned it to [basehuman] DFN section
Added new Character JS Properties
.isGuarded // Gets/Sets whether character is guarded by a pet/hireling
.guarding // Gets/Sets the object (if any) being guarded by a pet/hireling
Fixed multiple issues with health bars, flagging and character highlighting
Added some crash protection for invalid data used with CUSTOMINTTAG and CUSTOMSTRINGTAG DFN tags for Items, NPCs and Multis
Fixed an issue which prevented hard-coded checks from running when using items
Added new global js object (Timer) to make the use of character timers in JS more robust, with properties matching timer names from enum in source.
Properties:
.TIMEOUT // Time until next attack can be done in combat
.INVIS // Time until invisible character becomes visible
.HUNGER // Time until character grows more hungry
.THIRST // Time until character grows more thirsty
.POISONTIME // Time until next tick of poison damage
.POISONTEXT // Time until next message about suffering from poison
.POISONWEAROFF // Time until poison wears off
.SPELLTIME // Time until spell cast is completed. Can be set to 0 to interrupt
.ANTISPAM // Time until next speech message can be sent (for anti spam purposes)
.CRIMFLAG // Time until criminal flag runs out
.MURDERRATE // Time until next murder count decay
.PEACETIMER // Time until character can re-enter combat after being affected by peacemaking
.FLYINGTOGGLE // Time until next time flying ability can be toggled for gargoyles
.MOVETIME // Time until NPC can move again
.SPATIMER // Time until next time NPC can cast a spell
.SUMMONTIME // Time until a summoned NPC will vanish
.EVADETIME // Time until an NPC will exit evade state
.LOGOUT // Time it takes for a player char to vanish after logout
Examples of use:
var hungerTimer = myChar.GetTimer( Timer.HUNGER )
myChar.SetTimer( Timer.HUNGER, 15000 )
Added new Character JS Methods to add, remove and list friends of a pet/hireling:
.AddFriend( playerToAdd ) // Adds player to friend list
.RemoveFriend( playerToRemove ) // Removes player from friend list
.GetFriendList() // Gets list of friends
.ClearFriendList() // Clears list of friends
Added new Character JS Method to fetch a player character's list of pets/followers
.GetPetList() // Gets list of pets/followers
Added new persistent NPC property to keep track of a pet's previous owners, whether those tamed the pet or had it transferred to them. Every time a pet is tamed, or is transferred to a new owner, this list is updated:
GenericList< CChar * > petOwnerList
Added new Character JS Method to check if a player is on a pet's owner list as a previous owner:
.HasBeenOwner( mChar )
Previous owners of a pet can re-tame it with guaranteed chance of success
Updated JS Method Refresh() to be usable with both items or characters, to send updated state of object to nearby players
Added character tooltip [Guarded] for characters being guarded by a pet/hireling
Pets/hirelings that are transferred will now immediately start following their new master instead of wandering freely
Pets/hirelings can no longer be transferred between players as long as either party is flagged as a criminal
Pets/hirelings can no longer be transferred to dead players
Pets/hirelings can no longer be transferred to NPCs
Summoned creatures can no longer be transferred to other players
Summoned creatures can no longer have friends
Friend lists of pets/hirelings are now cleared when the pet/hireling is transferred to another player
Added new UOX.INI settings to control how many pets players can have active:
MAXCONTROLSLOTS=0 // Maximum number of pet control slots available to player. Disabled if 0
MAXFOLLOWERS=5 // Maximum pets/followers a player can have active at the same time. Used if control slots are disabled
MAXPETOWNERS=5 // Maximum number of different owners a pet can have over its lifetime before it becomes impossible to retame
Added new NPC property and NPC DFN tag that keeps track of how many pet control slots an NPC would take up if owned by a player:
UI08 controlSlots // source property
CONTROLSLOTS=# // DFN tag
Added new Character JS properties:
.ownerCount // Get the total number of owners a pet/hireling has had, based on NPC's petOwnerList
.controlSlots // Get/Set number of pet control slots an NPC will occupy
.controlSlotsUsed // Get/Set the number of control slots used by a player
Updated get (js/commands/targeting/get.js) and set (js/commands/targeting/set.js) commands to support getting/setting the following character properties:
deaths
ownerCount (read only)
controlSlots
controlSlotsUsed
Updated NPC DFNs with default CONTROLSLOT=# tags
Increased the max distance from player that onSpeech JS event will trigger from 7 to 12
Updated how "all attack" and "all follow" commands for pets are handled. Now loops through all pets owned by character and executes command for each eligible pet
Fixed an issue where NPCs could follow characters in different worlds/instances than them selves
Updated default max amount of items that can be sold to NPC vendors from 5 to 250
Guards can no longer train players in skills
Updated equipment itemlists (dfndata/items/itemlists/itemlists.dfn) with blank entries to introduce some more variety in the type of clothes NPCs wear in general
Added new NPCs to DFNs (dfndata/npc/undead.dfn) and added them to undead npclist:
[skeletalmage] // variation of [bonemage]
[skeletalknight] // variation of [boneknight]
Updated Titles (dfndata/titles/titles.dfn) with up-to-date titles for skills around Pub 15, and added titles for skills added after that. Also added "Elder" and "Legendary" titles for 110 and 120 skillpoints
Updated EQUIPITEM tag in newbie.dfn (dfndata/newbie/newbie.dfn) to support an optional hue parameter (EQUIPITEM=id,hue)
Updated starting equipment for new characters (dfndata/newbie/newbie.dfn), with commented out practice weapons. Uncomment to use
Added item definitions for practice weapons (dfndata/items/gear/weapons/practice_weapons.dfn):
practice_skinning_knife
practice_hatchet
practice_axe
practice_mace
practice_longsword
practice_spear
practice_bow
practice_club
practice_crook
practice_gnarled_staff
Updated mount statues DFN (dfndata/items/misc/mount-statues.dfn) and JS (js/npc/pets/*.js) files to include pet control slot related stuff
Pets now inherit the karma of their owners, but revert to their original karma upon release
Pets and hirelings will no longer follow the ghosts of their dead owners, but stay to guard their corpse
Added optional 9th parameter for JS Function CreateDFNItem to specify a color for item created. This comes before the other optional parameters - worldNumber and instanceID (which are only used if character is NULL):
CreateDFNItem( mSock, mChar, sectionName, inPack, iAmount, itemType, iColor, worldNumber, instanceID )
Added ID of Giant Beetle to various pack animal checks
Pack animals will now drop any newbie/blessed items stored in their packs upon death
Added new NPC properties to track pet loyalty, and exposed these as Character JS properties, and NPC DFN tags:
JS Properties
.maxLoyalty // Defaults to 100
.loyalty // Starts at 25
DFN Tags
MAXLOYALTY=# // Defaults to 100
LOYALTY=# // Starts at 25
Updated TriggerEvent JS function to support return values (int, bool, string, object) from called script
Updated various JS scripts to make use of new TriggerEvent functionality and reduce reliance on custom tags:
js/item/archerybutte.js
js/item/trainingdummy.js
js/server/data/combatanims.js
js/server/data/weapontypes.js
Updated archerybutte script to use dictionary for system and text messages
Updated archerybutte script to support increased range, distance penalty and dex/str bonuses when calculating score
Added new UOX.INI settings under [pets and hirelings] section related to pet control and loyalty:
CHECKPETCONTROLDIFFICULTY=1 // Enable/Disable pet control difficulty system
PETLOYALTYGAINONSUCCESS=1 // Amount of pet loyalty gained on successful pet command use
PETLOYALTYLOSSONFAILURE=3 // Amount of pet loyalty lost on failed pet command use
PETLOYALTYRATE=900 // Amount of seconds between each time pet loyalty is automatically reduced by 1. Takes 25 hours to deplete completely from max
Added new persistent NPC property that keeps track of the difficulty of taming and controlling a pet, and exposed it as a Character JS property:
.orneriness
Every time a tamed pet is released or goes wild, its "orneriness" increases, making it more difficult for other players to tame, and more difficult for anyone to control.
Updated CBasePetResponse::canControlPet() function to use pet control difficulty system if enabled, which checks player's animal taming/animal lore skill vs a pet's "orneriness" to determine chance of pet accepting a given pet command
On successful use of pet command, increases pet loyalty by value defined in PETLOYALTYGAINONSUCCESS ini setting
On failed use of pet command, decreases pet loyalty by value defined in PETLOYALTYLOSSONFAILURE ini setting
Added new Character JS Method to calculate chance of a player successfully controlling the pet:
.CalculateControlChance( mChar ) // Returns value between 0 and 1000 indicating chance of success
Feeding a pet will now restore its loyalty to maximum
Pets will now lose loyalty on hunger checks when at maximum hunger
Pets that are maximum hungry will now only have a chance to go wild if loyalty has dropped to zero
Added new DFN tag for creatures.dfn - TYPE - which contains a string describing the type of creature
Added secure pet trading. Players who trade pets will now see a pet transfer deed appear in a secure trade window with the name and type of creature, and upon completion of the trade the associated pet will be instantly transferred to the other player
Updated resource JS scripts (js/server/resource/*) to use dictionaries for all system messages
Updated skill JS scripts (js/skill/*) to use dictionaries for all system messages
Updated housing JS scripts (js/server/house/*) to use dictionaries for all system messages
Updated item JS scripts (js/item/*) to use dictionaries for all system messages
Updated magic JS scripts (js/magic/*) to use dictionaries for all system messages
Updated NPC AI JS scripts (js/npc/ai/*) to use dictionaries for all system messages
Updated command JS scripts (js/commands/*) to use dictionaries for all system messages, gump tooltips, etc
Updated code to use dictionaries for all system messages
Fixed incorrect spelling for UOX.INI setting HIDEW(H)ILEMOUNTED and updated hiding skill (js/skill/hiding.js) to actually allow/disallow hiding while mounted based on this setting
Added new Character JS Method to make it easier to make one NPC initiate combat with another:
.InitiateCombat( targetChar ) // Character attempts to initiate combat with target character
Updated parrying portion of combat code to be in line with Pub15/pre-AoS parrying mechanics. High AR shields now absorb more damage on a successful parry, while low AR shields have a higher chance of parrying. Shields are also now more effective against archery attacks (full absorption potential) than melee attacks (half absorption potential).
Updated combat damage calculations to be in line with Pub15/pre-AoS damage calculations
Adjusted default value of COMBATNPCDAMAGERATE ini setting (damage divisor when target is a player) from 2 to 1 to account for these changes.
Removed dictionary.UNK, and made dictionary.ZRO the default dictionary used for all unsupported languages
Added dictionary support for additional languages: Portuguese, Italian, Czech
Updated default dictionaries for the following languages: English, French
Added default dictionaries for the following languages: German, Spanish, Portuguese, Italian, Czech (note that translations have been provided by automatic services and will contain inaccuracies!)
Added new UOX.INI setting to allow specifying a default dictionary language for server, which if set will force that language for all dictionary messages, regardless of client settings:
SERVERLANGUAGE=0 // Set default server dictionary language. Supported languages: 0 - None/language used by each client, 1 - English, 2 - German, 3 - Spanish, 5 - French, 6 - Portuguese, 7 - Italian, 8 - Czech
Added new function in combat.cpp - AdjustArmorClassDamage() - which adjusts the damage dealt in combat based on whether armour class (AC DFN tag or .ac JS property) of weapon and armour equipped on hit location of target match up. A weapon with armour class 1 would essentially be doubly effective against armour of armour class 1. Allows setting up things like piercing weapons being better against some armor types than mace weapons, etc.
Added new UOX.INI setting under [combat] to enable/disable double damage from armour class bonuses:
ARMORCLASSDAMAGEBONUS=0/1 //defaults to 0)
UOX3 now sends the appropriate packets (0x85 and/or 0x86) in response to client requests to delete a character from the char selection screen
Fixed an issue with fetching create entries in JS - was incorrectly limited by number of registered spells!
More code cleanup
Removed RemoveFromSight() from CItem::Update() in cItem.cpp, to address flickering issues with animated items, and for smoother updates of items on boats when sailing.
Added new flag in CBaseObject - damageable - which determines if an Item or Multi should be considered a damageable object.
Added new DFN tag for Items and Multis to mark objects as damageable objects
DAMAGEABLE=0/1 // If enabled, allows client to display healthbar for object, using object's hp/maxhp values as basis. Note that any changes to a damageable object's health will not be reflected in the client until a stat update has been sent.
Added new JS Property for Items and Multis and Characters to get/set an object's damageable flag
.isDamageable // 1 or 0
Added new JS Method for Items, Multis and Characters to force an update of the object's health bar to nearby players:
.UpdateStats( statType ) // statType can be 0 (Health, only one that works for items), 1 (Mana) or 2 (Stamina)
Updated DFN entries for training dummies (dfndata/items/houseaddons/house_addons.dfn) to include DAMAGEABLE=1 and HP=100 tags, and also updated script for training dummies (js/item/trainingdummy.js) with some extra features for dummies marked as damageable:
Show damage numbers over the training dummy when hit
Update health of training dummy based on damage received when hit
Restore health of training dummy to max after 4 seconds of inactivity
Updated 'fullstats and 'heal commands (js/commands/targeting/stats.js) to support restoring the health of a damageable object
Updated 'get (js/commands/targeting/get.js) and 'set (js/commands/targeting/set.js) commands to support getting and setting the damageable flag on objects
Updated updateStats() in uox3.cpp to work with CBaseObject instead of CChar
Updated statwindow() in CSocket.cpp to work with CBaseObject instead of CChar
Updated CPUpdateStat in CPacketSend.cpp to work with CBaseObject instead of CChar, to support sending packet 0xA1 to client for Items/Multis
Updated CPStatWindow in CPacketSend.cpp to work with CBaseObject instead of CChar, to support sending packet 0x11 to client for Items/Multis
Fixed an issue with outgoing packet 0x11 where a character's current HP might sometimes incorrectly be displayed as zero
Updated CPNewObjectInfo in CPacketSend.cpp to send object information packet 0xF3 to client with datatype set to 0x03 for Items/Multis marked as damageable objects, to enable the client's ability to display health-bars for these items.
Fixed an issue with JS Method for Items - .Refresh() - which previously did nothing, but now instead sends an update of item to all sockets in range
Added TryParseJSVal() helper function in cScript.cpp, used to parse jsval values returned from script events. Provides results matching 0 (0, false), 1 (1, true) or any specific int value returned from script.
JS events updated to use new TryParseJSVal helper function (no change in behaviour):
onDecay, onResurrect, onCommand, onBuyFromVendor, onSellToVendor, onPickup, onCharDoubleClick, onSkillGump, onUseBandageMacro, onCombatStart, onCombatEnd, onDeathBlow, onBuy, onSell
JS events with slight change of behaviour after update to use TryParseJSVal:
onDrop, onDropItemOnItem, onDropItemOnNpc - previously, a blank or non-existent return value would be treated the same as a return true. This will now be treated as a return false. Update scripts accordingly!
JS events updated to support return values from scripts:
onCollide, onTalk, onSnooped, OnHungerChange
Return false or nothing to prevent hard code from running
Return true to allow hard code to run like normal
onStolenFrom, onAISliver, onLightChange, onVirtueGumpPress, onQuestGump, onSpecialMove, onSwing, onClick, onHouseCommand, onSellToVendor, onSkillCheck, onSpellGain, onSpellLoss
Return false to allow hard code and other scripts with event to run like normal
Return true to prevent hard code and other scripts with event from running
onSteal
Return false or nothing to allow hard code and other scripts with event to run like normal
Return true to prevent hard code and onStolenFrom event from running (theft failed?)
Return 2 to prevent hard code, but allow onStolenFrom event to run (theft succeeded, but handled in script?)
onLeaving, onEntrance, onEquip, onUnequip, onEnterEvadeState, onSoldToVendor, onBoughtFromVendor, onSpellSuccess, onSpellTarget, onFlagChange, onDeath
Return false or nothing to allow other scripts with event to run like normal
Return true to prevent other scripts with event from running
Added new JS events that run prior to items being equipped/unequipped, with support for return values:
onEquipAttempt( pEquipper, iEquipping )
onUnequipAttempt( pEquipper, iUnequipping )
Return false or nothing to reject attempt to equip/unequip item, and prevent hard-code or other scripts with event from running
Return true to allow hard code to run like normal
Added new JS event that runs prior to onSnooped event, for character doing the snooping:
onSnoopAttempt( snooped, snooper )
Return false or nothing to prevent hard code and other snooping-related events from running
Return true to allow hard code and other snooping-related events to run like normal
Updated onSnooped JS event to accept return values:
Return true when success state is true to prevent other scripts with event from running
Return true when success state is false to prevent hard code and other scripts with event from running
Updated onClick JS event to also run for characters with event attached (return 1 to prevent showing hard-coded name for whatever object is clicked)
Updated onSteal JS event to include a third parameter, an object reference for the target of the theft
Added support for assigning multiple JS scripts per object (item, multi, char, region).
Any time a scriptID is added to an object, the list of such IDs for that object will be sorted from lowest to highest scriptID, which also determines the execution order for the scripts. Note that if the same JS event is present in several scripts assigned to an object, each of those events will trigger, unless the rules about return values for said event prevent this
DFNs for Items, Multis, Characters and Regions can now contain multiple SCRIPT=scriptID tags per definition. Each such SCRIPT tag will be applied to the object in question, then sorted from lowest to highest scriptID by server.
Added new JS property for Items, Multis, Characters and Regions:
.scriptTriggers // If used to get property, will return array object with all script IDs assigned to object. If used to set property, will add script ID to existing list of script IDs for object.
Modified JS property for Items, Multis, Characters and Regions, which for backwards compatibility functions similar to in older versions:
.scripttrigger // If used to get property, will return last script ID in list of script IDs assigned to object. If used to set property, will clear list of script IDs and assign only the new ID
Added new JS Methods for Items, Multis, Characters and Regions:
.AddScriptTrigger( scriptID ) // Adds a new scriptID to list of scripts assigned to object
.RemoveScriptTrigger( scriptID ) // Remove a specific scriptID from object (0 = remove all)
Moved SETSCPTRIG command from code to JS (js/commands/targeting/scptrig.js), and supplemented it with some additional commands:
GETSCPTRIG // List out all scriptIDs assigned to object
SETSCPTRIG scriptID // Clears list of scriptIDs for object, then assigns the specified scriptID
ADDSCPTRIG scriptID // Adds specified scriptID to list of scriptsIDs assigned to object
REMOVESCPTRIG scriptID // Removes specified scriptID from list of scriptIDs assigned to object (0 = remove all)
Updated LeaveBoat() function to use ValidSpawnLocation() instead of ValidMultiLocation() for more reliable disembarking from boats
Added support for the following boat commands (and their triggerword aliases):
raise anchor // Raise anchor, allowing boat to move
drop anchor // Drops anchor, preventing boat from moving
forward one // Moves boat one tile forward
backward one // Moves boat one tile backward
left one // Moves boat one tile in port direction
right one // Moves boat one tile in starboard direction
forward left // Moves boat forward left diagonally
forward right // Moves boat forward right diagonally
backward left // Moves boat backward left diagonally
backward right // Moves boat backward right diagonally
forward left one // Moves boat one tile diagonally, forward left
forward right one // Moves boat one tile diagonally, forward right
backward left one // Moves boat one tile diagonally, backward left
backward right one // Moves boat one tile diagonally, backward right
Added new enum BoatMoveType to keep track of all the additional boat movement types, and changed moveType from UI08 to SI08, in order to use -1 as a representation of an "anchored" and immovable boat
Boats now start out with anchor dropped when initially placed, and must also have anchor dropped before they can be packed up into model ships, while anchor must be raised in order for tiller man to accept orders to sail
Added support for two new DFN tags in houses.dfn, primarily for the use of boats/boat holds:
MAXITEMS=# // Max items that can be stored in a boat's hold
WEIGHTMAX=# // Max weight that a boat's hold can... hold (40000 = 400.00 stones)
Updated dfndata/house/house.dfn to include default MAXITEMS (125 items) and WEIGHTMAX (400 stones) values for boats
Fixed an issue where large dragon ships would be spawned with incorrect names due to server assuming they're houses
Fixed an issue where it was not possible to turn a boat around under certain circumstances
Tiller men on boats will now be named "a tiller man" if the boat is unnamed, and "The tiller man of [ship name]" if the ship has been named
Boats now cannot be dry-docked if there are items in the hold
Boats now cannot be dry-docked if either of the planks are open
Names of boats are now stored in the title property of ship models, and is used to reapply the boat's name when unpacking the boat, while the ship model itself is named after the boat with a [Dry Docked] tag slapped on at the end.
Replaced CDataList with the new GenericList class throughout UOX3, and removed CDataList from the project files
Reverted an earlier change where scriptsections were supposed to be reapplied to items bought from NPC shopkeepers - didn't actually work!
Removed ustring.h and ustring.cpp and references to these from the project as they have now been completely phased out by the move to std::string and the use of StringUtility.cpp/hpp
Finalized string handling modernization in cRaces.cpp, house.cpp, items.cpp, npcs.cpp, skills.cpp, ssection.cpp, ssection.h and targeting.cpp (punt)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
Fixed some missing icons in dfndata/creatures/creatures.dfn
Updated server status HTML template page (dfndata/html/online.htf) to match other templates
Additional string handling modernization in magic.cpp, JSEncapsulate.cpp, jail.cpp, house.cpp, fileio.cpp, network.cpp, msgboard.cpp and mapstuff.cpp (punt)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
Definitions for multis in dfndata/house/house.dfn now support the COLOUR and COLOURLIST tags, which will (if present) be applied to new multis that are added in-game. Colour for existing multis can be modified via the 'tweak command.
Custom tags can now be set for multis in dfndata/house/house.dfn via the DFN tags CUSTOMSTRINGTAG and CUSTOMINTTAG, which can be read later for a placed multi via JS Item method GetTag( tagName ). Syntax is identical to custom tags in Item/NPC definitions:
CUSTOMSTRINGTAG=tagName stringValue
CUSTOMINTTAG=tagName intValue
Updated JS SysMessage function to accept up to 10 extra, optional arguments, which can be used with dictionary messages that require additional parameters like %s or %i
Added new type of house privilege in cMultiObj.cpp to keep track of friends of the multi - HOUSEPRIV_FRIEND - which is stored during worldsaves as one or more Friend=<player serial> tags in house.wsc
Added new type of house privilege in cMultiObj.cpp to keep track of guests of the multi - HOUSEPRIV_GUEST - which is stored during worldsaves as one or more Guest=<player serial> tags in house.wsc
When items are created for houses upon house placement, a reference to the multi's serial is now stored in the house sign's MORE property to allow easier tracking of which house a particular sign belongs to
Added tracking of new, persistent properties for houses via cMultiObj.cpp/h:
lockdowns, secure containers, vendors, guests, friends, owners, ban location, public status, number of visits, timestamps
Added a multitude of new methods in cMultiObj.cpp/h to assist in improving the functionality of houses
Added new tags for houses in house.dfn (default values applied if tag not specified):
MAXSECURECONTAINERS=4 - Max amount of secure containers allowed in a multi
MAXLOCKDOWNS=256 - Max amount of lockdowns allowed in a multi
MAXVENDORS=10 - Max amount of vendors allowed in a multi
MAXBANS=50 - Max amount of bans in a multi's ban list
MAXFRIENDS=50 - Max amount of friends in a multi's friend list
MAXGUESTS=50 - Max amount of guests in a multi's guest list
MAXOWNERS=8 - Max amount of owners and co-owners in a multi's owner list
MAXTRASHCONTAINERS=1 - Max amount of trash containers allowed in multi
SCRIPT=<scriptID> - Assign a JS script-ID directly to a multi
FRONTDOOR - indicates that a door is the front door of a house. Cannot be locked in public houses!
INTERIORDOOR - indicates that a door is an interior door of a house. Can be locked in public houses.
BANX - Location X offset for multi's ban location, if not used, will try to use SE corner of multi instead
BANY - Location Y offset for multi's ban location, if not used, will try to use SE corner of multi instead
Added JS Event:
onHouseCommand( tSock, multiObj, cmdID ) - For handling spoken house commands via JS scripts attached to multi.
Updated JS Events:
onEntrance() - can now trigger both for multi being entered and/or object entering
onLeaving() - can now trigger both for multi being left and/or object entering
onSpeech() - can now also trigger for items (in addition to chars) with event & script attached, if UOX.INI setting ITEMSDETECTSPEECH is enabled
Added JS Multi methods:
.IsBoat() - Returns whether the item (or multi) is a boat
.IsOwner( playerToCheck ) - Returns whether a player is the owner of a multi
.IsOnOwnerList( playerToCheck ) - Returns whether a player is on the (co-)owner list of a multi
.IsOnFriendList( playerToCheck ) - Returns whether a player is on the friend list of a multi
.IsOnGuestList( playerToCheck ) - Returns whether a player is on the guest list of a multi
.IsOnBanList( playerToCheck ) - Returns whether a player is on the ban list of a multi
.AddToFriendList( playertoAdd ) - Adds player to the friend list of a multi
.RemoveFromFriendList( playertoRemove ) - Removes player from the friend list of a multi
.AddToGuestList( playertoAdd ) - Adds player to the guest list of a multi
.RemoveFromGuestList( playertoRemove ) - Removes player from the guest list of a multi
.ClearOwnerList() - Clears all entries from a multi's (co-)owner list
.ClearFriendList() - Clears all entries from a multi's friend list
.ClearGuestList() - Clears all entries from a multi's guest list
.ClearBanList() - Clears all entries from a multi's ban list
.SecureContainer( itemToSecure ) - Secures a container in a multi
.UnsecureContainer( itemToUnsecure ) - Unsecures a container in a multi
.IsSecureContainer( itemToCheck ) - Checks if specified item is a secure container in a multi
.LockDownItem( itemToLockDown) - Locks down an item in a multi
.ReleaseItem( itemToRelease ) - Releases a locked down item in a multi
.KillKeys() - Deletes ALL keys associated with a multi
.AddTrashCont( itemToAdd ) - Add trash container to multi's list of trash containers
.RemoveTrashCont( itemToRemove ) - Remove trash container from multi's list of trash containers
Added JS Item (Multi only) properties:
.lockdowns - Get the number of lockdowns in a multi
.maxLockdowns - Get/Set the max number of lockdowns allowed in a multi
.secureContainers - Get the number of secure containers in a multi
.maxSecureContainers - Get/Set the max number of secure containers allowed in a multi
.trashContainers - Get the number of trash containers in a multi
.maxTrashContainers - Get/Set the max number of trash containers allowed in a multi
.friends - Get the number of friends in a multi's friend list
.maxFriends - Get/Set the max number of friends allowed in a multi's friend list
.guests - Get the number of guests in a multi's guest list
.maxGuests - Get/Set the max number of guests allowed in a multi's guest list
.owners - Get the number of owners in a multi's owner list
.maxOwners - Get/Set the max number of owners allowed in a multi's owner list
.bans - Get the number of banned players in a multi's ban list
.maxBans - Get/Set the max number of banned players allowed in a multi's ban list
.vendors - Get the number of player vendors in a multi
.maxVendors - Get the max number of player vendors allowed in a multi
.deed - Get the item sectionID for deed used to place multi
.isPublic - Get/Set the private/public state of a multi
.buildTimestamp - Get the timestamp for when the house was originally placed
.tradeTimestamp - Get the timestamp for when the house was last traded to another player
.banX - Get/Set the ban location X offset for the multi
.banY - Get/Set the ban location Y offset for the multi
Added JS Character properties:
.multi = Get/Set the multi object the character is in
.accountNum = Get the account number the character belongs to
.housesOwned = Get a count of houses owned by the character
.housesCoOwned = Get a count of houses co-owned by the character
Updated JS cBaseObject Methods .FirstItem(), .NextItem() and .FinishedItems() to also support iterating through items in multis
Updated JS multi Methods .FirstChar(), .NextChar() and .FinishedChars() to support an additional parameter to specify what kind of characters to loop through:
"default" or no parameter - all characters inside the multi
"owner" - players on multi's owner list
"friend" - players on multi's friend list
"guest" - players on multi's guest list
"banned" - players on multi's ban list
Added new INI tags to a new section of uox.ini called [houses]
DECAYTIMERINHOUSE=3600 // Decay timer in seconds for non-locked down items inside houses
PROTECTPRIVATEHOUSES=1 // Toggles whether private houses will automatically boot unauthorized visitors (1) or not (0)
TRACKHOUSESPERACCOUNT=1 // Toggles whether to track (and restrict) house ownership per account (1) or per character (0)
MAXHOUSESOWNABLE=1 // Specifies the max amount of houses a player can own per account/char, depending on how house ownership is tracked
MAXHOUSESCOOWNABLE=10 // Specifies the max amount of houses a player can co-own per character
CANOWNANDCOOWNHOUSES=1 // Toggles whether players can own and co-own houses at the same time
COOWNHOUSESONSAMEACCOUNT=1 // Toggles whether characters on same account as house owner will be treated as co-owners
Added new INI tags in [settings] section of uox.ini:
ITEMSDETECTSPEECH=0 // If enabled, server will search for nearby items with onSpeech JS event running whenever a character speaks. Disabled by default.
MAXPLAYERPACKITEMS=125 // Defines max item capacity for player (and NPC) backpacks. Defaults to 125.
Moved most of the existing house functionality to JS and expanded upon it to reach feature parity with houses in regular UO around Publish 15/16, with various extras thrown in for good measure and all functionality being customizable:
js/server/house/house.js (15000) - handles detection of house commands and characters entering/leaving houses
js/server/house/houseSign.js (15001) - contains and handles all house-related gumps/menus and what is shown when players interact with house sign
js/server/house/houseCommands.js (15002) - handles functionality of house commands and other functionality such as transfer of ownership, demolishing house, etc.
js/server/house/houseDeed.js (15003) - handles initial rules that allow/disallow placement of additional houses for players
All house-related menus now fully handled through JS
All house commands and other functionality now fully handled through JS
Removed redundant hard-coded house functionality
Implemented Co-owners, friends, guests for houses, with access rules in place for entry, lockdowns, house commands, etc.
Implemented Private and Public houses
Implemented Secure Containers and Trash Barrels
Definable max lockdowns, secure containers, player vendors, bans, friends, guests, owners, trash containers and more - per house type
JS scripts can now be attached directly to houses
Doors in houses can be marked as front doors or interior doors, and will be treated differently with regards to private and public houses
Added new item to dfndata/items/containers/misc.dfn - [trashbarrel]
Added new JS script (js/items/trashbarrel.js) with trash barrel functionality for houses. Trash barrels that are marked as secure containers are only accessible by owners, co-owners and friends of the house. Various options available at top of script.
Updated js/items/axe.js to support chopping up trash barrels and house add-ons in houses owned by the player
Fixed an issue with house doors being left behind after demolishing houses while their doors were open
Fixed an issue where GMs could be banned from player houses
Added Line of Sight checks to speech, to give players some privacy in their own homes
Updated house placement code to more accurately check for other multis, dynamic and static objects when placing houses; now requires free space around each house that cannot be blocked by other houses or items that can block player movement, and disallows placement of houses on roads
Updated house placement code to move characters blocking house placement to SE corner of the house
Updated house placement code to disallow placing houses in guarded regions, or in dungeons
Added new DFN tag for regions to enable/disable player houses in specific regions: HOUSING=0/1
Added new region (247) that covers path to Valley of Eodon in Felucca
Added new region (248) that covers Valley of Eodon in Ter-Mur, with player housing disabled
Added new region (249) that covers entire T2A lands, with player housing disabled
Updated SPACEX and SPACEY values for all houses in dfndata/house/house.dfn to match updated house placement code
Added new JS property to Regions that can be used to determine or change state of player housing in a region: .canPlaceHouse()
Updated rules for usage of dye tubs to dye locked down items; now only house owners or co-owners may dye locked down items
Updated rules for usage of the following locked down items in a house, which are now only usable by house owners and co-owners
Dyes, Guildstone Deeds, Recall Runes (renaming), Rename Deeds, Townstone Deeds, House Deeds, Boat Models, Player Vendor Deeds, Ore, Hair Dye
Updated rules for usage of the following locked down items in a house, which are now only usable by house owners, co-owners and friends:
Keys, Dye Tubs, Magic Scrolls, Fireworks Wands, Magic Wands, Smithing Tools, Mining Tools, Fishing Poles
Updated item lockdown rules to allow locking down (and releasing) items in a container as long as the container is locked down, and to only allow releasing a locked down container if it's empty of locked down items
Updated item lockdown rules to only allow locking down movement-blocking items further than 2 tiles away from doors
Updated rules for releasing items in houses - now the house owner can release any locked down items, co-owners can release items locked down by themselves or by friends, while friends can release only items locked down by themselves
Added some feedback to player about why their attempted house placement failed
Items added by GMs directly into multis will now decay based on the house-specific decay timer instead of the regular one
Fixed an issue that could cause items to almost instantly decay after being released from lockdown in a house
Placing house add-ons now properly takes into account SPACEX and SPACEY values when checking if they can fit in selected area of houses
Re-added SPACEX and SPACEY values for Pentagram and Loom house add-ons
House add-ons can now be converted back into house add-on deeds by chopping them with an axe
Added new item type - IT_HOUSEADDON (201) - used by house add-ons placed in player houses
Fixed a bug where keys would stop working after being added to a keyring, and would turn into blank keys upon release from the keyring
Added visitor count for public player houses, which keeps track of how many visits a public house has received, with each player counted max 1 time every 24 hours
Fixed an issue with FindPlayersInOldVisrange() where it didn't take into account that players could see buildings further away than the standard update range. This could cause players to see ghost images of buildings if they were at the "right" distance when the building was being demolished
Added NODECAY tag to all signs and doors in dfndata/house/house.dfn
Added FRONTDOOR or INTERIORDOOR (as appropriate) to all doors in dfndata/house/house.dfn
Added BANX and BANY to specify ban location for some houses in dfndata/house/house.dfn instead of relying on finding SE corner automatically
Implemented strongboxes (js/server/house/strongbox.js) for co-owners of a house, which can be placed with the house command "i wish to place a strongbox". Max capacity is 25 items
Updated 'REMOVE command to take an optional parameter - itemID. If supplied, the command will remove all items with this itemID from a targeted container
Fixed a bug when checking if dynamic items were blocking valid spawn locations for NPCs, some function arguments were in the wrong order!
Improved code that finds valid spawn locations for items and NPCs spawned via spawn regions. As server gradually builds up lists of valid spawn locations per region over time, it will start using these lists more often, rather than always look for brand new spawn locations.
Fixed a bug with CMulHandler::CheckStaticFlag() that prevented NPCs from spawning inside buildings with no static floors!
Fixed an issue with repeating commands that prevented GMs from being able to cancel them when using the ClassicUO client
Exposed character property .accountNum to JS engine
Extended CDataList class to include a Clear() method for clearing lists
Updated JS File method .Open() to support an optional, third argument - subFolderName - that defines in which sub-folder of UOX3/shared/ to store/look for a file. If no third argument is supplied, UOX3 will default to using the shared folder itself.
Updated JS File method .Length() to return a value of -1 for files that don't exist
Added new code function, exposed to JS engine with same parameters, which simply checks if a given tile ID has a specific flag
bool CheckTileFlag( UI16 itemID, TILEFLAG flagToCheck )
Added JS function used to find the root container of an item (if any)
FindRootContainer( itemSerial )
FindRootContainer( item )
Added new JS function that allows deleting files from UOX3/shared/ folder or subfolders of shared folder. If no subFolderName is provided, looks for file directly in shared folder itself. Restrictions on file- and folder-names apply.
bool DeleteFile( fileName, subFolderName )
Added new JS functions for checking if a specific client or server feature is enabled. See documentation for full list of client/server features.
GetClientFeature( bitNum ) // Returns true if specified client feature is enabled on server
GetServerFeature( bitNum ) // Returns true if specified server feature is enabled on server
Added new JS function for returning the value of almost any server setting from UOX.INI
GetServerSetting( settingNameInDoubleQuotes )
Updated JS function DoesDynamicBlock() with two new parameters - checkOnlyMultis and checkOnlyNonMultis
Updated JS function DoesMapBlock() with two new parameters - checkMultiPlacement and checkForRoad
Fixed an issue where a LoS check would prevent players from accessing containers in their own backpack
Added new functions in findfuncs.cpp to make it easier to find items near another object or location:
findNearbyItems( object, distance )
findNearbyItems( x, y, worldNumber, instanceID, distance )
Added new Item property - maxItems - used by containers to determine their max item capacity
Added new Item property - totalItemCount - used to get total item count in a container (including sub-containers)
Added check for max item capacity when creating new items that are added to a character's backpack - items will be created below character's feet if backpack is full!
Added new DFN tag for items, used by containers to determine item capacity for a given container:
MAXITEMS=# // 125 is the default for all containers if not set
Added new JS Item properties:
.maxItems // gets/sets item capacity for a given container
.totalItemCount // gets total item count in a container, including sub-containers
Updated item tooltips for containers to show accurate total item count, as well as to display max item capacity
Fixed a bug where picking up items from a non-locked down pile of items on the floor inside a multi could cause the remaining pile to be seen as no longer inside the multi, disallowing locking it back down and causing it to decay based on regular decay timer instead of house-specific one
Updated JS command set to allow setting poison-level on items ('set poison #) and hunger-level on characters ('set hunger #)
Fixed an issue with js/item/food.js that prevented poisoned food from poisoning characters when eaten
Fixed an issue with js/skill/poisoning.js that prevented players from poisoning food!
Updated various JS scripts and hardcoded targeting functions to disallow the targeting of locked down resources using skills and tools
Updated JS Method TextMessage() to support three extra, optional parameters. Note that if one optional parameter is included, all preceding optional parameters are also required!
speechTarget - What kind of target is this message intended for?
0 - Only visible for sender and receiver of message
1 - Visible to all players in range
2 - Visible to all NPCs and players in range
3 - Visible to all PCs everywhere + NPCs in range
4 - Visible to all PCs everywhere (broadcast)
5 - Only visible for the receiver of the message
speechTargetSerial - The serial of the receiver of the message, used if speechTarget is 0 or 5
speechFontType - The type of font to display the text in. Defaults to normal.
0 - Bold
1 - Normal with shadow
2 - Bold with shadow
3 - Normal
4 - Gothic
5 - Italic
6 - Small, dark
7 - Colourful
8 - Runic (only works with CAPS)
9 - Small, light
Added timestamp to worldsaves in console, to make it easier to see when a particular world-save was done
Added info about compiler/environment displayed at the top of the UOX3 console during startup
Updated dictionary files with new messages primarily related to housing
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
Added an FX playing for successful uses of the parrying skill
Successfully parrying an attack will send a sysmessage to the player informing them of their feat, if DISPLAYHITMSG is enabled in UOX.INI
Updated dictionary files with new entry about blocking attacks using parrying skill
Fixed placing a house addon teleporting player to the location of the addon
Added support for TELEPORT tag to regions.dfn. If set to 0, use of the Teleport spell is not allowed in a given region. Defaults to 1 if not specified.
Exposed canTeleport JS property for regions
Updated regions.dfn to disable usage of Teleport spell within level 3 of the Wisp dungeon
Updated regions.dfn to enable usage of RECALL spell in city/dungeon of Wind (so players can recall out of there)
Added missing UOX.INI settings for feature negotation, as mentioned in previous commit!
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call