Page 1 of 1

[ Database ] Solved - Mob Ambient Behavior

PostPosted: Sun Jan 04, 2015 8:59 pm
by Eudes
Hello DOL,

All my best wishes to all the DOL fans :)

I want to add a text and emote to a NPC, but I want to do it when the NPC is doing nothing. If I understand well (http://www.dolserver.net/viewtopic.php? ... 40#p118340) it is not possible.

Any chance to add a new trigger to let NPC talk even when staying with no action? Like a guard, or a PC seeing a PC walking around.

Thanks

Re: [ Dataquest ] Mob Ambient Behavior

PostPosted: Sun Jan 04, 2015 10:00 pm
by Dinberg
You could create a new brain for the npc and override the tick function to sometimes say a random phrase. This is essentially what the MAB is doing. I think you just want something like Body.Emote(eEmote.Dance) or whatever

Re: [ Dataquest ] Mob Ambient Behavior

PostPosted: Mon Jan 05, 2015 12:32 am
by Graveen
There is the trigger 'seeing' which have been added on purpose for Britannia iirc.

Wiki is not up to date.
Code: Select all
/// <summary> /// The possible triggers for GameNPC ambient actions /// </summary> public enum eAmbientTrigger { spawning, dieing, aggroing, fighting, roaming, killing, moving, interact, seeing, }
Notice AggroRange should be > 0 (this is used as the range where you want to trigger the random sentences for each gameplayer).

Re: [ Dataquest ] Mob Ambient Behavior

PostPosted: Mon Jan 05, 2015 7:22 am
by Eudes
Thanks Dinberg and Graveen.

Wiki and ingame help are both not up to date, when using the /mob trigger help, there is not seeing but neither interact.

I will give it a try with seeing, this is exactly what I am looking for!

I keep you posted.

Thanks again :)

Re: [ Database ] Mob Ambient Behavior

PostPosted: Tue Jan 06, 2015 8:46 pm
by Eudes
Hi again,

Everything works fine, great!

Thanks

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Sun Jan 11, 2015 12:54 am
by Eudes
Hi again,

Is that still how it works? (From this post)
- MAB is randomly choosing one sentence if many availables
The choosing process is the following:
* MAB gathers all the available sentences (in example, you can have 3 aggroing sentences for the same mob - 3 lines in the table)
* MAB randomly takes one
* MAB is evaluating the % chances this sentence is fired
Thanks

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Sun Jan 11, 2015 4:10 pm
by Graveen
Yes it is.

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Sun Jan 11, 2015 4:23 pm
by Eudes
Thanks, good to know!

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Wed Jan 21, 2015 10:01 pm
by Eudes
One more question about MAB. Is there a way to use /em instead of a simple sentence?

I'm not talking about emote, that works well with emote, no problem, but instead shouting a sentence, I want to shout something like "MobName is looking at you badly".

Thanks

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Fri Jan 23, 2015 10:55 pm
by Graveen
Not for now. But you can use at least 2 channels: broadcast or /y

Re: [ Database ] Solved - Mob Ambient Behavior

PostPosted: Sat Jan 24, 2015 11:37 am
by Eudes
Yes and local area too, by default. But it does not work as /em, because it always use "MobName says:".

I think this is a good feature to add together with the now working fine seeing trigger.