Wrong Spell Icons Possible @Leodagan

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Wrong Spell Icons Possible @Leodagan

Postby Crazys » Wed Sep 17, 2014 4:28 pm

Wrong Spell Icons Possible @Leodagan

Having an issue where Bards and Minstrels songs show correct icons on the players toolbar's but once cast they become random ? icons and other things.
Other spells seem to be ok? Very confused why it swaps. Didn't know if this part of the resent changes Leodagan had been working on
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Wed Sep 17, 2014 4:32 pm

hum I need to check where in packetcode these Icon are set...

This may be a method wrongly referencing Skill.ID instead of Skill.Icon !

OK it's around GameSpellEffect Displaying and group window icon displaying...

This is ok in player skill, player toolbar, and player concentration window :)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby dargon » Wed Sep 17, 2014 5:49 pm

This has been around for a long time in dol (years), it has to do with the Spells IconID being correct, but EffectID being wrong, best bet is to just set the EffectID as the same value as the IconID
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Wrong Spell Icons Possible @Leodagan

Postby Crazys » Wed Sep 17, 2014 6:52 pm

This has been around for a long time in dol (years), it has to do with the Spells IconID being correct, but EffectID being wrong, best bet is to just set the EffectID as the same value as the IconID
This seems like a workaround... which still didn't fix the problem for me. (I had tried this already).

If i'm not mistaken. The Effect is the cast/spell effect visual/sound that goes off when performing the spell
The Icon should be the Icon for any instances of the spell. If thats not how it works then I would feel the core is wrong. Been slowly trying to skim the core to see where its gone wrong... really not sure yet. Why I bugged Leodagan!
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Wed Sep 17, 2014 8:33 pm

I'm around these subjects actually anyway, with tooltip updates around Skills I need to double check every methods that try sending ID, or Icon, or TooltipID...

For how the Client work :

Client have an internal "Spell ID" that link every spell to an "Animation" and an "Icon"

When you send IconID in fact you send Spell ID from which you want to use the Icon (so if you want an AF buff Icon check existing AF spells EffectID or IconID !)
When you send EffectID you send the Spell ID from which you want to use the Animation...

So depending on the context (will the ID be used to display an effect animation or an Icon ?) we can trick the client to use custom animation or icon by sending them the ID of an other spell from which we want to borrow the graphics !

This DOL feature looks like something that have been built during time, so not every area of DOL code obey these values, and some will still send EffectID or Skill.ID to display icon as it was made "hardcoded to live values" in database...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Thu Sep 18, 2014 6:04 am

Ok here is the weird thing with Song Icon...

The "Icon" Sent to player UI when getting Skill is not the same value from the "Icon" Sent by the GameSpellEffect Display !!

This is why the previous code was using "EffectID" to send song Icon in Effect Display, and used the Icon as a special value for the Skill UI update !

From what I understand Song could have a new value, more than "Icon" and "EffectID" (which are both the same on live) it could need some kind of special ID to display in UI. But I need to understand how this special ID works for Songs to know if we can track the resulting Icon through our available libraries or if I can use any computation to guess it from SpellID !!
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Thu Sep 18, 2014 6:36 am

Song Icon ID seems to use the "internal" Icon ID. It doesn't get Spell["SpellID"].Icon, but directly use Icon as an ID to look in the client db...

For example setting "Song of Power" to IconID 1121 (==EffectID) will display the Icon from "Obliviate Coordination" or "Destroy Coordination" which are EffectID 4162 and 4163 but use internal icon value 1121 (Thanks to Argo Spell Icon Library there !!)

But "Song of Power" is used the same for Skald !! And there ... it works !! Because Skald doesn't need instrument and this Song is sent as a "Pulsing Spell" not as a "Song"

From this testing I must admit that Song would need an "extra" field to register internal Icon, using the Icon field specifically here breaks all logic for other displaying !! And with current DOL implementation you can't customize Song Icon you have to use EffectID as IconID for Effect Display, and you need the Icon value for Skill UI display... if you want to change the spell animation you'll screw the displayed Icon, if you want to change the UI Icon your Effect Display will still use EffectID's Icon...

I'm gonna try some more tests...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Thu Sep 18, 2014 9:13 am

Ok I may have a solution based on some development I'm doing...

But these Songs are pretty much annoying !

I'm gonna try committing on storm before the noon restart :)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Thu Sep 18, 2014 9:38 am

Ok I think we can say that Song Trouble is DOL HISTORY !!

Comitted in DOL SVN Revision 3362 :

As song seem to need an other reference but keep old one to target Icon and Effet, I added a new Reference "InternalIconID" to Spell Object, but not in database ;)

I'm using the new spell "Params" system which allow to set arbitrary values in a string data base field !

