Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

dgelessus

Members
  • Content Count

    158
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by dgelessus

  1. The question is whether that setting is stored on the actual card item. If not, then there would be no way to set that setting on a fresh robot without manually powering it on.
  2. Robots can't use GUIs, so in this case robot.use() does nothing. If you run robot.swing() afterwards it will try to punch/mine the robot. The reason why I suggested the sneak-right-click method was because that doesn't require any GUI interaction, but unfortunately robots cannot do a sneak-use, so that isn't an option either.
  3. Any kind of computer (including robots) can be powered on by sneak-right-clicking, but I don't think robots can "sneak"... Item exchange between robots shouldn't be hard, you should be able to put items into the other robot as if it were a chest.
  4. Tja, diese Forum-Software ist genial und mir ist gerade mein ganzer Post verloren gegangen. Kurz gesagt: Forge und Bukkit sind zwei unterschiedliche Sachen. Forge braucht man für Mods, Bukkit braucht man für Plugins. Der Unterschied zwischen Mods und Plugins ist, dass Plugins nur auf dem Server installiert werden, während Mods sowohl auf dem Server als auch auf allen Clients installiert sein müssen. Mods können deshalb viele Dinge im Spiel ändern, die Plugins nicht ändern können. OpenComputers ist ein Mod, kein Plugin, daher kannst du es nicht auf einem Bukkit-Server installieren. Forge und Bu
  5. Both Minecraft 1.7 and 1.8 are supported. There are almost no other mods out yet for 1.8, but that will probably change soon. This means that at the moment all computers run for free and don't require power, and obviously most mod interaction isn't possible. The 1.8 version may also have a few small bugs that the 1.7 version doesn't. If you're okay with those things, then you can try the 1.8 version. The differences between the two versions aren't very major. Sowohl Minecraft 1.7 als auch 1.8 werden unterstützt. Es unter 1.8 bisher kaum andere Mods, das wird sich wahrscheinlich aber bald ä
  6. I didn't know that was even possible Probably a good thing now that you mention it. Full support. "Removing a disk wipes the raid."
  7. Hard to say much without seeing the actual API and code, but it definitely sounds interesting. How exactly do different scripts access and control the GUI? Does every script have access to all frames, or are frames bound to a script? Does the "process tree" have something to do with the GUI, or is that just another feature of the OS? Do all processes run simultaneously, and can they interact with each other in some way? (I'll stop throwing questions at you now ) Regarding import, does it do anything GUI-specific that require doesn't? Because if it's basically the same as require (load
  8. As I understand it OC automatically doesn't require power if you don't have any power-generating mods installed. (Unless that was recently changed.)
  9. The proper way to do this would be using the rc system (/etc/rc.cfg and /etc/rc.d/). I can't find any documentation on how to use it, so here's a rough guide: In the /etc/rc.d/ folder, create a new Lua script (e. g. autorun_cc.lua). The script must define a start function that can take at least one argument. That function is executed when the system is started, and can contain whatever code you want. In your case that would probably be os.execute("cc.lua v"). Now edit the /etc/rc.cfg config file. Add the name of the script (e. g. "autorun_cc") to the "enabled" list. Done. This is only the mos
  10. pcall is really straightforward. Say you have this function: function errorOnDemand(param) if param then error("You asked for it.") else return "some stuff", "you'll see this later" end end (if you pass it true, it errors out.) To run the function and catch errors, do this: success, returned1, returned2 = pcall(errorOnDemand, true) print(success, returned1, returned2) -- false you asked for it success, returned1, returned2 = pcall(errorOnDemand, false) print(success, returned1, returned2) -- true some stuff you'll see this later The first argument
  11. Does "error" mean a normal Lua error (where you get a traceback) or a blue screen/OS crash? In the first case you can use the standard Lua `pcall` function to check whether the function ran successfully and catch any potential errors.
  12. And I thought my Windows 95 laptop with a whole gigabyte of hard drive space was funny nowadays. That thing became unusable a few years ago though due to a lack of usable floppy or CD drive. Its Win95 soul has since passed on into my VirtualBox, where it runs at a 1600*1200 True Color resolution that it could only dream of before. There was also that one Macintosh running Mac OS whatever version, which got the computer mutation of Alzheimer's disease. It kept forgetting that its screen actually supported colors. And sixteen of them even. But hey, at least it could run Pac-Man. Oh how fun
  13. TCPNet perhaps? Linked Cards are so much simpler though... Your decision, if you want to do it this way, go ahead.
  14. For inter-dimensional communication you can use a pair of Linked Cards. That way you don't have to rely on an external server to return all data to the sender. You just need to make sure that both computers are in loaded chunks (either near the spawnpoint or manually loaded using a chunk loader block). To communicate between servers you'd need an extra program running on the real computer on both sides that passes network signals through to an in-game computer, because by default the Minecraft server doesn't do that. I'm not sure how exactly that could be done though, it might involve writing
  15. Small tip: there are a few places in-game where you can find documentation as well. First of all checking an item's NEI usage page will have one page with a general description, and a second one with a Lua API reference, if any. For components you can also check their API from the interactive Lua prompt: lua> component = require("component") lua> component.eeprom { ... a list of all EEPROM methods ... } Not entirely. EEPROMs only have access to Lua's built-in functions and a few core OC APIs, a full list can be found on the wiki's tutorial on writing custom operating systems. (That
  16. The current forum skin hides the action buttons below posts by default unless you hover over the post. On touch devices (smartphones and tablets) there is no way to do that, so it is impossible to quote people or edit posts. Not a major issue, I can of course just use a regular computer, though it can sometimes be inconvenient.
  17. Nice tutorial, I like the detail - I have a good amount of experience with the OpenOS shell, but I could probably still learn something from here. A few comments: The whole case sensitivity thing is not entirely true. Although ls ≠ Ls, if you're on Windows you still can't have ls.py and Ls.py in the same folder, because Windows is case-insensitive like that. In a normal Unix shell you'd assign envvars using "export name=value", "set name=value" or simply "name=value". I think there is a "set" command in OpenOS.
  18. FYI, you can use hexadecimal number notation anywhere. Lines 8-14 could be written like this: local red = {} red[1] = 0x000000 red[2] = 0x330000 red[3] = 0x660000 red[4] = 0x990000 red[5] = 0xCC0000 red[6] = 0xFF0000 The whole color brightness thing now also makes much more sense. In your first post it sounded like you just wanted all distinct colors to loop through all the values more efficiently. I don't know enough about color sciences (is that a thing? lol) to say anything constructive about that part, but hopefully you'll figure it out.
  19. It's certainly not impossible to do this, though it is definitely a lot easier to keep everything in-game. It might be easier to first implement everything in OC Lua, and once you have that working try to port the server to a stand-alone language. I have never tried to write a server from scratch myself, so I can't help you with any specifics there. If you're looking for a language to write the server in, you should give Python a try. It is a scripting lanugage like Lua and you'll quickly see certain similarities between the two, though they are very different in many aspects. In general P
  20. See my reply in your other thread on this topic. (Trying to keep the discussion in one place.)
  21. OpenComputers indeed only supports 8-bit colors, but still uses hex notation, which can reference over 16.7 million colors, so iterating through all of them would be highly inefficient and would lead to a lot of technically identical colors. @Eunomiac has created a nice reference image showing all colors supported in OC and their hex values, you may find that useful: http://oc.cil.li/index.php?/topic/442-/#entry1751
  22. As Sangar said, you should never need to use the numerical ID of a block or item, ever. Since Minecraft 1.7 Forge does all ID assignment automatically, and in almost all cases you should be using unlocalized names like minecraft:cobblestone instead. There is no guarantee that IDs remain consistent if you add, update or remove mods, and they can vary even across worlds and servers. As of Minecraft 1.8 it is also impossible to use numerical IDs in-game, at least in commands such as /give. (Reading numerical IDs is also somewhat agains OC's concept of remaining "in-character" and not being able t
  23. Perhaps don't try to do this over the internet? Seriously - it would be much easier to connect your vending machine to a second computer via an (in-game) network cable, or if necessary a wireless network or two Linked Cards. If you were to send the data over the internet you'd need to worry about having a real server running on some computer and have it accessible over the internet. You'd also need to find some other language to write the server in. Lua is meant to be an embedded language used to script other applications, and although you can run Lua standalone I don't think there are any rea
  24. Looking at the source code for event.lua it looks like you should be able to clear all timers like this: local event = require("event") event.timers = {} Be aware that this might break things relying on timers - I don't believe the default OpenOS shell has any background timers running, though the same might not be true for other scripts.
  25. Programming an EEPROM is technically writing an OS, because there is nothing else on the microcontroller itself that could have an OS. But yes, as the page says, many of the high-level libraries are not available outside of OpenOS and you'll need to use their lower-level counterparts. The wiki search is terrible btw. A search for "microcontroller" returned no results, and "computer" gave me only a few hits on the home page. No matter how extensive your wiki searches are, you won't be finding anything with the search function.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.