World load detector

ItsTheKais

Steampunker
For convenience's sake, this post has been edited so that the most polished design stays at the top. The original content has been spoilered at the bottom for posterity.

The Mk4 World Load Detector, now working in 1.4 and beyond (in spite of Re-Logic's efforts):
QfF2hP2.png

When first building this, make sure that the grates and logic gates are configured properly according to the guide on the bottom (remember, grates are open by default). Once built, and water is backed up in the upper-left tank, the detector can be primed by flipping the switch (once or twice, to keep the pumps running). It will now activate when you load the world, re-priming itself and sending a single wire signal out of the green wire on top.

Unlike a teleporting-dummy-ghost world load detector, this works no matter where the player is in the world, making it more practical for the everyday user's world, where you might have multiple beds scattered around and/or don't want to be greeted with shrill teleporter noises first thing every session, and for adventure maps where said sounds would betray the inner workings and break immersion.

Compared to the previous (1.3.X) WLD design, this one relies on no bugs beyond massaging the liquid flow algorithm into rounding numbers up as often as possible, can be built anywhere in the world instead of only on the roof of the underworld, and reacts to world loads in a quarter of the time thanks to the new timers.

Technical: this first watches for liquid settle events by trapping water inside a grate suspended above a water sensor - a settle will force that water down into the gap below and trip the sensor. The contraption in the upper-right box then outputs a single pulse out the top and starts the pumps if they are not already running (i.e. when the game settles liquids on world load) or does nothing if they are running (filtering out subsequent settle events that happen when the liquid flow system is overloaded).

The Mk3 World Load Detector designs:
VqWQJaM.png

The top design can be built anywhere, but relies on an obvious bug that may get fixed in a future update. The bottom one is more future-proof, but must be built at the boundary of the underworld (the red line marks the point at which water begins to evaporate).

Unlike a teleporting-dummy world load detector, these work no matter where the player is in the world, making it more practical for a standard Terraria world, where the player might have multiple beds scattered around and/or doesn't want to listen to wiring noises every time they load the game.
This setup will send a single pulse the moment the world is finished loading. No more manually restarting timers!
T6t7NsV.png

The build itself is just a water duplicator, which overflows into a long, winding channel with a liquid sensor at the end. Because this build straddles the upper boundary of the Underworld, where wayward water quickly boils away, that sensor never actually gets a drop to drink during gameplay. But when the world is loaded, the game settles flowing liquids... and it doesn't take the drought of the Underworld into consideration when it does this, so once gameplay begins, the sensor is suddenly drenched with the water that was previously flowing through the channel. An actuator quickly drains that water away, which makes it "wake up" and start evaporating again, and a T flip-flop filters out the second pulse from the sensor. (the little tray below the actuator isn't really necessary)

Works 100% of the time from what I can tell. It might sometimes misfire in multiplayer - I vaguely recall that servers occasionally settle liquids in the middle of gameplay, but I could be remembering wrong.


EDIT: An alternative design that can be built anywhere (thanks to @ManaUser for the idea):
fYOYdLP.png

This one uses a puddle of lava/honey on top of minecart rails to evaporate the water. This is ambiguously a bug, so on the off-chance that it could be fixed, I'm going to refrain from calling it a total replacement.
 
Last edited:
I had made a world load detector before 1.3.1, but this is much more clever!
Wow that's cool, but maybe there is a way to compact it?
I'm guessing the length of the winding channels has been carefully measured to provide enough water duplication that it reaches the sensor at the end. (In other words, no.)
 
I had been wondering if there was a way to build a device like this; it's just a shame it needs to be built at a specific depth...
 
Wow that's cool, but maybe there is a way to compact it?
Definitely. For one, it could be made nearly rectangular if the water tank were put directly above the channels, and the lowest level of the channel isn't necessary. But it works, and I was too sleepy/lazy at the time to change it.

EDIT: here's a quick rearrange:
bTT5RkJ.png

Still works!
 
Last edited:
Very clever design! I would not have thought of that trick. I was actually trying to make a load detector myself recently but didn't get too far. I was going to base mine on the fact that timers stop running, so pumps would be holding the water back until you reload... but it looked like it would require a silly number of pumps so I never finished it.

But I have an idea for how you might be able to alter your design so it doesn't need to be on the edge of hell. You know how water gets destroyed when it sits on top of lava but can't make obsidian because something (like a minecart track or actuated block) is in the way? I think you could use that effect for the same purpose.
 
