• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Auto Harvesting Building

Status
Not open for further replies.
Level 5
Joined
Oct 3, 2009
Messages
93
So, I'm not what you would call a "pro" with data and triggers, but I can find my way around things. I'll try to make this as specific as possible and if any further information is needed I'll gladly provide it.

The general idea of the map is you start out and pick a castle and capture it.
Once captured, the Keep can build everything protoss style at range since everything builds instantly.
I modded a unit into a functional mineral field then changed it into a tree and redid the UI for more "lumbery" things instead of minerals.
The player builds a stockpile that all of the resources are returned to and then has to build a "tree chopper" (in a sense) building/unit to gather the "lumber" and return it to the stockpile, and so on. The "trees" generally don't run out of resources unless it were a very long game.

In simple terms what I need is a building that has an uncontrollable "scv" that comes with the building and then goes to the forests to collect lumber and then takes it to the stockpile (may only have 1 stockpile so no worries with multiple.)
I also need the same thing with Vespene Gas "metal" and it will be mined in the same fashion as the Lumber.

As I said earlier, if any further information is needed I'd be happy to give it.
Thanks in advance for your help.

P.S. Random Question, I have all of the dependencies on and I see like 2-4 copies of all the units with only one being editable, and ideas why?
 
Last edited:
Level 27
Joined
Jul 6, 2008
Messages
11,325
Hmmm I guess I can make it...

I pretty much can suggest you how to make a Data-based auto-income without the SCV - this can be done by making an auto-castable ability whihccosts a negatie amount of specific resources. If you played nation Builder ALPHA on EU I made, you can see that.

If you want I can also suggest you how you can make this, altrough I'm not exactly sure how to make the worker start harvesting resources automatically... but this will be pretty much complicated, if you have some more understanding how to make requirements/auto-cast abilities/aura behaviors.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Using triggers it is probably quite easy as you just make some workers and order them to gather. As they are unselectable and have no collision everything should work fine.

It is probably possible with the data editor using an autocast magazine like ability to fire workers at mines which will continiusly gather (but never done this so not sure).
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
If you want a worker to get auto-spawned when the structure is built, you can... hey are you playing on EU? If yes, you can download my map - Nation Builder ALPHA, in it Nation Leader gets auto-spawned with a bunch of workers when the Government Palace is built.

If you're not from EU, I can attach the map to my post.
 
Uhm, basically to summarize and lengthen what everyone has been saying;

Make the 'SCV' unselectable and untargetable, or just unselectable if you want the option for it to be killed.

Event -> (castle) changes ownership
Conditions -> new owner = player 1
Actions -> Create 1 (SCV) for (player 1) at <insert place here>
Issue Order to (last created unit) to (gather), targeting (tree)

Alternatively have no condition and have the trigger say 'Create 1 (SCV) for (triggering player) at <insert place here>'

Make sure your castle has return cargo capabilities.
And if you want the owner of the 'SCV' to be able to click the unit, just delete it's command card and remove its ability to 'Move' or 'Stop'.

Also I wasn't sure if you were asking a question as to how to get the castle to work like a protoss pylon or not, but if you need to know, here it is;

Protoss Pylons have a behaviour to provide power to protoss buildings. I can't remember the exact name, just look at a default pylon's behaviours.
Add that behaviour to your castle.
Every Protoss building by default has a behaviour that 'uses power' or something along those lines. Again just look at a protoss building for reference.
Give any building you want to be required to be built around the castle that behaviour.
Be aware that if the castle is destroyed or removed somehow, the buildings will be made useless and powerless just as the normal game would do.

If you need to extend the range the power supply has on buildings, you'll have to edit the behaviour. I honestly have no idea how you would do that.
 
Status
Not open for further replies.
Top