Creating listen server in NS2 doesn't allow me to select mod

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
edited February 2012 in Modding
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?

Comments

  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Not sure there is a way around this from the menu. Try typing 'map ns2_pg_awesomemap' into console from the main menu. This is an alternate way to create a listen server.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    The main-menu hasn't really been changed since the first alpha-build, so I wouldn't read too much into the fact that it is very much broken.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited February 2012
    Creating the listen server isn't an issue, the issue is the mod game name - pg, is not available in the create game menu options, only ns2, even though I am running the pg mod. Thus if I create a client internet listen server, it appears in the master game browser as ns2 and not pg.

    Thanks player, I'm not :)

    Was just wondering if I had missed something or if the menu was doing funny things :)
  • PricePrice Join Date: 2003-09-27 Member: 21247Members
    <!--quoteo(post=1906330:date=Feb 23 2012, 07:57 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Feb 23 2012, 07:57 PM) <a href="index.php?act=findpost&pid=1906330"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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?<!--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-->
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    <!--quoteo(post=1907423:date=Feb 27 2012, 10:54 AM:name=Price)--><div class='quotetop'>QUOTE (Price @ Feb 27 2012, 10:54 AM) <a href="index.php?act=findpost&pid=1907423"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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--><!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks Price, I also changed mods {"ns2"} to pg to get the modname to show up. Working great, thankyou :)
Sign In or Register to comment.