Page 1 of 1

Some tidbits concerning next experimental build of UOX3

Posted: Mon Nov 07, 2011 7:23 pm
by Xuri
I hope the next experimental build will be... interesting :)

Generic Fixes and Changes
Some of the stuff I've been working on, in no specific order:
  • Fixed a couple of server crashes (like the one with type 15 items)
  • Fixed Item Identification of magic items (including items of type 15 - using this skil to it's full potential should no longer crash UOX3!
  • Fixed "Uses Remaining" tooltip for items with charges. Now reads MOREZ value instead of item hitpoints.
  • Fixed broken File I/O JS stuff - should now once again be possible to open files for both reading, writing and appending.
  • More improvements to lightsource JS/DFN stuffs, will set default values on use - but only in cases where there are no values already present. So custom settings should be safe.
  • New JS events: onBuy, onSell, onBought, onSold - with which things can be done to both player, vendor and items bought/sold, either before of, instead of or after the trade has taken place. Also allows to automatically spawn pets like horses/packhorses when bought from an animal-trainer, instead of having to double-click icon in backpack.
  • Various other small fixes
Revamp of Magic system...
...more specifically exposing damage-numbers to server admins and modifying how spell-damage is calculated and how magic-resistance works.
  • A small revamp of spell-damage and how magic-resistance works. A BASEDMG tag is added for all damage-spells in spells.dfn, which defines the potential max-damage for the spell when cast on a target with no magic resistance. This value is further modified depending on magicresist (if spell is successfully resisted, basedamage is halved), and then the following formula (pseudocode), which basically goes "randomize between half basedamage and max basedamage):
    baseDmg = Rnd( baseDmg / 2, baseDmg ). Then, the damage is modified by the same attacker-evalint vs defender-magicresist formulas that were used on OSI around 2001, and finally optionally modified by any elemental-specific resists the character might have (this part depends on someone actively setting up items with such resistances, so is unused by default). The end-result of this seems to be damage-numbers that seem pretty close to what I've been able to dig up from archives of uo.stratics and the like. Against other players, that is.
  • Currently spells are hardcoded to do double damage against NPCs. I'm contemplating making this an UOX.INI setting - which I will then default to "1.0" (same dmg as vs players), but which can be changed by server admins.
  • Exposed spell-name as a JS property for Spell objects
  • Exposed CombatExplodeDelay serversetting to UOX.INI. It defines in seconds the delay between targeting a character with the Explosion spell and the damage & visual-effect actually occuring. This was an existing setting that defaulted to 0 (instant), but I'm thinking this should probably not be an INI-setting, as it's for one very specific spell only, but should rather be an available setting for every single spell through spells.dfn. Not yet sure how hard this will be to do, though, so might not happen for some time.
JavaScript to generate Pre-AoS Magic Weapons & Armor...
(...on the fly, as NPCs are spawned, with no need to define every last possible combination of items in DFNs.)

I'm also nearing completion on a couple of JavaScripts that can generate magic weapons & armors of the pre-AoS variety as loot on NPCs as they spawn, without having any of the magic items defined in the DFN files. The scripts can currently generate any combination of any of the following properties:
  • Armors:
    • Prefix: Durability/Item HP (Durable +5, Substantial +10, Massive +15, Fortified +20, Indestructible +25)
    • Suffix: Armor (Defense +10, Guarding +15, Hardening +20, Fortification +25, Invulnerability +30)
    • (ToDo - Suffix: Spell Enchantments)
  • Weapons:
    • (Accuracy bonus goes to tactics for melee-weapons, archery for ranged weapons)
    • Prefix: Accuracy (Accurate +5, Surpassingly Accurate +10, Eminently Accurate +15, Exceedingly Accurate +20, Supremely Accurate +25)
    • Prefix: Durability/Item HP (Durable +10, Substantial +20, Massive +30, Fortified +40, Indestructible +50)
    • Prefix: Silver (double damage against undead)
    • Suffix: Damage (Ruin +1, Might +3, Force +5, Power +7, Vanquishing +)
    • Suffix: Spell-Enchantment (Burning, Daemon's Breath/Dragon's Breath, Evil, Ghoul's touch, Mage's Bane, Thunder, Wounding)
I've divided both NPCs (based on fame), magic armors and weapons (based on effectiveness of non-magic version) and the actual magic properties into five (modifiable) tiers, with the high-tier NPCs (high fame) being more likely to end up with a high-tier magic armor/weapon with multiple high-tier magic properties - all the way to the extreme but very rare "Indestructible, Supremely Accurate Silver Katana of Vanquishing with Ghoul's Touch", while the lower-end NPCs will mostly end up with stuff like "Club of Ruin" or "Accurate Cleaver", though still with a small chance of getting something slightly better :P
  • What remains on those scripts is:
  • tweak drop-rates - though this is customizable to some extent through global variables
  • to figure out which exact spell-enchantments for armor should be available (and actually doable)
  • to unify the magic armor & magic weapon parts (currently two different scripts, but with a lot of duplicate stuff)
  • to figure out a way to set it up so it can work with existing stuff that people might have in their script 0 (global script).
Anyway, that's what I've been working on recently. :)

Posted: Mon Nov 07, 2011 7:26 pm
by giwo
*gasp*

I think we should call it UOXuri

Nice work. :)

Posted: Wed Nov 09, 2011 3:40 pm
by stranf
Looks like it is time for me to give up my hold on 3.7h!

I'm excited, especially the magic stuff.

One thing Xu, I'm really interested in the NPC/PC modifier for magic damage in UOX.ini. My custom shard is pretty balanced between magic and PCs, and it would be nice to have a custom multiplier adjustment between PCs and NPCs. I imagine I'd use 1x on both PCs and NPCs to start, but most NPCs have such high HP and deal a ton of damage with their spells (enough to kill a PC in one hit even), that you could easily balance it with a 3x multiplier or something (so your spells hurt the NPC, but the NPC can't kill you when you appear on screen).

Posted: Wed Dec 14, 2011 12:47 pm
by Xuri
This stuff is now available in an experimental build Near You(tm)! Check this thread for full cvs changelog.

Magic weapons/armor script not done yet though.

Posted: Wed Dec 14, 2011 8:35 pm
by dragon slayer
Awesome Job love this build :)

keep the hard work up.