• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Group Export

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
I know how to export a model from the MPQ, but is there a way to group export all of its textures along with it? rather than searching for them individually
 
There isn't a tool that automatically does that. Are you looking to write a tool to do that?

You can write a tool to open the MPQ (use SFMPQ or StormLib?), convert it to mdl (Guesst's MDLX converter? I think it has command line options), look-up the textures and then export them. The MDL format is very easy to read, so it shouldn't be a problem. You can just find the textures block and look-up each texture.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
There isn't a tool that automatically does that. Are you looking to write a tool to do that?

You can write a tool to open the MPQ (use SFMPQ or StormLib?), convert it to mdl (Guesst's MDLX converter? I think it has command line options), look-up the textures and then export them. The MDL format is very easy to read, so it shouldn't be a problem. You can just find the textures block and look-up each texture.

Hm...

My coding is really more built towards Java. I know how to open an mpq via java, but command line arguments might be a bit eh. (Probably isnt the right place to ask it but) what would be the best way to do command line in java..

e/ hurr i can just use the Runtime class, I'll work on it. If its worth keeping, I might post it.

2e/ Good way to get the WC3 directory?

3e/ edit much >.>

is there a good way to load the war3.mpq in java? The loader i use (bnubot) caches the entire MPQ, which takes up 2gb of RAM o_O
 
Last edited:
1e/ yeah, Runtime was the first thing that came up from stackoverflow. I assume you'd use that.

2e/ IMO have them load it one-time with a browse tool. Save it to a txt file or cache it through some other means.

3e/ I haven't looked into java libs for MPQ's. However, you may want to look into:
https://code.google.com/p/pscript-l...va?r=a5d791ba707195220e80aeeafe236c613725b119
Or look at the WurstScript github:
https://github.com/peq/WurstScript
It runs MPQCL.exe to extract/import files. I don't know if it caches the entire thing or not though--AFAIK it was intended for maps; not sure how it runs when loading the war3.mpq.

PitzerMike also made some extensions that handle exporting and importing into mpq's (using SFMPQ). Look into grim extensions (included in JNGP). It has command line support too--just check out GrimExt documention.html.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
1e/ yeah, Runtime was the first thing that came up from stackoverflow. I assume you'd use that.

2e/ IMO have them load it one-time with a browse tool. Save it to a txt file or cache it through some other means.

3e/ I haven't looked into java libs for MPQ's. However, you may want to look into:
https://code.google.com/p/pscript-l...va?r=a5d791ba707195220e80aeeafe236c613725b119
Or look at the WurstScript github:
https://github.com/peq/WurstScript
It runs MPQCL.exe to extract/import files. I don't know if it caches the entire thing or not though--AFAIK it was intended for maps; not sure how it runs when loading the war3.mpq.

PitzerMike also made some extensions that handle exporting and importing into mpq's (using SFMPQ). Look into grim extensions (included in JNGP). It has command line support too--just check out GrimExt documention.html.

public void extractFile(File mpqArchive, String fileToExtract, File tempFile)

it extracts the entire thing into a new file...

E/ Actually I misread that, it extracts the file from the archive and puts it at the temp directory. Might work, just have to get all the texture names out of the .mdl

2E/ Guessy's doesnt have command-line

3E/ wee so many edits. I guess it does... its just hidden

#E/ it does, but it loads the program and converts the model... I need it without the annoying popup windows everywhere
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
ok, I have a new issue. The old mdx>obj exporter i was using (Can't remember which one) doesn't support animations. Is there a way to convert mdx>obj,ms3d,fbx,3ds,etc WITH animations?

e/ it was biturn. Doesn't like anims.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Are you looking for a converter or an importer? (importer -> import an mdx into the modeling program, converter -> directly convert the mdx to the model program's format)

o_O

preferably converter for batch conversions, but blender importer would work (I don't have or care to obtain 3ds)
 
Status
Not open for further replies.
Top