Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

mapvoting with stopwatch


  • Please log in to reply
10 replies to this topic

#1
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

Is it possible to setup a server to use mapvoting but once a map is voted for it will run in ABBA stopwatch mode and save EXP for the entire map but reset once a new map comes on?



#2
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland
It is not possible at the moment but definitely would be nice to have it.

#3
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

Usually the stopwatch and map voting is combined with a Lua script. I don't know about storing XP.

 

Here is a typical script for combining stopwatch and mapvoting.

function et_InitGame(leveltime, randomseed, restart)
        if( tonumber(et.trap_Cvar_Get("g_gametype")) == 6 ) then
                et.trap_Cvar_Set("g_gametype", "3")
                et.trap_Cvar_Set("nextmap", "map_restart 0");
        end
end

function et_IntermissionStarts(round)
        if (round == 1) then
                et.trap_Cvar_Set("g_gametype", "6")
        end
end



#4
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

 

Usually the stopwatch and map voting is combined with a Lua script. I don't know about storing XP.

 

Here is a typical script for combining stopwatch and mapvoting.

function et_InitGame(leveltime, randomseed, restart)
        if( tonumber(et.trap_Cvar_Get("g_gametype")) == 6 ) then
                et.trap_Cvar_Set("g_gametype", "3")
                et.trap_Cvar_Set("nextmap", "map_restart 0");
        end
end

function et_IntermissionStarts(round)
        if (round == 1) then
                et.trap_Cvar_Set("g_gametype", "6")
        end
end

 

I tried this and it says the time is set at the end of the round and when the intermission is over it just goes on to the next map in the mapvotecycle.

set d1 "set g_gametype 6 ; map adlernest ; set nextmap vstr d2"
set d2 "set g_gametype 6 ; map sw_oasis_b3 ; set nextmap vstr d3"
set d3 "set g_gametype 6 ; map radar ; set nextmap vstr d4"
set d4 "set g_gametype 6 ; map frostbite ; set nextmap vstr d5"
set d5 "set g_gametype 6 ; map venice ; set nextmap vstr d6"
set d6 "set g_gametype 6 ; map sp_delivery_te ; set nextmap vstr d1"
vstr d1

Do I need a stopwatch script here instead?


Edited by ETsneak, 31 December 2013 - 08:29 PM.


#5
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

You need to just start the server with one map without rotation and with the g_gametype set to 3. This is how it worked on my server. I don't know if it would be possible to modify the Lua in a way that it would work with a rotation. Storing the nextmap cvar is the problem in this.



#6
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

You need to just start the server with one map without rotation and with the g_gametype set to 3. This is how it worked on my server. I don't know if it would be possible to modify the Lua in a way that it would work with a rotation. Storing the nextmap cvar is the problem in this.

 

Before making this change, the connection of the client would hang on first run of the game and I've have to disconnect by pressing ESC then /reconnect. It's still doing that after this change.

 

Now it swaps teams and does round 2, but the timelimit is full instead of the time that was set by the first team (I'm guessing because of the mapname.cfg file modifying the round timelimit?) It also doesn't save XP, and at the end of round 1 as you said.

 

I'd be okay with /callvote method, if there's some easy way to make the silent server just like an etpro scrim server. The features that come with silent are useful for a pub, and etpro lacks those important features.


Edited by ETsneak, 01 January 2014 - 12:53 AM.


#7
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

anyone?



#8
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

 

Before making this change, the connection of the client would hang on first run of the game and I've have to disconnect by pressing ESC then /reconnect. It's still doing that after this change.

I have never encountered this problem. There was someone else who had this issue as well though. I don't know if it was completely resolved but I suspect the server engine about this.

 

 

 

Now it swaps teams and does round 2, but the timelimit is full instead of the time that was set by the first team (I'm guessing because of the mapname.cfg file modifying the round timelimit?) It also doesn't save XP, and at the end of round 1 as you said.

I didn't encounter this problem with my server when I had it running. Are you sure it doesn't play the first round again? If it does play the first round again, I think it could be an issue with the Lua script.

 

Can you make the server run normal as plain map voting. If that is succesfull, then I would remove the map rotation and start the server in stopwatch mode with a single map and add the Lua script. The XP save is trickier, but I think it might be possible by adjusting the g_XPSave cvar in the Lua script. I don't understand why you would want that though, as usually people want to play the stopwatch rounds with completely equal starting position. Unless of course, you have locked the levels, in which case there doesn't need to be a reset at all. Also, you could add rcon xpreset command to the Lua script.



#9
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

I have never encountered this problem. There was someone else who had this issue as well though. I don't know if it was completely resolved but I suspect the server engine about this.

 

 

I didn't encounter this problem with my server when I had it running. Are you sure it doesn't play the first round again? If it does play the first round again, I think it could be an issue with the Lua script.

 

Can you make the server run normal as plain map voting. If that is succesfull, then I would remove the map rotation and start the server in stopwatch mode with a single map and add the Lua script. The XP save is trickier, but I think it might be possible by adjusting the g_XPSave cvar in the Lua script. I don't understand why you would want that though, as usually people want to play the stopwatch rounds with completely equal starting position. Unless of course, you have locked the levels, in which case there doesn't need to be a reset at all. Also, you could add rcon xpreset command to the Lua script.

 

I appreciate the answer but now I'm deciding on wanting to do the same thing but using LMS. I only want one round per map using LMS gametype but I want the mapvoting menu at the end. Could I just replace the 3 with a 5 like this?

 

function et_InitGame(leveltime, randomseed, restart)
if( tonumber(et.trap_Cvar_Get("g_gametype")) == 6 ) then
et.trap_Cvar_Set("g_gametype", "5")
et.trap_Cvar_Set("nextmap", "map_restart 0");
end
end

function et_IntermissionStarts(round)
if (round == 1) then
et.trap_Cvar_Set("g_gametype", "6")
end
end

 

An do I need to change anything else in the script, for example the first line involves "leveltime" and I don't know if that would be needed in LMS.



#10
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

The callbacks remain the same. But the round number might need changing. Maybe remove the "if (round == 1)" condition.

 

http://mygamingtalk....Lua#et_InitGame

http://mygamingtalk....ermissionStarts



#11
OFFLINE   ETsneak

ETsneak

    Regular Member

  • Members
  • PipPipPip
  • 106 posts
19
On a distinguished road

turns out I wanted limited lives, not LMS






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users