[CS:S] Map Cycle

Release your plugins here!
User avatar
iPlayer
Developer
Posts: 445
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

[CS:S] Map Cycle

Postby iPlayer » Mon Jan 11, 2016 12:40 pm

What it is:
  • Map votes (!votemap). You can schedule one. Unfortunately, it only works with mp_timelimit. No frag/round limits. Yet.
    But if you want, it can change maps instantly (without waiting for round end), so it still matches requirements of DM servers.
  • Map extensions. Any map can be extended if you let players do it.
  • Recent maps exclusion. Stops them from switching between two dust's back and forth.
  • Nominations (!nominate). Players can nominate their maps so that these maps appear on first places in the map votes.
  • RockTheVote (!rtv). Players can start map votes prematurely.
  • TimeLeft (!timeleft). Reports how much time is left till the map changes.
  • NextMap (!nextmap). Reports what the next map is.
  • Map ratings (!likemap). Allows players to Like! or Dislike the map they're playing on. Also runs mass surveys right before main map vote.
    Map rating (likes, likes - dislikes or likes:dislikes) is one of the most important factors that defines which maps will make it to the final vote.
  • New maps tracker. Sometimes you add new maps to you maplist and want to make people see and play them. The plugin tracks these maps for X days and bumps them just a bit in map votes.
  • maps folder scanner. If you run a fast-paced gamemode, you probably have a lot of maps. This plugin allows you to rebuild mapcycle.txt if you provide right prefixes.
  • Fancy map names :) . No more de_dust2, it's Dust II now. You can define your own multilangual translations or hardcode the name right into mapcycle.json.
  • mapcycle.json. I'm sorry, but it's just the way it is. Once you have built your mapcycle.txt, the plugin will help you convert it to mapcycle.json. Why JSON? It gives you the opportunity to define extra mapcycling options.
  • Time restriction. Got both de_dust2 and de_dust2_night? No problem. mapcycle.json allows you to set time intervals when each map should appear in map votes.
  • "1. I Don't Care". It's important. I believe that if a player doesn't want to vote, he has all the rights to hit '1' without even looking at the popup.

Popup screenshots
Image

mc command
I'll just paste it here

Code: Select all

mc help:
> mc help
Shows this help message

> mc reload-mapcycle
Reloads mapcycle.json

> mc rebuild-mapcycle
Creates new mapcycle.json based on mapcycle.txt (mapcycle_default.txt)

> mc db show [<starting ID>]
Prints contents of database.sqlite3. If the starting ID is given, shows the
contents only beginning from this ID.

> mc db dump-html
Dumps contents of database.sqlite3 to an HTML page:
<mod folder>/logs/source-python/sp_map_cycle/databasedump.html

> mc db save
Saves current maps list from memory to the database

> mc db load
Reloads data from the database into memory

> mc db set-force-old <map filename>
Marks the given map as old (no NEW! postfix)

> mc db set-force-old-all
Marks all known maps as old (no NEW! postfix)

> mc db unset-force-old-flag <map filename>
Restores 'new' flag for the given map based on its detection date.
The flag may not be restored if the map is actually old, but you can make
database forget such map by typing 'mc db forget-map <map filename>'.

> mc db forget-map <map filename>
Removes the given map from the database, doesn't remove the map from the mapcycle.
Map will be added to the database again if it's still in mapcycle.

> mc scan-maps-folder [<map prefix> ...]
Scans contents of ../maps folder and puts scanned maps in mapcycle.txt.
You can then convert that mapcycle.txt to mapcycle.json by typing 'mc rebuild-mapcycle'.
If map prefixes are given, only maps that start with that prefix will be added to the list.
Example:
mc scan-maps-folder de_ cs_ gg_


Usage examples
First run instant start

Code: Select all

mc scan-maps-folder        // Scan maps folder into mapcycle.txt
mc rebuild-mapcycle        // Convert mapcycle.txt to mapcycle.json
mc reload-mapcycle         // (optional - you can wait til changelevel or restart the plugin) Load mapcycle.json into memory
mc db save                 // (optional - you can wait til changelevel) Save the maps to the database
mc db set-force-old-all    // (optional - you can wait 5 days) Strips NEW! flags from all your maps


Database print

Code: Select all

mc db show

prints something like this:
The attachment HMKN882.jpg is no longer available


Installation
1. Install Source.Python
2. Download latest release of the plugin.
3. Extract sp-map-cycle-x.x.x directory to your cstrike folder.
4. Add the following line to autoexec.cfg:
sp load sp_map_cycle

Configuration
After first loading plugin will create config file called sp_map_cycle.cfg in your cstrike/cfg/source-python folder. Go through it, you may want to disable logging, although I would be much happier if you provided log files when you ask something.
There's also a file called downloadlist.txt in cstrike/cfg/source-python/sp_map_cycle folder. It's meant to hold paths to the sounds for this plugin.
mapcycle.json can be found/created in cstrike/cfg folder.
Your own map names translations go to cstrike/resource/source-python/translations/sp_map_cycle/mapnames_server.ini. Use mapnames.ini as a reference.

You can restrict map to some particular time interval:

