Maintain specific range to enemy?

Poserklr187

Active Member
Was wondering if there is anyway to stay at a certain range to target. For example if I always wanted to stay 3 meters away it would move my guy forward or away depending on if the enemy moves with autoface on. Or if I wanted to get a certain distance out because of an AE.

I can maintain distance pretty well on my own I just want to be able to do this when me or the tank gets knocked around so I can get back into an exact distance from the enemy as soon as possible.
 

Pygar

EQ2Bot Specialist
No, I've not made anything for this.

Eq2bot when set properly will attempt to maintain range to both tank and target, and generally handles that issue for me.

Shadow.iss I run and isntruct my toon to follow someone else in combat that I trust for them to position properly.

So on my dirge I might run shadow valerian with the expectation that valerian isn't botted and will be where I need to be on joust calls.
 

Poserklr187

Active Member
Well ideally I was wanting some sort of toggle. So when I hit it the character tries to 'lock' at a certain distance and when i turn it off it 'unlocks' so I can move about freely. Or perhaps it just disengages when i try and move forward or back (not strafe or turn though) and all I have is a 'on' button i can hit quickly.

Any chance you can walk me through how you set up eq2bot to do what you were talking about?
 

inire

Active Member
Per the documentation at the top of the Shadow.iss file, you would /run shadow <name> <distance> on the bots. This will cause them to shadow the named PC.

Code:
;-----------------------------------------------------------------------------------------------
;shadow.iss
;by pygar
;usage: run shadow <actorName> <distance>
;example: run shadow pygar 3
;
;Description:
;Designed to be run in partner with other scripts to force a bot to stay within x range of
;another actor.  This could be a groupmember, raid member, a mob, a npc, etc.  My usage of this
;is to force my ranged bots to adjust to position of a human player I trust to combat epics
;with knockbacks or jousting.
;-----------------------------------------------------------------------------------------------
 

Poserklr187

Active Member
Suppose another way to explain what i want is something that works like EQ2's follow but will work on NPC's and won't bring me closer than 2 meters.

Edit; bah must having been writing this reply as you posted.
 

inire

Active Member
Hm.

Well, i know that setting ALL the bots to "melee attack" and then setting them to move in combat (both automove sets cleared check boxes) will cause them to automatically crash to melee range when they get knocked back. I use this to be able to do some of the AOE attack stuff, like Scion of Ice and the sandstormy dude in Maiden's Chamber.

Not sure that's EXACTLY what you want, since the sweet spot for rangers is about 5 meters, as opposed to melee range which appears to be ~2 meters in the game.

You could set the bots to melee attack, and set your "stand off" guys to shadow the melee ones. This would give you ~2 meters add to your distance. So, for example, if i want to have my ranger always standing around 5 meters away for bow attack advantages, i could set the ranger bot to shadow <melee attacker name> 3, which would mean that the ranger would follow the melee guy everywhere with a distance of three meters. Then i could set the melee guy (if a bot) to melee attack mode and auto movement on.

The only thing i'm honestly not sure about is what the actual melee attack range IS for the bots. they look pretty close in there.

I know its not EXACTLY what you're looking for, but it's a pretty close approximation of it.
 

inire

Active Member
And.... I missed your edit.

Darn it.

the shadow stuff will work for you then, i'm guessing. The bot "shadow stacking" stuff works great too, by the way, and will basically work throughout the zone instead of having to change up your shadow target constantly for mobs.
 

Poserklr187

Active Member
alright got the shadow script to work, but only on other players. Went out to antonica and tried it on a few random mobs/npcs and it didnt do anything. But again i saw a player and tried it with his name and it worked. Saw a guard named Coffrey so I did

/run shadow Coffrey 5

In the game chat box and nothing. ended the script then tried to do it with a player I could see near by and ran straight to him.

Nice catching the ranger sweet spot by the way hehe. The sweet spot is between 2-5 meters. Little play there since ranged attacks I need to be 2 meters away and my melee attacks i need to be 5 meters or closer.
 

Valerian

ISX Specialist
Nice catching the ranger sweet spot by the way hehe. The sweet spot is between 2-5 meters. Little play there since ranged attacks I need to be 2 meters away and my melee attacks i need to be 5 meters or closer.
start dealing with larger hitboxes and you'll see just how difficult your perfect script becomes.

the actual calculation for minimum range for (most) ranged attacks is (approximately) (TargetCollisionRadius * TargetCollisionScale) +2. This means with a mob that has a huge hitbox (dragons, giants, etc) this makes your minimum range for ranged attacks somewhere around 35m from the mob's actual location. Normal sized mobs have a hitbox just about 1m in diameter, giants are closer to 20-25m, and some dragons are even larger.

This is the method EQ2Bot is currently using to determine range. All ranges are based off that calculated collision range. (This method is encapsulated in an object within the PositionUtils.iss include script in the EQ2Common folder)

Just thought I'd throw some complexity into your simple little 2-5m world
 

Poserklr187

