Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
+9 dagger
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
+9 dagger
back in the old days...
.add dagger
.set morep 0,9,0
.set attr 021

whats the hell is

morep=0,1000 ???

how can i get weapons to display the old way?

"+9 dagger"
or
"+9 dagger of vanquishing"

when identified

Dragons of Time 2000-2020
http://dragonsoftime.com
04-09-2018 06:42 AM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #2
RE: +9 dagger
help pls want to do the same
it should work like 51a
04-09-2018 01:42 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes ShiryuX's post
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #3
RE: +9 dagger
this "+ X" value on armors/weapons is calculated by s_enchant "spell" on sphere_spells.scp, and the spell effect is calculated using an 0-1000 value

so:
1) on sphere_spells.scp there's an s_enchant spell, here you can set the min/max value to be used for all items (it's 1,9 by default)
2) on the weapons you must set MOREY=0 ~ 1000, this is the spell power (eg: MOREY=0 will be "+1" and MOREY=1000 will be "+9")
04-12-2018 04:41 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #4
RE: +9 dagger
whats
1 3 5 7 9 11 13 15 17 19 ? (weapons)

5 10 15 20 25 ? (armor)


what was wrong with 0,9,0 for +9, 0,25,0 for +25

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 04-12-2018 08:44 AM by x77x.)
04-12-2018 08:42 AM
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: #5
RE: +9 dagger
have no idea who or why someone changed this, but anyway, things still working as before, you just need to adjust the min/max value and make sure MOREY is set on item

PS: many years ago the s_enchant value was 1,15 and it got changed to 1,9 to match UO default values, because +15 was a sphere custom (wrong) value and UO default value was always +9. On AOS (2003) OSI replaced all +X bonus with Damage Increase 15%~35% (weapons) and durability bonus 20%~120% (armors)
04-12-2018 03:06 PM
Find all posts by this user Like Post Quote this message in a reply
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #6
RE: +9 dagger
I have tried that but i didn´t get it working though. Weapons don´t display the number even using arms lore and item identification on them. Everything seems ok just like stated by Coruja in this post a while ago. Here are the settings in my sphere:

Quote:[SPELL 1022]
// Enchant a weapon or armor.
// Effect of all enchanted weapons is tied to EFFECT here !
DEFNAME=s_Enchant
NAME=Enchantment
FLAGS=SPELLFLAG_TARG_OBJ | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
MANAUSE=200
SKILLREQ=MAGERY 200.0
EFFECT=1,9

Quote:[ITEMDEF i_halberd_vanq]
ID=i_halberd
NAME=Halberd of Vanquishing
RESOURCES=20 i_ingot_iron, i_halberd
DAM=1,32

ON=@Create
MOREY=1000
ATTR=attr_magic
HITPOINTS={31 80}
COLOR=color_magic_weap

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Halberds
DESCRIPTION=Halberd of Vanquishing

Someone got them working by displaying the +9, +7, etc. this way? Sphere version is 0.56d build 426.
03-02-2019 05:32 AM
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: #7
RE: +9 dagger
I think these old name properties are only used when you have tooltips disabled

if you're using tooltips (AOS+ clients) it's recommended edit these weapon scripts to replace these old properties (attr_magic + MOREY) with the AOS property "Damage Increase" (IncreaseDam), which does exactly the same thing
03-10-2019 08:12 AM
Find all posts by this user Like Post Quote this message in a reply
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #8
RE: +9 dagger
Thanks for answer Coruja. I have tried that on a brand new sphere 56d and 5.0.1 client and nothing seems to change with weapons. I have even desactivated the cilocs,tooltips and all of this by default plus player event to force it to act like the old way and it didn´t work either.

The only thing i´ve been able to see in source is a getter method called armor_getdefense in armor class that contains the calculations and returns the value taking in count the enchant spell, but i´ve not found the same with weapons (my programming knowledge with OOP is quite limited and poor, so i don´t know if that´s right):

Code:
int CItem::Armor_GetDefense() const
{
    ADDTOCALLSTACK("CItem::Armor_GetDefense");
    // Get the defensive value of the armor. plus magic modifiers.
    // Subtract for low hitpoints.
    if ( ! IsTypeArmor())
        return 0;

    int iVal = m_defenseBase + m_ModAr;
    if ( IsSetOF(OF_ScaleDamageByDurability) && m_itArmor.m_Hits_Max > 0 && m_itArmor.m_Hits_Cur < m_itArmor.m_Hits_Max )
    {
        int iRepairPercent = 50 + ((50 * m_itArmor.m_Hits_Cur) / m_itArmor.m_Hits_Max);
        iVal = IMULDIV( iVal, iRepairPercent, 100 );
    }
[b]    if ( IsAttr(ATTR_MAGIC) )
        iVal += g_Cfg.GetSpellEffect( SPELL_Enchant, m_itArmor.m_spelllevel );[/b]
    if ( iVal < 0 )
        iVal = 0;
    return iVal;
}

Furthermore, with armors it happends the same for me, i can´t see the +number on them just like with weapons. I haven´t been able to find any reference in source where it shows that this value has to be displayed in the name itself of a weapon or armor.

For me is easy (and 4 everyone here lol) to do this softcoded with sphere, i store the respecting number in more2 property of the item and item name should look like this in script under create trigger:

Code:
name = a +<more2> Halberd of Vanquishing

but i was curious about it and is what so far i´ve been able to find. Maybe i have some muls files messing around with cilocs and that´s causing the trouble, but for now im not going to invest more time in that because is something easy to fix by script side.

Greetings and sorry for posting the whole holy bible here.
(This post was last modified: 04-21-2019 05:42 AM by Mad Gunther.)
04-21-2019 05:40 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #9
RE: +9 dagger
maybe its time we go back to the old way????

morep=0,9,0

not

morep=0,1000

=)


0,9,0 meant +9 to damage

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 04-23-2019 09:38 PM by x77x.)
04-22-2019 11:07 AM
Find all posts by this user Like Post Quote this message in a reply
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #10
RE: +9 dagger
I have just used the defs of the script you shared of souless and drk the other day with a new trigger. With @ItemAfterClick you avoid some weird errors that happends with the other script when you click the weapon on paperdoll.

In my shard weappons values are:1,3,5,7,9,10 and armors:5,10,15,20,25. But you can suit the script easily for your needs.

Code:
//add to sphere_defs
[DEFNAME SpherOldWeaponMagicPrefix]
wpn_magic_morey_10      1
wpn_magic_morey_250     3
wpn_magic_morey_500     5
wpn_magic_morey_750     7
wpn_magic_morey_1000    9
wpn_magic_morey_1250    10

[DEFNAME SpherOldArmorMagicPrefix]
arm_magic_morey_200     5
arm_magic_morey_400     10
arm_magic_morey_600     15
arm_magic_morey_800     20
arm_magic_morey_1000    25

//add event to player
//WARNING: gotta change all MOREY=1.0 values to MOREY=10.0 for each //weapon/armor

[events e_magicwpn]
On=@ItemAfterClick
if ((<act.isweapon>) && (<act.attr>&attr_magic))
local.clickmsgtext=+<ddef.wpn_magic_morey_<act.morey>> <act.name>
local.clickmsghue=<f_magicwpncolour>
elif ((<act.isarmor>) && (<act.attr>&attr_magic))
local.clickmsgtext=+<ddef.arm_magic_morey_<act.morey>> <act.name>
endif

//different colours for each magic value only for weapons.
//1,3,5,7,9,10
[function f_magicwpncolour]
argn1=<act.morey>
//argn2=hue code
if (<argn1>==10)
argn2=0a37
elif (<argn1>==250)
argn2=07be
elif (<argn1>==500)
argn2=067a
elif (<argn1>==750)
argn2=09de
elif (<argn1>==1000)
argn2=04e9
elif (<argn1>==1250)
argn2=0959
else
argn2=0
endif
return <argn2>

[Image: CYeMBAL.png?1]

[Image: Fnjp8Mn.png?1]

This is the only thing that have work out for me. It´s true what´s been said around this land bout you can customize anything in sphere without hardcoding it lol. It´s hella cool how you can customize these kind of things in sphere with no effort and make it look rad.
(This post was last modified: 04-26-2019 07:18 AM by Mad Gunther.)
04-26-2019 07:14 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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