Code: Select all

    {
        "filename": "cs_assault",
        "timerestrict": "8:00,22:00"
    },

- this way the map will only be playable from 8am to 10pm

Code: Select all

    {
        "filename": "cs_assault_night",
        "timerestrict": "22:00,8:00"
    },

- and this map will only be playable from 10pm to 8am

Feedback
Greatly appreciated. Exceptions, warnings and debug messages can be found in cstrike/logs/source-python
Attachments
HMKN882.jpg
Last edited by iPlayer on Tue Jun 28, 2016 1:56 am, edited 1 time in total.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • arcadmin • AdPurge

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
La Muerte
Administrator
Posts: 170
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Postby La Muerte » Mon Jan 11, 2016 6:36 pm

Feedback: I think that users are used to typing rtv, nominate, timeleft etc without an exclamation mark, personally I would prefer to keep it that way too since its a force of habbit and old habbits die hard hehe.

Furthermore this plugin is awesome.
User avatar
satoon101
Project Leader
Posts: 2295
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Mon Jan 11, 2016 7:11 pm

With GunGame (currently unreleased), I am using say and client commands without any prefix, as well as using the prefix ! and / for say commands with / denoting private.

My suggestion would be to add a server command to start the vote. That will make it easier for other plugins, like GunGame, to be more dynamic in starting map voting themselves.
Image
User avatar
iPlayer
Developer
Posts: 445
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Postby iPlayer » Tue Jan 12, 2016 5:11 am

La Muerte wrote:I think that users are used to typing rtv, nominate, timeleft etc without an exclamation mark


satoon101 wrote:I am using say and client commands without any prefix, as well as using the prefix ! and / for say commands with / denoting private.


Thanks for your replies, guys. Well, it currently does support commands without any prefixes, here's the list:
!votemap, votemap - opens vote popup if vote is active
!nominate, nominate - opens nomination popup if vote has not started yet
!rtv, rtv, !rockthevote, rockthevote - marks your as the one who wants to start the vote
!likemap - rates the map (should probably change to !ratemap?)
!nextmap, nextmap - tells what the next map is
!timeleft, timeleft - tells how much time is left for the current map

My suggestion would be to add a server command to start the vote.

Yes, I remember that. I was configuring GunGame 4 back in the day and I remeber it provided a choice between Mani, it's own vote system and something else.
User avatar
iPlayer
Developer
Posts: 445
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Source.Python Map Cycle update!

Postby iPlayer » Tue Jan 12, 2016 8:54 pm

Source.Python Map Cycle update!

https://github.com/KirillMysnik/sp-map-cycle/releases/tag/v1.1.0-beta

Upgrade instructions are given on the release page. Please, don't forget to delete database.sqlite3 as database schema has changed.

Changes:
  • Fixed #1!
  • Added spmc_launch_vote console command - cancels scheduled vote (if any) and instantly starts a new one (w/o extension option).
  • Added spmc_nextmap_show_on_match_end - defines if the next map should be shown on players screens when the match ends (on top and in chat).
  • Added spmc_timeleft_auto_lastround_warning - defines if players should receive a warning when the round becomes the last one (map runs out of timelimit but instant map changes are turned off).
  • Added 'man_hours' column to the database - unused in current release
  • Added 'av_session_length' column to the database - unused in current release
  • All spmc db show output is now capped to 40 maps. You can now define the map ID to start the output from:

    Code: Select all

    spmc db show 25 // Shows maps from 25 to 64

    Map IDs are now shown in the table.
  • All spmc db show output now only shows Map ID, Map File Name, Detected, Old? and Likes/Dislikes columns as the table became too long to fit in the console.
  • Added spmc db dump-html command - dumps the whole database to an HTML page.
    Page can be found at cstrike/logs/source-python/sp_map_cycle/databasedump.html


Here's a screenshot of the said page:
Image
User avatar
satoon101
Project Leader
Posts: 2295
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Thu Jan 28, 2016 3:56 am

Since you mentioned in the other thread about updating this to work for CS:GO, I thought I would recommend looking into adding a system that works with the Workshop. I know there is a SourceMod plugin that does this, though I have not looked into the code to figure out how.
Image
User avatar
BackRaw
Senior Member
Posts: 413
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany

Postby BackRaw » Thu Jan 28, 2016 8:16 pm

Very nice plugin, good job!

OT: Where is the +w00t button the EventScripts forums had? :D
Last edited by BackRaw on Tue Jun 28, 2016 2:43 pm, edited 1 time in total.
User avatar
iPlayer
Developer
Posts: 445
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: [CS:S] Map Cycle

Postby iPlayer » Tue Jun 28, 2016 1:58 am

Map Cycle 2.0 release

https://github.com/KirillMysnik/sp-map-cycle/releases/tag/v2.0.0-beta

Changes:
  • Renamed from "SP Map Cycle" to "Map Cycle"
  • Updated to the latest Source.Python version
  • Uses SQLAlchemy as a database backend
  • Depends on ControlledCvars and SpamProofCommands custom packages
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • arcadmin • AdPurge

Hail, Companion. [...] Hands to yourself, sneak thief. Image

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 1 guest