There are severala lot of issues with the town bell. For example:
- If the civic center associated with an alertan alert raiser is destroyed, there's no way to unring thatthe bell, so units don't respond to new bells.
- #4185 "Unit does not react to alert when ungarrisoned while alerted". (Often when the danger has passed in one area you'll ungarrison some women to go back to work,- #4656: "When a building is captured the alert is not reset. butSo then the next time you hit the town bell they won't respond.) new owner still have its building under alert."
- If units are garrisoned before ringing the bell, they aren't included in the alert so they have to be tasked back to work manually. (Often when being raided you'll garrison some women in houses at the edge of your base before ringing the bell later when the attack becomes larger. It's very easy to forget about those women for the rest of the game, and it would be nice if they returned to work at the same time as the other garrisoned units.)
- #4457 "When the bell is rung- D690: "When an alertRaiser is captured, units ejected from a destroyed building should garrison in another".
This patch should fix those issues. Here's the new expected behavior:its units under alert should not be controllable by the enemy."
- If units are garrisoned before ringing the bell, # Ifthey aren't included in the town bell is rung,alert so they have to be tasked back to work manually. all units in the area will be put under alert and try to garrison in nearby buildings(Often when being raided you'll garrison some women in houses at the edge of your base before ringing the bell later when the attack becomes larger. Units currently garrisoned will stay garrisonedIt's very easy to forget about those women for the rest of the game, butand it would be nice if they'll also be put under alert. returned to work at the same time as the other garrisoned units.)
- #4185: "Unit does not react to alert when ungarrisoned while alerted". (Often when the danger has passed in one area you'll ungarrison some women to go back to work, # Newly created units will be put under alert and try to garrison.but then the next time you hit the town bell they won't respond.)
#- If a building is captured or destroyedmore units come into the area (or units are promoted), ejected units will tryto put them under alert you have to find a new building to garrison insideunring the bell then ring it again.
- If units are redirected before they garrison, # Howeversay to build something, if units are ejected manuwhen the bell is unrung they'll resume their previous orders rather than continuing to build.
Basically, they won't look for another building. It's assumed that you've ungarrisoned them for another reason.it's very messy.
causative had a nice [[https://wildfiregames.com/forum/index.php?/topic/22585-town-bell-alert-improvements/&tab=comments#comment-333555 | idea]]:
# If units are told to go back to work manually that's a signal that the danger has passed, so their alert will be removed and they'll stop what they're doing and return to their previous work (if they had any).```
No alert status on units! This would greatly simplify the implementation and prevent bugs. Just two bells, "alert" and "safe," that you can ring at any time. When the "alert" bell is rung, all women in range try to garrison, and remember their previous task. If a woman is working and you select her and tell her to garrison or move (without using the bell), she will also remember her previous task. When the "safe" bell is rung, # If the bell is unrungall women in range that are garrisoned (or garrisoning, then the alert will be removed from every unit and they'll each stop what they're doing and return to their previous work.walking, Units garrisoned inside buildingsor idle) will ungarrison and return to their previous work.task, Units garrisoned inside units will stay there.like the back to work command.
```
In this patch I've removed the alert status on units and production buildings. When you ring the bell, # If the civic center is capturedunits will try to garrison in a building (or move to the cc if they're all full or destroyed,will be full). the alert will be removed from every unit (so they can respond to another cc's townWhen you unring the bell), but since the danger hasn't passed they'll keep their current orders.units will ungarrison and go back to work, Garrisoned units will stayor stop and go back to work if they haven't garrisoned yet.
Things not affected (either bad ideas or too much work):
- Units that enter the range after the town bell and units created from production buildings that were created after the bell. Neither will be under alert.
- Newly promoted units (from "expertise of war", for example). Like new units to the area, they won't be under alert.In another patch I'll do the following:
- Garrisoning in units (siege, ships) rather than only buildings. I tried this but it's a mess when that unit's moving or trying to garrison too.- Allow garrisoning in allied buildings
- Units garrisoned inside units that are garrisoned inside a building/unit. They won't be under alert; this was too much recursion to bother with.- Replace the alert level with matching classes
- Garrisoning in allied buildings near your civic center. This might be nice, but it seemed like too much work for something rarely encountered in a game.- Add a bell at the market for trade carts
- Allied units near your town center. It seems wrong to control an ally's units this way (although you can transport and ungarrison them currently).- Change the GUI to always display two buttons: alert (garrison) and safe (back to work)
- Probably other things I've considered but can't think of at the moment.- Possibly hotkeys
Let me know what you think. This isn't perfect but hopefully it's a big improvement over the status quoI've also incorporated Stan's cleanup from D403.