- Joined
- Sep 6, 2015
- Messages
- 576
How to create a unit that can level up
This is a detailed tutorial on how to create a unit that can level up based on a hero. It will look and behave just like a real unit, except that it will have the level-up system and attributes. There's a screenshot hereinafter at the end of this post for you to see how it will look.
*If you really want to create a unit that can level up based on a unit, although it's much more complicated, then take a look at this: Unit levelup System???
*If you really want to create a unit that can level up based on a unit, although it's much more complicated, then take a look at this: Unit levelup System???
First step: Creating a custom unit
Open the Object Editor and pick a hero on which you want to base your unit. It is recommended to pick a campaign hero, because there are less things to be changed in the unit properties later. Next, right click the hero and create a "New Custom Unit..." Change its name if you want, be sure the icon of the hero is selected, and click "OK". You now have a custom hero that will be the base of your unit that levels up.
Second step: Changing the unit's properties
Now that you have your new unit selected, it's time to tweak its unit properties in the Object Editor:
- Remove everything under "Abilities - Hero"
- Remove "Inventory (Hero)" from "Abilities - Normal" if you don't want your unit to have inventory
- Add any ability that you want your unit to possess under "Abilities - Normal"
- Change the "Art - Model File" to any unit model you want your unit to look like
- Change the "Art - Icon - Game Interface" to the icon of your model and remove the "Art - Icon - Score Screen"
- Change the "Combat - Attack 1 - Attack Type" and "Combat - Defense Type" from hero to something else you want
- Change "Stats - Hero - Hide Hero Death Message", "Stats - Hero - Hide Hero Interface Icon", "Stats - Hero - Hide Hero Minimap Display" all to True
- Change "Text - Name" and "Text - Proper Names" both to the name of your unit and remove the extra names, and set "Text - Proper Names Used" to 1
- Remove "Text - Tooltip - Awaken" and "Text - Tooltip - Revive", unless you want your unit to revive
- Change the "Text - Tooltip - Basic", so it doesn't say "Summon (Hero)", but "Train (Unit)" or something else, and "Text - Tooltip - Extended" to whatever you want
- Set "Techtree - Hero Revival Locations" to some random building that isn't used in-game if you don't want your unit to revive
- If your unit is based on a campaign hero set "Editor - Categorization - Campaign" to False, and possibly also "Editor - Categorization - Special" to False if it is True
- If your unit is based on a melee hero then you'll need to remove all of its "Techtree - Requirements..." and set "Techtree - Requirements - Tiers Used" to 0
- Change anything else you want, like attack, defense, mana, health, stats, stats per level, build time, build cost, defense and attack upgrade bonuses, upgrades used, the race of the unit, et cetera, and your unit is ready.
- Remove everything under "Abilities - Hero"
- Remove "Inventory (Hero)" from "Abilities - Normal" if you don't want your unit to have inventory
- Add any ability that you want your unit to possess under "Abilities - Normal"
- Change the "Art - Model File" to any unit model you want your unit to look like
- Change the "Art - Icon - Game Interface" to the icon of your model and remove the "Art - Icon - Score Screen"
- Change the "Combat - Attack 1 - Attack Type" and "Combat - Defense Type" from hero to something else you want
- Change "Stats - Hero - Hide Hero Death Message", "Stats - Hero - Hide Hero Interface Icon", "Stats - Hero - Hide Hero Minimap Display" all to True
- Change "Text - Name" and "Text - Proper Names" both to the name of your unit and remove the extra names, and set "Text - Proper Names Used" to 1
- Remove "Text - Tooltip - Awaken" and "Text - Tooltip - Revive", unless you want your unit to revive
- Change the "Text - Tooltip - Basic", so it doesn't say "Summon (Hero)", but "Train (Unit)" or something else, and "Text - Tooltip - Extended" to whatever you want
- Set "Techtree - Hero Revival Locations" to some random building that isn't used in-game if you don't want your unit to revive
If you leave this field empty, the hero will be able to revive at any building which has "Techtree - Revives Dead Heros" set to True in its Object Editor properties. If you set it to (a) certain building(s), the hero will be able to revive at it if it has "Techtree - Revives Dead Heros" set to True.
- If your unit is based on a melee hero then you'll need to remove all of its "Techtree - Requirements..." and set "Techtree - Requirements - Tiers Used" to 0
- Change anything else you want, like attack, defense, mana, health, stats, stats per level, build time, build cost, defense and attack upgrade bonuses, upgrades used, the race of the unit, et cetera, and your unit is ready.
Third step: Additional tweaks (optional)
Now that you have your unit set up, you can also change some additional things which affect it.
Note: Changing these things will affect all hero-based units and heroes.
Navigate to the "Advanced" drop-down menu in the menu bar of your World Editor, click it, and then click "Gameplay Constants..." Here, you can do various things:
- If you want your custom units to level up to a certain level that is different from the default max level (level 10), change "Hero Maximum Level" to the value you want, but don't overdo it, as values over 500 or 1000 can cause problems
- If you want to change the amount of experience needed for each level, change "Hero XP Required - Table" (base experience needed to reach level 2) and "Hero XP Required - Level Factor" (additional experience added to the base experience with each level)
- If you want your elite units to gain experience from destroying buildings, in addition to killing units, change "Hero XP - Building Kills Grant XP" to True
- And there are many more things you can set here...
Navigate to the "Advanced" drop-down menu in the menu bar of your World Editor, click it, and then click "Game Interface..." Here, you can change the interface messages regarding your custom elite units and various other interface aspects:
- If you want to change the interface message for targetting elite units and heroes with an ability that can't target them, change "Text - Message - 'Unable to Target Heroes'"
- Et cetera...
And, finally, in the Object Editor, you can change all spells that have "Stats - Duration - Hero" different from the unit duration so that they are the same, and check if spells can target heroes (which also goes for the elite units) in "Stats - Targets Allowed"; and that's it!
Note: Changing these things will affect all hero-based units and heroes.
Navigate to the "Advanced" drop-down menu in the menu bar of your World Editor, click it, and then click "Gameplay Constants..." Here, you can do various things:
- If you want your custom units to level up to a certain level that is different from the default max level (level 10), change "Hero Maximum Level" to the value you want, but don't overdo it, as values over 500 or 1000 can cause problems
- If you want to change the amount of experience needed for each level, change "Hero XP Required - Table" (base experience needed to reach level 2) and "Hero XP Required - Level Factor" (additional experience added to the base experience with each level)
- If you want your elite units to gain experience from destroying buildings, in addition to killing units, change "Hero XP - Building Kills Grant XP" to True
- And there are many more things you can set here...
Navigate to the "Advanced" drop-down menu in the menu bar of your World Editor, click it, and then click "Game Interface..." Here, you can change the interface messages regarding your custom elite units and various other interface aspects:
- If you want to change the interface message for targetting elite units and heroes with an ability that can't target them, change "Text - Message - 'Unable to Target Heroes'"
- Et cetera...
And, finally, in the Object Editor, you can change all spells that have "Stats - Duration - Hero" different from the unit duration so that they are the same, and check if spells can target heroes (which also goes for the elite units) in "Stats - Targets Allowed"; and that's it!
The end result should look something like this:
Enjoy!
Last edited: