PC Updating DicemanX's Lunar Event Autofarm to 1.4

engin33rguy

Terrarian
Hey all,

I have made improvements to DicemanX's Lunar Event Autofarm to make it work in Terraria 1.4. Changes to the Moon Lord's attack broke the 1.3 ML kill chamber and fixing the ML-specific part of the farm cascaded and caused changes to many other parts of the farm as well. In short:

  1. The Moon Lord's laser attacks go through blocks. This means we must do our best to dodge this attack, which we do through a combination of rapid teleports and dodge accessories.
  2. You can't dodge the laser 100% of the time, so you must be able to heal *rapidly* during the teleport sequence.
  3. The fact that you need to heal during the teleport sequence means you cannot leave any hearts out in the world from the cultists grinder or the pillar grinders. (Even one heart being left means you have a leak, which over time will hit the 10 cap and then (2) fails.)
Additionally I wanted to implement some more safety features into the autofarm, partly because we have access to tools that we didn't before and partly because this is what I used to teach myself circuits so extra complexity was just fine in my book.

The end result is a farm that I can reliably run past 24 hours at a time, and kills the Moon Lord between 5 and 6 times per hour. When the perfect storm arises you can still die during the farm, but from my estimates 95% of the time you fill your inventory and void vault full of loot before you die. (Which is the point you need to stop the farm and stash/sell equipment anyway.)

One more thing I'd like to note: In my world, I have shamelessly ripped builds from you lovely folks on the forum. I have signs in my world by most of the things I have "borrowed" but for safety's sake don't think of me as the creator of much of this. There are too many names to list, but this is the culmination of so many guides and builds from the likes of Diceman, ZeroGravitas, Jagriff, DRKV, Khaios, and so many more that I'm sure I'm forgetting. Thank you all for taking the time to write the guides and share what you've made, it was an excellent crash course in technical Terraria builds.

-----

Moon Lord Kill Chamber
When you teleport into the farm, you arrive at the "ready room." From here you can pick up/stash equipment and toggle the 1-time or recursive farming modes. If 1-time is selected, you will return to the middle teleporter of the ready room and can leave back to base. When recursive is selected you will return to the green teleporter to repeat the cycle. There is a 5 second window to walk off the green teleporter when you want to stop farming. The Ready Room bonus features include lights that turn on when you enter and off when you leave, as well as a safety lock that only lets you start the farm if the cultists are present in the world.

1tk8szv.png

Wiring for the Ready Room.

Cultist Killer/Lunatic Cultist Spawn Detector
The first stop on the farm is the cultist kill chamber. The room that I'm flying in on the right is the Lunatic Cultist Spawn Detector: It works the same as the Moon Lord spawn detector and will be covered later. When the player arrives, spiky ball traps in the floor are activated which kill all four cultists. The Lunatic Cultist will spawn and attack the player which triggers the detector and sends the player a short distance away to the Lunatic Cultist kill chamber. We cannot kill the cultist here in such a small space in case one of the attacks puts the Lunatic over solid blocks: when it dies, hearts (and loot) will be left inaccessible and the farm will break. The Lunatic Cultist kill chamber runs for a fixed amount of time before teleporting the player to the first pillar kill box.

t6aCTCu.png

Dungeon Entrance has been remade by stretching/squashing Khaios' pyramid adventure map over it.

oOuHQEc.png

Lunatic Cultist kill chamber + invincibility dropper. Lava destroys any hearts that don't get picked up and conveyors move the loot to the player.


Pillar Kill Boxes
The Pillar Kill Boxes are similar to DicemanX's original design, except logic gates are used everywhere instead of target dummies/hoiks. There are Echo blocks in a grid up to space that are actuated forward when the player is in the Lunatic Cultist Kill chamber to force the pillar spawns to the default locations. Because these blocks are only actuated when the player is in the autofarm, the cultists can still be killed manually and the pillars will spawn across the world for a "normal" Lunar Event playthrough. Each Pillar Kill Box comes with an area dug out and walled off to force spawns to only be inside the box itself, and there is a lava floor to catch hearts from flying enemies that escape the box and die to the stardust dragon in undesirable places.

