Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Infernal (PC) - *.xbn / *.xsi.bin / *.data

Featured Replies

  • Localization

What are *.xbn / *.xsibin / freespacemap.data from Infernal and can someone analyze these file formats and make a map editor? Can't find a tool that converts XBNs or freespacemap.data to FBXs.

Samples:

https://mega.nz/file/NaISFS6K#A8ELNUpAxM1JYRIcpjCuH8gZmmOuFpIXnb1sxdSCKvI

https://mega.nz/file/5egygRhY#eVk7YDtfjdjOQyohJgHCLbWWMGCKasbn7iIEbOxjZ8I

  • Supporter

"make a  map editor"? Sounds funny, but well, "never give up on your dreams"...

What I found on a quick glimpse:

terrain data
127 small vertex blocks of around 95 vertices
blocks may or may not sum up to a proper terrain, too lazy to check

scene.scb contains object data including position and rotation

object 2681
  based-on-template Zapora_roboty_deski_mk:1
  parent 0
  variables
    Name Zapora_roboty_deski_mk-4087
    Position 2240.127197265625 5.999873161315918 640.0706787109375 1
    Rotation 179.9999389648438 0 179.9998779296875 1
    Scale 1 1 1 1
    Hidden 0
    Reflection 1
    Optimized 0
    Optimized_source 0
    Frozen 0
    Layer 25
    Schematic_collapsed 0
    Schematic_position_X 240.000000
    Schematic_position_Y -2940.000000
    Object_class_modifier
    LUA_class
    LUA_initializer
    LUA_params
    Icon_string
    Icon_string2
    Mesh_random_number 9327
    Cast_shadow 1
    Receive_shadow 1
    Obstacle 2
    Destroyed 0
    Is_Band 0
    Shaders_params 0 0 0 0
    Distance_blend_start 0.000000
    Distance_blend_end 0.000000
    Disable_template_properties 0
  end-variables

scene.dat, 421 pic links such as
flares\Lamp_BOB_Flare_01.tga

freespacemap.data seems to contain simple objects.

freespacemap-data.png

One would have to know how the terrain data is used in Game. Are the 127 blocks a height map? Could be, haven't looked that close at them.

I say that because I did write 010 Scripts to take height informaton from a file, change it into a wave front obj file that can be edited in a 3D program, then another Script to change it back to the Game compatable file.

That was 4 or 5 years ago.

 

 

  • Supporter

Isn't a heightmap continuous data usually? Which can be visualized in a graphics program?

Plus those blocks have gaps of around 3600 bytes between them. Mostly zeroes.

And point clouds are ugly. But I have no idea... maybe you're right.

(Sadly the point clouds are too ugly to motivate me to sum them up...)

That's the thing that one needs to know. How the data is used in Game.  I could hand you the files from the Game I did the Scripts for and you'd be lost.

It didn't make sense when We first looked at the files.  We found information on how that nonsence data was interpreted by the Game Engine.

So was able to read 101 floats and add information to create a 3D obj file that can be edited and reconverted to the proper format.

In our case? The 101 floats turned out to be the heights for a very small section of the World Map. And We found there was an over lap for each section that had to be accounted for!

Why an over lap for each area? Due to the scale of the World Wide map it was to help when rendering the surface. Kind of a buffer/transition area.

The odd ball numbers you reported reminded me of that. Why an odd number?

 

Edited by 05SpeedMaster

  • Supporter
1 hour ago, 05SpeedMaster said:

In our case? The 101 floats turned out to be the heights for a very small section of the World Map.

So those vertices were all parallel?

That's not the case here afaics.

edit: ok, since the floats look strange to me I could imagine that it's not 95 vertices but 3x95 height values.

So I could create a grid, say 16x16 and apply them as height values. Though the number of vertices per block is not constant but differs a little bit.

Edited by shak-otay

In our case, the floats were the Y in the X Y Z. Y being up/down in the World.

Some parts of the World grids were RLE encoded. Some parts were compressed differently. I don't recall the compression at the moment.

So if the grid was all deep Ocean? RLE would handle that as everything was 0 or so. Once you hit a land Grid, then the other compression was used.

0 was somewhere around 10,000 feet deep. Each float had a depth/height range. I can dig up the scaling for that if you want.

The program was written in Romania by Ubisoft Devs. 

And just for general information? I'm a 67 year old Guy that has hacked stuff since the mid 1980's. Even ran the first Dial up Internet Access in my area. Worked for Lawyers, Judges, Police, and Court Houses.  Just figured you all might get a kick out of that infomation. :classic_biggrin:

Edited by 05SpeedMaster

In my case? Here's part of the 010 Script I wrote..........

for( i = 0; i < s; i++)
  {
    x=(x+50);
    z=-2550.0000;
    l=101;
    
    {
      for( t = 0; t < l; t++)
      {
        y = ReadFloat();
        z=(z+50);
          Printf( "v %d %f %d\n", z, y, x );
 FSkip(4);
 
      }
    }
  } 

  • Supporter

Hi, it's not a matter of coding.

As you wrote: someone needs to find "information on how that nonsence data was interpreted by the Game Engine".

Interestingly Metropolis Software was taken over by CD Project in 2008. So I could have a look at the RedKit for TheWitcher2- how it handled terrain data.

The Code is not intended for you. 
It's for the OP to see that there's more then just spitting out a Tool He may want and how hard it can be.
:classic_wacko:

  • Supporter

freespacemap.data struct. Still don't know where is shape count? Also after shape data there is matrix table which use 4x4 and some other. But again no count.

struct {
    char Sign[3];
    uint32 Var0;
}Header;

struct {
    struct {
        uint32 Var0;
        uint32 Var1;
        float Var2,Var3,Var4,Var5,Var6,Var7,Var8,Var9,Var10,Var11,Var12;
        ubyte Null;
        uint32 VtxCount;
        uint32 IdxCount;
        uint32 Var13;
        ubyte Data[Var13*7];
    }ShapeHeader;
    ubyte VtxBuffer[ShapeHeader.VtxCount*12];
    ubyte IdxBuffer[ShapeHeader.IdxCount*6];
    ubyte End;
}Shape[you can guess count]<optimize=false>;

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.