# Creating your first Hunt ## Adding an Event Before we continue, you should be aware that an "Event" is synonymous with a "Hunt". If you followed the setup instructions you will already have created an event, but it's worth noting that you *cannot* create one through the Django admin due to technical limitations (when in the admin interface, you are restricted to accessing and modifying data within a database schema, and the new Event needs to be in a different schema.) If you want to proceed with the default event, which we shall do in the subsequent sections, you can skip the following. To create an event run: ```shell docker compose run --rm app createevent ``` You will be taken through a series of questions on the CLI to specify the required information. Once you are done, if you haven't already, you will need to ensure that the full domain for the event (i.e. the domain of the application server with the subdomain you gave when prompted) resolves to the server. If you gave your event the subdomain `ev` then you should now be able to login with your superuser credentials at [http://ev.hunter2.local:8080/](http://ev.hunter2.local:8080/). Events contain important extra information such as rules and help. These are optional but useful for your participants. You can enable *seat assignments* if you are running a hunt on-location and need to be able to find people, and add discord integration information. ## Creating an Admin Team Load an event page (such as [http://dev.hunter2.local:8080/hunt/](http://dev.hunter2.local:8080/hunt/)) and log in. To access the hunter2 admin functionality, create a team normally and then use the Django admin interface at [/admin/crud/](http://dev.hunter2.local:8080/admin/crud/) to change the team's role to "Admin" or "Author". The normal hunt pages will then have an "Admin site" link at the top. ```{figure} img/crud_admin_team.png :width: 1200 :alt: Django admin page showing an author team Altering the admin team ``` ```{note} The difference between the two roles is that there can be at most one author team for an event, and the people in it are credited as the authors. Both roles have the same permissions. ``` For your fellow admins to also have access to the Django admin interface, you will need to find their user in it and set them be a Staff Member. ## Team Sizes Also under the Teams section is the ability to add size categories. In the simplest case, you can add a single size category to define the maximum team size limit for the event. Further size categories can be added. Teams will be informed of the categories on their Team page, and which category they fall into. All fields are optional; an empty maximum is a catch-all "unlimited" category. Note that if you add any categories the maximum team size is the *maximum of all the `maximum` fields*, so you must add an unlimited category if you don't want there to be an enforced team size limit. The purpose of size categories is to have separate "leagues" of winners: when players finish an episode or event, they will be informed of their position within their category rather than overall. ## Adding an Episode An episode is a collection of puzzles within a hunt: it collects them together logically (and sometimes thematically). Hunter 2 is designed around multi-episode hunts, which might release one set of puzzles on a Saturday and another set on Sunday. Even if there are no such natural splits in your hunt, you need to first add an episode. Navigate to the "Episodes" section of the admin interface and click "Add Episode": ```{figure} img/crud_episode_1.png :width: 1200 :alt: Django admin page showing a demonstration episode Adding an episode ``` Enter details for the episode. The *name* could simply be the day the puzzles start, an overarching theme for the puzzles within it, or something related to the story. *Flavour text* is optional. Many players skip it, but some enjoy a bit of story! Before the *start date*, the episode will not be visible. If you want the episode to be visible in advance but have the puzzles on them be unavailable until a certain time, set the *start date* property of the puzzles to that date and time. Players will see a message telling them when the first puzzle will be available. Note that episodes have start dates; events have end dates. Episodes and puzzles are available until the entire event ends, and the event starts whenever the earliest episode starts. Hunter 2 currently supports two progression models within episodes: linear and *parallel*. Linear means that each puzzle must be solved before the next one is revealed; parallel means that each puzzle becomes available at a specific time and can be solved regardless of whether others have been. The *headstart from* field does not make sense for the first episode in a hunt: if one or more puzzles in an episode grant headstart, another episode which lists it in "headstart from" will advance its start time for those teams which have acquired headstart from those episodes. There are three types of headstart: for completing episodes, for completing puzzles, and manual adjustments to capture any other conditions, including those that are done outside the site. The first of these is configured here. This is easiest to explain with an example: suppose you want the first 3 finishers of an episode to get headstarts of 30, 20, and 10 minutes respectively: you would then set the *first finishers headstart* field to 3, the *first finishers max headstart* to 30 minutes and the the *first finishers min headstart* field to 10 minutes. Note that the other values are interpolated linearly, so 6 teams with a max of 30 minutes and a min of 20 minutes would yield headstarts of 30, 28, 26, 24, 22 and 20 minutes. Check your arithmetic carefully :) A *winning* episode must be won in order for the site to inform a team that it has finished the hunt. Again *prequel* episodes will always be blank for the first episode: they must be completed in order for puzzles from this episode to be available. Click "save" to return to the episode list and see an overview of the episodes currently in the event. ## Adding a Puzzle Click the "puzzles" section and "add puzzle". Select the *episode* that you just created. Note that it is possible to save a puzzle without an episode (which you may wish to do if you don't want to decide which episode to put it on yet) but it won't be accessible. Like episodes, puzzles have *flavour text*. Note that the puzzle page includes a pair of HTML comments saying where the puzzle-relevant content begins and ends: puzzle flavour text will be added outside this. This does not mean no hunt admin should ever include something relevant in the flavour text, but it does mean that if you include a subtle hint there and a player looks at the HTML source, they will be quite confused, so think carefully. You can always include the story within the body of the puzzle. The *puzzle page content* is the star of the show. By default this is HTML that directly appears on the page during the hunt, containing whatever constitutes the body (or just the starting-off point) of the puzzle. No validation of the HTML is done so be careful that it doesn't break anything else on the page. Note you can include extra `