Commit graph

77 commits

Author SHA1 Message Date
Xoduz
8a6951cb11 Oops, missed one
Oops, missed one
2025-05-04 01:58:29 +08:00
Xoduz
29ac82cc21 Misc fixes
Fixed an error on shutdown when running UOX3 in debug mode in VS due to CCommands constructor attempting to unnecessarily clear CommandMap, TargetMap and JSCommandMaps
	Fixed an issue in Portuguese dictionary where a commented line was lacking a forward slash
	Fixed some soft exceptions related to loading of dictionary files
	Fixed soft exceptions related to checking file sizes of potentially non-existing worldfiles on startup
	Fixed some soft exceptions related to loading of regions from DFNs and townregions from WSC
	Fixed misordered datatype entries in dfnDataTypes for DFNTAG_DYEHAIR and DFNTAG_DEFENSECHANCE
	Fixed double "GET" entry in strToDFNTag mapping. One of them should've been "GETUO"
	Fixed strToDFNTag mapping error for "LOYALTY" DFN tag, which was being incorrectly mapped to DFNTAG_MAXLOYALTY
	Added missing strToDFNTag entry for WILLTHIRST DFN tag
	Removed unknown and unused DFN tag/mapping named SKILLVAR
	Fixed misordered DFNTAG_SWINGSPEEDINCREASE entry in DFNTAGS enum, which caused tags following it to be associated with incorrect datatypes
	Fixed some crash/slowdown issues with reloading of all JS scripts (console menu option 8), especially noticable in VS debug mode
	Fixed an issue where shopkeepers would sometimes fail to recognize items they should want to buy from players due to section ID case sensitivity
2025-05-04 01:54:56 +08:00
Xoduz
5fbeb04f2b Misc Fixes and Updates
Added support for MAXWEIGHTBONUS DFN tag for races, to allow increasing weight that can be carried by specific race, and a new GetWeightMax() code function to do the necessary calculations on demand
Updated [default race bonuses] UOX.INI section with the following new settings for the 3 default playable races (only used if nothing else specified in races.dfn):
	HUMANMAXWEIGHTBONUS=0
	ELFMAXWEIGHTBONUS=0
	GARGOYLEMAXWEIGHTBONUS=0
Added support for ALLSKILLSG and ALLSKILLSL DFN tags for races, which allow defining skill bonus or loss across all skills for a given race
Added new Character JS Method for adding skill points without triggering skillchange JS Events:
	.AddSkill( skillID, skillAmt, triggerEvents[true/false] )
Added new Boat JS Property to allow getting/setting movement types for Boats via scripts:
	.moveType // See UOX3 JS Engine Docs > JS Object Properties > Multi Properties for a detailed list of all supported movement types
Added new Boat JS Method to allow turning boats via scripts:
	.TurnBoat( turnDir ) // 0 = straight (no turning), 1 = turn left, 2 = turn right, 3 = flip around
Updated IterateOver/OnIterate JS Function/Event to support passing in optional socket parameter. New syntax:
	IterateOver( objectType[, socket ]);
	.OnIterate( sourceObject, targetObject, socket )
Updated Character/Item JS Method .Refresh() to support an optional socket argument, to specify which player to refresh the object for. New syntax:
	.Refresh( [socket] )
Added support for new region setting that can define a region as disabled/enabled via DFN (tag) or script (JS property). Disabled regions will be ignored by UOX3:
	DISABLED=0/1 // Region DFN tag
	.isDisabled // Region JS Property
