Raised This Month: $12 Target: $400
 3% 

Polymorph: Mod Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Aqua
Junior Member
Join Date: Aug 2018
Old 09-01-2018 , 19:49   Re: Polymorph: Mod Manager
Reply With Quote #941

Quote:
Originally Posted by fysiks View Post
The mod is already excluded from the normal vote options. Extending the mod is controlled by the cvar poly_extendmod.
You misunderstood me. I need what would be possible 1 extension of the mod.
Aqua is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-02-2018 , 02:28   Re: Polymorph: Mod Manager
Reply With Quote #942

Quote:
Originally Posted by Aqua View Post
You misunderstood me. I need what would be possible 1 extension of the mod.
So basically, you want a maximum number of maps that can be played on one mod simultaneously?
__________________
fysiks is offline
Aqua
Junior Member
Join Date: Aug 2018
Old 09-02-2018 , 20:22   Re: Polymorph: Mod Manager
Reply With Quote #943

Quote:
Originally Posted by fysiks View Post
So basically, you want a maximum number of maps that can be played on one mod simultaneously?
I need 1 mod to be extended only once. That when players prolonged the mod, then in the next vote it could not be extended. I apologize for my bad english
Aqua is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-03-2018 , 14:36   Re: Polymorph: Mod Manager
Reply With Quote #944

Ok, I think this is simpler than I originally thought. Try replacing:

Code:
	if( get_pcvar_num(g_pExtendMod) )
with

Code:
	if( get_pcvar_num(g_pExtendMod) && (g_iMapsPlayed - g_iMapsPerMod[g_iThisMod]) < 1)
__________________
fysiks is offline
Aqua
Junior Member
Join Date: Aug 2018
Old 09-03-2018 , 23:25   Re: Polymorph: Mod Manager
Reply With Quote #945

Quote:
Originally Posted by fysiks View Post
Ok, I think this is simpler than I originally thought. Try replacing:

Code:
	if( get_pcvar_num(g_pExtendMod) )
with

Code:
	if( get_pcvar_num(g_pExtendMod) && (g_iMapsPlayed - g_iMapsPerMod[g_iThisMod]) < 1)
Does not work. After extending the mod and changing the map, you can still extend the mod. Also on the current map you can extend the mode more than 1 time
Aqua is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-04-2018 , 01:02   Re: Polymorph: Mod Manager
Reply With Quote #946

Ok, so apparently it's a little more complicated. Keep the previously mentioned change and then do this:

Remove this:
Code:
		
		// Decrement maps played to only extend mod by one map.
		new szMapsPlayed[4]
		g_iMapsPlayed--
		num_to_str(g_iMapsPlayed, szMapsPlayed, charsmax(szMapsPlayed))
		set_localinfo("mapcount", szMapsPlayed)
Replace the entire plugin_end() function with this one:
Code:
public plugin_end()
{
	if( g_iThisMod != g_iNextMod )
	{
		g_iMapsPlayed = 0
		UpdatePluginFile()
	}

	new szMapsPlayed[4]
	num_to_str(g_iMapsPlayed, szMapsPlayed, charsmax(szMapsPlayed))
	set_localinfo("mapcount", szMapsPlayed)
}
__________________
fysiks is offline
Aqua
Junior Member
Join Date: Aug 2018
Old 09-06-2018 , 00:53   Re: Polymorph: Mod Manager
Reply With Quote #947

It helped! But it does not work if the current map is extended. Also sometimes when the mod is extended, the server hangs and tries to start. There are no errors in the logs. The last lines in the console:
Quote:
L 09/06/2018 - 07:262: [polymorph.amxx] Vote: Voting for the next mod started
L 09/06/2018 - 07:26:47: Server cvar "amx_nextmap" = "soccerjam"
Aqua is offline
shady101
Member
Join Date: Nov 2014
Location: USA
Old 11-02-2018 , 03:17   Re: Polymorph: Mod Manager
Reply With Quote #948

when the server restarts, or the map is changed by an admin, polymorph loads the incorrect plugins instead of the correct plugins according to the map. Also it doesn't seem to be loading new plugins on map change, only on server restart. Anyway to fix this?

Last edited by shady101; 11-02-2018 at 22:48.
shady101 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-02-2018 , 23:53   Re: Polymorph: Mod Manager
Reply With Quote #949

Quote:
Originally Posted by shady101 View Post
when the server restarts, or the map is changed by an admin, polymorph loads the incorrect plugins instead of the correct plugins according to the map.
Plugins are not configured based on the map. They are only configured based on the mod. If you manually change the map, it will load the mod that is set as "next mod" on that new map. See the answer to your second issue below for more detail on how plugins are configured to run in Polymorph.

If you are looking for static map-based plugins and configuration you can look here and here respectively.

Quote:
Originally Posted by shady101 View Post
Also it doesn't seem to be loading new plugins on map change, only on server restart. Anyway to fix this?
Because plugins cannot be loaded dynamically, they have to be configured prior to a map starting. So, what I do is configure which plugins will run on the next map at the end of the current map hased on what is set as the "next mod".

However, if the current mod and the next mod are the same, it will skip configuring the plugins because it assumes that nothing has changed. So, if by "new plugins" you mean plugins that you added to the mod's config file while that mod is running, then it won't load the plugins that you just added to the list. This can be remedied by unconditionally calling UpdatePluginFile() on line 258.

If you don't need a longer term solution and/or don't want to recompile the plugin, you can simply set the next mod to something other than the current one, change the map then set the next mod back to the mod that you want and change the map again. Note that using the "restart" command in the server console is the same as changing the map.
__________________

Last edited by fysiks; 11-09-2018 at 21:20. Reason: fixed the quoted text
fysiks is offline
crashrock2
Junior Member
Join Date: Jul 2012
Old 11-09-2018 , 11:57   Re: Polymorph: Mod Manager
Reply With Quote #950

And can I play the casual mode with this mod?
crashrock2 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 15:25.


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