• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] How to Harvest Stone like Lumber?

Status
Not open for further replies.
Level 11
Joined
Mar 31, 2016
Messages
657
Working on a map kind of like Age of Empires. I'm changing gold to stone. I want stone harvested from a stone destructible in the same way as lumber except with gold animation. I saw a similar post here Harvesting Gold in the same manner as Lumber however it was never resolved.

Is there a way to make a custom ability for this or does it work best with triggers?


I'm also aware of these two other custom resource systems Resource System v1.3 & [GUI] Custom Resource Harvest System 1.05 . They work well except its too complicated for a novice like me to customize. Could someone explain how to customize them for my map or explain how to make a new system from scratch?

If someone can explain how to customize them 100%, I'll go the extra mile and make additional custom resources. Stone and Lumber will be primary resources and take the standard UI, then I'll add CLAY, ORE, GOLD, FOOD and WATER, maybe more-- to be secondary resources and be displayed in a custom box next to the resources. I'll also need a resource trading mechanic similar to the Age of Empires Market.

If I'm asking for too much, it's cool- I'll settle for a basic gold to stone swap with the harvest-able stone doodads.
 
If you know some basic triggering, you could do the following:
Make the destructible Stone attackable (like crates), but then make any unit that is not a Worker stop when attacking them (via triggers)
Use the custom value of the Worker unit to store the amount of stone it has harvested from the stone (like peasants can hold up to 10 lumber)
When the unit attacks the stone, increase the custom value of that unit by 1.
When it reaches 10, use a trigger method to find the nearest building that can return resources (it doesn't really need to actually return resources, just to be there) and to move to it.
Set custom value of the unit to 0 and find the nearest doodad Stone around him, and make him attack it until it's custom value reaches 10 again.

Hope that helps, it's not really basic but I think it should work if you work around with the triggers
 
Level 10
Joined
Sep 25, 2013
Messages
521
I actually just made basically the same system, if u want, i can make a basic example for you.

My system is a little different though. What i did was make a custom unit structure called stone. I put a bunch of neutral passive ones around the map. I then made a trigger so that when workers target the stone unit they are ordered to attack it. I also made a trigger that every time they hit the stone unit, you gain +1 stone. The stone unit host fortified armor and workers only do 1 damage to it, so if it has 1000 hit points you'll get 1000 stone.

The only issue with this is that there's no drop off points. I'll post my map which has an age of empires like resource system so you can see
 

Attachments

  • LOTR Empires (New 6).w3x
    7.3 MB · Views: 70
Level 11
Joined
Mar 31, 2016
Messages
657
Wow, thanks a bunch! Your map looks pretty good. Could use some tweaking but its definitely getting there.

Only thing is I want the worker to carry the bag and also return the resources. Maybe I can figure out how to add that in...

Hopefully I can reconstruct this for my maps. I'll post again soon with progress.
 
Level 10
Joined
Sep 25, 2013
Messages
521
Well, I was reading Daveraves comment above and I could combine his ideas with my system. Using the units custom value is a really good idea, never thought of it. I can make you the trigger to detect the nearest drop off point for resources. If you post your map, i'll add the system in for you.
 
Level 11
Joined
Mar 31, 2016
Messages
657
Thanks for the offer but I actually got someone to do just that for my map. If it doesn't work though I'll PM you the paste bin link.

Will it play the return gold animation? Holding the bag and pick axe?

Also is there a way to switch the peasant's weapon to an axe when harvesting wood?
 
Level 10
Joined
Sep 25, 2013
Messages
521
I could make it so he has the bag holding animation. Also, if u want them to have a different tool for the job your going to need to download a peasant model which is empty handed. Then you'll need to download an axe and a pickaxe model. It would probably be complex, but i guess possible.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Dont you think it would be beneficial to learn how to use the existing systems in order to learn more about how to code stuff? I think, you could avoid a lot of trouble and eventually learn new things, if you tried to use the systems ... (?)
 
Level 11
Joined
Mar 31, 2016
Messages
657
@Maxley Awesome, again appreciate the offer, however there's already someone working on it. Its supposed to be done tomorrow - depending on how well it works I may need to take you up on your offer. Good idea, I guess it would be complex. There's another way to do it since the axe is on the peasant model because of militia overlap. Just gotta have a custom Peasant model and swap out his weapon for the lumber animation somehow... Dam I know modeling/skinning but idk how to animate. Still I'll try and tinker around or look for a tutorial.


@Emm-A- Yeah you have a point. I would, except I don't have that much free time and I'm quite a novice at triggers... idk coding though. Maybe if I was in a similar industry I would have more of a passion to learning coding.
Still, maybe with more time I'll pick it up. If it counts for anything though, I know modeling/skinning pretty well and I'm decent at terrains because that's what I've been mostly doing for my map up to this point.
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
you know you could just place trees with a stone path blocker modle, and then increase the life points of the new stone tree model

wah peasants harvesting stone instead of wood
 
Level 11
Joined
Mar 31, 2016
Messages
657
@Maxley Alright I'll post a simple map with the trigger implemented.

Well, I tried making a simpler map with the trigger, but when I copy and paste the trigger it loses its targets and thus no longer works properly.
So I'll just PM you a pastebin link of my map so you can learn from it. Hopefully you can figure out how to fix after the copy and paste it.
I tried, but my triggering skillset is lacking. Credit for the trigger goes to @Bitchmoon .


@TheLordOfChaos201 I asked for harvesting stone like lumber, not as lumber. lol No matter, its solved now.




 
Status
Not open for further replies.
Top