Machinations Documentation
  • What is Machinations?
  • ☉Getting Started
    • Explore
    • Interface
    • Framework Basics
    • How-To Videos
  • ▷ Simulations
    • Run Modes
    • Charts
  • ⦽ Basic Nodes
    • Pools
    • Sources
    • Drains
  • ⇢ Connections
    • Resource Connections
    • State Connections
      • Label Modifiers
      • Node Modifiers
      • Triggers
      • Activators
    • Labels
  • ⧰ Advanced Nodes
  • Converters & Traders
  • Gates
    • Sorting Gates
    • Trigger Gates
    • Mixed Gates
  • Registers
    • Math.js Functions
  • Delays & Queues
  • End Conditions
  • Artificial Player
  • ✑ Nodes Properties
    • Activation Modes
    • Pulling & Pushing Resources
    • Filter (Colour Coding)
  • ⚯ Collaboration
    • Live Collaborative Editing
    • Public Diagrams
    • Google Sheets
    • Tags
  • ♔ Accounts
    • User Profile
    • Pricing
    • Billing Policy
    • Team Management
  • ☆ Tips
    • Shortcuts
    • Best Practices
  • ⚙️Unity Plugin (UP) & API
    • Game Engine Plugin
    • Quick Start
    • Main Concepts
    • Real-Time Sync
    • Unity Integration Guide
    • Known Issues
    • Key Features
      • Game-Aware Analytics
      • Local Cache
      • Game State Awareness
      • Data Formats & Handoff
  • ≏ Evolution
    • Changelog
    • Framework Diff Log
  • 〄 Localisations
  • 🇷🇺 RU by Lev "evlko" Kobelev
Powered by GitBook
On this page
  • Converters
  • Traders
  • Try out Converters and Traders live:

Converters & Traders

transmute or exchange Resources

PreviousLabelsNextGates

Last updated 4 years ago

Converters and Traders use only 1 Step to both get the input and execute the command.

Converters

Converters transmute one or more Resources into another.

Converters have 4 and actions that Pools do. Set these in Properties > Activation/Action.

Converters are designed to model things like factories that turn raw materials into finished products. In League of Legends, for example, you would use a Converter to forge a Hextech Key out of 3 Hextech key fragments.

In the example diagram below, the Converter will automatically pull 3 Resources every time step from the Key Fragments Pool, and forge them into a Key. When there won't be enough Key Fragments (3) to forge a Key, the Converter will continue to pull Resources (emphasised by the blinking Resource Connection), but it will only succeed when the Pool will once more contain at least 3 Key Fragments.

The rates at which Converters consumes one type of Resource and produces another are given by the Labels on its input and, respectively, output Resource Connections. In the example above, the Converter drains 3 key fragments and produces 1 key.

The Converter Equivalent may come in handy if you need to limit the output of the conversion.

By combining a Drain and a limited Source, you can get a limited Converter that can produce only a limited amount of Resources as its output.

Traders

Traders are Nodes that cause Resources to change ownership when fired: two players could use a Trader to exchange Resources.

Traders require that the 2 types of Resources being traded be differentiated through Colour Coding. The construct will have 2 pairs of input-output Resource Connections, each of a certain colour (eg: 1 red coming in - 1 red coming out; 1 blue coming in it - 1 blue coming out).

All input and output Resource Connections need to be colour coded, even if one of the colours is the default Black. To do this, you need to tick "Colour coding" in the Functional Resource Connection panel on the right. [The Colour Coding box ticks automatically when choosing a different colour than the default, from the drop-down beside it.]

Read more about Colour Coding:

Use Traders when a given number of Resources of one type is exchanged for (not converted into) a given number of another type. This is ideal for any situation that resembles shopping: the merchant receives money, and the customer receives goods in a stated proportion (the price).

If either the merchant or the customer does not have the necessary Resources, the trade cannot take place.

A trading mechanism can be constructed by two Gates connected by a Trigger ensuring that when one Resource is received, the other is returned in exchange.

Converters vs Traders

From a player's perspective, Converters and Traders have almost the same function: pass a number of Resources to it and get a number of other Resources in return.

From the designer’s perspective, however, they are definitely not the same. When activating a Converter, Resources are actually consumed and produced, and therefore the total number of Resources in the game might change. In contrast, activating a Trader leads only to one exchange; the number of Resources in the game stays the same.

Try out Converters and Traders live:

Converters act exactly as a that triggers a , consuming one Resource to produce another. However, the Converter Node executes the conversion in ONE time step, as opposed to the equivalent construct, which requires 1 time step for each Node to execute its job. See example below.

Traders have 4 Activation Modes - select one of them in Functional > Activation.

Watch the gif below, showcasing a Trader and a Trader-like system, working side by side.

🔧
Drain
Source
🕹️
Converters and Traders Public Diagram
🔧
Activation Modes
Pulling & Pushing Resources