Works 100% of the time from what I can tell. It might sometimes misfire in multiplayer - I vaguely recall that servers occasionally settle liquids in the middle of gameplay, but I could be remembering wrong.
Both MP and SP will force settle liquids if a large amount of it is flowing and the calculations start to overwhelm the game. It could technically misfire in SP too if you're mucking around with lots of liquids. Also, MP lets the admin force settle liquids via command line (well, assuming you're using the standalone server.)
 
But I have an idea for how you might be able to alter your design so it doesn't need to be on the edge of hell. You know how water gets destroyed when it sits on top of lava but can't make obsidian because something (like a minecart track or actuated block) is in the way? I think you could use that effect for the same purpose.
Good call!
fYOYdLP.png

My tests suggested that I only needed a six-tile-wide pool of lava/honey to keep the sensor dry until the reload, but better safe than sorry.

Both MP and SP will force settle liquids if a large amount of it is flowing and the calculations start to overwhelm the game. It could technically misfire in SP too if you're mucking around with lots of liquids. Also, MP lets the admin force settle liquids via command line (well, assuming you're using the standalone server.)
I've never seen this happen in singleplayer before... and I've dug a lot of hellevators, so it's not like I've never made huge amounts of water and lava flow around before. But it doesn't sound completely outlandish that that would happen. That said, given the water sensor is post-mechanical-boss, it's likely that any very-large-scale liquid moving projects have already been gotten over with by the time someone might set this up, so it's probably not a huge deal.
 
I've never seen this happen in singleplayer before... and I've dug a lot of hellevators, so it's not like I've never made huge amounts of water and lava flow around before. But it doesn't sound completely outlandish that that would happen. That said, given the water sensor is post-mechanical-boss, it's likely that any very-large-scale liquid moving projects have already been gotten over with by the time someone might set this up, so it's probably not a huge deal.
I've seen it happen, but that was either when I was doing something crazy (trying to flood the whole world), or on a fairly crap computer. I think it only happens when the game realizes it can't keep up with all the water that's flowing.
 
As @ManaUser notes, you have to have a lot of actively flowing liquids. Hellevators are nothing, especially after the devs optimized the liquids handling over time. Besides, Hellevators tend to be 2-block wide anyway. You don't really get a lot of flowing liquid that way. Even more so when the flow area is beyond a certain point off-screen: the game starts to simplify the calculations a bit, which is how you can get infinite flows from a sufficiently large pool. Hellevators (at least the way I dig them) tend to be low-flow, even if connected to large pools. (Now doing it with the mining mount is a different matter ^_~)

If you use the in-game FPS counter, the number in parentheses seems to reflect the active liquid flow in the game. In an old (no longer existing) world of mine where I was flooding it, force settle would usually kick in after a while of that number going past 3000-4000. Even sooner if the number was higher.
 
EDIT: This design is obsolete now - check my reply two posts down for a better one!

All right, well... I said that water settling in the middle of gameplay wouldn't be a problem, and boy, does my foot taste delightfully pungent. It's happened to me twice since my last post here, and I'm not even doing anything even remotely involved using liquids. In fact, the only moving liquids in my world are inside this thing, so maybe volume isn't the only metric Terraria uses to decide when to settle liquids. But don't panic - it's already taken care of.
Q5PKENV.png

(The three ×'s are teal pressure pads. If I were actually any good at this, I probably wouldn't have used a back wall that those things completely disappear into.)

This is the liquid-mixing load detector with an additional mess that checks whether the timer driving the pumps is already on or not using carefully-spaced dart traps and actuating blocks. If the timer is off (because the world has just been loaded) then it will be turned on, and the actuating blocks will switch precisely as the darts reach them, allowing one through to hit the pressure pads. If the timer is already on (at any time after the world is loaded), then it will be turned off, both darts will be blocked, and then the second timer will turn the first one back on. This means that extraneous liquid settles won't trigger the output, but it increases the whole device's response time from "instant" to "a hair over two seconds." It also makes the build quite a lot bigger, but I gave myself a headache trying to find a simpler way, so done!
gXRoL0r.gif

This one's wiring is just a touch more complex than the last one, so here's the build with all four wire colors emphasized.
 
Last edited:
I finally got around to making one of these, partly to see if I could figure out an easier solution to the settling problem. I didn't follow your design exactly, which might be where my first problem came in. I think my water duping machine may have been too vigorous, because water was occasionally get a cross the lava trap. (While I watched, mind you, I don't think this was settling related.) So I doubled the amount of lava, and I'm fairly confident that dealt with it. But after playing for maybe an hour or two, I did eventually get bogus activation. I assume this one was caused by the settling effect.

