PDA

View Full Version : How to get skill lvl



Kluckmuck
01-17-2011, 04:25 AM
Is there any condition or something? Going to make a popup saying how much damage you did, and the damage will be different each lvl.
Edit: Also, how do you refresh only one skill?

Oloko
01-17-2011, 07:44 AM
For damage popup, you do it like this:
<damage amount="10,20,40,50" />
<popup name="TYPE_OF_POPUP" a="result" source="target_entity" target="source_entity"/>

TYPE_OF_POPUP is the kind of popup that need to be used, there is a complete list of those in the base.gamemechanics file. You can even create your own with different color/text.

To refresh a skill, it depends on how you want to do it, but you can use <resetcooldown />.

Kluckmuck
01-17-2011, 12:34 PM
For damage popup, you do it like this:
<damage amount="10,20,40,50" />
<popup name="TYPE_OF_POPUP" a="result" source="target_entity" target="source_entity"/>

TYPE_OF_POPUP is the kind of popup that need to be used, there is a complete list of those in the base.gamemechanics file. You can even create your own with different color/text.

To refresh a skill, it depends on how you want to do it, but you can use <resetcooldown />.
I did a new popup:

<popup name="Spell_dmg" color="1 0.9 0 1" message="{value} !" value="true" duration="2000" fadetime="1000" />
Then in my code i wrote:

<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>

But it didnt really work at all.
And how do you use resetcooldown?

Oloko
01-17-2011, 01:28 PM
I did a new popup:

<popup name="Spell_dmg" color="1 0.9 0 1" message="{value} !" value="true" duration="2000" fadetime="1000" />Then in my code i wrote:

<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>But it didnt really work at all.
And how do you use resetcooldown?

Maybe you should try using existing popup to see what part of your code is wrong. It's hard to help you since you only posted one line of your spell, if you could post the whole ability, I might be able to help you more.

As for <resetcooldown />, write down <resetcooldown /> and it should reset the cooldown of the current spell.

Kluckmuck
01-17-2011, 01:48 PM
<?xml version="1.0" encoding="UTF-8"?>
<projectile
name="Projectile_WitchSlayer_Ability4"

speed="2000"
gravity="0"

modelscale="0.4"
model="effects/bullet.mdf"
traileffect=""
canturn="0"
flying="true"
flyheight="40"
deatheffect="effects/impact.effect"

touchradius="50"
touchradiusdiradjust="true"
maxtouches="1"
touchtargetscheme="enemy_units"
toucheffecttype=""

effectscale="1"
impactstealth="true"
impacteffect="effects/ability_04_impact.effect"
>
<onspawn>
<spawnunit name="Gadget_WitchSlayer_Ability4" target="this_owner_entity" proxy="proxy_entity" pushentity="true" duration="-1" />
<setproxy entity="this_entity" target="stack_entity" />
</onspawn>
<onimpact>
<kill target="proxy_entity" source="" />
</onimpact>

<ontouch>
<playeffect effect="effects/impact.effect" target="target_entity" source="target_entity" />
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<cantarget effecttype="Magic">
<applystate name="State_Stunned" duration="100"/>
<damage effecttype="Magic" amount="100,120,140,160,180,200" />
<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>
<resetcooldown />
</cantarget>
</onimpact>
</combatevent>
<kill target="proxy_entity" source="" />
<delete target="this_entity" />
</ontouch>
</projectile>


I thought it would be smart to create a new one, as I'm going to create more spells that will work like this.
Didnt reset cooldown either :/

Oloko
01-17-2011, 05:13 PM
<?xml version="1.0" encoding="UTF-8"?>
<projectile
name="Projectile_WitchSlayer_Ability4"

speed="2000"
gravity="0"

modelscale="0.4"
model="effects/bullet.mdf"
traileffect=""
canturn="0"
flying="true"
flyheight="40"
deatheffect="effects/impact.effect"

touchradius="50"
touchradiusdiradjust="true"
maxtouches="1"
touchtargetscheme="enemy_units"
toucheffecttype=""

effectscale="1"
impactstealth="true"
impacteffect="effects/ability_04_impact.effect"
>
<onspawn>
<spawnunit name="Gadget_WitchSlayer_Ability4" target="this_owner_entity" proxy="proxy_entity" pushentity="true" duration="-1" />
<setproxy entity="this_entity" target="stack_entity" />
</onspawn>
<onimpact>
<kill target="proxy_entity" source="" />
</onimpact>

<ontouch>
<playeffect effect="effects/impact.effect" target="target_entity" source="target_entity" />
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<cantarget effecttype="Magic">
<applystate name="State_Stunned" duration="100"/>
<damage effecttype="Magic" amount="100,120,140,160,180,200" />
<popup name="Spell_dmg" a="result" source="target_entity" target="source_entity"/>
<resetcooldown />
</cantarget>
</onimpact>
</combatevent>
<kill target="proxy_entity" source="" />
<delete target="this_entity" />
</ontouch>
</projectile>
I thought it would be smart to create a new one, as I'm going to create more spells that will work like this.
Didnt reset cooldown either :/

Ok, I've been looking into it and it seems like you need to add the popup to the stringtable too. So if you still haven't done it, copy strintables/entities_en.str inside your map. Then add inside it:


Popup_Spell_dmg {value} !I guess this means your popup will not appear in other language if you don't put it in the stringtable of all language.

As for the <resetcooldown />, it will by default reset the cooldown of the entity it is in. So in your case it doesn't work since you are doing it inside your projectile. You will need to do this:


<pushability name="Ability_WitchSlayer4" entity="source_entity" />
<resetcooldown entity="stack_entity" />

Kluckmuck
01-18-2011, 01:47 AM
Thanks, works perfectly
Edit: Just one more thing xD Where can i find ability icons? In the textures file all icons are in .dds and they dont really work.

FlameStick
01-18-2011, 05:09 AM
Thanks, works perfectly
Edit: Just one more thing xD Where can i find ability icons? In the textures file all icons are in .dds and they dont really work.


1st check the resource folder and check the hero you want the icon from lets say you want the icon for Hags 2nd ability.

Go to resource and find heroes/(your desired hero)/ability_(your desired ability)/icon.tga

icon="\heroes\(insert hero here)\ability_(insert number here\icon.tga"

Heres the example for it using the magebanes 2nd skill icon.

icon="/heroes/javaras/ability_03/icon.tga"

Always end it with .tga never end with dds always with tga with icons and potraits!!!!!
If you have custom icons just put it in the same folder as ability/hero file and mark it

icon="icon.tga"

Luke_Allstar
01-18-2011, 01:03 PM
Thanks, works perfectly
Edit: Just one more thing xD Where can i find ability icons? In the textures file all icons are in .dds and they dont really work.

i'm not sure why they use .dds, but it seems like its similar to .tga, but i'm not sure
you can use gimp and the .dds plugin, just google for it, works good, although every image is turned around by 180°, don't know why, but thats not a really great problem
however you only need this if you want to edit the icons, if you just want to use already existing icons, do it like FlameStick told ya

Kluckmuck
01-18-2011, 01:45 PM
Ya, what flamestick said works just like I wanted it to.
Got another question though, I want to play a certain effect (mq moonbeam).

>
<onimpact>
<spawnaffector name="Affector_Moonbeam" target="target_position" param="owner_counter" />
<playeffect effect="/heroes/krixi/effects/ability_01/ability_01.effect" source="target_position" target="" occlude="true" />
</onimpact>
</ability>

Nothing happens xd

Also, is there any irc channel we can use?

Luke_Allstar
01-18-2011, 03:03 PM
Ya, what flamestick said works just like I wanted it to.
Got another question though, I want to play a certain effect (mq moonbeam).

>
<onimpact>
<spawnaffector name="Affector_Moonbeam" target="target_position" param="owner_counter" />
<playeffect effect="/heroes/krixi/effects/ability_01/ability_01.effect" source="target_position" target="" occlude="true" />
</onimpact>
</ability>
Nothing happens xd

Also, is there any irc channel we can use?

why would you want to spawn the effect manually, when you also just could set the impacteffect=/heroes/krixi/effects/ability_01/ability_01.effect" on your affector?
if there is a strange reason why you still want to do that, try to set it like this:
target="target_entity" source="source_entity"
(or both on target_entity, not sure if one of those two will work or what would look better)

i don't know about the irc channel, i don't even know how many moders/mapers would use it, and how many would live in similar time zones :tund:

FlameStick
01-18-2011, 03:40 PM
Ya, what flamestick said works just like I wanted it to.
Got another question though, I want to play a certain effect (mq moonbeam).


>
<onimpact>
<spawnaffector name="Affector_Moonbeam" target="target_position" param="owner_counter" />
<playeffect effect="/heroes/krixi/effects/ability_01/ability_01.effect" source="target_position" target="" occlude="true" />
</onimpact>
</ability>
Nothing happens xd

Also, is there any irc channel we can use?

yea name : HoNLabs

Well to answer that you need to realise that affector is not a effect its a enitity file you should not mess with that.

Second of all you dont modify the paths you only should modifiy the effect/trail/impact/model files if you wanna change the look lemme explain.

So lets say you want to play a moonbeam instead of pyros ult.

Few steps lets see the projectile entity from pyro ult


<?xml version="1.0" encoding="UTF-8"?>
<projectile
name="Projectile_Pyromancer_Ability4"

speed="2000"
gravity="0"
modelscale="0.3"
model="effects/spinner.mdf"

effectscale="1"
impacteffect="effects/ability_04_impact.effect"
>
<onimpact>
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<damage effecttype="Magic" amount="450,675,950" target="proxy_entity" />
<condition test="param != 0">
<applystate name="State_Pyromancer_Ability3_Burning" duration="3000" level="param" />
</condition>
</onimpact>
</combatevent>
</onimpact>

<modifier key="ult_boost" modpriority="100"
>
<onimpact>
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<damage effecttype="Magic" amount="650,875,1150" target="proxy_entity" />
<condition test="param != 0">
<applystate name="State_Pyromancer_Ability3_Burning" duration="3000" level="param" />
</condition>
</onimpact>
</combatevent>
</onimpact>
</modifier>
</projectile>
now you see this line :

model="effects/spinner.mdf"

now find the mq ability and you notice that there is no mode file so just leave it empty like this

model=""

Now find the effect of impact point that should look like this :

impacteffect="effects/ability_04_impact.effect"

And now you just download and correct the path.
Hope that helps a bit

Heres what i think is the example of what it should like im new to this stuff only started 2-3 weeks ago so not very experienced.


<?xml version="1.0" encoding="UTF-8"?>
<projectile
name="Projectile_Pyromancer_Ability4"

speed="1000000000"
gravity="0"
modelscale="1"
model=""

effectscale="1"
impacteffect="\heroes\krixi\effects\ability_01\impact.effect"
>
<onimpact>
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<damage effecttype="Magic" amount="450,675,950" target="proxy_entity" />
<condition test="param != 0">
<applystate name="State_Pyromancer_Ability3_Burning" duration="3000" level="param" />
</condition>
</onimpact>
</combatevent>
</onimpact>

<modifier key="ult_boost" modpriority="100"
>
<onimpact>
<combatevent effecttype="AbilityBasedProjectile">
<onimpact>
<damage effecttype="Magic" amount="650,875,1150" target="proxy_entity" />
<condition test="param != 0">
<applystate name="State_Pyromancer_Ability3_Burning" duration="3000" level="param" />
</condition>
</onimpact>
</combatevent>
</onimpact>
</modifier>
</projectile>I think its something like that or so :)

Kluckmuck
01-19-2011, 01:59 AM
Ty, only problem was that you dont really target anything, so the beam doesnt play if it doesnt hit, but I just added another effect so it looks good now :)