I'm trying to mess with the data editor to morph tech labs and reactors (of both barracks, starport and factory) into tech reactors. The idea is that the player can build both, as in a normal melee game, but I added a building which lets players upgrade various stuff. I'd like to create an upgrade in that building called "Unlock tech reactors" that would do two things:
1. replace all the player's existing tech labs and reactors to working tech reactors
2. disable the options of building tech labs and reactors, and replace them buy a "build tech reactor" button/ability.
Any pointers?
EDIT: I managed to replace the existing tech labs and reactors and feel very accomplished \o/
Hiding/showing the add-ons builds though, that's still shady.
With the upgrading the tech reactors, just have an automatic morph ability on the two addons that has a requirement for your upgrade. That way when you research the upgrade they will automatically morph to the techreactor.
For the revealing and hiding the buttons, you will need two requirements (one extra if you set up the one for upgrading the reactors right). Firstly under your Build ability/abilities make sure the Ability - Info - Button - State field is set to restricted for both the downgrades and the techreactor (this allows the buttons to be hidden and revealed by requirements). Secondly add the requirement with the Use and Show part saying count upgrade completed to the button for the tech reactor. Finally add a requirement to both downgrades that has the logic Not>count upgrade completed in the Show field.
I've been trying to do what you said for a couple hours but I'm getting lost in the Data Editor between Upgrades, Abilities, Requirements and how to tie all that together. Noob here ^^
The DE actually has a "Morph to Tech Reactor (For preplaced buildings)" ability which I've tried to use, but I'm thinking I'll have to do this through triggers right? When the upgrade is complete, add all the player's Tech Labs and Reactors to a unit group and then morph them?
I've actually written a trigger that replaces the existing labs/reactors with tech reactors, which works well (as in it allows advanced units to be build 2 at a time) but I'm guessing morphing them like you said might be the best way to do it.
Anyway, if you could spare some time to break it down a little more for me, I'd super appreciate it :)
It is not hard to make a morph ability. Just copy the one used to morph the zerg spire, add the automatic flag under Stats - Flags, change Ability - Info - Unit to tech reactor and under Ability - Comands - Requirements put in your requirement.
The upgrades are purely there to be counted by the requirements (like the Dark Protoss upgrade). Open any tech requirement like stim packs or Use Yamato, they are have the same layout. You find a type Count Upgrade, with an alias of the upgrade in question and a state of Completed. If in the Use path it determines the usage of the behaviour/ability while if it is under Show it determines if the button appears of not (presuming the button state is set to restricted under the ability).
What you want is one requirement to allow usage of the morph ability and to reveal the button for building tech reactors and you want a second one just for hiding the obsolete versions. The second requirement just has the tech requirement under the show area but has a Not function infront of it eg Not Under Construction.
No triggers needed since the automatic flag makes them morphs as soon as the requirement is met.
Starting to get it. I got the first part pretty much done: when I research the Tech Reactors, all the labs and reactors morph into functional tech reactors (although the tech reactor model doesn't replace the add-ons, but i'm sure that's a minor fix I'll find soon).
So I made a second requirement called "Tech Reactors Not Unlocked" but i'm not sure how to proceed from here. In this req's requirement + section, i added
Show - Not - Count upgrade Unlock Tech Reactors" (which is the name of the upgrade that makes the Tech Reactors happen.
From there, should I go modify the abilities of the Barracks, Starport and Factory so that the add-ons are hidden? Sorry if i'm slow, this stuff is confusing and i appreciate your help a lot.
Hi folks,
I'm trying to mess with the data editor to morph tech labs and reactors (of both barracks, starport and factory) into tech reactors. The idea is that the player can build both, as in a normal melee game, but I added a building which lets players upgrade various stuff. I'd like to create an upgrade in that building called "Unlock tech reactors" that would do two things:
1. replace all the player's existing tech labs and reactors to working tech reactors
2. disable the options of building tech labs and reactors, and replace them buy a "build tech reactor" button/ability.
Any pointers?
EDIT: I managed to replace the existing tech labs and reactors and feel very accomplished \o/ Hiding/showing the add-ons builds though, that's still shady.
With the upgrading the tech reactors, just have an automatic morph ability on the two addons that has a requirement for your upgrade. That way when you research the upgrade they will automatically morph to the techreactor.
For the revealing and hiding the buttons, you will need two requirements (one extra if you set up the one for upgrading the reactors right). Firstly under your Build ability/abilities make sure the Ability - Info - Button - State field is set to restricted for both the downgrades and the techreactor (this allows the buttons to be hidden and revealed by requirements). Secondly add the requirement with the Use and Show part saying count upgrade completed to the button for the tech reactor. Finally add a requirement to both downgrades that has the logic Not>count upgrade completed in the Show 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
Thanks for your answer DrSuperEvil.
I've been trying to do what you said for a couple hours but I'm getting lost in the Data Editor between Upgrades, Abilities, Requirements and how to tie all that together. Noob here ^^
The DE actually has a "Morph to Tech Reactor (For preplaced buildings)" ability which I've tried to use, but I'm thinking I'll have to do this through triggers right? When the upgrade is complete, add all the player's Tech Labs and Reactors to a unit group and then morph them? I've actually written a trigger that replaces the existing labs/reactors with tech reactors, which works well (as in it allows advanced units to be build 2 at a time) but I'm guessing morphing them like you said might be the best way to do it.
Anyway, if you could spare some time to break it down a little more for me, I'd super appreciate it :)
It is not hard to make a morph ability. Just copy the one used to morph the zerg spire, add the automatic flag under Stats - Flags, change Ability - Info - Unit to tech reactor and under Ability - Comands - Requirements put in your requirement.
The upgrades are purely there to be counted by the requirements (like the Dark Protoss upgrade). Open any tech requirement like stim packs or Use Yamato, they are have the same layout. You find a type Count Upgrade, with an alias of the upgrade in question and a state of Completed. If in the Use path it determines the usage of the behaviour/ability while if it is under Show it determines if the button appears of not (presuming the button state is set to restricted under the ability).
What you want is one requirement to allow usage of the morph ability and to reveal the button for building tech reactors and you want a second one just for hiding the obsolete versions. The second requirement just has the tech requirement under the show area but has a Not function infront of it eg Not Under Construction.
No triggers needed since the automatic flag makes them morphs as soon as the requirement is met.
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
Starting to get it. I got the first part pretty much done: when I research the Tech Reactors, all the labs and reactors morph into functional tech reactors (although the tech reactor model doesn't replace the add-ons, but i'm sure that's a minor fix I'll find soon).
So I made a second requirement called "Tech Reactors Not Unlocked" but i'm not sure how to proceed from here. In this req's requirement + section, i added Show - Not - Count upgrade Unlock Tech Reactors" (which is the name of the upgrade that makes the Tech Reactors happen.
From there, should I go modify the abilities of the Barracks, Starport and Factory so that the add-ons are hidden? Sorry if i'm slow, this stuff is confusing and i appreciate your help a lot.
With the old models you need to make sure they are destroyed when the morph finishes. And create the new ones.
With your tech reactors not unlocked upgrade you need to set it to Completed.
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
Figured it out! Thanks DrSuperEvil!