Mapconfig Extended
Posted: Mon Nov 22, 2021 11:28 am
Description
Modification of default mapconfig.sma, so it loads also general prefix map config. For example it executes _de_.cfg and later de_dust.cfg custom maps configs.
Plugin is compatible with old configs to that's why it is extension.
NOTICE: current AMX Mod X versions allready execute custom map configs (cause it is written within Admin.sma plugin that control admin access) but it does not executes general prefix map configs. So if you use this plugin your custom map config will be executed twice.
Installation
- Download compiled version or download .sma and compile for yourself
- Replace old amxmodx/plugins/mapconfig.amxx with new one
- Create in amxmodx/configs/maps/ files like _de_.cfg _cs_.cfg _aim_.cfg _fy_.cfg and so on, fill them with desired commands.
- Edit amxmodx/configs/mapconfig.ini to edit prefixes
- Change map to load new plugin
- Enyoy
Extended info
For example you have fy_ maps, and on all of them you want some specific settings, but on one of them you want to alter it . So instead of making 20 files for each map (where 19 will be the same) to have the one specific changed, you can make two files - general config, and the config for specific map.
How to use general config:
In addons/amxmodx/configs/maps/ make config named like _prefix.cfg for example:
_de_.cfg (for all de_ maps)
_aim_.cfg (it will be executed for all aim_ maps)
_fy_.cfg ( for fy_ maps)
and so on , you can use any prefix that you got maps with like csde_ aswell, or if you got a set of maps with de_rats prefix, then you can add de_rats_ as prefis and then edit _de_rats_.cfg file
I suggest not to use more than 5 prefixes per map (in example if you got map named de_dust_blow2.cfg and you got the following prefixes
de_
de_dust
de_dust_blow
then all of them will be executerd if the config files exist, respectively
_de_.cfg
_de_dust.cfg
_de_dust_blow.cf
Notice - you shoud not add prefix like cs (without underscore - otherwise it can be executed on cs_ maps and csde_ maps and other without the prefix , lik cstest or if you use de prefix without undersore it can be executed on deagle map -and it may be not the thing you want
Example
I got some quite a lot of de_ maps, most of them are on the same config, but some are small and i want to decrease round time,
_de_.cfg
mp_roundtime 2
mp_c4time 45
de_spree.cfg - using builtin system, by the admin.sma that is in default AMX Mod X standard
mp_roundtime 1.75
mp_c4time 30
Other general config examples
_cs_.cfg
mp_roundtime 3
_aim_.cfg
mp_freezetime 0
mp_timelimit 30
amx_spawnprotect 2
_fy_.cfg
mp_freezetime 0
mp_timelimit 30
sv_gravity 600
Notice
Once i modded default plugin for AMX Mod, after some changes and fixes by Kr@tal it is in the recent AMX Mod releases.
I just forgot to port it to AMX Mod X cause i thought it was allready done
Changelog
* 1.0.3 - added cvar amx_mce_cfg that defines the file containing prefixess (default mapconfig.ini)
- added cvar amx_mce_dir that defines the directory cintaining the configg files with prefixes by default 'maps' that is
later finned to addons/amxmodx/configs/maps. Do not add any beginning or ending slashes.
- changed the configs naming to load fies with _prefix.cfg where prefix is changed to the found text, like de_ cs_ etc
so now for de_ prefix it loads _de_.cfg file
- prefixes occurence in mapconfig.ini is important.
- i suggest not to use more than 5 prefixes per map (in example if you got map named de_dust_blow2.cfg and you got the following prefixes
de_
de_dust
de_dust_blow
then all of them will be executerd if the config files exist, respectively
_de_.cfg
_de_dust.cfg
_de_dust_blow.cf
- optimizations suggested by Zenith77 and Xanimos
- on map load i suggest looking at server status window via rcon to find any errors and warnings
* 1.0.2 - Complete change, it loads prefixes form file named addons/amxmodx/configs/mapconfig.ini and loads only prefix files
* the custom map configs are not executed cause the amdin.sma allready do it.
* 1.0.1 - Modified to support general map prefix configs like de_ aim_ fy_ - you must have de_.cfg aim_.cfg fy_.cfg
* files in addons/amxmodx/configs/maps/ (modification by _KaszpiR_)
* 1.0.0 - Ported to AMX MOD X (without translations)
* 0.9.9 - Added translations support for AMX Mod 0.9.9
* 0.61 - Changes load delay to 6s (to work better with SQL ServerCfg)
* 0.6 - Execs configs rather than loading file
* - Delays execution for 5s after map changes
* 0.5 - Initial release
plugin
source
Modification of default mapconfig.sma, so it loads also general prefix map config. For example it executes _de_.cfg and later de_dust.cfg custom maps configs.
Plugin is compatible with old configs to that's why it is extension.
NOTICE: current AMX Mod X versions allready execute custom map configs (cause it is written within Admin.sma plugin that control admin access) but it does not executes general prefix map configs. So if you use this plugin your custom map config will be executed twice.
Installation
- Download compiled version or download .sma and compile for yourself
- Replace old amxmodx/plugins/mapconfig.amxx with new one
- Create in amxmodx/configs/maps/ files like _de_.cfg _cs_.cfg _aim_.cfg _fy_.cfg and so on, fill them with desired commands.
- Edit amxmodx/configs/mapconfig.ini to edit prefixes
- Change map to load new plugin
- Enyoy
Extended info
For example you have fy_ maps, and on all of them you want some specific settings, but on one of them you want to alter it . So instead of making 20 files for each map (where 19 will be the same) to have the one specific changed, you can make two files - general config, and the config for specific map.
How to use general config:
In addons/amxmodx/configs/maps/ make config named like _prefix.cfg for example:
_de_.cfg (for all de_ maps)
_aim_.cfg (it will be executed for all aim_ maps)
_fy_.cfg ( for fy_ maps)
and so on , you can use any prefix that you got maps with like csde_ aswell, or if you got a set of maps with de_rats prefix, then you can add de_rats_ as prefis and then edit _de_rats_.cfg file
I suggest not to use more than 5 prefixes per map (in example if you got map named de_dust_blow2.cfg and you got the following prefixes
de_
de_dust
de_dust_blow
then all of them will be executerd if the config files exist, respectively
_de_.cfg
_de_dust.cfg
_de_dust_blow.cf
Notice - you shoud not add prefix like cs (without underscore - otherwise it can be executed on cs_ maps and csde_ maps and other without the prefix , lik cstest or if you use de prefix without undersore it can be executed on deagle map -and it may be not the thing you want
Example
I got some quite a lot of de_ maps, most of them are on the same config, but some are small and i want to decrease round time,
_de_.cfg
mp_roundtime 2
mp_c4time 45
de_spree.cfg - using builtin system, by the admin.sma that is in default AMX Mod X standard
mp_roundtime 1.75
mp_c4time 30
Other general config examples
_cs_.cfg
mp_roundtime 3
_aim_.cfg
mp_freezetime 0
mp_timelimit 30
amx_spawnprotect 2
_fy_.cfg
mp_freezetime 0
mp_timelimit 30
sv_gravity 600
Notice
Once i modded default plugin for AMX Mod, after some changes and fixes by Kr@tal it is in the recent AMX Mod releases.
I just forgot to port it to AMX Mod X cause i thought it was allready done
Changelog
* 1.0.3 - added cvar amx_mce_cfg that defines the file containing prefixess (default mapconfig.ini)
- added cvar amx_mce_dir that defines the directory cintaining the configg files with prefixes by default 'maps' that is
later finned to addons/amxmodx/configs/maps. Do not add any beginning or ending slashes.
- changed the configs naming to load fies with _prefix.cfg where prefix is changed to the found text, like de_ cs_ etc
so now for de_ prefix it loads _de_.cfg file
- prefixes occurence in mapconfig.ini is important.
- i suggest not to use more than 5 prefixes per map (in example if you got map named de_dust_blow2.cfg and you got the following prefixes
de_
de_dust
de_dust_blow
then all of them will be executerd if the config files exist, respectively
_de_.cfg
_de_dust.cfg
_de_dust_blow.cf
- optimizations suggested by Zenith77 and Xanimos
- on map load i suggest looking at server status window via rcon to find any errors and warnings
* 1.0.2 - Complete change, it loads prefixes form file named addons/amxmodx/configs/mapconfig.ini and loads only prefix files
* the custom map configs are not executed cause the amdin.sma allready do it.
* 1.0.1 - Modified to support general map prefix configs like de_ aim_ fy_ - you must have de_.cfg aim_.cfg fy_.cfg
* files in addons/amxmodx/configs/maps/ (modification by _KaszpiR_)
* 1.0.0 - Ported to AMX MOD X (without translations)
* 0.9.9 - Added translations support for AMX Mod 0.9.9
* 0.61 - Changes load delay to 6s (to work better with SQL ServerCfg)
* 0.6 - Execs configs rather than loading file
* - Delays execution for 5s after map changes
* 0.5 - Initial release
plugin
source