Raised This Month: $ Target: $400
 0% 

Polymorph: Mod Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-03-2010 , 20:46   Re: Polymorph: Mod Manager
Reply With Quote #1

I edited that thread at sc to be much more descriptive with file names for a better reference that you guys can use. And fysiks made a mapchooser just for GG to work. I dont use it cause i have a gg server by itself.

http://forums.supercentral.net/index...opic=1134&st=0

And dont get me wrong, with the map configs for about 10 other maps with this, its one of the more complicated servers I have ran. But its fun and awesome once its running nice.
__________________

Last edited by bmann_420; 02-03-2010 at 20:51.
bmann_420 is offline
supergreg
Senior Member
Join Date: Jul 2007
Location: Oslo, Norway
Old 02-16-2010 , 01:51   Re: Polymorph: Mod Manager
Reply With Quote #2

Thanks fysiks for great work on the plugin, and thanks bmann - great jumpstart on using this by reading that thread.

Code:
L 02/16/2010 - 07:12:52: Invalid CVAR pointer
L 02/16/2010 - 07:12:52: [AMXX] Displaying debug trace (plugin "polymorph.amxx")
L 02/16/2010 - 07:12:52: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 02/16/2010 - 07:12:52: [AMXX]    [0] polymorph.sma::countModVotes (line 528)

L 02/16/2010 - 07:13:17: Invalid CVAR pointer
L 02/16/2010 - 07:13:17: [AMXX] Displaying debug trace (plugin "polymorph.amxx")
L 02/16/2010 - 07:13:17: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 02/16/2010 - 07:13:17: [AMXX]    [0] polymorph.sma::countMapVotes (line 631)
I use amx_rtv to force a vote, I get the mod choices, the first error occurs exactly as I select a choice.
I wait for the map vote, I select a choice, and the second error occurs.
Replicable every time. My choices do seem to be registered though, and everything looks good ingame, I just wanted to get rid of those from the server console and amxx logs.

Seems my server doesnt like the get_cvar_pointer() calls? Not sure, but I can't find code bugs or other reasonable explanations. Any suggestions for where I can start looking?

Edit: Sorry, brainfart on my end. Suddenly dawned on me that those cvars are registered in admin.amxx which we have replaced with a custom solution. Now works as expected without errors!

Last edited by supergreg; 02-16-2010 at 02:05.
supergreg is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-16-2010 , 18:25   Re: Polymorph: Mod Manager
Reply With Quote #3

Tahnks, Good to hear you got it working .
__________________
fysiks is offline
supergreg
Senior Member
Join Date: Jul 2007
Location: Oslo, Norway
Old 02-18-2010 , 08:02   Re: Polymorph: Mod Manager
Reply With Quote #4

Yes, it works very well, and I love the concept.

One thing I couldn't wrap my head around:
poly_mode is set to 2, but usually acts like 1 (I have mapspermod=1, hoping that this would force the startModVote() right before the end of each map). I have mp_timelimit set to 30 in server.cfg and haven't found that to be overwritten anywhere? Maybe I missed a spot, but it seems like polymorph often thinks it is set to 0? Anyways, the times it actually does have the timeleft correct, the map just ends, stating which mod will be the next one. We're never presented with any vote, which I'd very much like.

I suggest something like this for poly_rtv (line 93).. so you can rtv if timelimit/timeleft is 0, or ignore the treshold if you're alone on the server.
PHP Code:
    new Float:limit get_cvar_float("mp_timelimit");
    new 
Float:vote_wait get_pcvar_float(cvar_rtv_wait)
    new 
Float:time_elapsed limit - (floatget_timeleft() ) / 60.0// Use get_gametime
    
new time_left get_timeleft();
    new 
