Learning

    Documentation

    Loot & Craft

    Loot & Craft

    This tutorial will introduce you to the basics of Machinations while you will build a simple Loot & craft system.

    The basic action the player performs in this example is to chop trees. For each tree they cut down, loot will be generated to provide 1 piece of wood to the player.

    Sources generate an infinite amount of resources and can be triggered in different ways. For this example we will use an Automatic* source to do exactly that.

    1. Click the Source icon in the components panel or use the keyboard shortcut “s”.
      Notice that the source is now attached to your mouse cursor.
    2. Click on the canvas to place the source.
      No worries, you can always select components and reposition them.

    Once you have added a component to the canvas, the Properties Panel on the right-hand side will display the available properties for the selected component(s). Let’s give the source a name and change its color.

    1. Click inside the Label text field and type Spawn tree”.
    2. Hit Enter to confirm the new name. Labels are displayed below the component by default. You can select a label with your mouse and move it around.
    info

    Best Practice: Using Labels will make your life much easier once your diagram becomes bigger and more complex.

    1. Locate the Style area in the properties panel and change the stroke color of the source to green. Use one of the predefined colors or add your own, by clicking on a color. This will open the color dialog where you can adjust it.

    You need to connect the source and the pool, so that the resources can flow from the source into the pool.

    1. Select the Resource connection (c) from the components bar.
    2. Click on the source to start your connection.
      You will notice that the source will be highlighted in yellow as soon as you hover over it to indicate it is ready to receive a connection.
    3. Click on the pool to establish the connection between the two components. 
    4. Type chop” into the Label text field and hit Enter to confirm.

    Take a look at the Navigation bar at the top. You will notice that the name is still “New Diagram” but all your changes have been saved. Diagrams are saved automatically, so there is no need to do this manually. However, you should always give them a proper name.

    1. Click on the filename to open the File Management dialog.
    2. Type the new name of your diagram into the first text field. 
    3. Click save to confirm your changes.
    info

    You can also add a description, an APi token (for game engine integration) and Tags to your diagram. The little bin icon allows you to delete it.

    Contents

    All Rights Reserved © Machinations S.àr.l

    8217, Mamer, Luxembourg, accounts at BGL BNP PARIBAS, VAT number: LU30464284

    We use cookies for marketing and analytics. We also share information about your use of our site with our marketing and analytics partners who may combine it with other information that you’ve provided to them. You consent to our cookies if you continue to use our site. Learn more