Can't attack garrisoned unit FIXED

Issues in the game itself, so no crash report but anything that works badly / or other way it should- but without a crash.
Post Reply
User avatar
b2198
Posts: 798
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Can't attack garrisoned unit FIXED

Post by b2198 »

So, I'm playing a 4 player FFA match where 2 of the players were kicked (due to being afk for a week or maybe more), and I'm advancing against the remaining player, and in that match I encountered this situation:
Image

Where I just can't attack what's inside the TC, even in the following turn:
Image

My opponent can't make peasants yet (due to research), didn't have a priory, monastery, roman garrison nor any mines, so I don't think it's related to that random unit bug, and that TC got empty a few turns ago after a builder was produced in it, so I have no clue on what could be happening here...
Green is the correct color, other colors are "less correct".
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Can't attack garrisoned unit

Post by Endru1241 »

I encountered the same with map editor unit (couldn't target enemy inside tc) - precisely trainee 2attack - and other 2 units in range didn't have any problems with targeting.
So I was trying to crack why this particular unit cannot attack.
Definitely nothing different with valid targets.
None of AoS units should have any limitations on what they can target (I only used valid targets field for effect applied property changer action jsons), so it's not very unexpected.
But I checked if maybe something could explain the difference.
I haven't found any differences in json.

So something with unit state in game must be the reason.
But I have no idea what.
It's best to find some way this bug could be replicated, because otherwise I have no idea if it could be fixed.
Age of Strategy design leader
User avatar
godOfKings
Posts: 3302
Joined: Fri Sep 22, 2017 4:50 pm

Re: Can't attack garrisoned unit

Post by godOfKings »

U can use a spy to search inside the tc and figure out the problem
There is no place for false kings here, only those who proves themselves to b the true kings of legend, or serves under me

For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Can't attack garrisoned unit

Post by Endru1241 »

godOfKings wrote: Fri Jan 28, 2022 8:47 am U can use a spy to search inside the tc and figure out the problem
But the problem occurs with the same unit inside TC only for one my units.
I'll try to create situation as identical as possible in map editor, but I am afraid it may be not related to what unit is inside, as two units - one capable of attacking and one not have identical valid targets (none specified, so all normal targets) and specs.
Age of Strategy design leader
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Can't attack garrisoned unit

Post by phoenixffyrnig »

Cracked it. It's a stealth unit in the first slot. ie, we are seeing the TC is occupied, but not being able to see the unit to target it

https://ibb.co/QQWPgZs

In these TCs i put a spy, assassin, ranger and ninja inside. Curiously, as an experiment, I put a spearman in the second and fourth TCs behind the stealth unit (the pictured scenario), and it still wouldn't allow any targeting.
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Can't attack garrisoned unit

Post by phoenixffyrnig »

In fact, further testing shows a mêlée unit adjacent to a TC with a stealth unit in first slot cannot attack either, even though in open play this would reveal the stealth unit.

In other words, what an effective way of defending your TCs... who'd have thought a one turn spy could hold back an army :lol:
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Can't attack garrisoned unit

Post by phoenixffyrnig »

But it seems that abilities (tested with Cretin archer) can target the stealth unit, so it's not a totally impossible situation to work around until fixed.

They also receive area damage for attacks focused on adjacent tile, so it seems purely to do with them not being registered as a valid target for actions
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
b2198
Posts: 798
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Re: Can't attack garrisoned unit

Post by b2198 »

Oh, nice finding phoenix, I'll try that.
Green is the correct color, other colors are "less correct".
User avatar
godOfKings
Posts: 3302
Joined: Fri Sep 22, 2017 4:50 pm

Re: Can't attack garrisoned unit

Post by godOfKings »

Wat if there is enemy scout unit near tc? Will stealth unit still stay invisible and impossible to target inside tc?
There is no place for false kings here, only those who proves themselves to b the true kings of legend, or serves under me

For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Can't attack garrisoned unit

Post by phoenixffyrnig »

Nah, that makes no difference. I guess it needs a unit with the "sees into carriers" tag (or what used to be, it's now "lurks carriers" which isn't correct - to lurk is to hang around in a way that isn't completely hidden but isn't totally obvious either).
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Can't attack garrisoned unit

Post by Endru1241 »

phoenixffyrnig wrote: Fri Jan 28, 2022 12:24 pm But it seems that abilities (tested with Cretin archer) can target the stealth unit, so it's not a totally impossible situation to work around until fixed.

They also receive area damage for attacks focused on adjacent tile, so it seems purely to do with them not being registered as a valid target for actions
Don't be so harsh towards this poor guy.

Endru1241 wrote: Fri Jan 28, 2022 6:19 am I encountered the same with map editor unit (couldn't target enemy inside tc) - precisely trainee 2attack - and other 2 units in range didn't have any problems with targeting.
So I was trying to crack why this particular unit cannot attack.
Definitely nothing different with valid targets.
None of AoS units should have any limitations on what they can target (I only used valid targets field for effect applied property changer action jsons), so it's not very unexpected.
But I checked if maybe something could explain the difference.
I haven't found any differences in json.

So something with unit state in game must be the reason.
But I have no idea what.
It's best to find some way this bug could be replicated, because otherwise I have no idea if it could be fixed.
Endru1241 wrote: Fri Jan 28, 2022 10:39 am
godOfKings wrote: Fri Jan 28, 2022 8:47 am U can use a spy to search inside the tc and figure out the problem
But the problem occurs with the same unit inside TC only for one my units.
I'll try to create situation as identical as possible in map editor, but I am afraid it may be not related to what unit is inside, as two units - one capable of attacking and one not have identical valid targets (none specified, so all normal targets) and specs.
My mistake - what I experienced was leftovers from my own tests and actually was all in unit jsons.
phoenixffyrnig wrote: Fri Jan 28, 2022 11:47 am Cracked it. It's a stealth unit in the first slot. ie, we are seeing the TC is occupied, but not being able to see the unit to target it

https://ibb.co/QQWPgZs

In these TCs i put a spy, assassin, ranger and ninja inside. Curiously, as an experiment, I put a spearman in the second and fourth TCs behind the stealth unit (the pictured scenario), and it still wouldn't allow any targeting.
Great find.
We now know what to look for to fix it.
Age of Strategy design leader
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Can't attack garrisoned unit

Post by phoenixffyrnig »

Don't be so harsh towards this poor guy.
Haha, 10 points to Endru Eagle-eye. Auto-correct decided to go for the word I used the most, I decided to leave it that way to see if anyone would clock it... Of course he did! :)
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Can't attack garrisoned unit

Post by Stratego (dev) »

i have a possible fix on this.

earlier there was a report from AOW/AOMW that a plane on a bridge can not be targeted by AA guns and such problems.
so i made that the unit that is carried should only be checked by "targetability" but this affected TC-s too.

so now i made that change to work only for bridges nothing else (TC, vikingship and so on)

uos already
Post Reply

Return to “Game”