Linux Potential Loot RNG Bug In Linux Dedicated Server Bin

SirThane

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Multi
Operating System
Ubuntu 14.04
Terraria Version
1.4.4.9
Controls Used
Keyboard/Mouse
PC: Windows 11 Pro 24H2 (26100.3194)
Client: Terraria v1.4.4.9 (unmodded) Steam
Server OS: Ubuntu 18.04.6 LTS
TerrariaServer.bin.x86_64: Terraria Server v1.4.4.9

I am playing a For The Worthy Legendary world and am at ~200 hours in. The server is hosted using guidance from the official wiki article detailing setting up a dedicated server on Linux. The world generated without Living Trees and I have been trying to obtain a Living Wood Wand by shaking Forest trees (0.3333%). At this point, I have shaken thousands of trees and obtained over 30 Leaf Wands (0.3322%) and no Living Wood Wands. I wouldn't ordinarily think to report this, except after discussing on the official Discord, I had the idea to FTP the world file and play locally in Single Player on my Windows PC. A Living Wood Wand was dropped in the first few minutes after roughly 100 trees. Against such staggering odds, I am suspecting there may be an issue with the RNG calls in the Linux server bin.
 
Last edited:
It seems you got exactly the right drop rate on the server, what issue are you suspecting here? The faster drop you got locally can totally happen, that's how randomness works.
 
It seems you got exactly the right drop rate on the server, what issue are you suspecting here? The faster drop you got locally can totally happen, that's how randomness works.
Sorry if I was unclear.

What I got when the game was ran as a dedicated server for multiplayer was over 30 Leaf Wands over the course of play and no Living Wood Wands, even though the Leaf Wands have a listed drop rate from shaking Forest trees that is very slightly lower than that of Living Wood Wands
What I expected was a roughly equal drop rate of both wands.

1741145007533.png

1741145023874.png


What I expected is what I ended up getting when, instead of hosting on a Linux server, I FTPed the world files back to my Windows PC and played there instead. In the first few minutes knocking ~300 trees, I got 3 Leaf Wands and 2 Living Wood Wands.

I understand RNG can be poor, but after thousands of rolls, getting 30+ of one and 0 of the other, then, when copied back to the Windows installation of the game, immediately evening out, which is the documented intended case, made me suspicious of the odds.

1741144916431.png


It's like the case is not present in the Linux server bin or some quirk of the RNG call causes it never to reach the Living Wood Wand case.

I will reword the OP to make that more clear.
 

Attachments

  • 1741144899793.png
    1741144899793.png
    15.3 KB · Views: 27
PC: Windows 11 Pro 24H2 (26100.3194)
Client: Terraria v1.4.4.9 (unmodded) Steam
Server OS: Ubuntu 18.04.6 LTS
TerrariaServer.bin.x86_64: Terraria Server v1.4.4.9

I am playing a For The Worthy Legendary world and am at ~200 hours in. The server is hosted using guidance from the official wiki article detailing setting up a dedicated server on Linux. The world generated without Living Trees and I have been trying to obtain a Living Wood Wand by shaking Forest trees (0.3333%). At this point, I have shaken thousands of trees and obtained over 30 Leaf Wands (0.3322%) and no Living Wood Wands. I wouldn't ordinarily think to report this, except after discussing on the official Discord, I had the idea to FTP the world file and play locally in Single Player on my Windows PC. A Living Wood Wand was dropped in the first few minutes after roughly 100 trees. Against such staggering odds, I am suspecting there may be an issue with the RNG calls in the Linux server bin.
I've looked into the code in question but I can't find any indication as to why it wouldn't work, or why indeed it would work differently on Linux builds or on dedicated servers. If anything, the fact that you were getting Leaf Wands proves that the code does work as they use the same roll. As unlikely as it sounds, it does really seem that you were supremely unlucky in this regard.

Do you have an estimate for how many trees you shook?
 
Last edited:
I've looked into the code in question but I can't find any indication as to why it wouldn't work, or why indeed it would work differently on Linux builds or on dedicated servers. If anyinh, the fact that you were getting Leaf Wands proves that the code does work as they use the same roll. As unlikely as it sounds, it does really seem that you were supremely unlucky in this regard.

Do you have an estimate for how many trees you shook?
I apologize. I didn't notice an email notification when this response was posted.

I don't have a good estimate of how many trees have been shaken, but when I was playing last night, I took note of the character and the world is now 310 hours in. Since it's For The Worthy, I took to making platforms of dungeon brick enough for ~600 trees so I could shake trees and farm wood for building without worrying about demolishing my world and needing to patch and replant creeper holes. My best estimate now is somewhere north of 10,000 trees shaken over the course of play.

From the outset, I fully acknowledged that it may simply be a case of having unbelievably abysmal luck. It was only when moving the world file back to Windows to run immediately ending the drought that my doubt in it being a coincidence started to grow.

After grabbing two Living Wood Wands so I could complete those collections, I FTPed the world file back to continue with my playthrough. I'm still shaking trees as a data gathering task and for the chance that I can report back on the curious case of SirThane and the Terrible, Horrible, No Good, Very Bad Luck. It was only ever a suspicion that there may actually be something wrong because it's a case of proving the negative.

I appreciate the checking into the code. That's another thing I'd've done if I'd known where to look for it and if I have access. The screenshot I shared was from another member of the Discord server. I'm not proficient with the language it's written in, but it appears to be sensible and well formed. This lead me to consider that there may be a problem with the Linux random API that could be being used if Terraria doesn't have its own handmade RNG algorithm handmade. I may stand up a new VM with a more up-to-date OS to evaluate for differences if it comes to it.
 
Last edited:
Back
Top Bottom