BPI_UniversalMonster
Last updated
Last updated
Universal Monster utilizes interface functions for easy integration with other non-UM systems. Any character that will be using Universal Monster will also need to implement the BPI_UniversalMonster interface and setup its functions.
UM does not come with a built-in Stats/Attributes System, it does have a basic health system, but it is not recommended for you to use this. You will need to create your own Stats/Attributes System or use one you have purchased from the Unreal Engine Marketplace. UM intentionally leaves this system out because there is no way for the UM system to know which types of stats and/or attributes you wish to use in your project. Universal Monster, however, is capable of using the information from any other stats/attributes system for its decision making. Below are examples of setting up the Get Stat and Set Stat interface functions to grant UM access to their values.
All of the Stat Names are stored in E_StatName which can be edited to add or remove more Stat/Attribute types.
Universal Monster uses its own save game to keep track of the faction system data and it needs a way to link the current faction data to the current save game slot. UM will still store its information in a separate file, but it will use the current slot name as its prefix and "_UM" as its postfix. For example, save game named "New Game" will have its own save file called "New Game.sav" and a Universal Monster save file called "New Game_UM.sav".
Universal Monster handles when to trigger hits based on its melee, projectile, and special attack hit detection, but it technically does not know what to do with the hits it generates. This is where you would tie in your damage system. As stated above in Stats/Attributes, UM does come with a basic health system, but this is meant for demonstration purposes only. More than likely you will be using a more robust damage system and will need to be able to utilize hits determined by Universal Monster. The UMHit interface function is specifically for this purpose. Every single successful hit generated by UM will call this interface function and you can use it to call your own damage system's functions.
With Universal Monster you can provide custom hit effects for any attack. When the target is hit, and that target is using UM, it will call the Hit Effect interface function for all custom hit effects listed in the attack. Each custom hit effect will be given a name in which you can use to call custom logic. You can also pass along custom information that you can input into the provided arrays. You will need to know what each index of the arrays represents, but since it is your own custom code, that should be no problem.
Universal Monster can also trigger custom events for any behavior task. This function is called at the beginning of every task and also during the Find Task at the moment it finds what it was searching for.
Universal Monster also has its own Bullet trace system which takes into account gravity, drag (air resistance) and wind. Every weapon and/or Bullet can have its own settings, such as velocity, accuracy, number of traces and for how many seconds of travel it will calculate those traces (the trace is still instant, but this setting will make it trace the distance the Bullet would have travelled in the chosen seconds). How you get and setup your Bullet info is up to you, but I recommend a map of mesh/string/name to Bullet info struct so that you can use the equipped weapon, or the bullets used the weapon, to determine the Bullet info being used. You can then setup the starting location (usually the end of the gun barrel), the direction (usually the direction the gun barrel is facing), the gravity and the wind.