Jump to content




Redstone strength level detection


  • You cannot reply to this topic
21 replies to this topic

#1 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 05 January 2013 - 08:08 AM

Considering that minecraft seems to be adding devices that change how they work depending on signal strength i would suggest adding/changing 3 functions in redstone Api
  • redstone.getInput
    To return second variable coding signal strength
    redstone.getInput("back") --> "true" , 5
  • redstone.setOutput
    To accept optional thrid variable coding signal strength
    redstone.setOutput("back",true,5)
  • redstone.getOutput
    To return secondvariable coding signal strength like getInput
    redstone.getOutput("back") --> "true" , 5
Hopefully you see what i mean to convey in this post :D
Also i believe this change would have low or no impact on existing programs. Could be wrong thought.
Thoughts?

#2 gngz

  • Members
  • 31 posts
  • LocationPortugal

Posted 05 January 2013 - 08:24 AM

Trying to make analog signals?

#3 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 05 January 2013 - 08:30 AM

well in latest snapshots there are 5 things that emit signal strength depending on situation
  • trapped chests outputs number of players looking inside
  • light sensor outputs light level
  • item pressure plates change strength depending on number of items
  • comparator is ..... well i am not even gonna start explaining that one
It would be nice to be able to receive those messages and react to them (or simulate them for use of comparator)

#4 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 05 January 2013 - 08:30 AM

This is something I'll consider when 1.5 is out - until then there's not much point adding it - and it is indeed not simple to get the signal strength.

#5 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 05 January 2013 - 08:32 AM

Thats all i am asking and tx for answer :D

#6 ChunLing

  • Members
  • 2,027 posts

Posted 05 January 2013 - 09:35 AM

Won't you be able to tell differences in redstone power by propagation distance? So you just make a multi-path wire from a variable redstone source, and the stronger the signal, the further extensions of the path it will reach and activate. Admittedly, that will take a bit of space, so I guess you can use a line of comparators to digitize it (that's what their for, right?).

I don't see the need for computers to be able to tell redstone signal strength apart, except to save people the effort/expense of making their own signal strength digitizers.

#7 OmegaVest

  • Members
  • 436 posts

Posted 05 January 2013 - 11:09 AM

WWWWOoooooowww. I suggested something like this in. . . April. Got ignored. Wonderful to hear it's being considered, even if it isn't my thread. With the Redstone update, I guess it'll be more important.

#8 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 05 January 2013 - 11:13 AM

View PostOmegaVest, on 05 January 2013 - 11:09 AM, said:

WWWWOoooooowww. I suggested something like this in. . . April.

Back in April, Mojang weren't making devices sensitive to different strengths of redstone, and which could output different strengths of redstone.

#9 ChunLing

  • Members
  • 2,027 posts

Posted 05 January 2013 - 05:07 PM

Yes...well, since they are also providing the means to effectively digitize those different strengths, I'm still not sure I see the need. Particularly if it is not simple to implement.

#10 Sebra

  • Members
  • 726 posts

Posted 05 January 2013 - 11:26 PM

You do not see? Imagine you want to know how many people look in that chest. How would you setup comparators? How many? And for turtles large external is rarely an option.

#11 ChunLing

  • Members
  • 2,027 posts

Posted 06 January 2013 - 02:57 AM

Mojang is designing the system to not need computers at all. They aren't adding a set of integrated features that will only be remotely useful if someone has CC installed.

So no, I see this as about as useful a suggestion as having a special mode for interacting with witches. Which might be a fun extra to add, but I'm not voting in favor of it at the expense of PDA development time.

#12 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 06 January 2013 - 01:37 PM

Why do you always argue with new features? What's the harm?

#13 ChunLing

  • Members
  • 2,027 posts

Posted 06 January 2013 - 03:17 PM

I just like things the way they are. A lot. So I'm not in favor of messing with things just for the sake of messing with them.

But I also feel like most new features need to be challenged to clearly show some definite improvement, a reason that they would be worth implementing. That way there is a clear goal in mind, which is important.

And I honestly would rather have as much development time going into PDA/notebooks as possible, I'm quite fond of that idea.

#14 OmegaVest

  • Members
  • 436 posts

Posted 06 January 2013 - 05:35 PM

... So I sat down and just thought about what ChunLing said, for about ten minutes. I'm gonna put it in spoiler tags, because, while it pertains to the topic at hand, it is a rant, and I'd rather not dirty up this page with the like, but I feel it need be said, so pass it on by if you just want to hear my thoughts on the suggestion, and/or my response to Cloudy.

