In the third installment of the tutorial, we will look at the zombie of the game economy and show how to work with the other four machinations elements - the producer, the consumer, the converter and the trader who are an inevitable part of most of the game's economic systems.


Andrew Rollings and Ernest Adams, in their publication in 2007, identified four basic elements of the economy in games:

  • Source (Producer) - Produces resources
  • Drain - consumes resources
  • Exchange (Exchange) - exchanges one type of resource for another
  • Trader - allows players to exchange resources between themselves or between game elements

There are 4 other machinations of the same name built on this idea. Let's take a closer look.

Source (Producer)

If you've ever played Warcraft, you'll remember the gold mines. They regularly produce a number of raw materials, the number of these raw materials being affected by the number of workers in the mine. How to express the relationship between the number of resources and the speed of their production has already been shown in the Modifier chapter. The Missing Article of the Gold Mine is just the producer.

The producer produces raw materials depending on their type. Again, there are four variants: automatic, interactive, passive and OnStart, and this time with no different behavior from other elements. Although it is possible for the producer to set the mode, nothing will affect it. The producer only produces raw materials in an amount equal to the value of all output streams. The format of these labels can be entered in the same way as in the warehouse by using value, random expression or fraction. However, the use of "draw" or "all" does not work logically.

But beware, the producer is not taken. If you determine the outputs of the manufacturer using the probability, each coincidence is generated separately! That's why you can also combine label types (which is not the gateway).

Producer can also be used as a regular trigger. If the modifier with the "*" tag is output as the current output, the trigger trigger element will be activated once at each interval. This illustrates how the producer can be used, you can see examples of official documentation.

Drain (Konzument)

When SimCity grows in your city, you have to pay more and more money each month for a feedback loop. At regular intervals, you will deduct from your bank account a certain amount of money (s) that is forever destroyed. This mechanics represents the economic element of the consumer.

The console is the opposite of the producer, with all the requisites. Apart from the fundamental difference that instead of creating raw materials, they are destroying, they differ in two things:

  • It can have the specified mode in two variants - pull any and pull all. Their meaning remains the same as everywhere else.
  • If the trigger output (status modifier is marked as "*"), it is triggered only when it receives all raw materials from all input streams (ie, unlike the producer at the end of the stroke or interval).

You can see the official documentation again for use demonstrations .

Converter (Currency)

When you use Gold and other raw materials to buy units and buildings in Warcraft, the converter enters the scene. When you convert a few thousand points of fame into Risen for 1 skill point, you use the converter. In short, wherever the raw materials of one type are spent in exchange for raw materials of another type, it is necessary to define the way of exchange and that is the element in Machinations.

Conceptually, the converter can express itself using the consumer, trigger, and producer as follows:

Download converterExample.xml

As you can see, on the one hand (inputs), the converter consumes a certain amount of resources and on the other (outputs) it produces a different quantity (or other type) of raw materials. The options for defining the labels of inputs and outputs are therefore the same as for the producer and the consumer.

As with the consumer, the trigger can be its output and can be in one of two modes: pull all and pull any. However, the transaction will only occur after all input streams have been satisfied, so in the case of pull any mode, raw materials are only consumed and stored. Once they receive the raw materials from the remaining streams, they make the appropriate amount of transactions. Eg following situations:

Download converterExample2.xml

Once raw materials arrive in store B, they continue to be taken from store A. If later we deliver raw materials from store C and send them to the converter, the corresponding amount of raw materials is produced, depending on how many have been previously taken from store A.

Trader

A trader is an element that returns a certain amount of raw material of another type, provided that both parties have sufficient raw material to carry out the transaction. This is the fundamental difference between the converter and the trader, though at first glance they seem the same.

Conceptually, the trader can be described as follows:

Download traderExample.xml

Upon starting the red gate, 3 raw materials are removed from the A warehouse owned by Player 1 and moved to Storage B (Player 2). Then a black gate is triggered by a trigger that moves 2 raw materials from the C field 2 player to the player D pool 1. When the store C does not have enough raw material to execute the transaction (> = 2), the red gate is blocked and the transaction can not be made.

However, the trader takes the concept far further and allows for more complex combinations, for example, when you get 100 stones in exchange for 50 gold and 100 wood. You can combine almost anything (see below).

The merchant may also be incomplete. This occurs if it has less than 2 inputs or 2 outputs. If the gate is incomplete, it behaves exactly as the converter.

The last convenience of this element is the mode. This can be of two types:

  • Pull all - a strict trader who only carries out a transaction if there is enough raw material on both sides
  • Pull any - the transaction will take place even though there is not enough raw material on both sides. Missing raw materials are ignored and replaced only as many as are actually available.

The trader does not seem to differ much from the converter. And in a way it's true. But one major difference would be - while the converter consumes a certain amount and creates a different amount of raw material, the trader always operates with a constant number, and there is no way he could destroy or multiply the raw material (if it is not incomplete, it behaves just like a converter) .

For example, in regular RPG games, most traders are actually represented by a converter. Always willing to buy everything the player offers and virtually duplicate raw materials because of the infinite amount of gold. Even though the player just exchanged one raw material (such as armor) for 50 gold, this gold was generated.

But if the vendor had a limited amount of gold, he would be a trader. It would not be possible to duplicate or destroy the raw materials. As soon as gold reaches him, no further transaction will take place, and thus no new gold raw material will be generated that would add to the economic cycle of the game. Traders therefore ensure that the amount of raw material in circulation after the transaction does not change, while the converter does not.

For this reason, in single player models, a trader is too often absent and is a rare one. In multiplayer, however, it has a strong representation (for example, Catan's settlers are built on a merchant element).

Finally, I give some examples from practice:

Download traderExample2.xml

In Part A, you may notice some of the most typical variants of the merchant as well as the first fundamental use of color coding. When you test the diagram, you can see that red input sources only return to red output streams, etc. You will learn more about color coding later, but in the case of a merchant, this is a key element you will most certainly need.

In Part B, you can see an example of the merchant's first trick. At first glance, it may seem that the raw materials are evenly distributed. The left player sacrifices 2 black and 3 red in exchange for 3 black and 2 red. But if you try it, you will see that it is not. Instead, the left player will receive 5 reds and 5 right blacks. A complete trader for each type (color) may have defined 2 or more inputs, but only 1 output! The other outputs ignore and all the raw materials are directed to one particular one.

So, in C and D, you can see two possible solutions. Either way, you can find out how to distinguish between two different types of raw materials (Part C, replacing the black and red right players with blue and green), or combine two merchants, link them to the gate, and condition them so that did not run if one of the parties did not have enough raw materials of all types to carry out the transaction.

Warcraft at a glance

Now that we know the 4 basic economic elements of Machinations, let's show how this could work in practice. Here is a simplified model of the economic system of Warcraft 3:

Download warcraftSimple.xml

At the center of everything, the basic economic raw materials are gold and wood. You can invest in two pillars - peoni to provide higher income, or an army that will prevent you from attacking enemies. You can place peons either downhill or send them to the forest. And you can also exchange raw materials with a teammate at a certain price ratio.

The model is really very simplified and there are a lot of mechanics and rules missing, but it is enough to illustrate the basic economic elements of Machinations. We will show the complete model and discuss it in one of the next articles. Try to play the model now and again. Above all, what is the difference between buying peons / armies and exchanging raw materials with a teammate.

Certainly you've all met two producers. Both are in automatic mode, but raw materials will actually start producing after the peon has been assigned to the appropriate area (the status modifier will increase the revenue by 1 resource per interval with each peon).

The contender here plays practically an illustrative role. It is triggered by a random trigger with a probability of 15% when it consumes one unit (if the player owns one).

What is more significant are the buy and sell buttons. They all shift a certain amount of raw material to another. In the case of a peon, he exchanges 50 gold and wood for one worker. In the case of the army turn 100 gold and 50 wood. And in case of sale, it exchanges 50 units of wood per 100 units of gold and vice versa. So what's the difference?

Imagine you have 600 woods. Try to replace them with a goldsmith. Soon you will find that it is not possible. After ten transactions, the player gets gold, and other transactions are not possible until the teammates are returned again through the purchase of the wood. The trader therefore ensured that the quantity of raw materials in the transaction did not increase.

Now buy the peons for the 600 woods. You can easily see that the raw material converter does not move but generates. He only swallowed 600 woods and 600 gold and produced 8 peons. I also recommend paying attention to the pull all mode, otherwise transactions will occur even if you do not have enough raw material.

Also note the colors and how they affect converters and merchants. Although color coding is going to be in-depth until a little later, you will at least know how it is used. In the next part of the tutorial, we look at the remaining Machinations and cover the rest of the tools. So stay tuned, we're back in two days:)

原文


原文