Assimilation Mystery Heroes
This code is over 6 months old. The code may have expired and might no longer function.
Assimilation Mystery Heroes
IN BETA.
Mystery Heroes with a twist! Upon killing an enemy hero, you will turn into that hero after a short delay. Dying cancels this transformation. Your HP percentage and ultimate charge transfer to the new hero. Dying works like normal Mystery Heroes.
This has some interesting gameplay implications like:
- Bad RNG being mitigated since the enemy 3-tank 2-healer team is going to turn into all your lousy heroes once they kill you.
- Killing a hero so you can use their ult when yours is fully charged.
- Focusing a hero that you're particularly good at playing to try to be able to play them.
- Dying because you were Pharah and flying over a void when you suddenly turned into Sigma.
- Lining up to charge an enemy into a wall as Soldier 76 because you're about to change to Reinhardt.
The transformation delay defaults to 3 seconds, but can be changed in Workshop Settings.
Matches start by default when the lobby is full; you can experiment with the "assimilation" mechanic freely while waiting.
Some specifics:
- If you're already in the process of changing heroes (the 3 second countdown timer is active), further kills will not restart the timer or change who you're transforming into.
- Dying during the transformation process cancels it -- even if you are resurrected by Mercy.
- Dying is otherwise just like a normal Mystery Heroes death (mostly) where your hero is re-randomized unless Mercy resurrects you.
- Bots cannot be random heroes; nor will they transform upon getting a kill. Human players killing a bot will still assimilate them, however.
Some technical notes:
While this is setup with "Respawn as Random Hero: On", it actually uses a fully Workshop-based implementation of hero randomization under the hood. This is because the normal Mystery Heroes feature does not play too well with forcing you to change heroes after kills.
Thus, if you want to limit the number of heroes of any given type (vanilla Mystery Heroes is 3), you'll need to change "Max Random Heroes Per Role" under Workshop Settings instead of changing "Random Hero Limit Per Team"
Note that this limitation only applies for randomization. If you limit it to 3 of any given role, it's still possible to get 5 tanks on a team if, for instance, all of your non-tanks kill enemy tanks to start the transformation process.
The randomization this mod uses favors roles you have the least of. When picking a random hero, it has max(0, M - N) chances to pick each (where M is your "Max Random Heroes Per Role" setting and N is the number of heroes on your team currently with that role. This likely differs from the standard Mystery Heroes randomization, but I'm not sure what that is.
As coded, this should work for any team versus team format (e.g. CTF, Team Deathmatch, etc), including changes to make games 6v6. Out of the box, it is only configured for the ones normally included in Mystery Heroes
by Exodus#1324 aka dewin on Discord ~ S6F77
Source code
Loading...
5 Comments
is there any particular reason you use ultimate charge and not ultimate points?
your mode only takes up 370 elements and the array needed would only be about 100. that still leaves over 32000 elements.
Is a variable array in the order of it being compatible with the built-in "All Heros" data, if you want it. (and can copy paste it)
edit: oh and just in case (since there is a possibility you dont know how), you can just retrieve the data via "value in array, Global.UltimateCosts, index of array, AllHeros, Hero of(Event Player)"
I'm new to workshop and OW2 in general and didn't know there were differing amounts per hero -- nor that I could access it. I'll consider making that change in a future version or making it an option.
That said, ultimate points might(?) be already scaled based on how difficult Blizzard presumes it is to build it up on one hero. So a hero whose ult is hard to scale due to their mechanics may have a cheaper ultimate cost -- if you do the hard work to build it up, you shouldn't be then punished when swapping to a hero whose ult is extremely easy to contribute to and thus has a higher cost.
OTOH, if you're full on the 2660 hero and swap to a lower-cost one and then back, what should happen with the excess?
well currently the way your system works if your tracer and get 1260 Points/100% (Points are a 1:1 scale with all damage/healing dealt. so dealing 1260 damage) then swap to a hero like Soldier:76 who has an ultimate points cost of 2500 you just skip the rest of the 1240 points (almost half the ultimate cost because you give them the same ultimate charge as the tracer)
but if you use the ultimate points system it'll just give you 1260 Points towards soldier:76's ultmate or about half way there.
As for the the excess. In the normal game if you are playing any hero then swap it'll save up to 30% but transfer up to all of your ultimate points. if you have a Soldier:76 ultimate ready than swap to Tracer you only keep 30% of what Tracer's ultimate costs (415 points), and the rest is discarded.
Replying late but:
Considering you never get to intentionally change heroes (asides from killing someone), I feel like the straight percentage transfer is much more intuitive. The ult transfer only happens upon kills; dying and having your hero randomized resets it as normal.
If the ult transfer capped, it'd make it near impossible to ever ult since every time you kill someone your own ult progress would reset.
in fact looking at the array i gave you there is no 2500 value, i'll need to update my code with the proper values.
i had just updated it adding mauga and illari support, but at the time i was tried and couldn't be bothered checking every single hero value to check if it was correct.
i'll fix that then come back and edit the array comment to the correct array.
edit: it has been fixed now
Updated Brigitte from 2550 to 2700
Updated Doomfist from 1680 to 1950
Updated Ramattra from 1880 to 2100
Updated Roadhog from 2420 to 2800
Updated Solider:76 from 2310 to 2500
Updated Sombra from 1400 to 1665
Updated Widowmaker from 1540 to 1400