For the updated script codebase, head over https://github.com/MNoya/BuildingHelper
After various iterations, the dream of client-side particles is real, and Building Helper has now been fully updated for Panorama, allowing for building ghost and grid effects as well as providing all the core features you'd expect for building and builder management.
- Building placement with a building grid preview on the world
- Queueing multiple buildings for individual workers
- Basic support for an additional resource (Lumber)
- Building cancel process, continuing the queue
- Various construction behaviours: Self-Building, Builder-Inside, Repair-Required, Consumes-Builder.
- Repairing buildings, with multiple builders being able to assist the process
- Support for left-/right-click mouse callbacks and orders
In addition to the construction-related features, you'll find a couple of systems to do very common things in RTS & TD games, which is unlocking different upgrades/researches and automatically enable them when the requirements are met.
Whenever a building starts channeling an ability with certain research time, a queue will be created using the item slots of the building, without any extra UI, and just requires that every ability also gets an item copy to be able to cancel at will any point of the queue.
Note: The following 2 systems were excluded from the basic library:
- Unit production
- Gather Gold/Lumber
If you are interested in said features, you can take a look at the DotaCraft repository
There are two ways to use this library. After downloading, you can either get the samplerts
addon to see the features ingame, or if you have a pre-existing addon which you'd like to utilize Building Helper. I'll explain the necessary files and configuration for it.
- Copy the entire
content
andgame
folders in your dota folder\Steam\SteamApps\common\dota 2 beta\
. - Start the workshop tools, you'll see
samplerts
in your list of addons. - Launch the
samplerts
map, either through Hammer or copying and pastingdota_launch_custom_game samplerts samplerts
into your console.
There are multiple elements you'll need to incorporate for a successful implementation of this library:
- Panorama Content.
- Merge the Panorama folder
content\dota_addons\samplerts\panorama
with the Panorama folder in your addon. - If you already have a
<custom_ui_manifest.xml>
, you'll have to add these lines to it:
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/scripts.xml" />
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/resource.xml" />
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/notifications.xml" />
- Lua Scripts
- Go inside the
\game\dota_addons\samplerts\scripts\vscripts
folder and copy all the files excluding:addon_game_mode.lua
(Require all files and precache lines)gamemode.lua
(This contains necessary events and table initializations)- Change all the ocurrences of
CustomGameMode
to your own addon game mode class (orders.lua and the listeners/handlers copied from gamemode.lua)
- DataDriven Ability Examples.
- BH abilities are already split to conveniently combine with Dota-2-ModKit. There are both essential abilities and ability examples in
game\dota_addons\samplerts\scripts\npc
. - Copy the sub folders
abilities
,items
. - The other two folders (
heroes
andunits
) aren't necessary but contain important keys which will be explained later
- Particles
- Copy the Building Helper compiled particles (
vpcf_c
) fromgame\dota_addons\samplerts\particles
into your addon's game particle folder. You can also get the sources in same directory under content.
- Tech Tree
- The requirements for the upgrade system are defined in the
tech_tree.kv
file inside thegame\dota_addons\samplerts\scripts\kv
folder. Copy it into your addon's scripts folder.
In buildinghelper.lua
, you will find these variables to control the properties of the ghost particles.
GRID_ALPHA
: Defines the transparency of the ghost squares in PanoramaMODEL_ALPHA
: Defines the transparency of both the ghost model in Panorama and Building Placed in LuaRECOLOR_GHOST_MODEL
: Whether to recolor the ghost model green/red or notRECOLOR_BUILDING_PLACED
: Whether to recolor the queue of buildings placed in Lua
We can be reached through various ways:
- At
irc.gamesurge.net
#dota2mods & #dota2modhelpdesk - At moddota.com, throught the dedicated Tools subforum
Contributing to this repo is absolutely welcomed. Building Helper's goal is to make Dota 2 a more compatible platform to create RTS-style and Tower Defense mods. It will take a community effort to achieve this goal.
If you implement any fix or feature you'd like to see it included in this library, make a pull request or make an issue with the necessary script changes.
- Myll, original dev
- BMD, helped figure out how to get mouse clicks in Flash. Made the particles in BH.
- Perry, contributed to the old scaleform version
- zed, contributed with old scaleform
- snipplets, first panorama implementation and queue system
- Noya, new release, updates and maintenance
If you're a new modder we highly recommend forking a new starter addon using D2ModKit program.
Building Helper is licensed under the GNU General Public license. If you use Building Helper in your mod, please state so in your credits.