I know how to do this with triggers, but i was wondering if it is possible within the data editor to make a building which automatically trains a new unit as soon as it produce the unit it is training (every building is capable of producing just 1 kind of unit, nexus war style)
if you are 100% sure its NOT possible i d like to know too, thanks :)
Instead of a buff use an autocasted ability of type Effect-Instant to cast the Issue Order effect, and add a Validator to only autocast when...
For only 1 unit type you can make a "Not Training X" Validator (type is "order queue" or something, base it of CasterNotHoldingPosition); for multiple units either make a list of these and use a Combine Validator, or find a better way of doing it.
if he only has 1 unit type coming from each structure, theres no need for those validators . Put the time duration in the periodic to be the same as the train duration of the unit
The Validators are required if you use an autocasted ability, which allows the owner to switch it off if need be, and it reacts to cancelled units/supplyblocks/lack of placement area etc.
The periodic behavior is simpler and works if you have a Nexus Wars type setup where you only produce 1 unit type and they immediately march off to their demise. As long as the units don't cost anything it's ok, but the autocast with validators is more efficient when things aren't working entirely like clockwork. Either you lose production time or you spend the resources too early if for some reason the periodic order and the completion of the previous unit desynchronise.
Fixed. The target filter of the Autotrain ability was set to "Enemy or Neutral", preventing the autocast. (now set to require Visible and Self, just for fun)
I also added the stock validator "Caster Has No Orders", which seems to work, and won't require a Combine list for multiple units (it won't work with buildings capable of doing anything else while training, passives/auras are ok though)
Did you know you can ctrl-click multiple objects in the data editor to compare their fields? That's what I did. I compared your ability to the Scivessel Nanorepair, and systematically looked at all fields that were different between the two, ignoring those with an obvious explanation (like the effect caused, full HP validators etc)
ok so resurrecting this very old post. I just wanted to create a mod extension that would allow for autocast training of scvs, probes, and then something with zerg drones. Anyway I used your autotrain as a reference point to create mine, starting with just SCVs. When I try to load up as terran it crashes each time though. Obviously something with the ability or effect isn't working, but i'm not sure what, any ideas?
Oh really? Nope didnt know, I am very new to the sc2 map editor. How do i go about making the train autocast? I didnt see the option in the default list of options like you would for an ability. I will do some more digging...
I know how to do this with triggers, but i was wondering if it is possible within the data editor to make a building which automatically trains a new unit as soon as it produce the unit it is training (every building is capable of producing just 1 kind of unit, nexus war style)
if you are 100% sure its NOT possible i d like to know too, thanks :)
anyone?
use issue order effect that is linked up to the Ability train .
Then put a buff on the unit and have this issue order go off periodically.
Instead of a buff use an autocasted ability of type Effect-Instant to cast the Issue Order effect, and add a Validator to only autocast when...
For only 1 unit type you can make a "Not Training X" Validator (type is "order queue" or something, base it of CasterNotHoldingPosition); for multiple units either make a list of these and use a Combine Validator, or find a better way of doing it.
if he only has 1 unit type coming from each structure, theres no need for those validators . Put the time duration in the periodic to be the same as the train duration of the unit
The Validators are required if you use an autocasted ability, which allows the owner to switch it off if need be, and it reacts to cancelled units/supplyblocks/lack of placement area etc.
The periodic behavior is simpler and works if you have a Nexus Wars type setup where you only produce 1 unit type and they immediately march off to their demise. As long as the units don't cost anything it's ok, but the autocast with validators is more efficient when things aren't working entirely like clockwork. Either you lose production time or you spend the resources too early if for some reason the periodic order and the completion of the previous unit desynchronise.
@Photoloss: Go
i did like you said, still having some problems i cant sort out
feel free to take a look yourself if you will, the ability is called "autotrain"
Fixed. The target filter of the Autotrain ability was set to "Enemy or Neutral", preventing the autocast. (now set to require Visible and Self, just for fun)
I also added the stock validator "Caster Has No Orders", which seems to work, and won't require a Combine list for multiple units (it won't work with buildings capable of doing anything else while training, passives/auras are ok though)
Did you know you can ctrl-click multiple objects in the data editor to compare their fields? That's what I did. I compared your ability to the Scivessel Nanorepair, and systematically looked at all fields that were different between the two, ignoring those with an obvious explanation (like the effect caused, full HP validators etc)
obviusly i didnt know :D
thx for the tip and for your time helping me either here and via pm, i owe you one beer, cheers :)
ok so resurrecting this very old post. I just wanted to create a mod extension that would allow for autocast training of scvs, probes, and then something with zerg drones. Anyway I used your autotrain as a reference point to create mine, starting with just SCVs. When I try to load up as terran it crashes each time though. Obviously something with the ability or effect isn't working, but i'm not sure what, any ideas?
You do know that you can now make Train type abilities autocast like the Locust Train ability of the Swarm Host.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
Under the Train type ability there are flags called Auto Cast and Auto Cast Initially On under the Ability: Info - Train Flags field.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg