This is important since health regeneration and some item cooldowns will be linked directly to the combat mode flag. I have yet to refine the rules for players to determine when they are out of combat. When an entity dies, gets too far away, or meets a few other conditions they are then removed from the list.įor npcs when the list is empty they are out of combat and enter ‘homing’ mode. If the new top level entity contains X% more agro than the current target then we switch targets. This makes life a bit dangerous for support players in a battle.Įvery second the agro list is sorted by the amount of agro recorded for each entity in the list. When a ‘heal’ spell or any helpful spell is cast upon the any entity in our threat list will be added at 2x the value of the healed amount. For example a melee attack generates threat near equal to the amount of damage. The amount of agro is determined by the form of attack. Whenever an entity is attacked the attacker adds agro to the list. Players typically ignore this list but active npcs use this to determine which npc is the most viable target. Now the list of entities that we are upset with is called the threat list or agro list. Each entity has a list of other entities that it is upset with and a list of entities that are upset with it. What Elderlands does for combat AI and agro management is a bit more complex. This allowed for the ping ponging of a mob. Whenever they were attacked back and the attacker was closer than their current target they would switch to that target. Attacking mobs looked for a target that was closest to them and went after it. In my previous works (Dransik) I had a very simplistic AI system. Event types are defined in a large enumeration. Event parameters are handled through a structure which is nothing more than a container of data types that are sequentially added. Objects can register events they care about and receive a callback whenever any event is fired that they care about. I currently have extended the language to support an event system. So I’ve been pondering how to create a system that provides the flexibility of a generic signal/slot system while keeping performance the #1 priority in the Ooz language. It is very flexible in the sense that objects can hook to signals of other objects and receive callbacks through slots (class methods which are called). I need something that is performance oriented. The C++ framework called QT already supports signals and slots but has a pre-processor and is not very efficient from a performances standpoint. One thing I’m researching is a sort of ‘signals and slots’ system that would be integrated into the scripting language. It supports micro-threading, is extendable and is designed with performance in mind. It is a very small yet robust scripting engine. Ooz is the scripting language that I wrote for Elderlands and all If-Else Software games.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |