Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Mystical on February 07, 2010, 07:38 PM

Title: Icons.bni
Post by: Mystical on February 07, 2010, 07:38 PM

 okay, well this is really my first attempt playing around with downloading the actual icon BNI files & using them, I successfully download icons.bni and icons_STAR.bni, i view them using the processor built into mbncsutil, icons.bni holds the regular normal every day use icons, how ever i'm only able to see WCG icons in icons_STAR.bni, I'm looking for all the extra icons with stats, stars, ect..

I've compared the file size of both icons.bnis to others of people have posted on these forums, they are the same size, all i could assume is they are hidden inside or.. if anyone would like to shed some light on this, i know this is a very old topic, I've searched the forums and links are either broken do to forum changes or people slapped up some spagetti code that was not read-able.
Title: Re: Icons.bni
Post by: rabbit on February 07, 2010, 09:05 PM
Post your extraction code?  As long as you're extracting them correctly, there's no direct reason you shouldn't be able to get all of them.
Title: Re: Icons.bni
Post by: Mystical on February 07, 2010, 10:55 PM
quick example


Dim Icons As New BniFileParser(Environment.CurrentDirectory & "\icons.bni")
Picture.image = Icons.fullImage



should get the fullimage, viewing the image shows only the regular typical icons

I don't want to start parsing icons that arnt there. :|
Title: Re: Icons.bni
Post by: brew on February 08, 2010, 07:41 AM
can you see the icons in the files? (via hex editor)
try viewing it with this (http://darkblizz.org/brew/bni.zip).
Title: Re: Icons.bni
Post by: rabbit on February 08, 2010, 08:44 AM
Try Icons.AllIcons
Title: Re: Icons.bni
Post by: Mystical on February 08, 2010, 03:40 PM
I don't have VCExpress,

I've already wrote up a full class to try to handle the icons, It grabs all the icons however it still only has the select few icons, about 20, just the products, is there like a subdirectory or somthing in the bni file i don't know about?
Title: Re: Icons.bni
Post by: Michael on February 08, 2010, 07:25 PM
Well, I am currently having the same problem as mystical. I only get 20 icons or some from the icons.bni file. I also would like to figure out how to handle war3 icons.
Title: Re: Icons.bni
Post by: rabbit on February 08, 2010, 07:52 PM
http://rebirthbot.googlecode.com/svn/trunk/Rebirth/Classes/Bnet/BnetIcon.vb
http://rebirthbot.googlecode.com/svn/trunk/Rebirth/Classes/Bnet/IconsProcessor.vb

That's my fairly...messy...implementation of a BNI parser.  It's Camel's...but ported.  Obviously it doesn't do Warcraft 3 icons, but it's extracted every icon from a BNI just fine.
Title: Re: Icons.bni
Post by: Hdx on February 08, 2010, 08:00 PM
icons.bni only has 20 icons in it: TAHC, LTRD, RATS, RHSD, RHSS, PXES, RTSJ, VD2D, NB2W, PX2D, 3RAW, PX3W, Blizzard Representative, Battle.net Administrator, Channel Operator, Speaker, Special Guest, Squelched, GF Official, GF Player
icons_STAR.bni/icons_SEXP.bni have 6 in them: FRCW LPCW OGCW ISCW RBCW GPCW
The Stars and the Axes, etc, are hard coded in the client.
They are not downloaded on the fly, BNI files do not allow for icons based on a player's win ratio.
Title: Re: Icons.bni
Post by: Mystical on February 08, 2010, 08:04 PM

thanks for that rabbit,

edit: retract what i said, then, since hdx pointed it out.

anyways, where do all the stat icons come from? there all just hardcoded into the client?
Title: Re: Icons.bni
Post by: rabbit on February 08, 2010, 08:11 PM
the 11 star'd icons and the 3 ladder icons are hard coded, afaik.  The rankings are just drawn on them.
Title: Re: Icons.bni
Post by: Hdx on February 08, 2010, 08:12 PM
Quote from: Mystical on February 08, 2010, 08:04 PManyways, where do all the stat icons come from? there all just hardcoded into the client?
IIRC, they are in glue\Battle.net\icons\icons.pcx for SC, cant remember where WC2 holds em (prolly the same file)
Title: Re: Icons.bni
Post by: Mystical on February 08, 2010, 08:21 PM
hm, okay, so everything i've done is just correct, instead i now have to load the extra icons as well.

thanks everyone, I just figured the bni file was hiding the rest of the icons..

on to the next piece of fun
Title: Re: Icons.bni
Post by: MyndFyre on February 08, 2010, 08:25 PM
Quote from: -MichaeL- on February 08, 2010, 07:25 PM
Well, I am currently having the same problem as mystical. I only get 20 icons or some from the icons.bni file. I also would like to figure out how to handle war3 icons.
icons_war3.bni isn't a real BNI file, it's an MPQ file.  IIRC, it contains a (listfile) entry so you should be able to see what all the files are that the MPQ contains.

Warcraft 3 icons are stored in the BLP file format, which are DirectX-compatible containers of palette-encoded or JPG-compressed images.  MBNCSUtil supports them (http://code.google.com/p/jinxbot/source/browse/trunk/development/projects/BNSharp/MBNCSUtil/Data/Blp1Parser.cs) (as well as WoW images).
Title: Re: Icons.bni
Post by: Mystical on February 08, 2010, 08:43 PM
@hdx, same goes for the ping icons?
Title: Re: Icons.bni
Post by: Hdx on February 08, 2010, 09:39 PM
Quote from: Mystical on February 08, 2010, 08:43 PM@hdx, same goes for the ping icons?
Yup, same image iirc.
Diff dimensions though..