AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Map specyfic configs loading (https://forums.alliedmods.net/showthread.php?t=51760)

KWo 02-23-2007 16:50

Map specyfic configs loading
 
Here is the part of default admin.sma file:
Code:
public plugin_cfg() {     new configFile[64], curMap[32]     get_configsdir(configFile, 31)     get_mapname(curMap, 31)     new len = format(configFile, 63, "%s/maps/%s.cfg", configFile, curMap)     if (file_exists(configFile))         set_task(6.1, "delayed_load", 0, configFile, len + 1) }

The questions is - why there is so big delay (6.1 sec) in that function to load the map specyfic configs? I believe the people want to be sure that even 1000 plugins have been already loaded and correctly inited, but is this really necessary to have that time value so high?
Example - I want to have csdm 2.1 disabled on some particular maps, so I need the map specyfic config for that map is called before csdm plugins start to do some actions (like equiping players with a gun, stripping weapons, removing some entities like bombzones, hostages etc). If the plugin will execute it's commands because it will see at startup is enabled, disabling it after that is too late.
I believe we need to have all commands already registered to have the possiblity to include them in map specyfic configuration file.
So - should I post a feature request (which will be immediately rejected) like "fast load map specyfic cfg file" or something like this (to load it before any plugin may start to do something) to keep the backward compatibility of current work of map specyfic configuration and have also the possibility to do something faster or I should rather think about using plugin_cfg() function in these plugins I would like to have pre-configured for some map first?
How about registering commnds? They should be registered before any map specyfic config is executed - so for the particular plugin they should be registered in plugin_cfg (at the top of it) instead plugin_init (I believe plugin_cfg() is called before plugin_init()? Otherwise I cannot to call any command which is not registered yet from plugin_cfg().
Any suggestions?

XxAvalanchexX 02-23-2007 18:41

Re: Map specyfic configs loading
 
http://forums.alliedmods.net/showthread.php?t=43012 - as of 1.76
http://forums.alliedmods.net/showthread.php?t=43830 - not yet released

KWo 02-24-2007 03:18

Re: Map specyfic configs loading
 
Thanks. :)
The stuff with Per-Map Plugin Files and Disabling Plugins solved the problem. I had to miss that new feature (again).
There is one thing - if these plugins they nomally autoload some module, they do it even if they are disabled which looks as a bug (for example it still loads for me CSDM module even if there is no plugin for it running). Is this expected behavior of work of modules and disabled plugins autoloading such modules or not?

XxAvalanchexX 02-24-2007 12:35

Re: Map specyfic configs loading
 
I don't know what is expected of it. Perhaps you should submit a bug report. Worst case scenario, it is intended, and the report gets closed.


All times are GMT -4. The time now is 16:55.

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