|
|
Hi guys,
(Hope this is the right place for this)
I'm currently working on coding my Hero from Dream into HoN, and of course there are some snags along the way that I hope some of you guys have a good idea of how to work out.
The hero I'm trying to code is my Dream hero Wit (Link to Dream page)
I have layed it out as follows:
The first ability: Knife juggle
I have split this ability in two. First part takes care of the toggle for gaining knife charges, and the launching of knives into the air on toggle off. The second part is the target ability that deals with the executing of throwing the juggling knives.
The problem is that i can't get the two subabilities in ability 1 to affect eachother. Like reducing charges in ability1a duo to targeting with ability1b. Is there a method for passing variables among abilities?
I have posted my whole code for ability 1 and 2. Hopefully someone will help me get back on track. Is there better methods for coding this hero?
Thanks in advance!
-Lirion
I havent much time to look into your code now but you should be able to
pass variables by using something like the following in your abilityb.entity:
<onimpact>
...
<pushability name = "wit_jugle1"/>
<removecharge entity="stack_entity" />
...
</onimpact>
As far as I remember that should work.
[Custom Map] Valkyrie Wars [Dream]
[Guide] How to create a neutral creep spot | [Map] Borderland [Dream]
[MineCraft Server] CraftCraft 20Slot 24/7 [84.200.47.30]
Hi Schm0ftie, thanks for your respons.
I have started to work on the pushability, but can't seem to get it right. I'm new too this kind of programming so hope you can enlighten me on how to use it. Think my problem is that I dont have anything in the stack? The whole idea of how too use stack_entity is vague for me, can you cast some light here aswell?
-Lirion
Hey
I'm gonna go through your code and answer your questions below
Lines removed
Lines added
Lines changed
Additional info:
Every entity has its own variables (charges, accumulator, param). Param can be passed at spawning of affector and projectile, charges with <addcharges count="0" entity="..._entity"/>. Accumulator is private.
Idejder's Drunken Master Dev Blog: Episode 2 First spoiler contains info about states, affectors, projectiles, gadgets and modifiers
Updated guide by me (now again outdated, but still useful :P )
About stack_entity:
HoN uses stack to store variables used last time. There are 2 stacks: one for numbers (result variable) and second for entities (stack_entity). Numbers are pushed after almost every action (Check updated guide) and entities only in few actions (moreover only if they have pushentity="true" attribute). To be honest I'm not sure when is used pop function, but I never had to know it.
I hope this code will be working :P
tojo
Thank you very much Tojo! I had alleready started recoding the code to implement a state that will handle the knifejuggling. I have to say I learn plenty of your post about the mechanics! Brilliant work!
I'll post a finished version of Wit when I have all the tweaks done. If that is interesting. Next problem is to link the knifethrowing to the charges of the knifejuggling ability, but I think I can handle that with the enlightenment I got from your post.
Hope you vote him up if you like him
-Lirion
Last edited by Lirion; 01-23-2012 at 05:51 PM.
Welk tojo already answered all your questions. Feel free to share your code with the community, resources are allways welcome![]()
[Custom Map] Valkyrie Wars [Dream]
[Guide] How to create a neutral creep spot | [Map] Borderland [Dream]
[MineCraft Server] CraftCraft 20Slot 24/7 [84.200.47.30]
Hi again!
I have started to work on the ultimate, even thou someone said it was not possible
So I have a question:
Is it possible to test which hero is beeing targeted? I know that the target_entity will have the information about the targeted unit, but I want to test if the target is for example Hero_Arachna.
I tried to use the <pushentitybyname name="Hero_Arachna" /> too put that entity on top of the stack, but it does not work. Any ideas?
Hero_Arachna is not entity's name but type
You can test it with <condition/> tag:
<condition test="not_entity_type State_Succubis_Ability3" target="inflictor_entity" >It's from succubis\ability_03\state.entity file.
So your test will be :
<condition test="entity_type Hero_Arachna" >
target="target_entity" is not required, because it is default value.
You can set name of entity when spawning it or in map editor. It's rarely used though.
About stealing/copying skills: It is possible, but very boring to code :P
Thanks again for your reply!
I'll have to give it a shot since I have all of the other abilities sorted out.At least to test it for a few spesific types of heroes. I need to code every ulti into my code sort of, or can you refer to it from a <useability> code?
-Lirion
Yeah, there are a few ulities out there that is going to be hard to interpret. Well I have to start with the ones that are straight forward. Like Pyromancer, Witch Slayer and Arachna. Ulities like Midas will have to be none imitateble I think. BS's ultimate will cause a lot of damage output, and i think it will be a pain to work it into the codes![]()
Have to do this in portions i think. Thanks again for your replies, they have realy help med out. And thumb Wit up on Dream, he is starting to fall![]()
Hi again,
I have found a good method to code the ulties of the target into Wit, but have hit an other snag. Is there a limit of how many modifiers you can have? When i have more the 16 my hero is no longer visible, the model just disapears. If that is so, I will have a hard time making Wit be able to copy all ulties. So it seems he is only able to copy 16 ulties...
-Lirion
As far as I know it's only possible to use about 20 modifiers per entity.
From the "is OMG Mode possible?" (OMG mode is about having random spells from heroes, so in fact you need all spells like you need them)
Last edited by Schm0ftie; 01-28-2012 at 06:21 AM.
[Custom Map] Valkyrie Wars [Dream]
[Guide] How to create a neutral creep spot | [Map] Borderland [Dream]
[MineCraft Server] CraftCraft 20Slot 24/7 [84.200.47.30]
I've only one idea right now and it's bit complicated
So, almost every entity in HoN has default maximum level set to 25 (it can be changed in custom maps though).
In abilities we use only 4 and in ultimates 3. Theoretically we can use all these levels to code more abilities in one ability.entity file (6 normal or 8 ultimates). Moreover 16 modifiers could allow us to code 16*6=96 abilities or 16*8=128 ultimates.
I'll show it on simple example, which uses only 6 levels and 1 modifier, bigger ones are analogous.
I must add that in my opinion it's not worth to code all ultimates manually, writing program to mechanize it is more interesting challange. (All in all no need for program, good Excel document can be helpful as well)
Anyway, there is example code, main ability can steal ultimate from heroes A and B:
abilityA.entity - example of stolen ability
steal.entity
You see that I've coded here 2 very similar abilities, not hard to guess whom
I think it's the best solution, for both: easy scripting and optimization reasons.
I've no idea what to do with ability tooltip![]()
No clue about SoTM as well, at least this boosting stolen ultimate. Cooldown reduction shouldn't be so hard with <reducecooldown/> action
I've tested it, you can download working code if my explanation is not clear:
I have given this some thougth and experimented some on how to do this, as menchened in my previous post I had a good method for changing the Ultimate which uses modifiers.
The method simply changed the inventory to the desired ultimate:
So with this metode the tooltip and everthing will be working for a lot of heroes. (Will be problems with ultimates that affects other abilities on the hero. Such asCode:<modifier key="Arachna" modpriority="100" inventory3="Ability_Arachna4" />and
)
Next thougth was to use this methode combined with pets, so that for a group of heroes I would spawn a pet that would have the targeted heroes ultimate. This way I could spawn different pets based on what hero was targeted, and then bypassing the limitation of number of modifiers. The problem with this method was that the leeching effect fromor
will only effect the pet.
I'll have to think more on how to do this. I hope to find a way to do this.
The technique you use will have a hard time with ulties fromwould it not?
-Lirion
ult spawns projectile, isn't it?
The most tricky thing in my method is grouping similar ultimates in one modifier. For my codeultimates are same thing, they send projectile.
Lot of ultimates spawns affectoror are single target spells
etc. etc...
States, passives and so on
As you said the most problematic in general are ulties which have synergy, like...
In your method 20 modifiers blocks you
So do these problematic ulties.
Anyway good luck in searching
EDIT:
There is hero in DoTA which steals skills, isn't it? Do you know how do he deal with synergy abilities?
No, sorry. Have never played DoTA.EDIT:
There is hero in DoTA which steals skills, isn't it? Do you know how do he deal with synergy abilities?
I found this post from Bangerz, where he refers to the problem with 20 modifiers and also gives hit of that a workaround is coming on that post.
Semms that the post is a little old, so I sent a PM to Bangerz and asked what he had planed when he wrote this:
http://forums.heroesofnewerth.com/sh...hlight=ontimerComing Soon ™
... have more than 4 abilities on a unit?
... have more than 20 modifiers/abilities?
... have more than 20 items in the shop?
... control unit respawning?
... create a scoring system?
... control shop access?
... create a round/zoning system with teleportation?
-Lirion
Finaly I got the ultimate working. The method I now used is based on the first method of my second last post, but duo to the restriction of 20 modifiers I had to do some workarounds. The solution was to make multiple Wit Heroes that each can handle about 13 different ultimates and then morhp the main character into the Wit hero which can handle the given ultimate.
Off course there are a few problems, as we menchened in the earlier posts. I have concluded with that some of the ultimates just wont give any effects. Surch as:
Blacksmith is currently not working but there should be a small matter to implement the chance of multicast into the other skills. Thou this will only affect Knife Juggle.Code:Aluna Midas Pebbels Revanent Soulstealer - will work but Wit dont have any souls. so it doesnt do any damage. Just causes the other effects.
There are some other ultimates that will last even after Wit copies another one. Like Shadowblades ulitmate. So need to tweak the individual ultimate a bit before its finished.
I'll post the code here when im done.
-Lirion
Last edited by Lirion; 01-29-2012 at 01:30 PM.