View Single Post
axelnieves2012
Senior Member
Join Date: Oct 2014
Location: Argentina
Old 01-24-2019 , 21:30   Re: [L4D & L4D2] Game Mode Config Loader 1.7
Reply With Quote #135

Quote:
Originally Posted by dirka_dirka View Post
I took AtomicStrykers lead and expanded upon it to make the program more like the original (allowing difficulty configs).. its much simpler then exploding what is currently being used for the new game modes. it also allows for realism difficulty based configs (something the current version doesnt).

Code:
/*
 * Version Notes:
 * 1.7: Changed to more generic system based upon gamemode and difficulty settings.
 *        Idea from AtomicStrykers even more basic code (combared to v1.6).
 *
 * Current valid filenames (for reference only):
 *        GameMode - coop, realism, survival, scavenge, teamscavenge, versus, teamversus, 
 *                    mutation3 (Bleed Out), mutation9 (VIP Gnome), mutation12 (Realism Versus), mutation13 (Linear Scavenge)
 *                    + eventually mutationX (1,2,3...)
 *        Difficulty - Easy, Normal, Hard, Impossible
 *
 *        Combined examples (with String:Temp3 and String:Temp2): coop.cfg, mutation12.cfg, realism_Impossible.cfg
 *
 *    If you don't have the file, it wont change anything.
 *    Difficulty based filenames are not required, but are checked for first (they override generic configs).
 *    eg: coop.cfg would run for all coop games, while coop_Easy.cfg would only run for coop games on Easy.
 *    eg: a versus game with no versus.cfg would use whatever settings are currently active on the server.
 */
the only possible variables are:
Code:
// path that exec command looks for:
// REQUIRES the double \\ to output a single \
new String:Temp1[] = "cfg\\";

// file extension for config files:
new String:Temp2[] = ".cfg";

// seperator for difficulty filenames (eg: coop_Impossible):
new String:Temp3[] = "_";
In conclusion, use:
coop.cfg
or
coop_Easy.cfg, coop_Normal.cfg, coop_Hard.cfg, coop_Impossible.cfg
or any combination of the above, and also you can replace coop with any gamemode (that supports difficulties).
Thanks you so much. It solved my problem
axelnieves2012 is offline