Collecting hearts from the Pillar Kill Boxes was the hardest part of upgrading the farm. There are conveyor belts wherever possible to prevent hearts from sitting around, as well as the hallow spawn surface being actuated so that anything that drops gets brought to the player during the teleport/cleanup sequence. One of the safety features of the PSB's is that there are echo blocks around each of the "cleanup" teleporters to hold the player in the right place for mounting the next invincibility machine. In the event that the player is teleported out prematurely the player is able to tank the damage from pillar enemies and the Moon Lord chamber can detect this failure and re-check the PKB's for enemies later.

hCVwI7y.png

Pillar Kill Box Wiring. The invincibility machine is on the right; the top cluster is the sequencer for the cleanup teleports; the bottom cluster is the trigger for moving to the next box. Normally the player enters/exits through the pair of blue wires on the left, but during error recovery if the player arrives from the yellow wire on the right they will be returned along the other yellow wire instead of leaving on the "normal" blue wire.

Moon Lord Spawn Detector
After all four pillars have been killed, the player is sent to the Moon Lord kill chamber. The first stop is the spawn detector, where the player is positioned between two logic sensors by a conveyor belt. This is accomplished by sliding the player against an actuated block, then de-actuating both the block and the conveyor belt to drop the player down. The player's hitbox overlaps both logic sensors, and a hit to the left or right will toggle one (but not both) of the sensors. This signal then activates the teleport sequence for the Moon Lord kill. If both sensors trip at the same time we know the player wasn't hit- they must have teleported, so this signal is ignored. (This means that either they used the Rod of Discord/Cell Phone to break out, or the safety timer tripped and sent the player back to check the PKB's for enemies.)

MLiILxK.png

Moon Lord Spawn Detector.

When the player first arrives in the chamber, a 60 second timer is activated. If the timer is allowed to run out, that means that one (or more) of the pillars didn't get killed by the Stardust Dragon earlier in the sequence. The Moon Lord kill chamber will then teleport the player to the first pillar kill box to double-check for enemies. Pillar Kill Boxes can detect if the player came through "normally" or came from this error-checking sequence; in the latter case the PKB will return the player to the Moon Lord chamber rather then hand the player off to the next PKB in line.

Sidenote:
Consider the following: The pillar in the leftmost box doesn't get killed while those in boxes 2, 3, and 4 are killed. The kill chamber will teleport the player back to box 1, where it will kill the final pillar. This starts the Moon Lord's 60 second spawn timer. Each box has an 8 second fail-out (to detect the lack of enemies) and a 9 second teleport sequence to pick up any drops. This entirely eats up the 60 seconds before the Moon Lord spawns, and if a single unicorn spawns while the player is being sent through boxes 2, 3, and 4, the Moon Lord will spawn while the player is in box 4. This does not end well for the player.

For this reason, the ML chamber and the PKB's perform the error checking by sending the player to one box at a time then back to the spawn detector. After re-checking all four boxes, the player is returned to the Ready Room because the lack of Moon Lord means that something went wrong during the cultist sequence. The player will wait in the Ready Room for the ~day it takes the cultists to respawn, then the sequence will start again.

qWX9Uxm.png

Moon Lord fail timer (Lower) and PKB re-checker (upper). TEdit view because I used shadow paint in-game.

Moon Lord Killing
Once the Moon Lord has spawned, the player is rapidly teleported between 8 stations in a circle around the Moon Lord. The player moves in a figure eight pattern (clockwise across the bottom four followed by anti-clockwise across the top four) to keep both the Moon Lord and the Stardust Dragon centered in the kill area. The top and bottom halves are spaced such that the Moon Lords various "eyeball" attacks do not ever end up over one of the teleport stations. This is one of the only ways to die during this sequence, the contact damage from touching the eyeballs is too high for the heart statues to overcome.

Each of the eight stations is based on CrypticNight's heart farm. They have 10 statues beneath the teleporter connected to a vertical hoik to pump the hearts upward. Because it takes a little over a second to complete a lap (The sequence runs at 7.5 teleports/second and has 8 teleports per lap) no heart statue is asked to spawn a heart again before 10 seconds has elapsed.

CE2lpEY.png

There are eight of these heart spawners pumping hearts into the player as they teleport around the Moon Lord.

The hearts picked up during the teleport sequence can rapidly heal the player back to full when damage is taken. To avoid damage the "rotational" speed of the teleport sequence does not match the sweep speed of the Moon Lord's laser (so you wont get hit in multiple chambers) and as mentioned before the chambers are spaced vertically so that the "eye" attacks end up in the empty space between the top and bottom halves.

Here is a giant image of the wiring of the Moon Lord Kill Chamber.
kerMail.png


I tried using timers to break the player out of the Moon Lord teleport sequence but I went on a bad spell where twice in a row the Moon Lord wasn't killed "in time" and the player died upon being taken out of the teleporters. The safest way to detect a Moon Lord kill is from the cultists: when they respawn, you know 100% the Moon Lord has died. So that is what I used- the player remains in the teleport sequence until the system detects the cultists respawn, then the shutdown sequence is initiated:

  1. The heart statues are disabled so no new hearts are spawned.
  2. The player does two more laps to pick up any straggling hearts.
  3. The player is teleported to the loot pickup pad to grab the Moon Lord's loot.
  4. The player is returned to the ready room.
This provides the player an opportunity to exit the farm, or the player can remain stationary to go through the sequence again.

Here is a video of the farm in action:

-----

Thanks again to so many members of this forum for giving me a crash course in the technical side of the game. I first played Terraria years ago but struggled to get to even the first boss, but with all the fanfare around 1.4 I stumbled into T-MEC and fell in love with the game. I have a few more posts I need to get around to documenting, but figured I might as well start with the big one :)
 

Attachments

  • engin33rland.wld
    7.2 MB · Views: 1,107
Last edited:
I feel like someone needs to say — absolutely fabulous work!!! I was a massive fan of the original. But this, with its failsafes, debugging `:), fantastic design and (of course) on Master Mode, is a work of art.
I have a few more posts I need to get around to documenting
I look forward to them! But no pressure.
 
just tried a single pass in this map; there was a little bit of health heart "leakage" due to creatures outside the kill boxes getting killed by the stardust minions, but otherwise, worked exactly as advertised. you did an excellent on the update, congrats, and thanks!

edit; decided to try the multi-loop, and on the second pass, ate it vs ML. oh well lol

edit2; then i got sent to the pillar chamber before the lunatic cultist was finished? weird.... edit3; which lead to a "failsafe" infinite loop. think i'll just replace the wld lol

edit4; decided to try it again, picked up 3 of 4 ML bags, then the 5th ML got me. no idea what i am doing wrong, or if i am just unlucky. i guess if i ever decide to "leave it running" again, i'll have to "babysit" it each time. still impressed though.

edit 5; decided to give it another spin. first ML got me. just bad luck? or am i missing something? AFAIK i am following the instructions on the sigh, stardust stuff and all that.
 
Last edited:
I had to have a look at your map, truly something to behold. I always marvel at builds like this as I can't imagine the amount of time it must have taken to design this stuff. My maps are always so basic and more function over form. It's just getting the job done quickly so I can move on to the next thing. Absolutely loved the wizard tower, it looks simply amazing. The little one I built just looks dumb by comparison. The way some people use blocks and make design elements just dumbfounds me. Most of the machines I used back in the day were just copy pasted into my world. I literally used one machine this playthrough and it was for frost moon/harvest moon. A very simple and basic build that got the job done and hardly looks fancy. For farming Moonlord I literally just used minecarts across the sky and beat him that way. Rest of the bosses I faced head on which was frustrating at best and resulted in many brutal deaths.
 
Back
Top Bottom