Raised This Month: $32 Target: $400
 8% 

[REQ] Per map plugin.ini


  
 
 
Thread Tools Display Modes
Author Message
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 08-11-2006 , 14:52   [REQ] Per map plugin.ini
#1

Currently, you can only disable a plugin after a map has been loaded. Serveral users have had errors because of precaching plugins on maps with a lot of entitites. It would be nice if you could have a per map plugin.ini.

Attached is a modified version of meta_api.cpp which does just that. The ini files are stored in configs/maps/mapname.ini. For example configs/maps/de_dust.ini would be a plugin.ini file that would load for de_dust. If no mapname.ini file is fould, the default /configs/plugins.ini is loaded instead.

My C++ coding is a little rough so the request is that one of the programmers looks at the changes, cleans them up to make them match the AmxModX coding style and incorporate this into the source tree.

Thanks.
Attached Files
File Type: rar meta_api.rar (11.5 KB, 294 views)
AndraX2000 is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 08-12-2006 , 12:23   Re: [REQ] Per map plugin.ini
#2

nice point
jopmako is offline
Send a message via MSN to jopmako
BAILOPAN
Join Date: Jan 2004
Old 08-13-2006 , 12:19   Re: [REQ] Per map plugin.ini
#3

This sounds like a good idea, however, I would propose a slightly different convention: file names being configs/maps/plugins-<mapname>.ini
__________________
egg
BAILOPAN is offline
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 08-16-2006 , 21:18   Re: [REQ] Per map plugin.ini
#4

Quote:
Originally Posted by BAILOPAN View Post
This sounds like a good idea, however, I would propose a slightly different convention: file names being configs/maps/plugins-<mapname>.ini
Good point, that would probably be less confusing. Attached is meta_api.cpp with a change to that naming convention.
Attached Files
File Type: rar meta_api.rar (11.5 KB, 147 views)
AndraX2000 is offline
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 08-16-2006 , 21:57   Re: [REQ] Per map plugin.ini
#5

How about:

configs/plugins-<mapname>.cfg

like plugins-csdm...
TheLinx is offline
Send a message via ICQ to TheLinx Send a message via AIM to TheLinx Send a message via MSN to TheLinx Send a message via Yahoo to TheLinx Send a message via Skype™ to TheLinx
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 08-16-2006 , 22:27   Re: [REQ] Per map plugin.ini
#6

You would want it in a seperate folder to keep it less cluttered.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 08-17-2006 , 05:49   Re: [REQ] Per map plugin.ini
#7

Make it availible so you can customize that! You choose in amx.cfg or any other .cfg which path and where it should be
TheLinx is offline
Send a message via ICQ to TheLinx Send a message via AIM to TheLinx Send a message via MSN to TheLinx Send a message via Yahoo to TheLinx Send a message via Skype™ to TheLinx
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-17-2006 , 10:40   Re: [REQ] Per map plugin.ini
#8

Right now how it loads those other plugins, it would load all those plugins at once it doesn't look for the name only that it has plugins-<something>.ini
so that wouldn't work in just configs.
Thats why BAILOPAN suggested using configs/maps/ which a lot of people already have this folder because of custom map configs. Plus that wouldn't be that much more difficult to use.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-17-2006 , 11:08   Re: [REQ] Per map plugin.ini
#9

I noticed the maps folder doesn't actually come standard in the AMXX package. Maybe make it, and add one file inside like "de_dust" or "trainyard" and just some example config that's all commented?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 08-17-2006 , 12:05   Re: [REQ] Per map plugin.ini
#10

Because the file paths are pretty much hard-coded into meta_api.cpp, it would take a substantial rewrite of the code to allow you to choose where the individual plugin.ini files are stored. It just wouldn't be worth it.
Keeping them as configs/maps/plugins-<mapname>.ini seems to be the cleanest, easiest to maintain solution.

Also, adding an example config that is completely commented would actually work out poorly. That is beacuse this doesn't work like the <mapname>.cfg files, which work by loading the <mapname>.cfg file in addition to the default server.cfg. This loads the plugin-<mapname>.ini file instead of the default. So a completely commented plugin-de_dust.ini would actually prevent any plugin from being loaded fo de_dust.

Attached are two sample files from my server. The plugins.ini file goes in configs/ (like normal) and contains some 3rd party plugins that we find fun. However, when we play de_dust, we like to turn off most of the third party addons. The plugins-de_dust.ini file goes in configs/maps/. Note that plugins-de_dust.ini is a complete plugins file. It still has all of the standard plugins listed.
Attached Files
File Type: ini plugins.ini (1.6 KB, 186 views)
File Type: ini plugins-de_dust.ini (1.5 KB, 306 views)
AndraX2000 is offline
 



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 07:17.


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