Skip to content

Separate public town/nation spawn default and maximum cost configs.#8160

Merged
LlmDl merged 2 commits into
TownyAdvanced:masterfrom
kaanalp28:public-spawn-default-max-fix
May 6, 2026
Merged

Separate public town/nation spawn default and maximum cost configs.#8160
LlmDl merged 2 commits into
TownyAdvanced:masterfrom
kaanalp28:public-spawn-default-max-fix

Conversation

@kaanalp28
Copy link
Copy Markdown
Contributor

Separated public town and nation spawn default and maximum cost handling, enabling the maximum spawn cost to be higher than the default, meaning that kings/mayors can now set the spawn cost higher than the default spawn cost set when the town is initially being created.

The variable "price_town_public_spawn_travel" in the config.yml sets BOTH the maximum price a town can set their spawn cost, and the default cost for newly made towns. This makes it so that all the towns made in the server have an absurdly high cost to travel to and often goes ignored by the mayors. The only way to combat this issue is to reduce the value, but that makes it impossible to set a cost higher than the default. This makes it so that specific towns (like ones that provides trading centers, malls, mob farms in exchange of money) don't have a way to intentionally increase the spawn cost to earn money for their services.

These changes divide it into two different variables for the default amount and the maximum amount, so all new towns have a reasonable price but can increase it if they want to...


New Nodes/Commands/ConfigOptions:

This PR consists of the creation of a new ConfigNode (ECO_PRICE_TOWN_SPAWN_TRAVEL_PUBLIC_MAXIMUM), and changes on the description of another ConfigNode (ECO_PRICE_TOWN_SPAWN_TRAVEL_PUBLIC_MAXIMUM). It also includes a few changes in some of the functions that use the affected ConfigNodes and implementation of one extra function (getMaximumSpawnTravelCost()) which is used in 2 different commands (NationCommand and TownCommand).


Relevant Towny Issue ticket:

Suggestion #8154 explains the reasons further, but this is mainly a QoL enhancement I wanted to see as a long-term Towny player.


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

…ing, enabling the maximum spawn cost to be higher than the default, meaning that kings/mayors can now set the spawn cost higher than the default spawn cost set when the town is initially being created.
@kaanalp28 kaanalp28 changed the title Separated public town and nation spawn default and maximum cost handl… Separate public town/nation spawn default and maximum cost configs. Apr 7, 2026
@LlmDl LlmDl added this to the 0.103.0.0 milestone Apr 26, 2026
@LlmDl LlmDl merged commit 9f1cf4b into TownyAdvanced:master May 6, 2026
1 check passed
LlmDl added a commit that referenced this pull request May 6, 2026
courtesy of kaanalp28 with PR #8160. (First-Time Contributor!)
  - New Config Option:
economy.spawn_travel.price_town_public_spawn_travel_maximum
    - Default: 10.0
    - Maximum cost to use /town spawn [town] that mayors can set using
/t set spawncost.
    - You can disable this setting by setting
price_allow_mayors_to_override_public_spawn_cost to false. This will use
the price_town_public_spawn_travel option to set a mandatory price.
  - Allow server owners to set a capital change cost, or for other
plugins to modify it, courtesy of Veyronity with PR #8166.
    - Configurable cost and NationKingChangeEvent#setCost now available.
  - New Config Option: economy.nation_capital_change_cost
    - Default: 0
    - The cost of a nation changing its capital
  - Fix unclaiming near to outposts while min_adjacent_claims feature is
in use.
    - Closes #7891.
  - Fix gradients not working when parsed through
resident.formattedName().
  - Fix incorrect color for overclaimed upkeep, courtesy of SulkyWhale
with PR #8173.
  - Fix spacing for perm line after changing perms, courtesy of
SulkyWhale with PR #8174.
  - Add config option to ingore ruined town in claiming distance check
rules, courtesy of HydrolienF with PR #8178. (First-Time Contributor!)
  - New Config Option:
claiming.distance_rules.min_distances_ignored_for_ruined_towns
    - Default: false
    - If true, the below settings: min_plot_distance_from_town_plot and
min_distance_from_town_homeblock
      will be ignored for towns that are ruined. Setting to false will
keep all towns separated the same.
  - Bump net.coreprotect:coreprotect from 23.1 to 23.2.
  - Add a config option to allow dispensers damaging protected entities
in PvP plots, courtesy of Veyronity with PR #8180.
  - New Config Option:
protection.are_mob_types_protected_against_block_projectile_sources
    - Default: true
    - Setting this to false will allow block projectile sources, namely
dispensers, to harm the above protected
      mobs (using potions, arrows, etc.), if they're in the same
townblock and PvP is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants