Menu

Heroes .bin file format

fenuks
2014-03-03
2014-03-17
  • fenuks

    fenuks - 2014-03-03

    I wonder if anyone know what is structure of Heroes .bin format (I need it for my Heroes I, but Heroes II formats are almost the same).

    Quick look at hex viewer tells me that it is some kind description of how to create menus (it contains text to be displayed, names of graphic elements like buttons etc.). Any help appreciated.

     
  • Darmani

    Darmani - 2014-03-17

    First, one thing to watch out for is that not all the .bin files in Heroes II are the same kind of file. While most of them do indeed represent GUI windows, there are a few exceptions, such as RGBLOOKP.BIN, which is used to help implement the graphical "Blur" effect seen when you cast Holy Word.

    The .bin file is a fairly complicated binary format, as its name might suggest. The first three words of the file represent the width, height, and flags of the window. After that, there is a list of segments consisting of a one-byte "code" representing what kind of GUI widget is stored, followed by some sequence containing that GUI widget. It differs by each widget, so there's not really a short description. You can see the code for reading .bin files by going to line 101126 of http://hg.gamecreation.org/project-ironfist/file/e8dd80892bac/ironfist/src/raw_decompiled/HEROES2W.c#l101126 , The Project Ironfist tools (see http://projectironfist.pbworks.com/w/page/59667357/Quick%20Start%20Guide ) also contain a viewer for .bin files which allows you to enter the name of a .bin file, and see what window it encodes, as well as output a textual listing of its contents.

    Hope that helps!

     

Log in to post a comment.