Page 1 of 1

Custom vote types

Posted: Wed Jul 15, 2015 9:58 pm
by Dusk
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.

RE: Custom vote types

Posted: Wed Jul 15, 2015 10:48 pm
by Ænima
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 ...

RE: Custom vote types

Posted: Thu Jul 16, 2015 12:05 pm
by Lollipop
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?

RE: Custom vote types

Posted: Fri Jul 17, 2015 9:42 am
by Dusk
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.

RE: Custom vote types

Posted: Fri Jul 17, 2015 10:02 pm
by jwaffe
This is very cool, thanks Dusk!

RE: Custom vote types

Posted: Wed Feb 03, 2016 6:09 pm
by KenFH
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.

RE: Custom vote types

Posted: Wed Feb 03, 2016 6:42 pm
by fr blood
Very good, this will be very helpful in the future.

RE: Custom vote types

Posted: Wed Feb 10, 2016 3:24 pm
by Dusk
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.

RE: Custom vote types

Posted: Wed Feb 10, 2016 7:06 pm
by Ænima
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.

Re: Custom vote types

Posted: Thu Nov 01, 2018 12:27 pm
by Fused
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.

Edit: Expected no answer, and still dissapointed. If only Zandronum would have some proper updates ???

Re: Custom vote types

Posted: Tue Jan 23, 2024 11:56 am
by StrikerMan780
Is there an up-to-date documentation for this? I can only find this: https://wiki.zandronum.com/VOTEDEF
But, it says it's not in the game, which I know to be false, it was added to the stable branch under a new name (VOTEINFO).

Re: Custom vote types

Posted: Tue Jan 23, 2024 9:12 pm
by Fused
StrikerMan780 wrote:
Tue Jan 23, 2024 11:56 am
Is there an up-to-date documentation for this? I can only find this: https://wiki.zandronum.com/VOTEDEF
But, it says it's not in the game, which I know to be false, it was added to the stable branch under a new name (VOTEINFO).
I have been meaning to update the wiki with a proper page about this feature. The final implementation has existed in 3.1 but there has never been a clear indication of it being "finished" until not too long ago, and the implementation is way different than what was initially documented.
I will update the wiki tomorrow with documentation and will make sure to update this post when this is done.

Re: Custom vote types

Posted: Wed Jan 24, 2024 9:30 am
by Fused
Here's the new wiki page: https://wiki.zandronum.com/VOTEINFO
As you can see the actual feature is a lot more bare bones than what was initially pitched. For what I understand the reason for this is because most of the features can be implemented manually by ACS when the vote passed. Not sure how this is expected to work, though. The majority of missing features handle the way votes are called to begin with and you can't handle those by ACS unless an invalid vote was already called. It also appears the 'Call a Vote' screen does not list any of the custom votes you implement. The overall implementation could really use some polishing.

Re: Custom vote types

Posted: Wed Jan 24, 2024 5:24 pm
by StrikerMan780
Thanks a ton! And yeah, would be a good idea to get custom vote types listed in the vote menu. In the meantime I'll just make do with adding them to a custom MENUDEFS.

Re: Custom vote types

Posted: Mon Mar 25, 2024 4:53 am
by Ænima
That's perfect!

Thanks dude. Crazy to think I posted here almost 9 years ago asking for this exact thing.