Jump to content

Higher seed drop rate for some new trees, so that you can actually propagate and use them / bigger seeds


junawood
 Share

Recommended Posts

"- Added new tree types cypress, purple heartwood, ebony, crimson king maple, walnut and larch
- Ebony and Purpleheart logs will be a rare valuable resource as these are rare and difficult to propagate trees"

First, before I get to the negative part:
I absolutely love these new trees and how much they add to the scenery! ❤️ And the new wood colors for building! ❤️ So many more options for so many different things! I love it! ❤️

But...

Well, people already wrote about the problem that you might get less than one seed per tree, and then I tried to get seeds from the beautiful new Crimson King Maples (not even mentioned in the update notes as "difficult to propagate") in a new world and.... yeah. It was something between disappointing, annoying, frustrating and also sad, because I destroyed several beautiful and relatively rare trees and got less seeds, so I wouldn't even had a chance to replace them to keep the areas as beautiful. And I really hate to ruin beautiful areas in the game, so the only option is to either not use the new trees and new wood colors for building and in gardens and to create new sceneries, or I "cheat" by changing into creative mode and getting more seeds, or maybe I might find a trader who sells the specific seeds, because for whatever reason I can't get enough material by completely destroying a whole tree to even just replace that one tree. IRL you'd get hundreds or thousands of seeds or cuttings from a tree or even just a bush and you wouldn't have to completely destroy it for that. So not even getting one to two seeds per completely destroyed tree?!

Anyway. I wanted to know what that means in the game and not only as numbers in the code, so - on a huge clean flat plain in a creative world - I planted 10 seeds each for all the tree types we got, in rows with more than enough space in between so that they wouldn't touch and spawn with less leaves blocks, and after letting them grow, I cut all the leaves blocks with steel shears (the fastest, not just to be faster, but also to avoid seeds despawning while I'm still cutting and haven't checked every block if there might be one of those tiny seeds [That they are so damn tiny is a whole nother story, hard to see on a clean plain or wood blocks, even harder to see with plants on the ground - please change that and make them way bigger! And that they also might be affected by wind... *sigh]), and tried to make sure that I got every seed that fell out of those leaves blocks.


These are the numbers:
Pine: 64 + 15 seeds
Oak: 64 + 4 seeds
Maple: 36 seeds
Acacia: 35 seeds
Walnut: 34 seeds
Kapok: 23 seeds
Bald Cypress: 18 seeds
Birch: 17 seeds
Greenspire Cypress: 13 seeds
Larch: 10 seeds
Purpleheart: 10 seeds
Crimson King Maple: 9 seeds
Ebony: 2 seeds

Redwood: 2 trees, 2 seeds each (so maybe it would be 20 seeds?) [They have so many branches, and it was so much work to make sure to break all of the leaves blocks and make sure to check every surface for tiny seeds that I just stopped after the second tree.]


Yeah.
I already thought that it would be nice if birches had a little higher seed drop rate, and now most of the new trees.... o_O The greenspire cypress is still great with 13 seeds, as they have just a few small leaves blocks and 13 seeds from 10 trees is enough to propagate them, but larch and purpleheart with just 10 seeds are really problematic to say the least, and crimson king maple with just 9 and ebony with 2 seeds?! Just... NO.

Thirteen is already really low and makes getting a lot of seeds more difficult and time consuming, and that purpleheart and ebony are rare and take so long to grow also adds a lot to making them way more difficult to propagate, and I think that's enough to make it difficult in an enjoyable way. But just 10 or even less seeds per 10 trees just sucks the fun out of it.

So let them take even longer to grow if you really want to make it more difficult to actually use those new trees/blocks for whatever reason, but please don't turn it into such a disappointing and frustrating experience. :/

  • Like 11
Link to comment
Share on other sites

Yea 22 ebony trees including huge ones turned into 10 seeds for me than my 10 seeds planted only gave me back 3 seeds.

Purpleheart is pretty bad for me i get maybe 30-40% chance of 1 seed for every huge tree i do and takes a LOT of work especially with all the jungle forestation there.

Redwood overall i get 1.15 more seeds. For 15 FULL redwood i got 17 seeds.

  • Like 3
Link to comment
Share on other sites

I agree that the seed drop rate for any tree should always average at least 1 seed per tree. This is difficult to balance, of course, because the game only calculates the drop rate per leaf block, and even if the drop rate seems high, there's always the chance that with bad luck you'll wind up with no seeds. Tweak it high enough to be certain every tree will give you at least one seed and you might wind up getting 20 seeds from one tree, just based on sheer chance which can't be accounted for. The code doesn't look at "seeds per tree" but just "chance per broken leaf block" so there will always be a lot of variation from tree to tree.

But I hope the devs will keep tweaking the drop rates until players find we get on average 1-2 seeds per rare tree. Having a rare material is cool, but having a material so rare it's almost impossible to get just frustrates the players for whom these beautiful textures were added in the first place, who want to build with them.

Fortunately, while the devs sort out the balancing, it's actually very easy for us players to tweak our own files. Navigate to your game assets folder (by default in AppDada\roaming\Vintagestory in Windows) and go to survival\blocktypes\plant\leaves\normal.json. Then search for "drops" to jump to where the drop percent chance is for each type of seed and tweak them to your heart's content.

  • Like 2
Link to comment
Share on other sites

Well devs could also add new type of leaves block that have the same texture as normal ones but 100% seed drop if broken directly and 20% if you chop the whole tree and set in world generation that each tree generates with a certain number of those leaves depending on rarity of said tree (for example for ebony 1 to 3 of them in each tree) at the same time lower the chance for seed from other leaves to prevent cases with to much seeds from single tree.

With this we get a guarantee that with enought patience player can propagate all types of trees but we also prevent it from becoming to easy and seed amout from geting out of hand while also leaving a chance that player can be unlucky and miss those leaves entirely. Numbers can ofcourse be changed to ballance it better. I also have no idea how world gen would handle it in forests. I also like the idea with longer growth time for rarer trees.

  • Like 4
  • Mind=blown 1
Link to comment
Share on other sites

Wow, that's actually a great suggestion. I'm not sure how much work it would be to code it into the current system, but it's worth trying to make sure the devs see it (I don't think they look at the forums often these days). I think either the Discord server or the Github bug tracker are the best places.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Ari said:

Wow, that's actually a great suggestion. I'm not sure how much work it would be to code it into the current system, but it's worth trying to make sure the devs see it (I don't think they look at the forums often these days). I think either the Discord server or the Github bug tracker are the best places.

Thanks 😁 . And as for making sure devs see it i will wait few days before i try to look for their attention dont want to disturb them :D

  • Like 1
Link to comment
Share on other sites

Another option is have an increasing percentage chance per leaf block broken.  When a seed drops the percentage resets to zero.  Once the percentage equals or exceeds 100, a seed is guaranteed to drop.  The percentage increase can then be set uniquely for each tree making some harder to obtain than others.  The first leaf could be set to 100% to guarantee at least one seed drops.

For instance: a pine tree having 100 leaf blocks has a seed bearing percent of 4%.  After the first seed drops, the counter is reset to 0 yielding no seed.  Next leaf block goes to 4% then 8% and so on until either a seed drops or leaves are not harvested anymore.  In our fictitious pine tree it may yield as much as 8 or 10 but at least 4 or 5 if the original drop percentage is 100.

Link to comment
Share on other sites

31 minutes ago, Maelstrom said:

Another option is have an increasing percentage chance per leaf block broken.  When a seed drops the percentage resets to zero.  Once the percentage equals or exceeds 100, a seed is guaranteed to drop.  The percentage increase can then be set uniquely for each tree making some harder to obtain than others.  The first leaf could be set to 100% to guarantee at least one seed drops.

For instance: a pine tree having 100 leaf blocks has a seed bearing percent of 4%.  After the first seed drops, the counter is reset to 0 yielding no seed.  Next leaf block goes to 4% then 8% and so on until either a seed drops or leaves are not harvested anymore.  In our fictitious pine tree it may yield as much as 8 or 10 but at least 4 or 5 if the original drop percentage is 100.

This one would probably be easier to code but could prove to be really hard to ballance in my opinion. If you set the increase too low and had bad luck you will have to wait a lot of time to get that seed like if we asume that we want to have statistical chance for 1 seed from every 100 leaves to be 100% (without the 1 guarantee) ... So we have 100 draws means 1% on average to get 100% statistically after all 100 leaves that means if we start at 0% we should end at 2% after 100 leaves so each increase is 0.01% ... You see where im going here right ? ( If im wrong in my thinking feel free to corect me but point to or provide explanation why its wrong ... Im after a day of first tax office run and later work so ).

Link to comment
Share on other sites

It's not a case of checking success against a static percentage each time a leaf block is harvested.  The percentage chance of success steadily increases until success is guaranteed. For example, the first block harvested is 0% the second block harvested could be 4%, then 8%, 12%, 16%, 20%, etc.  A random check against that increasing percentage for each harvested block will mean that eventually a seed will drop.  The only random part is when will it drop, no longer if. 

As with everything, it depends on the parameters set by the devs, but it could make it easier for them to tweak seed generation and even provide a default initial success to 100% to guarantee a seed drop regardless of the scarcity of leaves on a tree (but that could be exploited too.)

Link to comment
Share on other sites

6 hours ago, AdrianNumbers said:

Well devs could also add new type of leaves block that have the same texture as normal ones but 100% seed drop if broken directly and 20% if you chop the whole tree and set in world generation that each tree generates with a certain number of those leaves depending on rarity of said tree (for example for ebony 1 to 3 of them in each tree) at the same time lower the chance for seed from other leaves to prevent cases with to much seeds from single tree.

That sounds like a really interesting idea to make sure that you get at least one seed per tree! Though lowering the drop rate for normal leaves would also affect bushes, and some trees are standing so close to each other that they "share" leaves blocks (that cutting down one tree can destroy the leaves of trees next to it is another topic that might need to be discussed one day...) and some spawn/grow next to walls and other stuff so that not all potential leaves blocks of a tree actually "grow", so that might end up getting really complicated. And I'm not even sure if I really want one guaranteed seed per tree. Simply adjusting the drop rates to get at least maybe 12 seeds from 10 normal sized trees would be much easier and might be enough. And of course let them take longer to grow if you want to make it more difficult to actually use them.

 

2 hours ago, Maelstrom said:

the first block harvested is 0% the second block harvested could be 4%, then 8%, 12%, 16%, 20%, etc.

One potential problem with that would be working with shears, where several blocks are cut at the same time, or on a multiplayer server several people at once breaking leaves blocks. So also most likely more complicated than simply adjusting the drop rates. ^^

Link to comment
Share on other sites

11 minutes ago, junawood said:

affect bushes, and some trees are standing so close to each other that they "share" leaves blocks (that cutting down one tree can destroy the leaves of trees next to it is another topic that might need to be discussed one day...) and some spawn/grow next to walls and other stuff so that not all potential leaves blocks of a tree actually "grow", so that might end up getting really complicated.

Well thats why i said im not sure about how world gen would handle it but if those leaves are set to only spawn next to logs it should be fine in most cases i think. As for bushes they are only made from common trees leaves so it shouldnt affect balance much.

Link to comment
Share on other sites

So, few things to note since I've been staring at tree code as of late. Firstly, the world generation of trees is actually quite nuanced and complex. Specifically, it actually is doing a grow-and-branch iteration that goes in arbitrary directions. The tree code isn't actually working in block logic, but gets simplified down to block logic to embed into the game once the tree is generated. Secondly, every single one of those details evaporates into the ether the moment those blocks are placed- trees, in the game, do not exist. Axes do some basic logic (break everything upward in a vertical square cone starting from the base, only cut the same kind of tree, only progress from log to branch and from branch to leaf) to ensure they "cut down a tree", but there's nothing coming from the tree itself there.

 

In terms of what's "easier to implement", the first suggestion (random-chance unique leaf blocks) would actually be easier. Hell, I could tell you how to implement it right now. There's a function, 

        public int GetLeaves(float width)
        {
            return leavesByLevel[Math.Min(leavesByLevel.Length - 1, (int)(width * leafLevelFactor + 0.5f))];  // width < 0.1f ? leavesBlockId : leavesBranchyBlockId
        }

The array is indexed rather simply- the first entry is a leaf block, the second a branchy leaf block. Simply check if that value works out to be 0, and add logic to account for the random chance to have one of those "guaranteed seed" leaf blocks. Take the logic of this function:

        internal bool TriggerRandomOtherBlock()
        {
            return rand.Value.NextDouble() < otherBlockChance * config.treeBlocks.otherLogChance;
        }

Replicate it, except now with "otherLeafChance". Apply that function similarly to how TriggerRandomOtherBlock() is called here:

        public virtual int getBlockId(float width, TreeGenBlocks blocks, TreeGen gen)
        {
            return
                width < 0.3f || NoLogs ? blocks.GetLeaves(width) :
                    (blocks.otherLogBlockCode != null && gen.TriggerRandomOtherBlock() ? blocks.otherLogBlockId : blocks.logBlockId)
            ;
        }

Additionally, you will want to replicate this statement for your new leaf type, inside ResolveBlockNames:

            if (otherLogBlockCode != null)
            {
                int otherLogBlockId = api.WorldManager.GetBlockId(otherLogBlockCode);
                if (otherLogBlockId == -1)
                {
                    api.Server.LogWarning("Tree gen tree: No block found with the blockcode " + otherLogBlockCode);
                    otherLogBlockId = 0;
                }
                this.otherLogBlockId = otherLogBlockId;
            }

Then there's just the standard boilerplate stuff for introducing a new block that you'd do. Of course, I say all of this without having written a mod myself, but from what I gather everything I pointed out is the functionality of resin blocks in pine trees, and how to extend that same logic to leaves. You'd similarly have to update all the tree JSONs to include the desired variables, of course.

 

The alternative, the "chance counter that increases until a success", is actually much harder. Generally speaking, tracking persistent stuff like that is a lot harder than it seems. The best you could manage there is specifically tying it to breaking trees with an axe, because that specifically nabs every block in the "tree" in a loop during the breaking process. Just modify the while loop in OnBlockBrokenWith. The problem is that you have no way to know whether or not a block actually dropped its given drop this way, so even then you can't count successful drops, just total sum of broken leaves.

  • Like 2
  • Cookie time 1
  • Mind=blown 3
Link to comment
Share on other sites

5 hours ago, LuuBluum said:

So, few things to note since I've been staring at tree code as of late.

o_O :D Wow. But...but...can't we just simply slightly increase the drop rate? 😅

 

11 hours ago, AdrianNumbers said:

Well thats why i said im not sure about how world gen would handle it but if those leaves are set to only spawn next to logs it should be fine in most cases i think. As for bushes they are only made from common trees leaves so it shouldnt affect balance much.

I guess expecting "seed leaves" next to logs would change how people cut down trees. Not sure about that. And expecting more/guaranteed seeds/cuttings from blocks close to the trunk would make it a bit weirder for those who like more realism.

If you'd lower the drop rate for bushes, that would change a lot for areas with way more bushes than trees. My goal wasn't to get less from bushes, but more from just a couple of new trees that don't drop enough to propagate them. :D

Link to comment
Share on other sites

3 minutes ago, junawood said:

I guess expecting "seed leaves" next to logs would change how people cut down trees. Not sure about that. And expecting more/guaranteed seeds/cuttings from blocks close to the trunk would make it a bit weirder for those who like more realism.

Ok thats true i was really sleepy when i thought of that XD

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Elias Heyndrickx said:

Perhaps you could break leaves but over time they would regrow? Would make it easier to get sticks and eventually get some seeds and plant more trees. Not sure if this is feasible computationally.

Ohh no. I want to be able to shape trees and cut leaves blocks that are in the way and not have to do that over and over and over and over again because leaves regrow. And it is really easy to get sticks. Just grow a group of pine trees in an area, use shears before you cut down the whole tree, replant them and repeat, and you have chests full of sticks after a while, and enough firewood for charcoal.

  • Like 2
Link to comment
Share on other sites

On 7/31/2021 at 12:12 PM, junawood said:

Ohh no. I want to be able to shape trees and cut leaves blocks that are in the way and not have to do that over and over and over and over again because leaves regrow. And it is really easy to get sticks. Just grow a group of pine trees in an area, use shears before you cut down the whole tree, replant them and repeat, and you have chests full of sticks after a while, and enough firewood for charcoal.

I understand your concerns, you can definitly make some artsy trees like that. I was thinking it could have been a solution to tree propagation of rare trees. So it would still take a long time to get a seed but with patience you could get one. But it was just an idea.

Edited by Elias Heyndrickx
typo
Link to comment
Share on other sites

On 7/31/2021 at 3:36 AM, Elias Heyndrickx said:

Perhaps you could break leaves but over time they would regrow? Would make it easier to get sticks and eventually get some seeds and plant more trees. Not sure if this is feasible computationally.

Depending on the implementation this would be perfectly fine. If it's just "branchy leave blocks can fill adjacent empty blocks with leaves", that'd be both easy (you'd just override whether or not branchy leaves should receive server ticks on that condition, and when they do fill a random empty adjacent spot with a leaf) and computationally lightweight (every single dirt block in the game is constantly getting server ticks (or checking whether they should) to work out whether grass should grow on them, and performance hasn't slowed to a crawl; clearly it isn't that costly). Hell, could even apply this to branchy leaf block or leaf blocks adjacent to branchy leaf blocks, etc.

 

Though I suggest perhaps a lower limit, lest forests become incomprehensible overnight with all their leaves.

Link to comment
Share on other sites

  • 1 month later...

A little update, because I wanted more numbers and there were some changes in 1.15.5.

  • Tweak: Doubled seed drop chance for ebony and purpleheart
  • Tweak: Roughly doubled redwood seed drop rate, but increased the time for it to grow to a mature tree by a factor of 5

This time I only tested ebony (changed), purpleheart (changed), larch and crimson king maple. Again 10 trees each, planted with seeds in rows on a huge plain with enough space so they wouldn't touch and harvested with steel shears. Trees can vary quite a bit in size and the amount of leaves blocks, so the numbers of seeds per 10 trees can vary as well, and you could get more or less per 10 trees, but I don't want to repeat this process with even more trees cause... o_O

The results:

Ebony: 6 (changed, 2 last time)
Purpleheart: 26 (changed, 10 last time)
Larch: 15 (10 last time)
Crimson King Maple: 14 (9 last time)

 

So this is the updated list with the new numbers:

Pine: 64 + 15 seeds
Oak: 64 + 4 seeds
Maple: 36 seeds
Acacia: 35 seeds
Walnut: 34 seeds
Purpleheart: 26 seeds (changed, 10 last time)
Kapok: 23 seeds
Bald Cypress: 18 seeds
Birch: 17 seeds
Greenspire Cypress: 13 seeds
Larch: [12,5 seeds] (15 now, 10 last time)
Crimson King Maple: [11,5 seeds] (14 now, 9 last time)
Ebony: 6 seeds (changed, 2 last time)

Redwood: 2 trees, 2 seeds each (so maybe it would be 20 seeds? and now with the changes maybe around 40?)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.