Raised This Month: $7 Target: $400
 1% 

Polymorph: Mod Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Hawk552 (427)
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-11-2009 , 19:41   Polymorph: Mod Manager
Reply With Quote #1

Polymorph: Mod Manager

Description:
This is a map chooser replacement. It allows voting for the next mod (GunGame, HNS, etc.). It does not pause plugins so plugins from the mods are not loaded unless it is being played.
Admin Commands:
amx_nextmod
Console command to show/choose the next MOD to be played. When you change the next MOD it will choose a random map from the MOD's map list to be the default map.
Default access is ADMIN_MAP.
amx_votemod
Starts a vote for the next MOD (and consequently the next map. Then it changes the map.
Default access is ADMIN_MAP.

Cvars:
poly_mode <#>
0: Always stay on one mod unless changed manually with admin command. (Map votes only)
1: Play X maps then next mod will default to next in polymorph folder (Map votes only)
2: Play X maps then next mod will be chosen by vote. (Map and Mod votes)
Default: 2
poly_mapspermod <#>
Number of maps played per mod before you can vote for a new mod. Default 2.
This variable is now customizable per MOD in the initialization file.
poly_extendmod <1|0>
Allow extending the current mod (Mode 2).
Default 1.
amx_extendmap_max 90
amx_extendmap_step 15
Setup:
  • Install polymorph.amxx like any other plugin.
  • Create the folder /addons/amxmodx/configs/polymorph/.
  • Create MOD initialization files:
    • File must be in the polymorph folder.
    • File must begin with a number.
    • Example file 0_MyFirstMod.ini
      Code:
      ; Mod Cofiguration
      ; Comments here.
      
      [mod]
      name "Mod Name"
      mapsfile maps1.ini
      mapspermod 2
      
      [cfg]
      sv_gravity 900
      sv_alltalk 0
      hostname "This server is running ModName"
      
      
      [plugins]
      plugin1.amxx
      plugin1b.amxx
    • "mapsfile" must be in the polymorph folder. It should contain all the maps that you want to be eligible to be played with the MOD
  • If a mod comes with a plugins-<modname>.ini file (like Zombie Plague), it must removed.
  • If you want a plugin running for all mods then place it in plugins.ini. If you want it running for only certain mods, list it in your mod's .ini file in the polymorph folder.
Startup:
The plugin will fail the first time it is run. Simply restart the server to create the plugins-polymorph.ini file.


Thanks to the SuperCentral Community for letting me test this on a public server.

Optimization/coding suggestions are welcome.

The changelog is in the source code.
Attached Files
File Type: sma Get Plugin or Get Source (polymorph.sma - 7305 views - 26.7 KB)
__________________

Last edited by fysiks; 05-08-2011 at 00:54.
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-11-2009 , 19:42   Polymorph Compatibility
Reply With Quote #2

MOD Compatibility
Gungame:
  • Delete mapchooser.amxx.
  • Put poly_mapchooser.amxx in the /plugins folder.
  • Rename it as mapchooser.amxx
  • Add mapchooser.amxx to the list of plugins in the Polymorph MOD initializaition file.
CSDM:
  • If you run CSDM, the module will not unload after playing CSDM.
  • So, add poly_csdm_off.amxx to every MOD that does not use the CSDM module. (tested but unconfirmed on an active server)
If you know of any MODs that will have compatibility issues like Gungame does, let me know.

Addons:
Polymorph: Rock the Vote:
This is a simple rtv plugin. Say rtv or rockthevote.
Starts a MOD vote followed by a map vote.
Add poly_rtv.amxx in plugins.ini
Cvars:
rtv_enable <1|0> (Default 1)
Enable the plugin.
rtv_ratio 0.51
Ratio required to rock the vote.
rtv_wait 1
Minutes before you can rtv
If you want to write add-on plugins for Polymorph you can use the attached include file.
Attached Files
File Type: sma Get Plugin or Get Source (poly_rtv.sma - 5070 views - 4.2 KB)
File Type: sma Get Plugin or Get Source (poly_mapchooser.sma - 4869 views - 345 Bytes)
File Type: sma Get Plugin or Get Source (poly_csdm_off.sma - 3788 views - 205 Bytes)
File Type: inc polymorph.inc (667 Bytes, 1940 views)
__________________

Last edited by fysiks; 12-02-2010 at 19:00.
fysiks is offline
kikifrh
Senior Member
Join Date: May 2009
Old 12-11-2009 , 20:00   Re: Polymorph: Mod Manager
Reply With Quote #3

Gj, seems a really good plugin, I'll test on my server when getting home :p
+k for the good work ^^ (I think it will be approved)

Last edited by kikifrh; 12-11-2009 at 20:02.
kikifrh is offline
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 12-11-2009 , 21:34   Re: Polymorph: Mod Manager
Reply With Quote #4

Nice.
Raddish is offline
Joker4ever
Member
Join Date: Dec 2008
Old 12-12-2009 , 01:22   Re: Polymorph: Mod Manager
Reply With Quote #5

Wow nice , this plugin is even more neat than the others. O: gj again.
Joker4ever is offline
orange
Senior Member
Join Date: Dec 2005
Old 12-12-2009 , 02:08   Re: Polymorph: Mod Manager
Reply With Quote #6

ooh this will help me for working on the SC multimod server i just havent had time but i will very soon.
__________________
orange is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 12-12-2009 , 03:02   Re: Polymorph: Mod Manager
Reply With Quote #7

oO GJ.nice idea
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-12-2009 , 06:08   Re: Polymorph: Mod Manager
Reply With Quote #8

Interesting.
__________________
Arkshine is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 12-12-2009 , 07:02   Re: Polymorph: Mod Manager
Reply With Quote #9

I could have used this some months ago. I was too lazy to do it myself
Well done.
__________________
In Flames we trust!
Nextra is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 12-12-2009 , 07:28   Re: Polymorph: Mod Manager
Reply With Quote #10

GJ fysiks
__________________
Javivi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode