A good and efficient way to deal damage with triggers?

X-maul

AKA: Demtrod
Reaction score
201
I was considering picking up a map I once worked on, which included hero units with upgradeable abilities, which also dealt damage acording to the items the unit had.

The way it worked was that the ability deals 100 damage + 0.1*Strength. I made an attribute behavior (not sure it's the right name) for the Strength stat, and set a variable to the amout of behaviors (which worked).

I then made the ability deal 100 damage (with effects), and a trigger that launched every time the effect fired, and dealt the damage acording the variable.

My question now is, is this the most efficient way? I could imagine that doing this with an ability that deals area of effect damage multiple times a second in a large area, it would end up causing lag. Is there a more efficient way to do this?

I was considering having 2 effects that deals damage, end then setting the damage field of the behavior to my desired amount, but is there a more efficient way to deal bonus damage according to a attribute behavior?
 

Glorn2

Slap n' Tickle
Reaction score
4
Again late, but it would seem as though you are overlooking the fact that you can use attributes and buffs to increase damage by a % as it stands. you can set it so a point of "intelligence" increases spell damage by 1%, or strength increases physical damage by 1%. Really, you can turn any aspect of a unit into a stat point. The same concept works for items; you can create an item which increases spell damage by 20%. The problem then I guess is if you dont want spell damage % increase from intelligence and spell damange increase from % items to stack multiplivity, but additivly. It would be an irritating amount of work for such a small change though.
 

X-maul

AKA: Demtrod
Reaction score
201
Well, yea that would work if it was a flat increase; increase all spell damage by 10%. As an example, I want a unit with an ability that deals 20% spell power on impact and then 5% spell power every second for 5 seconds.

As far as I know, this can't be done with your approach, the way I'm doing it now, is to have a trigger, which activates every time a unit has an attribute change, then I change the effect of the unit to match (setting DAMAGE to 10% of spell power for triggering unit). This works okay for now, though it would be better to be able to use an already made system.
 

Glorn2

Slap n' Tickle
Reaction score
4
Ahh, yeah, I see your issue. I encountered that on a project I created years ago; DoT abilities would become OP compared to single target abilities.
Another way to do it through data (may be painful) would be to have each damage effect apply a damage response buff to the unit, which has 1 charge and expires when used. You could use the damage response buff to add "spell damage reduction" to the unit being hit, for that hit. IT would allow you to reduce the damage of one effect by 80%, and another by 95%, to get your desired 20% and 5%.

A triggered system doesn't cause you any lag in a big team team, using AoE spells?
 

X-maul

AKA: Demtrod
Reaction score
201
Haven't tested out the data approach you're suggesting, but I like to also be able to display in my tooltips that the ability deals 100 impact damage and 50 damage every second, so I might stick with my current method, nice idea with the damage response though :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top