__________________________________________________________________________________________________________________________________
==================================================================================================================================

                                                             ▄▄                                  ▄▄          ▄▄                  
 ▀████▄     ▄███▀                                     ▄█▀▀▀█▄███                                 ▄██        ▀███                  
   ████    ████                                      ▄██    ▀███                                  ██          ██                  
   █ ██   ▄█ ██  ▄█▀██▄ ▀████████▄█████▄  ▄█▀██▄     ▀███▄    ███████▄  ▄█▀██▄ ▀████████▄█████▄   ██▄████▄    ██   ▄▄█▀██▀███▄███ 
   █  █▓  █▀ ██ ██   ██   ██    ██    ██ ██   ██       ▀█████▄██    ██ ██   ██   ██    ██    ██   ██    ▀██   ▓█  ▄█▀   ██ ██▀ ▀▀ 
   ▓  █▓▄█▀  ██  ▄███▓█   ▓█    ██    ██  ▄███▓█           ▀████    █▓  ▄███▓█   ▓█    ██    ██   ▓█     ██   ▓█  ▓█▀▀▀▀▀▀ █▓     
   ▓  ▀▓█▀   ██ █▓   ▓█   ▓█    ▓█    ██ █▓   ▓█     ██     ███▓    █▓ █▓   ▓█   ▓█    ▓█    ██   ▓▓▓   ▄█▓   ▓█  ▓█▄    ▄ █▓     
   ▓  ▓▓▓▓▀  ▓▓  ▓▓▓▓▒▓   ▓▓    ▓▓    ▓▓  ▓▓▓▓▒▓     ▓     ▀█▓▓▓    ▓▓  ▓▓▓▓▒▓   ▓▓    ▓▓    ▓▓   ▓▓     ▓▓   ▓▓  ▓▓▀▀▀▀▀▀ ▓▓     
   ▒  ▀▓▓▀   ▓▓ ▓▓   ▒▓   ▒▓    ▒▓    ▓▓ ▓▓   ▒▓     ▓▓     ▓▓▓▒    ▓▒ ▓▓   ▒▓   ▒▓    ▒▓    ▓▓   ▒▓▓   ▓▓▓   ▒▓  ▒▓▓      ▓▒     
 ▒ ▒▒▒ ▒   ▒ ▒▒▒▒▓▒ ▒ ▓▒▒ ▒▓▒  ▒▒▒   ▒▒▓▒▒▓▒ ▒ ▓▒    ▒▓▒ ▒ ▒▓▒ ▒   ▒ ▒ ▒▓▒ ▒ ▓▒▒ ▒▓▒  ▒▒▒   ▒▒▓▒  ▒ ▒ ▒ ▒▒  ▒ ▒ ▒  ▒ ▒ ▒▒▒ ▒▒▒    
                                                                                                                                                                                                                                                            
__________________________________________________________________________________________________________________________________
==================================================================================================================================

Title                   : Mama Shambler
Filename                : modjam2022_matboe
Release date            : For Mod Jam 2022
Author                  : matboe
Email Address           : matboe@yandex.com
Other Mods By Author    : Boss Faction (WIP)
Misc. Author Info       : https://www.youtube.com/channel/UCzx6ZLaId77j_9e8EtrLJFg (Boss Faction demos)

Description             : Here is my submission for this year's Quake community Mod Jam. I took the opportunity to give people a 
			  sample of what I've already accomplished for my upcoming mod, "Boss Faction".

			  Mama Shambler spawns many minions into the empty space around her, they will follow her around until sighting 
			  a player.  If any minions stray too far they will teleport back to their mama.  Mama Shamblers health and
			  max number of minions to spawn depends on the 'skill' setting.
			  Mama Shambler will throw her minions at the player. Minions will jump down from a ledge to land on the player
			  if they get the opportunity.  Mama Shambler will roam around the map following player items (ammo, health etc),
			  and custom path_roam entities placed throughout the map.  

			  Mama Shambler will continually spawn minions unless she is is fighting.  
			  The map will end when Mama Shambler dies.  Ammo, health, weapons, armor will respawn as per deathmatch rules.
			  
			  The mod will spawn monsters until a max is reached, these monsters will will roam the map together in groups.

			  There is a simple "Editor Mode" for curious players to see how the ai_roam works and make their own paths.
			  This is accessed by typing 'name matboe' into the console.
			  