Log :
Code: Select all
Fix : Song Internal ID trouble using a custom properties in spells Param. Update : Any Spell DB object can now contains a "JSON" formated dictionary of string containing list of string This can be used through spell : T GetParamValue<T>(string key), IList<T> GetParamValues<T>(string key) The default first usage is : public ushort InternalIconID { get { return GetParamValue<ushort>("InternalIconID"); } } Type T can be anything numeric or string (any object that can be converted to string using .ToString(), and loaded through Convert.ChangeType()...) Needed MYSQL update for those using LIVE Song Id's !! UPDATE spell SET `Params` = CONCAT_WS(`Icon`, '{"InternalIconID":["', '"]}'), `Icon` = `ClientEffect` WHERE `InstrumentRequirement` > 0 AND `Params` IS NULL;
So the purpose is to track internal Icon ID for the Spell needing it only, mostly only song will have a Param field with : {"InternalIconID":["321"]}

The Packet Code sending Skill list to Player will first check if this property exist before using the default "Icon", you shouldn't use this for your default spells, but if you do you can change the Icon in Client UI still using the old Icon for Game Effect (maybe not what you'll be expecting...)

Will be Live on Storm RVR after noon restart ;)

More data around : http://www.dolserver.net/viewtopic.php? ... 75#p152991
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Crazys » Sat Sep 20, 2014 4:32 am

I was running in circles trying to get this working... After a while I started digging
I disabled the packetlib checking that moved songs to the song section and reloaded... Everything showed up correctly...
Just hte songs are mixed in with the rest of the spells instead of being separated... big deal...

So your right on that song list handling differently... which is making me go crazy... :/

I'm 1/2 tempted to make people find their stupid songs in the spell lines and call it a day.


*update again...

what if we where to Fake a Songs list as a spell line instead of sending to the "songs" which isn't working correctly????
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Sat Sep 20, 2014 8:34 am

your last idea is mostly a good one...

That's exactly what happen with skald song, that don't require instrument, they're simply switched to a spellLine displaying instead of songline...

Handling song exactly as spell won't do great harm I think, the only trouble will be loosing the "instrument" tooltip that diplays which instrument is needed for this song (and that actually this song need instruments)

Either you handle these unique 43 spells (for Live spell list) with special params from DB like I did in my last Revision, either you handle them like standard spells and you just loose 43 tooltips in the entire game that show an obsolete data about which instrument is required (on live all instruments work for all song now !!!)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby dargon » Thu Oct 02, 2014 1:54 pm

Don't know if you have this fixed on the current svn or not at the moment, as i use a little bit older SVN (custom core changes make SVN updates a pain) but. I was working on a new custom class, and was getting annoyed at how i couldn't get a good spell effect (with an AF icon) for its AF buff. So i recalled this post and reread it. Well i changed in GameSpellEffect.cs
Code: Select all
public ushort Icon { get { if (m_handler != null && m_handler.Spell != null) return m_handler.Spell.ClientEffect; else return 0; } }
to
Code: Select all
public ushort Icon { get { if (m_handler != null && m_handler.Spell != null) return m_handler.Spell.Icon; else return 0; } }
and now the effect bar (effects/buffs your character currently have on him/her) shows the Icon id instead of the ClientEffect. meaning, i can make it send a Firebolt effect, but still show a ArmorFactor icon on the effect bar, allowing me to customize effects for classes, and fix bugs like with the songs because its all based on the actual icon id instead of clienteffect id
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Thu Oct 02, 2014 2:31 pm

Indeed, Spell Icon should be used were the Client is expecting an Icon ID, it's easier to customize ;)

But for Song Icon it's different, the Client will use the "Icon Internal Index" and not the Effect "Referenced" Icon when displaying in Character Skill pages !

So if you send Icon == Effect for Song you won't have the expected Icon from this "Spell Effect" but the true icon index stored in client list, that's what I improved in last patch, Spell can now use a new Property Spell.InternalIcon that will retrieve a specific value in database if this have been set for this spell or default to "IconID" this allow to handle the "special" value used for Song Icon (only in Skill Page, When effect is displayed in buffs effect it's treated as a Spell !!)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Wrong Spell Icons Possible @Leodagan

Postby Argo » Fri Oct 03, 2014 12:56 am

let me point you to the list i made in the past Leo, you can rely on it, or you can ofcourse go on guessing what icon id is the right one ;)

regards

Michael
Möge Gott sein zwischen Dir und dem Leid, an allen dunklen und verlassenen Orten, die Du erreichen wirst.
Argo
Server Team
 
Posts: 1760
Joined: Thu Sep 18, 2008 6:21 pm
Location: Berlin, Germany

Re: Wrong Spell Icons Possible @Leodagan

Postby Leodagan » Fri Oct 03, 2014 5:18 am

Argo : That's what I used to find "how it work" ;)

I couldn't understand that Song Icon ID were displaying totally different icon from other skill, so I used your icon library and noticed the icons displayed for song are not the one that match "Spell ID" but the one that match "Icon ID", it's the only skill of the game that doesn't reference the "Spell ID" to get the attached Icon but directly the internal client index ;)

So Song couldn't be handled like other spells, (on Live Server, Songs are container for Spell, on DOL Songs are Subclass of Spell...)

Here are the values I used for "Live" skill display (Storm RvR)
Code: Select all
CREATE TABLE IF NOT EXISTS `spellxcustomvalues` ( `SpellXCustomValuesID` int(11) NOT NULL AUTO_INCREMENT, `KeyName` varchar(100) NOT NULL, `Value` varchar(255) DEFAULT NULL, `LastTimeRowUpdated` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', `SpellID` int(11) NOT NULL, PRIMARY KEY (`SpellXCustomValuesID`), KEY `KeyName` (`KeyName`), KEY `SpellID` (`SpellID`) ); -- -- Content -- REPLACE INTO `spellxcustomvalues` (`SpellXCustomValuesID`, `KeyName`, `Value`, `LastTimeRowUpdated`, `SpellID`) VALUES (1, 'InternalIconID', '1374', '2000-01-01 00:00:00', 1118), (2, 'InternalIconID', '929', '2000-01-01 00:00:00', 1175), (3, 'InternalIconID', '1372', '2000-01-01 00:00:00', 1116), (4, 'InternalIconID', '1461', '2000-01-01 00:00:00', 5172), (5, 'InternalIconID', '1461', '2000-01-01 00:00:00', 1122), (6, 'InternalIconID', '827', '2000-01-01 00:00:00', 4973), (7, 'InternalIconID', '1541', '2000-01-01 00:00:00', 5162), (8, 'InternalIconID', '925', '2000-01-01 00:00:00', 1171), (9, 'InternalIconID', '322', '2000-01-01 00:00:00', 5153), (10, 'InternalIconID', '1462', '2000-01-01 00:00:00', 5173), (11, 'InternalIconID', '1373', '2000-01-01 00:00:00', 1117), (12, 'InternalIconID', '1371', '2000-01-01 00:00:00', 1115), (13, 'InternalIconID', '322', '2000-01-01 00:00:00', 1103), (14, 'InternalIconID', '1463', '2000-01-01 00:00:00', 5174), (15, 'InternalIconID', '324', '2000-01-01 00:00:00', 1105), (16, 'InternalIconID', '321', '2000-01-01 00:00:00', 1102), (17, 'InternalIconID', '1370', '2000-01-01 00:00:00', 1113), (18, 'InternalIconID', '323', '2000-01-01 00:00:00', 1104), (19, 'InternalIconID', '1464', '2000-01-01 00:00:00', 5175), (20, 'InternalIconID', '1464', '2000-01-01 00:00:00', 1125), (21, 'InternalIconID', '926', '2000-01-01 00:00:00', 1172), (22, 'InternalIconID', '928', '2000-01-01 00:00:00', 1174), (23, 'InternalIconID', '1460', '2000-01-01 00:00:00', 5171), (24, 'InternalIconID', '826', '2000-01-01 00:00:00', 4972), (25, 'InternalIconID', '828', '2000-01-01 00:00:00', 4974), (26, 'InternalIconID', '323', '2000-01-01 00:00:00', 5154), (27, 'InternalIconID', '1370', '2000-01-01 00:00:00', 1112), (28, 'InternalIconID', '321', '2000-01-01 00:00:00', 5152), (29, 'InternalIconID', '1462', '2000-01-01 00:00:00', 1123), (30, 'InternalIconID', '324', '2000-01-01 00:00:00', 5155), (31, 'InternalIconID', '320', '2000-01-01 00:00:00', 1101), (32, 'InternalIconID', '1370', '2000-01-01 00:00:00', 1111), (33, 'InternalIconID', '1371', '2000-01-01 00:00:00', 1114), (34, 'InternalIconID', '927', '2000-01-01 00:00:00', 1173), (35, 'InternalIconID', '1460', '2000-01-01 00:00:00', 1121), (36, 'InternalIconID', '1542', '2000-01-01 00:00:00', 5163), (37, 'InternalIconID', '1463', '2000-01-01 00:00:00', 1124), (38, 'InternalIconID', '320', '2000-01-01 00:00:00', 5151), (39, 'InternalIconID', '825', '2000-01-01 00:00:00', 4971), (40, 'InternalIconID', '1544', '2000-01-01 00:00:00', 5165), (41, 'InternalIconID', '829', '2000-01-01 00:00:00', 4975), (42, 'InternalIconID', '1540', '2000-01-01 00:00:00', 5161), (43, 'InternalIconID', '1543', '2000-01-01 00:00:00', 5164);
Without this data, Songs will only display wrong icon in player Skills, not in buff effects or in Concentration Windows or in Mini-Group... That's why I chose this method, its the one that work mostly everywhere except in UI :s
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest