Closed gundogfan closed 1 year ago
Yeah, I though about that I have some concerns like for example:
arcade
which the vote input will be agmap arcade arcade
.agmap arena stalkx
is already 3 inputs). This will require a redesign which I don't know if it would be easy task or not. Of course, this can be workarounded by using vote agnextmap stalkx
then later vote arena
but I get what your want, it's more easy to people to vote only once. I need to analyze this and see if this is viable. Thanks for the suggestion.
Got it.
Another idea would be getting rid of "agmap" command and just stick to "gamemode map" syntax (arena stalkx, for example). Being always the first command the gamemode and the second one the map, thus avoiding conflicts with maps named as a gamemode and also avoiding the rest of the problems you listed. Just an idea though.
EDIT: we should also think of how single votes would work. I mean, the gamemode I guess remains the same, but how about maps? If we are only trying to change the map and not the gamemode should we keep the "agmap" or delete it? That's my concern.
Yeah, seems like a good idea to use the <gamemode> [map]
syntax. Thanks, it will avoid the need to rework the vote system. I'm gonna work on it whenever I finish some other projects.
I don't get what you're trying to say in your last paragraph but votes for changing the map are still going to be there. I don't see a reason to remove it. People sometimes just want to change the map and not the gamemode and viceversa. The issue comes when you want to change both at the same time.
This is kind of offtopic but I find troublesome how the vote system works. I mean, votes can be executed by invoking the command name itself, without using the vote
command before the vote. What happens when a plugin has commands with the same name?. I don't see it as a wise decision by the AG creator. If I can go back in time, I'll suggest to always use vote
before a vote to keep it clean and simple.
If you're starting a listen server (A LAN server created in-game) you wouldn't be able to change basic commands from the console like mp_timelimit
as an admin, because now it has become a vote. I means it just cumbersome and it adds complexity unnecessaraly.
By the way, I tried to fix this in the past by enforcing the vote
command but the community reject it, showing me that backward compatibility is very important.
Anyway, I always use the command vote
before any vote to avoid any issues. Example: vote agmap stalkx
, vote map stalkx
or vote arcade
.
Still, I can't blame BulliT for that, by the time that AG come out (if I'm not wrong), plugins weren't a thing very spread, only Admin Mod was available (which later became AMX, then AMXX), so some decisions were taking by not expecting other plugins/mods/commands interfering.
The commit https://github.com/rtxa/agmodx/commit/4f2d3338bcc826192ad4486f9a9575b3e8ee6e8a should adress this issue.
Please @gundogfan, test it from the latest artifact in Github Actions and let me know what you think. I'm also thinking in adding this command for admins too. Currently is only for normal players.
Works perfect! Although (going back to what we talked before about syntax), I find it unintuitive and difficult to learn how many kind of votes are out there:
agmap crossfire
vote map crossfire
vote agmap crossfire
And the new one:
vote tdm crossfire
I keep in mind what you said about the community being against the command "vote", but in my opinion, it'd be better if the vote system is simplified and standardized. For example:
vote map crossfire
vote gamemode tdm
vote tdm crossfire
It can work if I implement a cvar with the name of sv_ag_vote_new_syntax
and you switch to another map to see the reflected changes. Maybe I would implement the cvar, but not by default of course, it needs to be implemented slowly or players will reject it. My guess is that a lot of players use pre-configured configs from Pro players which use the vote system, and that is hard to change, probably some people don't even know, but if your start using vote
always in your binds on your config, it would be better.
@gundogfan
Please, test the new changes, this should definitely close this issue. Now the new syntax should work when not using vote
before the vote and when calling from the server console. For example: arcadex bounce
.
I was simplifying a lot of code and I could have broken something in the process, maybe sv_ag_allowed_gamemodes
is not working as expected in these votes.
Voting through gamemode + map syntax works fine, but this is what happens now.
Let's say I'm on tdm Killbox and I type arena
on console:
] arena "sv_ag_gamemode" changed to "arena" "amx_nextmap" changed to "killbox" "amx_nextmap" changed to "" "mp_chattime" changed to "12.000000" "amx_nextmap" changed to "stalkx"
It does change to arena but it changes the map as well to the following map listed on mapcycle.txt, it shouldn't.
This should be the correct behaviour:
] arena "sv_ag_gamemode" changed to "arena" "amx_nextmap" changed to "killbox" "mp_chattime" changed to "12.000000"
Thanks gundog, it was late and I forgot to add the else clause.
Fixed on https://github.com/rtxa/agmodx/commit/50356a5d2e2310d7771e22a485a38dbfef60e995
I'll close the issue by now, if something doesn't work as expected, I will re-open it.
The idea is to make one vote for both things instead of voting one first and then the other. Example:
Also it'd be better if the hud message says: