Please explain your feature request to the best of your abilities:
Overclaim shield
Add a toggleable upkeep option that would coincide with overclaim, acting as a "shield" to compensate for towns being over their limit. It would be dependent on how many townblocks a town is over its limit, and charge a proportional upkeep cost. This would allow towns to remain immune from takeoverclaim by another town, as long as they successfully pay the upkeep from last new day.
Disclaimer: All config variable and parameter names are a figment of my imagination, as they may be atrocious to the common developer’s eyes
The difference from normal upkeep
This option is different from the existing overclaim upkeep, which has a static cost. It introduces overclaimshield.upkeep.amount and overclaimshield.upkeep.blocks, which are proportional to each other. If upkeep.amount is set to 3, and upkeep.blocks is set to 8, then the price would be 3 money for every 8 townblocks over the town's limit.
For example: If a town is at 100/88 townblocks, they’d pay 6 money (3 money/8 townblocks = 6 money cost for 12 townblocks) a towny day. With upkeep.amount set to 1, they would only have to pay 2 money (for being charged 1 * 2 units of upkeep).
The current upkeep also deletes towns entirely if the upkeep penalty is not paid, which is incompatible with a less harsh approach of mitigating claim size dependent on the demand for the claimed area. A potential concern: Mayors of towns that are over their limit may have enough resources to maintain significant amounts of land using the shield feature. In this case (different from traditional static upkeep) servers can use the amount and block variables to configure an ideal "price per townblocks" for their server. This allows for flexibility between how much a server wants its mayors to recruit residents, and how much to pay regularly in alternative to prevent overclaim.
Usage
It would add a command for mayors /t toggle overclaimshield. Mayors would be prompted with a message on how much overclaim shield costs (showcasing how many upkeep.blocks per upkeep.amount) along with the calculated price for their town at that moment. After they choose to toggle, their town is slated to be charged for overclaim shield at however much their limit is over by once the next new day happens. After the new day, their town gets an overclaim-protected badge in their status screen. They would continue to make the appropriate payments every new day unless they toggle off.
In the event of the town having insufficient money at new day, their overclaim shield will be disabled. Mayors could have the following warning message presented to them on log-in/vault withdrawal/resident removal as a warning:
WARNING: Your town will lose its overclaim shield the next new day due to lack of money in your vault. You need [calculated money amount] in your town vault for protecting [chunks over limit] over your limit before the next new day. You currently have [money in vault].
Potential ways about implementation
I don't know which way would be easier, but this could be added through one of two following ways:
Have [TakeoverClaim Available] still present on ChunkNotification, however just send an error message informing user that the town has overclaim shield active, preventing overclaim.
Rework overclaim so that [TakeoverClaim Available] is not shown to players at all if the town has overclaim-protected flag (this is probably the better option)
Summarization of changes
New Config Option: towny.command.town.toggle.overclaimshield
New Command: /t toggle overclaimshield
Set to off by default, used by a mayor to enable shield against overclaim, giving it immunity to overclaim
New Config Option: economy.overclaimshield.upkeep.amount
Set to 1 by default, the unit amount of upkeep paid every towny day to maintain overclaim shield status (ex: # money for every # overclaimshield.upkeep.blocks)
New Config Option: economy.overclaimshield.upkeep.blocks
Set to 1 by default, the amount of blocks over town limit that would incur a unit of upkeep (ex: # blocks for each # overclaimshield.upkeep.amount)
Math for upkeep.blocks and upkeep.amount (proportional equation)
New Warning Message(s)
Inform mayors/councillors on log-in if their town vault is below the amount needed to pay their overclaim shield upkeep
Inform mayors/councillors on town vault withdrawal if they go below the amount needed to pay their overclaim shield upkeep
Inform mayors/councillors on resident leaving their town if they go below the amount needed to pay their overclaim shield upkeep
Boolean for whether a town has paid on the last new day
Default: false
Upon town paying at new day, set to true
If set to true, apply overclaim-protected status
Upon town failing to pay at new day, set to false
If set to false, remove overclaim-protected status
Flag in /t status screen showing Overclaim Protection status (Similar to Open & Public)
Mentioned this on discord but also leaving it here for the record:
The overclaim upkeep is not always a flat rate, there is a economy.daily_taxes.price_town_overclaimed_upkeep_penalty_plotbased setting which makes it plot based.
Knowing that we're already dealing a per-plot-overclaimed-by amount, adding another system of money-based penalty using a new formula (ie: 3/8 = 6 x 12) doesn't make a lot of sense.
Finally, if a town cannot pay their upkeep (which includes any upkeep penalties,) they are deleted. This means that a town which is overclaimed and rich will not be affected by overclaiming. Which leads into the "rules for thee but not for me" where the server's rich towns don't have to worry about overclaiming (which makes the overclaiming system optional.)
Please explain your feature request to the best of your abilities:
Overclaim shield
Add a toggleable upkeep option that would coincide with overclaim, acting as a "shield" to compensate for towns being over their limit. It would be dependent on how many townblocks a town is over its limit, and charge a proportional upkeep cost. This would allow towns to remain immune from takeoverclaim by another town, as long as they successfully pay the upkeep from last new day.
Disclaimer: All config variable and parameter names are a figment of my imagination, as they may be atrocious to the common developer’s eyes
The difference from normal upkeep
This option is different from the existing overclaim upkeep, which has a static cost. It introduces
overclaimshield.upkeep.amount
andoverclaimshield.upkeep.blocks
, which are proportional to each other. Ifupkeep.amount
is set to 3, andupkeep.blocks
is set to 8, then the price would be 3 money for every 8 townblocks over the town's limit.For example: If a town is at 100/88 townblocks, they’d pay 6 money (3 money/8 townblocks = 6 money cost for 12 townblocks) a towny day. With
upkeep.amount
set to 1, they would only have to pay 2 money (for being charged 1 * 2 units of upkeep).The current upkeep also deletes towns entirely if the upkeep penalty is not paid, which is incompatible with a less harsh approach of mitigating claim size dependent on the demand for the claimed area. A potential concern: Mayors of towns that are over their limit may have enough resources to maintain significant amounts of land using the shield feature. In this case (different from traditional static upkeep) servers can use the amount and block variables to configure an ideal "price per townblocks" for their server. This allows for flexibility between how much a server wants its mayors to recruit residents, and how much to pay regularly in alternative to prevent overclaim.
Usage
It would add a command for mayors
/t toggle overclaimshield
. Mayors would be prompted with a message on how much overclaim shield costs (showcasing how manyupkeep.blocks
perupkeep.amount
) along with the calculated price for their town at that moment. After they choose to toggle, their town is slated to be charged for overclaim shield at however much their limit is over by once the next new day happens. After the new day, their town gets an overclaim-protected badge in their status screen. They would continue to make the appropriate payments every new day unless they toggle off.In the event of the town having insufficient money at new day, their overclaim shield will be disabled. Mayors could have the following warning message presented to them on log-in/vault withdrawal/resident removal as a warning:
WARNING: Your town will lose its overclaim shield the next new day due to lack of money in your vault. You need [calculated money amount] in your town vault for protecting [chunks over limit] over your limit before the next new day. You currently have [money in vault].
Potential ways about implementation
I don't know which way would be easier, but this could be added through one of two following ways:
Have [TakeoverClaim Available] still present on ChunkNotification, however just send an error message informing user that the town has overclaim shield active, preventing overclaim.
Rework overclaim so that [TakeoverClaim Available] is not shown to players at all if the town has overclaim-protected flag (this is probably the better option)
Summarization of changes
towny.command.town.toggle.overclaimshield
/t toggle overclaimshield
economy.overclaimshield.upkeep.amount
overclaimshield.upkeep.blocks
)economy.overclaimshield.upkeep.blocks
overclaimshield.upkeep.amount
)upkeep.blocks
andupkeep.amount
(proportional equation)