GLMVS - The Successor of ZSMVS

http://files.1337upload.net/glmvs2.png

Official Site: http://ptown2.com/glmvs (NOT DONE)
GitHub: https://github.com/ptown2/GLMVS
Trello: https://trello.com/b/RbC0aRSV/glmvs

Basic Info:
GLMVS is a Globalized Map Voting System that supports multliple gamemodes at once and acts (SOON TO BE) as a Fretta Framework Extension (for non-fretta gamemodes). Modular coded to ensure easy modding/enhancements for future purposes. Re-coded from scratch and doesn’t use anything else as a base other than itself. Can support many gamemodes at once with hooks or without hooks. Been in development for more than 6 months (due to procrastination and other irl related issues).

Features:
• Easy to maintain, manage and install the maps/library.
• Sleek Design that supports the garry’s map icons and can be modifyable!
• Supports (now) a plethora of gamemodes!
• Heavily working RTV system. No more bad maps!
and IT’S FREE! (plus more features to come soon!)

Supported Gamemodes:
• Awesome-Strike: Source
• DarkRP (RTV Only)
• Deathrun (Shadow/Mr. Gash Version)
• Extreme Football Throwdown
• Gun Gaym (Untested)
• Morbus (Untested)
• Pirate Ship Wars (Untested, Gamemode has issues with something)
• Sandbox (RTV Only)
• Stop it, Slender!
• Super Mayhem/Mario Boxes (Untested)
• Ultimate Chimera Hunt (Untested, should work since its like the EFT except a butchered fretta.)
• The Stalker
• Trouble in Terrorist Town
• Zombie Escape
• Zombie Survival

Change Log:
Stable Version 1.0.3 Release:

  • Added GLMVS Support to the following gamemodes: DarkRP, Sandbox, GunGaym, Deathrun (Shadow/Mr. Gash’s Version), Extreme Football Throwdown, Ultimate Chimera Hunt, Morbus, Stop it, Slender, Pirate Ship Wars and Super Mayhem/Mario Boxes.
  • Added GAME:CanPlayerRTV( pl ) and GAME:OnRTVSuccess(), these two Gamemode Setting Functions will be useful to end the game’s round and set the round limit and so to 0 when a RTV happens.
  • Added Usergroup Votepower Multiplier Editor, you can edit to give X amount of multiplier for their votemap for each usergroup. 2 means twice the votepower, 1.25 means 25% more.
  • Made GLMVS.AddToLibrary have the 2nd argument become the player requirement while 3rd argument is the map attribution. For fallback versions, 2nd argument can still be map attribution but the 3rd will not work. GLMVS.AddMap will overwrite the GLMVS.AddToLibrary player requirement.
  • Player Requirement scales down depending on how many locked maps are there without player requirement. This is to prevent any mapvoting problem with not enough players for the maps.
  • Recoded GLMVS in a standpoint that performance and/or modifying it isn’t an issue anymore. (Maybe…)
  • Created a new derma element (DMapButton), its simply the DImageButton except it has hovering and other delta changes to it. (aka. DButton base but with changes.)
  • Renamed most variables and functions accordingly by UPPER.CamelCase or similar to it. (Such as GLMVS.Maplist to GLMVS.MapList)
  • Removed most cl_init in modules and in the base, most derma and panels are loaded as a derma-pack. (I’m explaining this very soon to make your own layout pack for a specific gamemode or default one.)
  • Fixed an issue with the map lock threshold being reached one map later, thus having a 100% requirement would break itself.
  • Fixed an issue with the votemap having un-synced maplist data due map lock or map removal issues.
  • Fixed an issue with the lock icon being a constant materializing variable. (aka. new material every frame stacking over and over again.)
  • Fixed an issue that if the vote threshold is too big while having “non-existent” maps would lock the map clearing system for eternity. (No “recent” map clearing.)

Screenshot:

http://cloud-2.steampowered.com/ugc/594757598873906354/5D8A6556A66501FFFED26BCA13F76CB371DB653F/

Credits:

  • ptown2 (Main Developer / Project Lead of GLMVS)
  • MacDGuy (Sub-Developer / draw Module)
  • Aspen (Logo for GLMVS)
    and everyone else who made the gamemodes.

FAQ:
Q: How do I install GLMVS?
A: Simply place this add-on on your root folder of garrysmod/addons, make sure the server is a dedicated one. Listen Servers WILL SOMEWHAT work properly. (Actually, they do work properly, just that the http library will act wonky.)

Q: What is there’s a GLMVS update?!
A: Do a fresh install like any other gamemode update like DarkRP or PointShop. You remove all of the old files then place new ones. You can keep the “glmvsdata” (Located in: garrysmod/data/glmvsdata) and both addmaps.lua and maplibrary.lua files the same until further notice.

Q: Ok, have it installed. Now, how do I add the maps?
A: Simply edit the addmaps.lua file, follow the format to add maps. Make sure everything is correct. Don’t go cry over me if you set it wrong.

Q: What about the Map Library?
A: Same goes to the previous question, but this time edit the maplibrary.lua file, and AGAIN follow the format to add them. If you do the same mistake then you should learn how to properly case the functions.

