This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Gavjenks's profile picture

Is there a way to hook into wireless redstone (chickenbones)?

Started by Gavjenks, 11 August 2012 - 05:43 AM
Gavjenks #1
Posted 11 August 2012 - 07:43 AM
Chickenbones' wireless redstone is a default mod included with tekkit right now, but unlike almost everything else in tekkit, there's no way that I know of at least to control it with computercraft, because the only way to change frequencies (that I am aware of) is by opening a GUI and setting the frequency as a human player. It can't be done by just redstone pulses or anything.

Unless I am missing something. Is there some sort of api or integration of these two mods already that I'm not finding in help or by searching here?

Thanks!
Lyqyd #2
Posted 11 August 2012 - 07:45 AM
Looks like not.
D3matt #3
Posted 11 August 2012 - 08:53 AM
WRCBE has an API but it's not implemented by CC. You'd have to write a peripheral.
Teraminer #4
Posted 11 August 2012 - 09:44 AM
http://www.computercraft.info/forums2/index.php?/topic/3328-peripheral-integration-with-default-wireless-tekkit-mods/

LOL
BigSHinyToys #5
Posted 11 August 2012 - 09:59 AM
This is a wireless bundle cable program UNTESTED and I offer No support for this

--[[
    wireless bundel cable
]]--
local freQ = 200
local sSide = "back"
rednet.open("top")
local function expand(iInput)
    local tOutput = {}
    local check = 32768
    for i = 1,16 do
	    if iInput >= check then
		    tOutput[i] = 1
		    iInput = iInput - check
	    else
		    tOutput[i] = 0
	    end
	    check = check/2
    end
    return tOutput
end
local function compact(tInput)
    local iOutput = 0
    local check = 1
    for i = 16,1,-1 do
	    if tInput[i] == 1 then
		    iOutput = iOutput + check
	    end
	    check = check*2
    end
    return iOutput
end
local function readMessage(sInput)
    local tSet = textutils.unserialize(sInput)
    return tSet
end
while true do
    local sEvent,isendID,sMessage,iDistance = os.pullEvent()
    if sEvent == "rednet_message" then
	    print("RedNet massage")
	    print(sMessage)
	    local test,output = pcall(readMessage,sMessage)
	    if test then
		    print("parsed Test")
		    if output[1] == freQ then
			    print("freq match")
			    table.remove(output,1)
			    rs.setBundledOutput(sSide,compact(output))
		    end
	    end
    elseif sEvent == "redstone" then
	    print("redstone Change")
	    local tRecive = expand(rs.getBundledInput(sSide))
	    local tOutput = expand(rs.getBundledOutput(sSide))
	    write("Inp>")
	    for i = 1,16 do
		    write(tRecive[i])
	    end
	    print()
	    write("Out>")
	    for i = 1,16 do
		    write(tOutput[i])
	    end
	    print()
	    local tDifrence = {}
	    tDifrence[1] = freQ
	    for i = 1,16 do
		    if tRecive[i] == 1 and tOutput[i] == 0 then
			    tDifrence[i+1] = 1
			    write("1")
		    else
			    tDifrence[i+1] = 0
			    write("0")
		    end
	    end
	    print("")
	    rednet.broadcast(textutils.serialize(tDifrence))
    end
end
Gavjenks #6
Posted 11 August 2012 - 06:44 PM
What? I was being responsible and asking before clogging the suggestions forum. Nobody said anything existed, so I moved it over there. Sorry for following the rules…
This is a wireless bundle cable program UNTESTED and I offer No support for this
I understand how to use rednet wireless. But unless it is built into CC's source code somewhere to specifically work with that wireless mod, no program you can ever write will do what I'm asking. The frequencies on that mod are data values of blocks, and cannot be changed by any redstone signal, no matter how fancy. Only by player GUI buttons. There are many advantages to having the compatibility, such as the fact that the wireless mod is vastly simpler to use, and thus more players will use it for their constructions, and having CC hook into it would allow fun hacking potential, etc. And other things.
BigSHinyToys #7
Posted 11 August 2012 - 06:56 PM
This is a wireless bundle cable program UNTESTED and I offer No support for this
I understand how to use rednet wireless. But unless it is built into CC's source code somewhere to specifically work with that wireless mod, no program you can ever write will do what I'm asking. The frequencies on that mod are data values of blocks, and cannot be changed by any redstone signal, no matter how fancy. Only by player GUI buttons. There are many advantages to having the compatibility, such as the fact that the wireless mod is vastly simpler to use, and thus more players will use it for their constructions, and having CC hook into it would allow fun hacking potential, etc. And other things.
ow well never mind me then I was just pointing out that you could replace all the wireless send / receivers with computers and use wifi to control Everything with out that mod. But ofc the simplest solution is to make CC magically able to interface will all GUI's in existence lol XD. CC is fully capable of emulating every function of that mod in its current state. It can do more that that mod could ever do.Including wireless bundles.
Gavjenks #8
Posted 12 August 2012 - 06:17 AM
No not at all. As I tried to explain in my suggestion thread, all that would need to happen to interface would be a rom program in CC, that is like:
1) user puts in a command like ">>freq left 1567"
2) CC first checks to see if the wireless redstone mod is installed on the server.
3) If so, it looks to the left. Is that block either a transmitter or receiver as per wireless redstone's config file?
4) If so, change its frequency to 1567.

