• Welcome to Valhalla Legends Archive.
 

*bni

Started by Blade_360, December 29, 2002, 07:42 PM

Previous topic - Next topic

Blade_360

What are and how do I use *bni files ??? Since I got them from Blizzard I awsume they stand for Battle.net Icons and I think there the icons for all the icons but still don't know how to use them

l)ragon

#1
processing them you could look over bnetd's bniutilitys files. the icons them selves are if i remember standered .tga files.

~l)ragon
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Blade_360

??? Where do I find bnetd's bniutilitys files? I tried searching for them on the new but didn't find anything tried searching on Bnetd's website still nothing

l)ragon

#3
bnetds sourceforge page in the cvs archive
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Blade_360

#4
Ok I feel really stupid for this :-[ but I can't find it I went the the CVS Archieves. I found the Bnetd Utilities source code but not the regular >:( could someone please give me an exaclt link or something?

tA-Kane

#5
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Skywing

Looks good.  Some minor corrections, though:

The first two DWORDs are 0x10 and 0x01, respectively (at least for all icons.bnis which I've ever seen).  They're probably used as a kind of signature to verify that the file really is a bni file, the same as MPQs and BNCache files have a MPQ\x1a or BN3\x1a signature.

If the flags field is nonzero, then it's a flags match (tested with AND, not direct equality, btw! -- "User's flags must be this value for this icon to be valid." is a bit misleading about that).  The product field is included only if the flags field is zero, and the unused zero field after it is always included.

Icons should be matched in the order in which they appear in the file, and after the first match you should stop searching for other matches and display that icon.  Blizzard (0x01), Battle.net (0x08), Operator (0x02), and Moderator (0x04) flagged users are always sorted above other users in that order; although these appear above all other icons in icons.bni, the sort order is hardcoded in the game and is not extracted from icons.bni.

The old icons.bnis started in the top right corner, so it might be a good idea to support that too.  Additionally, the bnetd icons.bnis that I've seen use some format options that have never been used in Battle.net icons.bnis.  Beware!

Just to clairify: The TGA in icons.bni is a strip of icons stacked on top of eachother, with each icon appearing in the same order as it's icon usage fields in the BNI header relative to other icons.

I suppose I'll do some more research on the game's icons.bni processor, and find what it does with that zero field.  Anyways, nice spec :)

Zorm

#7
Thanks a ton Kane, that was what I needed to start working on adding icons.bni support to my bots.
"Now, gentlemen, let us do something today which the world make talk of hereafter."
- Admiral Lord Collingwood

tA-Kane

#8
Thanks for the compliments, and you're welcome, zorm.

Anyways, I've updated it to include Skywing's corrections and clarifications.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Adron

#9
Theories about the unknown dword:

It's possible that it's just a string with a terminating zero byte and then zero padding to the next dword.

Also possible that the game name is actually a list of games, each one occupying a dword, terminated with a dword zero. This could be tested with a real game and putting multiple game id's into the same entry.


I'm sure Skywing's investigations will tell us exactly what the dword is. Will be interesting to see if any of these guesses were close.

tA-Kane

#10
QuoteIt's possible that the game name is actually a list of games, each one occupying a dword, terminated with a dword zero. This could be tested with a real game and putting multiple game id's into the same entry.

I had thought that at first, but I've not yet found a .bni file with an actual list of entries...

I suppose it wouldn't be hard to emulate the binary/ftp servers, have the game download test .bni files, and see what the results would be...
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Skywing

#11
Adron and I did some in depth investigations into icons.bni tonight; here's a brief overview of what we found:

Battle.snp supports 24-bit and 32-bit TGAs.
The two DWORDs starting the file are really a DWORD and two WORDs.

The first DWORD must be 0x10, and the first WORD must be 0x01.  The second WORD does not appear to be examined by the client, but is always set to 0.

The client supports up to 31 product matches per icon; these are provided in a zero terminated list, which is what that zero field is used for.

MiLF

#12
is it possible to change your icon by altering what packets are sent?

Zakath

#13
You can alter several icons: you can ensure that your "lag" icon is always 6 red bars by neglecting to respond to the server's ping attempt during logon. You can also change it to a plug by indicating that you do not support UDP packets. Finally, try becoming the moderator of a channel or squelching someone - both of those things will change the primary icon.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

tA-Kane

#14
kthx Skywing, Adron.

I've updated my Battle.net Icons File document, at http://kbserver.homeip.net/kanebot/misc/bni_file.html to reflect what you two have found.

*nudges Spht to update the file on his documents page*
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com