• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How does the model uploader detects custom texture?

Hello,

A bit of context — my question is below:

I'm writing a desktop application to facilitate importing custom 3D models into a map.
The workflow is:
Launch the application → select a folder containing multiple models and textures → select a map → click import.

During the import process, I want to fix the usual texture path issue (removing war3imported, etc...) and to create one unit per model and place it on the terrain.
This way, I can import a folder containing hundreds of models and view them in the world editor without manually creating units and assigning models.

I'd also like to highlight conflicts that may arise — for example, two models sharing the same custom texture path.
To handle this, I'll need to parse the .mdx files to inspect their texture paths.

I don't want the user to have to link a game folder, MPQ, or CASC archive to use the application — which would otherwise be necessary to detect whether a texture path belongs to the base game.


Question:

When you upload a model to this website, if I remember correctly, it detects and prompts you to upload a custom texture if needed.
How does the website determine which textures aren't part of the base game?
 
You need to parse the MDX files. But specifically it resides in the TextureChunk for textures, ParticleEmitterChunk, sometimes models use other models as an effect. Also, the FaceEffectChunk refers to Reforged Face Effect files.

Come see me after class for models of the various examples.
 
Yes. Also as a note if your program is doing this, the textures in the files often have the wrong path. If the model calls for Textures\black32.tga you should consider this an ingame texture of Textures/Black32.blp exists in game storage or whatever. So you want to be sure to check those cases.

Also, since 1.30 or so there is a file in game storage called filealiases.json for backwards compatibility. If a texture is aliased in that file, then you should treat it as an ingame texture even if it is not actually in the game storage.
 
Back
Top