Sign in to follow this  
Mthec

[FINAL] Upkeep Costs

Recommended Posts

22 hours ago, CCSLider said:

*snip*

Many thanks for the feedback.

 

The problem was partly to do with the limited testing I'd done, and partly to do with me not fully understanding the draining mechanics.  Doesn't help that the server I was testing with didn't have PvP turned on so I didn't see the extra part of the message in your screenshot on my end.  Sorry about that.

 

Should all be working now.  The bolded message is triggered when the money left in upkeep falls below 3s, since I couldn't work out why it was set at that value I changed the message to "soon" and it now triggers when the the upkeep falls below 5 times the current drain value.  I could probably change it to take more values into account, but it could get complicated with the changeable values and ongoing upkeep, etc.  If anyone has a better suggestion let me know.

 

Update

min_drain option wasn't being used properly.

 

Download

Share this post


Link to post
Share on other sites

Thanks for the quick response and fix. Everything is working as I believe it is suppose to. I have the min set to 2 copper for drain and my drain for a deed that costs (1 silver 53 copper 13 iron) is now 19 copper and 99 iron for drain. My deed has 2 silver 53 copper and 13 iron in the bank.  I have not had any feed back from players with smaller deeds I am hoping they are hit with the 2 copper min as their deeds would be smaller. Mine is at 19.99 copper I am assuming because of the amount I have in bank and cost of upkeep. Will update when I find out. Once again Thanks for a great Mod and the quick response.

 

This is my setup if any one is interested:

classname=mod.wurmonline.mods.upkeepcosts.UpkeepCosts
classpath=upkeepcosts.jar

# Upkeep costs - in irons
# Costs per deeded tile
tile_cost=10
tile_upkeep=1
# Costs per perimeter tile
perimeter_cost=5
perimeter_upkeep=1
# Minimum value for upkeep
minimum_upkeep=100
# Extra money added to the founding charge that goes into upkeep
into_upkeep=300
# Cost for changing deed name during Resize
name_change=50

# Values vary depending on server type:
# Normal
# Epic/Challenge
normal_guard_cost=200
normal_guard_upkeep=100
epic_guard_cost=300
epic_guard_upkeep=300

# Number of free tiles
free_tiles=0
# Number of free perimeter tiles
# The 5 minimum "layers" are always free
free_perimeter=0

# Minimum amount drained
min_drain=200
# When draining a deed the amount drained increases with every drain.  This sets the maximum this increase can reach. (decimal)
max_drain_modifier=2.0
#The amount the drain modifier increases with every successful drain. (decimal)
drain_modifier_increment=0.5

Edited by CCSLider

Share this post


Link to post
Share on other sites

Confession time...

 

When I added the free_tiles and free_perimeter options I messed up the upkeep calculation, as a result deeds have effectively been operating as if upkeep was 1i per tile.  I found it while looking over the code just after the last update, and it was one of those things where I have no idea how I made the mistake.  I'm very sorry if this has caused anyone any issues, knowingly or unknowingly.

 

I have created what I hope is a fixed version.  I have also finally gotten around to working on some proper tests.  It's still early days, which is why I'm not 100% certain the mod is error free, but I have verified that the problem I found has been fixed and I will continue to work on more tests.  The initial tile costs during founding won't have been affected.

 

Update

 

Download

  • Like 1

Share this post


Link to post
Share on other sites

Sorry it has been a while, but I've been busy.  In the end I didn't really find anything else that seemed to be working incorrectly, but feel free to prove me wrong.  I did find an edge case where the Kings Shop (something related to trader funds I think) wasn't being updated.  Since it only happened on a 0 upkeep interval it probably had no effect, but I fixed it just in case.

 

I've also added an extra message, following Eject's suggestion a while ago, to the low upkeep warnings regarding free tiles and perimeter.  It will only show up if you have those options set to something other than 0.

 

Update

 

Download

  • Like 1

Share this post


Link to post
Share on other sites

I have tried to configure this every which way, but I'm still stuck with the vanilla upkeep settings for my Creative server with enabled Epic settings.  In the server configuration, I have Free deeds checked, as well as Settlement upkeep enabled.  My goal is to make it free for players to deed, then monthly upkeep costs set to 10i per tile, and Epic spirit templars set to 1s.  I think I set the variables correctly (see below) but I'm still getting 20i per tile upkeep and 3s per templar.  All of my other mods required setting the data, updating the database, then restarting the server.  But when I do that with this mod, nothing is changing. Can anyone tell me why?  Help would be much appreciated!  I am not a techie and I barely understand this stuff at all.  

 

The upkeepcosts folder with the jar file is in server/mods, and the properties file is loose in the server/mods folder.  I'm running the server via a server host, so I'm unable to move any files around without their help. I'm hoping these are the correct spots for the folder and properties file to be?

 

Here are the settings I used:

 

classname=mod.wurmonline.mods.upkeepcosts.UpkeepCosts
classpath=upkeepcosts.jar

# Upkeep costs - in irons
# Costs per deeded tile
tile_cost=0
tile_upkeep=10
# Costs per perimeter tile
perimeter_cost=500
perimeter_upkeep=50
# Minimum value for upkeep
minimum_upkeep=10000
# Extra money added to the founding charge that goes into upkeep
into_upkeep=30000
# Cost for changing deed name during Resize
name_change=50000

# Values vary depending on server type:
# Normal
# Epic/Challenge
normal_guard_cost=20000
normal_guard_upkeep=10000
epic_guard_cost=0
epic_guard_upkeep=10000

# Number of free tiles
free_tiles=0
# Number of free perimeter tiles
# The 5 minimum "layers" are always free
free_perimeter=0

 

 

 

 

Edited by Batta

Share this post


Link to post
Share on other sites

The Upkeep mod while loading is not taking the settings from the Properties file.  It seems to be loading the default values.  none of the values are changed. I have no other mods running and I don't see any errors in the console.

Upkeep costs are as follows: Tile 1 copper, 20 iron, 0 free tiles - Perimeter 50 iron, 5 iron, 0 free tiles - Guards 2 silver, 1 silver - Minimum 50 copper - Into Upkeep 1 silver and 50 copper - Name change 5 silver
Draining values are as follows: Minimum drain 75 copper, Maximum drain modifier 5.0, Drain modifier increment 0.5
 

I have No deeding costs checked and Settlement Upkeep checked on the server.

Here is the values in my properties file:

 

classname=mod.wurmonline.mods.upkeepcosts.UpkeepCosts
classpath=upkeepcosts.jar

# Upkeep costs - in irons
# Costs per deeded tile
tile_cost=20
tile_upkeep=5
# Costs per perimeter tile
perimeter_cost=50
perimeter_upkeep=5
# Minimum value for upkeep
minimum_upkeep=500
# Extra money added to the founding charge that goes into upkeep
into_upkeep=1500
# Cost for changing deed name during Resize
name_change=5000

# Values vary depending on server type:
# Normal
# Epic/Challenge
normal_guard_cost=10000
normal_guard_upkeep=10000
epic_guard_cost=30000
epic_guard_upkeep=30000

# Number of free tiles
free_tiles=0
# Number of free perimeter tiles
# The 5 minimum "layers" are always free
free_perimeter=0

# Minimum amount drained
min_drain=500
# When draining a deed the amount drained increases with every drain.  This sets the maximum this increase can reach. (decimal)
max_drain_modifier=5.0
#The amount the drain modifier increases with every successful drain. (decimal)
drain_modifier_increment=0.5

Share this post


Link to post
Share on other sites

Running a different Map on the same server the values from the Parameters do work.

Share this post


Link to post
Share on other sites

Out of curiosity, since it appears to have been a good while since there was activity with this mod.

Is it still supported?

 

Right now I've had to disable it entirely on my server as it's causing errors with the modloader and the server won't boot with it.

I'd like to know if there is hope to have this fixed? :P

  • Like 1

Share this post


Link to post
Share on other sites

im running it fine

scratch that, thought this was tax config for some reason

Edited by Aum

Share this post


Link to post
Share on other sites

I can get the server to run with it enabled but it makes half the mods on the server not work. This is a mod I've run since we launched. :(

Share this post


Link to post
Share on other sites

Sorry everyone.

 

It has been a while since I was modding.  However I have taken a look and think I have updated it to work with the latest version.  Just let me know if you have any problems.

 

Update

Download

  • Like 2

Share this post


Link to post
Share on other sites

I moved this to my test server and it will boot just fine now with the mod enabled. I however don't have deed upkeep enabled on the test server so since it started fine at least, and I see no errors kicked in the console I will move the update to my production server tomorrow morning during our weekly maintenance and report back.

 

We really count on this mod so thank-you so much @Mthecfor taking the time to give this some love!

 

\o/

Share this post


Link to post
Share on other sites
On 7/16/2017 at 1:16 PM, LifesaverM said:

I moved this to my test server and it will boot just fine now with the mod enabled. I however don't have deed upkeep enabled on the test server so since it started fine at least, and I see no errors kicked in the console I will move the update to my production server tomorrow morning during our weekly maintenance and report back.

 

We really count on this mod so thank-you so much @Mthecfor taking the time to give this some love!

 

\o/

Is this mod still functional?

Share this post


Link to post
Share on other sites

Hi, I want to setup my server to have no upkeep, I've set the free tiles to 441 tiles or 10x10x10x10 using the upkeepcost mod and want to make them pay for guards and new tiles.

 

Problem is when they make a default (5x5x5x5 with no guards) it puts 13s 20c into the coffers so they can buy guards until the coffers are empty and because deed upkeep is turned off they cant put any more money into the settlement. If they resize the deed, no money is taken from the coffers nor is it charging for any new tiles over the initial 441 granted in the config.

 

If they make a deed at 10x10x10x10 no money is put into the coffers and again as upkeep is not enabled they can not purchase any guards at all. They can resize the deed without paying for any tiles.

 

all I want is to give players 441 tiles free and a guard or two if possible and then they must pay for new tiles and guards after that with no upkeep. Why is that so hard lol

Edited by Darkness1990

Share this post


Link to post
Share on other sites
7 hours ago, Darkness1990 said:

all I want is to give players 441 tiles free and a guard or two if possible and then they must pay for new tiles and guards after that with no upkeep. Why is that so hard lol

 

A lot of GMs just give new players coins to make something like this happen.  An alternative might be to create alts to deed areas at 441 tiles, then trade the settlement deeds to new players who want the spots.

Share this post


Link to post
Share on other sites
8 hours ago, Batta said:

 

A lot of GMs just give new players coins to make something like this happen.  An alternative might be to create alts to deed areas at 441 tiles, then trade the settlement deeds to new players who want the spots.

yeah but the problem with giving players coin when they join, they can make alts and abuse the system. also I cant be online 24-7 to give players deeds

Edited by Darkness1990

Share this post


Link to post
Share on other sites

I've also found that if I turn upkeep off and set the free tiles to 121 they can expand the deed bigger then the amount set for free in the mod, like its giving them extra tiles on top of the 121 I've set in the mod and once they go past that amount it starts to charge them for tiles.

Edited by Darkness1990

Share this post


Link to post
Share on other sites

@MthecI've found a big problem with the mod, If I set the free tiles to 121, it gives players 121 free tiles every time they resize the deed.

 

For example they make a deed 5x5x5x5 or 11x11 (121 tiles) then they resize to 7x7x7x7 or 15x15 (225 tiles) because the tile difference is only 104 tiles its applying the 121 for free every time.

so they just keep expanding under 121 tiles to exploit the system and get tiles for free. 

 

settings

 

# Upkeep costs - in irons
# Costs per deeded tile
tile_cost=100
tile_upkeep=0
# Costs per perimeter tile
perimeter_cost=50
perimeter_upkeep=5
# Minimum value for upkeep
minimum_upkeep=0
# Extra money added to the founding charge that goes into upkeep
into_upkeep=0
# Cost for changing deed name during Resize
name_change=5000

# Values vary depending on server type:
# Normal
# Epic/Challenge
normal_guard_cost=10000
normal_guard_upkeep=0
epic_guard_cost=20000
epic_guard_upkeep=0

# Number of free tiles
free_tiles=121
# Number of free perimeter tiles
# The 5 minimum "layers" are always free
free_perimeter=0

# Minimum amount drained
min_drain=7500
# When draining a deed the amount drained increases with every drain.  This sets the maximum this increase can reach. (decimal)
max_drain_modifier=5.0
#The amount the drain modifier increases with every successful drain. (decimal)
drain_modifier_increment=0.5

Edited by Darkness1990

Share this post


Link to post
Share on other sites

RESOLVED: I hadn't understood that making a 2nd copy of the mod wasn't optional. Here's where they worked:

 

1. Wurm Unlimited Dedicated Server/mods/upkeep costs, but with the properties file separate and up one level, in /mods but NOT in the upkeep costs folder.  In other words, the same as for any other mod.

 

2. I had to make a new folder called "mods" in my Creative server folder, then put the second copy here:

Wurm Unlimited Dedicated Server/Creative/mods/upkeep costs, but with the properties file separate and up one level, in /mods but not in the upkeep costs folder.

 

With just the first copy in the regular mods folder, the mod didn't work. Same with just the second copy.  It took both of them to make anything happen.

 

I hope this is helpful to someone else who is stuck like I was for so long!

 

Edited by Batta

Share this post


Link to post
Share on other sites

Sorry all, I thought I had finally sorted the forums email notifications.  I have been out of the world of modding for a while now, and have not visited the forums in just as long, so sorry for the late response.

 

On 10/30/2018 at 1:51 AM, Batta said:

RESOLVED

That is strange, I didn't need a second copy when testing earlier and the per server upkeepcosts.properties file should be create automatically.  Oh well, glad you got it sorted anyway.

On 9/11/2018 at 7:31 AM, Darkness1990 said:

@MthecI've found a big problem with the mod, If I set the free tiles to 121, it gives players 121 free tiles every time they resize the deed.

Whoops, that's rather a big oversight.  Very sorry.  New version should fix that problem. @Darkness1990

 

Update

Exploit fix, plus some odds and ends from Wurm Unlimited updates.

Download

  • Like 1

Share this post


Link to post
Share on other sites

Quick question: do the default settings in the properties file mimic a vanilla setup?

Share this post


Link to post
Share on other sites
9 hours ago, Ignacius said:

Quick question: do the default settings in the properties file mimic a vanilla setup?

Yes, that is correct.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this