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.
- [UPD] UOX3 now supports Z as a third dimension for NPC pathfinding; automatically used in most places in code, it can also be triggered via .WalkTo() and .RunTo() JS Methods, which have been updated to support target Z coordinate. This means NPCs can now navigate up and down stairs, move between floors of buildings, etc.
- [UPD] NPCs will recalculate their path less often now in situations with little-to-no change since last they got a valid path, if they still have remaining steps in their previously calculated path. However, the more time passes from the original pathfind calculation, the more likely it is to retrigger.
- [UPD] Updated 'xwalk and 'xrun GM commands (js/commands/targeting/xwalk.js), hireling AI (js/npc/ai/hireling.js) and Herding skill (js/skill/herding.js) to make use of "3D pathfinding"
- [FIX] Fixed some issues with pathfinding code that could result in invalid results for what should be valid paths
- [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
[FIX] Resolved socket-related errors in petbonding.js that could cause script failures during bonding interactions.
[ADD] Added missing JavaScript API documentation entries for Console Functions: RegisterConsoleFunc, DisableConsoleFunc, and EnableConsoleFunc.
[ADD] Added missing JavaScript API documentation entries for Town Functions: GetTownRegionFromXY.
[ADD] Added missing JavaScript API documentation entries for Misc Functions: GetMoongateFacetStatus, SetMoongateFacetStatus, GetCharacterCount, GetItemCount, GetMultiCount, GetServerVersionString, and EraStringToNum.
- [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] Introduction of speedhack anti-cheat system which can detect when players are moving faster than intended and throttle them (default) while also allowing custom reactions via JS events. This system is governed by the following new settings in [anticheat] section of uox.ini:
- SPEEDHACKDETECTION=1 // Enables/disables speedhack detection system
- SPEEDHACKTHROTTLEPENALTY=2000 // Movement throttle penalty (in ms) applied when speedhack is detected
- SPEEDHACKMAXDEBT=350 // Max movement debt (in ms) player can accumulate before throttling occurs
- SPEEDHACKMAXDEBTAVG=0.5 // Max (moving) average debt as a factor of SPEEDHACKMAXDEBT player can accumulate before triggering logging for suspicious activity
- SPEEDHACKMAXCREDIT=-75 // Movement credit (in ms) that acts as buffer for regular players against jitter, lag, etc
- SPEEDHACKGRACETHRESHOLD=2000 // Grace threshold to handle large server/network lag spikes.
- [ADD] Added new JS Events that allow reactions to detection/suspicion of speedhacking:
- onSpeedHackDetection( pChar, deltaTime ) // Triggers when a player has crossed max threshold for speedhack detection
- onSpeedHackSuspicion( pChar, rawMoveDebt, deltaTime ) // Triggers when a player has consistently crossed threshold for speedhack suspicion
- [ADD] New JS Socket Properties:
- .moveDebt // Accumulated time debt in ms indicating whether player's movement packets arrive early (potential speeding) or late (lag)
- .moveDebtAvg // Accumulated time debt in ms, on average over at least 100 samples
- .moveBurstAllowance // Number of upcoming movement steps that will be processed without incurring debt or penalty
- .nextMoveTime // Timestamp in ms for when next valid movement packet is expected to arrive
- [ADD] Added new system timers for Sockets and exposed to JS:
- TIMER.SPEEDHACKPENALTY // Time until next time player is allowed to move after getting throttled by anti-cheat
- TIMER.SPEEDHACKLOGGED // Time until next time suspicious speed-hack related behavior is logged
- [FIX] Fixed a 20+ year old movement desynch bug that would cause players to start rubberbanding after taking ~255 steps
- [UPD] Updated UOX3 and JS documentation with entries related to the new anti-cheat system,
- [UPD] Updated dictionary files with new system message for anticheat, and addressed some duplicate ID issues
- [UPD] updated documents was missing .karmaLock
- [FIX] Fixed potion.js had decay when should of been decable.
- [UPD] Updated many JavaScript scripts to use consistent socket naming — standardized all instances to pSocket instead of variations like psock or socket.
- [FIX] Fixed Shrine Script to use the correct karmaLock instead of karmaLocked.
- [ADD] Added null socket checks in scripts to prevent crashes when socket is unavailable.
- [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
- [ADD] Integrated FindGuildId( const CGuild* ) in guild relation functions for better JS mapping (Thanks to Xuri for the base implementation)
- [ADD] Added new JS Function:
- CreateNewGuild() // Returns the guild object for further setup
- [ADD] Added new Guild JS Methods: .AddMember( targChar ), .AddRecruit( targChar ), .RemoveRecruit( targChar ), .RemoveMember( targChar ), .RecruitToMember( targChar ), .IsAtWar( targetGuild ), .IsAlly( targetGuild ), IsNeutral( targetGuild )
Added documentation entries for all new guild/character functions and methods
- [ADD] New JS Event that triggers when GUILD button in paperdoll is pressed:
- onGuildButton( mChar )
- [ADD] Added new Guild JS Property: .id (guild number)
- [ADD] Added new Character JS Property: .guildNumber
- [UPD] Updated Guild JS Methods and renamed them:
- Renamed .NewMember( trgChar ) to .AddMember( trgChar )
- Renamed .NewRecruit( trgChar ) to .AddRecruit( trgChar )
- Renamed .GuildIsAtWar( targetGuild ) to .IsAtWar( targetGuild )
- Renamed .GuildIsAlly( targetGuild) to .IsAlly( targetGuild )
- Renamed .GuildIsNeutral( targetGuild ) to .IsNeutral( targetGuild )
- [UPD] Removed Character JS Method .CheckGuild(). Can be checked via .guild and/or .guildNumber properties
- [UPD] 'get command can now be used to fetch guild information for characters. Example: 'get guild / 'get guildnumber
- [UPD] Updated 'add item sectionID command to support optional amount. New syntax: 'add item sectionID amount
- [FIX] Fixed an issue with 'wholist command where characters with serials in the millions would not show up in the list
Bumped up version number
Added workflow file (github-releases-to-discord.yml) that will publish UOX3 GitHub releases to Discord
Updated UOX3Build.yml workflow file to ignore pushes with "-release" version tags
Updated CMakeLists.txt to include installation rules for creating release packages
Updated readme.md with some up-to-date details and fix for broken build-status badges
Excluded player pets from MONSTERSVSANIMALS/ANIMALATTACKCHANCE ini settings; player pets are now always valid targets in combat for NPCs (unless player is a Young character)
Fixed an issue with poison damage in combat where the poison resist of the attacker was checked instead of that of the defender
Fixed an issue where the poison details in tooltip of an item would only be visible when equipped, and not visible when kept in backpack
Fixed an issue where if a weapon was destroyed due to corrosion damage, it would not unset the poison strength on the character who wielded it
Added new Character/Item property to track the source (serial) of poison applied to an object. This is available as a JS Char/Item property:
.poisonedBy // serial of character who applied poison to an object. Set to 0xFFFFFFFF/SE_INVALIDSERIAL() to clear
Updated all code and scripts related to setting/unsetting poison effect on objects to also update the .poisonedBy property
Serial of character who poisoned a character who died while poisoned is now stored on the corpse
Added third optional parameter to Character JS Method .SetPoisoned() that can be used to specify source char of applied poison. New syntax:
.SetPoisoned( poisonLevel, wearOffTime[, poisonSourceChar ])
Updated UOX3 & JS documentation
Added new JS command: 'seeryell [text] // broadcast message to all with seer privs or higher privs
Added new privilege flag for characters:
0x20000 - Seer (Character is a Seer)
Fixed an issue where Young players could not direct hirelings to attack valid targets (js/npc/ai/hireling.js)
When buying items from NPC shopkeepers worth more than the BUYTHRESHOLD in uox.ini, the player's backpack is first checked for the required amount of gold, before their bankbox is checked. A new message is displayed about any gold withdrawn from player's bank.
When selling items to NPC shopkeepers that are worth more than the BUYTHRESHOLD in uox.ini, the gold is now deposited directly into the player's bankbox, instead of to their backpack. A new message is displayed about any gold deposited to the player's bank.
Fixed an issue with Shopkeeper AI (js/npc/ai/shopkeeper.js) where the NPC would incorrectly assume player was member of the same NPC guild as them, and provide them with an unwarranted bonus to trade prices as a result
Fixed an issue that prevented players from being able to apply poison to weapons (js/skill/poisoning.js)
Fixed incorrect NPC spawn entry in Khaldun spawn region DFNs: spectralarmour -> spectralarmor
Added entries for Orc Caves/Khaldun to GM travel menu (dfndata/items/travelmenu.dfn and travelmenu.bulk.dfn)
Fixed an issue that sometimes prevented admin characters from seeing offline GMs
Added support for reading SKILLCAPSINGLE ini setting with GetServerSetting() JS function
Fixed issue where animal trainers would give players a random ostard when buying a desert ostard (js/npc/pets/static_ostard.js and dfndata/items/misc/mount-statues.dfn)
Added DFN entries for additional ostard-mount-statues (not sold by animal trainer) that can give user a random ostard, forest ostard or frenzied ostard respectively (dfndata/items/misc/mount-statues.dfn)
Player pets are no longer safe from being attacked from monsters. This also addresses an issue with tamed pets being able to freely attack monsters if player gets the monster's attention first and then kites the monster around while pet kills it. Now monster will properly re-focus to nearest attacker (including pets) if original target is too far away
Fixed incorrect command-levels for GMs for hard-coded commands listed in commands.dfn
Added support for specifying minEra,maxEra value pair for teleport locations in js/teleport.scp. These can be used to define the minimum and maximum era a given teleport entry should be active for. The values for these default to -1, unless otherwise specified. Updated teleport entry format:
sourceX, sourceY, sourceZ, targX, targY, targZ, [sourceWorld, targWorld[, minEra, maxEra]]
Updated teleport entries for Yew <-> Heartwood to only be active for ML era shards and above (js/teleport.scp)
Updated regions for Moonglow and Skara Brae to properly cover dock areas (dfndata/regions/regions.dfn)
Added missing dictionary entries related to poison/corrosion update
Added some missing details for poisoning skill (js/skill/poisoning.js) and arms lore skill (js/skill/armslore.js)
Added missing details for 'tweak (js/commands/targeting/tweak.js), 'get and 'set (js/commands/targeting/get.js and set.js) commands related to poison charges and poison strength on items
Updated poison strength of poison elementals [poisonele] from 4 to 5 (dfndata/npc/elementals.dfn)
Fixed an issue with Spawner Object Editor where state of "Use Spawnlist" checkbox would not be read correctly if no "Spawner Type" radio buttons were selected (js/server/misc/spawner_editor.js)