Jump to content

mapvoting with stopwatch


ETsneak

Recommended Posts

  • Management

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

Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

  • Management

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Management

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...