Changeable damage?

tratolak

New Member
Reaction score
0
Can you change someones damage throught triggers? for example change damage of summoned pet by 50% of your intellect.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
You mean attack damage? Do you want to give a summoned unit 50% of the caster's INT upon summoning?

One solution I can think of: Give the summoned pet 1-1 damage, and give it an ability that increases attack damage. That ability would have many levels and each gives different bonus attack damage. Then when the unit is summoned, set that ability level to 50% of the INT.

For example, the INT was 40. Then you want the unit's attack damage to be 20. The unit starts with 1-1 damage, so you'll want to give 19 bonus damage to the unit.

Are you familiar with setting a unit's ability level to a certain integer value?
 

tratolak

New Member
Reaction score
0
this is quite good idea but wouldnt an abbility with so much lvls somewhat cause problems in game?
 

dracolich

TH.net Regular
Reaction score
15
use Custom damage system.
try to find in snippets and systems, it whould be somewhere.
or use unit with 1-1, register his attacks and apply damage once projectile hits
 

tratolak

New Member
Reaction score
0
i only know how to start a trigger when units begins to attack. Is there any event that detects when unit cause damage?
 

dracolich

TH.net Regular
Reaction score
15
well, you need 2 trigger.
1st one - unit attack, where unit - is your monster, probably you also need trigger to store him once spawn/summon/whatever.
second one - will be created when 1st trigger is called

so, its like
trigger - unit start attack
create trigger register unit event (attack target, death event)
also add to this 2nd trigger another event - timer (1-2 sec), in case of using stop.

second trigger will check - if it was called because timer out, then destroy triggered trigger
else - call damage triggering unit for yourdamage
regardless condition, destroy triggered trigger.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
tratolak, actually, I'm still curious whether you want:

(1) Summon a pet. The pet's attack damage is 50% of the caster's INT when the pet is attacking. This takes into account if the caster's INT changes after the pet is summoned.

or

(2) Summon a pet with attack damage equal to 50% of the caster's INT, and after this point on, any changes to the caster's INT will not affect the pet's attack damage.

If you want (1), you'll need a damage detection system as described above by dracolich.

If you want (2), ability with several levels can work. How much INT is the caster going to have? 100? 1000? More INTs require more levels of ability, naturally. However:

tratolak, are you familiar with this kind of thing:
You have an ability that gives +1, +2, +4, +8, +16, +32 etc. attack damage. If you can transform that "50% of INT" from decimal to binary representation, you can give the pet some of those abilities. In the end, you'll have fewer ability levels than having 100 levels to represent 100 different attack damage, for example.

(For comparison, you can give up to 255 attack damage with just 8 of such abilities.)
 

thorhunter

You can change this now in User CP.
Reaction score
32
You need to be more specific about it since there are several methods, each has its pros and cons.

1. You can create ability/abilities based on claws of attack that will be added/set (if summoned unit starts with it). As forementioned, you can use multiple abilities, since editor limits you to 1000 levels, so first would scale like +0/1/2.../999 damage, the other +0/1000/2000.../999000 and by using combination of these two you can get any value between 0 and 999999. Theres one general disadvantage of this solution: any % damage skills affecting the unit (eg. command aura) will be completely nullified.

2. You can use some sort of damage dealing system, but i don't recommend it for newbies.

3. You can use damage upgrades. This one works quite well, under certain conditions: intelligence of character can only increase (any items that grant intelligence shouldn't affect this ability, unless items are permanently on hero); only one hero with this skill is permitted per player (otherwise it won't work due to highest intelligence sharing over to all users).
 

vypur85

Hibernate
Reaction score
803
I believe darkRae method 2 is what is wanted. Check out the Set Damage snippet in my signature. Only 5 abilities with 10 levels each. It gives you 0-99999 damage. Should be more than what you need.

Copy the snippet triggers into your map. Then when you summon your pet, just follow the instructions in the snippet (set your unit to certain variable and set your damage value * int of your hero, and run the snippet trigger) and you're done. If you want the damage to be dynamic, then you'd need periodic trigger to periodically set the pet's damage throughout the game.


> Can you change someones damage throught triggers?
And to answer your question, no you can't.
 

thorhunter

You can change this now in User CP.
Reaction score
32
Only 5 abilities with 10 levels each. It gives you 0-99999 damage.
There's really no reason to use 5 abilties instead of two (i think even one would suffice, unless its some sort of oldschool rpg that gets to thousands of stats and damage). With auto fill feature you can config ability with 1000 levels in an instant (you probably are not aware of it, I recommend it greatly, just right click on one of the fields and select 'auto fill' :))
 

vypur85

Hibernate
Reaction score
803
1000 levels... not recommendable. 5 abilities only require 50 levels in total. More efficient.

It's not about the autofill issue, really.
 

vypur85

Hibernate
Reaction score
803
An ability with 1000 levels is more taxing than 5 abilities with 50 levels, that's all. It takes more time to load 1000 worth of data than 50.

It's like... a trigger with 1000 if then else, and 5 triggers with 10 if then else, each. Though not entirely right to use this comparison, but I guess it's just something relative.

Edit:
1000 levels, really? Haven't tried it before. I thought it was 100. Then again, even at 100, the brief lag moment seems quite bad.


Edit (for bottom):
I rest my case. :) Let the TS decide, since this is getting much offtopic anyways.
 

thorhunter

You can change this now in User CP.
Reaction score
32
You actually meant the setting level of an ability function which kinda goes as you described (I'm not sure whether condtioning 'Level of ability for unit' follows same pattern), but considering there are other issues with this function that reflect on the gameplay, it shouldn't be run frequently (there's not even a need for high precision), therefore its efficiency is negligible. You have to remember that 5 abilities literally take much space in object data and making 5 of them to match the needs of possibly one or few abilities is rather overexerting.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Before we go on more about efficiency, we need to know how big of a damage we are going to deal with here :p

I mean, if the biggest possible INT in the game is, say, 150, you can just work with a system that deals with 75 or so bonus damage. No need to go to 99999.
 

thorhunter

You can change this now in User CP.
Reaction score
32
I put back what I said before, after some testing I found out the 'Set Ability Level' actually takes alot of processing power, same 'Level of ability for unit' condition check so it's best to reduce it by splitting the ability itself into atleast 2.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top