But to my surprise, using the settle command in multiplayer did not seem to trigger it. This is unfortunate because it would have made testing easier. I've had to do testing with a bucket. Hopefully that's good enough...

OK on to the main point. Would you believe I found a solution that adds only one component (plus wire) to the previous design?

LoadDetectorNoWire.jpg
LoadDetectorWire.jpg


And it's a three-second timer. The top announcement box and green wire are really just for debugging, and could be removed. The red wire going to the second announcement box will be the main output to whatever needs to know when the world loads. (Currently they say "World load detected...", "and confirmed.").

So what happens? The signal coming from the sensor and gate activates the 3-second timer. If the world really just loaded, it will in turn, send the output signal, and activate the 1-second timer (which powers the pumps). If the 1-second timer was already running, it turns the 3-second one off (and on, and off and on) before it can do anything.

So despite its simplicity, this design does have two drawbacks compared to your dart method. The response time is 3 seconds... and it makes a super annoying ticking sound all the time. You probably won't want to put this right in your base.
 
That's definitely a more space and resource efficient build than mine... and also a nicer-looking one. The constant clicking would indeed get old in a hurry, but I think you've found the simplest answer for this problem.

Out of dissatisfaction, I did revisit my design this morning. Having gotten some sleep helped:
fSc0nbR.png

Now it uses much fewer wires and gates than the mess I made yesterday, fits in a slightly smaller space, and responds in just barely over one second. Also to note is that, because the green wire is now attached to two other gates which fire about one second apart, the pumps effectively never stop running, whereas in the last design, they would turn off for a moment every time a settle occurred, leaving the channel dry for a few seconds. So in the unlikely event that the player saves and quits immediately after a rogue settling, the build won't even notice.
(And most importantly, it doesn't have the noisiest back wall ever for the components to get lost in.)
 
One more attempt from me:
LoadDetector2NW.png
LoadDetector2WW.png

It's kind of a hybrid of my last version and yours, in a way. All the actual logic is gates and timers. But it uses a dart trap to add a very small delay. Without this, I believe it would fail in 1.66% of settling events (when the timers happen to sync up exactly). As you can probably guess, I never saw this happen, but why take chances? Alternatively you could replace that with a 3-seoncd timer, if you don't care too much about response time. The announcement boxes are the same, plus the one on the bottom which says "{false alarm}". Obviously those are optional.

So let's see if I can explain it... The left gate is as before. but when it triggers, it turns the other two gates on, and starts the secondary timer (left). If the main timer (right) is not running, the secondary timer activates the middle gate (by way of the dart trap) which starts the main timer, stops the secondary timer, and turns the two right gates off. If the main timer was still running, it activates the right gate before that can happen, which also stops the secondary timer and turns off the gates, but leaves the main timer running.

This is the most horrible thing I ever tried to wire. But at least that damn ticking noise is gone.
 
Has anyone tried these since the new water physics were added? I wanted to use this to set off a few different sets of timer cascades on the world opening but it doesn't seem to be consistently working. I'm trying to grasp how the logic gates work but definitely help me like a newb :)
 
I visited the world where my design (above) is and it still seems to work fine. Not too surprising, since as far as I know, water only got a visual makeover. Despite the waves, underneath it's still doing the same thing.
 
I visited the world where my design (above) is and it still seems to work fine. Not too surprising, since as far as I know, water only got a visual makeover. Despite the waves, underneath it's still doing the same thing.

Thanks! I figured it was probably my minimal understanding on what's going wrong for me, not so much the design :)
 
Don't mind me, just bumping a year-old thread with an updated design:

VqWQJaM.png

I shrunk the top portion by slowing the darts down with honey. That's... all that changed, actually! But both versions (honey and underworld evaporator) fit into a nice 28×19 rectangle instead of having an awkwardly long lid hanging off. I'm content with calling this "finished" now.

Someone also asked me for a world download the other day, so I've added one to the OP with both versions.
 
I've been looking for one of these for ages!

When building this, can I ask what the starting state for that 4x4 square of checkered actuated blocks is? The example image has it in both states, so I can't tell where I'm supposed to start off. I get that it's supposed to make sure only one of the darts hits, but without knowing why two plus alternation was necessary in the first place, I can't figure it out for myself. Also, is there an advantage to using the activated stone blocks, or can I just slap actuators on anything without harming order of operations?

Also, I can't tell what kind of pressure plate is two blocks to the left of the dart traps. I think it's teal, but I'm not certain.
 
Last edited:
Back
Top Bottom