Fixed issue where JS tags and temporary JS tags would not be copied over when duplicating a character or item
Removed strength requirements from base shield definitions - stats like these are handled per era (dfndata/items/gear/armor/base_armor.dfn)
Fixed an issue where necromancer newbie armor would incorrectly inherit base versions of leather armor without stats (dfndata/items/gear/armor/leather_armor/leather.dfn)
Fixed an issue where players would not correctly leave combat after hiding (js/skill/hiding.js)
Fixed an issue with Healing skill where skill-checks for healing/veterinary would fail due to a misspelled variable (js/skill/healing.js)
Updated smart-turn furniture script to prevent players from being able to turn furnitures that are occupied by characters (js/server/misc/furniture_smartturn.js)
Updated Buff-bar script to only add buffs for client versions higher than 5.0.2, the client patch where this feature was added (js/server/network/0xDF_buffBar.js)
Updated Vendor BDO Dispenser script to add alternative reward-table for AoS era (js/npc/ai/vendor_bdo_dispenser.js)
Cleaned up some code (spaces to tabs, indentation, spacing)
2025-04-23 00:01:53 +08:00
Geir Ove Alnes
3d1ea6ac00
Merge branch 'develop' into AOS-Properties-Regenation 2025-04-20 07:10:35 +08:00
Xoduz
82f473f00a Rework of passive stat regeneration
Updated code calculating passive health, stamina and mana regeneration for characters, based on new UOX.INI settings and bonuses from characters/items/races
	Added three new Character/Item/Race DFN tags to grant bonus health/stamina/mana regeneration:
		HEALTHREGENBONUS=# 	// 10 bonus points equates to 0.01 extra hp regen per second, independent of era
		STAMINAREGENBONUS=# // 10 bonus points equates to 0.05 extra stamina regen per second
		MANAREGENBONUS=# 	// 10 bonus point equates to 0.1 extra mana regen per second
		...also available as JS Properties:
			.healthRegenBonus
			.staminaRegenBonus
			.manaRegenBonus
	Updated get/set JS commands to allow getting/setting regen bonuses for health, stamina and mana
	Updated races.dfn to include default +2 health regen bonus for humans, and +2 mana regen bonus for gargoyles.
	Added new UOX.INI settings under [Skills and Stats] section:
		HEALTHREGENMODE=1 	// 0 = no passive health regen, 1 = default passive health regen
		STAMINAREGENMODE=1 	// 0 = no passive stamina regen, 1 = default passive stamina regen (LBR or below), 2 = AoS or beyond, 3 = SA and beyond
		MANAREGENMODE=1 	// 0 = no passive mana regen, 1 = default passive mana regen (LBR or below), 2 = AoS (Pub17), 3 = AoS/SE (Pub18 and beyond), 4 = ML, 5 = KR, 6 = SA and beyond
		HEALTHREGENCAP=#  	// Max cap for Health Regeneration Bonus stat per character
		STAMINAREGENCAP=# 	// Max cap for Stamina Regeneration Bonus stat per character
		MANAREGENCAP=#		// Max cap for Mana Regeneration Bonus stat per character
	Added new UOX.INI section ([default race bonuses]) with the following new settings for the 3 default playable races (only used if nothing else specified in races.dfn):
		HUMANHEALTHREGENBONUS=0 	// default health regen bonus for human race (2 from ML expansion onwards)
		HUMANSTAMINAREGENBONUS=0 	// default stamina regen bonus for human race
		HUMANMANAREGENBONUS=0 		// default mana regen bonus for human race
		ELFHEALTHREGENBONUS=0 		// default health regen bonus for elf race
		ELFSTAMINAREGENBONUS=0 		// default stamina regen bonus for elf race
		ELFMANAREGENBONUS=0 		// default mana regen bonus for elf race
		GARGOYLEHEALTHREGENBONUS=0 	// default health regen bonus for gargoyle race
		GARGOYLESTAMINAREGENBONUS=0 // default stamina regen bonus for gargoyle race
		GARGOYLEMANAREGENBONUS=0 	// default mana regen bonus for gargoyle race (2 from SA expansion onwards)
	Updated UOX3 Documentation with new feature section on Stat Regeneration with details on stat regeneration rules and recommended settings per UO era
	Added support for Medable armors (have no effect on meditation skill and/or passive regen of mana when worn) and Mage Armors (can turn non-medable armor into medable armor)
		These properties are defined per armor piece using the first and second bits of the MORE property:
			MORE=0x1 0x0 0x0 0x0 // Medable Armor
			MORE=0x0 0x1 0x0 0x0 // Mage Armor
		The following armor types have been marked as medable by default:
			leather armor, leather ninja armor, leather samurai armor, leaf armor, gargish cloth armor, gargish leather armor and all hats and masks
	Updated JS Method .Defense() to support optional fourth and fifth parameters - excludeMedableArmor (true/false) and includeShield (true/false)
	Updated CalfDef function to support including shields in the calculations, and updated mana regen code to include shields when checking for equipped armor
	Updated Meditation skill JS script to exclude medable armor from armor check, include shields, and apply different rules for active meditation depending on mana regen mode
	Updated stat window to include defensive rating of shields (based on Parrying skill) and/or elemental resistances (if enabled in ini)
	Added a new property to CRace class, which is automatically set and incremented as UOX3 loads in races from races.dfn: raceID
	Added new Getters/Setters for CRace class to retrieve ID of a specific Race object
	Updated JS property .id for Race JS Object to return new race ID instead of iterating through list of races to compare race object and return index
	Reloading DFNs now also reloads Races
