Custom vote types

killall -9

Moderator: Developers

Post Reply
User avatar
Dusk
Developer
Posts: 581
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: 3523
Joined: Tue Jun 05, 2012 6:12 pm

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 ...
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Lollipop
Zandrone
Posts: 1123
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
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Dusk
Developer
Posts: 581
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: 219
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: 992
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.

User avatar
Dusk
Developer
Posts: 581
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: 3523
Joined: Tue Jun 05, 2012 6:12 pm

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.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

User avatar
Fused
Contributor
Posts: 658
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
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.

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

My socials
Image Image

User avatar
StrikerMan780
Forum Regular
Posts: 279
Joined: Tue May 29, 2012 9:16 pm
Clan: Shadow Mavericks
Clan Tag: [SM]

Re: Custom vote types

#11

Post by StrikerMan780 » 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).

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

Re: Custom vote types

#12

Post by Fused » Tue Jan 23, 2024 9:12 pm

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.
My mods
Image Image

My socials
Image Image

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

Re: Custom vote types

#13

Post by Fused » Wed Jan 24, 2024 9:30 am

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.
My mods
Image Image

My socials
Image Image

User avatar
StrikerMan780
Forum Regular
Posts: 279
Joined: Tue May 29, 2012 9:16 pm
Clan: Shadow Mavericks
Clan Tag: [SM]

Re: Custom vote types

#14

Post by StrikerMan780 » Wed Jan 24, 2024 5:24 pm

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.

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

Re: Custom vote types

#15

Post by Ænima » Mon Mar 25, 2024 4:53 am

That's perfect!

Thanks dude. Crazy to think I posted here almost 9 years ago asking for this exact thing.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Post Reply