Active Member
Wow little defensive? I was referring to when I am playing 'manually' or w/e you want to call it. 2-5 meters as the CA's themselves consider it, not anything else. If you read earlier you would know I haven't even managed to get eq2bot or shadow to work in any capacity I want since I'm new to working with them. Well aware mobs have different sized hitbox's and they apparently aren't restricted by size, had player size mobs with huge hit box's and phara'dar and shade of khalan dar hitbox's are different by several meters and their models are roughly the same size.

Ideally I wish there was a way to have it determine range via specific CA's. For example with level 1 and 2 CA's Searing Strike and Back Fire with 'lit up/usable this would indicate the correct range. If only Searing Strike was usable this would mean I am too close and if only Back fire was usable it would indicate I am too far. Both being red would mean I am ridiculously far away I suppose.
 
Last edited:

inire

Active Member
Ok, the issue is with the shadow script having a pc variable in the actor name.

change Line 34 to have

Code:
				call FastMove ${Actor[exactname,${ShadowTarget}].ID} ${srange}
instead of

Code:
				call FastMove ${Actor[pc,exactname,${ShadowTarget}].ID} ${srange}
and it should work.

Note that i just tested it on a simple mob with NO spaces in the name. I did capitalize the name as well, but it does work.

also, note that it PAUSES eq2bot when it's moving, which may/may not be what you want. Sometimes i've seen pausing eq2bot cause it to go into la-la land, but not sure how current that is since i get confused easily.
 

inire

Active Member
While we're on the fun of hit boxes...

Val, have you been able to dynamically get the hit box size from the game? just kinda curious, since this does seem to be an issue all over the place and i figure you would know more about the issue than anyone. I didn't even know that ranged formula there either!
 

Pygar

EQ2Bot Specialist
Ideally I wish there was a way to have it determine range via specific CA's. For example with level 1 and 2 CA's Searing Strike and Back Fire with 'lit up/usable this would indicate the correct range. If only Searing Strike was usable this would mean I am too close and if only Back fire was usable it would indicate I am too far. Both being red would mean I am ridiculously far away I suppose.
You'll find they can both be in range at the same time.

The calculations for this in game are unique to each type and they can overlap.

If you can't get these scripts to work, I'm not sure your ready to try to make new ones ;)

Look in Positionutils.iss for related range and position code. Its what EQ2Bot is using.
 

Poserklr187

Active Member
I have gotten it to do that buggy thing where they will light up but still give me a range error (too close or too far) but it has been extremely rare when maintaining the distance myself, maybe the system that indicates what Ca's light up to show as usable doesn't use decimal places. Be at 5.25 show a melee CA as usable then get a error when i try.

Did fix the problem with being able to do it to NPC's but couldn't get it to do it to a npc with a space in the name.

I have no intention of writing new ones lol, I'm piss poor at writing code or even reading it in some cases explaining such amateur or even 'unranked' level question here heh. was just throwing out some possible ideas.

Seems more and more likely I will need eq2bot to do this if at all but I would need this to be the only thing it executes, no CA's, buffs etc. As well as some quick way to override it so its not rubber-banding my guy if I'm try to run away from the target. Trying to use this for a single character I am otherwise controlling myself.
 

Nuprecon

Active Member
can i see the exact code your working with? Cause i could guess all day as to what your problem is, but unless i see the code snippet you've modified i wount be able to help.
 

Poserklr187

Active Member
All I've dealt with is the shadow.iss in the scripts folder and modified what inire said in a reply in this thread earlier.
 

Poserklr187

Active Member
Well I did try and use EQ2bot and tell it to go in melee range but its much too close. Never mind that I don't want it doing any of the other automatic stuff.

Also from what people have said if the shadow.iss script could some how utilize the calculations in the PositionUtils.iss script it could work quite well maybe?

Even if I got something that put me in the perfect range taking in consideration the hit-box's, I would want some way to be able to click a macro or some other button to do it to whatever I have targeted without having to input a command line each time. If I couldn't do that suppose I could just make a macro that does it to certain named mobs and not all of them such as raid or group instance trash.

EDIT: Tried like hell to get it to show both ranged and melee CA's as valid by range. Took off all run-speed buffs, crouched, and turned walk and tapped my way to the enemies several times and couldn't get it to go even though I have had it happen maybe twice before over several years of playing. So considering i wont be crouching or walking and have 14% in combat run speed I doubt doing range by CA's would be a huge issue heh.

Also edited the shadow.iss to just be 'name' instead of 'exactname' and got it to work on npc's i was trying to follow with spaces in their name (imagine its just doing it to the closest mob that has that part of the name in it) and saw the hit box issue on some wurms in JW.
 
Last edited:

Pygar

EQ2Bot Specialist
I'll eventually post an update to shadow so you can:

run shadow ${Target.ID} 5

I'm struggling to understand exactly what your trying to do and why.

Why do you want something to move you to melee range but not automate anything else?
 

Poserklr187

Active Member
I'm essentially trying to automate the ranger 'sweet spot' while I am playing my ranger. Can mean the difference of quite a good amount of DPS when you have enemies with various knockbacks and unusual hitbox's, and just general 'bouncing' of the mob because of aggro issues. I figure if I can automate it I can close the gap between the sweetspot and other classes not worried about specific range (casters) and class that can just 'crash' to the mob (melee's).

Example being in ToMC every piece of trash does at least one knockback. I get kicked and try to get in place as fast as possible. Usually results I stop before I get under 5 meters, somewhere around 6 requiring me to take another couple of seconds to adjust. Same if I go in too far. Keep in mind most ranged attacks can't be used while moving (unlike melee CA's) so if I have focus aim running its that much more penalizing when I'm trying to slightly adjust to get back to 4-5 meters from the mob.

I appreciate the modification but like Val pointed out it needs to be 5 meters from the hitbox not the collision which I think shadow.iss goes off of.
the actual calculation for minimum range for (most) ranged attacks is (approximately) (TargetCollisionRadius * TargetCollisionScale) +2. This means with a mob that has a huge hitbox (dragons, giants, etc) this makes your minimum range for ranged attacks somewhere around 35m from the mob's actual location. Normal sized mobs have a hitbox just about 1m in diameter, giants are closer to 20-25m, and some dragons are even larger.
Little side note, I did let eq2bot automate my ranger for a fight. The casting order/priority you have set up for rangers is just insanely bad, then again I doubt whoever was making it was real concerned with maximizing dps as much as possible. Was going to change it and screw around with it but wasn't to sure how to go about it.
 
Last edited:

zomguber

Active Member
I'll eventually post an update to shadow so you can:

run shadow ${Target.ID} 5

I'm struggling to understand exactly what your trying to do and why.

Why do you want something to move you to melee range but not automate anything else?

I actually donated (read as "bribed") for this to be done several months ago! Would still love to see it, Pygar. :)
 

Poserklr187

Active Member
Found another instance where I would use the hell out of a script that does what I want. Apparently the trash mobs around Mynzok/Penta in palace have a wonderful little debuff that randomly procs a huge knock back on anyone who is attacking it. Fights are pretty long too since everyone is getting bounced instead of doing more dps (like myself) imagine I get knocked back about 20 times fight. Fun having to find my perfect range over and over about every 5 seconds.
 

Pygar

EQ2Bot Specialist
Found another instance where I would use the hell out of a script that does what I want. Apparently the trash mobs around Mynzok/Penta in palace have a wonderful little debuff that randomly procs a huge knock back on anyone who is attacking it. Fights are pretty long too since everyone is getting bounced instead of doing more dps (like myself) imagine I get knocked back about 20 times fight. Fun having to find my perfect range over and over about every 5 seconds.
I run shadow.iss on this fight.
 

Poserklr187

Active Member
Unfortunately I'm the only one in the entire raid that needs the specific range I want/need. Same for groups too. Aside from that I wouldn't trust anyone else to determine my characters position even if I was a pure melee class. That and I'm in a leader position as well as usually calling the in's and out's myself, not exactly advantageous to rely on others to move my character. Also I'm the one that gets to do all the 'go for' work in raids while fighting (checking/pulling adds, switch's, soloing adds, sole person going towards the boss for crit debuff in some cases). Didn't think I got into a high end raiding guild just for being a ranger did you? =P

Suppose I'm just going to end up editing shadow to let me shadow npc's (as shown previously in this thread) and have a huge list of ranges for each type of mob with a different hitbox size. Not sure how to make it recognize spaces in names of NPC's just going to have to hope the script picks the right mob. Unless you all have something better coming down the pipeline of course, I'm lucky not to completely fubar any script I open with notepad.
 
Last edited:

Pygar

EQ2Bot Specialist
Shadow was already updated to accept ${Target.ID} as a passing arguement.

However, given your requirements...

1) Why the hell you need a script? You're multiboxing your ranger and leading a high end raid? That seems to be what you said, and honestly it doesn't parse my BS filter. If you're only playing one toon, whats so hard about maintaining a range manually?


2) No script is going to maintain your range for you and allow you to easily be the go-get guy.
 

Poserklr187

Active Member
Well some fights are different from others. So this means on some fights I have to luxury of concentrating solely on DPS. Being that I'm an officer sometimes I can not indulge in that luxury even on the simplest of mobs and I can only use a portion of my concentration.

This results in me either:
A) not getting officer shit done because I am too busy constantly repositioning myself after things like knock backs , mob re-positioning and the rare problem if the mob aggroing someone other than the tank.
Or B) getting officer shit done while getting a 6k dps parse while the rest of the high end dps is doing 10-12k and I look like an asshole.

I do not intend to use this script or any other for that matter while doing fights I have to manage other specifics other than DPS. I am NOT multi-boxing my ranger for one which I am almost sure I said earlier in this thread, if I did not I apologize.

EDIT: know this isnt the right section but main reason I definitely do not bot my ranger is because the provided script for attacking seems to be outdated (using old level attacks) on top of which even if they were the proper level attacks the attack order and what attacks are used is quite bad. Would like to help with this if I had some basic understanding of how those scripts work since it looks easy to change from looking at it.
 
Last edited:
Top Bottom