I have done some editing on "Colony infestation" ability and at the moment I can use it to Colonist Huts and then train Infested units from building. Units trained from building are still owned by the player who controlled the (non-infested) hut. This causes problem with supplies because this increases supply count of wrong player. (Player1 infests Player2 hut and trains units -> supply usage of Player2 increases)
So, how can I modify the ability to give control (and ownership?) of the unit to player who infested the hut?
I think I need to modify ability so that it adds behavior AND change owner of unit. I need help with changing the owner part.
Neural Parasite ability may give some advice but I haven't found solution yet.
You can either use a Buff behaviour or a Modify Unit effect to change the ownership of a unit. With a behaviour it's as long as the behaviour remains on the unit. With an effect it's permanent.
OK. I have now upgraded Colony Infestation ability so that it can can add two or more effects / behaviors.
I'm trying to create new effect that only changes controller of the unit but I can't find fields that affect on controller / owner.
Can you help me to find these fields? There are many options under "Behavior - (Basic) Behavior: Modification +" but no player options.
- -
I did some testing on Hive Mind Emulator and noticed that it doesn't affect on supply count of player who captures unit. For example Mind controlling Roach should increase supply usage by +2 but it does not.
I'm not sure does the game use this logic?
Controller = Player who commands the unit
Owner = Player who created the unit
I realized that when I train infested monsters from buildings mineral and vespene requirements are checked but for some reason supply count is not. Any idea how to fix this? (It seems that game is checking supply count of wrong player or ignoring it)
I'll explain again:
- Player 2 owns Infestable Command Center (as preplaced building)
- Player 1 infests it with colony infestation ability
- Player 1 tries to build units from infested building and something is wrong with supplies
Player 1 pays mineral and vespene cost of unit and amount of used supplies increase but game does not tell me to "Spawn more Overlords!" and I can have supply count like 30/18 and train more infested units.
@Terhonator: Go Have you tried using the Modifiy Unit effect type to actually give the command center to player 1? Then when a behavior expires you can give it back to the caster of that behavior.
This problem seems really odd to me, as whenever I've used colony infestation, it's automatically changed the owner to the casting player...
Edit: Also, in case you want something triggering related, you can use unit behavior changes. " Unit - Any Unit has Colony Infestation change Create"
Triggering unit will refer to the unit that obtained the behavior. I'm not sure if triggering player would refer to the caster or the owner of the unit that got the behavior. Perhaps some experimentation with this method might lead to a helpful solution.
@Terhonator: Go Yes, in your chain of effects you need to add one to change the owner. This way the structure will truly belong to the caster, then you can give it back to the original player when the behavior expires, by using a similar effect that gives ownership to the target of the ability.
Create 2 new modify unit effects, they will be very similar, but one will have caster while the other will have target with a specific effect set so the original owner can be found. In the chain of effects for your ability find the one that applies the behavior, if it is a Set type of effect you can simply add the first Modify Unit to it, if not you may need to create a Set effect to hold the Apply Behavior and Modifiy Unit effects.
I created "Change owner" effect (type "Modify unit") and added it to all effects of "Colony Infestation (Apply Behavior) but I think there is something wrong with my ability.
Here's a map with a simple target ability that used the apply colony infestation behavior (which is already in the game). Not sure why mine automatically changes ownership and yours doesn't.
@Terhonator: Go You didn't follow my instructions. The Modify Unit effect isn't supposed to go in the behavior, it should be created by the Create Persistent effect, right where it calls the Apply Behavior effect. I made my own tests and made it work. But I couldn't manage to give the building back to the original player once the behavior ends, unless it will always be the neutral player, so you may need to use triggers as MaskedImposter suggested to fix that.
@Terhonator: Go I'm glad I could help, this is a good mechanic for campaign missions. Maybe different structure types could spawn different unit types.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have done some editing on "Colony infestation" ability and at the moment I can use it to Colonist Huts and then train Infested units from building. Units trained from building are still owned by the player who controlled the (non-infested) hut. This causes problem with supplies because this increases supply count of wrong player. (Player1 infests Player2 hut and trains units -> supply usage of Player2 increases)
So, how can I modify the ability to give control (and ownership?) of the unit to player who infested the hut?
I think I need to modify ability so that it adds behavior AND change owner of unit. I need help with changing the owner part.
Neural Parasite ability may give some advice but I haven't found solution yet.
You can either use a Buff behaviour or a Modify Unit effect to change the ownership of a unit. With a behaviour it's as long as the behaviour remains on the unit. With an effect it's permanent.
OK. I have now upgraded Colony Infestation ability so that it can can add two or more effects / behaviors.
I'm trying to create new effect that only changes controller of the unit but I can't find fields that affect on controller / owner.
Can you help me to find these fields? There are many options under "Behavior - (Basic) Behavior: Modification +" but no player options.
- -
I did some testing on Hive Mind Emulator and noticed that it doesn't affect on supply count of player who captures unit. For example Mind controlling Roach should increase supply usage by +2 but it does not.
I'm not sure does the game use this logic?
Controller = Player who commands the unit
Owner = Player who created the unit
Hi. I'm returning to this data problem again.
I realized that when I train infested monsters from buildings mineral and vespene requirements are checked but for some reason supply count is not. Any idea how to fix this? (It seems that game is checking supply count of wrong player or ignoring it)
I'll explain again:
- Player 2 owns Infestable Command Center (as preplaced building)
- Player 1 infests it with colony infestation ability
- Player 1 tries to build units from infested building and something is wrong with supplies
Player 1 pays mineral and vespene cost of unit and amount of used supplies increase but game does not tell me to "Spawn more Overlords!" and I can have supply count like 30/18 and train more infested units.
Some progress:
I found out that I can change owner of behavior with field: (For behavior: Colony Infestation)
Behavior: Player + (None):Caster
I tested with all options but not the result I want.
It seems that game is checking supply amount of player2 instead of player1 when building units from infested building.
@Terhonator: Go Have you tried using the Modifiy Unit effect type to actually give the command center to player 1? Then when a behavior expires you can give it back to the caster of that behavior.
Do you mean that I create new effect and modify colony infestation ability so that it adds that new effect?
Can you help me to create that new effect and add it to the ability?
This problem seems really odd to me, as whenever I've used colony infestation, it's automatically changed the owner to the casting player...
Edit: Also, in case you want something triggering related, you can use unit behavior changes. " Unit - Any Unit has Colony Infestation change Create"
Triggering unit will refer to the unit that obtained the behavior. I'm not sure if triggering player would refer to the caster or the owner of the unit that got the behavior. Perhaps some experimentation with this method might lead to a helpful solution.
MaskedImposter do you have some map with that ability? I really like to inspect that.
@Terhonator: Go Yes, in your chain of effects you need to add one to change the owner. This way the structure will truly belong to the caster, then you can give it back to the original player when the behavior expires, by using a similar effect that gives ownership to the target of the ability.
Create 2 new modify unit effects, they will be very similar, but one will have caster while the other will have target with a specific effect set so the original owner can be found. In the chain of effects for your ability find the one that applies the behavior, if it is a Set type of effect you can simply add the first Modify Unit to it, if not you may need to create a Set effect to hold the Apply Behavior and Modifiy Unit effects.
I created "Change owner" effect (type "Modify unit") and added it to all effects of "Colony Infestation (Apply Behavior) but I think there is something wrong with my ability.
Test map added.
Here's a map with a simple target ability that used the apply colony infestation behavior (which is already in the game). Not sure why mine automatically changes ownership and yours doesn't.
@Terhonator: Go You didn't follow my instructions. The Modify Unit effect isn't supposed to go in the behavior, it should be created by the Create Persistent effect, right where it calls the Apply Behavior effect. I made my own tests and made it work. But I couldn't manage to give the building back to the original player once the behavior ends, unless it will always be the neutral player, so you may need to use triggers as MaskedImposter suggested to fix that.
@MaskedImposter: Go You didnt fix his issue.
@SoulFilcher: Go
Ah, I thought it was his building wasn't changing ownership, but its the units being trained from the building are on the wrong team. My bad.
Thank you SoulFilcher! Really nice to get help for very detailed problem.
It doesn't really matter if controller isn't changed when behavior ends since I'm going to keep it permanent effect.
Test map works fine. Now I'm going to recreate this for my mod. I'm going to use this as one of the key mechanics in my campaign.
SOLVED.
@Terhonator: Go I'm glad I could help, this is a good mechanic for campaign missions. Maybe different structure types could spawn different unit types.