As suggested here, I am using an "Arm Magazine" ability to specialize a unit. That means every new learned ability / upgraded stat is represented by a special kind of ammo.
Now I would like to add an ability to reset the unit to its "brand new" status. In case the player wants a different specialization later or he accidently ordered a wrong type of specialization, an ability to reset this unit back to its factory status would be helpful.
How can an ability set the amount of stored ammunition units back to zero ?
That could work. I will try it. Do you know a way to destroy internal ammo triggered from another unit. I am think of a enemy counter unit that can disarm teh specialized unit.
Trouble with the Use Calldown is it takes ammp units from the nearest source so is only an option for single units with that ammo unit. Tried using the Iterate Transport effect or a Search Area that requires hidden, that works for items in inventories.
There can be two of these specialized units per player.
I was thinking of firing the dummy units that represents the installed devices like the carrier is firing its interceptors ... plus adding a timed life behavior then to the free / invisible dummy units with a period of almost 0.
If this is working, I could add a weapon for the specialized unit that only fires at a very special missile of the counter unit. This would consume slowly but surely the specialization, if the counter unit fires its designed missiles.
@DrSuperEvil: Go
stepping a large step back (sorry for the now following long reply)
I have made a modify version of the Protoss Mothership:
Twilight Mothership
The most stats are the same as the normal Mothership.
Quote:
Sister of the Mothership. Comes with almost no special abilities but can be upgraded and customized to use
- Cloaking Field
- Vortex
- Mass Recall
- Detection
- Power Charging
- Temporal Rift Shield
- Teleport & Fleet Teleport
- Quantum Disrupter
Creates power for nearby structures.
Enables:
- Probes
- The other Gateway units can be warped in, too
Can attack ground and air units.
You can build up to two Motherships of any kind in total - 2 normal OR 2 twilight OR 1+1
The "almost no special abilities" means, that it only has the "Power Source" abilty after it is created at the Nexus. For all other abilities and for improving the slightly weaker stats to an almost overpower vehicle, you have to spend additional time and resources to upgrade it. All upgrades are individual. If you create a second Twilight Mothership instead of a regular one, this second one is also delivered with alomst no special abilities. If an upgraded Twilight Mothership is destroyed ... all its upgrades are gone.
This I have made with the arm magazine ability and and 11 dummy units. These dummies represent the installed devices and the number every of these installed device stands for how much a special ability or stat is improved. E.g.
You can install the Quantum Disrupter Beam (A much weaker version of the Planet Cracker) twice. This switches from not installed to a very weak version to a weak version of the Cracker.
You can install the (not above listed) "Micro Black Hole Reactor" three times to improve the energy capacity of the ship in three steps.
Every device as its own cost of time, resources and "Device Points" (see below) additionaly depending on the grade of the improvement. E.g.
Micro Black Hole Reactor Level 1 - 10 sec, 10 min, 10 gas, 1 device point
Micro Black Hole Reactor Level 2 - 20 sec, 20 min, 20 gas, 2 device point
Micro Black Hole Reactor Level 3 - 30 sec, 30 min, 30 gas, 4 device point
After warp-in of a Twilight Mothership at the Nexus, it has a prebuild fixed amount of these "Device Points" of 40. If you would upgrade a Twilight Mothership completely, you would need 99 Device Points. Device Points are a charge used by all upgrades of this Arm Magazin ability.
So far no problems here ...
Now while testing it and playing around to balance it (adjusting effects and/or costs), a friend of mine has mis-clicked (?) and order a wrong upgrade wasting not only time and resources but also a number of these device points. He could not install the wanted configuration of device in this particular Twilight Mothership anymore.
I would like to have an ability to reset the installed devices to "factory" status (and/or to install a single device) for the owner of the mothership.
To top this, I would like to have an ability for another unit (e.g. a specialized Battlecruiser or only as an additional effect for the Yamato) to destroy one randomly chosen device of the Twilight Mothership. If you know "Master Of Orion 2", there was a ship component called "Achilles Targeting Unit". This unit helped to destroy enemy ships' internal component - effectively disarming them piece by piece.
Yup, buffs sound like the way to go for that. Let me get this straight you want there to be a limited nuber of upgrade points which can then be put in whatever. You also want a reset mechanism.
Have a counter buff with x stacks which represents your total upgrade cap number. You then have seperate counter buffs which represent the level of each ability by the number of stacks. You have a Specialize ability do the upgrading, this ability can do the costs and time needed to upgrade like a train ability.
Only downside is it cannot train and move unless you do not want it to be cancelable in which case you could represent the upgrading bar using a buff.
The Specialize ability uses a Set effect to use a Remove Behavior and Apply Behavior effects to remove a stack of the total upgrade cap stack and add one stack to the stack representing the upgrade. The reset can be performed using a slot of the same ability which has a similar set up as described except it has several Remove Behavior effects to remove all the upgrade counter stacks and then applies x to the total upgrade cap stack. The rest is just using the Unit Compare Behavior Count validators and Requirements to enable/disable the abilities depending on the upgrade stack size.
For the incremental upgrade point requirements you just need to throw in a Switch effect that counts the number of stacks for the upgrade so alternates between the 1/2/4/etc cost Set effects. For using the button you just need a clever requirement with an Or node that takes the level of the upgrade buff stack into account.
(S)He wants it to allow movement and use a build queue.
Faking a cancel is easy enough, albeit a bit tedious, using modify unit effects and a switch effect. (expect 2-3 effects for each individual upgrade at minimum)
Have you tried using a "use magazine" effect, and setting the "ammo effect" field to a "kill" effect? (+ a refund mechanic as mentioned above, if desired)
You can "use" all ammo units simultaneously with a persistent effect, just set the "period" to 0.
Controlling how your battlecruiser weapon destroys the ammo units might be difficult, especially getting it "truly" random if the "use magazine" effect doesn't do this by default.
For refunding "ability charges". I used it with the specialise->buff setup, with the cancel being a seperate effect-instant ability that removes the buffs and restores charges accordingly. Using ability charges as "device points" seems easier than making a dummy buff.
You'll also need a Modify Unit effect to "salvage" the ammo units on the "reset to default" ability if refunds are to be given, or even individual Modify Player effects containing the refund amounts if using a buff-based setup.
Actually you could do that via data as well ("kill" damage effect+"create unit" effect)
That would destroy all other buffs placed on the unit though, and you couldn't (easily) refund anything either. Could even be used to "cheat out" of slow-acting detrimal effects ("poison", "timed bomb", "cripple" etc) by negating any effect centered on the mothership unit, at the cost of your upgrades.
Actually you could do that via data as well ("kill" damage effect+"create unit" effect)
That would destroy all other buffs placed on the unit though, and you couldn't (easily) refund anything either. Could even be used to "cheat out" of slow-acting detrimal effects ("poison", "timed bomb", "cripple" etc) by negating any effect centered on the mothership unit, at the cost of your upgrades.
I am using an Arm Magazin Ability because the upgrading needs some time. In fact, it takes more time to upgrade the Twilight Mothership than to warp it in at the Nexus. The intention is that you can already use this kind of Mothership on its maiden trip while there are this Protoss worker installing components. If you move the Mothership with your army (or without the army as a belated support unit) your Twilight Mothership is getting stronger. Especially funny / nice is the effect if you upgrade the engines for speed ... while it is moving: It's really like the lame / lazy Protoss found the button to turn on the boosters.
The refund of Device Points is only needed if you reset the Mothership's abilities or (if I get it to work) if ypu want to uninstall a particular device. If the Mothership is hit by the disarming weapon from what ever unit it will get, there is no refund needed and not intended: Some things are beyond repair. Refunding minerals or gas is also not planned: A device should not be able to be salvaged: You can only "jettison" it to make room for a different device.
Outsourcing units' abilities to triggers is something I did not want to do. The units and their behaviors should stayed bundled within the mod. I am make triggers only for player-player interaction depending on the map.
I will experiment a bit. Don't know, how long it takes to find a working solution o.O
Many thanks for the brainstorming. You folks are great :)
You can specify an "ammo unit" (type) on the "use magazine" effect, that should allow targeting specific "device types". Or if that fails you can always validate the unit type on other effects, though I don't know exactly what happens when an ammo unit is simply called and then left idle. Interceptors return eventually, so hopefully your dummy units will too. (i.e. those of the "incorrect" type, which then would be "used" but not instantly salvaged)
As suggested here, I am using an "Arm Magazine" ability to specialize a unit. That means every new learned ability / upgraded stat is represented by a special kind of ammo.
Now I would like to add an ability to reset the unit to its "brand new" status. In case the player wants a different specialization later or he accidently ordered a wrong type of specialization, an ability to reset this unit back to its factory status would be helpful.
How can an ability set the amount of stored ammunition units back to zero ?
Have a Use Calldown effect just chew them all up?
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
@DrSuperEvil: Go
That could work. I will try it. Do you know a way to destroy internal ammo triggered from another unit. I am think of a enemy counter unit that can disarm teh specialized unit.
Trouble with the Use Calldown is it takes ammp units from the nearest source so is only an option for single units with that ammo unit. Tried using the Iterate Transport effect or a Search Area that requires hidden, that works for items in inventories.
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
@DrSuperEvil: Go
There can be two of these specialized units per player.
I was thinking of firing the dummy units that represents the installed devices like the carrier is firing its interceptors ... plus adding a timed life behavior then to the free / invisible dummy units with a period of almost 0.
If this is working, I could add a weapon for the specialized unit that only fires at a very special missile of the counter unit. This would consume slowly but surely the specialization, if the counter unit fires its designed missiles.
Ok we need to go a step back, please explain the long term goals because so far what you are saying could be done with stacks of Buff behaviours.
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
@DrSuperEvil: Go stepping a large step back (sorry for the now following long reply)
I have made a modify version of the Protoss Mothership:
Twilight Mothership
The most stats are the same as the normal Mothership.
You can build up to two Motherships of any kind in total - 2 normal OR 2 twilight OR 1+1
The "almost no special abilities" means, that it only has the "Power Source" abilty after it is created at the Nexus. For all other abilities and for improving the slightly weaker stats to an almost overpower vehicle, you have to spend additional time and resources to upgrade it. All upgrades are individual. If you create a second Twilight Mothership instead of a regular one, this second one is also delivered with alomst no special abilities. If an upgraded Twilight Mothership is destroyed ... all its upgrades are gone.
This I have made with the arm magazine ability and and 11 dummy units. These dummies represent the installed devices and the number every of these installed device stands for how much a special ability or stat is improved. E.g.
Every device as its own cost of time, resources and "Device Points" (see below) additionaly depending on the grade of the improvement. E.g.
After warp-in of a Twilight Mothership at the Nexus, it has a prebuild fixed amount of these "Device Points" of 40. If you would upgrade a Twilight Mothership completely, you would need 99 Device Points. Device Points are a charge used by all upgrades of this Arm Magazin ability.
So far no problems here ...
Now while testing it and playing around to balance it (adjusting effects and/or costs), a friend of mine has mis-clicked (?) and order a wrong upgrade wasting not only time and resources but also a number of these device points. He could not install the wanted configuration of device in this particular Twilight Mothership anymore.
I would like to have an ability to reset the installed devices to "factory" status (and/or to install a single device) for the owner of the mothership. To top this, I would like to have an ability for another unit (e.g. a specialized Battlecruiser or only as an additional effect for the Yamato) to destroy one randomly chosen device of the Twilight Mothership. If you know "Master Of Orion 2", there was a ship component called "Achilles Targeting Unit". This unit helped to destroy enemy ships' internal component - effectively disarming them piece by piece.
Yup, buffs sound like the way to go for that. Let me get this straight you want there to be a limited nuber of upgrade points which can then be put in whatever. You also want a reset mechanism.
Have a counter buff with x stacks which represents your total upgrade cap number. You then have seperate counter buffs which represent the level of each ability by the number of stacks. You have a Specialize ability do the upgrading, this ability can do the costs and time needed to upgrade like a train ability.
Only downside is it cannot train and move unless you do not want it to be cancelable in which case you could represent the upgrading bar using a buff.
The Specialize ability uses a Set effect to use a Remove Behavior and Apply Behavior effects to remove a stack of the total upgrade cap stack and add one stack to the stack representing the upgrade. The reset can be performed using a slot of the same ability which has a similar set up as described except it has several Remove Behavior effects to remove all the upgrade counter stacks and then applies x to the total upgrade cap stack. The rest is just using the Unit Compare Behavior Count validators and Requirements to enable/disable the abilities depending on the upgrade stack size.
For the incremental upgrade point requirements you just need to throw in a Switch effect that counts the number of stacks for the upgrade so alternates between the 1/2/4/etc cost Set effects. For using the button you just need a clever requirement with an Or node that takes the level of the upgrade buff stack into account.
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
(S)He wants it to allow movement and use a build queue.
Faking a cancel is easy enough, albeit a bit tedious, using modify unit effects and a switch effect. (expect 2-3 effects for each individual upgrade at minimum)
Have you tried using a "use magazine" effect, and setting the "ammo effect" field to a "kill" effect? (+ a refund mechanic as mentioned above, if desired)
You can "use" all ammo units simultaneously with a persistent effect, just set the "period" to 0.
Controlling how your battlecruiser weapon destroys the ammo units might be difficult, especially getting it "truly" random if the "use magazine" effect doesn't do this by default.
@Photoloss: Go
I am curious as to how you see the Modify Unit effect fitting in.
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
For refunding "ability charges". I used it with the specialise->buff setup, with the cancel being a seperate effect-instant ability that removes the buffs and restores charges accordingly. Using ability charges as "device points" seems easier than making a dummy buff.
You'll also need a Modify Unit effect to "salvage" the ammo units on the "reset to default" ability if refunds are to be given, or even individual Modify Player effects containing the refund amounts if using a buff-based setup.
Probably cleaner and universally easier to just trigger this.
Unit uses "whatever your factory reset ability is"
Remove unit (also kills all spawned units)
Play some distracting graphic on the unit (hallucination deaths recoloured are great at this, though the mothership warp in would fit).
Create unit of same unit type at same location, facing the same direction. Carry over whatever experience/kills/vitals you wish.
Actually you could do that via data as well ("kill" damage effect+"create unit" effect)
That would destroy all other buffs placed on the unit though, and you couldn't (easily) refund anything either. Could even be used to "cheat out" of slow-acting detrimal effects ("poison", "timed bomb", "cripple" etc) by negating any effect centered on the mothership unit, at the cost of your upgrades.
This won't transfer kills, vitals or orientation.
@DrSuperEvil: Go @Photoloss: Go @Eiviyn: Go
I am using an Arm Magazin Ability because the upgrading needs some time. In fact, it takes more time to upgrade the Twilight Mothership than to warp it in at the Nexus. The intention is that you can already use this kind of Mothership on its maiden trip while there are this Protoss worker installing components. If you move the Mothership with your army (or without the army as a belated support unit) your Twilight Mothership is getting stronger. Especially funny / nice is the effect if you upgrade the engines for speed ... while it is moving: It's really like the lame / lazy Protoss found the button to turn on the boosters.
The refund of Device Points is only needed if you reset the Mothership's abilities or (if I get it to work) if ypu want to uninstall a particular device. If the Mothership is hit by the disarming weapon from what ever unit it will get, there is no refund needed and not intended: Some things are beyond repair. Refunding minerals or gas is also not planned: A device should not be able to be salvaged: You can only "jettison" it to make room for a different device.
Outsourcing units' abilities to triggers is something I did not want to do. The units and their behaviors should stayed bundled within the mod. I am make triggers only for player-player interaction depending on the map.
I will experiment a bit. Don't know, how long it takes to find a working solution o.O
Many thanks for the brainstorming. You folks are great :)
You can specify an "ammo unit" (type) on the "use magazine" effect, that should allow targeting specific "device types". Or if that fails you can always validate the unit type on other effects, though I don't know exactly what happens when an ammo unit is simply called and then left idle. Interceptors return eventually, so hopefully your dummy units will too. (i.e. those of the "incorrect" type, which then would be "used" but not instantly salvaged)
@Photoloss: Go
That was tested in another thread and it does not seem to work, the Use Magazine effect cannot discriminate between ammo units it seems.
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