My map involves a central structure whose purpose revolves around the ability to construct add-ons around itself. Although the add-ons can normally be constructed, as soon as it is required for the central structure to be built on something, they can no longer find a placement position. It is interesting, because the central structure can be upgraded to higher tiers which do not have a 'built-on' requirement, and subsequently have no problem constructing the same add-ons from the same ability as the first tier structure. Additionally, I thought the footprint of the placement unit might be interfering, but what I just pointed out voids that supposition. Regardless, I even added a behaviour to the central structure to kill the placement, and although I was able to accomplish that, I was still not able to build the add-ons. Of course a solution would simply be to rid myself of the placement requirement altogether, however, I am nevertheless curious if there is a way to fix this problem.
EDIT: I just realized that a perhaps solid and sole way to accomplish this is initiate a morph command on the building as soon as it is complete, so that the building that that is produced from the morph is not built on anything and will therefore allow add-ons to be built.
Not sure what you're trying to say. Are you saying it can place the first addon and then it can't place any more? Or are you saying if you require the central structure to be built on something, that it can't build addons anymore?
The only guess I have that might help you if the addons are blocking each other, is that you can adjust the offset of the addon. In the unit that's being used as an addon, it has an X and Y offset you can change. For example, a tech lab's offset is x: 2.5, y: 0.5. This setting is in the behaviors tab.
If you need your main structure to be required to be built on something, then require your addons to be built on the same thing. Terran addons use a placement footprint that is the same size as the 3x3 with the 2x2 next to it, with the center of that footprint being the center of the 3x3 part. This includes checking to make sure the building can be placed. So if your building was built on something, and your addons aren't required to be built on that thing, then they can't be built because the placement check fails. You'll have to make sure that the center of your placement footprint is the same spot as the center of the building's footprint.
...This actually made me realize that I can easily fix a problem I've been having with this for months. I have barracks that are required to be placed on an invisible thing I made. I properly required the tech lab to be placed on it too, but pressing the tech lab button gives me the ability to place it, even though the barracks is already landed. I think the reason for this, is the way the tech lab uses the full 3x3+2x2 footprint to perform its check. While the barracks is sitting on the ground, it's taking the place of the unit it's built on. Maybe it requires me to place because it's determining where it could be go if it were lifted, and if it's lifted, the unit that the addon requires would be available again. I wonder if I changed the 3x3+2x2 placement footprint to just a 2x2 footprint for addons, this behavior would disappear.
So I think I've basically helped you and helped my self by answering this topic. Thanks!
So if I understand you correctly, then you basically have two or three options.
Make a placement footprint for every addon that includes your central structure's footprint plus the footprint for where it goes in relation to the central structure. Make sure the center of the central structure part is the center of this whole footprint. (You may need to add gray space to do this.) Then require every structure to be built on the same thing your addon is built on. I'm certain this should work, because I require my barracks and my tech labs to be built on the same thing, and this is how it works. Downside: Every addon will bring up a placement grid even though you can build it there.
Change the placement footprint for every addon to be what I described above, but not including the footprint of the central structure. So just a big gray square with your addon's offset where it goes, with the center of this footprint being where the center of this central building would be. I haven't tested this yet, so it might not work.
Do 1. But don't require your addons to be built on anything. Instead use two different Sets in the Placement Check layer. Make the grid for your central building be Set 1, and the grid for your addon be Set 2. Define Set 1 to not have "No Build" as invalid. Define Set 2 to have "No Build" as invalid. I haven't tested this, so it might not work.
I would say #3 is ideal. Theoretically, it should allow you to require your central building to be placed on something. It should allow you to place addons without requiring them to be placed on the same thing, without anything failing their placement check. And it should also prevent the addon from being built if something is in the way of the addon itself.
Feel free to experiment yourself and figure out which way is best for you.
Thanks a lot for your reply Amaroq. As you figured out, my problem is that if the central structure is required to be built on something, it will not allow add-ons to be constructed from it. I haven't actually tested the solutions that you've proposed, but I'm pretty sure they are better than the solution that I've already implemented. What I've done is I've created a "dummy" central structure which has the built on requirement, as well as a straightforward morph ability that will morph the dummy into the true central structure as soon as the dummy finishes constructing. I also kill the placement as soon as the dummy structure starts constructing, and have the loot of all central structures set to the placement. For my game my solution works just dandy, however, your solutions definitely seem to be more reliable for any given situation.
Also, I commend you on figuring out your issue with the barracks. Its quite interesting when the solution hits you from out of the blue. In psychology class we learned this term is "incubation". Weird name though.
Thanks again for the detailed response and help, much appreciated.
Your solution should work if your building isn't going to be lifting off or anything, and if the only way to get it is to build the dummy building first. The reason it can't build addons is because their footprint is stopping them from being placed on the thing that is required to put your main building on. (That's what I suspect.)
The editor is hard to understand. I just learned a lot of this today. But every footprint has three layers. Pathing, Placement Check, and Placement Apply. I've just taken these at face value and it seems to work. Pathing is how units can and can't move onto that space while the unit/building is there. Placement check checks requirements in order to place it. And I think Placement Apply applies properties to the space that the squares are set to in that layer.
Placement Apply and Placement Check have the ability to let you define "sets". And you can't place any blocks unless you have a set selected. This tells me that when you have a set selected, you are placing blocks from that set. This also tells me that when you define rules for a set in a Placement Apply, you are placing blocks that apply those rules where the thing is built. There is a different set of rules for defining sets in a Placement Check. So that tells me that the squares you place for those sets are checking conditions.
The editor lets you choose three footprints for a unit. The placement footprint, the footprint for the unit, and a footprint for when it dies. So whatever footprint is in the placement footprint, the editor probably only looks at the placement check layer for that. The footprint in the unit's footprint slot probably just uses the placement apply and pathing layers. And I'm guessing that the death slot uses the footprint's placement apply layer, but I haven't tried it yet.
This knowledge should help you out in the future if you have to mess with this kind of thing again.
Also, I've never heard of the term incubation. :P I think of it as integration. Making connections between different areas of your knowledge. Learning new things and connecting them to things you already know. Etc.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My map involves a central structure whose purpose revolves around the ability to construct add-ons around itself. Although the add-ons can normally be constructed, as soon as it is required for the central structure to be built on something, they can no longer find a placement position. It is interesting, because the central structure can be upgraded to higher tiers which do not have a 'built-on' requirement, and subsequently have no problem constructing the same add-ons from the same ability as the first tier structure. Additionally, I thought the footprint of the placement unit might be interfering, but what I just pointed out voids that supposition. Regardless, I even added a behaviour to the central structure to kill the placement, and although I was able to accomplish that, I was still not able to build the add-ons. Of course a solution would simply be to rid myself of the placement requirement altogether, however, I am nevertheless curious if there is a way to fix this problem.
EDIT: I just realized that a perhaps solid and sole way to accomplish this is initiate a morph command on the building as soon as it is complete, so that the building that that is produced from the morph is not built on anything and will therefore allow add-ons to be built.
Not sure what you're trying to say. Are you saying it can place the first addon and then it can't place any more? Or are you saying if you require the central structure to be built on something, that it can't build addons anymore?
The only guess I have that might help you if the addons are blocking each other, is that you can adjust the offset of the addon. In the unit that's being used as an addon, it has an X and Y offset you can change. For example, a tech lab's offset is x: 2.5, y: 0.5. This setting is in the behaviors tab.
If you need your main structure to be required to be built on something, then require your addons to be built on the same thing. Terran addons use a placement footprint that is the same size as the 3x3 with the 2x2 next to it, with the center of that footprint being the center of the 3x3 part. This includes checking to make sure the building can be placed. So if your building was built on something, and your addons aren't required to be built on that thing, then they can't be built because the placement check fails. You'll have to make sure that the center of your placement footprint is the same spot as the center of the building's footprint.
...This actually made me realize that I can easily fix a problem I've been having with this for months. I have barracks that are required to be placed on an invisible thing I made. I properly required the tech lab to be placed on it too, but pressing the tech lab button gives me the ability to place it, even though the barracks is already landed. I think the reason for this, is the way the tech lab uses the full 3x3+2x2 footprint to perform its check. While the barracks is sitting on the ground, it's taking the place of the unit it's built on. Maybe it requires me to place because it's determining where it could be go if it were lifted, and if it's lifted, the unit that the addon requires would be available again. I wonder if I changed the 3x3+2x2 placement footprint to just a 2x2 footprint for addons, this behavior would disappear.
So I think I've basically helped you and helped my self by answering this topic. Thanks!
So if I understand you correctly, then you basically have two or three options.
I would say #3 is ideal. Theoretically, it should allow you to require your central building to be placed on something. It should allow you to place addons without requiring them to be placed on the same thing, without anything failing their placement check. And it should also prevent the addon from being built if something is in the way of the addon itself.
Feel free to experiment yourself and figure out which way is best for you.
Thanks a lot for your reply Amaroq. As you figured out, my problem is that if the central structure is required to be built on something, it will not allow add-ons to be constructed from it. I haven't actually tested the solutions that you've proposed, but I'm pretty sure they are better than the solution that I've already implemented. What I've done is I've created a "dummy" central structure which has the built on requirement, as well as a straightforward morph ability that will morph the dummy into the true central structure as soon as the dummy finishes constructing. I also kill the placement as soon as the dummy structure starts constructing, and have the loot of all central structures set to the placement. For my game my solution works just dandy, however, your solutions definitely seem to be more reliable for any given situation.
Also, I commend you on figuring out your issue with the barracks. Its quite interesting when the solution hits you from out of the blue. In psychology class we learned this term is "incubation". Weird name though.
Thanks again for the detailed response and help, much appreciated.
Your solution should work if your building isn't going to be lifting off or anything, and if the only way to get it is to build the dummy building first. The reason it can't build addons is because their footprint is stopping them from being placed on the thing that is required to put your main building on. (That's what I suspect.)
The editor is hard to understand. I just learned a lot of this today. But every footprint has three layers. Pathing, Placement Check, and Placement Apply. I've just taken these at face value and it seems to work. Pathing is how units can and can't move onto that space while the unit/building is there. Placement check checks requirements in order to place it. And I think Placement Apply applies properties to the space that the squares are set to in that layer.
Placement Apply and Placement Check have the ability to let you define "sets". And you can't place any blocks unless you have a set selected. This tells me that when you have a set selected, you are placing blocks from that set. This also tells me that when you define rules for a set in a Placement Apply, you are placing blocks that apply those rules where the thing is built. There is a different set of rules for defining sets in a Placement Check. So that tells me that the squares you place for those sets are checking conditions.
The editor lets you choose three footprints for a unit. The placement footprint, the footprint for the unit, and a footprint for when it dies. So whatever footprint is in the placement footprint, the editor probably only looks at the placement check layer for that. The footprint in the unit's footprint slot probably just uses the placement apply and pathing layers. And I'm guessing that the death slot uses the footprint's placement apply layer, but I haven't tried it yet.
This knowledge should help you out in the future if you have to mess with this kind of thing again.
Also, I've never heard of the term incubation. :P I think of it as integration. Making connections between different areas of your knowledge. Learning new things and connecting them to things you already know. Etc.