Skip to content

.bsp.override #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PowaBanga opened this issue May 20, 2017 · 6 comments
Open

.bsp.override #2

PowaBanga opened this issue May 20, 2017 · 6 comments

Comments

@PowaBanga
Copy link

R1q2 can read .bsp.override file for override other maps.

How is possible ? where is it writte in the code ?

@QwazyWabbitWOS
Copy link

QwazyWabbitWOS commented Jun 6, 2017

The override file is loaded by the server when it has confirmed it has the primary map file and it can load both files. If the override file doesn't exist it doesn't load it.

The function CM_LoadMap in common/cmodel.c performs this operation.

@PowaBanga
Copy link
Author

so, here i have some file:
dday2.bsp
dday2bed.bsp.override
dday2vip.bsp.override

Are you saying that for load this override I am forced to have a dday2bed.bsp file in my folder ?

@QwazyWabbitWOS
Copy link

QwazyWabbitWOS commented Jun 6, 2017

The original map files must exist on the server. (and on the client)
The code takes the file name of the map, in this case dday2.bsp or dday2bed.bsp or dday2vip.bsp and it appends the .override to them to create the name of the override file it wants. The dday2bed.bsp.override file is expected to be in the maps/ folder along with the dday2bed.bsp file.
The override files do not need to exist on the client machines.
The override files are not full maps, they are only the entities for the map file and any new ones you are adding.

@PowaBanga
Copy link
Author

PowaBanga commented Jun 6, 2017

yeah, I forgot to say that the file of this override start as here in exemple for dday2bed:

map dday2{
"message" "Sainte Mere Eglise\nDesigned by Castrator\nCapture the Bedroom!!!"
"_sun_color" ".8 .8 1"
"_sun_angle" "0 -60"
"_sun_diffuse" "30"
"_sun_ambient" "15"
"_sun_light" "350"
"sky" "night1"
"botfiles" "dday2bed"
"classname" "worldspawn"
}

But I think that the feature is not enabled in q2pro...

@QwazyWabbitWOS
Copy link

QwazyWabbitWOS commented Jun 6, 2017

I believe the q2pro method is different. From the code there and from the document files it looks like Q2Pro server uses .ent files, not .override files. They can also be placed in a different folder than the map files. That folder can be specified in the cvar "map_override_path".

Once you have defined this folder you can dump the entity file of the current map on the server with "rcon dumpents" and the server will create the .ent file for you so you can edit it.

The documentation is here:
https://github.com/AndreyNazarov/q2pro/blob/924ff39aa48df1d6cd985b42a2fe5a60ff154030/doc/server.txt

From what I can see, it looks like the format of the files is the same so you can avoid extra work by simply renaming the files from .override to .ent but I don't know off hand if you need to keep the .bsp. or not. Do a dumpents command from the server console and it will create the appropriate file and show you the correct naming style.

@QwazyWabbitWOS
Copy link

QwazyWabbitWOS commented Jun 6, 2017

I tested this in q2pro server and the "dumpents" command requires a file name and it dumps the .ent file to the maps folder of the current mod by default. So for your dday2.bsp you would command dumpents dday2.
However, the server won't load any ent files unless map_override_path is set to something other than a null string. (It's null by default so you need to set it to something in your server configuration.)
The "default" path to enable overrides is set map_override_path "maps/" and this will then enable the server to use the override files. It will then report success or failure with something like "Loaded entity string from maps/dday2.ent" in the server console.
You will express the map names in the dumpents command without the .bsp suffix and the server will chop the .bsp suffix off the map file name when it loads the .ent file. (base1.bsp becomes base1.ent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants