Magic casting mobs.

Post Reply
altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

Magic casting mobs.

Post by altalus » Tue Nov 27, 2012 10:40 am

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.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Magic casting mobs.

Post by whasf » Tue Nov 27, 2012 3:27 pm

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)
-- Whasf

altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

Re: Magic casting mobs.

Post by altalus » Tue Nov 27, 2012 3:33 pm

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++ :)

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Magic casting mobs.

Post by kjLotus » Tue Nov 27, 2012 9:36 pm

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

Post Reply