Thread: Drunken Master Dev Blog: Episode 2

Page 1 of 5 12345 LastLast
Results 1 to 20 of 91
  1.   This is the last staff post in this thread.   #1
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Posts
    3,747
    Rep Power
    11

    Drunken Master Dev Blog: Episode 2

    Link to part 1 Here!

    Hey guys, it's been a while and we want to apologize for the delay on this. I have wanted to write this for a while but never had the time to sit down and do it. Today I closed my office door and told everyone to go away until it was finished, so here it is! Part 2: Scripting the hero.

    This is the second step to any hero that we design internally and usually involves me since I know the ins and outs of the scripting system better than anyone else. We have to get a version of the hero working that matches the design so we can do internal 1v1/2v2 games to make sure nothing obvious breaks. We tweak it a bit and then push it to test client, but that is for the next blog.

    This will be a more technical blog laying out a rough outline of our hero/mechanics system. It will also be much longer. I will put all pictures and examples of scripting in spoiler tags so you can just skip all of it if you want to.

    So onto Drunken Master.

    The first thing I do when starting on a hero is break down how it will work using our basic building blocks. These are projectiles, states, affectors, gagets, and modifiers. For people who don't know exactly what all of these are, here are the quick rundowns if you need them:


    Projectiles are simply invisible 'bullets' that travel from position X to position Y. They can 'bind' or 'pick up' another unit and bring them along with itself, fly up into the air, follow pathing or not, and generally are a very good all-purpose utility. Examples of projectiles in use include any leap in the game (Valk, Myrmidon, Kraken, etc) or every auto attack or spell that has a travel time.


    States are the debuffs or buffs you see above your hero's portrait on the game screen. These are the ones that are shown, but keep in mind there are many many that are hidden and never shown to the client. An example is Chipper has a hidden state on himself for the whole game that recharges his rockets and starts the timer on the ability.


    Affectors are basically circles on the ground that can move, grow, have delays, arcs, and generally are used for any AOE that moves. An example is Hag or Soulstealer's Ult. The Affectors are what do the actual damage, your hero just spawns them with your abilities.


    Gadgets are the "doodads" you see ingame spawned by heroes. Pollywogs wards, Engineer's stuff, and even Kraken's Whirlpool are all gadgets that are spawned in the world then do something. This is not the only use for them, though. Many many invisible gadgets are spawned by all sorts of heroes and they have auras, track time, keep track of positions, or are "anchors" for pushes. Below are some examples of invisible gadgets.


    Modifiers are more like "modes" you can turn on in a hero. The best way to explain this is looking at Maliken. When you turn on a sword mode, a modifer is turned on that changes things on the hero (look, attack, abilities). When you turn off the sword mode, the modifier expires and thus everything reverts to normal. We can use this, for example, to change things about a hero's Ult based on their Q without having any weird interactions elsewhere.



    Now then, back to Drunken Master. The basics needed for this hero as laid out by DivA are: No mana regen, 10 per second degen, no manacost on items. Luckily removing all regen is easy since we have had to do this before for gadgets and abilities (Old Engineer Turret, for example). We just have to put this:
    manaregenreduction="1"

    into his hero file and it turns all all regen for the hero. First bit solved easily. The 10 mana per second degen I debated at first if it should be in the hero's file or in a state on him based on the second ability. I ended up going with the hero file. So we ended up like this:
    Code:
    <onframe>
    	<takemana target="source_entity" amount="10" b="frametime" op="mult" />
    </onframe>


    The final bit, items costing no mana, is something that we have never had to do before and thus will need new code added to support it. I will cover this more at the end.

    The first ability, Drink, is a simple channel ability. Set up like any other (think Succ or NOMNOMDEVOURER) except instead of putting a state/disabling on someone else, you are putting one on yourself. This self-disable "ticks" every second like Succ's ult and gives him 25/50/75/100 mana based on the level. The natural degen in the hero file takes care of the rest.

    The part of Drink that I needed to hook up still was him healing when it drained mana. To do this I put one of those modifiers in the Drink ability and then tweaked the mana drain in the hero's file. Together they work out to heal him when mana is taken away, but only after he has learned his second ability.
    Code:
    In second ability:
    
    modifierkey="DrunkenMaster_Drain"
    
    In hero file:
    
    <onframe>
    	<takemana target="source_entity" amount="10" b="frametime" op="mult" />
    	<hasmodifier name="DrunkenMaster_Drain">
    		<heal target="source_entity" a="result" />
    	</hasmodifier>
    </onframe>

    Drink done.

    Lunge is the most complicated of all of the abilities since he has to do several things. Broken down, when he casts the ability it will bind him to a projectile (and put a state on him so he can't move or cast while he is in midair) that will zoom off towards the target. Once he gets there, it will deal an attack and then bind him to a new projectile that will orbit the target fully. While orbiting, he will still not be able to use any abilities other than Q and his target will be stunned. A modifier will be active while he is in this orbit. The modifier changes the Q into a different ability (think Bubbles shell) that will let him stop it at any time. Either ending the orbit or using the ability will push the target and deal another attack. Woo.

    I hooked up the "lunge" part by copying predator's leap and heavily tweaking it to not deal damage or slow on impact, but instead spawn the second projectile and stun the target. So the impact of the lunging projectile ends up looking like this:
    Code:
    <onimpact>
    	<attack />
    	<spawnprojectile
    		name="Projectile_DrunkenMaster_Ability1_Orbit"
    		source="source_entity"
    		target="target_entity"
    		noresponse="true"
    		bind="source_entity"
    	/>
    	<applystate name="State_DrunkenMaster_Ability1_CircleDisarm" duration="1500" target="source_entity" proxy="target_entity" pushentity="true" />
    	<applystate name="State_DrunkenMaster_Ability1_Stun" duration="1500" target="target_entity" />
    </onimpact>

    The circledisarm state is the "timer" for this spin, once it reaches 1.5 seconds, it hits its "impact" and goes off, doing the following:
    Code:
    modifierkey="DrunkenMasterSpinning"
    >
    <onimpact>
    	<attack source="source_entity" target="this_proxy_entity" />
    	<push target="this_proxy_entity" source="source_entity" duration="250" force="1600" />
    </onimpact>

    This does the push and attack damage. The <attack /> command just does an auto attack from the source to the target, so this combined with a damage buff from the circledisarm state deals the damage of the ability. The modifier you see changes the Q ability into one that when you press it, it will unbind (stop spinning), deal an attack, push the unit, and finally get rid of the stun on the target and the disable on Drunken Master. This is what that looks like:
    Code:
    <modifier key="DrunkenMasterSpinning" modpriority="100"
    	ignorecooldown="true"
    	anim=""
    	icon="icon_teleport.tga"
    	nosilence="true"
    	casttime="0"
    	castactiontime="0"
    	manacost="0"
    	actiontype="no_target"
    >
    	<onimpact>
    		<unbind target="source_entity" />
    		<attack source="source_entity" target="this_proxy_entity" />
    		<push target="this_proxy_entity" source="source_entity" duration="250" force="1600" />
    		<expirestate name="State_DrunkenMaster_Ability1_Stun" target="this_proxy_entity" />
    		<expirestate name="State_DrunkenMaster_Ability1_CircleDisarm" target="source_entity" />
    	</onimpact>
    </modifier>

    So that's Lunge in a nutshell. It works correctly for now but I know there will be bugs and issues as we move forward.

    Stagger is, by comparison, a very basic projecile ability. When you use it, it spawns a projectile that just binds the hero and takes him 300 units forward, disjointing him in the process. The logic of the ability is quite simple:
    Code:
    <onimpact>
    	<disjoint target="source_entity" />
    	<pointonpath0 source="source_position" target="target_position" ignoreunits="true" distance="300" />
    	<spawnprojectile name="Projectile_Drunkenmaster_Ability3" source="source_entity" target="pos0" bind="source_entity" bindturn="true" bindstate="State_Drunkenmaster_Ability3" unbindondeath="true" />
    </onimpact>


    Numb to Pain is something completely new for us and needs a bunch of code to get done. The only part of this that we can do right now is the slow resistance that Deadwood uses. To get the rest we need specific code. I take this request and the need for items to cost no mana and go over to our programmer DJ and let him know. I help him make sure he gets them down on his to-do list correctly and know they will be done in a few days, so until then Drunken Master is about as done as he will be from my end.

    Oh, I almost forgot, the bonus you get on abilities when you have mana. That is done differently in checks For example, this is how it is done for the Stagger and Numb to Pain:
    Code:
    Stagger:
    <onaction>
    	<compare a="source_mana" b="50" op="ge">
    		<takemana target="source_entity" amount="50" />
    		<applystate name="State_Drunkenmaster_Ability3_Buff" duration="3000" target="source_entity" />
    	</compare>	
    </onaction>
    
    Numb to Pain:
    <onaction>
    	<compare a="source_mana" b="100" op="ge">
    		<takemana target="source_entity" amount="100" />
    		<applystate name="State_Drunkenmaster_Ability4_Buff" duration="6000,8000,10000" target="source_entity" />
    	</compare>
    </onaction>

    <onaction /> is called only once when you cast a spell, so it's a good place to do something you need to do only once at the start. Lunge works the same way generally, checking for the mana and then passing it through the projectiles that you have the mana, so apply the snare after.

    That is Drunken Master scripted up and ready to go. He uses Panda's model at the moment so when DivA and Nome get around to it, I know they will add on better effects and temp models for testing. We will fill you in how our initial testing/bugfixes/iteration went and what we changed in the next blog. Also, test client time soon!
    Last edited by Idejder; 06-27-2011 at 07:00 PM.

  2. #2
    IT LIVES

  3. #3
    OMFG, why did you post code. Riot will steal it

  4. #4
    Offline
    Account Icon
    Join Date
    Mar 2011
    Posts
    47
    Rep Power
    0
    Nice!

  5. #5
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Dec 2010
    Location
    Hellborne Meatball, Newerth
    Posts
    5,141
    Rep Power
    0
    Nice

  6. #6
    Offline
    Account Icon
    Join Date
    Mar 2011
    Posts
    106
    Rep Power
    7
    Thanks for continuing with the whole behind the scenes project.

  7. #7
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Sep 2009
    Posts
    2,510
    Rep Power
    10
    Technical stuff whoa Nelly.

  8. #8
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0
    First pageee

  9. #9
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Posts
    737
    Rep Power
    0
    #10th
    also tl;dr

    joke, Thanks Redjedi.

  10. #10
    Offline
    Account Icon
    Join Date
    Dec 2010
    Location
    Sweet Apple Acres
    Posts
    273
    Rep Power
    7
    About time you gave us an update if you ask me, been a while. Well I'm really liking him so far.
    No Signatures, S2 is copying the LoL forums aswell now!
    Quote Originally Posted by `` View Post
    I fully understand and support the OP. Putting ` in your name is just plain dumb and should not be allowed. Anyone doing so is clearly a troll and obviously a hindrance to the fine community of Newerth.

  11. #11
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Mar 2011
    Location
    I am from Iceland. /flex
    Posts
    384
    Rep Power
    0
    Boner time..

  12. #12
    First Page... first time ever!! yay. And sounds really cool. Very excited to see him in action!

  13. #13
    Offline
    Account Icon
    Join Date
    Aug 2009
    Location
    Boston
    Posts
    923
    Rep Power
    8
    yawn
    Never Concede, Never Give Up.






    Quote Originally Posted by Yukari View Post
    You will not be suspended so as long as you not refusing to concede just to grief your allies. If you are making an effort to win, we will not suspend you.

  14. #14
    No one cares, stop wasting time and fix bugs

  15. #15
    Offline
    Account Icon
    Join Date
    Dec 2010
    Location
    Sweet Apple Acres
    Posts
    273
    Rep Power
    7
    Quote Originally Posted by Mazinkaiser View Post
    OMFG, why did you post code. Riot will steal it
    Riots engine is actually pretty primitive compared to the HoN engine, it doesnt even support basic things like micro'ing or dropping of items. doubt they'd even be able to impliment some of these to be honest.
    No Signatures, S2 is copying the LoL forums aswell now!
    Quote Originally Posted by `` View Post
    I fully understand and support the OP. Putting ` in your name is just plain dumb and should not be allowed. Anyone doing so is clearly a troll and obviously a hindrance to the fine community of Newerth.

  16. #16
    nice

  17. #17
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Idlewild, Michigan
    Posts
    2,553
    Rep Power
    10
    Enjoyed the scripting. Not exactly what I would have expected or done, but then again I have never scripted anything like that at all. From the concept of the hero I expected it to be difficult (you not just on auto pilot scripting). I'd be severely interested in seeing PANDA use the moves. I thought that Panda's ultimate might be a starting point for the orbiting punch and that flurry would be heavily modified to function as the punch.

    Pred's leap is getting modded EVERYWHERE! Like Parasite =].

    I greatly enjoyed this dev blog and it brings a new respect for the difficulty involved (at least due to the odd nature of the hero versus previous ones). Can't wait for DJ's.

    SOON(tm)
    Quote Originally Posted by KoujiroRinko View Post
    Seriously though sometimes Wololo's posts just come across like that cow from asdfmovies like "hello yes I am real man anybody wanna go skateboards?" s'like he's impersonating a person with social skills when in reality he's just an alien species

    Quote Originally Posted by Wololo View Post
    hello yes I am real man anybody wanna go skateboards?

  18. #18
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Apr 2010
    Posts
    17
    Rep Power
    0
    Finally second part!

  19. #19
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Apr 2010
    Posts
    536
    Rep Power
    7
    drunken master uses my model atm, i approve

  20. #20
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Idlewild, Michigan
    Posts
    2,553
    Rep Power
    10
    Quote Originally Posted by Pandam0n1um View Post
    drunken master uses my model atm, i approve
    and not a single was given
    Quote Originally Posted by KoujiroRinko View Post
    Seriously though sometimes Wololo's posts just come across like that cow from asdfmovies like "hello yes I am real man anybody wanna go skateboards?" s'like he's impersonating a person with social skills when in reality he's just an alien species

    Quote Originally Posted by Wololo View Post
    hello yes I am real man anybody wanna go skateboards?

Page 1 of 5 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •