Question Forum Question Thread V2.0 (1.3.1 Edition!)

awesomegamer919

Spazmatism
Howdy all, since @ZeroGravitas suggested it I decided to make a new 1.3.1 forum questions thread!

Old Thread: https://forums.terraria.org/index.php?threads/forum-questions-thread.76439/

Table Of Contents:
-Aim of the thread
-The Team
-Questions on Mob Spawning
-Questions on Hoiks
-Questions on the Mechanics of Items
-Questions on Block Mechanics
-Questions on Logic Gates
-Questions on the Mechanics of Minecarts
-Questions on Traps
-Any other Questions
More to come.

Aim of the thread:

To answer any and all questions in relation to:
  • Trap Characteristics
  • Minions/Horseman's Blade info
  • Other Wiring Stuff
  • Spawn Rates and Requirements
  • Hoiks
  • Logic Gates!
Don't be afraid to ask a basic question, we all have to start somewhere :).


This is the team of people who you should tag when asking about certain Topics (Hoiks, autofarms, code related stuff)
@W1K - Code related questions
@critcodedtuna - Coded Related Questions
@DicemanX - Autofarms
@NiraExecuto - Theory / Code


DicemanX said:
In Lucky Coin + Slime Staff farming, you typically summon a bunch of slimes that will do 1 damage to a group of mobs, and each hit will yield coins when the Lucky Coin is equipped. What I'm curious about is what sort of hit limit exists. For instance, let's suppose that we start summoning up to 8 slimes, and there is one mob present. We end up generating some number of hits per second. Is the number of hits greater with a greater number of slimes, or does it reach a cap at some point? Are there any caps when multiple mobs are present?


There seems to be a cap because when a number of slimes are dealing damage to a monster, and you try to hit that monster with a weapon, the monster won't take any damage. The slimes don't appear to be doing piercing damage either, since the damage indicators pop up more than 6 times per second with multiple slimes present.

Answer:

critcodedtuna said:
So in the end the only semi-consistent thing I got from it is that with a crowd of multiple enemies, one slime generally has an overall higher per-summon DPS than 2 or more, while 6-7 generally has an overall lower per-summon DPS. I suppose this might be useful in experimenting with the efficiency of farms with multiple chambers, like DicemanX had mentioned. I'll post up the numbers if there's any interest.

awesomegamer919 said:
What are all the factors involved when the game spawns a mob?


From what I understand, the game picks a random spot and then, if the spot is available, checks the ground for lava. If the check passes then the game randomly spawns the mob.


How does the game choose the mob? Does having multiples of the mob alive reduce spawn chance for that mob? or does it not affect it at all?


If Mob kind A spawns in the underground, the next time a mob is spawned is there less chance for Mob kind A to spawn or is it the same chance?


Answer:


critcodedtuna said:
awesomegamer919 said:
From what I understand, the game picks a random spot and then, if the spot is available, checks the ground for lava. If the check passes then the game randomly spawns the mob.


Sort of, but situations vary. Spiders are spawned near their natural walls (ID 62), but don't necessarily spawn over the walls. In the temple, I've been able to override the spawning of Lihzahrds and Flying Snakes by placing sand on the ground, but this doesn't seem to work in the dungeon. Flying enemies don't necessarily need ground blocks to spawn, and some enemies (like Wyverns) won't spawn if another one is alive somewhere.


awesomegamer919 said:
How does the game choose the mob? Does having multiples of the mob alive reduce spawn chance for that mob? or does it not affect it at all?



There's a hard cap of the number of enemies that can spawn around a player. I know that statue spawns have a local cap, but I'm not sure offhand if that applies to naturally spawned enemies.


awesomegamer919 said:
If Mob kind A spawns in the underground, the next time a mob is spawned is there less chance for Mob kind A to spawn or is it the same chance?

Based on what I can gather, if an additional mob spawns (setting aside that more mobs overall present seems to lower the initial probability of spawning), the presence of that mob generally has no bearing on the chances of whether it can spawn again. Example: On the first night in the world, you get attacked by Zombies and Demon Eyes. Having either one present has no bearing on whether the next spawn to happen is another Zombie or another Demon Eye.


There are some exceptions to this where if a particular mob is already spawned anywhere in the world, the same type of mob won't spawn again while another is alive somewhere. The full list of non-event/non-boss NPCs appears to be: Wyvern, Pirate Captain, Webbed Stylist, Sleeping Angler, Bound Goblin, Bound Wizard, Bound Mechanic, Paladin, Eyezor, Ice Golem, Rainbow Slime, Angry Nimbus, Clown, Bone Serpent

DicemanX said:
I'm curious if anyone knows much about the spawn rates of Martian Saucers. The wiki claims that their spawn rates are reduced during Blood Moon, which suggests that it would be possible to peek at the code to see what might control spawn rates. When I would do "fair" playthoughs I would sometimes have invasions with only 1 Saucer, but the moment I built a dedicated AFK arena I've been consistently seeing 4-5 Saucers, and even managed to have 9 spawn in my latest video. Pure chance? Or is there a way of maximizing the chances they'll spawn?

DicemanX said:
Second question: are there any spawn caps during Moon events and Invasions? Now that I have a cell phone equipped, I would see upwards of 30 Pumpkings and Mourning Woods during the final waves. Perhaps it's possible that the spawn limit of 200 NPCs is used, and since the Moon event bosses have a weight greater than 1 NPC, 30 or so is the limit.

ButKicker11 said:
Okay, I have the next question.

How many tiles per second does a player or mob go when during up, down, left, and right hoiks?

Answer:

DicemanX said:
Jumping from one hoik tooth to the next takes 1 game tick. This means that when hoik teeth are spaced 1 tile apart, the player will move twice as fast compared to the speed when the teeth are adjacent to one another.

Stefnotch said:
A little question:
Is it possible to have an up hoik that can move you more than 3? blocks per tick? Something like this is possible with a foot against floor hoik, right? (Bottom right corner of the image.)
index.php

Answer:

inomanoms said:
No and no unless the hoiking agent is taller than three tiles. Bottom right corner is navigated in 2 hoiking steps and 2 game frames. I reference here@ZeroGravitas' hoiking the Golem video. Go check his Youtube playlists.

awesomegamer919 said:
1: The hallow melee gear has 2 sets of speed boost, the helmet is 12% and the set bonus is 10%, are these boosts additive or multiplicative? also the set bonus is haste, does that mean anything or is it just visual?

2: do any armour potion or prefix bonuses allow you to change the useTime of a sword (Terra Blade in particular)?
Answer:
W1K said:
1. They are both additive. Haste means it improves both meleeSpeed and moveSpeed.
2. Prefixes do improve useTime. Technically. a speed increasing prefix does increase the firerate of the beams. Mining speed can also improve useTime but only for tools. Nothing else can otherwise improve useTime.

AeonicEclipse said:
I've got one that may be console specific but not sure. It's about cross-world biomes (crimson in corruption and vice-versa). Has a bit of a story to lead in:

I built a mini crimson biome as a spawn surface in a hardmode corruption world and set up a dart battery to farm for a crimson key mold. After a number of days (real ones, on and off farming), still hadn't seen it so I started a new world to get crimson, then put it into hardmode to be able to get key molds. So I went to the crimson underground and started building a farm there. Overall I was only there about 10 minutes (real time) and had barely started building but at some point I killed an enemy and it dropped the mold.

EDIT: Should say, the artificial surface was off-screen and I was NOT in the same biome, but the correct enemies were spawning.

So, question is: Did I get extremely lucky or is there an issue with cross-world drops? I'd gotten 3 molds without much effort in the first world, but the crimson didn't seem to drop.
The notes on the wiki say "Enemies in artificially created Corruption and Crimson biomes will still drop appropriate key molds, even if the world does not have a corresponding biome chest."

Answer:
AeonicEclipse said:
The player seems to need to be in the biome, not just kill the correct enemies. Was in corruption during a solar eclipse and a corruption mold was dropped, then went to the jungle and a jungle mold was dropped.

