7. Altars
Altars are another way to counteract the butterfly effect, but complex enough that they deserve their own post.
In this post, I will use "
altars"
as a catch-all term for scripting that offers the player the choice between ATK, DEF and HP for an increasing cost each time. Depending on the hold, these may be referred to as Machines, power squares, etc. In a large hold, there is usually one altar per level, and the later ones give larger boosts, but boosting your stats at any altar increases the cost of all of them.
This counteracts the butterfly effect in two ways. Firstly, a less able player may get stuck and have to buy HP from the altar, which allows them to continue, but at the cost of a possible ATK or DEF increase that would have benefitted them more in the long run. Secondly and more importantly, players are encouraged to save up altar usage for the final altar in a hold, and so better players will make do with less than optimum stats until the final altar becomes available, while less able players have an opportunity to catch up, again at the cost of knowingly cutting themselves off from having the best stats at the end.
Using altars also counteracts another frequent problem: in many holds, after the first level or so the player never runs low on money, so choices involving giving up money for something good are never really choices.
7a. Scripting altars
In the first room of the hold, include a set-up character whose script includes "
Set var AltarCost = 1000"
, or whatever you want the cost of the first use to be. Then, for each altar in the hold, place a character and use this script as a template:
Label start
Wait for entity Player x,y,x,y
If ...
Wait until var "_GR" < AltarCost
Speech "Current Cost: $AltarCost$ Greckles.",Normal,Self,0,.
Wait 0
Go to start
If End
Answer option "[amount] Attack",attack
Answer option "[amount] Defence",defence
Answer option "[amount] Health",health
Question Current Cost: $AltarCost$ Greckles. What is your order?
Label attack
Set var "_ATK" + [amount]
Go to end
Label defence
Set var "_DEF" + [amount]
Go to end
Label health
Set var "_HP" + [amount]
Label end
Set var "_GR" - AltarCost
[increase cost]
Wait 0
Go to start
What this does: First, the script compares _GR (the player's current greckles) with the current cost. If the player can't afford a boost, they are told how much they need. "
Wait 0"
followed by "
Go to start"
ensures the script will loop, but only on the next turn. Then, each "
Answer option"
sets up one of the options the player will be given
next time a "
Question"
command occurs (so remember that a "
Question"
must always come
after the "
Answer option"
s that relate to it).
"
Label"
designates the location in the script the player is taken to after selecting an option. In this case, each label is followed by the appropriate adjustment of ATK, DEF or HP, then "
Go to end"
to skip the following lines so they do not end up receiving all three!
7b. Increasing the cost
The most commonly used formulas for altar cost are the simplest: linear, quadratic or exponential growth.
Linear: For the line "
[increase cost]"
in the script above, substitute "
Set var AltarCost + 1000"
or some other amount. The cost will increase by this amount with each use.
Linear altars are rare, because the later default monsters give a lot more GR than earlier monsters, so the player will be able to afford a large number of boosts (and with this option, architects are especially liable to underestimate the number of boosts the best players will obtain). However, this certainly doesn't mean linear altars can't be used! The initial cost and increment can be adjusted to cut down the number of uses, and the hold can provide other places to spend money. You can use custom monsters with different amounts of GR. Another approach, which I experimented with in Nobard's Hold 2, is to increase _ItemGRMult or decrease _MonsterGRMult (make greckle gates cost more throughout the hold, or make monsters give less).
Quadratic: For "
[increase cost]"
, substitute the following two lines:
Set var "AltarCost" + AltarIncrement + 1000
Set var "AltarIncrement" + 100
(As always, 1000 and 100 can be replaced by other values. Note that you do not need to set AltarIncrement to 0 in the first room of the hold; variables always have the value 0 if they are called on before they have been set.)
Tower of the Sorcerer / Tendry's Tale uses a quadratic altar, so one advantage is that the default monsters were created with this approach in mind. Quadratic altars are rare in usermade holds so far, perhaps because the formula is more complex, though as you can see it is only slightly so. When adjusting the parameters, remember that the first one (1000 in the example above) is the
first increment, between the costs of the first and second uses of the altar; the second parameter (100 in the example above) is how much the increment increases each time.
Exponential: For "
[increase cost]"
, substitute "
Set var AltarCost * 2"
. If you want a lower exponent, multiply by one number and divide by another; for example, the altars in Nameless Fortress multiply the cost by 3, then divide by 2. (This is equivalent to multiplying by 1.5, but DROD:RPG doesn't allow you to enter non-integers.)
Exponential altars have the opposite disadvantage to linear ones. Their cost increases
faster than the default monsters were designed for, so the player will be able to afford fewer uses. It's common for the player to end up with a large amount of money that can't be spent because the next use of the altar is still a long way away. However, there are many ways to offset this. You could use default monsters that give more GR, or increase _MonsterGRMult, either at the start of the hold or in response to an event. Nameless Fortress sets _MonsterGRMult to 400 (remember, all multipliers are percentages) when the player enters the last level. Any monsters left alive in previous levels can be killed for four times their usual GR (eight times, if you have the Lucky Blade). I feel this has ended up well-balanced.
7c. Balancing altars
In holds I've seen so far, architects have not been concerned with making
all three choices well-balanced. The HP option is seen as a last resort for players who have made suboptimal choices, so that they can continue playing but will be unable to get the best possible stats (and sometimes will be cut off from bonus content). There's nothing wrong with this approach; though it would be interesting to see architects trying to make HP-buying a viable choice for optimisers as well.
Most architects do try to balance the ATK and DEF choices against each other, so that the player has three viable strategies for proceeding through a hold (building up ATK, DEF, or some of each) and each strategy is viable and leads to interesting play. Here are some things to bear in mind:
* Usually, all altars throughout a hold offer the same
ratio of ATK to DEF (e.g. if one altar offers 6 ATK or 12 DEF, another might offer 8 ATK or 16 DEF). It's not compulsory to do this; but violating it might make it more confusing for the player to calculate their choices, and might make it harder for the architect to find the right balance.
* Tower of the Sorcerer / Tendry's Tale offers twice as much DEF as ATK, so the default monsters were created with this in mind. This does
not mean that 1:2 is the "
correct"
ratio, or that a ratio such as 1:1 necessarily favours the ATK route. It all goes back to what I said in my first post about monsters' stats. In general, low-HP monsters favour the ATK route and high-HP monsters favour the DEF route. If you have many custom monsters, or even if you use the default monsters in different proportions, then the ratio that best serves the balance of your hold may be 1:1 or 1:3 or some other value.
* From my experience, in all holds where altars offer either ATK or DEF (which, so far, is all holds with altars), either an "
ATK route"
or a "
DEF route"
ends up being superior to a mixed route, except that on a DEF route, you may need to get some ATK to defeat high-DEF enemies such as the Rock Golem. If you want a mixed route to be an equally interesting option, you might consider altars that offer ATK, DEF or a mixture with each purchase -- and the mixture should be such that buying it twice gives more than one purchase of ATK and one of DEF.
Finally, a word about levelling systems. This is where, instead of spending GR to boost stats, on reaching certain levels of REP the player is offered a stat boost. Typically, this works in the same manner as altars: the player can choose whether to boost ATK, DEF or HP. Other than using REP instead of GR -- and therefore being independent of other means to spend money in a hold -- everything I've said about altars should work similarly for levelling systems as well.
____________________________
50th Skywatcher