2025-04-20 06:05:44 +08:00
Geir Ove Alnes
b0d538b929
Merge branch 'develop' into Tithing 2025-03-10 04:54:07 +08:00
Dragon Slayer
34064c30c5 update tithering 2025-03-08 21:10:37 -06:00
Dragon Slayer
426f816cf8 Added Luck
Added Changelog for Luck
Added Document for Luck
2025-03-08 15:43:24 -06:00
Dragon Slayer
cb1a3c7471 changes 2025-03-04 15:25:53 -06:00
Dragon Slayer
5c03abe17c
Merge branch 'develop' into durabilitypr-replacement 2025-01-28 20:11:05 -06:00
Geir Ove Alnes
9812074558
Merge branch 'develop' into Lower-Requirement-AOS-Propertie 2025-01-26 01:36:30 +08:00
Geir Ove Alnes
4fb3d038a0
Merge branch 'develop' into Swing-Speed-Increase 2025-01-25 23:55:45 +08:00
Geir Ove Alnes
d002b87a9b
Merge branch 'develop' into leech-aos-propties 2025-01-25 16:36:20 +08:00
Geir Ove Alnes
c3f153ff3c
Merge branch 'develop' into Hit/Defense-Chance-Bonus 2025-01-25 15:56:06 +08:00
Dragon Slayer
1fd3a5a0f7
Merge branch 'develop' into leech-aos-propties 2025-01-18 11:52:55 -06:00
Dragon Slayer
c5d8955c4d
Merge branch 'develop' into Swing-Speed-Increase 2025-01-18 11:51:28 -06:00
Dragon Slayer
3465ffa7d7
Merge branch 'develop' into Hit/Defense-Chance-Bonus 2025-01-18 11:02:27 -06:00
Dragon Slayer
cff7dc832c
Merge branch 'develop' into Three-New-AOS-Props 2025-01-18 10:51:11 -06:00
Dragon Slayer
8ad410fe92
Merge branch 'develop' into Lower-Requirement-AOS-Propertie 2025-01-16 23:44:12 -06:00
Dragon Slayer
21082cf4eb Update ssection.cpp 2025-01-16 21:35:32 -06:00
Dragon Slayer
481f716f6e update 2025-01-14 22:32:25 -06:00
Dragon Slayer
da9267ac98 Added AOS Leech Properties 2024-06-18 18:28:50 -05:00
Dragon Slayer
2694dbc502 Match uox3 Style 2024-06-16 18:57:27 -05:00
Dragon Slayer
dba9daedd5 format changes 2024-06-16 02:25:57 -05:00
Dragon Slayer
59c2ba633a small format changes 2024-06-16 02:00:40 -05:00
Dragon Slayer
3e7e8bccb3 Swing Speed Increase 2024-06-16 01:37:31 -05:00
Dragon Slayer
363ce296c4 Hit/Defense Chance Properties 2024-06-14 14:38:03 -05:00
Xoduz
b45e4bce48 Minor update
Regen function/property names updated to be more in line with existing naming conventions
Fixed an issue where health regen setting would be loaded for both health, stamina and mana when parsing uox.ini
2024-06-08 17:03:16 +08:00
Dragon Slayer
2cec24c989 Three New AOS properties 2024-05-13 19:01:20 -05:00
Dragon Slayer
27461c908a Added ArtifactRarity
-ARTIFACTRARITY=#
	-Artifact Rarity is an item property that is visible on some artifacts and meant to give players an idea of how rare the item is. Items with rarity 1 are supposed to be common while rarity 12 are extremely scarce.
2024-05-09 20:22:58 -05:00
Dragon Slayer
3f5efab632 Lower Requirements Propertie
Added AOS Lower Requirement propertie.
2024-04-30 23:29:39 -05:00
Dragon Slayer
6b542d512e AOS Properties Regenation 2024-04-30 13:46:57 -05:00
charles
e2cfe011c6 Stream replacement
This changes all routine calls that wanted a specific type of stream ifstream/ofstream to the generic istream/ostream.  So you can use stringstream, or other derived types.
2023-08-27 21:42:47 -04:00
Xoduz
c53a14456e More young player stuff
Added new Item DFN tag - SPELLS - which specifies which spells a spellbook starts with, using the following syntax: SPELLS=0x00000000,0x00000000,0x00000000
	The existence of a spell from within each circle have specific values (0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80), and a combined value of 0xff if all spells in said  circle are present.
	The first comma-separated value in the SPELLS tag represents spell values for circles 1 to 4, while the second comma-separated value represents the spell values for circles 5 to 8. The third comma-separated value is currently unused.
	The last two digits (0x000000##) of the first value in the SPELLS tag represent the combined value of spells from the first circle, the 5th and 6th digits (0x0000##00) spells from second circle, the 3rd and 4th from third circle (0x00##0000), and the 1st and 2nd from fourth circle (0x##000000). Repeat for the second value in the tag, with fifth (last two digits) to eight (first two digits) circle spells.
	Examples:
		spellbook with only 1st circle spells: SPELLS=0x000000ff,0x0,0x0
		spellbook with only 2nd circle spells: SPELLS=0x0000ff00,0x0,0x0
		spellbook with 1st - 2nd circle spells: SPELLS=0x0000ffff,0x0,0x0
		spellbook with only 2nd and 5th circle spells: SPELLS=0x0000ff00,0x000000ff,0x0
		spellbook with only 4th and 8th circle spells: SPELLS=0xff000000,0xff000000,0x0
		spellbook with all spells, from all eight circles: SPELLS=0xffffffff,0xffffffff,0x0
Added Item DFN entries for spellbook pre-filled with circles 1 to 4, and for spellbook pre-filled with all spells, and added these to GM 'add menu (dfndata/items/magic/misc_magic.dfn)
Fixed an incorrect character reference in Spyglass script (js/item/spyglass.js)
Added Item DFN entry for a fireworks wand with 50 charges (dfndata/items/gear/magic_items.dfn)
Added script for new player ticket (js/item/consumables/new_player_ticket.js)
2023-07-02 02:41:28 +08:00
Xoduz
6a8c09bb15 Thief Revamp - 0.99.6-RC5
Added script for NPC guildmasters (js/npc/ai/guildmaster.js). Only one NPC guild has been setup in the script so far (more can be easily added) - the Thieves Guild - which if joined grants players the ability to steal from other players and to buy disguise kits
Added two new NPCs, which there will now spawn one of in a random location in each city in Britannia (felucca facet):
	m_thief_guildmaster (dfndata/npc/male_human.dfn)
	f_thief_guildmaster (dfndata/npc/female_Human.dfn)
Added two new character properties to keep track of which NPC guild a player (or NPC) belongs to. These properties have been exposed as the following Character JS properties:
	.npcGuild 		// ID of NPC guild, as defined in script
	.npcGuildJoined // Timestamp for when player joined NPC guild
Added script for Disguise Kits (js/item/disguisekit.js). These allow members of the Thieves Guild to disguise themselves from the prying eyes of other players.
Added two new character properties:
	.isDisguised 	// true/false flag for character being disguised
	.origName 		// used to store character's original name before disguise went into effect
Moved implementation of Stealing skill from code to script (js/skill/stealing.js) and revamped it completely in the process. Changes include:
	New features:
		Town rare stealing - any item marked as "special stealable" with new item property .stealable can be stolen, even if it's locked down by a GM on the ground, or inside a container
		When stealing from item piles, thief can potentially steal the amount of items that makes up the max weight limit for what they can steal, from those piles
		Chance to successfully steal is now affected by whether there are any characters (NPCs or Players) that witness the attempt. Depends on distance to character, and direction character is facing
		Players now become "permagrey" when successfully stealing from another player, regardless of whether it's witnessed
		Players now receive a "stealing" flag when stealing from another player, regardless of whether it's witnessed
		Stolen items cannot be removed from thief's backpack for 30 seconds following the theft of the item (AoS core shard era and above)
		Optional AoS feature to steal special consumable items from monsters
	Updated default stealing rules:
		Updated calculations to determine chance of success when stealing
		Players cannot steal while engaged in combat
		Players are revealed if hidden as soon as they use the stealing skill
		Players can no longer steal items in the secure trade window
		Players can no longer steal items from NPC shopkeepers
		Both hands must be free to steal
		Stealing now checks line of sight to target player/object
		Only members of Thieves Guild (NPC guild) can now steal from other players, unless they are guild enemies
		Players can no longer steal from NPC guards by default
		Players can no longer steal from the same NPC monster more than once
		Only gold and gems can be stolen from innocent players in dungeon/ll areas of Felucca, if core shard era is set to AoS or higher
		Players can no longer steal items held on cursor by other players
		Orcish masks now eplode if player steals from orcs while wearing it
		If core shard era is set to LBR or lower, player is marked as an aggressor if they steal from another player
		Guards can only be called on players that are flagged as criminals within the first 10 seconds of them being flagged
	Stealing script options:
		Allow stealing entire containers (off by default pre-AoS)
		Return stolen items on thief death (off by default)
		Temporarily make stolen items immovable in thief's backpack (on by default post-AoS)
		Temporarily protect traded items (on by default)
		Let dexterity affect chance for successful theft (off by default)
		Let light level affect chance for successful theft (off by default)
		Allow stealing from NPC Guards (off by default)
		Allow stealing special loot from monsters (on by default post-ml)
Moved implementation of Snooping skill from code to script (js/skill/snooping.js), with some changes:
	Players cannot snoop pack animals from inside a house, if the animal is outside
	The deeper inside main backpack a container sits, the harder it becomes to snoop inside it
	Included an optional feature that lets targets of snooping gradually become more aware, increasing the difficulty of succeeding. This awareness fades over time.
	Players have a chance to stay hidden while snooping, based on their Hiding skill
	Karma is now lowered by snooping regardless of success or failure
Added tracking system for "aggressors" in combat. A player attacking someone (regardless of flag status) will be marked as aggressor to that someone for 2 minutes
Added tracking system for "permagrey" flags - these are stored on a per-target basis, so a player can be flagged visibly as permagrey to multiple other players. Persists until player dies.
Player combat targets and war mode are now cleared on logout
Players will now be unable to hide if within visual distance and in line of sight of their attacker or current target in combat
Server leave-announcement now only happens after the logout timer has expired, instead of the exact moment the player presses the logout button
Fixed an issue that could cause swimming NPCs to swim on land
NPCs now have the ability to temporarily ignore unreachable targets in combat. If attacked by someone they are ignoring, they will enter evade state and try to move away from that someone.
SpawnRegions now support NPCLISTS with weighted entries. Example of an NPCLIST with 75% chance of spawning some kind of orc, and 25% chance of spawning a ratman archer:
	[NPCLIST example]
	{
	75|NPCLIST=allorc
	25|ratman
	}
Added 3 additional "all purpose" item properties (.more0, .more1 and .more2) and exposed those to JS engine. These work the same as more/morex/morey/morez
Mark spell now stores a 4th property on recall runes - instanceID. This is stored in the rune's .more0 property.
Recall and Gate spells now check the recall rune (or runebook)'s 4th location property - instanceID - to determine where the player ends up
Fixed a server crash related to equipment being automatically unequipped if character is no longer strong enough to have it equipped
Added new JS Function to check if any characters at specified location potentially block movement:
	DoesCharacterBlock( x, y, z, worldNum, instanceID )	// returns true if a character exists at given coordinate (within z +/- 4)
2023-06-20 02:21:16 +08:00
Xoduz
b27d60c1b8 UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
	EraStringToNum( eraString )	// Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
	Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
	GETUO=<sectionID>		// Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
	.hairStyle
	.hairColour
	.beardStyle
	.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
	onMultiLogout( iMulti, cPlayer ) 	// Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
	Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
	SAFECOOWNERLOGOUT=1 	// Allow co-owners to safely and instantly log out inside house
	SAFEFRIENDLOGOUT=1 		// Allow friends to safely and instantly log out inside house
	SAFEGUESTLOGOUT=1 		// Allow guests to safely and instantly log out inside house
	KEYLESSOWNERACCESS=1 	// Allow owner of house to use locked doors in house without key in pack
	KEYLESSCOOWNERACCESS=1 	// Allow co-owners of house to use locked doors in house without key in pack
	KEYLESSFRIENDACCESS=1 	// Allow friends of house to use locked doors in house without key in pack
	KEYLESSGUESTACCESS=0 	// Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
Xoduz
61a2da3501 Misc updates
Extended GetSpawnRegion JS Function to fetch spawn region reference based on a set of coordinates. Supported syntax are now:
	GetSpawnRegion( spawnRegionID )
	GetSpawnRegion( x, y, worldNum, instanceID )
Added new DFN tags for Items and NPC:
	SECTIONID	// Override which [sectionID] is stored for an object
	ORIGIN		// Store reference to which expansion/era of UO an item/NPC originated in
Added new Item/Character JS property:
	.origin 	// Get reference to expansion/era of UO an item/NPC originated in
Fixed an issue with IsInBuilding JS Function which could only handled a limited subset of instance ID values
Corrected name of tag used to attach scripts to ore types - from SCRIPTID to SCRIPT
2022-12-31 18:07:42 +08:00
Lloyd Dilley
4b83a6f3c6
Remove commented memset() 2022-11-22 19:16:28 -05:00
Lloyd Dilley
dd873888bb
Fix more compile warnings 2022-11-04 17:12:13 -04:00
Xoduz
75250e62cb Couple more changes 2022-10-24 23:42:16 +08:00
Xoduz
37a76083de Rest of the changes for 0.99.6-RC1
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
2022-10-24 18:39:33 +08:00
Xoduz
8cf9a530dc Era specific item definitions, erbonus/defbonus tags
Added new Item/Character DFN tags that provide defensive bonuses on top of existing DEF/ELEMENTALRESIST values:
	DEFBONUS=minVal [maxVal] 			// Def/Physical resistance bonus (maxVal optional)
	ERBONUS=heat cold energy poison 	// Elemental resistance bonus
Crafted armor made from coloured ingots now provide additional defensive bonuses based on color of ingots (for AoS/ToL variant of items)
Added item definitions for Pub15, AoS and ToL variants of all armors and weapons. Stats for items added to a specific era that normally only exist in another have had their stats scaled to match the era they were added to. Example: Pub15 and AoS variants has been added for "Dragon Turtle Hide Arms" from ToL expansion, but the stats have been scaled to match other armors from the Pub15 and AoS eras respectively.
2022-10-20 13:42:47 +08:00
Charles Kerr
030993832d modernization, separation of CServerData initialization. 2022-06-11 19:15:00 -04:00
Charles Kerr
76aa0e3abf
Develop (#92)
* updated STARTLOCATIONDATA to use std::string, removed typedef

* removed __STARTLOCATIONDATA_ from typedef

* cleanup

* Update Prerequisites.h

* cleanup, no functional code change

* Update cdice.h

* Pull2 (#89) (#1)

* updated STARTLOCATIONDATA to use std::string, removed typedef

* removed __STARTLOCATIONDATA_ from typedef

* cleanup

* Update Prerequisites.h

* cleanup, no functional code change

* Update cdice.h

* Modernized iterator usage for Network connection iteration.  Should result in a speed increase (measurable or not)

* exposed data
2022-06-07 14:22:26 -04:00
Charles Kerr
d540835eb4 2022 project filters, and name change for strutil 2022-03-04 07:35:46 -05:00
Xoduz
f461e62825 0.99.5b-2 - Fix for ping in shardlist, and support for always awake NPCs
Added a new feature that allows shard admins/scripters to mark specific NPCs as "permanently awake", in order to keep UOX3 running scripts, timers and updates for these NPCs even if they are in regions that are "asleep" because of no nearby online players.
	A new UOX.INI setting has been added which can turn this feature on/off:
		ALLOWAWAKENPCS=0/1 	// If disabled, NPCs marked as awake are treated as regular NPCs
	New NPC DFN tag added to mark an NPC as awake or not:
		AWAKE=0/1 		// 0 = disabled (default), 1 = enabled
	New Character JS Property added to toggle an NPC's awake state via JS:
		.isAwake 		// 0 = disabled (default), 1 = enabled
	'get and 'set commands updated with the new awake property:
		'get awake
		'set awake 0/1
IP of shard in shard list is now sent to client in little endian instead of big endian, which should correct the ping displayed in shard list, which previously showed a timeout (punt)
2022-03-02 19:50:52 +08:00
Xoduz
31a9e6b1e6 More updates to crafting system
Added new Item DFN tags:
	usesleft=# 	// The current amount of uses remaining for an item with limited use
	maxuses=# 	// The maximum amount of uses for an item with limted use
Added new JS Item properties to match DFN tags:
	.usesLeft
	.maxUses
Updated scripts to make use of .usesLeft property instead of custom "UsesLeft" tag
Updated DFNs to include usesleft and maxuses tags and uses_left_tooltip script for all tools with limited use
Crafting and gathering tools bought from NPC vendors will now support a random and limited amount of uses (between what is defined as "current" and "max" uses)
Crafting and gathering tools created by player crafters will support a limited amount of uses based on the quality of the item crafted
2022-01-01 07:58:45 +01:00
Xoduz
ce10584755 0.99.4z+++
Added new JS Item Methods to get/set the value (0-255) for specific parts (1-4) of temp variables ("more", "morex", "morey", "morez"):
	.GetMoreVar( moreVarName, moreVarPart )
	.SetMoreVar( moreVarName, moreVarPart, moreVarValue )
Updated Remove Trap script (js/skill/removetrap.js) to make use of GetMoreVar() and SetMoreVar methods
Updated inRange JS event to also trigger for Items with this event attached, when player characters come within update range. Updated syntax:
	inRange( srcItem, pCharInRange )
	inRange( srcChar, objInRange )
When UOX3 retrieves data from the onToolTip() JS event to potentially display custom object tooltips, it will use the ID specified in a temporary JS tag ("tooltipCliloc") on the object as the clilocID being sent to the client with the tooltip text returned from the script. If no such tag exists on the object, it defaults to cliloc ID 1042971.
Added new JS event that triggers _after_ an item has been removed from a container (no return values supported):
	onContRemoveItem( iCont, objRemoved, pChar )
The JS Function SpawnNPC() can now spawn NPCs from NPCLISTS if provided with a boolean parameter flag (useNpcList). Updated syntax:
	CChar SpawnNPC( npcSection/npclist, x, y, z, worldnumber, instanceID, useNpcList )
Added new JS Event to allow detection of movement near an object (items only, for now). Distance at which it triggers determined by part 1 of the item's MORE property. Use long ranges with care! Syntax:
	onMoveDetect( srcObj, pChar, rangeToChar, oldCharX, oldCharY )
Added new JS script (js/server/misc/dungeon_traps.js) for handling trap mechanics in (primarily) dungeons. The traps all trigger on collision, and use different parts of the "morez" property to determine enabled/disabled status, damage, min skill required to disarm, max skill at which player can still gain skill from disarming. Disarming renders trap inactive for 60 seconds. Implemented trap types:
	Spike Traps 		// Active for ~5 seconds after triggered, deals damage every 1 second.
	Giant Spike Trap 	// Active for ~1 second after triggered, deals high instant damage one time
	Saw Traps			// Active for ~5 seconds after triggered, deals damage every 1 second.
	Gas Traps			// Active for ~5 seconds after triggered, applies poison to target every 1 second
	Fire Column Trap 	// Active for ~5 seconds after triggered, deals damage every 1 second after initial delay of 1 second
	Stone Face Traps	// Active for ~3 seconds after triggered, deals damage every 1 second after initial delay of 1 second
	Mushroom Trap 		// Active for ~2 seconds after triggered, applies poison to target every 1 second after an initial delay of 1 second
Added dungeon traps to 'add menu, under Buildings > Decs > Dungeon Traps
Added new commands to make modifying IDs of items (and NPCs) easier:
	'incid #	// Increment/decrement ID of target by specified amount
	'rincid #	// Repeatedly increment/decrement ID of target/multiple targets by specified amount
Updated 'add and 'radd commands with new, optional syntax to make adding trees easier (potentially with GM tools/macros), as it will add both trunk and leaf at same location with a single command:
	'add tree [trunkID] [leafID]
	'radd tree [trunkID] [leafID]
Updated AreaCommand GM command to include support for setting the .decayable property on multiple items at once. Also updated the script with appropriate system messages throughout, which now also show how many items were affected by use of the command
Added new item script (js/item/gate_opener.js) that can be used to make switches/levers raise/lower multiple nearby gates. See script comments for details on setup
Updated various JS scripts that used GetSByte() to retrieve Z of last targeted location from Socket to manually add height of targeted tile for client version below 7.0.9 only
Fixed an issue where items created with 'decorate load command could be set as decayable
Fixed an issue where multiple timers could be running on a single door by manually opening and closing it repeatedly. Closing a door will now kill the associated timer on said door.
Fixed incorrect IDs for secret doors in Item DFNs (they were off by 1, so would not work properly)
Updated name of all secret doors in dfndata/items/building/doors.dfn to inherit name from tiledata instead
Added secret door IDs to dfndata/harditems/harditems.dfn
Item and NPC definitions can now make use of randomization for the ID tag, for more variety. Syntax:
	id=[id1] [id2] [etc] // Example: id=0x0e42 0x0e43
Fixed MORE values of "hard scripted" books in dfndata/items/misc/books.dfn
Added Ice and Fire dungeon locations (dfndata/location/location.dfn) and added these to the GM travel menu (dfndata/item/travelmenu.dfn/travelmenu.bulk.dfn)
Fixed body ID for ancient wyrm NPCs, which also fixes their name (dfndata/npc/dragons.dfn)
Added more pre-defined books to dfndata/misc/books.dfn (and dfndata/items/misc/books.dfn):
	Quest of the Virtues – Volume 1 	// [quest_of_the_virtues_vol1]
	Fropoz's Journal 					// [fropoz_journal]
	Translated Gargoyle Journal 		// [translated_gargoyle_journal]
	Kabur's Journal 					// [kaburs_journal]
Updated code for spawn containers to allow spawning more than one item per container; by default, a spawn container will now spawn every item from an itemlist if set as the spawnobjlist property for that spawn container. These itemlists can contain direct item references, references to other itemlists or even lootlists
Added 4 levels of dungeon treasure chests that can be placed out as spawn objects in dungeons, with items and valuables spawning inside on a regular interval. These can be found in dfndata/items/gmmenu/dungeon_treasure_spawners.dfn, with associated itemlists being found in dfndata/items/itemlists/itemlists.dfn (dungeontreasureloot1, dungeontreasureloot2, dungeontreasureloot3 and dungeontreasureloot4). They can also be located in the 'add menu under GM Menu > Dungeon Treasures
Added spawn regions for dungeon treasure chests in the following areas:
	Covetous, Deceit, Despise, Destard, Fire, Hythloth, Ice, Shame, Wrong, Yew Crypts, Daemon Temple, Trinsic Passage, Cove Orc Fort, Terathan Keep, Vesper Bank, Trinsic Bank
Updated Lockpicking skill to check for the existence of skill difficulty on locks, and use those to perform skill checks when attempting to pick those locks. Difficulty on a lock can be setup using the morey property using this syntax:
	morey=[0x00] [0x00/0x01] [0x##] [0x##] // the first part is unused, the second is used with Unlock spell, the third and fourth are the minimum skill to unlock and the max skill that can be gained from picking the lock
Updated Unlock spell to check for existence of morey property value on lock. If there's a value, and the second part of the value is not 0x01, Unlock cannot be used to unlock the lock. By default, dungeon treasure containers level 1 and 2 are unlockable with the Unlock spell, while levels 3 and 4 are not, and require Lockpicking skill to unlock.
Fixed an issue where player characters would "skip a step" when moving under certain circumstances (like coming out of hiding)
Added new decorations in default world templates for the following areas:
	Covetous, Deceit, Despise, Destard, Fire, Hythloth, Ice, Shame, Wrong, Hedge Maze, Wind (city), Terathan Keep, Orc Caves, Ilshenar facet, Ilshenar dungeons
Updated decorations in default world templates for the following areas:
	All cities in Britannia and the Lost Lands
Updated decorations in default world templates to address issues like missing water/swamp tiles, floor/roof tiles, etc. in various places
Added special behaviours in some areas:
	Lever puzzle in Covetous
	Monster-spawning brazier in Deceit
	Switch/portcullis behaviour in Hedge Maze
Updated teleport.scp with teleport locations for:
	Hedge maze, Hythloth lvl 2 teleport maze, Wrong dungeon, Buccaneer's Den to/from mainland, various Ilshenar teleport locations
Players flagged as criminals or non-innocent aggressors in PvP combat can no longer use public moongates
Pets will now teleport along with the player both when using moongates (public or spell-based), recall, object-based teleporters or hard-defined teleport locations from teleport.scp
2021-11-26 02:19:03 +08:00
Xoduz
4023794087 0.99.4z+
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
2021-10-31 10:43:24 +08:00
Xoduz
b07df3ef07 Renamed Remove Trap skill in various locations in source and scripts from "removetraps" to "removetrap"
Renamed Remove Trap skill in various locations in source and scripts from "removetraps" to "removetrap"
2021-07-29 02:06:03 +08:00