- Joined
- Nov 7, 2014
- Messages
- 242
In short, the system works as following:
-Resource Nodes are units which can be attacked by Workers;
-Whenever a Worker damages a Resource Node, a corresponding item is added to their inventory;
-Once the Worker unit harvests enough, it returns the items to its designated drop-off point;
-Items can also be dropped on death and picked up by heroes or certain non-worker units (human bandits, orc raiders, etc)



I realized that I might have an issue when I started implementing the trees as a custom resource:
-There are literally thousands (3685) of trees on the map. Replacing every single one of them with a unit is likely going to have a negative impact on the game's performance.
-The process of replacing every tree with a unit would also be tedious as hell.
-Every tree would have a health bar above it, so the forests would look like a total mess.
I've been pondering about it for quite a while, and I have a few ideas on how to solve it, but they all come with their own pitfalls:
-I could keep them as destructibles, but I do not know how to detect when a destructible takes damage. That would be the ideal solution.
-Alternatively, I could also place capturable Lumber Mills around the map, which would generate wood over time. However, that would cause me to sacrifice the vanilla-like look of lumber harvesting. (I want workers to actually cut wood and bring it back to the stockpiles, just like in vanilla, and have it deplete over time)
-Finally, I could just keep it entirely vanilla, but it would not be wholly compatible with the custom system and its mechanics.
So what should I do? What is the best way to implement it? I would appreciate any suggestions.
-Resource Nodes are units which can be attacked by Workers;
-Whenever a Worker damages a Resource Node, a corresponding item is added to their inventory;
-Once the Worker unit harvests enough, it returns the items to its designated drop-off point;
-Items can also be dropped on death and picked up by heroes or certain non-worker units (human bandits, orc raiders, etc)



I realized that I might have an issue when I started implementing the trees as a custom resource:
-There are literally thousands (3685) of trees on the map. Replacing every single one of them with a unit is likely going to have a negative impact on the game's performance.
-The process of replacing every tree with a unit would also be tedious as hell.
-Every tree would have a health bar above it, so the forests would look like a total mess.
I've been pondering about it for quite a while, and I have a few ideas on how to solve it, but they all come with their own pitfalls:
-I could keep them as destructibles, but I do not know how to detect when a destructible takes damage. That would be the ideal solution.
-Alternatively, I could also place capturable Lumber Mills around the map, which would generate wood over time. However, that would cause me to sacrifice the vanilla-like look of lumber harvesting. (I want workers to actually cut wood and bring it back to the stockpiles, just like in vanilla, and have it deplete over time)
-Finally, I could just keep it entirely vanilla, but it would not be wholly compatible with the custom system and its mechanics.
So what should I do? What is the best way to implement it? I would appreciate any suggestions.