[SOF2] Mapcycle / MapRotation Need Help

If you mean how to set it up on your own server, after installing 1fx mod, just go into the folder 1fx/files and open mapcycle.txt
Its pretty self explanitory but its like a json for map settings

Code:
mapcycle
{
    map0 // map number (first map everytime you start the server)
    {
        command "devmap inf" // commands to initialize the map with, to chain commands use semi-column ";"
        cvars // settings
        {
            scorelimit 9999
            g_roundtimelimit 9999
            timelimit 9999
            g_gametype h&s
            g_motd "Next map is inf"
        }
    }

}
 
Can I use this script in "mymaprotation.cfg" without mod 1fx? I need for Home Lan network only
I just add a line to the .exe, like: +exec mymaprotation.cfg and will start the server with this parameters

mapcycle
{
map0
{
command "map mp_shop"
cvars
{
scorelimit 0
timelimit 20
g_gametype dm
g_motd "Next map is mp_hos1"
}
}
map1
{
command "map mp_hos1"
cvars
{
scorelimit 0
timelimit 20
g_gametype dm
g_motd "Next map is mp_hk1"
}
}
map2
{
command "map mp_hk1"
cvars
{
scorelimit 0
timelimit 10
g_gametype dm
g_motd "Next map is mp_shop"
}
}
}
 
Not that I know of, you could just close ports and open your server locally though, that's easy enough.
I am also working on dockerizing 1fx server mod, so deployment should be a single "docker run" command hopefully I get some tiome to work on that soon
 
I found a working script for me from ROCmod, i will describe a little, maybe it will help someone too.

These files are located in base/mp - folder's

I added this line to myserver.cfg:

seta sv_mapcycle "myMapcycle.mapcycle"
//

mapcycle
//Begin CFG List

==============
info
(.mapcycle - this is the file format)

In 'myMapcycle.mapcycle', written the following for map rotation:
------------------------------
mapcycle
{
map1
{
Command "map mp_jor1;set g_gravity 800"
cvars
{
g_speed 280
}
}
map2
{
Command "map mp_shop2;set g_gravity 800"
cvars
{
g_speed 280
}
}
map3
{
Command "map mp_italy;set g_gravity 800"
cvars
{
g_speed 280
}
}
}
------------------------------
 
There was another problem. I don't know how to add custom music to Maps. For the atmosphere of the game.

Can you help please, how to add custom music to Map ?
 
Last edited:
Ah I thought you meant without a server mod, like opening the local dedicated server from the client itself, of course there are mods other than 1fx.

There was another problem. I don't know how to add custom music to Maps. For the atmosphere of the game.

Can you help please, how to add custom music to Map ?
you can add "music" attribute to the "worldspawn" entity and add a wav file (browse them in your .pk3 files with 7zip)
add this in your .ent file, for mods other than 1fx it might be in a different directory than maps/[gamemode]/*.ent
 
Can you explain in more detail please ? where is "worldspawn" entity. What should i write ?

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 ?

Maybe needed compilation with new parameters ? but I don't understand this.

Maybe there is an easy way for noobs - beginners to add music easily ? I haven't found any manuals

I have only 19 maps for the map rotation and would like to attach atmospheric music to each one, which is already selected
 
Last edited:
by entity I mean the .ent file extracted from the .bsp file, these .ent files look like json format key value pairs, every .ent file has a worldspawn attribute, this describes the teams skins, music, grid size etc...
should look something like this:
{
"classname" "worldspawn"
"message" "Infiltration"
"mission" "scripts/inf.mission"
"music" "shop/shopb_slow.mp3"
}

you can browse the different music and sounds in the "musicandsound.pk3" file in your base folder, if its a custom map with custom sounds, you can probably find it in its own pk3
 
I found this file (.ent) "entities.a" it looks like a text document and i added a parameter for music, following the example of this: "music" "music / swimminpool / swimminpool.mp3"

but an error appeared when i run map. I described this above. If I am on the right track then how to fix the error ?


This is the complete line where I saw:

{
"classname" "worldspawn"
"_color" "1.000000 1.000000 1.000000"
"angle" "270"
"gametype" "ctf"
"music" "music/swimminpool/swimminpool.mp3"
"redteam" "civilian"
"blueteam" "thug"
"message" "swimminpool by sADMAn iNSANe"
}
{

in .pk3/music/test/test.mp3 - i have structure

I add to "entities.a" in bsp file only line as an example (for a new map in which there is no music)
"music" "music/test/test.mp3"

then I save it simply in QuArK. And add back bsp to .pk3, then map.pk3 to main folder and run the game and get an error

CM_LoadMAP: maps/hockey.bsp has wrong version number (46 should be 1)
 
I think to edit the .bsp directly you will need a bsp compiler, or alternativley, use a server mod that side loads the entity file.
tbh I am not too sure how this works but my guess is that the compiled bsp "readable" part is just a piece of the cake, changing, adding and interacting with objects is more than just defining attributes like setting health, I bet the engine takes more information into consideration, like collisions, lighting etc...
 
...or alternativley, use a server mod"

like 1fx mod ? if he can of course

I have never worked with bsp compilers and I don’t know which one to look for and how to work with it.

I saw that a similar error like (version number (46 should be 1) was with RTCW only with different numbers. And on some forum it was recommended to change the values (somewhere in parameters) and that's it
 
by bsp compiler I basically mean a level editing software for id tech 3 engine, like GTKRadiant, this is not exclusive to SOF2, you can build a map from scratch there and there are a few sources and tutorials online on how to use it, If you want to make a map from scratch, that people need to download to play, this is the route you want to take, if you are new to it its going to take a while to learn.
Otherwise, if you want to edit an existing map, you can basically edit the entities in a map, which are basically pre-made objects that are stored in the pk3 files, this means way less options and restrictions, however, no additional client-side downloads are necessary.
 
Can you try to compile one map for me ?, I will upload for you, if it works, tell me not a lot of where to click and what to do

I don't know much about these matters, I have already written on many sites for sof2, but there is no one to wait for help

I would explain step by step without unnecessary settings, maybe everything can be done quickly there, the main thing is that someone understands in this program
 
@G-Stuff002, first step is to get a servermod which will use entities, not just the bsp.
second step is to not modify the BSP file, we can't recompile BSP's, it's easy if you have the project files but iirc BSP recompilation is not possible out of box. So you have to modify the entity instead. Entity is an extract of the entities part from the BSP file. And if I recall correctly, not every mod uses entities from other files.

Personally I'd go for 1fx because for that you'd get most support from us here because we know the ins and outs of it (some of 3D members, including me, were also 1fx members or were testing etc for the mod).
 
I opened a BSP with a map with entities but no music. And added one parameter to start music and just saved it in QuArK

Launch parameter as in this example: "music" "music / swimminpool / swimminpool.mp3" - but with my mp3

And i got a error when i run map: bsp has wrong version number (46 should be 1)

I did not change other parameters in bsp and did nothing else

I think that the problem will most likely not be solved for creating a regular LAN server, as i wanted to do. I will take your advice and try to use 1fx

I saw it has a MapRotation file, I will try to add my custom maps to it first. But then please tell me how and where to set up so that different music plays when changing maps ?
 
I saw it has a MapRotation file, I will try to add my custom maps to it first. But then please tell me how and where to set up so that different music plays when changing maps ?
start by 1. using the default pk3 file for the map and 2. sending the entity you're trying to use
 
I have no entity file
Here's what I did. I probably need a console command to call the launch of an mp3 file
I edited mapcycle.txt a bit in 1fx mod

mapcycle
{
map0
{
command "map hockey"
cvars
{
scorelimit 1
timelimit 1
g_gametype dm
music music/test1.mp3
g_motd "Next map is cs_assault"
}
}
map1
{
command "map cs_assault"
cvars
{
scorelimit 1
timelimit 1
g_gametype dm
music music/test2.mp3
g_motd "Next map is mp_hk1"
}
}


Test.mp3 music does not play when the map starts loading

I checked if run via console command: \music music/test1.mp3 - then plays good

Is there a 1fx mod command to launch music to add this command in mapcycle with to the rest parameters ? An example as I showed above. Or is it not right ?
 
Last edited:
Mapcycle file is not the correct place for the music part, it has to be in the entity file.
Use kawa’s tool to extract entity from bsp and then make the music modifications there
 
Try this, I think this worked for us on mp_finca
 

Attachments

  • C34109AF-F5A2-4770-A52C-033189E4C992.png
    C34109AF-F5A2-4770-A52C-033189E4C992.png
    463.6 KB · Views: 11
Back
Top