Re: Request LUA: AutoAttackTick
Posted: Thu Oct 11, 2012 2:15 pm
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.
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.