Page 1 of 1

Campaign hoth on dedicated server

Posted: Wed Jul 09, 2014 9:04 pm
by Zeяo
Hey I was wondering how I can add the campaign hoth map to a dedicated server? I know the code is: hot1g_c but the dedicated server files do not recognize it. Where is it stored in the main game files?

Re: Campaign hoth on dedicated server

Posted: Wed Jul 09, 2014 9:15 pm
by Marth8880
All stock mission scripts are stored in GameData\data\_lvl_pc\mission.lvl, but even then, I'm almost positive the stock campaigns do not work in online matches, nor does the Black Bag Ops Server Manager read the "c" mode ID (it only seems to read con, 1flag, ctf, eli, a.ss, and hunt).

Re: Campaign hoth on dedicated server

Posted: Wed Jul 09, 2014 9:38 pm
by Twilight_Warrior
The stock campaigns do work in online matches, but they're preset to auto-assign so the first player to join the server will be Reps/Imps and the next will be the enemy. They're also relatively unstable and may crash more frequently than the normal stock maps.

However, you are right in that the server manager doesn't recognize them. You have to manually add them to the list using ingame admin commands after the server is running. Boot up the server, hop in the game, log in as an admin, and type "/admin /addmap hot1g_c".

Re: Campaign hoth on dedicated server

Posted: Wed Jul 09, 2014 9:48 pm
by Zeяo
Twilight_Warrior wrote:The stock campaigns do work in online matches, but they're preset to auto-assign so the first player to join the server will be Reps/Imps and the next will be the enemy. They're also relatively unstable and may crash more frequently than the normal stock maps.

However, you are right in that the server manager doesn't recognize them. You have to manually add them to the list using ingame admin commands after the server is running. Boot up the server, hop in the game, log in as an admin, and type "/admin /addmap hot1g_c".
Yes I tried, but the campaign files aren't in the dedicated server files I think because I tried to add it with /admin /addmap hot1g_c and when I tried to run "!runnext" it didn't do anything but when I did "!nextmap it showed hot1g_c so it doesn't recognize the map but it only saves the name "hot1g_c"

Re: Campaign hoth on dedicated server

Posted: Wed Jul 09, 2014 10:12 pm
by Twilight_Warrior
Alright, so I tried it without using the !commands, only the /admin commands.

1) /admin /login <pass>
2) /admin /addmap hot1g_c
3) /admin /nextmap hot1g_c
4) /admin /endgame

And I got the map to load client-side. It started to load the map and then played the campaign intro video, but then when it actually got to the map it said "contacting host..." Minimized it, and the server just said it was "Loading..."

So, you're likely right, it doesn't recognize the map as being in the files. Sorry. Gotta run a normal, non-dedicated server to play campaigns online. I do know THAT can be done, from personal experience.

Re: Campaign hoth on dedicated server

Posted: Thu Jul 10, 2014 6:53 am
by Zeяo
Twilight_Warrior wrote:Alright, so I tried it without using the !commands, only the /admin commands.

1) /admin /login <pass>
2) /admin /addmap hot1g_c
3) /admin /nextmap hot1g_c
4) /admin /endgame

And I got the map to load client-side. It started to load the map and then played the campaign intro video, but then when it actually got to the map it said "contacting host..." Minimized it, and the server just said it was "Loading..."

So, you're likely right, it doesn't recognize the map as being in the files. Sorry. Gotta run a normal, non-dedicated server to play campaigns online. I do know THAT can be done, from personal experience.

And if I place the level files from the original game into the dedicated server files, would that work?

Re: Campaign hoth on dedicated server

Posted: Thu Jul 10, 2014 1:20 pm
by thelegend
I tried the same on my server. You just can watch the movie but when you should be able to spawn as rep or imp you only can see one white sentence. But if you host an own server with creating one it defenitly should work.

Re: Campaign hoth on dedicated server

Posted: Thu Jul 10, 2014 5:14 pm
by Zeяo
thelegend wrote:I tried the same on my server. You just can watch the movie but when you should be able to spawn as rep or imp you only can see one white sentence. But if you host an own server with creating one it defenitly should work.
You mean it should work on a listen server right? A server hosted on a client pc

Re: Campaign hoth on dedicated server

Posted: Thu Jul 10, 2014 5:40 pm
by Twilight_Warrior
Zeяo wrote:
Twilight_Warrior wrote:Alright, so I tried it without using the !commands, only the /admin commands.

1) /admin /login <pass>
2) /admin /addmap hot1g_c
3) /admin /nextmap hot1g_c
4) /admin /endgame

And I got the map to load client-side. It started to load the map and then played the campaign intro video, but then when it actually got to the map it said "contacting host..." Minimized it, and the server just said it was "Loading..."

So, you're likely right, it doesn't recognize the map as being in the files. Sorry. Gotta run a normal, non-dedicated server to play campaigns online. I do know THAT can be done, from personal experience.

And if I place the level files from the original game into the dedicated server files, would that work?
You could try it. I'm 90% certain, though, that they're the exact same files, vanilla. I bet they're there, the server manager probably just doesn't have the capability to "see" those missions (as in, it wasn't programmed to look for/add them to the list).

Re: Campaign hoth on dedicated server

Posted: Thu Jul 10, 2014 5:42 pm
by AnthonyBF2
Pardon me for bumping an old topic but it has not been a month since the last person replied. I have messed with this a while and I got good progress at running the Rise of Empire levels on the Black Bag Ops server manager.

You should first you know how to re-create a custom mission.lvl using the asset/stock scripts - You can learn how at this site.

I will explain anyway, first go to Bf2 mod tools Assets\Scripts and copy all of the 3 letter folders. Paste them inside
Data_*** \ common \ scripts - where your Data_*** scripts are located.

Inside data_*** \ common , edit the mission.req so it looks like this:
Hidden/Spoiler:
[code] "cor1c_c"
"cor1c_con"
"cor1c_ctf"
"cor1g_con"
"cor1g_ctf"
"dag1c_con"
"dag1c_ctf"
"dag1g_con"
"dag1g_ctf"
"dea1c_1flag"
"dea1c_con"
"dea1g_1flag"
"dea1g_c"
"dea1g_con"
"end1g_1flag"
"end1g_con"
"end1g_hunt"
"fel1c_1flag"
"fel1c_c"
"fel1c_con"
"fel1g_1flag"
"fel1g_con"
"gal1"
"geo1c_c"
"geo1c_con"
"geo1c_conxl"
"geo1c_ctf"
"geo1c_hunt"
"geo1c_xl"
"hot1g_1flag"
"hot1g_c"
"hot1g_con"
"hot1g_conxl"
"hot1g_hunt"
"hot1g_uber"
"hot1g_xl"
"kam1c_1flag"
"kam1c_c"
"kam1c_con"
"kam1g_1flag"
"kam1g_con"
"kas2c_c"
"kas2c_con"
"kas2c_conxl"
"kas2c_ctf"
"kas2c_hunt"
"kas2c_uber"
"kas2c_xl"
"kas2g_con"
"kas2g_Ctf"
"kas2g_xl"
"mus1c_c"
"mus1c_con"
"mus1c_ctf"
"mus1g_con"
"mus1g_ctf"
"myg1g_c"
"myg1g_con"
"myg1g_ctf"
"myg1c_con"
"myg1c_ctf"
"nab2c_con"
"nab2c_ctf"
"nab2c_hunt"
"nab2g_c"
"nab2g_con"
"nab2g_ctf"
"pol1c_con"
"pol1c_ctf"
"pol1g_c"
"pol1g_con"
"pol1g_ctf"
"spa1g_1flag"
"spa1g_Diet Dr. Pepper"
"spa1g_c"
"spa2c_c"
"spa3c_1flag"
"spa3c_Diet Dr. Pepper"
"spa3c_c"
"spa4g_c"
"spa6c_1flag"
"spa6c_Diet Dr. Pepper"
"spa6c_cmn"
"spa7c_1flag"
"spa7c_Diet Dr. Pepper"
"spa7c_cmn"
"spa8g_1flag"
"spa8g_Diet Dr. Pepper"
"spa8g_cmn"
"spa9g_1flag"
"spa9g_Diet Dr. Pepper"
"spa9g_cmn"
"tan1c_1flag"
"tan1c_con"
"tan1g_1flag"
"tan1g_c"
"tan1g_con"
"tat2c_con"
"tat2c_ctf"
"tat2g_con"
"tat2g_ctf"
"tat2g_eli"
"tat2g_hunt"
"tat3c_1flag"
"tat3c_con"
"tat3g_1flag"
"tat3g_con"
"uta1c_1flag"
"uta1c_c"
"uta1c_con"
"uta1g_1flag"
"uta1g_con"
"yav1c_1flag"
"yav1c_con"
"yav1g_1flag"
"yav1g_c"
"yav1g_con"[/code]
- admins edit this post to hide the list of map codes
Next inside data_*** \ common \ scripts
Go to each folder , example COR and open cor1c_c.lua

This is where it becomes important. on each campaign lua script, remove these codes! some scripts will have more than 1 of these codes:

Code: Select all

SetMissionEndMovie("ingame.mvs", "cormon02")
ScriptCB_PlayInGameMovie("ingame.mvs","cormon01")
these are the 2 codes you need to remove from each _c.lua - they prevent the battlefrontii.exe from loading those levels in the server manager.

When you have done that, run the visualmunge inside data_***\ build
When visualmunge ends, go to data_*** \ lvl_pc - your mission.lvl is created and contains all the regular maps + the edited campaign lua scripts.

Put this file in your server's mission file location and replace.

When your server starts, (need 1 basic map to launch from) you can then go in game and use the admin login commands and run a campaign level /admin /changemap cor1c_c

How ever I said earlier not all levels work, and I also got a handful amount of bugs I can't fix regarding those levels.

Here is the list of problems I put together, and explains which levels work and don't
Hidden/Spoiler:
cor1c_c - works fine - played it several times consecutively with no crashes or errors.
dea1g_c - works until you are told to kill the rebel with the disk - client crashes
fel1c_c - works fine played it several times with no problems
myg1c_c - server won't even start - ending current map, crashing the server exe instantly
hot1g_c - works until you kill the generator - client crash
kam1c_c - works until you need to capture a middle base - client crash
mus1c_c - works fine until gizor delso would spawn - client crash
nab2g_c - works fine played it all I wanted no problems
yav1g_c - works fine played all I wanted no issues
tan1g_c - works fine no problems
pol1g_c - works fine no problems - laggy - lots of ai bots
uta1c_c - works fine no problems
spa2c_c - server crashes upon executing the map change
spa4g_c - works until - see below
spa1g_c - works until - see below
spa3c_c - works until - see below
geo1c_c (training level) - works fine - until - see below
kas2c_c - works fine played it all I wanted
Bugs:
No jumping - you cannot jump - cannot fix this , pretty odd.
Players cannot enter vehicles - the space maps that work become useless hangar traps
The amount of ai bots cannot be controlled from server options
Geonosis training level - this level works until you are asked to "change to the engineer class"
- the engineer is not added to the CP - objectives becomes stuck
Players cannot fly - can't jump to fly anyway
Some times certain teams will look friendly but will be enemy - and you can still kill them
example: fel1c_c: Acklay appeared as blue but were red and could be killed

The last thing you need to know is that I have done various things to my campaign scripts to make levels work or that killed other levels , note that your outcomes may change from mine but what I gathered here is 80% accurate regarding which levels work without issues.

EDIT: I forgot an important part:
you MUST skip the game movies or the server times you out and will disconnect you.

Re: Campaign hoth on dedicated server

Posted: Mon Jul 14, 2014 11:51 am
by Zeяo
Thanks