SWBFGamers

Modding for the Original SWBF1 and SWBF2 => Released Maps and Mods => Topic started by: Led on October 22, 2011, 03:26:45 PM

Title: BattleBelk 010 script files
Post by: Led on October 22, 2011, 03:26:45 PM
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


Title: Re: BattleBelk 010 script files
Post by: Phobos on October 22, 2011, 03:34:46 PM
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.
Title: Re: BattleBelk 010 script files
Post by: SleepKiller on October 22, 2011, 03:40:55 PM
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.
Title: Re: BattleBelk 010 script files
Post by: Phobos on October 22, 2011, 03:46:43 PM
brake it down  :wave:
Title: Re: BattleBelk 010 script files
Post by: Bamdur on October 22, 2011, 03:58:18 PM
there is a trial dude
Title: Re: BattleBelk 010 script files
Post by: SleepKiller on October 22, 2011, 04:03:53 PM
Quote from: Bamdur on October 22, 2011, 03:58:18 PM
there is a trial dude
Yeah, I'm using it right now.
Title: Re: BattleBelk 010 script files
Post by: Bamdur on October 22, 2011, 04:12:35 PM
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
Title: Re: BattleBelk 010 script files
Post by: SleepKiller on October 22, 2011, 04:13:53 PM
Yeah  :( .
Title: Re: BattleBelk 010 script files
Post by: jdee-barc on October 22, 2011, 04:26:32 PM
someone should try making a model extracting script as well.
Title: Re: BattleBelk 010 script files
Post by: SleepKiller on October 22, 2011, 04:29:05 PM
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 );
  };






Title: Re: BattleBelk 010 script files
Post by: jdee-barc on October 22, 2011, 04:56:04 PM
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.
Title: Re: BattleBelk 010 script files
Post by: SleepKiller on October 22, 2011, 04:58:17 PM
Possibely, I'll try it.
Title: Re: BattleBelk 010 script files
Post by: tirpider on October 22, 2011, 07:09:06 PM
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.
EhPortal 1.34 © 2025, WebDev