So in my RPG, if your hero is 5 levels higher then an enemy target, you will NOT get any more xp from them. The mobs, however, wills till aggro you and you to them.
I want to setup a system that will cause the mobs to ignore the hero if the hero cannot get EXP from it and visa verse. However, I still want the ability to attack each other if the player decides to initiate an attack. There is also six players with multiple different heroes the player can be.
I think this could be done with validators and buff checking, but I can't seem to grasp a system where it would work. Can someone who is better at data come up with a system that will work? I want it to be data only. No triggers.
U need to modify sight radius, when sight radius set to 0 mobs can't auto attack, then, on damage response or by using validator "damage taken time" u can incrrease sight radius of the mob by buff under the Unit modification tab (calls sight bonus or something like that)
disable auto attack completely on all units (scan radius to 0 on all weapons). now create a buff that periodically checks for close enemies, if your validator validates issue order to attack. you might have a look in data editor - game data to set leash radius etc.
Depends on how you want to set up things, If this is cooperative rpg it has a sense if one hero starting attack and everybody get agro. If you want do so only attacking player can generate agro, you can set visibility radius first, as i suggested, and then put on it some buff for identifying him as attacker, and issue order to attack the one who has this buff on.
@Zero0018: Go
Depends on how you want to set up things, If this is cooperative rpg it has a sense if one hero starting attack and everybody get agro. If you want do so only attacking player can generate agro, you can set visibility radius first, as i suggested, and then put on it some buff for identifying him as attacker, and issue order to attack the one who has this buff on.
It's an open rpg. Everyone has free reign to do whatever they want.
Ok. So I can't get this to work. I have the scan range set to 0. Ranged enemy units will auto attack regardless of the validator based on thier vision I believe. Now for melee, they just flat out won't attack unless u walk RIGHT up to them.
Here is how I have everything setup. Is something wrong?
I tried greater and less than with no dice. On the attack order, the order is to attack the target? What is the target? Should that be different?
I would just set monsters to be benign/passive via behavior to start, no need to mess with their vision. Then assuming you have a solid way to check their levels (I'd probably check in triggers to be safe), use a search via triggers or a recurring behavior on your hero. Have the search do a validation of sorts, if Monster Level + 5 > HeroLevel, issue order to attack. Clear as mud right? :) Let me try to explain how I might do it:
As fair warning, this is a HYBRID solution!
Dataside:
Buff Behavior for all monsters to receive, some kind of benign/passive whatever you want, once you get it right, just spam that on all mobs, take you a whole minute probably, done. You will probably want to add a damage response to this behavior as well to remove itself if the monster takes damage in any way (excluding 'Dummy Agro Damage').
Buff Behavior on hero that periodically (say every second) does a search effect about X radius (agro range you want). Any monsters found within X radius use "Dummy Agro Damage" against that enemy that does no damage (or modify unit, you just want something that connects the monster and the hero somehow but doesn't trigger an acquire action.) .
Triggerside:
First of all, need an event that tracks effects, specifically the Dummy Agro Damage effect.
I believe hero can be gotten by Triggering Effect Unit Owner or something like that, or Owner of Triggering Effect Unit. Not at the editor so can't tell you the exacts. The monster should be effect target or something of that sort.
Anywho, from there, you need to figure out the hero's level and monster's level, I have no idea what sort of systems you got going on there, so I don't want to even start thinking about that, that is for you to figure out :) Not sure how familiar with variables you are, but you'll want int HeroLevel and int MonsterLevel in this trigger event.
After that, you'll want to do these actions:
Set HeroLevel to be whatever your hero's level is.
Set MonsterLevel to be whatever the monster's level is.
Use Modify Variable Integer to boost MonsterLevel by 5.
Then do a check, if (MonsterLevel > HeroLevel)
Issue Order to Attack Unit (You'll need to click the little blue '(' to make it an order targeting unit, it is order with no target by default).
Anyways, that should do roughly what you want, from what I've read, good luck with that!
I don't understand what is your problem with validator, look at attached map, i set up validator for health comparsion between marine and other units, when less beefy unit aproaches marine do suicide, try it.
There is a problem if you will issue order directly on damage response, if this mob will be attacked by few players it will just constantly changing direction and do nothing. I'm also not having any problems with sight radius modification.
Hmm, for life comparsion there is a field "Type" in validator. To specify difference between two units it should be set to "Delta", seems like there is no such field for behaviour and veterancy validators, so bad news for you. Sry, didn't pay attention to this, thought they're unified.
now here comes the dirty data only work around solution:
deactivate "attack" by default on each unit.
create an ability which has as many levels as there are lvls. let this ability have autocast on. this ability will apply a buff which activates "attack" on itself but targets enemies.
each level of the ability has its own effect and validator where you validate the veterancy level of the target.
each time you level up you need to issue order to learn one point of your dummy ability to have the same levels.
now you will need a second dummy ability to replace "attack" on the heroes to allow forced attacks (activate right click behaviour).
this should work out but we will know in some days, quite alot work :d
didn't expect the veterancy validator to not work with the "other unit" field. what is it good for then anyway (the other unit field)?
Veterancy validator work with that field but it cannot compare exact difference between units levels, it can do just basic comparsion like less greater or equal :/
So in my RPG, if your hero is 5 levels higher then an enemy target, you will NOT get any more xp from them. The mobs, however, wills till aggro you and you to them.
I want to setup a system that will cause the mobs to ignore the hero if the hero cannot get EXP from it and visa verse. However, I still want the ability to attack each other if the player decides to initiate an attack. There is also six players with multiple different heroes the player can be.
I think this could be done with validators and buff checking, but I can't seem to grasp a system where it would work. Can someone who is better at data come up with a system that will work? I want it to be data only. No triggers.
I would highly appreciate it!! :D
U need to modify sight radius, when sight radius set to 0 mobs can't auto attack, then, on damage response or by using validator "damage taken time" u can incrrease sight radius of the mob by buff under the Unit modification tab (calls sight bonus or something like that)
@abvdzh: Go
This would work for one player. I don't see how that would work for six. It's a good idea though.
@Zero0018: Go
disable auto attack completely on all units (scan radius to 0 on all weapons). now create a buff that periodically checks for close enemies, if your validator validates issue order to attack. you might have a look in data editor - game data to set leash radius etc.
@FunkyUserName: Go
How would I setup the validator to check mob level vs hero level, and if <=5 level difference, attack.
Are the mob levels random?
By using validator Unit Compare Veterancy Levels, there are fields Unit+ and Other Unit+ for comparsion.
Depends on how you want to set up things, If this is cooperative rpg it has a sense if one hero starting attack and everybody get agro. If you want do so only attacking player can generate agro, you can set visibility radius first, as i suggested, and then put on it some buff for identifying him as attacker, and issue order to attack the one who has this buff on.
@Necromoni: Go
The levels are set by zone. So zone 1 will have levels X threw Y and each zone increases by 4.
It's an open rpg. Everyone has free reign to do whatever they want.
Ok. So I can't get this to work. I have the scan range set to 0. Ranged enemy units will auto attack regardless of the validator based on thier vision I believe. Now for melee, they just flat out won't attack unless u walk RIGHT up to them.
Here is how I have everything setup. Is something wrong?
I tried greater and less than with no dice. On the attack order, the order is to attack the target? What is the target? Should that be different?
I would just set monsters to be benign/passive via behavior to start, no need to mess with their vision. Then assuming you have a solid way to check their levels (I'd probably check in triggers to be safe), use a search via triggers or a recurring behavior on your hero. Have the search do a validation of sorts, if Monster Level + 5 > HeroLevel, issue order to attack. Clear as mud right? :) Let me try to explain how I might do it:
As fair warning, this is a HYBRID solution!
Dataside:
Buff Behavior for all monsters to receive, some kind of benign/passive whatever you want, once you get it right, just spam that on all mobs, take you a whole minute probably, done. You will probably want to add a damage response to this behavior as well to remove itself if the monster takes damage in any way (excluding 'Dummy Agro Damage').
Buff Behavior on hero that periodically (say every second) does a search effect about X radius (agro range you want). Any monsters found within X radius use "Dummy Agro Damage" against that enemy that does no damage (or modify unit, you just want something that connects the monster and the hero somehow but doesn't trigger an acquire action.) .
Triggerside:
First of all, need an event that tracks effects, specifically the Dummy Agro Damage effect.
I believe hero can be gotten by Triggering Effect Unit Owner or something like that, or Owner of Triggering Effect Unit. Not at the editor so can't tell you the exacts. The monster should be effect target or something of that sort.
Anywho, from there, you need to figure out the hero's level and monster's level, I have no idea what sort of systems you got going on there, so I don't want to even start thinking about that, that is for you to figure out :) Not sure how familiar with variables you are, but you'll want int HeroLevel and int MonsterLevel in this trigger event.
After that, you'll want to do these actions:
Set HeroLevel to be whatever your hero's level is.
Set MonsterLevel to be whatever the monster's level is.
Use Modify Variable Integer to boost MonsterLevel by 5.
Then do a check, if (MonsterLevel > HeroLevel)
Issue Order to Attack Unit (You'll need to click the little blue '(' to make it an order targeting unit, it is order with no target by default).
Anyways, that should do roughly what you want, from what I've read, good luck with that!
I don't understand what is your problem with validator, look at attached map, i set up validator for health comparsion between marine and other units, when less beefy unit aproaches marine do suicide, try it.
There is a problem if you will issue order directly on damage response, if this mob will be attacked by few players it will just constantly changing direction and do nothing. I'm also not having any problems with sight radius modification.
@abvdzh: Go
Ya here is your map with a compare vetrancy levels. Doesn't work.
Hmm, for life comparsion there is a field "Type" in validator. To specify difference between two units it should be set to "Delta", seems like there is no such field for behaviour and veterancy validators, so bad news for you. Sry, didn't pay attention to this, thought they're unified.
@Zero0018: Go
now here comes the dirty data only work around solution:
deactivate "attack" by default on each unit.
create an ability which has as many levels as there are lvls. let this ability have autocast on. this ability will apply a buff which activates "attack" on itself but targets enemies.
each level of the ability has its own effect and validator where you validate the veterancy level of the target.
each time you level up you need to issue order to learn one point of your dummy ability to have the same levels.
now you will need a second dummy ability to replace "attack" on the heroes to allow forced attacks (activate right click behaviour).
this should work out but we will know in some days, quite alot work :d
didn't expect the veterancy validator to not work with the "other unit" field. what is it good for then anyway (the other unit field)?
Veterancy validator work with that field but it cannot compare exact difference between units levels, it can do just basic comparsion like less greater or equal :/