vcall vandalism

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby [-z-] » Thu Dec 27, 2007 4:17 am

victim wrote:With a predefined maximum for extendmatch

And one for extendmatchscore as well.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Blµb » Thu Dec 27, 2007 10:43 am

afaik you can make aliases votable too
so what are we waiting for, let's try it :)
some aliases you could use
Code: Select all
// yay i hope I get these right
// end map:
alias endmatch "timelimit -1"
// increase timelimit by 5
alias extendmatchtime "sv_cmd rpn /timelimit timelimit 5 add def"
// decrease it by 5
alias reducematchtime "sv_cmd rpn /timelimit timelimit 5 sub def"
// increase fraglimit by 50
alias increasefraglimit "sv_cmd rpn /fraglimit fraglimit 20 add def"
// decrease fraglimit by 50
alias increasefraglimit "sv_cmd rpn /fraglimit fraglimit 20 sub def"

and add them sv_vote_commands
and remove timelimit and fraglimit from it
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby Spaceman » Fri Dec 28, 2007 12:54 am

Blµb wrote: // yay i hope I get these right
// end map:
alias endmatch "timelimit -1"
// increase timelimit by 5
alias extendmatchtime "sv_cmd rpn /timelimit timelimit 5 add def"
// decrease it by 5
alias reducematchtime "sv_cmd rpn /timelimit timelimit 5 sub def"
// increase fraglimit by 50
alias increasefraglimit "sv_cmd rpn /fraglimit fraglimit 20 add def"
// decrease fraglimit by 50
alias increasefraglimit "sv_cmd rpn /fraglimit fraglimit 20 sub def"

Blµb, I think you have very a small error in your last line, I believe it should be alias decreasefraglimit.

I've been thinking about your new aliases and I think they are too long. I prefer short and to the point: vcall endmap and vcall extendgame

Extendgame increases the time by 5 minutes and the fraglimit by X. Where X is set by the server eg DM by 5,CTF by 50 or KH by 200.

Finally, if no humans are present then the game cannot be extended, fixing the complaint in my original point.

If a vote is called, then extend the time/frags until the vote has been completed. Although this could be easily abused to extend a game by 60 seconds.

'victim calls a vote to end the game' and 'victim calls a vote to extend the game'

[-z-] wrote:I disagree with this. I would find that quite annoying.
It was an idea, but I would also find this annoying, unless it was a MikeeeeUSA map :(
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby Blµb » Fri Dec 28, 2007 10:20 am

uhhhh, right, that should be "decrease" not "Increase"
please don't take away my cookies again!!! :(

you can put variables in them too, eg
alias extendblah "sv_cmd rpn /timelimit timelimit extend_time add def

sumthin' like that :>
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby Spaceman » Fri Dec 28, 2007 1:11 pm

Don't worry about the cookies, they are quite safe :D :D :D

Blµb wrote:you can put variables in them too, eg extend_time
That's good, extend_time will be set on the server.

Is a decrease_time or decrease_frags command needed?

I've never had the desire to decrease the game length by reducing the time or the frag limit. If the game is boring or very one-sided, then I will call a vote to end the game.

I've called votes to increase the game length, but that always involves two votes - increase the time limit and increase the frag limit - which is a pain.

Note: I usually play CTF or KH, very rarely DM.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby divVerent » Fri Dec 28, 2007 6:36 pm

Actually, you can code in a maximum :P

alias extendmatchtime "sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def"

It is kind of messy... so I'll explain the parts

timelimit 5 add = timelimit+5
dup 30 sub dup: puts two copies of timelimit+5-30 on the stack
sgn: replaces the topmost copy by -1, 0, 1 depending on sign
0.5 mul 0.5 add: turns the sign into 0, 0.5 or 1
mul: multiplies the changed sign with the other timelimit+5-30 value
sub: subtracts these two

This is best analyzed for the three sign values separately. If the sign is -1:

sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub -1 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub 0 mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add 0 sub def
=
sv_cmd rpn /timelimit timelimit 5 add def

If it is +1:
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub +1 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub 1 mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub sub def

Now what does "x dup 30 sub sub" do?

x
-> dup:
x x
-> 30:
x x 30
-> sub
x x-30
-> sub
x-(x-30) = x-x+30 = 30

So I propose these:

set timelimit_increment 5
set timelimit_decrement 5
set timelimit_min 5
set timelimit_max 30
alias extendmatchtime "sv_cmd rpn /timelimit timelimit timelimit_increment add dup timelimit_max sub dup sgn 0.5 mul 0.5 add mul sub def"
alias reducematchtime "sv_cmd rpn /timelimit timelimit timelimit_decrement sub dup timelimit_min sub dup sgn 0.5 mul 0.5 sub mul add def"
alias endmatch "timelimit -1"
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby TVR [Public Terminal] » Mon Dec 31, 2007 3:16 pm

Perhaps only a maximum timelimit & fraglimit above the currently set is necessary, it is already difficult enough to pass a single vote command; requiring repeated votes to accomplish a timelimit/fraglimit addition above the extend match alias would be particularly aggravating.
TVR [Public Terminal]
Member
 
Posts: 27
Joined: Sat Dec 22, 2007 12:48 am

Previous

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron