In this series of posts, I’m talking about putting together a simulation I’ve built called CHsim. It’s designed to simulate the way Chain Heal will behave in Warlords of Draenor – including interactions with player positioning, talents, incoming damage, Riptide, and Mastery bonuses.
My last post in this series discussed why I’m developing CHsim, and I left off by pointing out some good reasons why I’m not using SimCraft to achieve my goals. Today, I’ll be expanding upon a feature which CHsim does have which SimCraft doesn’t really; player positioning. CHsim simulates the positioning of a raid in 2D space (like a top-down view of the fight) whereas I have it from Theck that SimCraft doesn’t track positions in 2D space.
Give Me Some Space, Bro!
One of the unique things about Chain Heal is that it’s highly local. By this, I mean that the effective healing of the spell is determined by who is nearby and how they are positioned relative to every other player. In order to make any kind of realistic model of Chain Heal, it’s obviously important to take into account how players bunch together (or fail to, as the case may be!). There are two threads to this; one is putting players on the ground to start with, and the next is calculating which players Chain Heal can jump to given the last player it targeted. Today, I’ll only cover the first bit (the second is somewhat more technical).
Now, there are several different ways that you could model how players spread out in a raid. I chose a simple but effective one based around the idea that players tend to form bunches together which gets more packed towards the centre. I settled on a good method for making realistic player layouts; make the probability of a player being found r yards from the centre of their bunch be proportional to 1/r and it looks like this;
So that’s really awesome because it means that your players will be “loosely stacked” – the kind of situation we usually care about when doing TheoryCraft. It takes quite some fiddling to go from this idea to a program which makes it work, though. One problem is that while you know what it should do, you have to place the players randomly around the space with this probability of being distance r from the center. The real key there is to do it randomly – it requires a bit of skill which I’ve picked up as part of my PhD (people with experience know that it’s harder than it looks to sample from this kind of distribution).
The code above is a bit of what I implemented to make this work, but the details don’t really matter for this discussion (if you do want to talk about it, just ask). In the end, I can easily get it to place 20 players with this kind of radial distribution just like a Mythic raid will (hopefully) look;
So that’s the first building block of a Chain Heal simulation – putting players in the right places! With a bit of fiddling, I have been able to make it so that you can make several different bunches of players – tanks, healers, melee – and I was tweeting about it a while back.
Next time, I’ll talk about the kind of decisions you have to make when setting players’ health bars at the start of a fight and the impact that has upon the simulation.
I decided that showing you pictures of Chain Heal bouncing would be more fun, so I’ll put off health and healing for another time. Tune in next week for cool pictures of Chain Heal bounces and – gasp – GCSE level mathematics!
Have you ever made a simulation? Do you have some cool ideas for features I could implement? Let me know in the comments and I’ll credit you if your idea is implemented!