EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   BOT Stopped Attacking (https://www.eqemulator.org/forums/showthread.php?t=41036)

Meddera 11-26-2016 04:45 AM

BOT Stopped Attacking
 
I recently created a genetic server using the install and activated the bots. I am playing a wizard and my cleric bot decided at 13th level to stop all forms of melee combat. He still heals himself and me, but does but attack at all.

Also, when he was attacking he used to use the heal every time he took damage instead of waiting until necessary. Can this be fixed as well?

Meddera 11-26-2016 12:48 PM

I have done some additional testing with this issue. When I delete the Cleric and recreate him I have the same issue. When I create a warrior bot he attacks. So is there something that is causing the Cleric to be viewed as a pure caster and after a certain level they stop melee combat? He literally just stands there and will cast healing or an occasion offense spell but will not engage in melee combat at all.

Prior to level 13 I would root an opponent and he would charge in and engage in melee while I stood back and cast offensive spells.

ghanja 11-26-2016 01:24 PM

So the Cleric bot is healing and casting buffs?

Meddera 11-26-2016 02:44 PM

Yes, but I am playing a wizard. I want the Cleric to melee which it was doing until he hit level 13. Now even if he is getting punched in the mouth he won't fight back.

Uleat 11-26-2016 08:14 PM

Bots are not designed for caster types to melee past level 12..

https://github.com/EQEmu/Server/blob.../bot.cpp#L2443


I don't know the reasoning behind this..but, it has been in the bot behavior as long as I've been here.

(Is this live mercenary-like behavior?)

Meddera 11-26-2016 10:32 PM

I am surprised this isn't a toggle option. Clerics are casters but can also wear full plate. So basically a Cleric / Wizard isn't really a playable duo beyond lvl 12.

Meddera 11-27-2016 10:57 AM

Is this something I could change on my side? I am unfamiliar with the code, but maybe it's something as simple as changing the level from 13 to 60.

Meddera 11-27-2016 11:29 AM

I found this entry in the detail you sent to me

atCombatRange = true;
} else if(IsBotCaster() && GetLevel() > 12) {
if(IsBotCasterCombatRange(GetTarget()))
atCombatRange = true;

There could be more to it than that obviously but this was just me doing a quick run through of the code. Problem is I don't knew where bot.cpp is on my system or what I need to do to actually make changes to it.

ghanja 11-27-2016 12:06 PM

http://wiki.eqemulator.org/p?Complet...er_Setup_Guide

However, there have been some changes, mostly with the starting of the server (which may or may not be disclosed in that wiki page). It should still get you by. It's either that, or find someone willing to make you binaries with the changes (and the inevitable changes that you will continue to make).

Meddera 11-27-2016 12:55 PM

I had issues when trying this method and before spending much time trouble shooting I ran across the installer method which worked without a hitch. Will I need to go back and do a full manual installation to make these types of changes?

GRUMPY 11-27-2016 07:04 PM

You would have to download the source code, make the necessary edits and, if your using windows, install cmake and VS and compile the edited source.
I wouldn't do it myself unless a developer made some input about the actual edit for something like that, but I don't care for bots myself.

Meddera 11-27-2016 08:59 PM

Everything I read said I can only have 1 bot at a time and I tried creating another and it worked. So I have a warrior, a cleric, and myself (Wizard). One thing I didn't notice until now is the Cleric heals max heal spell each time the warrior takes just one hit and he uses all of his mana early in the fight. I tried changing the stance but none of them seemed to make any difference.

It seems the healing class is sort of broken. The warrior did very good at least.

GRUMPY 11-27-2016 09:24 PM

Quote:

Originally Posted by Meddera (Post 252271)
Everything I read said I can only have 1 bot at a time

Not sure where you read about that, the settings are in the database, as to how many bots a player can spawn and that can be as high as you want to
You might want to learn all about what you can do in those database tables and how to do it. It will open a lot of doors for you.

Uleat 11-27-2016 09:24 PM

Are you confusing emulator 'bots' with in-game 'mercenaries?'

Meddera 11-27-2016 10:19 PM

No I just read whatever I could from google on bots and most pages I found said a player can have at the most 1 bot spawned at a time. Either way it is disappointing as the cleric bot is basically worthless. Literally it will burn a healing spell when any damage is taken at all, so all the mana is drained quickly.

Uleat 11-27-2016 10:41 PM

I assume this is from one of sites that you read..
Quote:

On Lootfest players are allowed to create 50 bots that they can keep stored but only 1 bot can be active at any given moment. This means that you can have 50 NPCs created and ready to go at all times (stored on the server) but you may only have 1 of those bots in the world and grouping with you at any point in time.

Our base code allows for more than 1 bot to be active at any given time (72, iirc..and 150 creation max.)

Server admins are free to customize those values to their own desires.


Bots have a very basic AI that works well over all..but, don't expect them to be mind readers.

Even just adding a second bot (such as an enchanter, bard or shaman) can greatly increase both yours and a cleric bot's motility.


You can also look into using Heal Rotations.

The_Beast 11-27-2016 10:48 PM

I was just going to ask if you typed ^help ingame. That barebones version of the database needs fine tuning as well, but you are on your own

Meddera 12-05-2016 10:43 PM

So I tried messing with heal rotations and I set one up with just my Cleric bot and my character in the rotation. It seems the are even setting for safe HP % and critical as for when they should actually heal you. Enabling this feature does nothing for me, my Cleric still no matter what starts healing me immediately when I am hit.

He will cast healing 6 straight times using all of his mana with 1 minute. There doesn't seem to be a lot of info on this topic, but I cant think Cleric bots have always behaved in this manner.

Anyone have any suggestions?

Uleat 12-05-2016 11:11 PM

Heal Rotation casting will override a Bot AI spell casting..

..but, it won't keep a bot from processing Bot AI spells...


I don't have a model to go by for what a cleric bot should be doing.

Let me ponder this for a bit and I'll see what I can come up with.

The_Beast 12-06-2016 12:26 AM

In the npc_spells_entries table, I made some adjustments to the cleric bots spells (701) to help deal with some of these issues.

werebat 12-06-2016 10:07 AM

Quote:

Originally Posted by Meddera (Post 252265)
I found this entry in the detail you sent to me

atCombatRange = true;
} else if(IsBotCaster() && GetLevel() > 12) {
if(IsBotCasterCombatRange(GetTarget()))
atCombatRange = true;

There could be more to it than that obviously but this was just me doing a quick run through of the code. Problem is I don't knew where bot.cpp is on my system or what I need to do to actually make changes to it.

Build from source and you can change the 12 to whatever you prefer. I did it and it worked fine.

Meddera 12-06-2016 09:33 PM

Thanks for the help guys but I don't know how to get to that cpp file unfortunately. I did the installer method to get my server up and running so am not sure how to be able to really make any changes. I did do some experimenting with the heal rotation and when I change the safe level for plate armor to 100% my bot Cleric will heal me non stop.

The problem is when I change the safe level to anything below 95% he ignores it and will auto heal anytime I breach 95%. So literally in a fight he is OOM in about 1 minute.

I also changed the interval for the heal rotation to 1 second hoping this would override whatever else he was doing but it didn't make a difference.

Meddera 12-06-2016 10:03 PM

I have been able to locate a few messages here and there about heal rotations so it appears they used to work because I didn't find anyone complaining about this particular issue. There must be a way to turn the 95% threshold off, or have it ignored.

I tested a Shaman bot and it did the same thing.


Also, not that it matters but I tried all the stances and it didn't fix the problem. One notable thing I noticed was if you change the Cleric to stance "passive" he will no longer cast buffs on himself or anyone else in the party, but he still heals at 95% or less.

Uleat 12-09-2016 09:09 PM

I added a rule (Bots:CasterStopMeleeLevel) so that the level can be tailored without recompiling code.

The sql is optional and the server will default to the original '13' like before (I changed the '> 12' criteria to '>= 13' .. so, the behavior is the same.)


A rework of bots is on the long range radar..but, there are many, many things that need to be fixed before them.

Meddera 12-09-2016 11:40 PM

Thanks for that. Do I need to do some sort of refresh to this on my end? I am assuming it will be in the rules_values correct?

Also, have any quick ideas on what could force healers to the 95% heal setting?

Uleat 12-10-2016 12:06 AM

If you're using the pre-compiled binaries from Akkadius's installer, you'll have to compile your own or wait until the downloadable ones are updated.
(I'll try to update those tomorrow..)

You'll also need to manually source this sql file into your database: https://github.com/EQEmu/Server/blob...level_rule.sql

That db update will allow you to externally adjust the level.


Bot HR commands start here: https://github.com/EQEmu/Server/blob...mand.cpp#L5945

Heal Rotation functions are here: https://github.com/EQEmu/Server/blob...l_rotation.cpp

I'm out of time for the evening..but, I'll take a look tomorrow and see if I can figure out your symptom.

Meddera 12-10-2016 12:23 PM

I don't know that the problem is with the heal rotation code itself. If I am playing a warrior with any plate on at all and change armor type for safe level to 100% the cleric will heal me non stop. So I believe that functionality is working.

The problem is, when I change it to anything below 95% it is overruled by the bots 95% threshold. The Cleric will heal when any member of the group hits 95% health. So heal rotations right now cannot work as intended.

There must be something in the code for healers that specifies <=95% cast healing spell.

Meddera 12-10-2016 12:34 PM

I think I just found it in the code.


if( iSpellTypes == SpellType_Heal ) {
if( botCasterClass == CLERIC || botCasterClass == DRUID || botCasterClass == SHAMAN) {
if(caster->HasGroup()) {
Group *g = caster->GetGroup();
if(g) {
for(int i = 0; i < MAX_GROUP_MEMBERS; i++) {
if(g->members[i] && !g->members[i]->qglobal) {
if(g->members[i]->IsClient() && g->members[i]->GetHPRatio() < 90) {
if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
return true;
} else if((g->members[i]->GetClass() == WARRIOR || g->members[i]->GetClass() == PALADIN || g->members[i]->GetClass() == SHADOWKNIGHT) && g->members[i]->GetHPRatio() < 95) {
if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
return true;
} else if(g->members[i]->GetClass() == ENCHANTER && g->members[i]->GetHPRatio() < 80) {
if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
return true;
} else if(g->members[i]->GetHPRatio() < 70) {
if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))
return true;
}


This of course is just a guess, but I am playing with a warrior right now and the 95% is when I get healed and I see the < 95 up there. Ok I see things that could probably be changed to correct my issues. I hate to be a pain as I know you guys have heard this a million times, but I am new to this and I was unable to get the original method of getting a the piece parts to work so I used the installer. Is it possible to make changes in the cpp files above using that method? Or do I need to go back and try to get the more complicated process to work?


I also see similiar code below for the Paladin class, but there is nothing for the gethpratio. The line is there, but no number and when I made a Paladin bot he would not heal me.

} else if((g->members[i]->GetClass() == WARRIOR || g->members[i]->GetClass() == PALADIN || g->members[i]->GetClass() == SHADOWKNIGHT) && g->members[i]->GetHPRatio() < hpRatioToHeal) {
if(caster->AICastSpell(g->members[i], 100, SpellType_Heal))

GRUMPY 12-11-2016 11:28 AM

This is from an older thread I found "searching" which talks about that "95%"

You can view the whole thread here : http://www.eqemulator.org/forums/showthread.php?t=40561

I have no clue if this is helpful or not, I don't play with bots anymore than I use self checkouts at the store.
Is any other bot servers/users having the same problem?

Quote:

Originally Posted by AsmoTiC (Post 248366)
You can modify those ranges with the following commands:

^hrcrit 0 65 (This will set the default value to 65%)
0 is for default, this is the Target defined in the Heal Rotation (^healrotationsettarget <this guy>)
1 -4 are for the armor classes (1 Cloth, 2 Leather, 3 Chain, 4 Plate)

^hrsafe 0 95 (This will se the default value to 95%)

When you hit the Crit threshold, Fast Healing will kick in (if you have it turned on), Anything about the Safe value and the Bot will ignore you.

Note sure about modifying spells cast. They seem to can't the best they can given the level they are. There might be a table in the database to tweak this, but I pretty much run them as-is right at the moment.

Hope that helps a little. Uleat updated the Wiki for the Bot Heal Rotation pretty recently. Should be able to guide you through some of the other commands.

http://wiki.eqemulator.org/p?Heal_Ro...--Bot_Commands


Meddera 12-11-2016 01:39 PM

This is the heal rotation safe and critical ranges. They do not work due to the 95% issue. So if I set the safe range to 100% for my plate wearing warrior the cleric will start a healing loop. He will not stop because I have told him 100% is the target for a heal.

The problem is when I adjust this down to ANYTHING below 95% it is ignored due to the above bot code I posted. The code is telling the bot, that if the character is a warrior class it should cast a healing spell anytime the character falls to 95% health. This code will completely bypass anything the heal rotation is telling it to do. I have tried messing with all of the hr settings and everything I could think of, but that 95% bot code supersedes all.

Obviously this does not make sense and makes healing bots in their current code worthless. So I have tried to go and manually install my server, not using the installer so that I can make some changes to the code myself, but I have run into problems and have posted them in the server forum but it seems the support is lacking these days for manual installation.

Meddera 12-12-2016 10:10 PM

Quote:

Originally Posted by GRUMPY (Post 252270)
You would have to download the source code, make the necessary edits and, if your using windows, install cmake and VS and compile the edited source.
I wouldn't do it myself unless a developer made some input about the actual edit for something like that, but I don't care for bots myself.


Ok I don't know how, but I was finally able to get this thing up and running with the manual method. It took many tries, but I am in now.

So where can I download the source? Would that be the same detail Uleat posted a link to? If I make changes how do I get those specific changes I made compiled?

Also, I noticed that there seems to be some sort of new update method when you run world.exe. Would this cause any issues with changes I make? Like would it roll them back?

Meddera 12-12-2016 10:20 PM

Quote:

Originally Posted by Uleat (Post 252373)
I added a rule (Bots:CasterStopMeleeLevel) so that the level can be tailored without recompiling code.



Thanks for this. I just saw this option when I went poking around.

Uleat 12-12-2016 10:24 PM

All of the programs and source links are on this wiki page: http://wiki.eqemulator.org/p?Complet...Guide&frm=Main

(Maps, quests, etc... can be gotten from the eqemu_server.pl script when running manually - which, you probably already have.)


The updating that occurs when you run world is for the database.

It checks what version the binaries are at, and then updates accordingly.

The only time you really need to worry code changes are when you pull in new server code to compile - stash save is a wonderful tool.

It is possible to lose database changes when pulling in new server code due to a version update - or in super rare cases, you change something that triggers an already
applied change again.

(There is a tool in the server script that will back-up your current database - fairly quickly..)


TortoiseGit is a wonderful tool for menu-driven git activities.

Meddera 12-12-2016 10:40 PM

So I just went poking around again and found the bot.cpp files in EQ/Source/Zone.

If I make a change using notepad++ to one of these files do I need to do the cmake and visual studio piece again? If so, anything else?

Sorry I am completely unfamiliar with any of this... Surprised I have made it this far to be honest.

Uleat 12-12-2016 10:53 PM

The only time cmake needs to be re-run is if you add/remove files (or change design-time options - like enabling bots.)

You can actually make changes in Visual Studio and have access to "Intellisense" - an IDE-based syntax checker.

Once you make your changes, recompile everything and then copy the new binaries over to your server folder. This is the step that downloading pre-built binaries supercedes.


EDIT:

Most people find that running a stable version of the master code, and not updating, is easiest. That way, they can make all the changes that they want and not have to worry about keeping up with the latest changes.

I'm fairly certain that the current code (as of today) is stable enough to do this.

Once you get familiar with making code changes and stashing/merging, you can look at pulling in updates and managing them.

Meddera 12-12-2016 11:29 PM

Ok so I made one change to bot.cpp compiled it, did a build on zone and moved the zone file to the server folder. When I tried to get in game it says zone not available. Now I did save the last zone file replaced it and everything worked again.. Do I need to replace all of the files for a change? Not just zone?

Uleat 12-12-2016 11:36 PM

It's a good idea to recompile all projects by selecting 'build' on the solution name.

That help's ensure locations/offsets all match up :)

I always copy everything each time I compile..haven't had any mismatch issues.

Meddera 12-13-2016 12:07 AM

Quote:

Originally Posted by Uleat (Post 252426)
It's a good idea to recompile all projects by selecting 'build' on the solution name.

That help's ensure locations/offsets all match up :)

I always copy everything each time I compile..haven't had any mismatch issues.

Ok so I noticed when I clicked 'Build ALL' if they didn't all update I don't need all. The last change I made only updated zone so I was able to only move that one in.

So I did a couple of tests. First I changed the 95% I found to 30% and nothing seemed to change. I then went in and changed where it said 'Cleric' to 'Paladin' and 'Paladin' to 'Cleric', essentially switching their roles. I then used what you built and turned the Clerics melee attack off at level 1 as to not muddle up my test.

This made a difference. He actually casted some offensive spells and did not start healing me until I dropped below 50%. This is how the Paladin typically behaves. The one issue is he still healed himself immediately if the 95% threshold was breached.

So I made some quick changes and already I am seeing an improvement. I will probably continue to tinker with it until I get the Cleric bot somewhat usable.

Thanks for the nudge if not the shove to get me where I could figure some of this stuff out. I don't plan on learning to write code, but I think just a couple changes here and there with trial and error can get this to a better place. At least for my uses.

Meddera 12-13-2016 12:22 AM

Ok one last thing I noticed. The Paladin and Ranger and Beastlord are actually set up so much better. The "stance" is used in determining when the heal needs to occur. For example, at balanced they will heal at 50%, but at efficient they heal at 25%. These numbers of course can be changed, and now that I switched Paladin with Cleric I am basically where I need to be and can make changes on the fly by just switching his stance which is exactly what I wanted.

The only thing next would be to stop him from healing himself so quickly, but the main issue is resolved. I really think Clerics were intended to be the same way and someone quit in the middle or made a change just for a big raid or something and either never changed it back or we ended up with older code.


Here is the code I am referring to and where it says "Cleric" initially said Paladin.


if( botCasterClass == CLERIC || botCasterClass == BEASTLORD || botCasterClass == RANGER) {
if(caster->HasGroup()) {
Group *g = caster->GetGroup();
float hpRatioToHeal = 25.0f;
switch(caster->GetBotStance()) {
case BotStanceReactive:
case BotStanceBalanced:
hpRatioToHeal = 50.0f;
break;
case BotStanceBurn:
case BotStanceBurnAE:
hpRatioToHeal = 20.0f;
break;
case BotStanceAggressive:
case BotStanceEfficient:
default:
hpRatioToHeal = 25.0f;
break;


All times are GMT -4. The time now is 04:51 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.