Skip to content

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

Open
kaanalp28 wants to merge 1 commit intoTownyAdvanced:masterfrom
kaanalp28:public-spawn-default-max-fix
Open

Separate public town/nation spawn default and maximum cost configs.#8160
kaanalp28 wants to merge 1 commit intoTownyAdvanced:masterfrom
kaanalp28:public-spawn-default-max-fix

Conversation

@kaanalp28
Copy link
Copy Markdown

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
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.

1 participant