EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Item icon numbers? (https://www.eqemulator.org/forums/showthread.php?t=39960)

Mortow 08-27-2015 08:00 PM

Item icon numbers?
 
Ok, I know this is probably a stupid question but it has been bugging me for a while. I use Akka's EOC to look at the weapon viewer and it gives the IT# for the weapon but how do you find the icon # if you don't know the name of the weapon to look up in the database?

Thanks,
Mortow

Shendare 08-27-2015 08:15 PM

So, you're in a situation where you're looking at a weapon icon graphic, and can't tell which IT#### model it's associated with and what item id's use that model and icon?

Mortow 08-27-2015 09:11 PM

EOC displays the IT# for the graphic I am looking at but I don't know where to dig up the icon number associated with that model weapon.

Shendare 08-27-2015 09:15 PM

I'm not aware of anything in particular that ties a weapon model number to an item icon number. No algorithm or translation table or anything. It's just a matter of having an icon number specified in the item record in the database that gives a look relatively like the 3D weapon/armor/item model used in game.

Kingly_Krab 08-27-2015 09:46 PM

You could always do something in Perl using DBI to select all of the possible variations of item textures for an icon. But sometimes icons are used for non-visible (IT63) items, as well as weapons that look no where close to the icon itself.

Kingly_Krab 08-27-2015 09:53 PM

Double posting because it's a bump:
Code:

use DBI;
use DBD::mysql;
sub List {
    my $icon = shift;
    my $user = "USERNAME";
    my $pass = "PASSWORD";
    my $db = "DATABASE";
    my $dbh = DBI->connect("dbi:mysql:$db:localhost:3306", $user, $pass);
    $sth = $dbh->prepare("SELECT DISTINCT idfile FROM `items` WHERE `icon` = '$icon' ORDER BY `idfile` ASC");
    $sth->execute();
    my @a;
    if ($sth->rows() > 0) {
        while (my $idfile = $sth->fetchrow()) {
            push @a, $idfile;
        }
    }
    $sth->finish();
    $dbh->disconnect();
    return "All of the following item textures are used for icon $icon: " . join(", ", @a);
}
print "What icon would you like to see the textures for?\n";
my $icon = int(<STDIN>);
print List($icon);


Mortow 08-27-2015 10:07 PM

I will give that a try, Kingly. Thank you both for your help.

Kingly_Krab 08-27-2015 10:37 PM

You're welcome, here's an example of its use.
http://i.imgur.com/g40qk0R.png

Mortow 08-28-2015 06:44 AM

That is actually the reverse of what I need. I know the IT#### but not the actual icon#.

Kingly_Krab 08-28-2015 02:49 PM

I apologize:
Code:

use DBI;
use DBD::mysql;
sub List {
    my $idfile = shift;
    chomp $idfile;
    my $user = "USERNAME";
    my $pass = "PASSWORD";
    my $db = "DATABASE";
    my $dbh = DBI->connect("dbi:mysql:$db:localhost:3306", $user, $pass);
    $sth = $dbh->prepare("SELECT DISTINCT icon FROM `items` WHERE `idfile` = '$idfile' ORDER BY `icon` ASC");
    $sth->execute();
    my @a;
    if ($sth->rows() > 0) {
        while (my $icon = $sth->fetchrow()) {
            push @a, $icon;
        }
    }
    $sth->finish();
    $dbh->disconnect();
    return "All of the following item icons are used for idfile $idfile: " . join(", ", @a);
}
print "What idfile would you like to see the icons for?\n";
my $idfile = <STDIN>;
print List($idfile);

Example of use:
http://i.imgur.com/YMoH9Qx.png

Mortow 08-28-2015 09:54 PM

Thanks, Kingly. That works great.

Kingly_Krab 08-28-2015 11:01 PM

You're welcome.


All times are GMT -4. The time now is 10:09 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.