Hi, I know how to give a unit the SCV gather ability, but that isn't what I want to do. I want to create an ability that allows you to collect minerals from multiple nodes and store them on a ship. Not nodes exactly, the thing that you walk into and it gives you 100 minerals.
How do I make the resource not give it to you outright, you must return to the base and dump your load near the base to get the money? Also, how would I make it so that if the ship died, the minerals it was holding appeared where it was shot down.
I am making a space battle where every unit has a different "storage compacity" for mineral collection. If it is possible I would also like a partially full or full ship to be slower than an empty one.
This shouldn't be too hard. What it looks like the mineral pallet does is have an autocast ability on itself that casts on any unit close enough to pick it up (that can pick it up). This applies a set effect, which does 2 things:
Applies a Modify Player effect that actually adds the minerals
After a short delay, applies a damage effect to the source unit that deals no actual damage, but kills the mineral pallet off.
So basically, if you replace the Modify Player effect with an Apply Behavior effect, then you can apply a custom "Unit is carrying XYZ minerals" behavior to the unit that picks it up. From there, you can use a behavior on the carrier units that does the following:
Periodically Search Areas, and applies a Set effect to all units near enough to it that contains a validator looking for your custom behavior (for this, you're looking for Unit Compare Behavior Count i think; make sure the validator is applying to the right unit). It would have the following effects to apply:
An Apply Behavior targeting the Caster, which adds a custom "Carrier is storing XYZ minerals" behavior specific to that mineral carrier (that way you can set a custom max stack count per caster to cap the amount of minerals that unit can have)
A Remove Behavior targeting the target, which removes the "Unit is carrying XYZ minerals" behavior (one copy at least).
As for dropping minerals on death, you need to add a custom behavior with a death response (use a buff behavior, then look under Behavior -> Combat) that applies a Create Unit effect with a validator checking for the "Carrier is carrying XYZ minerals" behavior on the caster. I'm not sure how to drop multiple palettes depending on the behavior count, but it's a start :)
Finally, you can use triggers (or more data if you're really feeling adventurous) to convert those "stored" minerals into actual usable ones. I can also help you with this if you need it, though hopefully you could figure it out yourself :)
Slowing down ships with minerals stored is pretty easy as well; make sure your mineral behavior is set up to perodically apply an effect, then have the effect apply another behavior which actually does the slowing down. Like this:
Carrier is carrying XYZ Minerals [applies periodically] -> Carrying Minerals Speed Debuff Effect [applies] -> Carrier is Carrying Minerals Speed Debuff Behavior [has a timed life of slightly longer than the period for the first behavior].
This is a fairly high level overview of what you need to do, feel free to ask questions if something doesn't make sense.
"So basically, if you replace the Modify Player effect with an Apply Behavior effect, then you can apply a custom "Unit is carrying XYZ minerals" behavior to the unit that picks it up. From there, you can use a behavior on the carrier units that does the following:"
Ok, I understand how to remove the auto-cast ability, but what do I replace it with?
I figured out how to make the unit not get the minerals, but there is no way to show that the unit is holding them...
No no no, you don't want to remove the auto-cast ability, just modify part of what it does :)
And as for displaying the number of minerals a unit is holding, your best bet is to make up some custom UI elements that do this for the selected unit you have.
O ok, what I meant was, what specifically do I give to the ability instead of the 100 minerals automatically? I don't seem to see it... Anyway, not to sound like I noob but I am still new in the editor and even newer to data. I'll give it a shot though and see what happens. So, to make those custom UI probably need to learn about dialogs right?
What you're trying to do Is complicated (though quite certainly doable); if you're new to the editor maybe you should start with a few custom weapons or something to get the hang of the data editor :)
Starcraft 2 supports a WC3-like item system. You can even make your own "item class" so your ships can only carry "minerals". I don't know if you can target inventory items from another unit, but since you say "dump your load", that would work like selling to a WC3 shop anyway. You can also flag items as "dropped upon death", and even assign the ships some "loot" (like dropping salvageable debris upon destruction)
You'll have to set up the framework first, and will probably need several tutorials for doing so, but it is the cleanest way of doing what you want (and you can also make your ships hold weapon items, better armour/shields etc)
Guys, I don't know why nobody of you came with the idea of... using transport ability.
Just remove any ability from the minerals, give them minimum movement & acceleration speed (sc2 doesn't allow loading of immobile units).
Create validator that validates unit (type = mineral pickup)
Create (or better copy) one of the existing transport abilities, use validator for loading units.
Create search area effect that will execute mineral gain when any minerals are found nearby, and give it to the units you want.
You can even easily create behavior that slows down unit carrying minerals (there's field for it in the transport ability), or even add validator to it so it'd get slower only after certain amount of cargo is used.
O WOW... I CAN GIVE DIFFERENT UNITS DIFFERENT CARGO SIZES!!!! YOU ARE A FREAKING GENEIOUS :):):) Now all I have to do is make the mineral pallets loadable... and DONE!! Seems easy to make a negative speed buff based on how full it is also.
Edit: How do I do the validator part?? Also, I gave the mineral pallet speed, but it is still "immobile"??
The one for transport loading: Create new validator of type: Unit Type, and be sure those fields are setup like this:
Validator - Find Enabled
Validator - Unit - Value Target
Validator - Value Mineral Crystal (Item)
then at transport ability, at Ability - Load Validator, add it to the list.
You could take a look at my attachements, and in data editor choose data source to be from map only, so you can easily look up objects i modified. (few effects, 1 ability, 2 validators, 3 units 2 behaviors.)
Validators are type of data (just like abilities, units etc.) just select it from the drop down list. Also what's the problem with attachment? If it's your browser, did you try right clicking on link and "save target as"?
It opens a windows page that says it wants to search for a way to open the file. It can't find a way to open it... The website also says that "my browser is old" but I'm not sure how to fix that. I think I have internet explorer 7... Is it free to update?
If you have file downloaded already (I understand that you do, form what i get) and it happens after double clicking the file maybe your sc2 is not properly installed. (.sc2map filetype is not assigned to sc2editor it seems) Maybe you could try dragging and dropping file on top of the editor icon or opened editor itself.
Edit to your edit: try downloading some other internet explorer maybe, firefox, chrome, opera (which I personally use) or anything else, IE7 is outdated indeed.
Edit2 to post below:
Quote:
It never even asked it I wanted to download a file, just save it or find a way to open it
Isn't saving file from the internet equal to downloading it? I assume that's from the window that pops up the seconds you click on the attachment file.
Alright, well I'm also using my father's PC, which I do not like BTW. He also has these damm parent controls set up so I can't even try it... I tried to open it on my laptop (SC2 isn't even installed there). It never even asked it I wanted to download a file, just save it or find a way to open it...
Hi, I know how to give a unit the SCV gather ability, but that isn't what I want to do. I want to create an ability that allows you to collect minerals from multiple nodes and store them on a ship. Not nodes exactly, the thing that you walk into and it gives you 100 minerals.
How do I make the resource not give it to you outright, you must return to the base and dump your load near the base to get the money? Also, how would I make it so that if the ship died, the minerals it was holding appeared where it was shot down.
I am making a space battle where every unit has a different "storage compacity" for mineral collection. If it is possible I would also like a partially full or full ship to be slower than an empty one.
This shouldn't be too hard. What it looks like the mineral pallet does is have an autocast ability on itself that casts on any unit close enough to pick it up (that can pick it up). This applies a set effect, which does 2 things:
So basically, if you replace the Modify Player effect with an Apply Behavior effect, then you can apply a custom "Unit is carrying XYZ minerals" behavior to the unit that picks it up. From there, you can use a behavior on the carrier units that does the following:
As for dropping minerals on death, you need to add a custom behavior with a death response (use a buff behavior, then look under Behavior -> Combat) that applies a Create Unit effect with a validator checking for the "Carrier is carrying XYZ minerals" behavior on the caster. I'm not sure how to drop multiple palettes depending on the behavior count, but it's a start :)
Finally, you can use triggers (or more data if you're really feeling adventurous) to convert those "stored" minerals into actual usable ones. I can also help you with this if you need it, though hopefully you could figure it out yourself :)
Slowing down ships with minerals stored is pretty easy as well; make sure your mineral behavior is set up to perodically apply an effect, then have the effect apply another behavior which actually does the slowing down. Like this:
Carrier is carrying XYZ Minerals [applies periodically] -> Carrying Minerals Speed Debuff Effect [applies] -> Carrier is Carrying Minerals Speed Debuff Behavior [has a timed life of slightly longer than the period for the first behavior].
This is a fairly high level overview of what you need to do, feel free to ask questions if something doesn't make sense.
"So basically, if you replace the Modify Player effect with an Apply Behavior effect, then you can apply a custom "Unit is carrying XYZ minerals" behavior to the unit that picks it up. From there, you can use a behavior on the carrier units that does the following:"
Ok, I understand how to remove the auto-cast ability, but what do I replace it with? I figured out how to make the unit not get the minerals, but there is no way to show that the unit is holding them...
No no no, you don't want to remove the auto-cast ability, just modify part of what it does :)
And as for displaying the number of minerals a unit is holding, your best bet is to make up some custom UI elements that do this for the selected unit you have.
@RCIX: Go
O ok, what I meant was, what specifically do I give to the ability instead of the 100 minerals automatically? I don't seem to see it... Anyway, not to sound like I noob but I am still new in the editor and even newer to data. I'll give it a shot though and see what happens. So, to make those custom UI probably need to learn about dialogs right?
Yep, dialogs will help with the UI.
What you're trying to do Is complicated (though quite certainly doable); if you're new to the editor maybe you should start with a few custom weapons or something to get the hang of the data editor :)
Starcraft 2 supports a WC3-like item system. You can even make your own "item class" so your ships can only carry "minerals". I don't know if you can target inventory items from another unit, but since you say "dump your load", that would work like selling to a WC3 shop anyway. You can also flag items as "dropped upon death", and even assign the ships some "loot" (like dropping salvageable debris upon destruction)
You'll have to set up the framework first, and will probably need several tutorials for doing so, but it is the cleanest way of doing what you want (and you can also make your ships hold weapon items, better armour/shields etc)
Guys, I don't know why nobody of you came with the idea of... using transport ability.
You can even easily create behavior that slows down unit carrying minerals (there's field for it in the transport ability), or even add validator to it so it'd get slower only after certain amount of cargo is used.
Attaching attachment if you wants to take a look.
@uiasdnmb: Go
O WOW... I CAN GIVE DIFFERENT UNITS DIFFERENT CARGO SIZES!!!! YOU ARE A FREAKING GENEIOUS :) :) :) Now all I have to do is make the mineral pallets loadable... and DONE!! Seems easy to make a negative speed buff based on how full it is also.
Edit: How do I do the validator part?? Also, I gave the mineral pallet speed, but it is still "immobile"??
The one for transport loading: Create new validator of type: Unit Type, and be sure those fields are setup like this:
Validator - Find Enabled
Validator - Unit - Value Target
Validator - Value Mineral Crystal (Item)
then at transport ability, at Ability - Load Validator, add it to the list.
You could take a look at my attachements, and in data editor choose data source to be from map only, so you can easily look up objects i modified. (few effects, 1 ability, 2 validators, 3 units 2 behaviors.)
@uiasdnmb: Go
Sorry man, I can't load the attachment for some reason... it looks for a way to open it and a new window opens.
Validators are type of data (just like abilities, units etc.) just select it from the drop down list. Also what's the problem with attachment? If it's your browser, did you try right clicking on link and "save target as"?
@uiasdnmb: Go
It opens a windows page that says it wants to search for a way to open the file. It can't find a way to open it... The website also says that "my browser is old" but I'm not sure how to fix that. I think I have internet explorer 7... Is it free to update?
If you have file downloaded already (I understand that you do, form what i get) and it happens after double clicking the file maybe your sc2 is not properly installed. (.sc2map filetype is not assigned to sc2editor it seems) Maybe you could try dragging and dropping file on top of the editor icon or opened editor itself.
Edit to your edit: try downloading some other internet explorer maybe, firefox, chrome, opera (which I personally use) or anything else, IE7 is outdated indeed.
Edit2 to post below:
Isn't saving file from the internet equal to downloading it? I assume that's from the window that pops up the seconds you click on the attachment file.
@uiasdnmb: Go
Alright, well I'm also using my father's PC, which I do not like BTW. He also has these damm parent controls set up so I can't even try it... I tried to open it on my laptop (SC2 isn't even installed there). It never even asked it I wanted to download a file, just save it or find a way to open it...