That's all. It doesn't require the developer of CC to understand anything about the code of wireless redstone or even to collaborate with that dev, or to do any fancy coordination at all. Just changing one data value if another plugin shows up on the plugins list. That would be sufficient to do all kinds of crazy hacking awesomeness by writing CC programs to scan through frequencies and to listen through frequencies (by changing receivers systematically over time and listening), etc. etc. Or randomly scattering your force field code through a fibonnaci sequence, or whatever you want.

Also, it doesnt really matter much if CC can do more than that mod (which is highly questionable, as it lacks a lot of hardware, like trackers. With peripherals, sure, yes.). The other is so much simpler that it will always have its own popular niche with simpler minded folks. And CC folks should have a way to directly screw with those folks using superior programming and creativity! =) it's not a matter of "one or the other" It's a matter of "both WILL exist on servers together, and CC should be made so that it can win."
Cranium #9
Posted 12 August 2012 - 03:18 PM
Maybe this could be implemented in the future, like how CC works so well with bundled cables from RedPower.
Sammich Lord #10
Posted 12 August 2012 - 09:22 PM
First off,
Spamming a thread is not a way to get something added.
Second off,
I know many people who know Java and could write this very easily. Why don't you just spend a week or two learning simple parts of Java then write it yourself?
Having a program to change a fucking block data value is useless. If I was a CC dev I would not add something like this. Pretty soon people are going to ask for built in IC2 and BuildCraft support for CC.

Oh also wrong section of the forums to put this in.
Gavjenks #11
Posted 13 August 2012 - 07:21 AM
Spamming a thread is not a way to get something added.
Oh also wrong section of the forums to put this in.
Sheez, I would expect people to be a little nicer here about the fact that I am following your forum's posted rules and asking before I suggest (see suggestions forums instructions). So I searched. I found nothing. So I asked (this thread). I was told by a "pro" (who your forum instructions say I can trust for solid information) that it is not currently possible. So then I suggested it in the separate, appropriate suggestions forum. How is that spam, or the wrong section?

And how does my civil and polite following of the rules call for you swearing at me and being a jerk?

I know many people who know Java and could write this very easily. Why don't you just spend a week or two learning simple parts of Java then write it yourself?
Is the ComputerCraft main source code open for forking? If so, I will, gladly. Show me the way, that would be fun.
If youre talking about a peripheral, then no, because it doesn't make sense as a peripheral. That would be confusing and jumbled plugin organization to build another redundant peripheral for no reaosn. The peripheral device (the other mo'ds receivers and transmitters) already exists. Therefore, this is a case of something that if anything, would be a one-function API built into the core. Similar to basic things like redstone.setOutput() or the bundled cable interaction with redpower2.

Having a program to change a fucking block data value is useless.
I am not even sure what to say to this… like 99% of all matter in the minecraft world are blocks, which have an ID value, and a data value. How could one of the two numbers that define the fabric of our game universe not matter for any program? By that logic, we should be able to place disk drives in the middle of solid rock, because it's just a difference of one little ID value (0 for air, 1 for stone), after all. Too trivial of a matter for any plugin to address, surely…

It's not like I'm asking about changing wool colors randomly and out of context. It's a very computery, technology-based wireless mod that is very possible, very easy to link into, and totally fits the theme and utility and mission of something like computercraft.
Sammich Lord #12
Posted 13 August 2012 - 08:53 AM
The only mod that ComputerCraft has support for is Red Power and the support for that is only for bundled cables.
I heard Chicken Bones is taken suggestions for addons to his mod. Maybe ask him to make it change values differently like a redstone pulse in the bottom changes the ID?
But adding support may be possible in the future but Cloudy in a different thread has stated that he will not add support for it.
KaoS #13
Posted 13 August 2012 - 02:03 PM
I don't think it should be added to CC, it would make it too easy to break other people's machines
Teraminer #14
Posted 15 August 2012 - 09:26 AM
What? I was being responsible and asking before clogging the suggestions forum. Nobody said anything existed, so I moved it over there. Sorry for following the rules…
This is a wireless bundle cable program UNTESTED and I offer No support for this
I understand how to use rednet wireless. But unless it is built into CC's source code somewhere to specifically work with that wireless mod, no program you can ever write will do what I'm asking. The frequencies on that mod are data values of blocks, and cannot be changed by any redstone signal, no matter how fancy. Only by player GUI buttons. There are many advantages to having the compatibility, such as the fact that the wireless mod is vastly simpler to use, and thus more players will use it for their constructions, and having CC hook into it would allow fun hacking potential, etc. And other things.

I just said it so people can see the other info that was in there..