I would like to make a mod where workers DO collide with each other and other units while mining, instead of being able to "mineral walk" like they can in the base game. I've looked through the SCV's unit properties, its mover, its gather ability, the minerals' resource behavior, and the subsequent mineral carry behavior, and I can't find anything that does this. Did I just miss it?
Ah. I think I like your way better regardless; I tried it with abilities and couldn't get the Issue Order to work right (at least, I think that was the error), plus I'd need to basically have a "master" ability switch between each resource. I think/hope your behavior-based method will be simpler.
The terrazine refinery, you mean? It was a really neat concept :). For my map I only need the basic gather ability, but the idea of processing two resources into a third one is very cool, and explained my initial confusion as to why you had the harvesters drop buffs on the Depot instead of just giving the resources directly. I can see it being great for more in-depth Civilization-type maps
The auto-work feature was interesting, but for me frustrating because my units started going off based on logic I didn't understand yet.
Second question: Do you know of a way to make the workers not count as idle while gathering? I'm running into that as I build my system. I was hoping that in the "hasmine" behavior I could just add something so it wouldn't be classed as a worker (and so wouldn't count towards the idle workers button) while it had a mine, but no luck.
Okay, hopefully the last question. I've iterated several times from your method to get one that works for my needs. Right now everything works as intended, at least as far as I've been able to test so far, except for two bugs:
I'm using a "being gathered" behavior based on your "hasmine" behavior to track who's mining which resource (instead of using a persistent taskmaster effect for that). When the resource dies due to running out of resources or being killed, the "being gathered" behavior has a death effect that (1) searches the nearby area for a new resource, (2) transfers the behavior to that resource, then (3) orders the worker who "owns" the old resource to gather the new resource instead. However, the search actually seems to be centered on the worker, not the resource, so if he's off returning resources when the resource dies, he'll start gathering whatever's closest to him instead of staying near where the player told him to gather.
Do you know how to make the search effect center on the dying resource like it's supposed to? I've tried a bunch of values for both the Target: Impact Location and the Target: Launch Location with no apparent effect.
The second bug is minor: I want to be able to carry 20 resources when I have a "wheelbarrow" upgrade, but only 10 without it. However, the "Player Requirement" validator I'm using doesn't seem to work, so my units can always carry 20. It isn't a huge deal if I can't get this one sorted; I'll just remove the upgrade.
In any case, thank you so much for all your help with this! You are absolutely getting an honorable mention on this map; there's no way I could have figured this system out on my own.
The problem with behaviours is that when they are stacked they get confused as to which unit is the caster for the effect tree. At least they used to when I made the map. Not sure if it has been patched. I use a create persistent effect to overcome that limitation.
You could get the effect tree on mine death to apply a buff to the worker that is removed when he is done depositing resources that orders him to the new mine.
To get the search around the dying mine is probably best done using the SourcePoint reference and set the effect field above the value field to some effect previously in the effect tree that targeted the mine in the first place. You put this under the Launch field for the search while the Impact field must be set to Target.
I can only suggest testing your validators in simple systems first and check you have the right logic on your Combine type validators. I would have an Or logic combine validator with two And logic combine validators with one checking for 10 and no upgrade while the other checks for 20 and the upgrade.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I think they must have patched that issue with behaviors; I ran a couple more tests to see if stacking the behaviors/having multiple units gathering broke anything, and it all seemed to work fine. I set the search launch to source like you said, and attached an actor to it to see if it behaved, and sure enough it did. It turned out I'd made a dumb mistake with the target sort that was also making things break. And yeah, testing the validators one by one in a simple ability revealed the issue (stupid requirement-type validators check the inverse case by default...).