Mining

Solidjackal

New Member
Reaction score
0
I was wondering if it is possible to have the trees in the game to "drop" more than one item, I want it to drop wood and maybe a custom item I will make.
Also what triggers will I need to make in order to get the worker unit mine trees automatically. I searched google but I cannot seem to find an answer to this question, is there a similar item to the mining crystals in SC that I can find here?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
By drop do you mean when peasants gather from the tree, or when the tree dies and an item appears in its position? The former isn't possible, but the latter certainly is.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Heh make a trigger like this
Trigger:
  • PickAllDestructiblesForEvents
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Create Lumber from Trees <gen> the event (Destructible - (Picked destructible) dies)
          • Trigger - Add to Create Stone from Rock <gen> the event (Destructible - (Picked destructible) dies)
          • Trigger - Add to Create Special Lumber From Special Trees <gen> the event (Destructible - (Picked destructible) dies)

Trigger:
  • Create Lumber from Trees
    • Events
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    • Actions
      • Set TreePoint = (Position of (Dying destructible))
      • Item - Create Bundle of Lumber at TreePoint
      • Item - Create Bundle of Lumber at TreePoint
      • Custom script: call RemoveLocation(udg_TreePoint)

TreePoint is a point variable

EDIT EDIT EDIT EDIT EDIT EDIT EDIT EDIT
Didn't know what you meant, if you want that, i'll keep it up. (it should be self explanatory) the first trigger adds the event
The second trigger gets the event and it checks the conditions if a dying destructible is a summer tree wall then it creates 2 items. Although, keep in mind, I didn't know what you mean.
 

Solidjackal

New Member
Reaction score
0
That is just what I need, thank you so much. Also I am guessing there is no mining crystals from SC in the editor is there?
 

RedOrb

You can change this now in User CP.
Reaction score
14
Hi Jackal,

While Kaerf is correct, there are some things you can do to at least give the illusion of gathering wood, and get the effect you want.

Try this:
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Destructible-type of (Target destructible of issued order)) Equal to Summer Tree Wall
        (Unit-type of (Ordered unit)) Equal to Peasant
    Actions
        Set harvestedtree[(Custom value of (Ordered unit))] = (Target destructible of issued order)
        Wait (Random real number between 2.00 and 4.00) seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Current order of (Ordered unit)) Equal to (Order(harvest))
                        (Current order of (Ordered unit)) Equal to (Order(smart))
            Then - Actions
                Item - Create Tome of Experience at (Position of harvestedtree[(Custom value of (Ordered unit))])
                Game - Display to (All players) the text: Someone's being a l...
            Else - Actions

This will, at the very least, fire the trigger when you order the peasants to harvest lumber, and after a short random wait, the trigger checks to see if the current order of the peasant is STILL harvest. If so, it'll create an item at the position of the destructible. I used the custom value which means you will have to SET this custom value at some point. Assuming you are building your peasants from a town hall or something you can use a trigger that works like this:

Code:
Untitled Trigger 003
    Events
        Unit - A unit Finishes training a unit
    Conditions
        (Unit-type of (Trained unit)) Equal to Peasant
    Actions
        Set peasantcustoms = (peasantcustoms + 1)
        Unit - Set the custom value of (Trained unit) to peasantcustoms

This will give each peasant a unique ID, and thus each destructible a unique slot in the destructible array (you'd probably have to make the array bigger..).

Finally, to get peasants to harvest lumber automatically, you can go with a simple order:

Code:
Untitled Trigger 002
    Events
        Map initialization
    Conditions
    Actions
        Unit - Order Peasant 0012 <gen> to Harvest Summer Tree Wall 0009 <gen>
        Unit - Order Peasant 0013 <gen> to Harvest Summer Tree Wall 0008 <gen>

Switch the event to whatever you like, and make sure to use unit groups to select all your peasants if you wanted that.
 

Solidjackal

New Member
Reaction score
0
how do I get the if statements? and I do not understand how to add "Set harvestedtree[(Custom value of (Ordered unit))] = (Target destructible of issued order)" is it a custom script?
 

jnZ

I
Reaction score
64
what do you mean "how do i get the if statement"? how to implement conditions?
and the "Set harvestedtree[(Custom value of (Ordered unit))] = (Target destructible of issued order)" ist just a variable being set.
its an destructible array by the name of harvestedtree
 

jnZ

I
Reaction score
64
in the contextmenu for adding actions there should be something like "If / Then / Else / Multiple Actions"
you should find it without problems
 

Solidjackal

New Member
Reaction score
0
thank you for that
What does this line of code mean?
" (Current order of (Ordered unit)) Equal to (Order(harvest))
(Current order of (Ordered unit)) Equal to (Order(smart))"

it is the same as (Order((Unit-type of (Ordered unit))) Equal to (Order(harvest))?
what does smart do and mean?
 

jnZ

I
Reaction score
64
well in redorbs trigger are
Set harvestedtree[(Custom value of (Ordered unit))] = (Target destructible of issued order)
and
Item - Create Tome of Experience at (Position of harvestedtree[(Custom value of (Ordered unit))])

first you create the variable of type destructible and check array.

the first action should be "Set Variable" in the actions context menu. Select harvestedtree as the variable. Click inside the [] and select Custom Value of Unit and select Ordered unit.
as a value for the variable select Target destructible of issued order

the second action should be "Create Item" in the actions context menu. Select your item and as location select destructible position. as the destructible select the variable harvestedtree , click in the [] and select Custom Value of Unit and select Ordered unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top