Sign in to follow this  
Stanlee

Make improving spells less weird

Recommended Posts

Continuing my trend of suggestion threads that explain esoteric mechanics, today we have: improving enchantments!

 

Some of you might be wondering, in a game that's all about rolling 1-100, how enchantments over 100 work.

The answer is Benediction, it's a +5 to the casts so you can get 105. Okay, see ya!

Oh, how do we manage casts above 105? Well, that's handled by this code here

 

  public void improvePower(Creature performer, float newpower) {
    float mod = 5.0F * (1.0F - this.power / (performer.hasFlag(82) ? 105.0F : 100.0F));
    setPower(mod + newpower);

 

Flag 82 is Benediction, newpower is the cast you just made, power is the cast already on the item (at least I assume so, I don't see it establishing this.power anywhere, and if it wanted to use the cast you just made it'd use newpower).

So, how do we translate this? I translate it thusly: for every 21 power below 105, you get an extra +1 to your casts

But there's a catch: it only runs this code if it's trying to improve the power of a cast - if it's first time or you just dispelled, it's a +0

This causes me to use a system by which when a spell I'm trying to get high reaches a certain power, it's dispel time. And the cast after that dispel is a dud.

 

So here's how a graph of this looks

95a8f3de15fca34710a203ec0a178da9.png

 

This is troublesome for a number of reasons.

1) It's counterintuitive. Usually improving takes something good and makes it better, turning your 89QL item into 90QL, but for this the best casts come only from the worst ones.

2) It causes a complete mess with Dispel. Want to improve a CoC cast? Hope you're ready to remove the WoA in the way. Or in the case of mailboxes, hope you're just ready to make a new one, you can't dispel those.

3) Dispel sucks.

 

My suggestion is thus, update the formula to this:

  public void improvePower(Creature performer, float newpower) {
    float mod = 5.0F * (this.power / (performer.hasFlag(82) ? 105.0F : 100.0F));
    setPower(mod + newpower);

4eac34c5a979d674712854d757bbeaf3.png

This has a number of advantages

1) It's intuitive. Better casts beget better casts. 110 casts are now possible! (For instance, 108 cast item gives +5.14, +5 from Benediction, 99.87 cast required so it's still very far from reasonable)

2) You can reasonably improve casts that are dispel blocked. This gives a lot more functionality to things like anti-shatter juice, which in current iteration can cripple casting potential for things like CoC.
3) No more dispelling when trying to improve casts.

  • Like 13

Share this post


Link to post
Share on other sites

Sounds reasonable. +1

One question: How important is dispelling? I mean not necessarily for 100+ casts by a channeling 95 to 100 priest, but for a more humble one, in the low 80s, though with benediction?

Share this post


Link to post
Share on other sites

Sounds interesting like an interesting concept, and seems like  a nice alternative to dispel changes, and more intuitive for priests. 

One small thing to be considered: Isn't the improve cast done after the power roll is greater than current power, so you'd have to change it to calculate the recast bonus beforehand. (Otherwise you could never recast a 105+ if thats the intention)

 

15 minutes ago, Ekcin said:

One question: How important is dispelling? I mean not necessarily for 100+ casts by a channeling 95 to 100 priest, but for a more humble one, in the low 80s, though with benediction?

Dispel works on different code, the dispel power required is a random number between 0 and power+difficulty on a uniform distribution so on average half the power + difficulty so shouldn't be too hard to remove.

 

Edited by Lethyria

Share this post


Link to post
Share on other sites

Thanks Lethyria. But what I meant was not the dispelling proper which works normally. Rather the importance of dispelling vs. going on casting on top of the enchant until a better result appears. If I understood correctly, the best results (100+) can not or not with sufficient probability be reached without dispelling, or not?

Share this post


Link to post
Share on other sites
4 hours ago, Ekcin said:

One question: How important is dispelling? I mean not necessarily for 100+ casts by a channeling 95 to 100 priest, but for a more humble one, in the low 80s, though with benediction?

 

Let's take a look at some numbers!

Using the simulation tool we can easily simulate 5 million CoC casts at 80 channeling (note: I have not toggled Benediction for this, as it causes some errors - the numbers I will use are adjusted for Bene, but this graph is not)

949a648fcc6c23bc9410b71141b53ffe.png

 

We get the following information:

Your mean cast is 38 (selection: -5 to highest. Casts below -5 (0 with bene) won't be ones you ever have on an item, so 38 is the useful mean). This gives a good number of your casts about a +3

 

Now let's go with a standard situation: you have an item with an 80coc cast, you're aiming higher, and you're wondering if you want to dispel.

That 80 gives you a +1 to your casts (1-(80/105))

Assuming no further cast improvements, expected favor to land 90+ is ~1831, 95+ is ~3474

But if you dispel and regularly get that +3 your mean cast suggests you could get, expected favor for 90+ is ~1474, and 95+ is ~2638

This would be about a 20-25% saving in favor

 

However the requirement of dispelling (which can easily rack up the costs due to repeated dispel failures) and the first casts (+0 and may land well above mean, themselves needing more dispels) means the saved favor is likely far lower (to the extent that I'd question if you actually save any). Finding more accurate numbers would require better tools than what is available. If anyone's a programmer, reach out, maybe we can make such a tool.

 

tl;dr it reads like it might be good for lower skill priests, but chances are good it isn't

Edited by Stanlee
  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, Stanlee said:

tl;dr it reads like it might be good for lower skill priests, but chances are good it isn't

 

 

That's a really nice write up and it made me think, which is actually better. So I grabbed the simulator code and I've run some simulations. These could contain errors but I thought I'd publish my results. 

For a 90 channeling without bene priest targeting 90+ 

Scenario Simulations Total Favor Total CoC Casts Total Dispels Shatter Rate
Channeling Bene DispellThreshold Bonus TargetPower ItemQL Count Mean Standard Deviation Mean Standard Deviation Mean Standard Deviation Percentage
90 FALSE 120 70 90 90 1000000 1884.80355 1927.13903 37.696071 38.54278059 0 0 0.024078
90 FALSE 80 70 90 90 1000000 1771.81036 1760.328537 34.702979 34.46202375 3.666141 4.892349651 0.021769
90 FALSE 70 70 90 90 1000000 1747.20379 1722.91571 33.163638 32.63694912 8.902189 10.17218008 0.020778
90 FALSE 60 70 90 90 1000000 1785.29259 1754.824708 32.64765 31.97002326 15.291009 16.51151645 0.020743
90 FALSE 50 70 90 90 1000000 1886.67903 1854.613106 33.222097 32.48616683 22.557418 23.72838891 0.020938
90 FALSE 40 70 90 90 1000000 2029.96437 1998.969093 34.556729 33.82767713 30.212792 31.30089483 0.021989
90 FALSE 30 70 90 90 1000000 2207.1165 2181.822823 36.562311 35.92449874 37.900095 38.97977077 0.022964
90 FALSE 20 70 90 90 1000000 2393.23206 2370.727933 38.840981 38.24951658 45.118301 46.15945039 0.024163


In these results it looks like dispelling at between 70 and 80 is optimal here, although the favor saving is relatively minor at ~7% but the variability drops too, all this lines up with my experience. Next I decided to look at my use case which is usually targeting  100+ with my 98.8 channelling priest with bene, cutting down on scenarios to save time.

 

Scenario Simulations Total Favor Total CoC Casts Total Dispels Shatter Rate
Channeling Bene DispellThreshold Bonus TargetPower ItemQL Count Mean Standard Deviation Mean Standard Deviation Mean Standard Deviation Percentage
98.8 TRUE 120 70 100 90 1000000 2886.3844 3000.008491 57.727688 60.00016982 0 0 0.013358
98.8 TRUE 90 70 100 90 1000000 2548.98228 2545.011081 49.8092 49.71814994 5.852228 7.083256003 0.011675
98.8 TRUE 85 70 100 90 1000000 2473.30198 2455.686937 47.541414 47.16263779 9.623128 10.86668899 0.011018
98.8 TRUE 80 70 100 90 1000000 2440.47793 2417.195517 46.047765 45.53853218 13.808968 15.05200888 0.010539
98.8 TRUE 75 70 100 90 1000000 2444.37644 2418.256861 45.218352 44.62989261 18.345884 19.60044113 0.010506
98.8 TRUE 70 70 100 90 1000000 2484.23439 2455.592028 45.033647 44.38502273 23.255204 24.46384952 0.010455
98.8 TRUE 70 70 100 90 1000000 2480.2323 2452.238948 44.964092 44.32027778 23.20277 24.44914453 0.010416
98.8 TRUE 60 70 100 90 1000000 2625.29794 2592.566541 45.771267 45.01729748 33.673459 34.81578814 0.010475

 

Here it seems that 80 is about the optimal dispel point (15% favor saving), with a slight improvement in total aggregate shatter chance at 70.

 

If anyone is interested in other scenarios let me know.

Edited by Lethyria
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this