Q: What about this, what about that, what about…
A: Read the README.md in the GitHub page, I think every information you need is over there. Pretty much this FAQ becomes nullified at the moment.

Q: OMG THIS IS TOO HARD, I DON’T LIKE IT!!!
A: Then don’t use it, I did this for free and I am giving this away for free. Be grateful I’m not selling this or let alone scamming people for it.

Donations:
“UR DA BEST I WANT TO GIVE YOU SOMETHING” - Unknown, 2013

Well if you feel want to give me something you can donate some beer money. (ps. I don’t actually drink.)
I will consider any donation you give me, big or small. This will help me keep the motivation to support GLMVS. (and some uni fees, wink wink)

[https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=MQ495EBFXKD5Y&lc=US&item_name=GLMVS Donations&item_number=GLMVSDonation&cy_code=USD&bn=PP-DonationsBF%3abtn_donateCC_LG.gif%3aNonHosted)

This is what I’ve been waiting for!
I have one problem though, the mapvote goes by too quickly in Trouble in Terrorist Town, is there any way to change this?

Simply edit in glmvs/lua/gamemodes/gm_ttt.lua, where it says GetEndTime replace this[lua]return GetConVar(“ttt_preptime_seconds”):GetInt() || 0[/lua]to this[lua]return ( GetConVar(“ttt_preptime_seconds”):GetInt() || 0 ) + 15[/lua]This will add 15 more seconds for people to vote.

I love you, ptown. UR DA BEST!

Thanks, worked perfectly!

I saw that you said possible soon to be ported Ultimate Chimera Hunt, at the end of the round how would i go about making this pop up?

Ive been trying to see if i could figure it out and ive came up with nothing so far.

UCH relies on ending the round once a player is killed (so it happens if chimera eats all pigmasks or they turn off the chimera), adding a hook.Call over there will do the trick, just need to point that out to everyone who wants to use GLMVS with it.

Also UCH is kinda using Fretta Map changing in the gamemode (most likely installed, but not working perhaps? It its that the reason then I can make GLMVS support it.)

good jerb boy

So, is it a possible that your porting UCH for GLMVS in the future or are you definitely going to port it for GLMVS?

I’ll definitely port UCH, if the Fretta Votemap actually works then I’ll just make it that it doesn’t load/run when GLMVS is installed/in play.

How would one get this to work for Deathrun?
Change the map fetch stuff to “dr”?

It doesn’t actually fetch them, you have to manually add them. What it just does is that you can list a plethora of maps then it ACTUALLY adds the ones based upon the gamemode. (So you can use the same list on every server -if its a community or something- without any issue.)

If you want to make your own setting, read this:
https://raw.github.com/ptown2/GLMVS/master/lua/gamemodes/README_LAYOUT.txt

Also, can I know which version of DR are you using? If its private then that’s fine, but if its a publicly released one link it to me so I can do a setting for you.

I might use this for the gamemode my friend and I are converting to work with gmod 13, anyways nice job on it. The GUI looks amazing.

Thanks for replying.

It is the latest version of DR.

How can i start a vote?

The votes automatically start upon time to change map. If you’re talking about RTV then that’s something I’m going to do soon.

The next update will have a ton of new features (RTV, Map Counting, etc.) and a small bug/annoyances fix soon.

Okay Thank you! :smiley:

In lua/modules/glmvs/sv_load.lua, change this (Starting on line 11):


-- Add the images to resource adding.
hook.Add( "Initialize", "GLMVS_AddResourceMapIMG", function()
	for _, info in pairs( Maplist ) do
		if file.Exists( "maps/" ..info.Map.. ".png", "MOD" ) then
			resource.AddFile( "maps/" ..info.Map.. ".png" )
		end
	end
end )

To this:


-- Add the images to resource adding.
hook.Add( "GLMVS_AddResourceMapIMG", "GLMVS_AddResourceMapIMG", function()
	for _, info in pairs( Maplist ) do
		if file.Exists( "maps/" ..info.Map.. ".png", "MOD" ) then
			resource.AddFile( "maps/" ..info.Map.. ".png" )
		end
	end
end )

And in lua/autorun/autorun.lua, change this (Starting on line 67):


	if SERVER then
		include( "maplibrary.lua" )
		include( "addmaps.lua" )
		include( "init.lua" )

		/* ----------------------------------------
			GDebug functions to run
		---------------------------------------- */
		GDebug.PrintResults()
		GDebug.CheckForUpdates()
		GDebug.OptToListing()
	end

To this:


	if SERVER then
		include( "maplibrary.lua" )
		include( "addmaps.lua" )
		include( "init.lua" )
		hook.Call( "GLMVS_AddResourceMapIMG" )

		/* ----------------------------------------
			GDebug functions to run
		---------------------------------------- */
		GDebug.PrintResults()
		GDebug.CheckForUpdates()
		GDebug.OptToListing()
	end

That way you call the hook to add map images AFTER the maps have actually been added to the table.

Done, thanks for the report. Might as well do it on the other hooks too (if necessary).

Will upload this soon enough.

As soon as its ready for Deathrun, you will have my full support… Not that it matters, lol.