I've been looking and looking through the source and I don't understand how the source is able to send the tags of information to the client. I understand how they are gathered up from the dfn files, but how is it passed from the c++ source code to the client?
What I'm trying to get at is; How are item properties displayed ingame? When you mouse over an item, it displays some of the properies read from the dfn file, such as the name, speed, damage, etc.
I would like to add addition ingame "client-item tags" to display the elemental resists of the items, race type (for slayer items), and any other custom properties.
Anyone know how this works or at can point me in the right direction?
"Client-item Tags"
OK, found the script that handles tooltips. This is the area of the code I want to edit/add material. Now I need some type of list or indication of what these numbers mean:
If anyone can point me in the right direction I would really appreciate it.
Code: Select all
if( cItem.GetHiDamage() > 0 )
{
[color=red]tempEntry.stringNum = 1060403;[/color]
tempEntry.ourText = UString::number( 100 );
FinalizeData( tempEntry, totalStringLen );
}
if( cItem.GetHiDamage() > 0 )
{
[color=red]tempEntry.stringNum = 1061168;[/color]
tempEntry.ourText = UString::sprintf( "%i\t%i", cItem.GetLoDamage(), cItem.GetHiDamage() );
FinalizeData( tempEntry, totalStringLen );
}
if( cItem.GetSpeed() > 0 )
{
[color=red]tempEntry.stringNum = 1061167;[/color]
tempEntry.ourText = UString::number( cItem.GetSpeed() );
FinalizeData( tempEntry, totalStringLen );
}
if( cItem.GetHiDamage() > 0 )
{
if( cItem.GetLayer() == IL_RIGHTHAND )
[color=red]tempEntry.stringNum = 1061824;[/color]
else
[color=red]tempEntry.stringNum = 1061171;[/color]
FinalizeData( tempEntry, totalStringLen );
}
if( Combat->getCombatSkill( &cItem ) != WRESTLING )
{
switch( Combat->getCombatSkill( &cItem ) )
{
case SWORDSMANSHIP:
[color=red]tempEntry.stringNum = 1061172;[/color]
break;
case MACEFIGHTING:
[color=red]tempEntry.stringNum = 1061173;[/color] break;
case FENCING:
[color=red]tempEntry.stringNum = 1061174;[/color]
break;
case ARCHERY:
[color=red]tempEntry.stringNum = 1061175;[/color] break;
}
FinalizeData( tempEntry, totalStringLen );
}
Last edited by Shudderz on Mon Nov 02, 2009 11:28 pm, edited 1 time in total.
I love these UOX forums, I tell you what. It seems whenever I post a question, the answer comes to me!
I found what I was looking for here:
http://www.decelle.be/UOAI/forum/downlo ... 64e3e67b31
Its a .rar file. When opened a .txt named Cliloclist gives all the client "numbers" and their meanings.
For example: I can now display the Elemental resists of items using the client numbers:
1060449 poison resist ~1_val~%
1060448 physical resist ~1_val~%
1060447 fire resist ~1_val~%
1060446 energy resist ~1_val~%
1060445 cold resist ~1_val~%
I'm really going to run with this discovery.
With these, I can duplicate all OSI AOS magic items. And becuase the source code is so well written it wouldn't be too much trouble to modify the source to incorporate these new properties for all items.
I found what I was looking for here:
http://www.decelle.be/UOAI/forum/downlo ... 64e3e67b31
Its a .rar file. When opened a .txt named Cliloclist gives all the client "numbers" and their meanings.
For example: I can now display the Elemental resists of items using the client numbers:
1060449 poison resist ~1_val~%
1060448 physical resist ~1_val~%
1060447 fire resist ~1_val~%
1060446 energy resist ~1_val~%
1060445 cold resist ~1_val~%
I'm really going to run with this discovery.