AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Map configs with prefix support 1.3 (https://forums.alliedmods.net/showthread.php?t=69506)

berni 04-05-2008 17:37

Map configs with prefix support 1.3
 
1 Attachment(s)
https://www.bcserv.eu/images/sourcemod/mapconfigs.png with prefix support


Plugin on Github: https://github.com/bcserv/mapconfigs - Forks & Pull requests are welcome

Allows you to have per map config files. Support for map prefix configs (example: dm_.cfg)
This is a complete rewrite of a map configs plugin I found somewhere.

You can have prefix configs that allow you to easily execute cvars/commands for a group of maps, without having to create a cfg file for each of them.
The executing order is alphabetical, that means configs that have the shortest name will be executed first.

Example:

Your maps name is js_build_puzzle_nine_v10

Your config files are js_build_puzzle_nine_v10.cfg, js_build_.cfg and js_.cfg

The executing order will be:
  1. js_.cfg
  2. js_build_.cfg
  3. js_build_puzzle_nine_v10.cfg
Config structure

cfg/sourcemod/map-cfg/

ConVars

none

Todo

-


Changelog


06-05-2015 Version 1.3
  • Fixed handle leak

26-10-2014 Version 1.2
  • Added support for workshop maps (CS:GO), thanks to tabakhase

23-8-2009 Version 1.1.1
  • Fixed configs getting executed twice OnPluginStart

23-8-2009 Version 1.1
  • Added version Convar mc_version
  • Code cleanup
7-5-2008 Version 1.02
  • The plugin is now using OnAutoConfigsBuffered() instead of OnConfigsExecuted() for more reliable cvar changing.
7-5-2008 Version 1.01
  • Fixed wrong folder structor in attached rar file.
5-4-2008 Version 1.0
  • Initial release
Tested games
  • CS: GO
  • Half Life 2: Deathmatch
  • Counter Strike: Source
  • Team Fortress 2
  • Day of Defeat: Source
  • Should work with any games

Contributors

r3dh3adkid 05-06-2008 22:00

Re: Map configs with prefix support
 
Either your post is incorrect or the code is because your code draws the configs from cfg/sourcemod/map-cfg not cfg/map-cfg

other than that, the plugin has worked so far without a hitch!

bl4nk 05-06-2008 22:21

Re: Map configs with prefix support
 
How is that any different from this plugin?

DontWannaName 05-07-2008 00:14

Re: Map configs with prefix support
 
It works with all mods. :P

bl4nk 05-07-2008 02:10

Re: Map configs with prefix support
 
I use the plugin I linked on CSS, DOD:S, and TF2 just fine.

DontWannaName 05-07-2008 02:40

Re: Map configs with prefix support
 
Well than the difference is this one was released in April for any mod and the other was made in January for CSS it said. :D

berni 05-07-2008 03:59

Re: Map configs with prefix support
 
Quote:

Originally Posted by r3dh3adkid (Post 622502)
Either your post is incorrect or the code is because your code draws the configs from cfg/sourcemod/map-cfg not cfg/map-cfg

other than that, the plugin has worked so far without a hitch!

Thanks for reporting this :) I corrected this.

Well there are some things that are different.
  • My code isn't so bloated like in the other plugin
  • My plugin allows multiple prefix configs for one map, the config executing order is alphabetical, that means configs with shorter file name are getting executed first.
  • My plugin doesn't read every line from the config and executes in the console, it's using the exec command.
  • My plugin isn't limited to CS:S only ;)
  • you don't need to have a _ in the mapname to use prefix configs, it works with anything.

Caught off Guard 05-07-2008 04:03

Re: Map configs with prefix support
 
Quote:

Originally Posted by berni (Post 622582)
Thanks for reporting this :) I corrected this.

Well there are some things that are different.
  • My code isn't so bloated like in the other plugin
  • My plugin allows multiple prefix configs for one map, the config executing order is alphabetical, that means configs with shorter file name are getting executed first.
  • My plugin doesn't read every line from the config and executes in the console, it's using the exec command.
  • My plugin isn't limited to CS:S only ;)

thanks for the summary i will take a look at it later. even though the other plugin says CS:S only, it works fine in insurgency. however if the code is more efficient it would be worth a look see. will come back with any problems I find!

cheers

Caught off Guard 05-10-2008 02:13

Re: Map configs with prefix support
 
appears to work fine in insurgency. thanks. :up:

BAILOPAN 05-20-2008 22:16

Re: Map configs with prefix support
 
