Sign in to follow this  
GenSekiel

[RELEASED] Accelerated Forestry & Gardening (& Farming) 1.2

Recommended Posts

Accelerated Forestry & Gardening (& Farming) Server Mod for Wurm Unlimited

 

This mod allows to speed up the growth of trees, bushes, fruit (and other harvestables), hedges, grass, kelp, reed, flowers, trellises, herb planters, fields and to refresh foraging and botanizing for tiles that allow it.

 

Every action to start a task consumes a certain amount of a watering or fertilizing item. After the action is performed, a certain time span is required for the task to be performed. After the task has been finished, another task can be started for that tile/object. While there can exist only one task for a particular tile/object at a time, the number of simultaneous tasks for different tiles/objects is potentially infinite. The default items for watering and fertilizing are water and ash, respectively.

 

Possible tasks are (if enabled, actions use and increase either the forestry or gardening skill; the skill governing an action is indicated in parentheses):

  • Make trees and bushes grow by watering them. (forestry)
  • Make hedges grow by watering them. (gardening)
  • Have trees and bushes grow fruit (or other harvestables) out of season by fertilizing them. (forestry)
  • Increase the grass height on grass and tree tiles by watering the ground. (gardening)
  • Grow (random) flowers on a grass tile by watering it when at maximum height. In contrast to conventional flower growth, all flowers have the same probability. (gardening)
  • Make kelp and reed grow by fertilizing them. Note that there is no visual indicator of height for these tiles. (gardening)
  • Refresh the ability to forage and/or botanize tiles that allow it by fertilizing them. (gardening)
  • Make trellises grow by watering them. (gardening)
  • Make (planted) trellises (except ivy) harvestable out of season by fertilizing them. (gardening)
  • Make herb planters age faster by watering them to reach the age at which they can be harvested. (gardening)
  • Make herb planters harvestable by fertilizing them when at the right age. (gardening)
  • Make fields grow by watering them. (farming)
  • Make underwater fields grow by fertilizing them. (farming)

 

Almost every aspect can be modified via the configuration file.

  • Time required by tasks and polling interval (see below).
  • Cost, time and item required for actions.
  • Influence of skill, item quality and age on task time, action time and action cost.
  • Failure chances and random time variations, optionally influenced by skill level and item quality.

 

Other options are:

  • Block certain actions or tile/object types.
  • Show status on examine if a task is enqueued for the examined tile/object.
  • Enforce a cool down time for an object or tile after a task has been finished.
  • Continuous growth until some age or height limit is reached (conventional step-wise growth after that).
  • Age limit for trees and bushes.
  • Gain skill for performing actions.
  • Persistent task list when shutting down the server.
  • Obey tile protection.
  • Active protection against conventional server poll for tracked objects.
  • Use the original growth functions with all related effects and chances.
  • Optional deactivation of the vanilla timer-based field growth mechanics.

 

Task time can be defined by a base time and several multipliers for task type, object/tile type, species, age, modifier (normal, enchanted, mycelium), skill and item quality. The time required to grow a tree, t, is

TaskTime < t < TaskTime + PollInterval

where TaskTime is the time required for a task as specified by BaseTaskTime and a collection of multipliers.

 

TaskTime =   BaseTaskTime
           * task_multiplier
           * type_multiplier
           * species_multiplier
           * age_multiplier
           * modifier_multiplier
           * skill_multiplier
           * quality_multiplier

Multipliers can be tweaked separately for all kinds of conditions. For more information, see the mod's properties file.

 

Other information:

  • Accelerated tree and bush growth ignores all related effects that otherwise would be invoked when a tree or bush grows.*
  • Accelerated fruit/harvestable growth ignores seasons.
  • Accelerated grass growth ignores seasonal growth rates.

 

* Such as tree death & self re-plant, mycelium decay, killing area checks for oaks and willows, sprouting to nearby tiles, mushrooms, etc. These effects still occur, but at a normal rate.

 

Planned features:

  • What else could need acceleration? Any suggestions?

 

Requirements:

 

As always with modded content, I rid me of all liability. Although the mod in non-invasive and can be removed at any time without any effect on the world, make a backup. Just to be sure.

 

Get it here

 

GitHub page

 

Installation: Just extract the contents of the .zip file into the mods folder in your WurmServerLauncher directory. If you don't have a mods directory, you need to install Agos's mod launcher.

Edited by GenSekiel
  • Like 7

Share this post


Link to post
Share on other sites

oh my, Awsome. I like the mod but, for me, you're code makes me happy. This has good examples of some concepts, one example, is using a mod specified database table to remember data state when the server shuts down. Last but definitely not least, the code is well organized and easy to read.

 

Question: Since this can track a tree tile we are actively taking care of, would it be possible to make trees bear fruits out of season? So for example, check an area around a TilePolled tree and if it finds a beehive (we may not get these till next month) it will force the tree to start a fruit bearing cycle. For players who don't like season it would be nice to be able to control when a tree has fruit.

 

Question: Do you remove trees from the poller when they run out of water? I see they are removed at older ages. Perhaps remove them to reduce object count if they are just going to act like natural trees.

 

 

off topic...I'd be very interested in how you'd go about changing the MeshIO system so we don't keep getting limited by things that are tracked with bit shift/masking. Here's a few things we are hitting a ceiling because of that limiting data storage method: cave ceiling height, crop types, tile types.

Share this post


Link to post
Share on other sites
6 hours ago, joedobo said:

Question: Since this can track a tree tile we are actively taking care of, would it be possible to make trees bear fruits out of season? So for example, check an area around a TilePolled tree and if it finds a beehive (we may not get these till next month) it will force the tree to start a fruit bearing cycle. For players who don't like season it would be nice to be able to control when a tree has fruit.

 

That sounds like a nice feature to add. I haven't yet looked into how fruit is handeled by the server in detail, but it should be possible to make it work. I'll put it on the todo list.

 

6 hours ago, joedobo said:

Question: Do you remove trees from the poller when they run out of water? I see they are removed at older ages. Perhaps remove them to reduce object count if they are just going to act like natural trees.

 

By default, a tile is removed from the poller as soon as it has grown one stage. It has to be watered to be added to the poller again. If the keepGrowing option is enabled, the tile is kept until the age limit is reached. A tile is also removed if it is invalid, i.e, because the tree was chopped down and it became a grass tile, if the tree has reached the age limit, and, by default, if the tree type or age changed from when it was added as a measure to detect growth by conventional server or player poll.

 

6 hours ago, joedobo said:

I'd be very interested in how you'd go about changing the MeshIO system so we don't keep getting limited by things that are tracked with bit shift/masking. Here's a few things we are hitting a ceiling because of that limiting data storage method: cave ceiling height, crop types, tile types.

 

Extending the one integer per tile (to long maybe?) would be possible but probably a major task with many changes everywhere in the code. I'm not sure if the meshes are encapsulated well enough to simply wrap a few access methods. Although that would be nice. Maybe creating a whole new (third) mesh for mod metadata may be viable, so that we would only need one new tile (a generic mod tile) in the original meshes where every access by mods is then redirected to the third mesh. Still, the encapsulation would have to be added at many places, I guess.

Edited by GenSekiel

Share this post


Link to post
Share on other sites

Fast forward to 0.9.9, adding everything form the to-do list. Only clean-up and possibly bug-fixing till 1.0.

Share this post


Link to post
Share on other sites

Is there any way to limit the maximum ql of anything gained through foraging or botanizing?

 

On Desolation we have a epoch system where skills etc are limited for each epoch. Foraging unfortunately allows harvesting of stuff well beyond your skill level in terms of ql received.

Share this post


Link to post
Share on other sites

It seems that the quality level of the item you get is the result of the skill check, so somewhat based on your current skill level with some randomness in it. It should be possible to either modify the method itself to limit the ql to, say, the current skill level, or to add hooks for the item creation and the foraging/botanizing actions to enable some kind of one-time ql limit for the item created during these actions only.

Share this post


Link to post
Share on other sites

Right click on anything gives:

 

[08:01:07 PM] WARNING com.wurmonline.server.creatures.Communicator: Superfly- action request failed.

java.lang.NullPointerException

at org.gotti.wurmunlimited.modsupport.actions.ChainedBehaviourProvider.getBehavioursFor(ChainedBehaviourProvider.java:113)

at com.wurmonline.server.behaviours.BehaviourDispatcher.requestActionForTiles(BehaviourDispatcher.java:348)

at com.wurmonline.server.behaviours.BehaviourDispatcher.requestActions(BehaviourDispatcher.java:237)

at com.wurmonline.server.creatures.Communicator.reallyHandle_CMD_REQUEST_ACTIONS(Communicator.java:7032)

at com.wurmonline.server.creatures.Communicator.reallyHandle(Communicator.java:2372)

at com.wurmonline.communication.SocketConnection.tick(SocketConnection.java:615)

at com.wurmonline.communication.SocketServer.tick(SocketServer.java:172)

at com.wurmonline.server.Server.run(Server.java:2411)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)

Share this post


Link to post
Share on other sites

Hm, none of my classes appear in the stack trace. I assume the error occures when you add the mod and dissappears when you remove it? May I ask what other mods you have installed so that I can try to reproduce the error? Also, did you change any options in the properties file?

Share this post


Link to post
Share on other sites

I did not edit anything in the properties file

 

Better Digging 
Craftable Pauldrons 
Craft More Things MOD
Stable Master 0.4
Treasure Chest Claim
Action Timers Fix    
New Stable Master
QualityDamageTooltip
Creature Bounty

Share this post


Link to post
Share on other sites

I have tried the following combination of mods with Ago's server mod loader 0.21:

  • Better Digging 0.3
  • BountyMod 1.7 by WalkerInTheVoid which I assume is what you mean by Creature Bounty
  • Treasure Chest Claim 0.2
  • Craftable Pauldrons 1.0
  • Accelerated Forestry & Gardening alias TreeFarmMod 0.9.9
  • Craft More Stuff 0.5 (alias Craft More Things)
  • QualityDamageTooltips 0.4
  • Stable Master 0.4
  • Action Timer Fix 0.4

I was not able to identify what New Stable Master could be other than Stable Master 0.5, but I would assume that you should not use 0.4 and 0.5 at the same time.

I was not able to reproduce your issues on my two private test servers on a 64-bit Windows 7 system. The right click menu did work properly.

Could you maybe PM me some more information on how your server is configured and the complete server.log? Is maybe the version of one of the mods or the mod loader you use different from what I listed above? Is there any option in the .properties files of the mods that I would have to change?

The only reason why such an exception would be thrown at this specific location in the code would be a null in the list of behavior providers of the mod loader. And I don't see how that would ever happen...

 

Edit: The ability to have multiple action performers with identical action IDs that I use to add information to the examine messages was introduced with mod loader 0.21.

If you are using an earlier version, try setting StatusOnExamine to false.

Edited by GenSekiel

Share this post


Link to post
Share on other sites

@NappyWould you like me to write a small mod for your foraging ql limit problem? I think it would work as described if the limit could be defined as a function of the skill level (or maybe some other player stat), e.g.,

ql_limit = a * (skill_lvl) + b

where you could choose a and b in the .properties file.

Share this post


Link to post
Share on other sites

@GenSekielThat would be awesome. I would be looking to make the foraged or botanized item ql limit to be no more then the player's skill in the applicable skill.

 

So if they have 30 foraging then the max ql the item they foraged could be would be 30. Same with botanizing.

  • Like 1

Share this post


Link to post
Share on other sites
51 minutes ago, GenSekiel said:

 

You are truly awesome! I will deploy your two mods + the latest modlauncher to my Desolation Test server and see how it goes!

 

Share this post


Link to post
Share on other sites
On 12/19/2016 at 9:20 PM, Nappy said:

 

You are truly awesome! I will deploy your two mods + the latest modlauncher to my Desolation Test server and see how it goes!

 

Just finished the testing. Works awesome! Thanks again, greatly appreciated!

Share this post


Link to post
Share on other sites

It's been in constant use on two servers since the 29th - no problems reported or discovered.

Share this post


Link to post
Share on other sites

Was running harvestmod and this mod together. The one feature that I think was conflicting was harvestmod has an option to prevent crops from turning to weeds. This wasn't working with this mod installed at the same time.

 

Is it possible to configure this mod in some way to prevent crops going to the weed state? 

The other feature I like in harvestmod is the ability to give crops a slightly better returning by adding x number of the item to it's harvest amount. So if I add 2 and would normally get 7 corn, instead I receive 9.

 

Is this also possible?

Share this post


Link to post
Share on other sites

Is that ago's CropMod? My mod does not touch farm growth at all, since farm tiles are already polled separately. So no, there is no configuration for farm tiles. From just looking at ago's code, there shouldn't be any incompatibility. I'll have to test and fix this, but won't be able to until the 19th.

Share this post


Link to post
Share on other sites

The two mods that I thought might be colliding with yours are harvesthelper (gives the season command) and cropmod (gives the option to remove weed stage).

 

Cropmod is indeed the correct one.

 

I will try to do another round of testing too.

Share this post


Link to post
Share on other sites

I am rather enjoying this mod, though I don't seem to be able to fertilize Maple Trees for their sap, not sure if that was intentional or not(I say this because the gathering mechanic for sap is a bit different). I ended up making a small row of grape vines near my settlement and had a few trees near, got plenty of grapes and was ready for the sap, until I realized there was no fertilizer option. I do use many mods, but from what I know, none should be affecting maple trees. I must have that sap to make the ritual wine of Libila and fill the kegs of my stone church, that and fog spider stew always goes better with wine.

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