Adding music to a SOF2 map
Started by G-Stuff002
avatar
G-Stuff002 Rep. 0
#1   28 Oct 2021
Hi, i'm new to this forum, sorry if i'm wrong looking for help

is it possible to change to another value using this method (free-hex-editor-neo)? I am editing a map for SOF2

I found the map "swimminpool" inside .pk3 there is a folder "music" in which I found - swimminpool.mp3 - this music is played on the map
I opened with QuArK the - swimminpoo.bsp and found "entities.a" file. I opened it and saw that there is a text in it that is responsible for starting the music: "music" "music/swimminpool/swimminpool.mp3"
I added this text - "music/test.mp3" in "entities.a" file for another map without music. (I determined the structure of folders and music correctly)
And just do the save change in QuArK
But when I run map I get this error:
CM_LoadMAP: maps/hockey.bsp has wrong version number (46 should be 1)
How to Fix it ?

avatar
Tig Rep. 1622
#2   28 Oct 2021
@G-Stuff002 : It is not very clear what you are wanting to do. I'm guessing English is not your first language. All of the following is for Quake 3, but there is a good chance will be the same in SOF2.

If you are wanting to change the music for a map, you can make a patch PK3 with the new music in it (I believe). The new music file will need to have the same name as the original. Patch files should be loaded after the original data, so the new music file should be used instead of the original.

If you just want to play a music file in a map with or without music, you can add the music file to your baseq3 folder and load it in the map with the console command:
\music path/to/musicfile (no extension needed)

This method will stop the current music file and replace it with the one you have requested.

avatar
G-Stuff002 Rep. 0
#3   28 Oct 2021
I do not want load it in the map with the console command
I want to add music file in a map to map rotation.cfg so that different music will play automatically when changing map

ok, I will try to create mymusic.pk3 file
location:
mymusic.pk3/music/AllnamesOfBSPmapsHere.mp3
But only I did not understand - Patch files should be loaded after the original data - this is how? mymusic.pk3 should be loaded automatically ?!
Edited 5.02 minutes after the original posting.

avatar
Tig Rep. 1622
#4   28 Oct 2021
The loading method in Q3A is alphabetical. This means if you want something to load last, place a "z-" in front.

In your case, rename mymusic.pk3 to z-mymusic.pk3.

avatar
G-Stuff002 Rep. 0
#5   28 Oct 2021
ok, i have already done this but not worked. I chose a custom map called "hockey" without internal music. I launched map and heard the default music from main menu of SOF2
-----------
I opened a BSP with a QuArK and looked in 'entities.a' file It has no music trigger variable
It should be something like this, example: "music" "music / hockey /hockey.mp3" If I add this then I get the error
----------
avatar
Tig Rep. 1622
#6   29 Oct 2021
@G-Stuff002 : Really, you do not want to messing with the BSP with hex editors. This can cause all sorts of issues. You can change a value, but you can not really add values.

Instead, if you are running a server, you can set the values (including adding a music file to be played) in the config file for when the map loads. A lot more details on how to do this are here: www.quake3world.co...m/viewtopic.php

If you want to do this when you load a map, you can use a config to load the map instead. For example, you can make a config file called hockey.cfg, add all the values you want to the hockey.cfg and then run that config file to load the map and all the values.

avatar
G-Stuff002 Rep. 0
#7   30 Oct 2021
hockey.cfg and then run that config file to load the map and all the values.

I have already tried this method, it works fine but only from the server side. Clients do not hear music that is played on the server

avatar
G-Stuff002 Rep. 0
#8   30 Oct 2021
I found a blog, I was advised already. I am try using 1FX mod and I was able to add music to maps. But in 1fx mod I saw errors, some maps do not spawn weapons - RPG-7 and MM1 Grenade Launcher
And nobody understands what the problem is.
avatar
Tig Rep. 1622
#9   30 Oct 2021
In order to get the clients to hear the music, the clients will need to have the PK3 with the music on their PC as well. A patch file (for the server and the clients) and using a config on the server is the best way. The clients would also need to have music enabled. I always switch music off and I'm pretty sure a lot of people do.
avatar
riky rice Rep. 0
#10   16 Apr 2022
Hello I'm also trying to integrate a song in a map without too many passages, and preferibly writing the information inside the bsp itself
Edited 7.32 hours after the original posting.
avatar
Tig Rep. 1622
#11   17 Apr 2022
@riky rice - If this is a map you are making it is pretty easy to add a music file. If this is an existing map that you want to add music to, this is also possible, but it will depend on what you really want to do.

Sharing some more details about what you have and what you want to do will help.

avatar
riky rice Rep. 0
#12   26 Apr 2022
They are existing maps in bsp format with no music, I want to add music to them without the hassle of decompiling or use the hex editor with the risk of breaking the map

Only registered members can post a reply.
Already registered? Sign in.

q3flogger1
Clear