-
Notifications
You must be signed in to change notification settings - Fork 12
Your first hero
Wngui edited this page Mar 22, 2025
·
5 revisions
With all dependencies set up, let's create our first hero!
Inside the WarcraftPlugin directory, you'll find a CustomHeroes folder—any compatible C# files placed here, will automatically load into the plugin.
- Download the HeroMaker folder from the repo: Download.
-
Open
HeroMaker.slnin Visual Studio. -
Configure the project: Double-click the project and update the highlighted path to your own. If CustomHeroes doesn't exist, create it. This ensures your hero files are copied to the correct location on build.
-
Use the example hero
MonkeyDude.csas a base, or create your own. Ensure the namespace remainsWarcraftPlugin.Classes.
public class MonkeyDude : WarcraftClass
{
public override string DisplayName => "MonkeyMan";
public override Color DefaultColor => Color.GreenYellow;
public override List<IWarcraftAbility> Abilities =>
[
new WarcraftAbility("Banana Gun", "Shoots a barrage of bananas that explode on impact."),
new WarcraftAbility("Monkey Agility", "Increases movement speed and evasion."),
new WarcraftAbility("Primal Roar", "Emits a roar when killing an enemy that stuns nearby enemies."),
new WarcraftCooldownAbility("Jungle Fury", "Temporarily increases attack speed and damage.", 60f)
];
public override void Register()
{
HookEvent<EventPlayerSpawn>(PlayerSpawn);
HookAbility(3, Ultimate);
}
private void PlayerSpawn(EventPlayerSpawn spawn)
{
Console.WriteLine("MonkeyMan has spawned!");
}
private void Ultimate()
{
Console.WriteLine("MonkeyMan used ultimate!");
}
}-
DisplayName– How the hero appears in menus and in-game. -
DefaultColor– Defines hero-related colors in menus and models. -
Abilities– Typically four abilities, each with a name, description, and optional cooldown. -
Register()– Called when the hero is instantiated, mainly for registering hooks.
Modify an ability in MonkeyDude.cs, then build the solution to copy the file automatically.
Join the server, switch to MonkeyDude, and check if the skills menu reflects your changes!
- Getting Started
- Setup Guide
- Your First Hero
- Event Handlers
- Damage
- Particles
- Warcraft Effects
- Props and Velocity
- Collisions and Triggers
- Ray tracing
- Advanced Geometry
- Sounds
- Custom Player Models
- Localization