Quest to Aztlan
Published 2 years ago
Randomness in Quest to Aztlan
From the beginning we wanted the game to have variety every time you played through several random factors that alter the content at each level (battle and shop).


In every battle we face four enemies; those are randomly selected from a database according to two rules:
1.Positions: The first position is the only in which an enemy leader (melee) can be placed. There is a percentage to determine if the enemy in this position will be a leader or ranged attack. Once resolved the chance, an enemy of the corresponding list is picked randomly. For other positions, an enemy is chosen randomly from the list of enemies with ranged attack.
2.Level: All enemies appear from a certain level, so that when selecting one of a list, it will only contain those who may appear at the current level.
So, in one level you can get multiple combinations of enemies: having or not a leader, different enemies or four equal!


There are four types of objects, two of them, weapons and clothing, have some attributes that enhance the characters. Through a system of weights we establish what attributes should give each object and how much each of them. For each level the item has, it randomly selects an attribute to be increased in response to those weights. For example:
A weapon with weights: Attack = 0.5, action time = 0.3 and critical = 0.2, divide the points between those attributes with a probability of 50% that increases the attack, 30% it decreases action time or a 20% it increases the critic.
Furthermore each point assigned to an attribute does not increased it in the same way but carries a multiplier: attack *2, action time *(-0.2), and critic follows a logarithmic function.
In this way we get a weapon of the same type at the same level that they are given very different attributes, giving the opportunity to the players to choose one that best fits their game strategy.
In addition, we offer a list of items to buy in the store; these objects have been selected from lists of weapons, clothing, consumables and extras attending to a percentage chance that an object placed in the store is the type ‘x’
a bonfire of souls