• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[General] make music play when you enter a game

Status
Not open for further replies.
Level 1
Joined
Jul 26, 2015
Messages
3
Hello. Could anyone tell me how to make music played as soon as you enter a game where you see a minimap preview. I thougt can solve this using trigger manager but realised it's only in playing games. I looked for every websites explanning this but I coduln't find so i'm asking here. help!!
 
Level 25
Joined
May 11, 2007
Messages
4,650
So lemme get this straight, you can change override the files in a map before it's been launched?

So you could, say replace the start button and all other graphics in the lobby before the map has been launched?
Just because, it would be cool.

Without using a custom .MPQ
 
So lemme get this straight, you can change override the files in a map before it's been launched?

So you could, say replace the start button and all other graphics in the lobby before the map has been launched?
Just because, it would be cool.

Without using a custom .MPQ
No you can't. Group names, map preview image and music are the exception.
 
Level 25
Joined
May 11, 2007
Messages
4,650
Okay.
But in the Advanced Interface tab of the editor, if you replace the Computer (Normal) string, it shows up the next time a map is opened.
So, if you were to import new graphics, would wc3 load the old ones when a new map opens or the imported ones?

Just speculating.
 
Last edited:
Level 1
Joined
Jul 26, 2015
Messages
3
Sorry about that. I didn't read the last bit of vJass: Advanced Initialization. I read it now and tried it using newgen5d(jasshelp thorw an error : bin\sfmpq.dll missing. don't know why). I just copy and paste
//! inject config
call SetPlayers(1)

call DefineStartLocation(0, 704.0, - 832.0)

call InitCustomPlayerSlots()

call PlayMusic("war3mapImported\\1.mp3")
//! endinject

in custom trigger but it seems not working. 1.mp3 is the music file i imported. which i want to be played

I didn't mention it, I'm totally noob. i was recruitting clan and just thought why not make clan map. I made custom preview quite easily just typing war3mappreview.tga which loaded by import manager.

anyway, do i need to add some other script before the script above? like main and config(?)

Thanks guys. I tried JASS but it was a bit too hard for me as a noob. i asked my friend's friend and he knew the other way. Don't ask me why? or how. i just did as what he said is this (he said it's smd function)

※just in case back up your map.

1. open world editor -> import the music file you want and save

2. run W3M MAP Utilities v3 ( attached) open the map

3. you see the file list when it's loaded, right click war3map.j -> unzip -> save anywhere

4. go to the location where you saved right click war3map.j , click Edit plus

5. now you see the script loaded by Edit Plus. Find (Ctrl + F) endglobals and type below it ( just copy and paste it but don't forget to change the file name )

function smd takes string s returns nothing
call SetMapDescription(s)
call PlayMusic("war3mapimported\\thefilename.mp3")
endfunction

6. find (ctrl +F) mapna, you'll see like Set mapname(trigger.xxx). add call smd("SS") below set mapname, it should be parallel (put enoguh space)

7. save

8. back to the w3m map utilities, right click the war3map.j, replace it

9. now save(I find out there's no save option but you can save at edit-> map protect policy -> apply, but this is applying a protect too. so back up your map in case)

10. DONE !


----
tools
1. w3m map utilities v3 (it's korean tool , )
2. Edit plus (version doesn't matter/ [URL="https://www.editplus.com/download.html"]
just in case I'm using w3m map utilities v3 in korean, there's English option when you install but it didn't applied my computer. if others do as well, ctrl F -> O to open your map, you can easily recognise file lists, unzip is sixth from top when you right clicked the file in list, replace is fifth from the top. save, alt e -> the last menu -> alt A (checked box says "prevent edit from other programe" (automatically add certification code) )

w3m map utilities v3
 

Attachments

  • W3MUtil_Setup.7z
    6 MB · Views: 139
Last edited by a moderator:
Level 26
Joined
Aug 18, 2009
Messages
4,097
You can do that with any mpq editor but the next time you save in World Editor, the war3map.j will be overwritten again. Now I do not know why it does not find the dll in JNGP. That error is common when you start jasshelper from the wrong working directory but the JNGP should be executed directly.

Ps: The config function affects the players and teams setup. The vJass inject directive overwrites the normally generated function. What I posted there was just the minimum and may or may not suit your case. But I see you shifted it to an extra function now anyway although I do not know why you moved the SetMapDescription there as well.
 
Status
Not open for further replies.
Top