Spoiler


Whew. Okay, so rant over. In response to Cloudy's quote of me, I realize that was the case. I was merely remarking on the. . . imbalance. I was trying to be impassive, but in text voice is hard to do.

So, basically: I like this suggestion. Have since I tried in April. Love that it is getting attention somewhere. Can't wait to see it, and I desperately hope that Eloraam, Dan and Cloudy come up with something awesome for Redstone wires. Probably gonna be on Eloraam's side, but seriously, having a RS Wire always output 256 or something would make my life tons easier, when I figure something out to do with it. Hmm. That seems a lot lighter after writing a four-paragraph essay.

#15 matejdro

  • Members
  • 324 posts

Posted 07 January 2013 - 01:14 AM

Problem with OP's suggestion would be breaking every current program that uses redstone. Combining idea from april, this would be ideal:

rs.getAnalogInput() would return number, old one with true/false would still work.
rs.serOutput() could have true/false OR number. So I could do rs.setOutput("back", 10) or rs.setOutput("back", true), which would translate to 16. Is that even possible with lua?

#16 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 07 January 2013 - 01:24 PM

In vanilla there is currently no way to output a specific redstone signal strength. It can be read in a roundabout way (reading the metadata of the block next to the computer if that block is a redstone wire) but that will not work with, say, red alloy wires.

View Postmatejdro, on 07 January 2013 - 01:14 AM, said:

Problem with OP's suggestion would be breaking every current program that uses redstone. Combining idea from april, this would be ideal:

rs.getAnalogInput() would return number, old one with true/false would still work.
rs.serOutput() could have true/false OR number. So I could do rs.setOutput("back", 10) or rs.setOutput("back", true), which would translate to 16. Is that even possible with lua?
Yes, it's possible with Lua.

#17 ChunLing

  • Members
  • 2,027 posts

Posted 07 January 2013 - 08:17 PM

I'm not seeing how it would break any existing programs, as long as the suggested rs.setOutput() accepted nil as max (like a lot of other number argument functions do).

With regards to the idea that random novelty is inherently preferable to features that most everyone is really interested in using...I suppose that's a matter of taste? I'm not sure I would characterize this as a random novelty either. It just makes something easier that you can accomplish by using the other blocks Mojang is providing for that purpose.

And yes, as I've pointed out, you can have a portable rednet terminal by carrying a named turtle around, placing and breaking it as you like. But I've tried this...and it ended up making 1.4^ less fun for me than 1.2.5 with a PDA (a peripheral that I doubt really caught on much because it demanded you write all your own input/output for it). I'm seriously playing mostly in 1.2.5 because of that.

I may well decide, after playing with variable redstone devices for a bit, that the comparitor+distance drop just isn't adequate, and having these functions revised is essential.

Like how I feel about having a portable device.

#18 Sebra

  • Members
  • 726 posts

Posted 07 January 2013 - 11:19 PM

Yes, PDA is preferred. Just not old PDA peripheral connected to comp.
And if RP2 Red Alloy Wires remains "digital" it would be quite easy to "digitize" RS signal with proper setup:
RRRRR...<-redstone dust
IIIII...<-colored wires
BBBBB...<-bundle
But I hope it would be quite easy to implement this suggestion.

#19 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 08 January 2013 - 12:50 AM

View PostSebra, on 07 January 2013 - 11:19 PM, said:

Yes, PDA is preferred. Just not old PDA peripheral connected to comp.
And if RP2 Red Alloy Wires remains "digital" it would be quite easy to "digitize" RS signal with proper setup:
RRRRR...<-redstone dust
IIIII...<-colored wires
BBBBB...<-bundle
But I hope it would be quite easy to implement this suggestion.

View PostSebra, on 07 January 2013 - 11:19 PM, said:

Yes, PDA is preferred. Just not old PDA peripheral connected to comp.
And if RP2 Red Alloy Wires remains "digital" it would be quite easy to "digitize" RS signal with proper setup:
RRRRR...<-redstone dust
IIIII...<-colored wires
BBBBB...<-bundle
But I hope it would be quite easy to implement this suggestion.
Red alloy wires are analog.

#20 Sebra

  • Members
  • 726 posts

Posted 08 January 2013 - 01:26 AM

Do you have RP2 for 1.5?
I know it's limit like 256m but behavior seems discrete.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users