Posted: Wed Nov 06, 2013 4:42 pm Post subject: removemap ccmd
This command is very missed when you need to amend the maplist in a busy server (restart not really feasible) because the only available option is to use clearmaplist and then repopulate the whole maplist one by one using addmap; one mistake or typo in the process means that you need to redo the whole thing again. Another unpleasant side effect is that the next map after using clearmaplist, even though the maplist has already been repopulated, is always map02, which breaks gameplay continuity.
Typical scenario: We stumble upon a map that turns out to be unplayable during TNS and we want to remove it for next rotations or we just need to fix wrongly set up maplist after the session has already started. We go through the laborious process described above after which we land in map02, have to manually switch and make people lose all weapons.
Code:
synopsis: removemap map_name [occurrence]
The removemap command removes all occurrences of a map specified by map_name from the maplist. If the optional occurrence parameter is specified, it removes only the Nth occurrence of the specified map from the maplist; counting starts at 1, i.e. 1 = first occurrence from the start, 2 = second occurrence from the start, etc.; negative values would remove from the end, i.e. -1 = first occurance from the end, -2 = second occurance from the end etc.; occurrence equal to 0 could be a redundant alias for all. When out of range occurrence is entered, nothing should be removed.
Changes to the maplist should be reflected in what map will be played next, i.e. if we remove map(s) from the position less or equal to the position of the map being currently played, we should not find ourselves skipping some intermediate maps. If the maplist, after removing maps, becomes shorter than where our next map would be, last map of the maplist should be the next map except when the last map in the maplist is the same map (same as in having the same name in this case) as the map currenlty played, then the first map of the maplist should be the next map instead. If the maplist becomes empty, next map should be determined according to MAPINFO/original map order for the IWAD being played. The last case should also apply when clearmaplist is used.
In relation to this, it would make sense to extend the addmap command as well.
Code:
synopsis: addmap map_name [position]
The addmap command appends the map specified by map_name to the end of the maplist (as it always did). If the optional position parameter is specified, it inserts the map to that specified position in the maplist; indexing starts at 1, i.e. 1 = insert at the first position, 2 = insert at the second position; negative indices insert counting from the end of the maplist, i.e. -1 = insert at the last but one position, -2 = insert at the last but two position; out of range indices insert at the maplist's head or tail for positive or negative values respectively OR they could fail printing the maplist size instead. Position equal to 0 could be a redundant alias for appending to the end.
The next map to be played after inserting a map to the maplist should always be the next map originally to be played after the one being played at the moment, i.e. if we insert a map into the maplist at a positon somewhere before or at the current map's position and the rest of the maplist shifts, we should not end up on the same map again (or even more back if we did more such inserts).
This proposal does not break current behavior (except for clearmaplist always resetting next map to map02, which I already consider broken) and should make on the fly maplist amending simple and easy.
the only available option is to use clearmaplist and then repopulate the whole maplist one by one using addmap; one mistake or typo in the process means that you need to redo the whole thing again.
19. Two new server commands to remove maps from the maplist:
delmapbyidx <NNN>
delmapbyname <XXX>
The first removes a map by its index (1 being the first
one), the second removes all entries matching the specified
map name.
So the "remove map" request is done; if you want to extend the addmap syntax, please make a separate request as described in the guidelines.
So the "remove map" request is done; if you want to extend the addmap syntax, please make a separate request as described in the guidelines.
If you are willing to implementing the rest, can't this thread just be renamed to something like "removemap/insertmap ccmds" or "better maplist management from console"? I see no benefit in starting another thread in this particular instance, the changes are very closely tied, in fact, they complement each other; it would be like requesting the addition of a "true" keyword and a "false" keyword separately.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum