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

Post Reply
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Mshex/Mshex4Max/Meshtool source code / MSH documentation

Post by RepSharpshooter »

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
User avatar
Cerfon Rournes
Master Bounty Hunter
Master Bounty Hunter
Posts: 1558
Joined: Thu Jul 08, 2010 5:53 pm
Projects :: WIP. I will reveal what it is later on..
Games I'm Playing :: SWBF2-SWRC
xbox live or psn: No gamertag set
Location: New York, USA
Contact:

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

Post by Cerfon Rournes »

Awesome! Thanks Rep!
Hidden/Spoiler:
Nice to see you on Gametoast. :wink:
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

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

Post by AceMastermind »

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.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

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

Post by THEWULFMAN »

Thanks for releasing these, I'm sure they will be useful sometime. Nice to see you around Rep, good luck with college. :)
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

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

Post by tirpider »

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.
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

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

Post by RepSharpshooter »

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.
User avatar
tirpider
Lance Corporal
Posts: 97
Joined: Fri Nov 25, 2011 3:58 pm

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

Post by tirpider »

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:
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

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

Post by ANDEWEGET »

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...).
User avatar
naru1305
Major General
Major General
Posts: 657
Joined: Fri Jan 07, 2011 4:57 pm
Games I'm Playing :: SWBF2
Location: Germany
Contact:

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

Post by naru1305 »

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