Page 1 of 1

Magic casting mobs.

Posted: Tue Nov 27, 2012 10:40 am
by altalus
Ok, I'm thinking out loud here.

First, a question to the core programmers: Would it be too system-intensive to call a LUA for each mobs in combat at every battle tick ?

Here is my idea. Let's add this to LUA (and corresponding binding in cpp:

Code: Select all

-----------------------------------	
-- onMobBattleTick	
-----------------------------------	
	
function onMobBattleTick(mob, hateList)

end;
That way we could have a list of possible spells for the mob or mob family and then do some sort of basic AI. With the function to check the hate list, positionning of the players and such, we could do some basic magic casting AI.

Re: Magic casting mobs.

Posted: Tue Nov 27, 2012 3:27 pm
by whasf
Logic for spellcasting for monsters should go in src/ai/ai_mob_dummy.cpp

We need some SQL tables built for it or a blob/bitmask added to mob_family_groups with an override somewhere for special cases (HNMs, NMs, etc)

Re: Magic casting mobs.

Posted: Tue Nov 27, 2012 3:33 pm
by altalus
whasf wrote:Logic for spellcasting for monsters should go in src/ai/ai_mob_dummy.cpp

We need some SQL tables built for it or a blob/bitmask added to mob_family_groups with an override somewhere for special cases (HNMs, NMs, etc)
Good enough for me. Will also force me to get deeper into C++ :)

Re: Magic casting mobs.

Posted: Tue Nov 27, 2012 9:36 pm
by kjLotus
altalus wrote:Ok, I'm thinking out loud here.

First, a question to the core programmers: Would it be too system-intensive to call a LUA for each mobs in combat at every battle tick ?

much better off figuring out every tick if and what they should cast and THEN call the lua