Your plugin has a race condition. OnConfigsExecuted() guarantees that all configs have finished executing. But you're issuing an "exec" command inside OnConfigsExecuted(), and the changes won't necessarily be mirrored in plugins which rely on this guarantee (such as reservedslots).

I've added a forward to the 1.1 branch to help mitigate this problem, you can read about it here. This change will make it into 1.0.2 or so. I won't unapprove this plugin until a stable release has the new feature and this plugin has had time to update after that.

Note: "fixing" by using OnMapStart() is not a good idea since it occurs before sourcemod.cfg gets executed.

berni 05-23-2008 19:59

Re: Map configs with prefix support
 
Thanks for adding this forward.

Plugin updated

7-5-2008 Version 1.02
  • The plugin is now using OnAutoConfigsBuffered() instead of OnConfigsExecuted() for more reliable cvar changing.
Sourcemod Revision 2162 or higher needed !

Caught off Guard 05-28-2008 10:06

Re: Map configs with prefix support
 
hi

ive been using 1.01 on my insurgency server and it works fine. however I have put 1.02 on recently and it has stopped working. I am using sm v1.0.1.2166 which should be fine. I reinstalled v1.01 on and it works fine. Unfortuantely there is nothing in the log file that would indicate Any ideas why? if you could look into this, it would be appreciated!

dann 06-21-2008 08:05

Re: Map configs with prefix support
 
i just updated to sourcemod 1.0.3.2265 and updated to your 1.2 plugin. it seems to work on changing server varibles(mp_timelimit etc), but doesn't seem to be changing the sourcemod varibles any longer. I turn off my afk manager and reserved slots on certain maps, but the stay active now. it seems like map configs are being executed before the sourcemod configs or something(im just guessing).

thanks and hopefully you can get this updated soon.

edit: I tried the 1.01 version had the same issue. they both seem to work on server start-up, but once there is a map change the sourcemod varibles aren't getting changed.

FlyingMongoose 06-21-2008 08:44

Re: Map configs with prefix support
 
Is this plugin still maintained? If not here's an alternative for single file configs
http://forums.alliedmods.net/showthread.php?p=623728

berni 06-22-2008 14:37

Re: Map configs with prefix support
 
Uhm, I think you have to ask BAILOPAN then, he was the one who asked to change OnConfigsExecuted() to OnAutoConfigsBuffered(), but the 1.01 version of my plugin is still uploaded, so you can use this one ;)

dann 06-22-2008 18:14

Re: Map configs with prefix support
 
its already being addresses, hopefully they can get it fixed soon. http://bugs.alliedmods.net/index.php...1776&project=5

berni 06-27-2008 16:31

Re: Map configs with prefix support
 
The problem has been fixed with Sourcemod 1.03.
Map configs 1.02 is now safe to use.

Read here: http://wiki.alliedmods.net/SourceMod..._Release_Notes

mycologist 03-13-2009 13:45

Re: Map configs with prefix support
 
This is a great plugin! I have one issue though. I'm trying to spawn bots on some maps by using the specific map cfg files, and not on others, by leaving the cfg blank. It seems that even if I only put the bot cvars in one cfg, every map loads bots. Any ideas? Can I acomplish this another way?

Counter-Strike: Source
SM 1.1.2
MM 1.7.1

berni 03-13-2009 14:57

Re: Map configs with prefix support
 
How are your config files named ? And what's the content.

Felycity 03-25-2009 20:47

Re: Map configs with prefix support
 
thank you for this great plugin!
im using this plugin for left 4 dead, it seems working well. :up:
nice job!

Felycity 03-26-2009 03:43

Re: Map configs with prefix support
 
i found problem on left 4 dead. :cry:
after all player left from server, server will be "hibernating".
at that time, all cfg settings reset.
map config won't loaded until next map coming...

can u fix this problem?
if so, im happy. :oops:

p.s.
im sorry for my poor English, im just a Japanese... :oops:

berni 03-26-2009 21:31

Re: Map configs with prefix support
 
Hibernating ? hm why does it reset the settings ?
I don't think that I can do something about that, as it's not a bug in this plugin.
you are welcome, I like japanese :wink:

Felycity 03-26-2009 21:49

Re: Map configs with prefix support
 
i don't know why server reset the setting... :cry:
i found someone ask same question at other thread.
http://forums.alliedmods.net/showthr...945#post760945
i think this is problem only for Left 4 Dead.
then, ill wait until valve do something about this problem. :P

thanks!

Apex_ 04-22-2009 18:36

Re: Map configs with prefix support
 
I dunno if it's something I'm doing wrong or what, but I can't get the plugin to run configs after issuing a changelevel command. I'm using it for L4D, and have specific changes for coop, survival and versus with configs set up like so:

