Hex Game

The Hex Games work based off using buildings as a way to trigger certain events. For instance, when you are stepping onto a new plot as the traveler and you lose stamina, it is not because of a magical game setting where every move you take takes one stamina. Instead, stepping onto that tile had a building that had a recipe with a keyword on_plot_entry that ran when you stepped onto the plot. It had an input of one stamina, and an output that is not visible to the player.

The buildings are placed onto the map in a random location with the only current control being the amount of each building and in which order each building is placed.

Let's say I have an empty Hex Map and I want to make it so that moving requires 1 Stamina.

I load into my hex map, and-- oh! I don't start with any stamina. Let's fix that below.

GameMap-Specific Fields

When we open up our Hex Minigame for the first time, we are met with this:

FieldContext

Id

The unique string that references this game map.

Available

Whether or not this Hex Game is avaliable to be played.

Name

The string that is displayed in the mission list.

Description

The text that is displayed upon opening the prompt for the mission.

AllowedTravelers

martizen or player | currently only affects the game cosmetically.

Radius

The radius of the hex game, a maximum size of 7 is allowed, although higher than 5 can cause issues depending on how many tiles are placed in the beginning.

Image

The background image of the hex minigame

Background Color

The background color of the hex minigame, behind the background. The *super* background.

Latitude/Longitude

Unused

TravelerInitialLoot

Loot Table that is granted to the Traveler on start.

EntryRecipe

The inputs in this recipe will be used as the cost to enter the hex minigame.

To make the player start with some stamina, we're going to first create a new item called map_energy (or we could use the already created max_energy ) importantly, since we don't want the item to return to the player when the game ends, we give it the map_items keyword. Any item in the Traveler's inventory with the map_items keyword will not be given to the player when the hex minigame ends.

Now that we have this item, we're going to put it in a new loot table called minigame_initial_loot and we're going to give the Traveler 10 of it to start. We'll also fill in the other basic fields like name and description.

Now when we run our hex minigame, we'll see our traveler on the field and he has 10 stamina. Next we'll create a new building, with a recipe reference to a new recipe. This new recipe will have a keyword of on_plot_entry and it will consume one stamina. Now we add that building to our hex minigame, enough to fill up the whole map and everyitme we take a step will now consume 1 stamina!

Information from CEBU:

  • on_plot_entry - add this to recipes and that recipe to a building, when you want a recipe to automatically run when a traveller tries to move to a plot with that building on it. This can be used as movement cost for when a traveler moves to another plot.

  • on_start - add this to a recipe on a building, when you want this recipe to run when a game map is created. This can be used to initialize building, plots, or map inventories. This runs immediately when a game map is created so everything is on a clean slate, try not to add inputs that cannot be met.

  • map_items - add this keyword to items that aren’t allowed outside game maps, Items that don’t have this keyword will be given to the player(real MoM game) inventory after the game ends.

  • map_private - add this keyword to a building that you want to hide from the UI.

  • map - game maps have inventory, you use this as you would buildings at recipes, this indicates a participant of recipes

  • game_map - similar to maps, each plot on a game map have inventory, this keyword indicates the map plot

  • contagious_adjacent - add this keyword to a recipe with on_plot_entry keyword when you want a traveller movement to also trigger on_plot_entry recipes of all adjacent plots on the plot destination

  • Side Notes(might be helpful):

  • On on_plot_entry recipes, you can use requirements to skip an automatic run on that recipe, for example, you can use this to check if a plot has an item which can skip the recipe itself. If a recipe requirement is not met on on_plot_entry recipe run, it will SKIP doing the recipe entirely. On another note, Missing INPUTS will cause an error

  • map, and map_plot keywords are meant to be used like how buildings are used currently, for an example condition: visit@map_plot <= 0 which means when visit(item) on plot inventory is <= 0. Also the same way on Loot tables(L-GameMaps) as Targets

Game-data:

  • GameMaps:

  • Available - toggle true or false, controls map disabled/enabled

  • Radius - map radius, 3 - 37 plots

  • Traveler Initial Loot - loot table(I-GameMaps), controls initial inventory of traveler

  • Starting position - initial position of traveler on the hex map

  • Movement Type - what moves a traveler can make on a map

  • Grant Recipe - recipe used to create an instance of a game map, current usage is setting a recipe(usually on R-GameMaps) that has an input of the game ticket item

  • Building order - Order to which Buildings from building 1, and so forth are to be placed on a game map(more notes below)

  • Building #/Count # - building id and count of buildings to be placed on a map

  • End Game Trigger #: recipe ids that have inputs that determine if a game has ended/completed(check R-GameMaps)

  • Side notes:

  • Building Order types:

  • shuffle - This means that all Buildings, 1,2,3, etc. mutliplied by their respective counts are shuffled before being randomly placed on the game map plots.

  • no shuffle - This means that Building 1 will be placed first, randomly on the game map, then Building 2, and so forth. After a building count is dropped down to zero, only then will it proceed to install the next building in order. Meaning, if you want a 37-plot map to contain at least 1 of a building, you set no shuffle, then have Building 1 Count 1 set at 37.

Last updated