current_players get_playersnum(1);
    
    if(
limit &&  current_players &&  time_elapsed vote_wait )
    {
        
client_print(idprint_chat"[RTV] Too early to RockTheVote.. wait a bit longer");
        return 
PLUGIN_HANDLED
    
}
    
    if(
time_left && time_left 240 // don't allow rtv 4 minutes before map ends
    
{
        
client_print(idprint_chat"[RTV] Too Late to RockTheVote.")
        return 
PLUGIN_HANDLED
    

I believe I also had an incident where the currently playing map showed up as a regular map choice in the vote (seems logical to have it as an extend option instead, like with the mod).
supergreg is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-18-2010 , 15:07   Re: Polymorph: Mod Manager
Reply With Quote #5

Quote:
Originally Posted by supergreg View Post
Yes, it works very well, and I love the concept.

One thing I couldn't wrap my head around:
poly_mode is set to 2, but usually acts like 1 (I have mapspermod=1, hoping that this would force the startModVote() right before the end of each map). I have mp_timelimit set to 30 in server.cfg and haven't found that to be overwritten anywhere? Maybe I missed a spot, but it seems like polymorph often thinks it is set to 0? Anyways, the times it actually does have the timeleft correct, the map just ends, stating which mod will be the next one. We're never presented with any vote, which I'd very much like.
If mp_winlimit or mp_maxrounds is non-zero and you are using mp_timelimit then I might expect this to happen if you haven't satisfied the mp_winlimit or mp_maxrounds before mp_timelimit is up.


Quote:
Originally Posted by supergreg View Post
I suggest something like this for poly_rtv (line 93).. so you can rtv if timelimit/timeleft is 0, or ignore the treshold if you're alone on the server.
PHP Code:
    new Float:limit get_cvar_float("mp_timelimit");
    new 
Float:vote_wait get_pcvar_float(cvar_rtv_wait)
    new 
Float:time_elapsed limit - (floatget_timeleft() ) / 60.0// Use get_gametime
    
new time_left get_timeleft();
    new 
current_players get_playersnum(1);
    
    if(
limit &&  current_players &&  time_elapsed vote_wait )
    {
        
client_print(idprint_chat"[RTV] Too early to RockTheVote.. wait a bit longer");
        return 
PLUGIN_HANDLED
    
}
    
    if(
time_left && time_left 240 // don't allow rtv 4 minutes before map ends
    
{
        
client_print(idprint_chat"[RTV] Too Late to RockTheVote.")
        return 
PLUGIN_HANDLED
    

poly_rtv is only an example and you can expand/modify it how ever you want.

Quote:
Originally Posted by supergreg View Post
I believe I also had an incident where the currently playing map showed up as a regular map choice in the vote (seems logical to have it as an extend option instead, like with the mod).
I took the map voting code directly from mapchooser. Does this happen when you use mapchooser?
__________________
fysiks is offline
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 02-21-2010 , 02:59   Re: Polymorph: Mod Manager
Reply With Quote #6

I'm not understanding how to install poly. I made a folder with name polymorph and what should i do now?

And something more: If i gonna install GG, which folder shal I install the .amxx plugin? in ploymorph or pluing?

And the same question with Maps. Shal i add the maps in Poly or Maps?

Thanks!
__________________
Zombie Dominance

To Do:
- Learn AMXx Script...
ServO is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2010 , 03:43   Re: Polymorph: Mod Manager
Reply With Quote #7

Maps go in the maps folder, plugins go in the plugins folder.

The MOD initialization files (and map list files) go in /polymorph/. There is an example of an initializtioon file in the first post. A map list file is a list of maps names (without the .bsp; same as mapcycle.txt).
__________________
fysiks is offline
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 02-21-2010 , 03:53   Re: Polymorph: Mod Manager
Reply With Quote #8

Oh, Thanks. I'll try again!
__________________
Zombie Dominance

To Do:
- Learn AMXx Script...
ServO is offline
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 02-21-2010 , 03:59   Re: Polymorph: Mod Manager
Reply With Quote #9

Okey here is what I did:

I made a folder named polymorph. In the folder i made a file named: 0_MyFirstMod.ini
In the file i did this:

HTML Code:
; Mod Cofiguration
; Comments here.

[mod]
name "GunGame"
mapsfile maps.ini

[cfg]
sv_gravity 800
sv_alltalk 1
hostname "This server is running Gungame"


[plugins]
gungame.amxx
Well, is that right?
__________________
Zombie Dominance

To Do:
- Learn AMXx Script...
ServO is offline
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 02-21-2010 , 05:41   Re: Polymorph: Mod Manager
Reply With Quote #10

Nvm, I figurd it out! Thanks for teh help!
__________________
Zombie Dominance

To Do:
- Learn AMXx Script...
ServO is offline
Reply



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 01:57.


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