Mshex/Mshex4Max/Meshtool source code / MSH documentation

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

Gametoast Staff
User avatar
Posts: 1353
Joined: Tue Jul 10, 2007 4:10 pm

Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby RepSharpshooter » Thu Dec 29, 2011 4:33 pm

Upon request, I have released the source to these mesh programs. I coded these as a highschooler, so they are a bit disorganized. Mshex4Max is the most organized, because it uses object oriented programming. All are written in C++

Contained in the mshex/research folder is documentation on the msh file format that was once posted online (may be gone now). It can serve as reference to people writing new tools to for with msh.

Download link:
http://www.mediafire.com/download.php?iuzbb175mjbici0

Master Bounty Hunter
User avatar
Posts: 1649
Joined: Thu Jul 08, 2010 5:53 pm
Location: New York, USA
Projects :: WIP. I will reveal what it is later on..
Games I'm Playing :: SWBF2-SWRC
xbox live or psn: No gamertag set

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby Cerfon Rournes » Thu Dec 29, 2011 4:38 pm

Awesome! Thanks Rep!
Hidden/Spoiler:
Nice to see you on Gametoast. :wink:

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby AceMastermind » Thu Dec 29, 2011 6:18 pm

Thanks for sharing! There has always been a lack of actual source code for inspiring programmers to work from regarding the msh format and this will provide a great way to incorporate new or modified features without having to rewrite an import/export program from scratch every time.

Space Ranger
User avatar
Posts: 6120
Joined: Tue Aug 17, 2010 3:30 pm
Location: Columbus, Ohio
Projects :: Evolved 2

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby THEWULFMAN » Thu Dec 29, 2011 6:31 pm

Thanks for releasing these, I'm sure they will be useful sometime. Nice to see you around Rep, good luck with college. :)

Lance Corporal
User avatar
Posts: 99
Joined: Fri Nov 25, 2011 3:58 pm

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby tirpider » Thu Dec 29, 2011 11:49 pm

ZOMG, Awsome!
Thank you for releasing this, RepSharpshooter.

I'm looking forward to seeing some real code that handles these files.
I've been re-inventing the wheel, just trying to get the msh info into editable listboxes.

Gametoast Staff
User avatar
Posts: 1353
Joined: Tue Jul 10, 2007 4:10 pm

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby RepSharpshooter » Fri Dec 30, 2011 1:59 am

No problem, I hope they go to use somehow.

Like I said, the first mshex was coded very sloppily, yet it runs for the most part. The comments also have my deranged ramblings :) I'm not sure if even I can make sense of it.

Mshex4Max is more properly structured, so it should be used as a better reference on how to handle the msh file. It lacks .XSI import algorithms, but combining the old ones from Mshex wouldn't be that hard.

Lance Corporal
User avatar
Posts: 99
Joined: Fri Nov 25, 2011 3:58 pm

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby tirpider » Fri Dec 30, 2011 6:07 am

Definately going to be useful.

I wont be able to directly use your functions as I am writing with autoIT (a basic like scripting language.) But I can get a good look at how to handle the various tags in memory.

Right now I'm stuck with arrays (big, slow, and smelly muti-dimensional ones.) But with no programming background, basic and arrays will have to do.

The end result will be a stand-alone MSH specific hex editor thing. With controls and features built in to handle repetitive and complex tasks associated with post xsi tweaks.
(updating size fields, validating known datatypes, import/swap features(tags and chunks), validating tag sequences and prerequisites (ie making sure MODLs have TRAN and FLGS if they need it), and ultimatly, direct manipulation of the vertexes and strips.)
It will also be usefull in determining the structure of some of the unknown tags, possibly paving the way for converters that can handle collision meshes.
I plan on releasing my source as well, once it gets out of alpha.

So, yeah, your source is the only example out there. And your tools are solid.
I'm definatly looking at it.
:bowdown: Thanks for writing them, and super thanks for releasing the source. :bowdown:

Ancient Force
User avatar
Posts: 1271
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby ANDEWEGET » Fri Dec 30, 2011 8:03 am

Yes, thank you very much! Youve done me a great favor with this. ;)
@tirpider: Actually its possible to "decompile" Nimlots msh tool(forgot the name) into any .NET language(C#, IronPython etc...).

Major General
User avatar
Posts: 659
Joined: Fri Jan 07, 2011 4:57 pm
Location: Germany
Games I'm Playing :: SWBF2

Re: Mshex/Mshex4Max/Meshtool source code / MSH documentation

Postby naru1305 » Fri Dec 30, 2011 8:48 am

wow, thx for these codes, they will be ver useful :thumbs:

Return to Released Assets

Who is online

Users browsing this forum: No registered users and 2 guests