• 🏆 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!

Custom MPQ units & importing function

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
Are you making a multiplayer map or a single player campaign? I'm pretty sure you can import custom models, sounds, etc only once for campaigns which apply to all maps. Someone else may need to explain though as I have limited campaign experience.
 
Level 5
Joined
Mar 30, 2006
Messages
60
Multiplayer.

I've created a custom/modified mpq (war3mod/war3patch) that contains models for additional units, buildings and spells.

The spells, units etc. were created with the world editor and are stored there.

Currently to make a map work with my mod I need to import triggers, unit data and then have to modify the, gameplay constants and game interface manually.
It would be nice to be able to load the custom unit data etc. with some sort of trigger, so I have less work to do.

(btw: I know that there was a tool to create custom MPQ .exe files for mods, but it seems that it no longer works).
 

Attachments

  • gluescreen.png
    gluescreen.png
    889 KB · Views: 78
Level 26
Joined
Aug 18, 2009
Messages
4,097
Generally, no. Some data is map-specific only. The units you create in the object editor make for a .w3u file, which is a map-specific concept and like all maps will overwrite it anyway. There are slks for native object data. Those could be altered from mpq-side but it depends on what data set the map uses (>Scenario >Options), in doubt you would have to consider all of them. Moreover, some maps use custom slks, which would overshadow yours once again. Doodad definitions and placements are similar (you cannot place doodads via trigger in the first place, those are done in the war3map.doo, which again is a map-specific file). As for triggers, there is the map-side war3map.j and mpq-side scripts/common.j, scripts/common.ai, scripts/blizzard.j. Not sure how common.j and common.ai work exactly but blizzard.j is simply called from the main function of the war3map.j normally (generated by the World Editor) and behaves just as if it were prepended to the map script (has its own globals block though). Those files, too, are map-importable.

[x] without changing the game code itself, no chance for a sure to work solution :(
 
Status
Not open for further replies.
Top