Page 3 of 3

Re: Request LUA: AutoAttackTick

Posted: Thu Oct 11, 2012 2:15 pm
by Jabantiz
The combat loops runs every 20ms (I think forgot what I put it as, can be changed easily though) even if the mob isn't ready to attack yet. Also I believe every lua file is only loaded once and if multiple mobs use the same file it just shares that file in memory, it doesn't load another instance of it (again I think that is how it works would have to dig deeper into lua to confirm though). I also agree stability is a mjor concern.

That being said this line of discussions brings up my point in my lua function ideas thread for the ability to overwrite the combat routine in lua. There is a lot to unique combat in EQ2, while the devs can hardcode it all and make it rely on db values at some point it will be come bloated to the point dozens of checks are being run to determine if we melee, cast a spell, what type of spell if we cast, do we help our group, do we run around like a little girl screaming for help, and so on.

That is why I believe us coding a standard simple AI for the server core is best, less for the core devs to maintain and less headaches hunting down bugs in the server core for a server admin when the issue was in the db on there end. And with the ability to script the AI in lua server admins can come up with who knows what with out requesting more db values and server core changes, at most they just could request a lua function wich depending on what they want that function to do can be a lot simpler to implement then adjusting combat code.

Finally it could be set up so the script is only called when an attack needs to be made, or the script itself can handle how often it will be called.

Re: Request LUA: AutoAttackTick

Posted: Thu Oct 11, 2012 2:41 pm
by alfa
I like your point of view Jab, assuming you think generic AI not just cast spell with percent value. After, DB / Data Team can release some LUA combat script "Approved" for non generic encounter, and admins can make their own combat scripts.

Anyway to be off like in combat this need to take some more ressources for sure, a scripted fight (ex Raid) need a ton of Timers, Checks on raid members, Check on spawn...

Clearly evoluting with game on live, all <= T5 raid / group fights are really basic (just some check, add pop, generic damage AE...) but for > T5 fights, they start to do more complex combat script but still just need basic checks... And EoF come with God Avatars, and combat script start to do alot of check about players in raid, specific detrimental, with specific ways to cure, a lot of AE that request a lot of caculation... (The devs who work on EoF raid script was genious :p It be a big step in Combat script for the game)

Re: Request LUA: AutoAttackTick

Posted: Thu Oct 11, 2012 3:35 pm
by John Adams
This will not be done in 0.7.2. We already have a bloated schedule of things we've agreed to do, and while it sounds interesting, this is not a priority. Don't make it one.

Let me be clear. I do not care about raiding, instancing, or complex combat options. We have 1 player every 2 mos, never even filled a single group with players in 5 years. This is the lowest priority of anything currently being discussed, and if we get to it with Jabantiz's other scripting ideas, great. But no effort for this massive change is to be started now. Things just started to stabilize again.

Re: Request LUA: AutoAttackTick

Posted: Thu Oct 11, 2012 3:46 pm
by Jabantiz
I have no intent to work on this any time soon, while I think it would be simple to do the override (keyword: THINK) a lot of other functions would need to be exposed to lua, and more discussion on the topic needs to be done to determine everything that would be needed. And lets face it, combat equations should come before this, no point having really advanced combat scripts if damage calculations are off. I also still have several more basic systems to focus on.

For me this is a nice "someday" feature to add if we decide to add it.