PDA

View Full Version : Which bot code would help


Criimson
07-03-2011, 02:14 AM
Hello bot devs

So after I had the server code compiled and running I decided to play around to test the cleric/archetype changes pfyon did. They work great btw.

After I had run a few LDoNs (read ~20 hehe good times) I decided to read though the botspellsai.cpp code as I wanted to get an idea of what was in there.
I have some skill with C/C++ and scripting and would like to help with the bots. Basically starting with the classes that I know and played extensively on live: those being the enchanter and necromancer.
From the code it appears that enchanters should be mezzing adds on their own, but on my server my enchanter isn't. Are they mezzing on others servers or should I start there. From playing with my bots it seems like this would be a very helpful thing to have added and I don't mind working on it.

Another thing that I could work on is bot "placement". I personally don't like my bots all stacked on top of each other. It just bugs me. I like to see the characters I am playing with. So I am going to leave it up to the other devs on which they would like to have me start with.

1) Enchanters

or

2) Bot Stacking

Criimson

c0ncrete
07-03-2011, 03:08 AM
There isn't any sort of bot AI coded anywhere to handle crowd control.

Bots aren't even really aware of the NPCs surrounding them, regardless of the threat level to the owner. Thus, they take no action at all unless the owner engages first, they are hit by an NPC's AoE effect, or they are implicitly ordered by the owner to take action against a specific target.

I'd personally love to see some more in-depth decision making capabilities for quite a few classes, honestly. Paladins and Rangers who cast heals when there is a capable priest class in the party seems like a waste. Things such as intelligent target changing (for things like off-tanking or emergency peeling of NPCs off INT casters, for example) would be nice as well.

That being said, mucking about with placement would likely much less complex of a task. :)

Criimson
07-03-2011, 03:14 AM
Well from the look of this code. It seems someone at one point thought to add the code. Maybe they went on to something else, but now that I know that CC isnt implimented I will work on that as it is important to me. I played a chanter for years and to see mine just Rune/DD/Buff/Debuff when they could be saving my ass bugs me. I play with the exp set at 0.25 and the death penalty unchanged...so even dying at level 10 sucks :P

case SpellType_Mez: {
if (tar->GetBodyType() != BT_Giant) {
if(!checked_los) {
if(!CheckLosFN(tar))
break; //cannot see target... we assume that no spell is going to work since we will only be casting detrimental spells in this call

checked_los = true;
}

botSpell = GetBestBotSpellForMez(this);

if(botSpell.SpellId == 0)
break;

Mob* addMob = GetFirstIncomingMobToMez(this, botSpell);

if(!addMob)
break;

if(!(!addMob->IsImmuneToSpell(botSpell.SpellId, this) && addMob->CanBuffStack(botSpell.SpellId, botLevel, true) >= 0))
break;

castedSpell = AIDoSpellCast(botSpell.SpellIndex, addMob, botSpell.ManaCost);
}
break;
}
default: {
break;
}
}

return castedSpell;

Is the code in botspellsai.cpp. I'll start with this code as a baseline and see if I can get it working.

Criimson

EDIT:

So I did some thinking of what ya mean by some more bot AI.

Im going to run some tests on my own server and add some tables to my DB based on each bot class that allow for player settings for their bots.
Using your hybrid classes as an example:

(table) Bot_Paladin
(column) Healing (column) Percentage

First column is on/off - setting whether the player wants their paladin healing at all
Second column sets the percentage at which the paladin will start to throw out heals if set to on

Myself, if grouped with a pally, wouldn't want him throwing any heals unless the MT hits < 20%

I was already considering adding something like this because I love the clericcode pfyon added but was going to change it to the cleric not casting DDs when they hit 75% and didnt want to have to recompile the code everytime I was tweaking the %.


EDIT EDIT:
Is the #bots irc channel dead?
Not seeing anyone in there

Congdar
07-03-2011, 12:56 PM
There isn't any sort of bot AI coded anywhere to handle crowd control.

Bots aren't even really aware of the NPCs surrounding them, regardless of the threat level to the owner. Thus, they take no action at all unless the owner engages first, they are hit by an NPC's AoE effect, or they are implicitly ordered by the owner to take action against a specific target. this is so you can't afk level by standing in a crowded location and going to bed and having the bots just fight all night for you.

Things such as intelligent target changing (for things like off-tanking or emergency peeling of NPCs off INT casters, for example) would be nice as well. When the bots had raid support there were commands you could macro for having an offtank group.

c0ncrete
07-03-2011, 08:54 PM
this is so you can't afk level by standing in a crowded location and going to bed and having the bots just fight all night for you.

I'm all for it. Just supplying input/feedback regarding the original post.

On that note, wouldn't a priest/hybrid heal you if you were under attack in a high-traffic area while idle and cause the rest of the bots to aggro when the healer is attacked? I know healing is on a much lower priority while the AI believes you are not engaged, making it much riskier.

So many scenarios to take into consideration...

P.S.

I'd like to thank all of the developers, past and present, for the work they put in to this project.