AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S/GO] Red Maze (of Red Wonders) (https://forums.alliedmods.net/showthread.php?t=220159)

RedSword 07-07-2013 18:13

[CS:S/GO] Red Maze (of Red Wonders)
 
1 Attachment(s)
Red Maze (of Red Wonders)

Plugin-powered maps
v. 0.9.3.0


Table of Contents
1.0. Plugin's introduction
1.1. Convars
1.2. Commands
2.0. Related plugins and maps
3.0. How to make your map compatible
4.0. Algorithms, difficulties
5.0. FAQ

Introduction :
This is a project like 95% done within the months of December 2012 and January 2013. This plugin is complete, thought the project itself is incompleted (not the Red Wonders part, thought it is functionnal; i.e. I wanted a drop-on-death system). I planned to release it once finished; but since I can't find enough time to finish it, i'm releasing it today, as I fear I might never release it if I don't (>< saying this out loud makes it strange).

For screenshots (and a map to play), see http://css.gamebanana.com/maps/175140

Features :
  • Randomize compatible maps so it creates a maze.
  • Is flexibly done so other plugins can access the maze structure. (You might want to take a look at Red Wonders which spawns bonuses).

CVars :
  • redmazeclassicversion: Gives version -_-'
  • ----------
  • redmaze_reduction : Reduce width of the maze on both side by this value. Useful if you don't want to get too lost. Default 0.
  • redmaze_genfrequence : Generate the maze every X rounds. (0=on map start only; default 3)
  • redmaze_announcegenalgo : Announce the generating algo ? 1=Yes, 0=No.
  • redmaze_gen2ndpass_chance : Chance to run a 2nd time a maze-generation algo; 'open' cell from both generation will be used. 1=100%, Default=0.15.
  • ---------- Bonus related ----------
  • redmaze_wonders : Enable spawning bonus in the maze. Note that you need the appropriate other plugin.
  • redmaze_wonders_allow_nearspawnbonus : Allow spawning bonus in near-spawn cells. Default 0.
  • redmaze_wonders_chance_deadend : Chance to spawn bonus in dead end cells. 1=100%
  • redmaze_wonders_chance_inter3 : Chance to spawn bonus in intersections of 3 cells. 1=100%
  • redmaze_wonders_chance_inter4 : Chance to spawn bonus in intersections of 4 cells. 1=100%

Commands(All but 2 requires ADMFLAG_UNBAN) :
  • <sm_disablecell | sm_dcell ><x><y> : Disable the cell.
  • <sm_enablecell | sm_ecell ><x><y> : Enable the cell.
  • <sm_disablerow | sm_drow ><y> : Disable a row of cells.
  • <sm_enablerow | sm_erow ><y> : Enable a row of cells.
  • <sm_disablecol | sm_dcol ><x> : Disable a column of cells.
  • <sm_enablecol | sm_ecol ><x> : Enable a column of cells.
  • <sm_disableall | sm_dall ><x> : Disable all cells.
  • <sm_enableall | sm_eall ><x> : Enable all cells.
  • ----------Mainly for debug purpose (needs ADMFLAG_RCON)----------
  • sm_solve_breadthfirst : Solve the maze; tells how many step it took.
  • sm_analyzemaze : Analyze the maze and gives information regarding the amount of intersection(4), intersection(3), "transit" and cul-de-sac in the maze
  • ----------Need to be recompiled in DEBUG----------
  • sm_hookcellinputs : Hook the cells input (if you want to use track "AcceptEntityInput" it can help).

Known bugs :
  • None, thought there are "unpolished" stuff. i.e. I'm printing the algo's name; because I want to tell the player how high-river is the current maze; thought the formatting is shitty.

Changelog :
  • 0.9.0.0 Initial release (07-07-2013)
  • 0.9.1.0 Modified generating algo announcement. It is also facultative (see ConVar "redmaze_announcegenalgo"). Also reuploaded (I didn't upload all file :$ ). (07-07-2013)
  • 0.9.2.0 (13-07-2013)
    • It is now possible to generate a new maze every X rounds rather than every rounds. See convar redmaze_genfrequence. Default value = 3.
    • Note that this plugin now creates a .cfg (Plus another one if you use huntandkill algo).
    • Added the word "algo" in the phrase displayed to players when re-generating the maze (might clarify things for them; as they were probably "wtf" when seeing that before).
  • 0.9.2.1 (09-03-2014)
    • Removed a PrintToServer when not in debug
    • Announcement regarding redmaze_deagle5 working under both CSS and CSGO.
  • 0.9.3.0 (15-03-2014)
    • Added a possibility to run two algo and see the 'union' of the open cells :
      • See Convar redmaze_gen2ndpass_chance.
      • See the 2 new screenshot on gamebanana to give you an idea (the map seems rather naked :/)
    • ---===Non-Gameplay wise===---
    • Recursive Backtracker :
      • Now uses another array if called in second (due to 2nd pass). Not needed for H&K as it works with 2 arrays.
    • Hunt and Kill :
      • Slight change with the flag (if someone beside me used that; lawl)
    • Changed some comments (.sp & .inc)

Todo list :
  • Add drop-on-death system
  • CSGO @ Red Wonders

Thanks (mixing both Red Maze and Red Wonders) :
  • Sourcemod Devs.
  • Danhouser82 (prefabs in the map).
  • Johnny got his gun (Metamap + great plugins).
  • Psychonic. Please do not fall into bread's hell. Everyday, hundreds of ducks die from bread overdose. Please be careful.
  • Darkranger (I used his plugin's models in here; I added the red color myself; and swapped the green with red and blue with green; also used some of his code I believe)

Notes :
  • The "Red Maze of Red Wonders" project is the biggest I've done so far (after Be Medic); It is composed of many plugins (3 Red Maze, 9 Red Wonders) so it has a nice architecture (I believe).
  • The plugin will - of course - only work on compatible maps. This is mean to be used with other maps. (i.e. you can use this plugin with redmaze_deagle5_b02 in your map rotation, as long as you have this plugin; there shouldn't be any problems)
  • RedWonders.inc is - at this time - in the attachment for compiling purpose only. It might become updated if I update my other plugin (thought only some parts of the .inc is needed)
  • v0.9* because I don't feel it is polished enough to be a "v1". If I find time maybe I'll update it more.
  • Works on CSGO, however Red Wonders doesn't.

RedSword 07-07-2013 18:13

Re: [CS:S] Red Maze (of Red Wonders)
 
2.0 This section is regarding related files/materials

2.1 Compatible maps :
  • http://css.gamebanana.com/maps/175140
    • Works under both CSS and CSGO
    • Under CSGO, you might need to switch twice to the map and/or remove both (to allow the navigation map (.nav) to be made)

2.2 Related plugins :
  • Red Wonders
    This plugin creates specials power-up (+life, +regen, damage-reduction, life-leech, bonus speed, weapons) at dead-ends and intersections of the maze.

RedSword 07-07-2013 18:13

Re: [CS:S] Red Maze (of Red Wonders)
 
3.0 How to make your map compatible :
  • Your map name must contain the keyword "maze".
  • Your map must contain a "func_wall" entity with its "m_iGlobalname" (written "globalname" in the .vmx) property being mazeinfo_ABCx_DEFy. This entity represents the dimensions of the maze. ABC is the "x" size of the map, while DEF is the "y" size of the map. For example, in redmaze_deagle5_b01, the globalname is "mazeinfo_021x_013y".
  • The maximum size of the maze is x * y <= ~1900 <= 2048 (64 spawns, light entities and stuff; as long as you don't abuse you should be fine)
  • Your map must contain x * y "func_brush" entities. Their name must be mazecell_ABCx_DEFy. For example, in redmaze_deagle5_b01, one of the cell's globalname is "mazecell_000x_011y" (which represents the cell at the intersection of the first "x" and the 12th "y" cell).

To test, it might be a good idea to recompile the plugin with DEBUG defined (it is commented currently). Note that x and y must be 0-based.

RedSword 07-07-2013 18:13

Re: [CS:S] Red Maze (of Red Wonders)
 
4.0

4.1 Links I used/read while making this plugin :
They partly motivated me to make this plugin; as you can see there are no maze plugins; plus it's nice to see the depth maze can have. I had originally planned to implement more algo; but only the ones below are implemented for the generation of the maze.

I'm not sure if I truly was influenced by "Johnny got his gun"; but I think he influenced me. I never got to play his map; but I really wanted to. :( (Also he made awesome plugins for CS1.6). I read his metamap code; but it didn't really help and made me lose time. Just the original concept was awesome.

4.2A Definitions to understand the 4.2B quotes :
  • Quote:

    Originally Posted by http://www.astrolog.org/labyrnth/algrithm.htm
    River: The "river" characteristic means that when creating the Maze, the algorithm will look for and clear out nearby cells (or walls) to the current one being created, i.e. it will flow (hence the term "river") into uncreated portions of the Maze like water. A perfect Maze with less "river" will tend to have many short dead ends, while a Maze with more river will have fewer but longer dead ends.


4.2B Algorithm used to generate the maze :
  • Hunt and kill (under redmaze_creationalgo_huntandkill.smx)
    Quote:

    Originally Posted by http://www.astrolog.org/labyrnth/algrithm.htm
    This algorithm tends to make Mazes with a high "river" factor, but not as high as the recursive backtracker. You can make this generate Mazes with a lower river factor by choosing to enter "hunt" mode more often.

    You can decide to enter "hunt mode" more or less often using the ConVar "redmaze_huntandkill_prim".
  • Prim (also under redmaze_creationalgo_huntandkill.smx)
    Quote:

    Originally Posted by http://www.astrolog.org/labyrnth/algrithm.htm
    This algorithm results in Mazes with a very low "river" factor, with many short dead ends, and the solution is usually pretty direct as well.

  • Recursive backtracker (under redmaze_creationalgo_recursivebacktracker.smx )
    Quote:

    Originally Posted by http://www.astrolog.org/labyrnth/algrithm.htm
    This algorithm results in Mazes with about as high a "river" factor as possible, with fewer but longer dead ends, and usually a very long and twisty solution.


Note that only one algorithm is used at a time. The third argument in RedMaze_RegisterAlgo() can change whether or not an algo will be chosen or not. It is the "weight" of the algo, representing it's chance from being selected.

Depending on the patience of your players (i.e. they get too lost and rage), you might want to remove one of the plugin; or use "redmaze_reduction" convar to get a smaller maze.

4.3 Difficulties :
  • I tried for a long time to use func_breakable, rather than func_brush to get possibly cool power-ups (i.e. "destroy close walls for 5 sec" power-up; that would have been awesome). It seems that there was no way to make a breakable with a global name (not sure about this point since it's more than 6 months I made this plugin; but I'm pretty sure I had a dumb problem regarding global names); also once broke, a breakable couldn't respawn (wtf ?). This gives a bad point where my map doesn't have wooden sounds for my wooden boxes :( .
  • I wanted to spawn boxes at first; but I realize permanent entities with "enable"/"disable" seems way easier.

RedSword 07-07-2013 18:13

Re: [CS:S] Red Maze (of Red Wonders)
 
5.0 FAQ
  • What about CSGO ?
    Was originally planned, but since this was becoming a project on the blink of extinction I dropped that idea for ... for now. (I notably need to convert the map; since CSGO maps are different)

RedSword 07-07-2013 18:14

Re: [CS:S] Red Maze (of Red Wonders)
 
Reserved. 6.0 (If needed)

RedSword 07-07-2013 18:15

Re: [CS:S] Red Maze (of Red Wonders)
 
Reserved. 7.0 (We never know)

RedSword 07-13-2013 23:00

Re: [CS:S] Red Maze (of Red Wonders)
 
Released 0.9.2.0 :
  • It is now possible to generate a new maze every X rounds rather than every rounds. See convar redmaze_genfrequence. Default value = 3.
  • Note that this plugin now creates a .cfg (Plus another one if you use huntandkill algo).
  • Added the word "algo" in the phrase displayed to players when re-generating the maze (might clarify things for them; as they were probably "wtf" when seeing that before).

RedSword 03-09-2014 00:09

Re: [CS:S/GO] Red Maze (of Red Wonders)
 
Released 0.9.2.1
  • Removed a PrintToServer when not in debug

Note that I also updated the map (linked in the second post) which now works under both CSS and CSGO. Note that Red Wonders isn't yet fully functionnal with CSGO; thought probably guns 'Wonders' works.

The main reason the *_b01 map was not working was due to the game_player_equip giving ammo_50ae entity. This crashes the game apparently if cheats are off (GG Valve; I found it reported in the Steam forums). I also changed some texture, so the credit box is now more boring with fewer colors.

Red

shavit 03-09-2014 00:48

Re: [CS:S/GO] Red Maze (of Red Wonders)
 
That looks sweet, why nobody have posted there?


All times are GMT -4. The time now is 12:43.

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