inomanoms said:
Answer #1:
W1K said:
Probably because the door counts as a bigger tile when open and the wire is triggered twice in two different tiles.
Reply:
inomanoms said:
W1K said:
Probably because the door counts as a bigger tile when open and the wire is triggered twice in two different tiles.
I don't understand. You mean to say that the door, when open, has separate regions, the open part, and the part where the door frame is, and that is what is causing the door to open only in one direction? Why does this not happen when the there is no dot of red wire on the switch then?


Does the game have separate protocols for opening and closing the door, or is opening and closing a toggle of the same thing?
Answer #2:
critcodedtuna said:
inomanoms said:
Is it a bug?
Nope, it's by design. There's an RNG-based decision made in choosing the direction and sprite to use. When you manually open a door, it uses the direction you're facing to determine which way to move the door. When it's triggered by a wire, there's no cue, so it's free to make an arbitrary decision.

The red wire doesn't appear to actually do anything, and I get the same results wiring a switch to a door without it. I can also use any color wire and get the same results, and pass the wire only through a single tile of the door and get the same results (lining up 6 doors in a row and flipping the switch back and forth.

I've found it in the code, and it definitely chooses the direction at random on a 50-50 coin flip.


critcodedtuna said:
I have some interest in minecart behavior, particularly in the kinetic aspect of things.
I've seen some interesting videos showing some pretty fantastic drops and jumps, and I'm curious if there are any hard numbers that would aid in track positioning.

For example, if I leave a ramp at speed S, I could expect to reach an altitude A above the exit point, and the trajectory that puts me dX blocks out would put me at an altitude dY blocks up or down from where I started.

I know there's a guide for rail systems and related wiki entries, but nothing I've found that covers metrics. For many of the things I've seen, it seems hard to believe that it's all trial, error, and finagling.

I've checked the forums here (including the resource post in this group), TO, and Reddit, and haven't turned up any good quantitative info about minecart movement.

Suggestions?

Answer (Long):

Talrey said:
I noticed the minecart question was still labelled "unanswered", so I decided to do some Science. I built a meter stick using pressure tracks and torches (see below) and proceeded to jump all three minecarts onto it at controlled velocities to see how far I would travel.
jao6FhP.png

WywIU2j.png

Not Shown: bumper off to the right to double how much track was in the approach, diagonal rail later constructed between the bottom track and the right one.

The approach track was approximately 300 tiles long, to provide enough time for the cart to reach the target speed. I still ended up needing to use a bumper to double that length, and for the mechanical cart I had to join it to the return track (underneath) with boosters for even more distance. Speed was easy, controlling that speed was less so.

I actually had some weird results. At a given speed, the wooden cart actually jumped further on average than the iron cart, which itself jumped further than the mechanical cart. The mechanical cart had the highest maximum range, as expected, but it needed to be going 10 MPH faster than the wooden cart to match the wooden cart's longest jump.

I haven't developed an equation to relate speed / range yet, but I've got plenty of empirical data. I did five trials at each speed for each cart. Below 5 MPH (as measured by the Goblin Tech and allowing enough approach time to stabilize that number), the carts tended to simply slow to a stop again. I took measurements at 6-20 MPH, then went up in increments of 10 MPH until I hit the cart's top speed (51 MPH for the wooden cart, 66 for the iron, and 102 for the mechanical). The wooden cart's maximum jump was 44 tiles. The iron cart could jump 70 tiles, and the mechanical cart could jump a whopping 153 tiles at maximum speed. As @ZeroGravitas suggested, I used a projectile motion equation to see if I could determine Terraria's gravitational constant empirically, using the formula
Code:
maximum_X = initial_velocity^2 * sin(2*initial_angle) / gravity
and I found something really surprising: it's different for each cart. While we all know there's a maximum speed on each cart, mentioned far less is that each cart accelerates differently- the mechanical cart accelerates and stops far more quickly than the wooden one, a fact which seems to be reflected in these results. I calculated the cart's g at each speed, and kept a running average. At maximum speeds, these averages were:
  • wooden cart: 34.904 tiles / s^2
  • iron cart: 37.809 tiles / s^2
  • mech. cart: 42.032 tiles / s^2
The initial velocities were assumed to be the horizontal velocities recorded by the Goblin Tech, at an angle of 45 degrees (since moving diagonally appears to not affect cart speed). I converted the speed to Tiles / s by assuming each tile was 2 feet (backed up by GPS data), then converting MPH to feet per second using standard conversions. Clearly there's a significant difference between the wooden cart's gravity and the mech. cart's gravity, which would explain the difference in distances!

To conclude, here's my data in detail. Do with this what you will. Warning, it's a large image.
2ABFkjw.png

Anybody know how to make a dart trap fire randomly? Say, every 'x' seconds, the dart trap will have a 'y' percent chance to fire?

Answer:
pbq said:
http://forums.terraria.org/index.ph...3-1-wiring-mechanics.43646/page-2#post-982621 explains how to make things random(inside the spoiler)
In a simple case where x=5 and y=50, place dart trap, 5 second timer and any logic gate with an on lamp, off lamp and a faulty lamp on top. Wire timer to faulty lamp, gate to the dart trap. Turn on the timer. If you have very precise and non-integer x and y requirements it can get somewhat more complex. Hope this helps.

Demagarose said:
I seem to remember Spear Traps being able to Crit, and the chance of them doing so being based off of your currently held weapon's crit chance.

However, in 1.3.1, my Ranger with all Lucky accessories, holding a SDMG with 92% crit chance showing, got ZERO crits from a full speed spear trap battery running for over a minute.

Is my memory faulty or did they remove crits from spear traps?

Answer:

NiraExecuto said:
Apparently this was changed in one of the more recent versions. Only projectiles that are neither NPC projectiles nor trap projectiles can deal critical hits.

Fury said:
Hey guys, I'm trying to build an animated pixel art a la @blackshadowwind and I haven't been able to close/continue the rapid teleportation loop. I have 6 pixel art frames, 6 teleporters and 6 red pressure plates on my practice dummy hoik loop. The first half of the animation works, however, when I reach the 6th teleporter, instead of looping around from teleporter 1 and continuing, I teleport slowly in reverse from tele 5 down to 1.


From lower left to right and then up around to top left the pressure plates are 1, 2, 3, 4, 5, 6.
Plate 1 is connected by red wire to teleporter/frame 1. Plate 2 is connected by blue wire to both teleporter 1 and 2. Plate 3 is connected by red wire to both tele 2 and 3. Plate 4 by blue to 3 and 4. Plate 5 by red to 4 and 5. And Plate 6 by blue to 5 and 6.

As stated, it works perfectly from teleporter 1,2,3,4,5 to 6, but then instead of looping around, I teleport slowly in reverse. I know it's a problem with my wiring. I also know there is wire color preference/order? Red then blue then green? I've tried replacing the blue wire to teleporter 6 with red and that just causes me to teleport back and forth between 2 teleporters.

Can anyone give me a solution? or point me to an image/explanation/video showing how to close the loop? @DicemanX ? I'd really appreciate it and will give you credits for helping my brain unravel the spaghetti monster of wire in my brain. Thanks!

Answer:

DicemanX said:
Since you're progressing from 1-2-3-4-5-4-3-2-1 then it looks like the 6th pressure plate isn't activating. There's nothing wrong with the loop, and all 6 pressure plates should be activating, so it seems that the 6th pressure plate is not wired to the two teleporters (frame 6 and frame 1) properly. Can you post a pic of the wiring to the two teleporters from the 6th pressure plate?

Update:

I successfully progress from 1-2-3-4-5-6 quickly and then 6-5-4-3-2-1 slowly. I am trying to go 1-2-3-4-5-6-1-2...etc. quickly in one loop so that the animation continues until I jump off the teleporter system, as seen in Blackshadowwind's video. I will edit this post in 10 minutes or so with the pictures:








Ok, hopefully those do the trick. @DicemanX - Thank you very much for the help, man! I plan on recording a video showing the wiring of this (after I clean it up a bit maybe) since Blackshadowwind's video doesn't show all the wiring and he's currently inactive?

That blue wire in the final shot simply connects to pressure plate 6. I tried several other things, and it used to be connected back to tele 1 with red wire, then green, etc. I just don't know how to close the circuit.

Talrey said:
Back on the topic of the thread, I actually have a question of my own... I've seen a bunch of discussion about "ultimate" machines and such, trying to get huge amounts of activations / second, and I have to wonder- what's the utility of those devices? Statues have a cool-down, as do traps. The machines themselves are really cool, but what do you use them for?

Answer:

inomanoms said:
Even if these output sources have cool downs, you can hook up an engine to a battery of traps or statues, to get better repetitive action out of them than, say, with timers which at 1 sec. are still slower than the cool-down on some items. Also, for processing logic. There is no real limit as to how fast you can go there.

winnie33 said:
Is there a mechanism that converts one single input signal in a few output signals, one by one?
For example: If i send a single pulse with a lever with a row of torches next to it, the torches would turn off one by one, with each about a second delay.
It doesn't really matter to me how the torches are turned back on; all at once or in the same way as they were turned off.

Answer:

inomanoms said:
Yes. This can be done with a timer cascade, or running a dummy down a hoiking track with pressure plates for more exact timings. :) Here is for reference:http://forums.terraria.org/index.ph...imer-cascades-with-shut-off-mechanisms.18060/.


Brain Goo said:
Where can I read something in detail about damage blocking? Is there any other options except slime statues? (I want to be able to use some melee weapon while damage is blocked) Spikes are not really working for some reason.

Answer (1.2.4 and earlier):

DicemanX said:
Spikes cannot block all contact damage, but a slime (or other mob) can if the slime is summoned ahead of any other mob.

You can "half-trap" your body in a slime chamber so that you are continuously hit by the slime and yet are free to use your weapon without killing the slime.

Answer (1.3 and later):

Spikes can no longer be used for damage blocking due to the 1.3 update. Half trapping your body in a slime chamber seems to be the best way to do it.

Brain Goo said:
Where can I read something in detail about damage blocking? Is there any other options except slime statues? (I want to be able to use some melee weapon while damage is blocked) Spikes are not really working for some reason.

Answer (1.2.4 and earlier):

DicemanX said:
Spikes cannot block all contact damage, but a slime (or other mob) can if the slime is summoned ahead of any other mob.

You can "half-trap" your body in a slime chamber so that you are continuously hit by the slime and yet are free to use your weapon without killing the slime.

Answer (1.3 and later):

Spikes can no longer be used for damage blocking due to the 1.3 update. Half trapping your body in a slime chamber seems to be the best way to do it.
One last request- Please don't clog the thread up with off topic posts and remember that normal T-Mech and TCF rules apply.
 
Last edited by a moderator:
I am trying to build a wire set up that turns a series of actuators off in order.
I want my hoik elevator to select floors. After screwing around for a while in game, I drew something up on paper:

01
01 01
01 01 01
01 01 01 01
01 01 01 01 01
01 01 01 01 01 01
01
where the '01' are binary switches and the bottom one is a wall swith, basically a binary 'on-off' wall switch
The problem I am having is getting this into working wiring since I am an idiot.
That is, I want to make the binary strings run like a combination, the bottom outputs an active every six flips of the green wall switch, the one above every five, etc.
I started with an IF - Then wiring idea, but that gets complicated with more levels...
 
Last edited:
I seem to remember Spear Traps being able to Crit, and the chance of them doing so being based off of your currently held weapon's crit chance.

However, in 1.3.1, my Ranger with all Lucky accessories, holding a SDMG with 92% crit chance showing, got ZERO crits from a full speed spear trap battery running for over a minute.

Is my memory faulty or did they remove crits from spear traps?
 
I seem to remember Spear Traps being able to Crit, and the chance of them doing so being based off of your currently held weapon's crit chance.

