Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #16  
Old 10-11-2015, 05:44 AM
skyy's Avatar
skyy
Fire Beetle
 
Join Date: Sep 2015
Posts: 15
Default

Sorry to necro this old thread, but I would be very interested in the code to make bots spread out a little.
And since I am limiting the bots to 5 per person it shouldnt be too heavy a load.

thanks in advance~
Reply With Quote
  #17  
Old 10-11-2015, 10:58 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Yeah, not really good to necro an old thread. But to answer your question, the last I remembered it was in a command.

#bot setfollowdistance xxxx
Reply With Quote
  #18  
Old 10-11-2015, 03:33 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

For in-group bots, I usually start at 150, then cumulatively add 50 to each bot thereafter.

Not pretty..but, it does give enough spacing to distinguish them by clicking.


If you're using botgroups, each leader will follow you according to the set distance. But, bots in the botgroup will follow based on the distance to their bot group leader.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #19  
Old 10-12-2015, 03:17 PM
skyy's Avatar
skyy
Fire Beetle
 
Join Date: Sep 2015
Posts: 15
Default

not really what i meant, sorry.

I am looking for a way to not only alter distance but also x/y coordinates by a very small amount to give bots a more natural feel and position when spawned and grouped.

without the user even having to use the followdistance command;
Reply With Quote
  #20  
Old 10-12-2015, 03:29 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

More like a formation, then.


I know one of the dev's worked on a formation script (plugins/formation_tools.pl)

But, I don't know if those could be easily adapted for this purpose.


One of the first changes to bots that I'm going to implement is to save the bots follow distance so that it doesn't have to be re-assigned on every spawn.


I've thought about exactly what you're wanting to do..but, haven't developed anything, as yet.

As time allows, I'll see what I can do with this idea.


EDIT: Something like this..but, not so strict: http://ds.heavengames.com/gameinfo/a...formstance.gif
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 10-12-2015 at 03:35 PM..
Reply With Quote
  #21  
Old 10-12-2015, 03:38 PM
skyy's Avatar
skyy
Fire Beetle
 
Join Date: Sep 2015
Posts: 15
Default

i think it would be highly appreciative by anyone using bots as it just increases the immersion.

also your nice formstance.gif gives me a 403-forbidden, but i can imagine what you tried to show us

I was hoping that in the current code there would be a follow function handling coordinates where you could simply tweak a little -- guess my optimism failed me again
Reply With Quote
  #22  
Old 10-12-2015, 03:52 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Oh, wow...

That's a picture of Dungeon Siege's formation bar..they were a little too 'retentive' for my taste though - hence, the not as strict qualifier
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #23  
Old 10-12-2015, 03:56 PM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

In the past I had the follow command in the source set a random follow distance between X numbers instead of the default value so any time i told them to follow it automatically gave them different distances and it worked very well.
Reply With Quote
  #24  
Old 10-13-2015, 04:26 AM
skyy's Avatar
skyy
Fire Beetle
 
Join Date: Sep 2015
Posts: 15
Default

Quote:
Originally Posted by Furniture View Post
In the past I had the follow command in the source set a random follow distance between X numbers instead of the default value so any time i told them to follow it automatically gave them different distances and it worked very well.
very nice idea for a quick fix, thanks!

would still be awesome if we could manipulate their x/y coords by a small rand factor aswell, i wouldnt even mind a static feel to it -- like a fixed offset by 100 like followdistance just on x/y axis.
Reply With Quote
  #25  
Old 10-13-2015, 02:23 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Out of curiosity...

Uleat you would probably be the best person to answer this.

A rogue backstabs.
There is code allowing the rogue to position itself behind the mob so that backstab is usable.

Lets for the purposes of this example use a clock system so if the mob is on the clock face a rogue has coding to allow it to move to 12 o'clock and attack.

could we implement a check for all other classes too? So that a rogue goes to 12 a ranger goes to 4 a tank class set to taunt and tank goes to 6 else 8 or 2. Something to that effect.

This would cause bots to partially position itself in a group setting


It seems like it would have something to do with this section
Code:
			if(AImovement_timer->Check()) {
				if(!IsMoving() && GetClass() == ROGUE && !BehindMob(GetTarget(), GetX(), GetY())) {
					// Move the rogue to behind the mob
					float newX = 0;
					float newY = 0;
					float newZ = 0;
					if(PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) {
						CalculateNewPosition2(newX, newY, newZ, GetRunspeed());
						return;
					}
				}
				else if(!IsMoving() && GetClass() != ROGUE && (DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) < GetTarget()->GetSize())) {
					// If we are not a rogue trying to backstab, let's try to adjust our melee range so we don't appear to be bunched up
					float newX = 0;
					float newY = 0;
					float newZ = 0;
					if(PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) {
						CalculateNewPosition2(newX, newY, newZ, GetRunspeed());
						return;
					}
				}
Or
possibly there something to the effect of

Code:
					float newX = X+(rand, 1 5);
					float newY = Y+(rand, 1 5);
					float newZ = 0;

I may try to implement this in the format of many if checks for all classes

Code:
			else if(AImovement_timer->Check()) {
				if(!IsMoving() && GetClass() == RANGER && !BehindMob(GetTarget(), GetX(), GetY())) {
					// Move the ranger to below coords.
					float newX = X+3;
					float newY = Y-2;
					float newZ = 0;
					if(PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) {
						CalculateNewPosition2(newX, newY, newZ, GetRunspeed());
						return;
					}
				}
and so on but I would be happy to have another's inputs efforts go into this as well.

best place to throw an idea out and get assistance feedback!
Reply With Quote
  #26  
Old 10-13-2015, 02:42 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Anything is possible


Giving value to the coordinate declarations won't work in that case due to this: https://github.com/EQEmu/Server/blob.../mob.cpp#L2580

Any 'preset' values are overridden with the new ones.


But, you could probably add some additional checks..maybe something like:
Code:
if(!IsMoving() && GetClass() != ROGUE && BehindMob(GetTarget(), GetX(), GetY()))
..though, I'm not sure if there is code to move 'around front' of the mob.

The current procedure call in the ROGUE check is for moving 'around back' of a mob.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #27  
Old 11-24-2015, 04:38 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

One issue you're definitely going to have here is that all your bots would constantly be bouncing. To illustrate my point, throw 2 rogue bots on a mob. They are constantly a blur changing positions.

I actually took out the get behind calculation for rogues on my server. Manual positioning seems like a small tradeoff for the sheer blender of a DPS machine a rogue turns into with the code in place.

Really, I think there should be a timer on the get behind piece. Then something like you said would also be possible without just having a couple ghosting bots.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:30 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3