Custom vote types

killall -9

Moderator: Developers

Post Reply
User avatar
Dusk
Developer
Posts: 579
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

Custom vote types

#1

Post by Dusk » Wed Jul 15, 2015 9:58 pm

After way too long I can state that the custom vote definitions branch (aka votedef) has reached a testable state. This build allows modders to create custom voting types, which should be useful in large multiplayer mods as well as in CTF. In addition the build contains a new "nextmap" voting type, that was recently suggested on the tracker.
I'd like to hear how existing vote types behave as well as new ones. There shouldn't be any behavioral changes in e.g. limits.

Here is an example wad that provides a "gimmebfg" vote type that gives the vote caller a BFG. Pretty stupid but yeah.
Last edited by Dusk on Wed Jul 15, 2015 10:02 pm, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3444
Joined: Tue Jun 05, 2012 6:12 pm
Location: Shpongleland

RE: Custom vote types

#2

Post by Ænima » Wed Jul 15, 2015 10:48 pm

Thank god. Should allow the need for less server admin intervention on mods that have a lot of custom server CVAR's like AoW2.

Great work. Now let's see how I can abuse this ...
Image ­ ­
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: Doom64 and Diablo2 had a baby


ZandroSkins
: a pack made by our community
Squad Radio: a WASD-powered chat menu, add your own sounds
AeniPuffs: neat blood and puff effects

Lollipop
Zandrone
Posts: 1107
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Custom vote types

#3

Post by Lollipop » Thu Jul 16, 2015 12:05 pm

The download says it is a 3.0 build, does this mean that it includes all the zdoom 2.7.1 features? Can we also test those while we are at it?
Spoiler: Modding Qualifications (Open)
ACS: If it's of ridiculous scope and of suicide-inducing complexity then it's the thing for me.
DECORATE: I can make more or less any godawful hack I need. Doesn't mean it works, though.
Maps: I only map for testing ACS.
GFX: Not enough time or experience.

If you need help, advice or similar, feel free to send me a PM. ;)
Spoiler: My Current Projects (Open)
> ZMemory
> Various undeveloped ideas. (This one is an immutable fact)
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones

User avatar
Dusk
Developer
Posts: 579
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: Custom vote types

#4

Post by Dusk » Fri Jul 17, 2015 9:42 am

It contains the current ZDoom upgrade so far, i.e. up to the end of the SVN repository which lies somewhere between 2.7.0 and 2.7.1.

jwaffe
Forum Regular
Posts: 217
Joined: Sun Jun 03, 2012 11:45 pm
Location: Just beyond the line horizon
Contact:

RE: Custom vote types

#5

Post by jwaffe » Fri Jul 17, 2015 10:02 pm

This is very cool, thanks Dusk!
Image

KenFH
New User
Posts: 10
Joined: Sat Jul 18, 2015 7:24 pm

RE: Custom vote types

#6

Post by KenFH » Wed Feb 03, 2016 6:09 pm

I like it in principle. I think it would be substantially improved if the Argument field was replaced with Arg1-4, a per-argument description added, and a new "static" type added. This would set the 4 arguments passed to the script. Static would not appear in the menu, but instead pass a constant value supplied in VOTEDEF, so that one script may easilly handle multiple, similar vote types. Ex.:

VoteType Penalize
{
Arg1 "" Static 42
Arg2 "Target" Player
Arg3 "Points" Int (0,999,50,1,100,10)
Description "Apply 50DKP Minus"
}

Also, where is the menu default value? I suggest wrapping MenuRange and MenuStep into the Arg fields as shown above, along with a default value:

Arg# MenuDescription Type (Min, Max, MenuDefault, MenuMin, MenuMax, MenuStep)

So for example Arg3 above would show an argument named "Points" in the menu, with a maximum range of 0-999, a range in the menu of 1-100, a stepping of 10, and a default of 50. Stepping and menu range can default as before, menu default should probably default to menu minimum if not given.

It would also probably be helpful to move the arg-specific flags up into the arg field, like this:

Arg1 "Teleportee" Player PlayerAsIndex NotOnAdmin
Arg2 "Target" Player PlayerAsIndex

If all this is added before the initial implementation, less bandaid changes should be needed down the road to accommodate more ambitious mods. If it isn't already handled, a vote type with no arguments, or all static arguments, should be allowed for, in case of things like custom nextmap votes.

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 979
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Custom vote types

#7

Post by fr blood » Wed Feb 03, 2016 6:42 pm

Very good, this will be very helpful in the future.
ImageImage

User avatar
Dusk
Developer
Posts: 579
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: Custom vote types

#8

Post by Dusk » Wed Feb 10, 2016 3:24 pm

KenFH wrote: I like it in principle. I think it would be substantially improved if the Argument field was replaced with Arg1-4, a per-argument description added, and a new "static" type added. This would set the 4 arguments passed to the script. Static would not appear in the menu, but instead pass a constant value supplied in VOTEDEF, so that one script may easilly handle multiple, similar vote types.
Thanks for the feedback!

I think adding multiple arguments already requires a large overhaul and is not worth the effort for the initial implementation. However, I think the syntax should be reformatted to be more future compatible, allowing it to be extended in this manner in the future.

User avatar
Ænima
Addicted to Zandronum
Posts: 3444
Joined: Tue Jun 05, 2012 6:12 pm
Location: Shpongleland

RE: Custom vote types

#9

Post by Ænima » Wed Feb 10, 2016 7:06 pm

As long as a modder can make custom vote types that puke an ACS script with at least one argument or string, I think that would be a very flexible starting point.
Image ­ ­
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: Doom64 and Diablo2 had a baby


ZandroSkins
: a pack made by our community
Squad Radio: a WASD-powered chat menu, add your own sounds
AeniPuffs: neat blood and puff effects

User avatar
Fused
Contributor
Posts: 615
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Clan: TK
Contact:

Re: Custom vote types

#10

Post by Fused » Thu Nov 01, 2018 12:27 pm

Hi, sorry to bump, but will this ever have a full release? I wouln't mind testing this if there could be an up-to-date build with current Zandronum, because this is a great feature and I want to make use of it.

Post Reply