However, in 1.3.1, my Ranger with all Lucky accessories, holding a SDMG with 92% crit chance showing, got ZERO crits from a full speed spear trap battery running for over a minute.

Is my memory faulty or did they remove crits from spear traps?
Apparently this was changed in one of the more recent versions. Only projectiles that are neither NPC projectiles nor trap projectiles can deal critical hits.
 
Updated,
Woo, I'm one of the guys now!

You could add something like "theoretical / code-related questions" for me. Though we've got an awful lot of people for code-related questions now.

More people is always cool,

A question: Is there a "priority" for piercing weapons? like if I hit an enemy with a vilethorn at the same time that I hit it with a rocket which would pierce? or is it random?
 
A question: Is there a "priority" for piercing weapons? like if I hit an enemy with a vilethorn at the same time that I hit it with a rocket which would pierce? or is it random?
Since both the Vilethorn and the rocket are projectiles, I'd assume it depends entirely on their positions in the global projectile array - whichever comes first gets to deal damage. When a new projectile is created, the first free slot is chosen, so there's no real way to influence which projectile deals damage.
 
Last edited:
I've got a timer... timing question. If two timers activate in the same tick/frame, does anyone know what the order they're resolved in depends on? I know I could test it... but in case someone already knows, I figured I'd just ask first.
 
I've got a timer... timing question. If two timers activate in the same tick/frame, does anyone know what the order they're resolved in depends on? I know I could test it... but in case someone already knows, I figured I'd just ask first.
As far as I know, the one that was activated last pulses first. That's how cascading timers work - hook up a bunch of timers, each to the next one and previous one, and the signal will travel from one to the next.
 
Ah, right. I should have been able to figure that out... I know about the cascading effect but didn't put 2 and 2 together. :merchantconfused:

P.S. Here's a little titbit of research to add to that. Activating a timer twice in one tick neither raises its priority nor resets the delay. I found that slightly surprising.
 
Last edited:
I'm curious, does anybody have a way to make a 2 second timer? I'd like to avoid using teleporters, mobs, or hoiks, if possible
 
I'm curious, does anybody have a way to make a 2 second timer? I'd like to avoid using teleporters, mobs, or hoiks, if possible
A 1-second timer and a flip-flop seems like the best bet. I suspect you could use a timer cascade wired in a certain way too, but I wasn't immediately able to figure out how.
 
A 1-second timer and a flip-flop seems like the best bet. I suspect you could use a timer cascade wired in a certain way too, but I wasn't immediately able to figure out how.
Thank you! I have no idea how I did not think of that; It's such a simple solution!
[doublepost=1468554668,1468367707][/doublepost]How fast do hoiks move a dummy? For example.. how many hoiks would it take to create a 1 second delay?
 
I'm quite new to the forum, so if this question was answered before i apologize for the redundancy. Also, this is a very basic request :p
I wanted to create a switch that activates a trap every other turn and ended up with a setup like this:
Switch_ever_other_turn.png

However, this results in a "cooldown" for the switch because of the spear trap. Is there a better way to achieve this?
Thanks in advance! :D
 
I'm quite new to the forum, so if this question was answered before i apologize for the redundancy. Also, this is a very basic request :p
I wanted to create a switch that activates a trap every other turn and ended up with a setup like this:
View attachment 129588
However, this results in a "cooldown" for the switch because of the spear trap. Is there a better way to achieve this?
Thanks in advance! :D
Try this:
fb1bc74345.png


it's an AND gate, ON logic gate lamp, and a faulty logic gate lamp
[doublepost=1469470130,1469389206][/doublepost]Is there a sort of "weighted pressure plate" for entities? I'm looking for something that will activated when a dummy ghost steps both on and off of it
 
How many tiles does a Super Dart go before another one ready to shoot? If it seemed unclear, I want a Super Dart Trap fire, and then re-fire itself with its dart. So, how many tiles should the dart pass before they hit the re-fire plate?

Edit: Also, how many tiles the dart passes in a second?
 
Back
Top Bottom