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 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 01:57 AM.

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