PC Adventure World Mechanics help

Sketch-tan

Terrarian
Hey, so, I'm attempting to create a Metroidvainia-style adventure world, and need help with this one particular section
unknown.png

unknown.png


What I'm trying to do here is if you approach the "door" (Vertical Boreal Wood) then a message will display saying "Seems like it's jammed"
And then after pulling the lever that controls the door, it will open and the jammed message will no longer appear, as well as if you attempt to activate the lever a second time, the door will remain open and a message will pop up saying "It's stuck in the open position."

The issues I'm running into is how to consistently have the "jammed" message play while not activating again until you approach the door (it's currently activating when approaching and leaving) as well as the stuck message, since the only way I've gotten it to work is by the message playing every time the lever is pulled, and the door not always staying open.

Is there anyone that can help, or give some pointers?
 

Attachments

  • upload_2019-2-17_16-50-32.png
    upload_2019-2-17_16-50-32.png
    44.5 KB · Views: 93
For the jammed massage, I think you should use a player sensor. You can use a one bit binary counter to devide it's output by two, so you only get a signal when someone enter the area.
For the lever, you can use a sort of S/R latch. Then run the output of that into the base of a pair of transistors that either open the door, or display the jammed massage.
I don't really have access to a PC right now, but I'll post some pictures once I do.
 
For the jammed massage, I think you should use a player sensor. You can use a one bit binary counter to devide it's output by two, so you only get a signal when someone enter the area.
For the lever, you can use a sort of S/R latch. Then run the output of that into the base of a pair of transistors that either open the door, or display the jammed massage.
I don't really have access to a PC right now, but I'll post some pictures once I do.

Since my first post, I have tinkered around a little bit with it still with a player sensor, however I still am running into a few small errors as well, likely because I'm new to this. As for the Binary counters, I tried looking that up, and looks like there was a thread about it but it was deleted some time ago, and every other link is a little unclear. The best way I've come up with a binary counter though is as seen in the first image, to have actuators to let water fall onto a water sensor.

Also might ask for some clarification on a S/R latch.. if whenever you're able to post images it would be greatly appreciated
 
I believe this is what you were asking for:
LRtBnal.png
3Uu2nUA.png

Little switch on the left is for reset.
The left and middle gates below the lever make up an S/R latch. (Well, naming of these things in terraria wiring is a bit wishy-washy, but I think that is what it is.) The right gate is a transistor, it sends the signal from the lever to the announcement box, if the S/R latch is already set.
The top gate next to the sensor is the binary counter segment.
BTW, you could also use a detonator, if you wanted something that also visually indicates, that it can only be hit once.
XIbIYOQ.png
 
IT WORKS!!
upload_2019-2-19_9-36-48.png


Thank you immensely for your help, it's incredibly appreciated, especially along with the reset switch.

Real quick before you go, though, I would like to take a few things from this so I know how to do it myself again in the future. So when you were referring to the "binary" system, you were referring to the AND logic gates with the single Logic lamp and Faulty lamp, correct?
Also, correct me if I'm wrong, but if I understand correctly, when activating the faulty lamp, it only emits a signal if at least one of the lamps below it is on. I think I implemented this in another puzzle I made prior, where you need to flip certain switches to open up a secret passage, but attempting to flip too many in quick succession would result in spawning a Wraith (since the puzzle is in a graveyard).

upload_2019-2-19_9-49-30.png

upload_2019-2-19_9-49-44.png


This being said, the only way I've gotten it to work is only if all correct switches are flipped, as well as the wraiths not spawning at night (which is what the answer implies; did this since it's in the hub town, and the adventure starts at day, and wanted to divert players away from that area early-game), however, this also poses the issue where even if the puzzle is solved, the passage only stays open at night, as well as the only requirement is that all the correct switches are activated, but I would like them to be activated in a specific order (the reason for this, is the answer to the puzzle is a word like "HOPE," and you must activate the switch above the grave with the person's name that starts with each letter, for example, Harry, Oscar, Peter, and Emily").

This puzzle is currently for the most part stable, so you don't have to help out any more than you have, but any other pointers would be greatly appreciated.
 

Attachments

  • upload_2019-2-19_9-45-54.png
    upload_2019-2-19_9-45-54.png
    395.8 KB · Views: 153
  • upload_2019-2-19_9-46-11.png
    upload_2019-2-19_9-46-11.png
    405.9 KB · Views: 139
You forgot to hook up the wire that opens the gate (red on your picture) to the base of the bottom transistor on the right. (The one with blue wire going to the announcement box.) That one is needed to disable the "Jammed" massage when the door is open.

So when you were referring to the "binary" system, you were referring to the AND logic gates with the single Logic lamp and Faulty lamp, correct?
Well, what I was specifically referring to, was the top logic gate on the right. Player sensors output one signal when a player enters their area, and another one when the player leaves. We only want to trigger the message box on the first signal, so effectively we want to divide the incoming number of signals by 2. This is what the gate with the collector and base connected together does.
OaYkJid.gif

You can string a bunch of these to further divide the number of signal into 4, 8, 16, 32... and you end up with a binary counter.

Also, correct me if I'm wrong, but if I understand correctly, when activating the faulty lamp, it only emits a signal if at least one of the lamps below it is on.
Faulty gates are effectively random number generators. When their faulty lamp is tripped, the chance of the gate outputting a new signal is equal to the ratio of ON gates to OFF gates below the faulty one. If you only have one lamp in total, when it's ON, you get a signal with 100% chance, when it's OFF you get it with a 0% chance. So it kinda acts like a transistor, with the faulty lamp being the collector, the normal lamp being the base, and the actual gate being the emitter.

index.php

index.php


This being said, the only way I've gotten it to work is only if all correct switches are flipped, as well as the wraiths not spawning at night (which is what the answer implies; did this since it's in the hub town, and the adventure starts at day, and wanted to divert players away from that area early-game), however, this also poses the issue where even if the puzzle is solved, the passage only stays open at night, as well as the only requirement is that all the correct switches are activated, but I would like them to be activated in a specific order (the reason for this, is the answer to the puzzle is a word like "HOPE," and you must activate the switch above the grave with the person's name that starts with each letter, for example, Harry, Oscar, Peter, and Emily").

So what you have there, is a 1 in 5 chance for wraiths when it's night, and a 0 in 5 chance when it's day.
By the way, it isn't too hard to build a mechanism to check for the correct order of switches, if you'd like to do that.
DkQW1I4.gif
WcBxAAA.png

This may not be the best example, it's really compacted together...
With this you can also hook something up to the L shaped red wire on the far right, to detect wrong button presses.

At one point I started to write up a sort of wiring guide, and then I never finished it. That's where all these pictures are from.
You're adventure map is looking pretty neat, by the way. I'd love to play it at some point. :happy:
 
Hey, first of all, so sorry for the late reply, I attempted to try the combination lever coding, though wasn't having much luck, then got incredibly distracted with creating the rest of the world.

My current project is creating the first Giant gem Temple, which is going to be a massive dungeon with Zelda-themed puzzle elements, which here I would really ask for you help. I do have a small idea of how some could work, for example one room where gemspark blocks go back and forth between solid and not (Like Beat-Block Galaxy) and I would have a crab statue walking back and forth between pressure plates and such. However, some more complex puzzles are like manually turning blocks solid and not to guide water or something to a sensor that will open a door. And then finally my biggest challenge is I want to create a custom boss using things like traps, actuators, and teal pressure pads (that require a projectile to hit it, which will be the damage indicator).
Alternatively, however, I could spawn in a hardmode enemy via a statue, and I think I may have an idea of how to send a signal once it's defeated, which would be spawning several enemies off screen so the enemy limit can be reached, and then another one that loads in once the screen is scrolled into the boss room, so that once the "boss" is defeated, the new spawner can spawn an enemy that walks on a pressure pad that opens a door.

Anyways, this is currently what I have so far:

upload_2019-3-1_5-44-48.png


The Emerald Temple, as said, is my current project. Since the entrance and many things leading to it are based around plantlife, the shape of the temple is going to resemble a tree. The biggest problem I'm facing currently however is simply the amount of blocks needed to complete it.. I underestimated how much Green Team Blocks I would need, and now I've just been mucking around all of my worlds praying that the Travelling Merchant will arrive with them so I can buy an entire full inventory's worth of them. Platforms I don't see myself using as much, mainly just the blocks. (If you come across any it would be greatly appreciated and I can even pay you back in the in-game currency, haha.)

And yes, thank you so much for your help so far. Once it's done I absolutely plan on making it public :happy:
 
one room where gemspark blocks go back and forth between solid and not (Like Beat-Block Galaxy) and I would have a crab statue walking back and forth between pressure plates and such.
I would recommend using a counter and a timer for that. Way more reliable.

And then finally my biggest challenge is I want to create a custom boss using things like traps, actuators, and teal pressure pads (that require a projectile to hit it, which will be the damage indicator).
That sounds awesome. I've been doing some "resarch" on global projectile detection, which might come in handy for this. I wrote about the concept here: https://forums.terraria.org/index.p...of-dart-traps-and-teal-pressure-plates.75768/

Alternatively, however, I could spawn in a hardmode enemy via a statue, and I think I may have an idea of how to send a signal once it's defeated, which would be spawning several enemies off screen so the enemy limit can be reached, and then another one that loads in once the screen is scrolled into the boss room, so that once the "boss" is defeated, the new spawner can spawn an enemy that walks on a pressure pad that opens a door.
That is interesting. It might work. You'll have to set the size of the boss room pretty precisely to make sure the offscreen enemy doesn't despawn.

The biggest problem I'm facing currently however is simply the amount of blocks needed to complete it.. I underestimated how much Green Team Blocks I would need, and now I've just been mucking around all of my worlds praying that the Travelling Merchant will arrive with them so I can buy an entire full inventory's worth of them. Platforms I don't see myself using as much, mainly just the blocks. (If you come across any it would be greatly appreciated and I can even pay you back in the in-game currency, haha.)
I am pretty sure most people who build advanture maps or mechanical contraptions (including me) aquire their resources through alternate means... Map makers use TEdit, I use mods such as cheet sheat or hero's mod. There are also some simple inventory editors. You can also download maps with large amounts of resources like the builders workshop.
But anyways, if you want to do this all legit, than that's fine too. :) I believe the forum does have a section for trading various ingame items.
 
I kind of was wanting to use the crab for more precise timing, so I could hopefully have it go with the music, but yeah, you're right, a timer would be more reliable.

Thank you so much for the thread, this is super helpful.

Will definitely update on the custom boss once I get there

I know there are inventory editors and such... but I don't know, it's just a stupid quirk with me that if I do it feels like I'm cheating. Though once it gets to it, I'll likely be needing to use it to create the non-craftable biomes like the Dungeon and Spider Nests. Fortunately though, earlier today, RNGesus blessed me with a Travelling Merchant selling Green Team Blocks, and I bought an entire inventory's full of them.
unknown.png


Anyways.
I've been trying to do as much as I can without help, since I don't like relying on others, and would rather learn it myself, but having a little bit more of an issue with one of the very first things that players will encounter once they enter the Emerald Temple.

(For some reason it says I'm not allowed to upload files all of a sudden so instead uploading to Google Drive and linking it)

https://drive.google.com/file/d/1QEiksQ6xv4PupawxgRfth2-6XOTzNhcc/view?usp=sharing

This is going to be the character that greets the player in each Temple, whom I've yet to name, but she will pretty much greet the player and give them a rundown of what needs to be done, to find the Gem that's been stolen and return it to her. Since I want to give her character, I would like to have her eyes follow the player around the room, which I've gotten to work to an extent.
However, if you'd notice based on the design, if a player goes back and forth through one of the trigger zones, then her eyes will just follow what the trigger zones are, and not the player. I've been trying to come up with a set up that will make this work, to where for example it only works if the player is moving certain directions, which I believe I can try to make work with more player sensors, but I'm still trying to get the hang of wiring and mechanics. Of course, once I do, I don't have to bother you anymore, haha.
The rest of the puzzle throughout the temple should be simple enough for me to "code," but once it gets to the boss fight, then it'll start getting more difficult and I'll likely return for more assistance.
 
I know there are inventory editors and such... but I don't know, it's just a stupid quirk with me that if I do it feels like I'm cheating.
Well, kudos to you. :happy:

(For some reason it says I'm not allowed to upload files all of a sudden so instead uploading to Google Drive and linking it)
Yeah, that is a somewhat well known issue, it will be resolved once the social forums go away and the forum can be updated.

However, if you'd notice based on the design, if a player goes back and forth through one of the trigger zones, then her eyes will just follow what the trigger zones are, and not the player. I've been trying to come up with a set up that will make this work, to where for example it only works if the player is moving certain directions, which I believe I can try to make work with more player sensors, but I'm still trying to get the hang of wiring and mechanics. Of course, once I do, I don't have to bother you anymore, haha.
So, the issue is, that if the player hits the sensors in the wrong order, the lamps switch incorrectly? To fix this, you could hook the sensors up to a set of flip-flops, which would always reset the state of the torches before activating the new one. This way the order doesn't matter.
fvtLGg1.png
RWoLuN5.png

This is basically a sort of radio button controller. The switches turn on the torch below them, and turn the rest off. You could have a separate input for all of the sensors, or you could use two independent controllers for the two eyes, each with 4 inputs. (One for each torch.)
 
Hello again, I want to apologize a second time for my late reply, I got incredibly side-tracked again and was putting off programming the eye-movement once I got all my level design ideas out of the way so I wouldn't forget them, and then upon doing so I accidentally designed about half the entire Temple.

Capture 2019-03-09 14_59_21.png

(Progress as of 3/9/19)

Anyways, I actually still haven't tackled the proper eye movement yet; I will eventually, but have not yet in fear of messing it up, as well as messing with the more important wiring I have, that actually functions the Boss fight itself, which I also took footage of as well

https://drive.google.com/file/d/1SvaIECpuD6ThOofGU_4mypuKjZsGCHdu/view?usp=sharing

It is currently activated via switch, but will be changed later. Also, along with the wall-face at the beginning of the Temple, I would like before the battle itself for the boss's eyes to follow you as well, but for the moment, his eyes pulsate as he's attacking.
First of all, I want to thank you so much for your help so far.. with it, I was able to almost entirely program the fight almost just how I wanted to, and next step is of course the initial face's eye movement, and then her brother's movement too.

The last main things I need to complete the boss fight is to have the darts he shoots to not all shoot at the same time (which I was able to get to work in the past, if I manually activate a timer, however. Though the darts are still wired as such, and once I have a working way to activate two timers at different intervals from a single player-input signal, then I can work on the rest. Also that needs doing is the final big button that fires the cannon and lands the finishing blow to the boss, in order to make the switch stand out, I used Weighted Pressure Plates instead of normal ones, which cause the cannons to fire when pressed, and stepped off of, as well as if they are fired a second time, the boss wakes back up and continues a second time. Admittedly, this part I can probably code myself, given what you've taught me so far, but coming up with a nice and organized setup is a tad difficult at the moment. Aside from that, once the final blow IS struck however, he does indeed stop attacking, and the door to the exit opens up, and the boss music stops.

My next project once all of the things I've mentioned are done is to design the rest of the temple; more specifically the miniboss, which will just be a survival section as a bunch of statues come to life, and then the upgrade room, homing the Tabi, which will allow the player to dash, that will allow the player to navigate the rest of the temple and solve the rest of the puzzles. For reference, the main mechanic of the Emerald Temple will be changing various colored blocks back and forth via shooting a dart to an activation shrine.

The next temples I have in mind are either the Diamond Temple, which will feature Snow and Ice, or the Sapphire Temple, which will feature lowering and rising water. Diamond Temple I don't have fleshed out too much in my notes just yet, since there's not a whole lot of unique things you can do with ice, unless of course you were able to place and reset thin ice (which would be perfect), however the fourth "temple" will actually feature a battle with the giant creature that escaped the castle dungeon, or more specifically it's mother that it retreated to, which will feature a small spike in difficulty, and will require swimming gear that you would acquire in the Sapphire Temple since it escaped into an underground ocean. Though because Ice enemies are only slightly more challenging than normal ones I do want to put the Diamond Temple early. I don't know, this whole paragraph here was just me ranting about the projects for the world in the future, you can disregard this if you want.

Finally, one last thing I would like to mention before the post is over, is that if it'd be okay with you, do you maybe want to exchange steam IDs so that I can invite you into the world, and you can give me pointers on what to do next? (By all means I do not expect you to do things for me, it's just to make communication about the project easier than forum posting). And if you don't want to, that is 100% okay and I totally understand, I just wanted to throw that onto the table just in case.

Anyways, that will be my post for now, I shall return with more updates once I have more progress.
 
That is looking pretty nice. :)
Finally, one last thing I would like to mention before the post is over, is that if it'd be okay with you, do you maybe want to exchange steam IDs so that I can invite you into the world, and you can give me pointers on what to do next? (By all means I do not expect you to do things for me, it's just to make communication about the project easier than forum posting). And if you don't want to, that is 100% okay and I totally understand, I just wanted to throw that onto the table just in case.
Yeah, sure thing. In fact I'd very gladly build things for you, if you want. I'll PM you my steam ID in a sec.
 
Back
Top Bottom