l4d_.cfg
l4d_sv_.cfg
l4d_vs_.cfg

If I reboot the server, it picks up the config order fine (loads co-op as a base then versus afterwards and echos to console as a check). If I boot the server, then run a changelevel to another map, it doesn't run any of the configs at all.

Is it just me being a tard or what?

berni 08-23-2009 14:39

Re: Map configs with prefix support
 
Plugin updated

23-8-2009 Version 1.1
  • Added version Convar mc_version
  • Code cleanup

zeroibis 08-23-2009 15:07

Re: Map configs with prefix support
 
I am assuming that this works like the es version except this one actually works... :wink:

berni 08-23-2009 17:33

Re: Map configs with prefix support
 
Plugin updated

23-8-2009 Version 1.1.1

  • Fixed configs getting executed twice OnPluginStart

Atreus 08-26-2009 07:50

Re: Map configs with prefix support
 
With KOTH being official now in TF2, and there not being a built in KOTH config file like for arena, this should prove useful.

alpetras 02-19-2010 10:19

Re: Map configs with prefix support
 
when are the cfg files executed? before loading the map or after?

i think ill first present u with my situation
the server runs mostly DM maps but sometimes we like to play some ctf too.
to load a ctf map, the server must have mp_teamplay 1 on it so we have to change teamplay from 0 to 1 manually.
sooo, i installed your plugin on the server and made a ctf_.cfg with mp_teamplay 1 in it. i thought it should work ok but actually it doesnt. the server crashes on map change, meaning that mp_teamplay was unchanged.

is it that the cfgs are executed when maps are loaded or am i missing something?

berni 02-19-2010 17:48

Re: Map configs with prefix support
 
Afaik in hl2dm mp_teamplay must be set when the server start, at the command line. I don't think you can set that when the server runs.
the configs are executed when server.cfg and all others configs gets executed too, I think it's before the map is loaded.
but the configs are executed on every mapchange.

alpetras 02-20-2010 02:19

Re: Map configs with prefix support
 
Quote:

Originally Posted by berni (Post 1093893)
Afaik in hl2dm mp_teamplay must be set when the server start, at the command line. I don't think you can set that when the server runs.

mp_teamplay can be changed while the server is running. you can change the mp_teamplay to 1 via rcon and after mapchange you will have a Team Deathmatch.

aakerlind 03-10-2010 11:05

Re: Map configs with prefix support
 
just want to thank you for this great plugin!

Freakgood 05-29-2010 04:02

Re: Map configs with prefix support
 
Hi .. i got a problem ... the plugin works but 2 late .. if i change it 2 a coop map where it should be mp_teamplay 1 on its not acctivating untill the map change 2 a new map .. i made a cfg calld dm_.cfg for death match maps .. where the mp_teamplay is 0 cuz well its a death match map and then i made a cfg calld coop_.cfg where the mp_teamplay 1 but still mp only starts after i switch the map ... then it gets all messt up like teamplay is on a dm map and like coop is death match setting ...... Please ... help me out and fast .. i realy want this 2 work .....

Shona 02-11-2011 10:59

Re: Map configs with prefix support
 
hm it do not work for me under CS:S

i have 3 configs bhop_.cfg he_.cgf and glass_crusher.cfg
the only cfg which will load is the glass_crusher.cfg all other are not load :(

can you help me?

berni 02-11-2011 14:04

Re: Map configs with prefix support
 
he_.cgf -> he.cfg

What are the names of the maps the configs should execute for ?

GAVVVR 03-27-2011 20:40

Re: Map configs with prefix support
 
Nice plugin. Works on hl2dm well.

rautamiekka 03-28-2011 02:20

Re: Map configs with prefix support
 
By comparing the sourcecode of this and Extended Map Configs, this is much more simply coded (in other words, expects the game itself to support the stuff). Is that all the intended difference ?

berni 03-28-2011 02:59

Re: Map configs with prefix support
 
What do you mean ? It should work with any game, it's not much code but still is powerful.

rautamiekka 03-29-2011 05:52

Re: Map configs with prefix support
 
Quote:

Originally Posted by berni (Post 1440525)
What do you mean ? It should work with any game, it's not much code but still is powerful.

Did you make this before the mentioned Plugin ? If the Plugin ID is to be believed, which I didn't look at earlier, you made this before he did.

berni 03-29-2011 06:40

Re: Map configs with prefix support
 
I don't see how this should be relevant, and I don't really know or care.


All times are GMT -4. The time now is 11:25.

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