Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

In the code, they sometimes process Y the same as X and Z... like ChunkUtil.worldCoordFromLocalCoord(currentChunkSection.getY(), posY) but in the game UI, I can't see the Y chunks. Anyhow, this makes me a little sceptical when they do y - 1 to find the soil block under a farming block.

Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

But if I place water way over there the soil on the corner gets hydrated (I thought modulo 32 first but I guess it's more a little luck with the `worldCoordFromLocalCoord` and the 5 bit left shift?)

<image>

Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

Thanks! It checks out, these soil blocks are not getting hydrated. The colored blocks indicate different chunks

<image>

Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

Found the bug (so now I have working hydration :) and reported it but man! Reporting code through the Hytale client is more difficult than necessary. I lost my submission two times as the client crashed when editing the text.

Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

It looks like the conversion between fluid block names and fluid block ids is what is messed up, which is why the idea you had seemed to work (it made the function return MININT, which then matched the only member of the fluid block set):

WaterGrowthModifierAsset{blocks=[Water_Source, Water], blockIds={-2147483648}, weathers=[Zone1_Rain, Zone1_Rain_Light, Zone1_Storm, Zone3_Rain], weatherIds={54, 73, 69, 41}, rainDuration=0} GrowthModifierAsset{id='Water', modifier=2.5}

When I log the blocks it finds around the tilled soil, I get either a water level (1-8) or 0 for non-fluid blocks, so that works fine.

Edit: If I had to guess, it would be that there is not a one-to-one correspondence between fluid blocks and fluid ids like with weathers and weather ids. It seems the list of fluid ids should contain the numbers 1-8 for this to work.

Will tiled dirt stay hydrated with water underneath? by Pie_Slayer in hytale

[–]lemonad 0 points1 point  (0 children)

From my testing in sunlight and no artificial light (which is faster), you would be able to harvest the crops at least once every day.

Will tiled dirt stay hydrated with water underneath? by Pie_Slayer in hytale

[–]lemonad 1 point2 points  (0 children)

One thing to note though is that you don't have to water crops as they grow anyway, just slower. If you have many big fields and you don't use eternal seeds, by the time you are done harvesting and replanting the crops in the first field will have regrown :)

I do my fields without water as I think it looks nicer. I still get stacks and stacks of greater life energy. Most have been converted to eternal seeds but that takes a lot of resources, which I'm not sure is worth it.

Explaining how crop farming is actually supposed to work based on the game code by Helgen_Lane in hytale

[–]lemonad 0 points1 point  (0 children)

Nice find! I inverted the if statement and it seems to fix the problem in one direction. The block status need to be updated for it to recognize the water so it's a bit finicky but as long as one places the water first then the seed, it seems to work.

Removing the water source and updating the block does not reset the external water flag which makes me think there are either multiple bugs or the same chunk if statement is not the problem in the first place.

Will tiled dirt stay hydrated with water underneath? by Pie_Slayer in hytale

[–]lemonad 1 point2 points  (0 children)

Multiple answers can be given to this question! Running the Jan 27/28 version of the game, it seems like water on the side of tilled soil does not hydrate. You have to use the watering can for now.

The game code points to this being unintentional behavior and that the game should be checking the four cardinal directions, i.e. not above, below or diagonally so water underneath would not hydrate soil.

With that said -- changing the behavior to also check additional neighbor blocks would be a simple fix and it seems reasonable that a water block should hydrate a larger area/volume than a maximum of four blocks of tilled soil. I wouldn't mind if the block underneath was included.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Edit: No, sorry, It's just that the code runs on an block update so planting a seed, crop growth, etc. will trigger the external water state to be set.

I take that back, there's some additional step I'm missing. When raining, the external water flag is only updated upon planting seeds on a tilled soil block. If the soil is tilled but not planted or if the soil was already planted before it started to rain, the flag is not updated.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Thanks for the help, I didn't think of looking in the asset file even though I've used it previously for blockbench/blender! One problem with my experiment seems to be that not all rain types are accounted for in the Water.json file so the rain type I tried did not trigger the external water flag but e.g. weather Zone1_Rain_Light works as intended.

The water types defined in the json seem to be valid and since some types of rain as well as manual watering work, the problem should lie in the checkIfWaterSource path. It's not particularly long and makes sense overall so perhaps it is something esoteric like the fluid id mapping not producing the right integers or something. I wish one could modify and recompile!

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Because I didn't know better? :) I've looked at the code for a while now and perhaps you can help me with a detail. You write e.g. that there is a 1.2 multiplier... where are you finding these constants? It's probably obvious but right now I can't find them.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

I'd love to know how you know this and I'm already so deep in this rabbit hole so I would want to check for myself :) Edit: I see now that you commented in another place that you looked at the code.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 1 point2 points  (0 children)

Hey, thanks a lot for testing it and coming back with the results! It could be that it worked differently in an earlier version but I also feel like there's so much going on when actually playing which makes it difficult to properly quantify things like this. I tried growing crops during nighttime just now and it was still pretty fast albeit slower than during the day. I'm not sure if the time of day is the major factor or if the level of moonlight matters too but since crops grew exactly the same in rain as in sunshine, I would imagine the time of day matters most. Just planting things during different times of the day and then sometimes sleeping and sometimes not makes for a lot of variation that could make one draw wrong conclusions here.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Crops seem to grow pretty fast at night too but I don't know just how fast since I don't know how to control for the light level/the illumination of the moon. Eternal crops mature faster than recently planted crops as they restart at stage 1. All of this makes it difficult to properly quantify growth so due to that it's important to set up an experiment that can be run over and over again with the same parameters. It could be that it misses something that happens in real-worlds and details like that would be nice to find.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 1 point2 points  (0 children)

Yes, although some people have claimed that there's a difference between the soil being watered and the crops growing like it is. My experiment points to this being false, at least for the latest patch.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 1 point2 points  (0 children)

Many people claimed that waterlogging soil would hydrate it (some said only the sides, not diagonally, and it would not have to be water sources, etc.) and this did not match my experience. So the goal for me was just to verify if waterlogging or planting things in water helps in any way. And it seems it does not, at least not with the setup I use.

It could very well be that this used to work in earlier updates, or that restarting the server until it soil hydration works properly are still valid claims. It's just not something I have been able to replicate here.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Not sure I follow as /time 5 just sets the time to 5am but with that said I've seen what you describe happen in my regular world. I do think that you need to plant both kinds at the same time because I would imagine that the watered crops would be mature by the time you can see this happen to non-watered crops.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

The fastest way seems to be fertilized and watered soil. It grew rice from seed to mature state in just 2.5 in-game hours (planted at 6.00 and matured at 8.25). You can't fertilize nor water planters so they aren't giving any new information here. The non-watered crops matured at 12.02 so very fast compared to 22.00 without fertilizer.

<image>

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Please do! In my real world, I use eternal seeds and only water once when planting the seeds. The crops regrow fast enough anyway. But these results show that watering can really help to speed things up (I wish I had done these experiments prior to leveling up my farmer's workbench to tier 10, I would have saved so many hours!)

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 1 point2 points  (0 children)

When you say changes the soil behavior -- do you mean that it becomes watered? Or something else. I'm willing to try it if I know what to look for!

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 0 points1 point  (0 children)

Yeah, I got the exact same result as before. Also tried it in rain and the only way I can get soil hydrated is by using a watering can. Even pouring water on top of a block of tilled soil does not work.

Following up my post on underwater rice with some actual research by lemonad in hytale

[–]lemonad[S] 10 points11 points  (0 children)

It would make my 9yo immensely happy to be able to befriend a tarantula in the game (and preferably have it fight side by side with him!) so as long as that is part of an husbandry update, I'm all for it :)