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






Post Reply 
 
Thread Rating:
  • 2 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
attr_magic with t_ types
Author Message
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #1
attr_magic with t_ types
hello, im upgrading my shard from 56b to 56c,

i see in revisions attr_magic changes, +xx dont show anymore etc, buy i dont understand why t_armor t_clothing etc dont work.

in the wiki i read

t_armor

MORE1L = Max hitpoints
MORE1H = Current hitpoints
MOREX = Spell effect when worn (for example, setting MOREX=1 causes a permanent Clumsy effect)
MOREY = There are two possible effects of setting MOREY:
If MOREX is set, then MOREY is the power/effect of that spell
If the ATTR includes attr_magic, then there is an AR bonus (how is this calculated?)

i set the item attr_magic with morey but armor dont change, i dont set morex becouse i dont want it, same with t_clothing , t_armor_leather etc, t_shield works time ago but not now, are you good to let me understand why an enchanced item dont set bonus armor bonus?
in my sphere.ini i dont use new res* i use the old ar.

only weapons works now, if i set a weapon with attr magic and morey xxx i have a damage bonus.

There are worse ways to understand the sense of the word: no. Ranting
01-26-2017 11:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #2
RE: attr_magic with t_ types
I'm testing here and it seems to be working fine

this AR calculation is too weird, every layer have its own % usage of item ARMOR value
Code:
layer_helm = 15%
layer_collar = 7%
layer_shirt, layer_chest, layer_tunic, layer_cape, layer_robe = 0%
layer_shirt, layer_chest, layer_tunic, layer_robe = 35%
layer_arms, layer_cape, layer_robe = 14%
layer_gloves = 7%
layer_pants, layer_half_apron, layer_robe, layer_skirt, layer_legs = 22%
layer_shoes, layer_legs = 0%

PS: note that many layers are repeated, and if you have an item equipped on these layers, sphere will stack both values if you have COMBAT_STACKARMOR enabled on sphere.ini it will stack both values, otherwise it will consider only the higher value

so if you have an chest + head armor items with ARMOR=20 both, the chest armor will add +7 AR on char (35% of 20 = 7) and the head layer will add +3 AR (15% of 20 = 3). Basically the calculation is so weird that you'll never know the real AR value that these items will increase when equip on char

but anyway, the magic bonus calculation is based on s_enchant spell on your sphere_spells.scp. This spell have an range value that probably will be 1,9 on your script. The item MOREY also have a range of 0,1000 which is the % (0% to 100%) that it will take from spell range

lets suppose that you have an random t_armor item with ARMOR=20. If you set attr_magic + MOREY, the bonus will be:
MOREY=0 -> 0% of range 1,9 -> +1 (final result = 20 + 1 = 21)
MOREY=500 -> 50.0% of range 1,9 -> +4.5 -> +4 (final result = 20 + 4 = 24)
MOREY=1000 -> 100.0% of range 1,9 -> +9 (final result = 20 + 9 = 29)

but don't forget that this is only the bonus calculation to get the item ARMOR value. After get this value, it will be decreased because the layer % distribution on char
01-26-2017 02:16 PM
Find all posts by this user Like Post Quote this message in a reply
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #3
RE: attr_magic with t_ types
(01-26-2017 02:16 PM)Coruja Wrote:  but anyway, the magic bonus calculation is based on s_enchant spell on your sphere_spells.scp.

can we put that on wiki plz? layer % and morex 1022 (s_enchant)?
my items stacks armor again, ty a lot.
that was so easy, i lost to much times for dont know this info. Sad

There are worse ways to understand the sense of the word: no. Ranting
(This post was last modified: 01-26-2017 08:29 PM by massis87.)
01-26-2017 08:13 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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