Thanks to Silencer for the original plugin design and work, and thanks to those who contributed up to version 17.31.4.
I decided to release my Sven Co-op 5.0 server configuration hoping that support for Experience mod will continue to exist from the developers of Sven Co-op, since it is a popular mod right now.
Here is my version of Sven Co-op Experience Mod, based on "scxpm_wrd" version 17.31.4. It is designed to hopefully stop some of the malfunction it causes in some maps or with code processing times. This version is currently "17.31.28". I am going to start working on adding on to the code, and I don't know if any newer version is going to be better or worse so I am releasing this now while I think it is still good.
I know this needs a lot of work and could be much more efficient, but I want to offer something now while I can. Future updates to this code and more information about it can be found at
http://www.bitbucket.org/modriot/scxpm The version I am uploading here is only different because I put all the code into 1 file instead of including the code in several files for easier reading and organization. There is no difference between these two separate plugin organization schemes. For ease of use I just included it all in one file to upload here.
I will give a detailed list of cvars and skill functions in an edit of this post or in a future post. There is so much changed to this version that it will be very hard to explain without actually giving an in-depth explanation of why I changed everything the way I did. Sven Co-op 5.0 server hosting with AMXX is a very interesting situation. I felt it was absolutely necessary to make the changes to the code at least as a temporary work-around to stop some problems that were happening with the older versions. I hope someone enjoys this
It has been a lot of fun working on the code and hosting populated Sven Co-op 5.0 servers running AMXX.
Included in the repository are map config files designed to help reduce the amount of processing with "maxhealth" and "maxarmor" variables set to the max level of HP / Armor (max = 645). In this version of Experience Mod, there is a cvar designed to disable every skill using per-map configuration. I designed this system to load 1 of 31 loops that runs every second, determined by the combination of 5 different cvars: "scxpm_hpregen", "scxpm_nano", "scxpm_ammo", "scxpm_teampower", "scxpm_block" (all the skills that run in the scxpm_regen function). All of the skills (except "Awareness") may be turned on or off by setting the cvar to "1" for on and "0" for off.
I added in a medal / xp trading system, and a "frag bonus" system for getting a certain amount of frags (win a medal or xp after a certain amount of frags). I also integrated the Monster XP plugin from SuperHeromod found here:
https://forums.alliedmods.net/showth...=75535?t=75535
I also added in a speed control feature designed to stop speed runners in Sven Co-op with a command or by injury with the "Damage" event. If the "Damage" event is being used, it will also stop regeneration skills from working for 5 seconds. (Credit to Jonnyboy0719 for the Event_Damage idea to pause the regeneration skills)
I believe I have nearly completed support for Counter-Strike 1.6 functionality with SCXPM, although there are surely better ways to handle the code than what I have set (such as using Ham Sandwich for many things). I would have tried to use Ham Sandwich more with Sven Co-op, but it has not been very stable for me to work with. This version does not work well with Counter-Strike bots yet.
Please let me know if I should include all the map configuration files I have customized in a zip file here, or if it isn't advised to do so. I don't mind sharing all the custom configuration work I have done and would really like to do so. Otherwise, it can be found in the repository linked above. I may or may not upload future versions to this site, so it is probably best just to go to the repository anyways.
A full list of cvars, which should be placed in amxx.cfg, and/or in per-map configs "amxmodx/configs/maps/mapname.cfg":
scxpm_save 2
scxpm_debug 0
scxpm_save_frequent 0
scxpm_gamename 0
scxpm_maxlevelup_enabled 1
scxpm_maxlevelup 10
scxpm_maxlevelup_limit 100
scxpm_xpgain 5
scxpm_minplaytime 60
// swampdog added cvars:
scxpm_health 1 // Health skill control
scxpm_armor 1 // Armor skill control
scxpm_hpregen 1 // Health Regeneration skill control
scxpm_nano 1 // Nano Armor skill control
scxpm_ammo 1 // Ammo Reincarnation skill control
scxpm_gravity 1 // Anti-Gravity device skill control
scxpm_teampower 1 // Team Power skill control
scxpm_block 1 // Block attack skill control
scxpm_fraglimit 500 // Frag limit for how many frags before being awarded a medal or XP
scxpm_bonus 100 // Bonus amount, based on calculation determined by "Rank" level
scxpm_counter 4 // The "counter" I installed to slow down low-level players from saving experience (floods mysql database otherwise) - Amount of times counted through loop before saving data (?) I might need to make a better explanation this feature later. ( I don't recommend changing this )
scxpm_savectrl 1 // Turns on the save control feature I installed to stop players with low levels from saving too often ( I don't recommend turning this off )
scxpm_speedctrl 0 // Turns speed control on or off, where a player will be slowed down when damaged
scxpm_speedamt 100 // Amount of speed reduced from "get_user_maxspeed" - in Sven Co-op this would be "set_user_maxspeed(id, 270-100)" in most cases.
MySQL database information should be included in "xp-sql.cfg" located in the configs directory "amxmodx/configs/xp-sql.cfg".
The only part of the code I would really, really like to take full credit for is the CVAR combination code. I am hoping this system can actually be applied to other mods as well using 5 separate cvars in combination to generate a separate outcome for each combination.
Use this plugin at your own risk
I take no responsibility for your use or misuse of this plugin. It is mostly here just for research purposes and to try to offer an alternative to the older versions of the Sven Co-op Experience Mod. I want to share my work because I believe it is somewhat beneficial for the design of Sven Co-op 5.0.