BattleBelk 010 script files

Started by Led, October 22, 2011, 03:26:45 PM

Previous topic - Next topic
October 22, 2011, 03:26:45 PM Last Edit: October 22, 2011, 04:16:35 PM by Buckler
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=368


After a long and exhaustive internet search, I found this on my hard drive!



Don't ask me how to use it or what it is for  :P

link to 010 editor site:
http://www.sweetscape.com/010editor/


BattleBelk 010 script files as discussed here on GT

http://www.gametoast.com/forums/viewtopic.php?f=1&t=17595&p=307511#p307511


Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

October 22, 2011, 03:34:46 PM #1 Last Edit: November 10, 2011, 07:57:04 PM by Inactive
I'll see what I can do with those files. There's not much info on the thread though other than what Riley already mentioned concerning lvl chunks.

I see nothing more really then what we can already do these jus-  :slap: :blink: :wacko: Just realised something that I may be able to do with these files. And these files are for 010 Editor a profesional hex-editor.

October 22, 2011, 03:46:43 PM #3 Last Edit: November 10, 2011, 05:21:22 PM by Retired Modder
brake it down  :wave:



well after using it this is what ive found out, it extracts .class (munged odf files), .texture (munged tga files) .font (munged font files) .shader( shader files) and .script files(munged lua files) it doesnt decompile anything


someone should try making a model extracting script as well.
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Way ahead of you  ;).

//--------------------------------------
//--- 010 Editor v2.1.3 Script File
//
// File:
// Author: BattleBelk(Editedby SleepKiller)
// Revision:1.2
// Purpose: extract munged model from lvl file
//--------------------------------------

char filename[];
const char file_ext[]=".model";
uint chunk_offset;
const char chunk_type[4]={'m','o','d','l'}; // "tex_"
char chunk_name[];
uint chunk_begin;
const char header[4]={'u','c','f','b'};     // "ucfb"
int i;
int filenum;

filename=InputOpenFileName(
    "Open lvl file",
    "All files (*.lvl)|*.lvl",
    "*.lvl" );
FileOpen(filename);
filenum = GetFileNum();

TFindResults find_chunk=FindAll(
    chunk_type,
    true,
    false,
    false,
    0.0,
    1,
    0,
    0 );

for(i = 0; i < find_chunk.count; i++ )
  {
    chunk_begin=find_chunk.start[i];
    chunk_offset=ReadInt(chunk_begin+4);
    chunk_name=ReadString(chunk_begin+16);
    Printf("%s\n", chunk_name+file_ext);

    SetSelection( chunk_begin, chunk_offset+8);
    CopyToClipboard();
    FileNew();
    WriteString( 0, header);
    WriteUInt( 4, chunk_offset+8 );
    SetCursorPos( 8 );
    PasteFromClipboard();
    FileSave(chunk_name+file_ext);
    FileClose();
    FileSelect( filenum );
  };







October 22, 2011, 04:56:04 PM #10 Last Edit: October 22, 2011, 04:58:22 PM by jdee-barc
Just dawned on me. with that script, you could possibly extract the console models i was talking about.

EDIT

wait.. but i have no idea of how you'd possibly be able to convert them to msh from .model, though.
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)


October 22, 2011, 07:09:06 PM #12 Last Edit: October 22, 2011, 07:13:27 PM by tirpider
The model chunk should be made up of sub sections just like the lvl. (and .msh's coincidentaly)

A simular script targeted to busting the .model up (into smaller chunks) would allow one to compare them to the sections of a .msh.

The .option settings could help illuminate what data is kept, what is discarded, and how things are treated on their way to their post munged state.

-edit- (afterthought)

As a test, create a test lvl with only one model in it, then try to find , extract, and rebuild it, using these scripts.