(DS) Start New Game Menu (Improved)

(DS) New “Start New Game” Panel /w More Customization - Version #002

Description:
This “addon” is a panel which replaces the default “Star New Game” panel to allow more customization. Can start both Single & Multi Player games.
A far bit of the code is sloppy, the reason for this is that I toss alot of the script together adding as much functionality as I can, once i reach a corner stone (point at which I’ve got alot of new stuff added & completed) I’ll re-write A far bit of the script to optimize performance.

Why:
My main reason for creating this addon is because I felt the original “Start New Game” menu wasn’t customizable enough without knowing lua. My main issue with the original was that I couldn’t organize my maps at all without creating a gamemode and setting “mappatterns”.

Features / Customization:
Map Categories Tab - Thumbnail list of maps in categories, Some maps may be in more than one category. [ul]
[li]ToDo[list][/li] [li]Add search bar[/li] [/ul]
[/list]

Map List Tab - Simple list of maps. [ul]
[li]ToDo[list][/li] [li]Add search bar[/li] [li]Add “Categories” column (for search primarily)[/li] [/ul]
[/list]

Settings Tab [ul]
[li]Basic Tab - Setting Files (garrysmod/maps_data/settings/basic/.txt)[/li] [li]Advanced Tab - Setting Files (garrysmod/maps_data/settings/advanced/.txt)[/li] [li]Addons Tab (WIP)[/li] [li]Gamemode Tab - Setting Files (garrysmod/maps_data/settings/gamemodes/<gamemode>/*.txt)[/li][/ul]

Map Information Tab (WIP) - Will display information about selected map, including information from ‘manifest’ files (when playing a map sp/hosting a ‘manifest’ will be created, these will be txt files so they can be shared with others) [ul]
[li]ToDo[list][/li] [li]This really hasn’t even been started on so, everything[/li] [/ul]
[/list]

Current Definition Files [ul]
[li]Map Category Files - []Probably not A complete list! Also loads mappatterns from <gamemodes>/info.txt [list][/li] [li]All - All maps can be found in this tab[/li] [li]Other - All maps without A category can be found in this tab[/li] [li]Counter-Strike Source - de_, cs_, es_[/li] [li]Day Of Defeat Source - dod_[/li] [li]Deathrun - deathrun[/li] [li]Garrys Mod - gm_[/li] [li]Half-Life 2 Deathmatch - dm_[/li] [li]Half-Life 2 Episode 1 - ep1_[/li] [li]Half-Life 2 Episode 2 - ep2_[/li] [li]Half-Life 2 - intro,d1_, d2_, d3_, credits[/li] [li]Half-Life Source - c#a# (had to do map by map because of bugged string match)[/li] [li]Half-Life Source Deathmatch - boot_camp, bounce, crossfire, datacore, frenzy, rapidcore, stalkyard, snarkpit, subtransit, undertow, lambda_bunker[/li] [li]Jailbreak - ba_[/li] [li]Left 4 Dead - c#m#* (had to do map by map because of bugged string match)[/li] [li]Left 4 Dead 2 - l4d[/li] [li]Mini Games - mg_[/li] [li]Portal - testchmb_[/li] [li]ReDead - rd_[/li] [li]Role Play - rp_, rpdm_[/li] [li]Space Build - sb_[/li] [li]Super Mario Boxes - nox2d_, smb_[/li] [li]Team Fortress 2 - cp_, ctf_, tc_, pl_, arena_, koth_[/li] [li]Winter Survival - ws_[/li] [li]Zombie Escape - ze_[/li] [li]Zombie Master - zm_[/li] [li]Zombie Panic Source - zps_, spo_, spl_, zpa_[/li] [li]Zombie Survival - zs_, zs-, zombiesurvival_, zm_, zh_[/li] [/ul]
[li]“Basic” Settings Files [ul][/li] [li]Server Settings - Region, Hostname, Tags, Maxplayers, Visible Maxplayers, Lan, Cheats, Gamemode[/li] [/ul]
[li]“Advanced” Settings Files [ul][/li] [li]World Settings - Gravity, Friction, Water Friction, Acceleration, Air Acceleration, Water Acceleration[/li] [/ul]
[li]“Addon” Settings Files [ul][/li] [/ul]
[li]“Gamemode” Settings Files [ul][/li] [li]Sandbox [list][/li] [li]General Settings - Godmode, PvP, Noclip, Starting Weapons[/li] [li]Max Settings - Default sbox_max Cvars[/li] [/ul]
[li]Trouble in Terrorist Town [ul][/li] [li]Credits - Various commands that have to do with gain/loss of credits[/li] [li]Haste - Various commands that have to do with haste mode[/li] [li]Karma - Various commands that have to do with karma gain/loss/penalty[/li] [li]Round - Various commands that have to do with rounds,roung length, ect …[/li] [/ul]
[/list]
[/list]

**Creating Definition Files: ** - GMOD WIKI - Patterns [ul]
[li]Map Category Definition - “garrysmod/map_data/<category text>.txt”[/li][quote]

Example’s of <category text> are [Half-Life 2,Half-Life Source,Counter-Strike Source]

<example format>
d1_;
d2_
;
d3_*;
<example format>

TIP: Uses my MAPCATEGORY format.
TIP: Just open one of the many other .txt files in that directory to learn the format.

[/quote]

[li]Settings Definition - “garrysmod/map_data/settings/[basic , advanced]/<category text>.txt”[/li][quote]

Example’s of <category text> are [Player Settings,World Settings,Multiplayer Settings]

TIP: Uses my SETTINGS format.
TIP: Just open one of the many other .txt files in that directory to learn the format.

[/quote]

[li]Gamemode Settings Definition - “garrysmod/map_data/settings/gamemode/<gamemode name>/<category text>.txt”[/li][quote]

Example’s of <gamemode name> are [Sandbox, Prop Hunt, Dogfight Arcade Assault]
Example’s of <category text> are [Player Settings,World Settings,Multiplayer Settings]

TIP: Uses my SETTINGS format.
TIP: Just open one of the Sandbox/*.txt files to learn the format.

[/quote]
[/ul]

Planned Future: [ul]
[li]Finishing the ‘Addon’ specific settings tab and ‘Map Information’ tab would be nice, and of course more [Map Category | Settings] files.[/li] [li]Right clicking a map brings up A menu. [list][/li] [li]Add to Favorites - Adds to “Favorites” category, category is always at the top, will also have a star icon rendered to the top right of the thumbnail.[/li] [li]Remove from Favorites - Removes from “Favorites” category, category is always at the top, will also have a star icon rendered to the top right of the thumbnail.[/li] [/ul]
[/list]

Screenshots:

http://img339.imageshack.us/img339/6298/sngmapsthumbnails001.png

http://img695.imageshack.us/img695/6058/sngmapsthumbnails002.png

http://img33.imageshack.us/img33/1148/sngmapslist001.png

http://img26.imageshack.us/img26/8528/sngsettingsadvanced001.png

http://img708.imageshack.us/img708/6130/sngsettingsbasic001.png

http://img263.imageshack.us/img263/6895/sngsettingsgamemode001.png

http://img830.imageshack.us/img830/4114/sngsearch001map.png

http://img191.imageshack.us/img191/5976/sngtoybox001.png

**Bugs: ** [ul]
[li] [/li][/ul]

**Update History & Changes: ** [ul]
[li] Planned Features[list][/li] [li] [/li] [/ul]
[li] Version 003 - Released [svn: https://ds-menu.googlecode.com/svn/trunk][ul][/li] [li] Added “Right Click Menu” for map thumbnails , Add to favorites , Remove from favorites[/li] [li] Added “Favorite Maps” system [list][/li] [li] Added “Favorites” category to top of “Map (Thumbnails)”[/li] [li] If a map is on your “Favorites” list it will have a gold star in the top right corner of it’s thumbnail[/li] [li] BUG: You have to add/remove something to/from your “Favorites” for it to display correctly[/li] [/ul]
[li] Fixed Bug “gamemode not being set correctly”[/li] [/list]
[li] Version 002 - Released[ul][/li] [li] Added “Toybox” tab[/li] [li] Switched all default “Map Category” definition files to new format (old format is still compatible, so use whichever you perfer)[/li] [li] Added “Gamemode Settings” definition for “Trouble In Terrorist Town”[/li] [li] Adjusted “Map Category” definition file “Super Mario Boxes” [list][/li] [li] Added smg_[/li] [/ul]
[li] Adjusted “Map Category” definition file “Zombie Survival” [ul][/li] [li] Added zm_
[/li] [li] Added zh_*[/li] [/ul]
[li] Fixed tooltip errors in console[/li] [li] Added experimental “Search Bar” for maps (Map Filter & Category Filter) [ul][/li] [li] May need to optimize map gathering scripts [/li][quote]

			Here are some test the numbers in [] are lowest to highest, This currently does not use a timer based sequence which would be better which is what i plan to do.
			Search: &lt;empty filter&gt; of 930 results took [1.328 , 1.331 , 1.334 , 1.339 , 1.369] seconds.
			Search: gm_ of 59 results took [0.084 , 0.084 , 0.084 , 0.101 , 0.117] seconds.
			Search: zs_ of 119 results took [0.196 , 0.197 , 0.198 , 0.214 , 0.232] seconds.
			
			When you perform a search you will see this in console.
			Search: &lt;text&gt; of # results took # seconds.

[/quote]

	[/ul]
[/list]
[li] Version 001 - **Initial Release**[/li][/list]

**Console Commands & Variables: ** [ul]
[li]cl_menu_sng_exclude - excluded maps (default: “^test,^background”)[/li][/ul]

**Notes / ReadMe / Instructions: ** [ul]
[li] Please post ideas, bugs and ect in this topic. Please post the version/svn revision your useing if it’s a bug![/li] [li] Please tell me what definition files I should create. [list][/li] [li] Such as a list of useful cvars “map_data/settings/gamemodes/<basic | advanced>/<category text>.txt”[/li] [li] Such as a list of gamemode specific cvars “map_data/settings/gamemodes/<gamemode title>/<category text>.txt”[/li] [/ul]
[/list]

Downloads:
Version #003 SVN: https://ds-menu.googlecode.com/svn/trunk - Ready

Version #002
http://www.garrysmod.org/img/?t=dll&id=122793

Version #001
http://www.garrysmod.org/img/?t=dll&id=122592

This is a very nice addon but the Lua - Spams are annoying.

I’ve been king for a long time, just sleeping is all.
May my weary eyes rest in tomorrows night.

EDIT: The quote i posed originally wasn’t as bad as this one, just had a reason to remove it so yeah I’m dumb.

This is very nice, keep up the work!

This is pretty good, especially since you can choose the gamemode in this menu. Is it just me or has the default “Start New Game” menu lost the ability to choose a gamemode?

The Default “Start New Game” menu has the ability it’s the 3rd tiny button down on the right side, also I will update first post whenever I decide I’m going to add something new.

Oh wow, I’ve never noticed those little icons before. Thanks for enlightening me :v:

Creating custom definition (Settings/Map Category) files and posting them here may get them put in the default download and of course you will be added to the credits.

You forgot the plr_ for tf2
What no zeno clash?
Also can you make a menu to choose starting items/weapons?
Nice work though :slight_smile:

Great work.

I’ll add “Zeno Clash” map category when someone posts the map abbreviations (zs_,zpo_,ect…). Till then just working on some gamemode specific settings for some of my favorite gamemodes such as “Trouble in Terrorist Town”

Zombie Survival also accepts zm_ and zh_.
New Super Mario Boxes maps are smb_.

Thanks for the heads up it’s 8:43am here will probably send an update tonight with the new definitions and a little progress towards my goal.

Edit also what would be the best way to release a new version, just upload another file on gmod.org and delete the old?

EDIT: Introducing much simpler format for map categories for tonight’s update. (old format still compatible)

meh You forgot to Add Toybox Tab for maps Downloads

I’ll take a look at the default script and see if it wouldn’t be to difficult, don’t imagine it would be to difficult.

Also Map Category def files will be able to be formatted as they currently are and like this by tonight’s update.

EDIT: Added “ToyBox” tab!

Update the rd_ to change to toxsin, seeing as it’s the new redead :v:

so what?

Will update when garrysmod.org stops acting up, till then I’m going to keep developing.

Also how would you the users, like the “Map Favorite’s” system to be? I’m currently thinking a category at the top of the category list called “Favorites”

EDIT: it’s been 24 hours and garrysmod.org login (steam api) is still down. . . .

Version 002 - Released[ul]
[li] Added “Toybox” tab[/li] [li] Switched all default “Map Category” definition files to new format (old format is still compatible, so use whichever you perfer)[/li] [li] Added “Gamemode Settings” definition for “Trouble In Terrorist Town”[/li] [li] Adjusted “Map Category” definition file “Super Mario Boxes” [list][/li] [li] Added smg_[/li] [/ul]
[li] Adjusted “Map Category” definition file “Zombie Survival” [ul][/li] [li] Added zm_
[/li] [li] Added zh_*[/li] [/ul]
[li] Fixed tooltip errors in console[/li] [li] Added experimental “Search Bar” for maps (Map Filter & Category Filter) [ul][/li] [li] May need to optimize map gathering scripts [/li][quote]

			Here are some test the numbers in [] are lowest to highest, This currently does not use a timer based sequence which would be better which is what i plan to do.
			Search: &lt;empty filter&gt; of 930 results took [1.328 , 1.331 , 1.334 , 1.339 , 1.369] seconds.
			Search: gm_ of 59 results took [0.084 , 0.084 , 0.084 , 0.101 , 0.117] seconds.
			Search: zs_ of 119 results took [0.196 , 0.197 , 0.198 , 0.214 , 0.232] seconds.
			
			When you perform a search you will see this in console.
			Search: &lt;text&gt; of # results took # seconds.

[/quote]

	[/ul]
[/list]

EDIT: I could really use some ideas, so please tell me what you all would want from this addon along with list’s of cvars tat should be added in the settings basic/advanced tabs. Also what gamemodes i should add the cvars for and map categories.

EDIT2: I’ve discovered some bugs in my code and therefor are going to create a Bugs: section in my first post.

EDIT3: Setting up a svn so i don’t have to keep uploading to garrysmod.org , therefore making it easier to get bug fixes out.

Version 003 - Released [SVN][ul]
[li] Added “Right Click Menu” for map thumbnails , Add to favorites , Remove from favorites[/li] [li] Added “Favorite Maps” system [list][/li] [li] Added “Favorites” category to top of “Map (Thumbnails)”[/li] [li] If a map is on your “Favorites” list it will have a gold star in the top right corner of it’s thumbnail[/li] [li] BUG: You have to add/remove something to/from your “Favorites” for it to display correctly[/li] [/ul]
[li] Fixed Bug “gamemode not being set correctly”[/li][/list]

the addons and gamemodes are blank and yes a have some.