Commit graph

49 commits

Author SHA1 Message Date
Dragon Slayer
eaf66903b5 Update cBaseObject.cpp 2025-07-04 13:04:02 -05:00
Xoduz
2e0af73968 Poison fixes
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 ])
2025-07-04 01:17:04 +08:00
Xoduz
e38be292e3 0.99.6d
Cleaned up an issue with last commit where wrong npclists were used in some spawn regions
Made a few additional adjustments to the new spawn regions in Lost Lands/New Haven
Included more changes related to poison updates that should've been in previous commit (like the complete UOX.INI support for POISONCORROSIONSYSTEM setting)
Adjusted region setup for New Haven to set the individual "building" regions within as a sub-region of the main town (regions.dfn)
Fixed an issue where the displayed HP of an equipped item would not update correctly
Further updates to convert timers 32-bit to 64-bit. This affects and addresses some potential issues with: Character creation/NPC guild-join timestamps, NPC movement, combat timers, idle timeouts, item decay, spellcasting
Added support for new JS Events that can trigger from global script, and can be used to store persistent custom entries in players' paperdoll profiles:
	onProfileRequest( socket, profileOwnerChar ) - Triggers when client requests data for a paperdoll profile
	onProfileUpdate( socket, updatedText ) - Triggers when client sends updated data from paperdoll profile
Added two new helper functions in code that allows faster (but very slightly less accurate) distance checks between two points: 	GetApproxDist( Point3_st a, Point3_st b )
	GetApproxDist( CBaseObject *a, CBaseObject *b )
Improved pathfinding for NPCs attempting to follow another character, by adopting a system of weighted variables to help the NPC determine when to recalculate the path vs when to stick with the old, combined with faster distance checks via GetApproxDist(). The end result of this is faster, smarter and more responsive NPC followers and NPC opponents in combat. The variables influencing this include: how far the target has moved from last pathfind target location, whether NPC is heading in the overall right direction or not, time since last path calculation and some small randomization to avoid edge case jitters.
Updated default command levels in commands.dfn, code and scripts to support the Seer role and make space for some custom roles. These are the new defaults as listed in commands.dfn, which should not be changed as they are linked to specific enums in code. Do take note that this might invalidate command levels for existing GMs/Seers/Counselors, who might need another round of 'make gm/seer/cns from an admin:
	ADMIN - command level 10
	GM - command level 9
	SEER - command level 7
	CNS - command level 4
	PLAYER - command level 0
Updated how UOX3 makes use of the account-level flags 0x2000 (Seer) and 0x4000 (Counselor). If either of these flags are set on an account, all new characters created on the accounts will automatically receive the relevant command privileges.
Fixed an issue with 'wholist command that prevented admin characters from seeing characters with lower privilege levels in the list (js/commands/wholist.js)
Fixed an issue with hiding/GM hide that prevented admin characters from seeing hidden characters with lower privilege levels in the world
UOX3 now includes the cross-platform, header-only utf8cpp library found at https://github.com/nemtrif/utfcpp and freely available under Boost Software License v1.0. The immediate use-case for this is in code right now is to better handle strings related to custom paperdoll profiles, but will also look to make more heavy use of this in future updates
2025-06-28 22:37:42 +08:00
Geir Ove Alnes
3d1ea6ac00
Merge branch 'develop' into AOS-Properties-Regenation 2025-04-20 07:10:35 +08:00
Xoduz
bc55fd7134 Some cleanup - and update of version to 0.99.6b
Some cleanup - and update of version to 0.99.6b
2025-04-20 06:33:17 +08:00
Xoduz
95afdbaf66 Merge branch 'AOS-Properties-Regenation' of https://github.com/DragonSlayer62/UOX3 into pr/277 2025-04-20 06:05:51 +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
Dragon Slayer
12bb8994ba fixes 2025-03-09 20:50:32 -05:00
Dragon Slayer
8f6169478c Aded Updateregion char 2025-03-09 16:20:31 -05:00
Geir Ove Alnes
b0d538b929
Merge branch 'develop' into Tithing 2025-03-10 04:54:07 +08:00
Geir Ove Alnes
63743a3fcd
Merge branch 'develop' into Luck-Propertie 2025-03-10 04:46:37 +08:00
Dragon Slayer
950d6dffa1 Update cBaseObject.cpp 2025-03-09 15:14:55 -05:00
Dragon Slayer
45cd19ad79 Update cBaseObject.cpp 2025-03-09 14:59:47 -05:00
Dragon Slayer
8f53a05e81 Update 2025-03-09 14:51:21 -05:00
Dragon Slayer
3ea185e5ca Prop Fixes 2025-03-09 14:48:38 -05:00
Dragon Slayer
34064c30c5 update tithering 2025-03-08 21:10:37 -06:00
Dragon Slayer
6b4b12b35a updated luck 2025-03-08 20:29:52 -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
103023a5e3 Update cBaseObject.cpp 2025-03-04 15:36:34 -06:00
Dragon Slayer
69cd5a0501 Updated with new ini 2025-02-23 18:10:20 -06:00
Dragon Slayer
9c7217cd80 Damage Increase
Damage Increase Property increase damage by a percentage
2025-02-23 17:11:14 -06:00
Dragon Slayer
f4669f8749 Small adjustments 2025-02-22 23:31:40 -06:00
Dragon Slayer
171ca17564 First Submit
Added new Save methods for AOS props
2025-02-22 23:08:41 -06: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
df556d9d7b Fixed
Fixed swingspeed to set all settings in base object because works in items and chars.
2025-01-21 22:03:04 -06:00
Dragon Slayer
6583a518df Revert "Moved Leech Props"
This reverts commit 41c7ee4676.
2025-01-16 19:09:59 -06:00
Dragon Slayer
41c7ee4676 Moved Leech Props
Moved Leech props to just items
2025-01-16 18:36:53 -06:00
Dragon Slayer
9b9f90d8b0 update 2025-01-14 23:28:03 -06:00
Dragon Slayer
b82b9dcc60 update 2025-01-14 22:16:11 -06:00
Dragon Slayer
64b6dd6395 Moved regenstats
Moved regenstats to baseonject because it can be used on both npc and item. removed it out of citems.cpp
2024-07-07 14:05:41 -05: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
e514b688a9 Update cBaseObject.cpp 2024-06-16 12:00:52 -05:00
Dragon Slayer
f6989ca218 Update cBaseObject.cpp 2024-06-16 02:48:12 -05:00
Dragon Slayer
1abd8a0826 Update cBaseObject.cpp 2024-06-16 02:38:42 -05:00
Dragon Slayer
81425cc261 fixed Era 2024-06-16 02:14:38 -05:00
Dragon Slayer
b63ceaeeb6 Update cBaseObject.cpp 2024-06-16 02:04:48 -05:00
Dragon Slayer
77dcb511a3 Update cBaseObject.cpp 2024-06-16 02:03:22 -05:00
Dragon Slayer
28a5fd34a3 Update cBaseObject.cpp 2024-06-16 02:01:55 -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
6b542d512e AOS Properties Regenation 2024-04-30 13:46:57 -05:00
Dragon Slayer
8499cbfcde update 2024-04-16 14:48:40 -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
charles
17f2b9e914 Standardization across os
1. Updated Xcode to match other ides
2. Corrected position errors in Cmake
3. Changed case on cBaseobject.cpp to uppercase O, to match header file
4. Changed gump.h to CGump.h (since it defines the CGump.cpp class).
2023-08-25 07:10:48 -04:00
Renamed from source/cBaseobject.cpp (Browse further)