What's new              :
			* ai_roam - a monster will search for any visible nearby item or path_corner that is a similar 'z height' to 
			   his own and navigates to it until his timer runs out.  A monster will check on his progress towards his goal,
			   if he's getting closer his timer is reset.  When a monster reaches his goal he stores that point in a list of
			   previous goals and wont revist it again until he has visited 5 other points. 
			   If the monster is lost and can't find any more goals his list and timer are reset and he starts again.
			   A monster will prioritize any 'path_roam' entity it sees (near its own z_height), and will walk towards the 
			   closest visible one. 
			   'path_roam' entities may have an 'intersect' flag (1).  When a roaming monster reaches a 'path roam' ent with 
			   'intersect' flag he will randomly choose 1 of the closest 2 'path_roam' ents as its
			   new goal.
			  
			* squads - Mama Shambler will spawn a squad of minions into the empty space around her, one every 2 seconds 
			   (dependends on skill level) until her max spawn limit is reached (depends on skill).  Squads will spawn within 
			   a maximum distance from Mama Shambler and at a simialr z-height, never off a ledge.  Squads then follow Mama 
			   Shambler around the map.  Squads will run to and attack an enemy, then return to following Mama Shambler or 
			   teleport back to her if they get lost.

			* ai_follow - a monster will navigate to and follow his leader.  When he reaches his 'minimum distance' 
			   from his leader he will walk toward his leaders goal entity.  If he reaches his leaders goal entity he will
			   (attempt) to predict the next goal and walk towards it.  When he reaches his 'maximum distance' he will 
			   follow his leader again.  If a monster sights a player he will run towards and attack the player, and notify his
			   leader to attack if not already engaged.

			* monster_jump_down - a different jump routine.  If the distance to jump is not too great a monster will jump 
			   across a gap to land on a player (up to 500 units), or he will jump to down land on a player from above (distance
			   across must be <= distance down). He will never jump up or into a liquid.
 
			* small ai additions - Roaming monsters will forget their enemy 10 seconds after they have lost sight of 
					       him, and return to following or roaming.
					     - Roaming monsters have improved line of sight checking before firing, so they don't
					       shoot each other in the back (quite so often).
			  		     - Mama Shambler now has an Anti-Shambler-Dance routine, dancers beware!

			* Editor Mode        - In Editor Mode all path_roam entities will be shown, as well as a roaming monsters current 
					       and previous goals.  Player can make/edit paths and reposition a roaming monster.  Player
					       will not take damage or clip any bsp, no enemies will attack the player in Editor Mode.
					     
					     - Access Editor mode by typing 'name matboe' into the console. Must be on a map with
					       'monster_mama_shambler' entity spawned.

					     - Press 1 (axe), for 'add/remove/select' tool. 
					       Shoot to add a 'path_roam' ent. The connecting path_roam ent will flash.
						(note: connecting path_roam ent is the closest visible path_roam ent).
					       Shoot again to set 'intersect' flag. The 3 connecting path_roam ents will flash.
						(note: intersection must have 3 visible path_roam ents within 500 units).
					       Shoot again to remove.

					     - Shoot a roaming monster with 'add/remove/select' tool to select it and reveal its goal 
					       and previous goals.

					     - Press 2 (shotgun), for 'Move selected monster' tool. Selected roaming monster will flash.

					     - Shoot to move selected monster.

					     - type 'name myname' in the console to exit Editor mode.



						Legend for path_roam models in Editor mode
						-----------------------------------------------
						light		   -	path_roam
						gib		   -	intersection
						player head	   -	monsters previous goal
						monsters own head  -	monster current goal
						


Note for Mappers	: 
			* New spawn functions! 	
			  'monster_mama_shambler'  - place a Mama Shambler in your map
			  'monster_matboe_army'    - place a roaming monster_army in your map, it will spawn a small group of followers.
			  'monster_matboe_enf'	   - same as above, place a roaming enforcer who will spawn followers.
			  'path_roam'		   - create paths for ai_roam to follow by placing by placing a 'path_roam' entity.  
						     A roaming monster will navigate to ents at a similar z-height to its own. Roaming 
						     monsters will not return to an ent until it has visited 5 other ents.  An ent is 
						     considered as reached when the monster navigates to within 100 units.  
						     Add intersection with spawnflag (1) Connecting intersection paths must be within 
						     500 units.  If no path_roam ents are found, roaming monsters will roam to player items
						     (health, ammo etc) instead.

						     NOTE!  Roaming is enabled by default.  Set monster spawnflags 4096 to disable roaming, 
						     the monster will stand still until sighting an enemy.

Note for Players	:
			* Useful commands!
			  'notarget' 'noclip'	   - monster won't attack so you can check out the new roam and follow ai.
			  'name matboe'		   - Access the Editor Mode.
			  'noexit 1'		   - Mama Shambler will respawn at a random location after dying!
			  
			
			  

Additional Credits to   : 
			*Grue, for the epic custom map!
			*fairweather, for the Chibi Shambler model
			*Patrick Martin, whose object collision code I have been borrowing for years (PM, if you see this, I dig your style!)
			*The people on the Quake Mapping discord server for their support and crucial feedback
			*You, for playing my mod! Enjoy it!

Original assets belong to iD Software

===========================================================================
* What is included *

New levels              : Yes! "Shambler Daycare" by Grue (matboe_modjam2022.bsp)
Sounds                  : Yes
Music                   : No
Graphics                : Yes, mini shambler by fw, and a throw animation for the Shambler done poorly by me.
Other                   : Yes! new ai! Roaming and following monsters. Monsters that spawn other monsters
Other files required    : No


* Play Information *

Singleplayer tested, but potentionally works on co-op and deathmatch games (Editor Mode is SP only).


* Construction *

Base                    : Mod Jam 2022 supplied the progs
Tested With             : Quakespasm, Quakespasm Spiked
Known Bugs              : Sometimes the mini shamblers spawn stuck in the walls, but they correct themselves quickly.
To do			: - Fix mentioned bugs. 
			  - Extend ai_roam with a backtrack routine
			  - Monsters place their own paths?



* Copyright / Permissions *

Authors (MAY/may NOT) use the contents of this file as a base for
modification or reuse.  Permissions have been obtained from original 
authors for any of their resources modified or included in this file.

You MAY distribute this file, provided you include this text file, with
no modifications.  You may distribute this file in any electronic
format (BBS, Diskette, CD, etc) as long as you include this file 
intact.  I have received permission from the original authors of any
modified or included content in this file to allow further distribution.
