Document script-owned temporary effect callbacks and effect 44 parameters, add the new events to JavaScript definitions, and describe the REAGENT and SPELLBOOKDATA DFN syntax and compatibility behavior.
- [ADD] The original spawn location is now stored for NPCs when they spawn
- [ADD] Added new character JS properties: .spawnX, .spawnY and .spawnZ. These are primarily used to store original spawn location of NPCs.
- [FIX] Fixed an issue where NPCs would fail in many cases to pathfind back to their bounding box after leaving it. They now pathfind back to original spawn location instead.
- [ADD] Added nonMouseClickEvent boolean parameter to onCharDoubleClick() so scripts can detect non-mouse/client-generated character double-click events.
- [ADD] Added new onPaperDoll() JavaScript event for handling paperdoll opening separately from onCharDoubleClick().
- [UPDATE] Updated dismountetherealmount.js, petbonding.js, cow_tipping.js, and mount_restrictions.js for the new onCharDoubleClick() event signature.
- [UPDATE] Updated scripting docs, definitions.d.ts, and event metadata for onCharDoubleClick() and onPaperDoll().
- [FIX] Fixed cases where onCharDoubleClick() scripts could unintentionally react to non-mouse/client-generated self double-click events.
[ADD] Added new DFN tag for spawn regions: ADDSCRIPT
Allows region-based scripts to be attached and executed on spawn events
[ADD] Added new script events:
onSpawn — triggered when an object or character is spawned via a spawn region script
onKill — triggered when a character kills another character
[UPD] Updated documentation to include the new script events and DFN tags
- [UPD] Updated FindItem() and FindItemBySection() JS Functions to also find items that are within +/- 5 Z of target location; Z no longer acts as an absolute condition
Added back in the dictionary entries for Dawn's Music Box, which somehow got lost in the first submission
Moved several Event Manager object properties from script to DFN
Added in typedef comments for functions in event manager script
Added in missing code to properly trigger onScriptLoad after script reloads
- [ADD] Added new JS Event that runs once for all scripts after shard has fully started up:
- onScriptLoad()
- [ADD] Added new JS Event that runs for all instances of scripts attached to objects after shard has fully started up:
- onStart( myObj ) // myObj can be a Character, Item or TownRegion
- [ADD] Added new JS Function to find nearest item with a specific section ID at a given location:
- FindItemBySection( x, y, z, world, sectionId, [instanceId] )
- [ADD] Added new Event Manager system that initializes on shard startup, which listens to event registrations from other scripts and schedules these events to be run once, a number of times with an interval, or recurring on specific day(s)/time of the week. See UOX3 documentation for full details. System can be enabled or disabled via a new setting in uox.ini:
- EVENTMANAGERSYSTEM=0/1 // Defaults to enabled
- [ADD] Added a global JS constant to detect in scripts whether UOX3 runs in debug mode:
- UOX_DEBUG_MODE // Ex: if( UOX_DEBUG_MODE )
- [FIX] Fixed an incorrectly named socket variable in js/item/potion.js
- [ADD] Added new GM command 'showspawnregions (js/commands/targeting/showspawnregions.js) which will visualize all spawn regions within range of targeted location for a short duration
- [ADD] Added new GM command 'spawnregionadmin (js/commands/spawnregionadmin.js) which shows a filterable list of all spawn regions in the game. Clicking the name of the spawn region in the menu will open up the tweak menu for said spawn region. Note that all changes done to spawn regions are temporary in nature, and only last until the next server restart (where it again reads from spawn region DFN files)
- [UPD] Updated 'tweak command to support modifying (temporary) of Spawn Regions. Can be accessed via spawnregionadmin command
- [UPD] Extended JS Function DoMovingEffect to support another optional parameter, a flag to specify if effect is stationary (true) at source location or not (false, default). Updated syntax:
- DoMovingEffect( srcObject, trgObject, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
- DoMovingEffect( srcObject, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
- DoMovingEffect( srcX, srcY, srcZ, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
- [UPD] JS Function GetSpawnRegion has been split into two, one that accepts a singular spawn region ID param, and one that accepts coordinates for a location and returns all spawn regions found there:
- GetSpawnRegion( spawnRegionID ) // Returns reference to specificed spawn region
- GetSpawnRegions( x, y, worldnumber, instanceID ) // Returns list of references to all spawn regions at specified area
- [UPD] IterateOverSpawnRegions JS function now supports an optional socket parameter, which becomes available as a parameter in OnIterateSpawnRegion event if included
- [FIX] Fixed an issue with Spawn Region JS Objects where the .y1 property would return the same value as .x2
- [FIX] Fixed an issue with js/npc/pets/petbonding.js that prevented successful script compilation
- [ADD] Added functionality to trigger a server restart from within UOX3, either via console ('R'), command ('restart) or JS Console Method (.BeginRestart()). This will first perform a world save, then do a clean shut down before restarting UOX3 in a new process