Creating listen server in NS2 doesn't allow me to select mod
Soul_Rider
Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
Hey Guys,
As you know I have released the Proving Grounds mod.
I have a dedicated server online, which reads the amended gamesetup.xml file and shows up as game pg in the master server browser. Map files are named pg_mapname and work fine. When I start pg mod locally on my machine, it fires up and reads the gamesetup.xml file. My game window is titled Proving Grounds, and I can connect to the dedicated server online and play game pg, everything is fine.
However..
If while running the pg mod, I try and create a listen server, when going to create, the only game option available is ns2, and none of the maps from my mod will be picked up unless I edit them to start ns2_.
My question is why?
Everything is working correctly. If I create a listen server, even though it's called ns2, I still play the pg game, so the mod is running properly, but the create listen server information doesn't seem to read the mod.
This is either a very big oversight somewhere on my part, or an error in the way the listen server options are created. Any advice on what I could have missed?
As you know I have released the Proving Grounds mod.
I have a dedicated server online, which reads the amended gamesetup.xml file and shows up as game pg in the master server browser. Map files are named pg_mapname and work fine. When I start pg mod locally on my machine, it fires up and reads the gamesetup.xml file. My game window is titled Proving Grounds, and I can connect to the dedicated server online and play game pg, everything is fine.
However..
If while running the pg mod, I try and create a listen server, when going to create, the only game option available is ns2, and none of the maps from my mod will be picked up unless I edit them to start ns2_.
My question is why?
Everything is working correctly. If I create a listen server, even though it's called ns2, I still play the pg game, so the mod is running properly, but the create listen server information doesn't seem to read the mod.
This is either a very big oversight somewhere on my part, or an error in the way the listen server options are created. Any advice on what I could have missed?
Comments
Thanks player, I'm not :)
Was just wondering if I had missed something or if the menu was doing funny things :)
If while running the pg mod, I try and create a listen server, when going to create, the only game option available is ns2, and none of the maps from my mod will be picked up unless I edit them to start ns2_.
My question is why?<!--QuoteEnd--></div><!--QuoteEEnd-->
You have to change 2 things in MainMenu.lua:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> local mapname = string.gsub(filename, 'ns2_', '', 1):gsub("^%l", string.upper)
local tagged,_ = string.match(filename, "ns2_", 1)<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> local mapname = string.gsub(filename, 'pg_', '', 1):gsub("^%l", string.upper)
local tagged,_ = string.match(filename, "pg_", 1)<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> local mapname = string.gsub(filename, 'ns2_', '', 1):gsub("^%l", string.upper)
local tagged,_ = string.match(filename, "ns2_", 1)<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> local mapname = string.gsub(filename, 'pg_', '', 1):gsub("^%l", string.upper)
local tagged,_ = string.match(filename, "pg_", 1)<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks Price, I also changed mods {"ns2"} to pg to get the modname to show up. Working great, thankyou :)