The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Major update on combat engine (damage/armor calculations)
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #1
Major update on combat engine (damage/armor calculations)
As promised, I'm bringing good news to everyone Smile
With some users feedback, I made a huge optimization on sphere internal damage/armor calculations. This means: the code is now lightweight, faster, and support some new features.

If someone want use new features, just enable it and they will be ready to use.
And if someone want keep using old calculations, they still avaible and fully working too.

Changes:
  • COMBAT_SPECIALDAMAGE and COMBAT_USE_RESISTANCE settings on sphere.ini are now a single COMBAT_ELEMENTAL_ENGINE which does the same thing (but now unified)
  • COMBAT_ELEMENTAL_ENGINE now totally overrides old AR calculations with new AOS damage/resist types instead use both at the same time. If you want the new AOS engine just enable this, otherwise keep it disabled to use the old pre-AOS engine (AR)
  • The old AR was doing a wrong calculation for years and now it's fixed (calculation details explained below)
  • Char damage is now calculated using correct formulas. If unarmed (wrestling) the base damage will be the char DAM (default is 1-4 for all players, but it can be customizable, just make sure that your c_man/c_woman/c_elf_male/etc chardefs has proper DAM set), and using weapons the base damage will be the weapon damage. This base damage can be increased with some bonuses (if COMBAT_OSIDAMAGEMOD it will use OSI bonus calculation, otherwise it will use sphere default bonus [STR/10]).
  • On AOS+ clients, the char status menu now will show exactly the damage range that the char can deal (including all bonuses)
  • New blood effects

Removed features (as discussed here):
  • COMBAT_TARGETTEDHIT setting on sphere.ini. Previously it was used to set a hit prefference and make the char hit this body location. The internal code got removed to make the general code more lightweight, and if someone still using this feature, it can be softcoded on scripts without problems.
  • All "hit location" messages on sphere_msgs.scp. They are just tons of random messages without any real functionality.
  • Old [Physical/Fire/Cold/Poison/Energy]Damage properties got removed and replaced with the new DAM[Physical/Fire/Cold/Poison/Energy], which is compatible with COMBAT_ELEMENTAL_ENGINE and works using correct calculations.

These changes will be live on next nightly (30/01/15), I recommend everyone make some tests before use it on live servers, and also update your sphere.ini (CombatFlags list) and sphere_msgs.scp (just remove all combat_hit_* messages)

Feel free to test it and make any suggestion

More info about elemental engine (AOS) x old AR engine (pre-AOS):
(This post was last modified: 01-30-2015 02:51 PM by Coruja.)
01-29-2015 11:55 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 4 users Like Coruja's post
Post Reply 


Messages In This Thread
Major update on combat engine (damage/armor calculations) - Coruja - 01-29-2015 11:55 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)