-
Notifications
You must be signed in to change notification settings - Fork 0
English
The Mod development tutorial includes:
《Miracle Heroes》is developed using Unreal Engine 5.4.4. In the Mod project, we have opened up 70% of the content, allowing players to access and create mods according to their needs.
Download the Unreal Engine (version 5.4.4) from EPIC.
Download the Mod project on Steam.
(If the ModKit is not visible, you may need to enable tools in the categories section by checking the relevant option.)
Double-click AnimalBrothers.uproject
to open the Mod project.
You can also download ModKit through SteamCMD. Specific steps: https://steamcommunity.com/app/3095600/discussions/0/594008672803430311/
- First, create a new plugin and name your GameFeature (it's best not to duplicate names with other mods, preferably consistent with the Mod name).
- You can find the newly created plugin in the Plugins directory and set its initial state to Active. All resources used by the Mod should be placed in this plugin directory afterward.
- Congratulations, your first Mod plugin has been successfully created!
All items in the game are based on BP_ToolBase
(/Game/Blueprints/Items/Tools/BP_ToolBase).
- Create a new Actor in the plugin directory that inherits from
BP_ToolBase
.
- Configure the item's attributes:
-
NeedSpawnActor
: Indicates whether the Actor needs to be generated in the world. For items that only add attributes, keep this false unless your item has special functions. -
AddAttribute
: The attribute influenced by the item. -
NeedAddWorldAttribute
: Whether the item will affect world attributes. -
WorldAddAttribute
: World attributes to be influenced. -
ItemAttTag
: The tag of the item (heroes configured with this tag are more likely to find this item). -
ItemInfoConfig.ItemName
: The name of the item. -
ItemInfoConfig.ItemSubtitle
: The tag of the item (like: item | unique) (just a label with no functionality). -
ItemInfoConfig.ItemDescription
: Detailed explanation of the item. -
ItemInfoConfig.ItemTag
: The unique tag of the item. -
ItemInfoConfig.ItemLevel
: The level of the item (0-3). -
ItemInfoConfig.ItemValue
: The base price of the item. -
ItemInfoConfig.MaxStacking
: Maximum stack size of the item. -
ItemInfoConfig.Icon
: Icon of the item. -
ItemInfoConfig.UpdateItems
: Other items the item can be combined with to create a new one (currently only for weapons and equipment).
-
All weapons in the game are based on BP_WeaponBase
(/Game/Blueprints/Items/Weapons/BP_WeaponBase).
There are separate base classes for melee and ranged weapons (most cases inherit from these two classes).
- Melee Weapons:
BP_WeaponMelee
(/Game/Blueprints/Items/Weapons/BP_WeaponMelee). - Ranged Weapons:
BP_WeaponRemoteBase
(/Game/Blueprints/Items/Weapons/BP_WeaponRemoteBase).
-
CharacteAddTag
: Affected by player attribute additions (e.g., 100% melee damage as in the image). -
CharacterAddRangeMultip
: Percentage of player attack range addition. -
AttackRangeMin
: Minimum attack range. -
Entrys
: Synergy. -
WeaponDefaultAttribute
: Default attributes of the weapon. -
WeaponAddAttribute
: Bonus to player's attributes. -
TraceRadius
: Damage detection radius. -
StartDamageSocket
: Damage detection start socket. -
EndDamageSocket
: Damage detection end socket. -
TraceNum
: Detection density. -
AttackMode
: Attack mode. -
SwingingAttack
: Swiping attack configuration. -
ThornAttack
: Piercing attack configuration. -
SmashingAttack
: Smashing attack configuration.
-
ItemInfoConfig.NextLevelActor
: Next level weapon. -
ItemInfoConfig.UpdateItems
: Items required for an upgrade.
-
Rotation Speed
: Weapon rotation speed. -
AimSpeed
: Weapon aiming speed. -
Start Shoot
: Immediately triggers shooting (does not use Montage to control shooting, commonly used for firearms). -
ShootNum
: Number of shootings (if 0, indicates no need to reload, can shoot continuously). -
CoolingDuration
: Reload cooling time. -
ShootMontage
: Shooting animation. -
ReloadMontage
: Reload animation. -
Arrow
: Arrow class. -
ArrowSocket
: Socket where arrows are generated. -
ShowArrowClass
: Generated arrows (for display purposes).
Projectile Configuration:
-
AmmunitionObjectPool
: Bullet object pool. -
Destroy Time
: Bullet destruction time. -
Trace Radius
: Bullet damage detection radius. -
Speed
: Bullet flight speed.
Create a new Component and add the following logic. In GameFeature, add the following configuration.
All heroes inherit from BP_MainCharacter
(/Game/Blueprints/Character/Main/BP_MainCharacter).
BP_MainCharacter_WithSkill
is the base class for heroes with active skills.
-
Create a new Actor in the plugin directory that inherits from
BP_MainCharacter
. -
Define the hero's attributes:
-
HeroDetails.HeroName
: Hero's name. -
HeroDetails.briefintroduction
: Hero title. -
HeroDetails.HeroStory
: Hero's story. -
HeroDetails.HeroIcon
: Hero icon. -
HeroDetails.HeroDetails
: Detailed description of the hero (abilities). -
HeroDetails.StartSelectWeapon
: Weapons the hero can choose initially. -
HeroDetails.StartHas
: Items or weapons the hero starts with. -
HeroDetails.Level
: Hero difficulty (currently doesn't affect anything). -
HeroAddAttributes
: Attributes the hero initially possesses. -
HeroAddWorldAttributes
: World attributes affected by the hero. -
AddPercentageAttributes
: Percentage additions affecting the hero. -
UpgradeAddAttribute
: Attributes increased upon hero upgrade. -
Vampire Max Add Health Setting
: Maximum health drained per second. -
DefaultSpeed
: Default movement speed. -
MaxWeapons
: Maximum number of weapons. -
NotAddWeaponAndToolTags
: Tags for weapons or items that cannot be found. -
Add Tool Probability By Attribute
: Probability of finding items influenced by attributes. -
Add Tool Probability By ItemTag
: Probability of finding items influenced by tags. -
Add Weapon Probability By Entry
: Probability of finding weapons influenced by synergy. -
Add Weapon Probability By ItemTag
: Probability of finding weapons influenced by tags.
-
Note that the attribute ID of the hero must be regenerated, otherwise in multiplayer games, the hero cannot be initialized
Create a new Component and add the following logic.
In GameFeature, add the following configuration (add to BP_CreateManager
).
New levels should start by copying ExampleLevel
(/Game/Level/ExampleLevel) into the plugin directory.
PostProcessVolume
: Must add Post
label (otherwise the graphics settings system cannot recognize it).
BP_WorldManager
: Manages the level
-
DifficultyBonus
: World attributes influenced by the level. -
Enemy Max Num
: Maximum number of monsters allowed in the level. -
BGMSounds
: Random background music.
BP_CheckKillBox
: Players or monsters falling onto this box will be processed (e.g., players sent to spawn, monsters destroyed).
Create a new Component and add the following logic. Level Configuration Information:
-
LevelName
: Name of the level. -
LevelDetail
: Detailed introduction of the level. -
LevelIcon
: Icon of the level. -
Difficulty
: Level difficulty (0-5) (just for display). -
LevelPath
: Level path (e.g., /ExampleMod/NewLevel/NewLevel). -
LevelSetttings
: Level difficulty settings (can be obtained from previous difficulties, likeDT_TempleLevelSettings_00
). -
LevelRowName
: ID recorded after the level is cleared (format must be: name_number, e.g., NewLevel_0). -
CheckLock
: Confirm whether the level is unlocked by pre-clearance (leave empty for no unlocking requirement; if required, addLevelRowName
). -
Endless
: Whether it is an endless level.
In GameFeature, add the following configuration (add to BP_CreateManager
).
All mutations inherit from BP_AlienationBase
(/Game/Blueprints/Datas/Alienation/BP_AlienationBase).
BP_AlienationLevelNum
is mutated based on the number of waves.
Mutation attribute configuration:
-
EndLevel
: Duration of the mutation's wave. -
AlienationData.Name
: Name of the mutation. -
AlienationData.ICON
: Icon of the mutation. -
AlienationData.Detail
: Detailed description of the mutation. -
AlienationData.Actor
: Actor generated by the mutation (fill with Actor itself). -
AlienationData.OnlyMultiple
: Whether the mutation only appears in multiplayer mode. -
AlienationData.AddAttribute
: Attributes added by the mutation. -
AlienationData.WorldAddAttribute
: World attributes added by the mutation. -
AlienationData.ID
: ID of the mutation (a new ID needs to be generated).
Mutations will call init
upon being generated or loaded.
Create a new Component and add the following logic.
In GameFeature
, add the following configuration (add to BP_WorldManager
).
All enemies inherit from BP_EnemyBase
(/Game/Blueprints/Character/Enemy/BP_EnemyBase).
There are different types of enemies:
-
BP_Enemy_MoveToCharacter
: Moves towards the player. -
BP_Enemy_Out
: Avoids the player. -
BP_Enemy_Shoot
: Shoots the player from a distance. -
BP_Enemy_Sprint
: Charges the player.
-
Create an Actor in the plugin directory that inherits from one of these types.
-
Create a new object pool for the enemy.
-
Copy the previous monster data table,Configure enemy generation in
DT_TempleLevelSettings_00
.
-
EnemyPool
: Enemy object pool. -
StatTime
: Time when enemies start spawning. -
EndTime
: Time when enemies stop spawning. -
SpawnInterval
: Spawn interval. -
SpawnNumLine
: Spawn curve to control the number of spawns (changes the number of spawns over time). -
SpawnType
: Spawn type (clustered or distributed). -
AttributeBonus
: Adjustment of monster attributes (e.g., 50% health adjustment).
-
GetMoney
: Drops money. -
GetEXP
: Drops experience. -
Probabilityofdroppeditems
: Probability of dropping items. -
DefaultSpeed
: Default movement speed. -
AnimSpeed
: Animation playback speed (ensures character movement animation matches actual movement). -
IsBoss
: Is it a boss? -
CanMove
: Can it move? -
DefaultAttribute
: Initial attributes of the enemy. -
LevelNumAddAttribute
: Attribute growth per wave. -
EnemyDetails.EnemyName
: Enemy name. -
EnemyDetails.EnemyIcon
: Enemy icon. -
EnemyDetails.EnemyDetails
: Detailed introduction of the enemy. -
EnemyDetails.EnemyType
: Type of the enemy. -
CheckAttackCharacterTime
: Re-target player at regular intervals. -
MoveRandomRadius
: Random move radius. -
AttackRange
: Attack range.
-
LevelDuration
: Duration of the wave. -
EnemySettings
: Enemy configuration for the wave. -
SelectMutation
: Whether to select mutations for the wave. -
LevelSpawnClass
: Actors spawned during this wave (currently for spawning bosses, can serve other purposes). -
LevelTipMessage
: Message displayed before the wave begins.
Set the Mod status to Active to activate it.
In the game, you can press Alt+Shift+O to open the test menu
-
Click to open the packaging interface.
-
Before creating a Mod, you need to fill in some basic information:
-
GameFeatureName
: Name of the GameFeature. -
ModName
: Name of the Mod. -
Version
: Version number of the Mod. -
Author
: Author of the Mod. -
ModIntroduction
: Detailed information about the Mod. -
IsOnline
: Whether the Mod supports online play.
-
-
Click
CookMod
and wait for completion, then clickPackageMod
.
The Mod files will be saved in the \AnimalBrothers\Saved\Mods
directory.
Before uploading, please ensure that the Steam client is open and open UGC.exe to upload items
Upload attribute instructions:
-
FileID
: Steam's item ID. Set to empty to create a new Mod; to update a Mod, fill in the existing ID. -
ItemPreviewIMG
: Preview image of the Steam Mod.(Jpg or PNG of 512X512 is less than 1MB) -
Visibility
: Whether the Mod is publicly visible. -
ItemTags
: Tags for the Mod (separated by commas). - To make the Mod visible, you must agree to the Workshop terms.
Copy the Mod files to the game's Mod directory (AnimalBrothers\Content\Paks\Mods\
).
Restart the game to see the Mod.
Content/Blueprints/Datas/
: File Location
-
DT_CharacterAtt
: Player character attributes -
DT_EnemyAtt
: Enemy attributes -
DT_WeaponAtt
: Weapon attributes -
DT_WorldAtt
: World attributes
Content/Blueprints/Manager/
: File Location
-
BP_WorldManager
: Manages the start and end of waves -
BP_CreateManager
: Pre-game creation manager -
BP_SpawnEnemyTimer
: Enemy spawner -
BP_SpawnRandom
: Boss and leader generator -
BP_CheckKillBox
: Manages characters falling out of the map -
BP_Inventory
: Player's inventory, can be overridden and customized -
BP_ToolSysteam
: Player refresh and synthesis system, can be overridden and customized- For reference, see the
BP_Warrior_Tribe
hero.
- For reference, see the
-
BPI_World
: Enables the execution of custom code during the game lifecycle
-
Content/
-
Blueprints/
-
Character/
-
Enemy/
: Definitions for all enemies -
Main/
: Definitions for all heroes
-
-
Items/
: Definitions for all items-
Armors/
: Equipment items -
Tools/
: Usable items -
Weapons/
: Weapon items
-
-
UMG/
: All UI elements -
Interface/
: Definitions for all interfaces
-
-
EditorTools/
: Data tables are written into actors viaWBP_CreateActor
-
Data/
: All item data-
DT_ArmorInfo
: Equipment data table -
DT_EnemyInfoTable
: Enemy data table -
DT_HeroInfo
: Hero data table -
DT_ToolInfo
: Tool data table -
DT_WeaponInfo
: Weapon data table
-
-
-
Level/
: Map files-
LevelSettings/
: Map enemy spawn configurations-
Temple/
: Endless enemy spawn definitions for difficulty levels 0-5
-
-
-
If the project cannot package correctly, ensure the plugin is enabled in the project. If the issue persists, try deleting the Saved
folder.
Ensure the plugin is enabled.
Note that Mods only package the content in the plugin directory, so any modifications made to the content in the project file will not take effect
- Create a new data table in the plugin directory, inheriting from GameplayTagTableRow
- Add data tables in project settings
Switch Steam to the ModDebug branch. This branch is packaged using the beta version, and the logs can be seen in the directory