Honorable Member Tatsumaru 5257 Posted July 11, 2022 Honorable Member Share Posted July 11, 2022 (edited) Hello, I found a problem with music. Perhaps someone will know the solution. When you type the command /xmas_snow 1, the music changes to Christmas. When you teleport at least twice, the Christmas music will mix with the standard music. Two music will be played at the same time. This is a problem that occurs for many people. It is not my personal problem. Edited July 12, 2022 by Tatsumaru Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted July 11, 2022 Active Member Share Posted July 11, 2022 (edited) This is the hidden content, please Sign In or Sign Up By commenting this line, you will disable xmas song, because the function, which have to play this music, when the command is used, never worked properly. In most sources this music is resetted on teleport or disabled or you have the bug mentioned above. Edited July 13, 2022 by ReFresh 15 1 1 7 I'll be always helpful! Link to comment Share on other sites More sharing options...
Solution meneleos 305 Posted July 13, 2022 Solution Share Posted July 13, 2022 (edited) in game.py find this: netFieldMusicFileName = m2netm2g.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) change: if (musicInfo.fieldMusic != "xmas.mp3"): netFieldMusicFileName = m2netm2g.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) finally; https://metin2.download/video/9q1V0kLfanfDv4AXJq80EL2Ykrc6F05o/.mp4 Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted July 13, 2022 Active Member Share Posted July 13, 2022 (edited) @meneleosIt won't work. Try to disable xmas_snow, restart the client and log in. No music will play, because of lastplay.inf file, from which is the music read. The xmas.mp3 will be saved there. Edited July 13, 2022 by ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
Honorable Member Tatsumaru 5257 Posted July 14, 2022 Author Honorable Member Share Posted July 14, 2022 (edited) 14 hours ago, meneleos said: in game.py find this: netFieldMusicFileName = m2netm2g.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) change: if (musicInfo.fieldMusic != "xmas.mp3"): netFieldMusicFileName = m2netm2g.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) finally; https://metin2.download/video/9q1V0kLfanfDv4AXJq80EL2Ykrc6F05o/.mp4 This solution fixes the music problem, but after strong consideration I conclude that it is probably better to disable this option altogether. One Christmas music played over and over in every location is not a good idea. Nevertheless, thank you for the solutions and your time gentlemen's. Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted October 4, 2023 Active+ Member Share Posted October 4, 2023 On 7/14/2022 at 3:13 AM, Tatsumaru said: This solution fixes the music problem, but after strong consideration I conclude that it is probably better to disable this option altogether. One Christmas music played over and over in every location is not a good idea. Nevertheless, thank you for the solutions and your time gentlemen's. you could create a list of christmas songs, and make them randomize everytime you login. Link to comment Share on other sites More sharing options...
ggns7 18 Posted February 10 Share Posted February 10 Just a logic problem, because GetFieldMusicFileName always returns a non-empty value. There is probably a default music name on the server. If there is no custom music selection, to play the default Find in game.py netFieldMusicFileName = net.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) Replace with; netFieldMusicFileName = net.GetFieldMusicFileName() if musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) elif netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) Im machine. Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted February 10 Active+ Member Share Posted February 10 (edited) 2 hours ago, ggns7 said: Just a logic problem, because GetFieldMusicFileName always returns a non-empty value. There is probably a default music name on the server. If there is no custom music selection, to play the default Find in game.py netFieldMusicFileName = net.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) Replace with; netFieldMusicFileName = net.GetFieldMusicFileName() if musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) elif netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) yeah but if you do this, the song will save for all maps and wont reset.. If you set enter_the_east from music and change maps, enter_the_East will be for Desert as well for example Edited February 10 by HFWhite Link to comment Share on other sites More sharing options...
ggns7 18 Posted February 10 Share Posted February 10 (edited) 6 minutes ago, HFWhite said: yeah but if you do this, the song will save for all maps and wont reset.. It will reset when you deactivate the Xmas event. It is also expected to work on all maps. Edited February 10 by ggns7 Im machine. Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted February 10 Active+ Member Share Posted February 10 19 minutes ago, ggns7 said: It will reset when you deactivate the Xmas event. It is also expected to work on all maps. shouldn't you write it like this then? because now it acts like this for all songs.. if (musicInfo.fieldMusic == "xmas.mp3"): netFieldMusicFileName = net.GetFieldMusicFileName() if musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) elif netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) else: netFieldMusicFileName = net.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) Link to comment Share on other sites More sharing options...
ggns7 18 Posted February 10 Share Posted February 10 (edited) 7 minutes ago, HFWhite said: shouldn't you write it like this then? because now it acts like this for all songs.. if (musicInfo.fieldMusic == "xmas.mp3"): netFieldMusicFileName = net.GetFieldMusicFileName() if musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) elif netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) else: netFieldMusicFileName = net.GetFieldMusicFileName() if netFieldMusicFileName: snd.FadeInMusic("BGM/" + netFieldMusicFileName) elif musicInfo.fieldMusic != "": snd.FadeInMusic("BGM/" + musicInfo.fieldMusic) No, this is very useless, you are writing specific code. It should be flexible. Edited February 10 by ggns7 Im machine. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now