I want to make trees harvestable like in WarCraft III, also I do not want to use minerals as the outcome of the harvesting. I have already placed MANY trees in my map and I do not want to simply change the model of minerals to trees.
My guess is the bounty system would be the most straight forward approach. Such as make a Unit, use the tree model for it, make sure it doesn't flee on attack, and set the "Combat - Kill Resources" to whatever you want to reward the player for killing it.
Probably easiest to just copy a building and change the model to a tree. That's done by changing the Actor associated to the unit.
(edits: you might want to look at the unit "Korhal Tree - Destructible" it is already all modeled up with a death actor animation. If you plan on having harvesting work as attacking the tree, then all you have to do is add bounty. However, if you want it to literally be a harvest point like minerals and v.gas then some more work in involved)
Obviously this is just a quick layout of what to do. There's probably little tweaks here and there you want to think about.
also I do not want to use minerals as the outcome of the harvesting. I have already placed MANY trees in my map and I do not want to simply change the model of minerals to trees.
Funny you should say that.... Get to work!
But seriously, those trees are just models, not living, breathing resources. You can't do anything with them and there's no macro you can use to replace them all: no 'pick every model/doodad' trigger exists unfortunantely (for you). ㅈㅈ mate.
Place MINERALS and then change the model to the tree....
edit- Actually, you could change the model of minerals, then put in a trigger that picks each tree and replaces it with minerals (that you changed to look like trees)
Place MINERALS and then change the model to the tree....
edit- Actually, you could change the model of minerals, then put in a trigger that picks each tree and replaces it with minerals (that you changed to look like trees)
That would be a very lazy solution.
Just do the work, dude. Crystals with tree models is the best (and as far as I know, the only) way to do this. Sorry for the inconvenience, but that happens.
This actually shouldn't be too hard. Unfortunately you can't just use the doodad trees you've already placed; you need to use a unit so that other units can interact with them (i.e. harvest them). Doodads are just an Actor without an associated Unit, and it's a Unit that you can make into a harvestable resource. Fortunately, there is already just such a unit in existince! It's just not in the standard melee game; it's in the single-player campaign.
If you're already using the Campaign dependency in your map you can skip this step. If not, load up your map (if you've already got it open, just save) and go to File -> Depedencies. Click the "Add Standard" button and select the "Liberty (Campaign)" Dependency, which includes all of the units, structures, abilities, etc. that were used in the single-player campaign. When you've added that Dependency to your map you can use and modify all those things to your heart's content.
Once you've got the Campaign dependency, fire up the Data Module, go to the unit tab and just type in "Tree". Only two things should show up, the first of which will be Korhal Tree - Destructible. This is a unit that uses the normal Korhal tree model and can be interacted with in the game; in the campaign, it was used during the mission where the Odin was running amok on Korhal. This is what you can modify to turn into a harvestable resource.
Making a harvestable resource depends on two things (three, if you're going for complete conversion). Firstly, the resource unit needs a resource [b]Behavior[/b]. In the Data module go to the Behaviors tab and search for Mineral or Vespene, and a few Behaviors will come up. For the sake of demonstration, let's look at the "Minerals (Mineral Field)" Behavior, which is the one that your bog-standard Mineral Field uses.
The main things that the resource Behavior does are to determine how many resources you can get out of the unit, and how quickly. When you first open up the Behavior, you should see the following fields (among others) highlighted in blue instead of the default grey:
In order, the Amount entry tells you how many resources a unit with this Behavior contains, while Capacity tells you how many it can contain at most. The first one should naturally be equal to or lower than the second. The Hidden flag simply means that this Behavior will not add a visible icon to the Mineral Field unit when a player selects it. Harvest Amount: 5 means that a unit harvesting minerals can carry 5 minerals back to the drop-off per trip, while the Harvest Time sets how long the harvesting unit sits there mining. The "Remove When Empty" resource flag makes the game remove the Mineral Field when its resources hit zero. Vespene Geysers don't have this flag, which is why you can see them sitting around empty after they've been drained. There's a second Resource Flag you can select, "Hide Harvesters". This is used on Vespene Geysers to make it look like the harvesting units have gone inside the Refinery/Extractor to gather the gas.
Depending on your aim for the trees you want harvestable, you can either use one of the default Resource behaviors, or you can make your own. I would suggest simply Duplicating one, re-naming it whatever you like, and adjusting its values to fit.
Now that you have your Behavior, go back to the Unit tab and find that tree again. Go to the Behavior - Behaviors + field and add your resource behavior. Now this tree contains resources! But you're not done yet. Your worker units don't know which type of resource the tree contains, nor do they know if they can harvest it right away or after they've built a Refinery.
Just below where you added the Resource behavior are two more fields: Resource State and Resource Type. The first one can be set to either Raw or Harvestable. Harvestable means it behaves like Minerals; a worker unit can just walk up to it and start harvesting. Raw means some kind of structure, like a Refinery, must be built on top of it. For trees, you'll almost certainly want to use Harvestable. Resource Type is where you determine which of the four resources (Minerals, Vespene, Terrazine, Custom) the unit contains, and which your workers can get out of it. Select one of the four.
The tree is now a harvestable resource that you can place on the map and have worker units gather from, provided their Gather abilities allow them to harvest the right type of resource and they have somewhere they can drop it off.
So if I place 10000 LOS Blocker Weeds or something on a melee map, it
won't affect gameplay?
Congrats, you found the 1 exception. Also, you can't walk through trees so they can be used like path blockers, which gave me the idea of making hellions burn them down to create paths in a senerio.
Are we always stuck with the minerals/vespene/terrazine/custom without unheard of modification? Can these be renamed or at least re-skinned (icons, etc)?
They can be re-skinned for sure, everything can. As for names, i'm sure there is some advanced map option that allows you to change the names as well, there was in the WCIII editor.
I want to make trees harvestable like in WarCraft III, also I do not want to use minerals as the outcome of the harvesting. I have already placed MANY trees in my map and I do not want to simply change the model of minerals to trees.
Many thanks to people who help :)
Anyone?
My guess is the bounty system would be the most straight forward approach. Such as make a Unit, use the tree model for it, make sure it doesn't flee on attack, and set the "Combat - Kill Resources" to whatever you want to reward the player for killing it.
Probably easiest to just copy a building and change the model to a tree. That's done by changing the Actor associated to the unit.
(edits: you might want to look at the unit "Korhal Tree - Destructible" it is already all modeled up with a death actor animation. If you plan on having harvesting work as attacking the tree, then all you have to do is add bounty. However, if you want it to literally be a harvest point like minerals and v.gas then some more work in involved)
Obviously this is just a quick layout of what to do. There's probably little tweaks here and there you want to think about.
Funny you should say that.... Get to work!
But seriously, those trees are just models, not living, breathing resources. You can't do anything with them and there's no macro you can use to replace them all: no 'pick every model/doodad' trigger exists unfortunantely (for you). ㅈㅈ mate.
Place MINERALS and then change the model to the tree....
edit- Actually, you could change the model of minerals, then put in a trigger that picks each tree and replaces it with minerals (that you changed to look like trees)
That would be a very lazy solution.
Just do the work, dude. Crystals with tree models is the best (and as far as I know, the only) way to do this. Sorry for the inconvenience, but that happens.
This actually shouldn't be too hard. Unfortunately you can't just use the doodad trees you've already placed; you need to use a unit so that other units can interact with them (i.e. harvest them). Doodads are just an Actor without an associated Unit, and it's a Unit that you can make into a harvestable resource. Fortunately, there is already just such a unit in existince! It's just not in the standard melee game; it's in the single-player campaign.
If you're already using the Campaign dependency in your map you can skip this step. If not, load up your map (if you've already got it open, just save) and go to File -> Depedencies. Click the "Add Standard" button and select the "Liberty (Campaign)" Dependency, which includes all of the units, structures, abilities, etc. that were used in the single-player campaign. When you've added that Dependency to your map you can use and modify all those things to your heart's content.
Once you've got the Campaign dependency, fire up the Data Module, go to the unit tab and just type in "Tree". Only two things should show up, the first of which will be Korhal Tree - Destructible. This is a unit that uses the normal Korhal tree model and can be interacted with in the game; in the campaign, it was used during the mission where the Odin was running amok on Korhal. This is what you can modify to turn into a harvestable resource.
Making a harvestable resource depends on two things (three, if you're going for complete conversion). Firstly, the resource unit needs a resource [b]Behavior[/b]. In the Data module go to the Behaviors tab and search for Mineral or Vespene, and a few Behaviors will come up. For the sake of demonstration, let's look at the "Minerals (Mineral Field)" Behavior, which is the one that your bog-standard Mineral Field uses.
The main things that the resource Behavior does are to determine how many resources you can get out of the unit, and how quickly. When you first open up the Behavior, you should see the following fields (among others) highlighted in blue instead of the default grey:
Stats - Amount: 1500 Stats - Capacity: 1500 Stats - Flags: Hidden Stats - Harvest Amount: 5 Stats - Harvest Time: 2.7860 Stats - Resource Flags: Remove When Empty
In order, the Amount entry tells you how many resources a unit with this Behavior contains, while Capacity tells you how many it can contain at most. The first one should naturally be equal to or lower than the second. The Hidden flag simply means that this Behavior will not add a visible icon to the Mineral Field unit when a player selects it. Harvest Amount: 5 means that a unit harvesting minerals can carry 5 minerals back to the drop-off per trip, while the Harvest Time sets how long the harvesting unit sits there mining. The "Remove When Empty" resource flag makes the game remove the Mineral Field when its resources hit zero. Vespene Geysers don't have this flag, which is why you can see them sitting around empty after they've been drained. There's a second Resource Flag you can select, "Hide Harvesters". This is used on Vespene Geysers to make it look like the harvesting units have gone inside the Refinery/Extractor to gather the gas.
Depending on your aim for the trees you want harvestable, you can either use one of the default Resource behaviors, or you can make your own. I would suggest simply Duplicating one, re-naming it whatever you like, and adjusting its values to fit.
Now that you have your Behavior, go back to the Unit tab and find that tree again. Go to the Behavior - Behaviors + field and add your resource behavior. Now this tree contains resources! But you're not done yet. Your worker units don't know which type of resource the tree contains, nor do they know if they can harvest it right away or after they've built a Refinery.
Just below where you added the Resource behavior are two more fields: Resource State and Resource Type. The first one can be set to either Raw or Harvestable. Harvestable means it behaves like Minerals; a worker unit can just walk up to it and start harvesting. Raw means some kind of structure, like a Refinery, must be built on top of it. For trees, you'll almost certainly want to use Harvestable. Resource Type is where you determine which of the four resources (Minerals, Vespene, Terrazine, Custom) the unit contains, and which your workers can get out of it. Select one of the four.
The tree is now a harvestable resource that you can place on the map and have worker units gather from, provided their Gather abilities allow them to harvest the right type of resource and they have somewhere they can drop it off.
Yeah doodads are actors and have no effect on the game whatsoever...
I want to make trees attackable... is this the same thing?
@Reaper872: Go make a new unit that uses the tree model.
@zeldarules28: Go
So if I place 10000 LOS Blocker Weeds or something on a melee map, it won't affect gameplay?
Congrats, you found the 1 exception. Also, you can't walk through trees so they can be used like path blockers, which gave me the idea of making hellions burn them down to create paths in a senerio.
@Reaper872: Go
Doodads can have many effects on gameplay. Think, outside the box~
Are we always stuck with the minerals/vespene/terrazine/custom without unheard of modification? Can these be renamed or at least re-skinned (icons, etc)?
@Azisien: Go
They can be re-skinned for sure, everything can. As for names, i'm sure there is some advanced map option that allows you to change the names as well, there was in the WCIII editor.
@Azisien: Go
Go to the text editor. Everything that has a name can be modified in there.