Quests & Mercenaries: Scratching the surface...

Quests & Mercenaries: Scratching the surface...

1. Rise And Shine!

First, I recommend reading the FAQ. They answer basic questions about the game (incuding mercenaries) I will not mention here.

Second, the provided information is for players who take no external measures to prevent mercenaries from dying. So basically, normal gameplay without anything that can be considered cheating is assumed.

Mercenary recruitmentThere are four ways to acquire mercenaries:

One free mercenary is available at loading your savegame with version 0.23 (or later) for the first time.

If you buried your last mercenary, you will get a new one after 8 hours passed.

You will receive an additional mercenary for a successful recruitment quest.

You can immediately buy a new mercenary for 40 rubies.Options 3 and 4 are only available if you have 4 or less mercenaries (including potential mercenaries from ongoing quests).

Mercenary bonus typesEach mercenary has one of the following bonuses:

+ Rubies from Quests [%]

+ Hero Souls from Quests [%]

+ Gold from Quests [%]

+ Skills Activated by Quests [%]

+ Recruitment quests speed [%]

+ Extra lives (free resurrections)Like relics, mercenaries have different rarity tiers. That rarity determines the magnitude of the bonus.

Mercenary distributionBoth bonus type and rarity are random. The following table shows bonus magnitudes and the probability distribution of the rarity tiers:

RarityMagnitude (b)Extra livesProbabilityProbability (fraction)Common5%-60.724%2500/4117Uncommon7.5% (8% displayed)-24.29%1000/4117Rare10%19.716%400/4117Epic20%23.643%150/4417Fabled50%31.214%50/4417Mythical200%40.304%25/8234Legendary500%50.097%4/4117Transcendent2000%60.012%1/8234

2. Time To Quest!

Categorized by quest time (t) there are 10 different quest classes.

The following table summarizes these classes. The factor f is used for calculating quest rewards. The rewards per second are higher for shorter quests.

tt in [d]t in [d]fEXP5 min0.0031/2883.20.35%15 min0.011/962.751.04%30 min0.0211/482.52.08%60 min0.0421/2424.17%2 h0.0831/121.758.33%4 h0.1671/61.516.67%8 h0.3331/31.2533.33%24 h111100%2 d220.8200%

Categorized by rewards, there are 6 possible quest types:

Hero souls

Rubies

Relics

Random skill activations

Gold

An additional mercenary

Christmas presents (christmas 2016 seasonal quests, presents randomly contain rubies or relics, among some other useless things like Bloop Coins. Candy cains are possible, too. They are highly valuable, as you can use them to revive mercenaries instead of using rubies.)

In total, these are 46 different regular quests.

3. Level Up!


Quests & Mercenaries: Scratching the surface... image 31

Gathering EXPMercenaries will level up as they complete quests. Level progress is proportional to the quest time, nothing else. 24 hours of accumulated quests equals one Level Up.

Imagine each second in a quest yields 1 EXP. 86'400 EXP are required for each Level Up.

Technically, a Level Up happens at 99%. If you finish quests with a level 1 mercenary for 23h and 50 min (or 23h and 55 min), he will level up to level 2 with "-1% of the way to Lvl. 3". That still applies for version 0.25 onwards, but is now displayed as "0% of the way to Lvl. 3".

Level benefitsThe level of the mercenary is a factor for calculating quest rewards. For example, a level 1 mercenary (Noob) will receive one Ruby from a 1-day-ruby-quest. That same mercenary will receive 7 rubies for the same quest at level 7. So quest rewards are growing linear with the level.

4. Quest Reward Calculation

a) Ruby rewardsRuby gains through quests can be calculated using the following formula:

r = (1+b) × m × t × f

with

r ... reward (rubies)

b ... mercenary ruby bonus

(example: b = 0.05 for a common mercenary with +5% rubies from quests)

m ... mercenary level

t ... quest time in days

f ... quest factor (as in the table; chapter 2)

So the quest reward for a 1-day-quest using a level 1 mercenary ("Noob") without a ruby bonus is 1 ruby.

b) Relic rewardsRelic rewards basically follow the same formula as rubies. No mercenary bonus factor is required, as there are no mercenaries with such a bonus at the moment:

r = m × t × f

with

r ... reward (relics)

m ... mercenary level

t ... quest time in days

f ... quest factor (as in the table; chapter 2)

c) Hero soul rewardsHero soul rewards can be calculated using the following formula:

h = 0.1q × (1+b) × m × t × f

h* = 0.1 × (1+b) × m × t × f

h = h* × q

with

h ... reward (hero souls)

h*... reward as a percentage of Quick Ascension souls q

q ... Quick Ascension souls

b ... mercenary hero soul bonus

(example: b = 0.05 for a common mercenary with +5% hero souls from quests)

m ... mercenary level

t ... quest time in days

f ... quest factor (as in the table; chapter 2)

That reward is directly linked to the souls gained from a Quick Ascension. Thus, the reward is also linked to your HZE (Highest Zone Ever), the levels of the ancients Atman and Solomon, some relic bonuses as well as Phandoryss and Borb and Ponyboy.

That becomes even more obvious with version 1.0: Instead of the number of hero souls, the reward now is displayed as a percentage of q. The amount of hero souls you'll receive is the same, though.

d) Random skill activation rewardsSkill rewards follow the ruby reward formula as well:

r = (1+b) × m × t × f

with

r ... reward (random skill activations)

b ... mercenary skill activation bonus

(example: b = 0.50 for a fabled mercenary with +50% skills activated by quests)

m ... mercenary level

t ... quest time in days

f ... quest factor (as in the table; chapter 2)

All nine skills are possible, even Energize and/or Reload. Furthermore, different skills are activated: Two random skill activations will never result in Golden Clicks activated twice. Therefore, skill activation rewards are capped at r = 9.0, displayed as "All skills activated".

e) Gold rewardsGold rewards are based on the gold you gain from buying a timelapse (L) for 20 rubies. The following formula applies:

g = 3L × (1+b) × m × t × f

with

g ... reward (gold)

L ... Timelapse gold

b ... mercenary gold bonus

(example: b = 0.10 for a rare mercenary with +10% Gold from Quests)

m ... mercenary level

t ... quest time in days

f ... quest factor (as in the table; chapter 2)

f) Mercenary rewardsr = 1

with

r ... reward (number of new mercenaries)

Yeah, that was a tough one...

g) Christmas presentsr = m

with

r ... reward (number of new mercenaries)

m ... mercenary level

Another complex formula. There's only a 4-hour version available for christmas quests.

Non-integer resultsWhile calculating ruby-, relic- or skill activation rewards, you may get values like r = 0.53 or r = 4.60. In the game, these results will be displayed and applied like in the following examples:

r = 0.53 → 53% chance of a ruby

r = 4.60 → +4 rubies and 60% chance of another

respectively

r = 0.53 → 53% chance of a relic

r = 4.60 → +4 relics and 60% chance of another

respectively

r = 0.53 → 53% chance of a random skill activation

r = 4.60 → +4 skill activations and 60% chance of anotherThat same pattern actually applies for hero souls, too. However, usually the chance of an additional hero soul will not be displayed.

For higher ruby- or relic rewards the "chance of another" will not be displayed:

r = 11.20 → 11-12 rubies

5. Failed. Encountered An Immortal.


Quests & Mercenaries: Scratching the surface... image 110

Rules for deathUnfortunately, mercenaries are not invincible...

Originally posted by Asminthe (Developer):Each mercenary will die after spending x seconds on quests. It is unaffected by which quests they were doing.

x is different for every mercenary and a new value of x is selected when a mercenary is revived.That time x is determined as follows:

Originally posted by Asminthe (Developer):Some random rolls that attempt to keep the average lifespan of mercenaries roughly what it was before the change.

It basically repeatedly rolls as though the mercenary were doing 1-day quests in the previous system until one fails, then picks a random time on that day that the mercenary will die.Using the old system (version 0.23 and 0.24), the chance of death for a 1-day quest was 20%. So the number of days a mercenary will suvive follows a geometric distribution[en.wikipedia.org] .

Assuming a uniform distribution for the "random time on that day" is added, the average x is 4.5 days. Not only that, but the expected remaining lifetime is 4.5 days, too. No matter how long the mercenary already survived. See this for an explanation.

That way I simulated x (in days) for 10'000'000 mercenaries, leading to the following histogramm:

In theory, each x from one second to infinity is possible.However, high x are very unlikely. With a probability of 0.014% it is even possible that a mercenary dies within the first minute of doing quests.

(Actual lifetimes x are somewhat limited due to the random number generator the game uses.)

Revive costsIf a mercenary dies, you can either bury (that removes him from your mercenary list) or revive him for a determined amount of rubies. That amount grows exponentially with the mercenary's level, using the following formula:

R = ⌈10 + 1.5^m⌉

with

R ... revive cost in rubies

m ... mercenary level

As you can see, m is the only determinant here. Revive costs are not affected by the mercenary's rarity or anything else.

Instead of rubies, you can use extra lives if you have an appropriate mercenary.

The following table shows rank names and revive costs for relevant mercenary levels (m):

mRankRevive cost1Noob12 rubies2Rookie13 rubies3Journeyman14 rubies4Expert16 rubies5Master18 rubies6Grandmaster22 rubies7Legend28 rubies8Demigod36 rubies9Demigod +149 rubies10Demigod +268 rubies11Demigod +397 rubies12Demigod +4140 rubies13Demigod +5205 rubies14Demigod +6302 rubies15Demigod +7448 rubies16Demigod +8667 rubies17Demigod +9996 rubies18Demigod +10♥♥♥♥ rubies19Demigod +112227 rubies20Demigod +123336 rubies.........

Your mercenary will finish the quest if you revive him without facing the risk of another death!That's because the remaining quest time is added to his lifetime x.

6. I'm Getting Old...


Quests & Mercenaries: Scratching the surface... image 131

As you may have recognized, revive costs are growing exponentially while quest rewards are growing only linear. That affects a mercenary's efficiency (interpreted as an output-input-ratio). Calculating the quest reward/revive cost ratio (c) for different levels results in the following graph:

As you can see, leveling up your new level 1 mercenaries will make them more effective. But the important message here is that each mercenary eventually will suffer so much from arthritis and arthrosis become so inefficient that you're better off not to revive him. Using a new Noob recruit becomes better. R.I.P.

That "retirement level" depends on various factors, like reward type (rubies, hero souls etc.), quest class, mercenary bonus and rarity.

In any event, mercenaries have a limited lifespan. Do not expect to be able to use a mercenary forever!You cannot accept that? The ruby cost is an insult to you? Read this.

Simulation approachThe interesting question is wether it's worth to spent rubies for a dead mercenary or not. On average, it's a good idea to revive a mercenary if the revive costs are lower than the expected benefits until the next death. In other words, difference between expected benefits and revive costs ("net profit") has to be greater than 0.

Knowing how the lifetime x is calculated, I will use simulations to find out, wether it's a good idea to revive a mercenary at a certain level or not. Each single simulation works as follows:

I define basic parameters (mercenary level, quests etc. See chapter 7.)

I generate 1'000'000 random mercenary lifetimes x with X = Y + Z + t:

• Y is a geometric distributed random variable Y ~ geo(0.2)

• Z follows a uniform distribution: Z ~ uni(0, 1)

• t is the quest time, reflecting the quest the mercenary died in

I use the Mersenne Twister[en.wikipedia.org] as a random number generator for that purpose. For the sake of my analysis, I assume both Y and Z independent and identically distributed. I also assume Y and Z independent to each other.

I calculate how many quests each mercenary can solve at each level with the corresponding rewards.

I add up all rewards until death (without the rewards of the mercenarys final quest).

I calculate the difference between the mean of these 1'000'000 rewards and the revive costs at the starting level to receive an "average net profit."

On average, it's worth to revive a mercenary if the net profit is greater than 0.I define the last level with positive net profits as the retirement level.My model assumes that mercenaries are always doing the same quests (e. g. only 2-day ruby quests) and that they died in such a quest, too. See Chapter 9 for limitations.

7. Retirement Determinants


Quests & Mercenaries: Scratching the surface... image 149
Quests & Mercenaries: Scratching the surface... image 150
Quests & Mercenaries: Scratching the surface... image 151
Quests & Mercenaries: Scratching the surface... image 152
Quests & Mercenaries: Scratching the surface... image 153
Quests & Mercenaries: Scratching the surface... image 154

As revive costs are constant for a certain level, important determinants for the "retirement level" of a mercenary can be found in the quest reward formulas:

a) Quest classThe retirement level depends on the quest class or - to be more specific - quest time t and the corresponding reward factor f. It's more likely to earn the rubies spent for a ressurrection while sticking to short quests as they have a higher f. So it's a good idea to focus on 5-min quests as long as you're playing the game.

The following graph illustrates that. You can see average net profits as a function of the mercenary level m for mercenaries doing 5-minute resp. 2-day ruby quests, both without a bonus (b = 0):

While reviving mercenaries without a bonus for ruby quests is barely profitable with 2-day quests, it's perfectly fine with 5-minute quests. Up to level 13 at least.

b) Mercenary bonusThe mercenary bonus b is another possibility to increase rewards. A high rarity grants a high bonus and higher rewards for the respective quest type.

The following graph compares 1-day ruby quests done by a mercenary without a ruby bonus (b = 0) resp. a legendary mercenary with a ruby bonus (b = 5 = 500%):

c) Quest type and Reward valuationCalculating the difference between revive costs and expected quest rewards is possible for ruby quests. However, if we use hero soul quest or other quest types, we're comparing apples and oranges. We have to "translate" non-ruby quest rewards into rubies.

For hero souls, an intuitive way to do that is the Quick Ascension. Here we buy hero souls for rubies, supplying us with a "price": 50 rubies per Quick Ascension (q).

The base reward for ruby quests is one ruby (1-day quest, Lvl. 1 mercenary, no bonus). For hero souls, it's 10% of a Quick Ascension, or 0.1q × 50/q = 5 rubies. As we can see, hero soul quests are five times better than ruby quests. Hence the retirement level of a mercenary is higher if you stick to hero soul quests. Furthermore:

If you always stick to hero soul quests while maintaining positive net profits, you will - on average - receive more hero souls per ruby compared to buying Quick Ascensions!

The following graph compares average net profits of hero souls- and ruby-quests, both cases without a bonus (b = 0) doing 1-day quests:

It's a bit more difficult to find a price for relics or skill activations. In theory, we could use the option to buy 3 Random Relics for 40 rubies in the shop, making a relic worth 40/3 = 13.33 rubies. However, that option would severely overvalue relics. It is not recommended to buy relics in the first place.

Quest reward calculations imply that one relic resp. random skill activation is worth one ruby. Assuming that, we can treat these quests like ruby quests.

d) EXPThat's a minor point. But it is actually better to revive mercenaries who are close to a Level Up. Imagine two dead mercenaries at level m = 6, one at 0% EXP (Lvl. 6.00) and the other at 99% EXP (Lvl. 6.99). The revive costs are the same for both, but while the 6.00-merc has to do a full day resp. level of quests with a factor m = 6. The 6.99-merc can start quests with a factor of m = 7 right after the next quest. More experienced mercenaries at the same level can use a higher share of their new lifetime x to do quests with higher rewards.

I've illustrated that in the following picture. Showing "net profits" at different levels with mercenaries constantly doing 5-minute ruby quests: (No ruby bonus, b = 0)

That effect occurs for quests with t < 24h. It doesn't happen for 1- and 2-day quests as the quest duration is an integer multiple of the level up interval (1 day). The following picture shows net profits of Uncommon mercenaries (b = 7.5%) only doing 1-day resp. 2-day ruby quests:

e) Best Case vs. Worst CaseAll these things work together and determine wether it's worth to revive a mercenary or not. The following graph compares the extremes,

Mercenary without a proper bonus, doing 2-day ruby quests

vs.

Transcendent mercenary doing 5-minute hero soul quests with a 2000% bonus:

8. Retirement Level Simulation

Ruby QuestsHero Soul Quests

Sample sizeIn this chapter I will provide specific retirement levels as a result of multiple simulations. Each cells value was determined by simulating 1'000'000 lifestimes per datapoint with a specific vector of start levels. That's vector I used: m = (1.00, 1.50, 1.99, 2.00, 2.50, 2.99, 3.00, ... , 30.00), a total of 88 start levels.

That leads to 1'000'000 × 88 = 88'000'000 mercenary lifetimes per cell. Hence the total number of both tables is 2 tables × 88'000'000 × 9 bonuses × 10 quest classes = 15'840'000'000 lifetimes. From a statistic viewpoint that should be more than sufficient. (My poor laptop, crunching all these numbers...)

InterpretationDisplayed are average values which should be treated the appropriate way: It's ok to base decisions on average values/expected values if you have to make that decision very often and if you're somewhat neutral towards risk. While that's a reasonable assumption for mercenaries at lower levels with low revive cost, it doesn't hold for high level mercenaries: People are usually not risk neutral when it comes to high values like a few hundreds of rubies, and high level mercenaries are rare, so you won't have to decide about their fate that often.

The realisation of a single lifetime x and a couple of lifetimes still are random. So if you're unlucky, your merc can die in the very next quest and you will have lost rubies for almost nothing. In the long run, it will average out and you will have more rubies (or other resources worth rubies) as long as you refrain from reviving mercenaries at too high levels. See chapter 9 (Limitations) for further notable points.

Retirement levels for : (Can be used for relic- and skill activation quests, too.)

f 3.20 2.75 2.50 2.00 1.75 1.50 1.25 1.00 0.80 t 5 min 15 min 30 min 60 min 2 h 4 h 8 h 24 h 2 d (No bonus) (0%) 13 13 12 12 11 11 10 10 9 Common (5%) 13 13 13 12 12 11 10 10 9 Uncommon (8%) 13 13 13 12 12 11 11 10 9 Rare (10%) 13 13 13 12 12 11 11 10 9 Epic (20%) 14 13 13 12 12 11 11 10 10 Fabled (50%) 14 14 14 13 13 12 12 11 11 Mythical (200%) 16 16 16 15 15 14 14 13 13 Legendary (500%) 18 18 18 17 17 16 16 15 15 Transcendent (2000%) 22 21 21 20 20 20 19 19 18

Retirement levels for : f 3.20 2.75 2.50 2.00 1.75 1.50 1.25 1.00 0.80 t 5 min 15 min 30 min 60 min 2 h 4 h 8 h 24 h 2 d (No bonus) (0%) 18 17 17 16 16 16 15 15 14 Common (5%) 18 18 17 17 16 16 15 15 14 Uncommon (8%) 18 18 17 17 16 16 15 15 14 Rare (10%) 18 18 17 17 16 16 15 15 15 Epic (20%) 18 18 18 17 17 16 16 15 15 Fabled (50%) 19 18 18 18 17 17 16 16 15 Mythical (200%) 21 20 20 20 19 19 18 18 17 Legendary (500%) 23 22 22 21 21 21 20 20 19 Transcendent (2000%) 26 26 25 25 24 24 24 23 23

9. Limitations

The information provided in this guide is not enough to develop an overall mercenary strategy. There are some things to note regarding my assumptions, and a few additional factors that can influence the retirement level:

I've not accounted for opportunity costs: Reviving a mercenary prevents you from earning rewards with a new Lvl. 1 Noob mercenary, what should be considered.

A new mercenary isn't free either: You can instantly buy a new one for 40 rubies, but that's only a good option if all your other mercenaries can receive more than 40 rubies for a 8-hour ruby quest. That's highly unlikely, so it's usually better to do recruitment quests. On the other hand, that costs you the rewards of a 8-hour quest. That reward depends heavily depends on your other mercenaries (levels, bonuses etc.). For that reason I decided to omit opportunity costs from my analysis. Actual retirement levels may be slightly lower as a result.

With a few assumptions, dukC2's approach contains these opportunity costs.

I assumed that you do only quests from a particular quest class (e. g. only 4-hour quests) for the entire lifetime. That's usually not possible of course. But that isn't that much of a problem as you can simply use your "average quest length". Alternatively you can look at the next (longer) quest class or even always rely on the 2-day columns if you want to be on the safe side.

Furthermore, I assumed that you do only quests from a particular quest type (e. g. only Hero Soul quests) for calculating specific retirement levels. That's extremely unlikely as well, as you're not able to influence the selection of quests you get. The best way to handle that on the one hand highly depends on your overall quest-/mercenary strategy, and on the other hand depends on your valuation of the different rewards.

It is generally not a bad idea (if you don't like too much risk) to lower given retirement levels by one, because the average net profit at the retirement level is similar to a Lvl. 1 mercenary or even lower in many cases.

The tables contain the highest levels with a positive net profit. But in some rare cases, it can happen that there are levels with a negativ net profit even before. The reason is the EXP-effect. Look at that graph for an illustration. Displayed are the results of a common mercenary with a ruby bonus (b = 5%), doing 30-minute ruby quests:

The 1st table in chapter 8 states a retirement level of 13, but even at that level the net profit becomes negative for a short time. However, that phenomenon is an exception, so it poses no problem.

Ruby liquidity. Even if it's a good idea to revive a level 16 mercenary in theory, depending on your other ruby expenses you perhaps don't have 667 rubies left...

That's pedantry for sure, but compared to the one I used for the simulations, the game itself uses a less sophisticated random number generator leading to a rather low amount of possible mercenary lifetimes. Thus, the average lifetime is slightly higher than 4.5 days:

Originally posted by Nemonical-Yves:Earlier today I brute forced through all 2147483646 possible seeds of the RNG that is used by the game. The RNG itself delivers a linear distribution. However, the part that calculates the partial day is not exactly linear for two reasons. First, the modulus operation is slightly unbalanced since the maximum seed is not evenly divisible by the number of seconds in a day. Second, only 20% of all seeds (those that follow one that results in death on that day) can participate, those are not perfectly balanced.

The exact average lifetime is:

4 days, 12 hours, 0 minutes, 10.758318 seconds

It basically is slightly more benevolent than a perfectly linear random distribution.

On a side note, due to the quantization of seed values the chance to survive a day is not 80%. It is 79.999999962747%, close enough I guess.

Intended or not, our most generous devs provided us with almost 11 additional seconds, yay!

References

Thanks to...

...Reddit-User "svayam--bhagavan" for code fragments he posted here.

...Reddit-User "Qnopsik" for the revive cost formula.

...Nemonical-Yves for tormenting the random number generator on various occasions

...my Clicker Heroes clan for delivering additional data for testing reward calculation formulas.

...Developer Asminthe for explaining the ver. 0.25 death system here.

...Reddit-User "Xeno234" for the corresponding code.

...everyone in the comments.

...Microsoft Excel and R[www.r-project.org] . ;-)

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=563465105					

More Clicker Heroes guilds