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

Leaderboard


Popular Content

Showing content with the highest reputation since 03/18/18 in all areas

  1. 5 points
    https://minecraft.curseforge.com/projects/openpython https://github.com/EcmaXp/OpenPython OpenPython makes micropython available on OpenComputers. micropython is Python for embedded devices and is different from CPython. Currently, micropython is partially compatible with Python version 3.4 as of October 2018. Features include: - Fully persistable. - Runs in a sandboxed environment and does not require a separate native DLL. - Supports virtual file system. - It can call other components and supports Lua architecture's UserData. Limitations include: - The firmware is 256 KB and the memory limit has the same limit as the Lua architecture, but the stack is allocated in a separate memory. - Most modules are difficult to use because the battery is partially included. - The operating system is not yet fully implemented, so the Python interpreter now runs. - Ctrl + C is not supported, so if you accidentally run infinite repeated code, the only way to stop it is to turn the computer off and then on. To use the Python architecture, you need the following items: - EEPROM (OpenPython): I'm sorry, but you have to bring items from the Creative tab. - Floppy Disk (OpenPython OS): This item can be obtained by creating a floppy disk and Scrench, or you can check it on the Creative tab. - OpenPython CPU: You can choose OpenPython architecture by holding Shift + Right Click on the Lua architecture CPU. It is still unstable, but we plan to make further improvements in the future. I need help from people who are familiar with OpenComputers and Python. Thank you for playing.
  2. 5 points
    asie

    Introducing "Lunatic"

    No spoiler in the title. Just watch the video.
  3. 4 points
    Features: FlatScreen Panel frameless screen which can be configured to be "rotated/tilted" on the x/y axis and can render transparent (they work as normal Screens, Touchinput will be improved in the final release) CardDock external housing for OpenComputer Cards which can be bound to any machine in the Network Cases additional Tier3 computer cases from ZefTheFox Download on curseForge for Minecraft 1.12.2 https://minecraft.curseforge.com/projects/ocdevices
  4. 4 points
    MineOS is half the operating system and half the graphical environment for OpenOS, which comes in OpenComputers mod by default. Oringinally it was developed in Russian, but it supports several languages. MineOS has following features: Multitasking Windowed interface with double buffered graphics context Animations, wallpapers, screensavers and color schemes Language packs and software localization User authorization by password and biometrics Support for file sharing over the local network via modems Support for client connection to real FTP servers Error reporting system with the possibility to send information to developers App Market with enormous amount of wonderful applications and possibility to publish your own programs for every MineOS user An internal IDE with syntax highlighting and debugger Open source system API and detailed illustrated documentations Custom EEPROM firmware with the possibility to select/format the boot volume and Internet recovery Almost complete compatibility with OpenOS software How to install? First, you need to install OpenOS from floppy disk to your HDD. After that you'll be able to run MineOS installer via single command: pastebin run 0nm5b1ju System requirements: Internet Card OpenOS installed on Tier 3 HDD Tier 3 GPU 2x Tier 3 RAM Tier 3 CPU (not really matters, just speed up) Troubleshooting: Are there any problems, suggestions? I'll be glad to see you on the operating system repository: https://github.com/IgorTimofeev/MineOS
  5. 4 points
    Fingercomp

    Guide to the Sound Card

    The sound card is added by Computronics, a wonderful addon for OpenComputers. There are a few who actually know what it does. Even less people are able to use it. No one dares to understand how it works, or so I hope. Anyway, it appeared a few years (?) ago, and is still mostly undocumented. There is a page in the in-game manual, which fails to explain how great the card is. Of course it does! It has a heap of different methods, which you can use to cast many crazy magics to make the sound card sound, and it's impossible to teach someone to do magic by reading a single page. OK, I'm serious now. Last year I managed to understand how to use it, and even wrote a few posts about that. In Russian. Half a year later, I translated them to English. And now I thought of posting a topic here so that you could read them, too. Here's the link. The first two parts are all about basic things, like getting simple sounds, ADSR, and modulation. The third part features a little bit more complex things, like complex numbers and Fourier transforms. I tried to keep it simple, so I could get something wrong. If so, please leave a comment there pointing out the mistake. Grammar fixes are also highly appeciated.
  6. 3 points
    sence i saw igor Timofeev's mineos i was thinking if it was posible to get those static windows to move and infact there is: welcome to the first showcase of the (really un-creative named) tacti OS: as you can see it figtures moveable, sizeable, and interactive windows infact all programs running in the OS will be windowed! useing my easy-to-use windowLib and windowed-program-api i'll happyly resive any feedback (download link avalable in the below posts) (also its gonna happen anyway so come with those grammer currections poeple, i can take it) i hope you guys will like my project -thanks
  7. 3 points
    Fingercomp

    Drone usage?

    Of course there is. Assembling a drone with a leash upgrade produces a drone that can transport cows, horses, sheeps, and pigs. Like this: Or... like this: Besides, drones are entities. They move in straight lines; they don't get stuck in the fence and can actually enter a house through a door. They move pretty fast — about 6 blocks a second (robots are at least 2 times slower). Drone's movement is asynchronous, so the machine can execute some other code in the middle of the flight. Drones can fly above the block height limit. The screenshot above was made while enjoying the flight at a height of 260 blocks, for example. Oh, they can fly below the bedrock, too. Also, drones look cool. Jobs at which drones clearly outperform robots include player transportation (thanks to the leash upgrade) and item transportation (due to their mobility). And, if used with robots, drones can be useful for crop farming, autocrafting, and construction, for example.
  8. 3 points
    Luca_S

    advancedLoader - Better BIOS

    This BIOS allows you to choose the boot device by either using the arrow keys or clicking/touching the monitor. When using the keyboard use Enter to boot, when using clicking/touching click an unselected entry to select it, click a selected entry to boot it. If there is only one bootable medium, that medium is autobooted. The default selected option is the last booted device. This supports booting from filesystems, using /init.lua as an entry point or from drives(HDDs or Floppys in unmanaged mode), by loading code from the first sector until the first \0 character appears as lua code. (From what I've seen unmanaged drives are mostly ignored in OC, which is kinda sad.) Screenshots: To install: (This file contains the code needed to flash the BIOS as well as the BIOS code itself, it will ask before flashing it to the EEPROM) pastebin run Cx4aTipt
  9. 3 points
    OpenOS has absolutely proper pipes now, such as those you invoke with `cat file | grep foobar`, and a kick butt threading library (read https://ocdoc.cil.li/api:thread ) As for virtual components? No, there is nothing built into OpenOS for virtual components, but gamax92 has written a nice vcomponent library you can add via oppm, `oppm install vcomponent` Plan9k is retired, to be honest. It was ahead of its time, but is now outdated. OpenOS is faster, lower memory, has gobs of great libraries, super awesome command line parsing, and is ACTIVELY developed. I might be biased....
  10. 3 points
    Fingercomp

    make opencomputers processors faster

    Please calm down. There are some component methods that block the computer for a tick when called, yes. Such methods usually interact with the world. For example, a transposer allows to transfer items between invetories by calling the transferItem method, which takes a tick to execute (so you get up to 20 stacks/second). On the other hand, there are a lot of direct methods, which can be called several times per tick. For example, the GPU's methods are direct. And the processor (as well as RAM) determines how many direct calls are allowed per tick. I think T2 T3 setup allows you to call gpu.get one thousand times every tick. Or 256 gpu.sets. Or 128 gpu.fills. I also believe you don't realize how bad ComputerCraft is for servers. A really simple and stupidly-written program can eat up all the memory the server has. That's why OC limits the memory available for an in-game computer. And running CPU-intensive tasks on a CC's computer makes the whole server run slow, whereas OC requires scripts to pause to allow other in-game computer to run. OpenComputers imposes the limits not because the mod developers want users to suffer (although I do sometimes think of that when I try to do some stupidly complex things with it), but to make it server-friendly. What's important is that OC allows you to configure these limits for your needs. Have you opened its configuration file? It is more than a 1.5k lines long, and has more than 300 settings you can change, each with a comment that explains the effect of the setting. There's callBudgets to increase the direct call number limit. Or decrease it. There's also the ramSizes setting for memory, and hddSizes for the HDD sizes. But even with all of these limits, OC can run a lot of programs, including graphical shells, 3D games, reactor control systems. It allows you to send HTTP requests to the real websites, and open raw TCP sockets to interact with network services. It can display 320x200 images. It can even play videos — inside the game, and on the default OC settings!
  11. 2 points
    Log

    Robot-miner with geolyzer

    I present you a program for a robot that allows you to mine ore without going down into the caves. Robot, using a geolyzer, can find and mine ore. All features are not yet implemented, so I ask you to test and inform me about a bugs. Requirements: Computer case (tier II or III) Inventory Upgrade (more the better) Inventory Controller Upgrade Hard Disk Drive EEPROM with Lua BIOS Geolyzer RAM (tier I or higher) CPU (any) Hover Upgrade (tier I) Diamond pickaxe or equivalent tool Optional: Crafting Upgrade Wireless Network Card or Linked Card Battery Upgrade Experience Upgrade Chunkloader Upgrade Generator Upgrade Enderchest from EnderStorage mod Installing: Download and save the file as init.lua wget https://raw.githubusercontent.com/DOOBW/geominer/master/miner.lua init.lua Put this file in to root directory of the hard disc. Add the disk when crafting a robot. Place the robot on a solid blocks platform. Give the robot a pickaxe Place a container and the charger near the robot. Press the power button and enjoy a process.
  12. 2 points
    And just to push it over the top into the rediculous area I've doubled it again to 256! That should be enough for forever. (I even had a lot of trouble coming up with so many for testing)
  13. 2 points
    THIS MOD IS NO LONGER SERVICED, PLEASE DOWNLOAD THIS INSTEAD!!! A while ago there was a post on here about someone making custom cases, I am not that person but I do have a release. This may be improved upon in the future but as of right now it is in a completely usable state. This is a client side replacement for opencomputers. Do not use with normal opencomputers. This will be updated to release versions of OC and will not be for 1.7.10 Theoretically this should be usable as a client connecting to a server with normal opencomputers, this was not tested. To use this install this modified version of opencomputers, it includes a custom case with it. If you want a different case you can choose to install a resource pack, I have made 2 so far. If a resource pack says it is incompatible for any reason ignore it, it's a single number in the pack.mcmeta that has to be different for certain minecraft versions, it will not effect the pack. The default case that comes with the mod: 1.10, OC version 1.7.3 1.11, OC version 1.7.3 1.12, OC version 1.7.3 NZXT Case: download IBM 5150 Case: download Let me know of any issues, or any suggestions for future cases.
  14. 2 points
    Zorya BIOS Zorya BIOS is an extendable and configurable BIOS and bootloader, capable of booting any OS with the right extensions. It's similar to GRUB. (sorry in advance for bios.lua) All you need to install the BIOS is to flash bios.lua to a blank EEPROM, insert a blank floppy, then reboot. Note: This has only been tested on Tier 3 hardware and Lua 5.3. requires an Internet card. Github repo PRs are welcome! Future plans: Ability to load from non-managed disks (like disks formatted with msdosfs, etc) Make it easier to extend Clean up code! Ability to edit options from bootloader Automatically load an OS after n seconds
  15. 2 points
    payonel

    No Bootable Medium Found

    that is a ComputerCraft disk drive, not the OpenComputers disk drive
  16. 2 points
  17. 2 points
    This is an object-oriented library, the main priority of which is the maximum possible performance. It works on the double buffering concept, it has a lot of widgets, animations and custom event handlers support. All programs from the screenshots above are implemented with its help. If you want to develop a fast and beautiful program in just a few lines of code without butthurt - then this library is made for you. Detailed illustrated documentation, installation methods and tons of practical examples are available at: https://github.com/IgorTimofeev/GUI
  18. 2 points
    Luca_S

    make opencomputers processors faster

    While it is not possible to tell you exactly what to do instead, here are a few things you should've done a little bit differently to make this more pleasant and helpful for everyone: Your title: "make opencomputers processors faster". You are asking a question in your post which you want answered, why not make that the title instead: "How do I increase or remove the limits of the CPU/RAM?" This makes it easy at first glance for everyone to see what you try to accomplish "make [...] processors faster" sounds like you are giving someone the command to do so, which is not good when asking questions. What would've been even better is to ask a question in relation to your program(e.g. "How can I optimise a program for <this>?"), however that would require you to show the program to the community, which you seem unwilling to do so.(Also you should note that this decreases the chances of you getting help) Your post You should've clarified better what your actual problem was. E.g. "This program(<link to program>) is running slow, I tried <this and that> to optimise it, but it doesn't seem to work. I would be grateful for any ideas" Your first reply: "right... how lovely... ONLY ONE COMPONENT CALL PER TICK!!! JESUS duckING CRIST... that most be a joke, right? Screaming at people/Writing in all caps is not very well perceived by most and will not get you anywhere This also doesn't add something really constructive to the discussion Better would be something like: "This seems pretty slow. Is there any way to increase the component calls when in single player?" I guess that reply was written in a lot of anger, but if you are angry at something, it might be better to write the post, not click submit, wait a few minutes until you've calmed down and think again if this post will be constructive in any way "so i can see that buffer api thing have the standart gpu functions so i give the infomation to the buffer (eg buffer.set(2,2,0xff0000, 0, " ")) and the buffer api will only do a gpu.set opration when it has to limting unnessary gpu.set's? is that how that works?". This was actually a pretty good post: It shows that you've checked out the topic and know what you are talking about It states a clear question The three posts here are a bit unnecessary and could've been put in one post asking "I've tried this: <code here> and it doesn't work. I have <this and that> problem." These are just a few random thoughts about how you could've gotten/will get better help.
  19. 2 points
    This is a simple door opening script that requires a password to be entered. That being said it took me a ridiculously long time to work out all the bugs. It works by taking an input from one computer and sending it to another to check if the password is correct. This makes it much harder to simply look at the file to check what the password is. It also now has the ability to automatically encrypt your password if you have a T1 data card along with the server asking you to input a password on the first run. These ideas came from the user RandomRedMage Requirements: At least 2 computers with basic parts 2 Network cards or Wireless Network cards Redstone T1 card Data card T1 (optional) The pastebin id for the server version is 8Y2y9xH3 The pastebin id for the client version is F5P5V05P Source code for both here Currently it needs to be placed into /home/bin and named door.lua to work but editing the 4 spots where os.execute is called will let you place it wherever with any name Also you need to enter the password twice the first time it is booted in order to have both computers recognize each other this can be circumvented via hard coding the address of the modem of each system into the other or adding a file into each /home/bin called MAC.psd with the modem address of the other. It is currently set up for only one computer but it could easily made to work for multiple by making the address var into a table and having a loop check thru them though that may slowdown the process.
  20. 1 point
    Nexarius

    Hep with my code?

    Print3d doesn't check getMaxShapeCount() at all. Go to your OpenComputer config file and check the value of "maxPrinterShapes".
  21. 1 point
    CptMercury

    IC2 reactor control

    Hey, here is a list of all methods for ic2 reactors. local component = require'component' local reactor = component.reactor reactor.getHeat() reactor.getMaxHeat() reactor.getReactorEUOutput() reactor.getReactorEnergyOutput() reactor.producesEnergy() You have to connect the reactor via an adapter.
  22. 1 point
    XyFreak

    Big Reactors Grid Control

    Hi everyone. A while back I promised more releases, so here you go: Big Reactors Grid Control is a multi reactor/turbine controller for Big Reactors and Extreme Reactors. Mission goal: Be the best big reactors controller there is. Nothing more, nothing less. First things first - here's the website: https://tenyx.de/brgc/ Main features Active and passive reactor support Support for multiple reactors and turbines at the same time (n:m) Control active and passive reactors with the same controller Automatic configuration of everything (EVERYTHING!) Setup instructions wget the installer from here: http://xypm.tenyx.de/standalone/brgc_installer.lua Run it Done Big Reactors Grid Control comes with three rc.d files: /etc/rc.d/brgc_reactor.lua /etc/rc.d/brgc_turbine.lua /etc/rc.d/brgc_grid.lua If you want the controller to run at boot time, you can just use OpenOS' rc.d schema. There's a GUI as well as a command line utility for advanced users. To start the gui, simply run "brgc_gui" and watch the magic happen. The gui scales the screen resolution to match the screens ratio and should scale with basically all screen setups. I recommend 3x2 or 4x3 screens. As of now the command line utility allows you to do (almost) everything you can do with the GUI and also allows you to change the controllers configuration at runtime (if you so desire). Check out "brgcctrl help" for further information. How to set up the grid In a basic setup you just interconnect everything: All active reactors can output steam to all turbines. All passive reactors and turbines output energy to the same grid. You CAN have passive reactors and turbines output energy to different energy grids. While this poses absolutely NO problem for passive reactors, you will have to set some turbines to "independent"-mode (more on that below). If you want your reactors and turbines to properly cooperate, you'll also need to connect at least one energy storage block to your energy grid. Currently supported storage "blocks" are: EnderIO Capacitors (requires the mod "Computronics") Draconic Evolution Energy Storage multiblocks. RFTools Energy Cells Thermal Expansion Energy Cells Mekanism Induction Matrices You can connect them using OpenComputers Adapters. Discovering new components As mentioned before the controller tries to autoconfigure everything: Passive Reactors When a new passive reactor is connected to the controller, the controller will first try to measure its maximum energy output. The reactor will have its output increased step by step and the average (interpolated) maximum will be used for that value (CALIBRATING). After calibration has been completed, the controller calculates the most efficient energy output of the reactor. Active Reactors When a new active reactor is connected to the controller, the controller will first try to measure its maximum steam output (CALIBRATING). For this to work correctly the reactor must be able to output at least SOME steam (read: you need a consumer) and you will need to provide sufficient ammounts of water. The controller will detect reactors with a potential steam output greater than 50 B/t and limit its energy accordingly. Turbines When a new turbine is connected to the controller, the controller will first try to measure its maximum energy output (CALIBRATING). For this to work, make sure your turbine is built correctly. This means your turbine can be run at maximum supported steam (25mb/t per blade) without exceeding 1950 RPM. Should your turbine exceed 1950 RPM at any stage, the controller will shut down the turbine and flag it as failed. Note: Your turbine is NOT required to be able to process 2000 mB/t. Smaller turbines work perfectly fine. Screenshots After this wall of text, here're some screenshots (pre 4.2). Setup: Main view: Passive reactor details: Active reactor details: Turbine details: Let's go in order: When you start up the GUI you will be presented with the main view. Here a combined overview of passive reactors, active reactors and turbines will be presented. You can click (or touch) on any of these items to open up a detailed view of the component. Here you can enable/disable the component or change its behaviour. What behaviour? This is where it gets interesting. Passive Reactors You will notice that passive reactors have two modes and an "auto" mode. PWM This is the behaviour everyone knows: The reactor gets turned on when its internal energy storage drops below 10% and gets turned off when the energy storage exceeds 90% of it's maximum capacity. In PWM mode the reactor will generate energy at its most efficient rod level. Overall this mode allows the reactor to generate energy as efficiently as possible as long as your actual energy consumption is below or equal to its optimal energy output. But sometimes you need just a bit more energy and you don't want to upgrade your reactor or build a new one. "Classic" controllers will fail to produce sufficient ammounts of energy here. This leads me to the second behaviour: Load In "Load"-mode the reactor will always aim to produce energy at the same rate as it's consumed. Maybe some people already suspect what that mode is all about: It's a PD-like regulator. While "Load"-mode is not as efficient as PWM-mode in situations where the energy consumption is below the optimal energy output, it will guarantee you're never running into energy shortages - provided you're not exceeding the reactors maximal capacity. Auto "Auto"-mode aims to eliminate the disadvantages of both modes by combining them: If the energy consumption can be satisfied with PWM-mode, PWM will be used. If the energy consumption is above optimal levels, "Load"-mode will be used instead. As a result, "auto"-mode generates energy as efficient as possible while always saturating your energy demands. Active Reactors As of now, active reactors only operate in "load" mode. Steam is consumed and produced way too fast and the reactors internal steam storage does not allow for anything else. Turbines Turbines controlled similar to reactors in "load" mode: The controller will always try to balance the turbines internal energy storage out to 50% by using a PD-like regulator. Turbines can be operated in "ganged"-mode or in "independent"-mode, with "ganged"-mode being the default. The only difference between these two modes is that turbines in "ganged"-mode can be shut down by the controller, while "independent" turbines will always be active, even if they overproduce energy at the lowest RPM allowed. This is handy if one (or more) of your turbines produces energy for a seperate (dedicated) energy grid but has to be controlled by the same controller. If such a turbine is not in "independent"-mode it may be shut down which will lead to energy failure in that grid. That's it for now. If you have any questions, want to report bugs, etc., feel free to drop a message here. Also: Do you want an indepth tutorial on how to use the command line utility? Need a description on what the GUI is actually showing? Have fun XyFreak
  23. 1 point
    MeltingBrain

    Zorya BIOS and Bootloader

    Just make two copies, one bios.lua being the original one with a very clear and user-friendly code, and a second one compressed using this site. That's how I could make a coloured user interface BIOS with of course ability to choose which file on what filesystem will be booted up, ability to flash bios from the bios menu itself and ability to get bios data into a file from the bios itself too, with the options to shutdown and reboot if necessary. Trust me, compressing the file will give you a lot more space for expansion.
  24. 1 point
    MeltingBrain

    Window Frontend

    There are no tutorials of such, but it's definetly possible (MineOS is an operating system that is compatible with OpenOS and has a powerful user interface). Please read the wiki for more information on the topic. You'll need to search around the GPU api, as it's the api that allows you to draw on the screen, and get used to signals as it's the only way to get user input. Hope I helped
  25. 1 point
    Zen1th

    OETF #14 - OHML

    OHML is a markup language based on XML, it is a simpler, OC-graphics adapted version of HTML.Par Part 1: Why i got that idea? It all started when i noticed that most network programs/libraries were either DNS system, or Website system. I tought it was very important to maintain an universal language for webpages. It is the first step of having a stable and universal "OCnet", which will follow with server and client implementations. Protocols, etc.. To finally have it united. It would mostly be useful with GERT since it allow for one, global, routing technology. Part 2: OHML versions OHML patch versions (1.0.1, 1.0.5, etc.) minor changes (more understandable descriptions, new optional arguments) can be asked in comments section, might get accepted, and when features are froze, set as a new minor version of OHML specifications. OHML minor versions (1.2, 1.1, 1.42) will accept features (new tags, deprecations, rename of tags/arguments, etc.) can also be asked in comments, they will get a seperate title from their major version, and have the space feature-freeze process than patch versions. OHML major versions (2, 4, 5) can start from a little draft based on a major feature (removal fo tags, minor/medium changes in way how code is wrote, etc.), and then should be put in another OETF thread, to add new features, validate them, and polish them. OHML v1.0 tags: Table about all tags and their (XML) arguments is available in png format, attached to this topic. Examples: Image: <image file="blabla.pic"></image> = "blabla.pic" showen as PIC (MineOS image) format Text: <text>Hello!</text> <text>World</text> Script: <script lang="some_script_language">Some multi-line script</script> Hyperlink: <a href="/superdupernews.ohm">Show super duper news</a> OHML v1.0.1 revision: Tags can now have optional arguments "x", "y", "width", "height" and "relative" The "relative" argument is for using relative positions, vertical at first, and horizontal at last, we can use "up" (default) or "bottom", put a ";" for splitting, and add the horizental value that can be "left" or "right". Relative positions works that if for example the value is "bottom;right", and if x = -5 and y = -5, the element Y will be at the most bottom point of the page (meaning that bottom for a page with elements not going after 10 for y, the bottom would be 10), added -5, which is equivalent of minus 5, and the element X will be at most-right point (generally viewport width) and will have minus 5. Meaning that for a viewport with size of 80, 25, it would go at 75, 20 Part 3: HREF format An HREF format defined in <a> tag can be relative or absolute. If a href starts with any supported protocol name followed by "://" (ex: ohtp://), the link is fully absolute and should be coutned as the same than if the user inputed it as a website. It's a normal URL Then, if a href starts with "/", it is relative to the website host (can be ohtp://test.com), so, the full path is: {WEBSITE HOST} + {HREF} Finally, starts with nothing above, it is relative and should be appended to the actual URL URL are in the same format than real ones (protocol://host://webpage) OHML, being a markup language, will not support any kind of dynamic coding like <if> statements, <print> statements, etc., dynamic coding is handled by <script> tags and scripts languages supported by the browser. (Currently no script language has been made, it's coming). Anyway thanks for reading that long document about OHML, feel free to ask me things. I am actually making a protocol for it (OHTP) and then a basic server + client implementation. A OHML decoder hasn't been done yet, but since OHML is based on XML, any XML parser will do the job, then just show tags appropriate content and here it is! OHML is ready for any people making a script format and a web protocol. Community will choose by itself which one is used.
  26. 1 point
    Sweet. I just built a new reactor with all mods updated and it worked for me with the gate touching the reactor... i placed the gate after the reactor was already formed tho so placing it beforehand might be an issue. I also noticed that attaching a second energy injector has gotten kinda wonky once the reactor has formed so for now it might be a good idea to fully build the reactor first (and open the GUI) and then place everything else around it.
  27. 1 point
    @CocoVanChoco The reason the reactor is shutting down is because you enabled "failsafe" - this option doesn't do what you think it does and i advise against using it - it becomes useless after past 11% fuel conversion anyways. The reason your reactor is filling up is because energy can not be transferred away from the core fast enough (if at all)
  28. 1 point
    LORD MJ

    Help with wireless redstone

    No worries @Molinko. I really appreciate you taking your time to help me with this problem. Thank you.
  29. 1 point
    Molinko

    Help with wireless redstone

    I apologize @LORD MJ as I'm on the road atm and internet is spotty place to place. Thanks to @payonel for the input, you're a wonderful pal for strolling the forums with your insight. P.s the update looks awesome
  30. 1 point
    payonel

    No Bootable Medium Found

    I need to see how your disk drive is "connected" to this computer
  31. 1 point
    Molinko

    control door piston

    The issue is within the checkPassword function definition. Change the '&' symbol to the 'and' keyword. This should resolve the current error.
  32. 1 point
    Cell is a graphical file manager for OpenComputers that allows you to browse files and open them in other programs, such as the editor or simply running .lua files. You can also customize what programs can be used to open files through the programs.cfg file. Tutorials: Browsing files/directories Select files/directories by clicking on them in the panel on the right side of the screen If a directory contains a large amount of files or sub-directories, use the arrow buttons to scroll through pages To go up a sub-directory, click the up arrow To change directory to a sub-directory, select the sub-directory, and click on "Open..." in the options panel (bottom left) Using programs Select file/directory Select an option from the options panel (Run, Edit, Delete, etc.) Creating files/sub-directories Navigate to the directory where the file/sub-directory will be created Select "New File..."/"New Directory..." from the functions panel (top left) A prompt for the name will appear at the bottom of the screen. Enter the name for the file/directory Adding programs Open the programs.cfg file in the editor Add a new line for your program Warning: The syntax for the programs.cfg is very strict, and will not accept extra spaces/empty lines Enter this info separated by semicolons: Program name Text for the options menu File types (separated by commas, for all files put "all", for directories put "dir", for specific file types, put the extension including the ".") Command that runs the program ("?file?" is a wildcard for the selected file/directory) Additional options (separated by commas, does not require semicolon or comma at the end) "s" prevents Cell from erasing the screen before running the program For example, the line that add the editor is: OpenOS Editor;Edit...;all;edit ?file?; Minimum Requirements: Tier 2 Graphics Card Tier 2 Screen Tier 1 CPU 2x Tier 1 Memory Internet card only required for installation To install, run wget https://raw.githubusercontent.com/Elektron72/Cell/master/installer.lua installer.lua installer.lua At the prompt, enter the path where Cell should be installed. Since this is currently in beta, report bugs at https://github.com/Elektron72/Cell
  33. 1 point
    This operating system is already one of the best OpenComputers operating systems I have seen. When will there be a text editor/file creation?
  34. 1 point
    Greetings Blood Mages and mortals, Are you like me? Trying to keep stock of your blood slates without fear of running out mid-operation? Or just simply don't have time while working on other forms of alchemy, thaumaturgy and technology? Then you are in luck! For I have managed to wrangle the beast of our Altar into a handy program! OK. I'll stop that now... While working on my altar setup, I wanted a way to automate slate creations, and the best my google-fu could do was finding a mod called Sanguimancy, left behind back in MC 1.10.2. I wanted a way to automate slates that did not require constant management, like a filtered pipe or conduit system would need. So I began to think... Of all the mods I had (in the FTB Revelations pack at least) OpenComputers seemed the most likely to work. So I got to work researching and experimenting with Blood Magic and OpenComputers, until now... I present to you BloodCtrl! (alpha...) Main Features Automated Blood Slate creation Active monitoring of Blood levels in Altar and reserve tank Possibly Many Bugs... wait... Minimum Requirements Please be aware that this program was written on all Tier 3 components and is optimized for them. Tier 2 Computer Case Tier 1 CPU or Tier 2 APU 1x Tier 1 Memory Tier 1 GPU (if using CPU) Tier 1 Hard Disk Drive Tier 1 Redstone Card Internet Card (temporarily) Lua BIOS EEPROM Tier 1 Screen Keyboard Transposer Installation Install OpenOS Run "pastebin get NpeViDMT BloodCtrl" Setup and Use Place Transposer behind your Blood Altar Place a Chest on top of the Transposer Place a Stone storage block to the Left of the Transposer Place your computer and screen to the Right of the Transposer, any configuration you would like (Optional) Place any type of fluid tank behind the Transposer Power and Turn on computer Edit and Run BloodCtrl Before BloodCtrl will work correctly, you will need to specify which sides everything is on. By default, I have included my setup but this may not work for everyone Take your time and find out which sides are connected to which blocks. For example: The Chest would be above the Transposer, so its side would be 1 as part of the Sides API Once you have all the sides configured, change any other Variables you may wish. Your desired slate counts, your altar tier level, etc. You will need to provide either a chest or some form of autocrafting of Stone for BloodCtrl to use. By Default and what I have used is a Refined Storage Interface with a crafting card and 3-8 Stone in the first Output Slot (See Pictures below) Please be aware that BloodCtrl does not produce or control Blood Creation, it only monitors and displays Blood levels and redstone at this time. You will need to provide blood by your own means. Bugs If any slate stack is empty or in the wrong slot, the program will crash (Workaround: make sure there is at least one of each slate at all times) If there is no stone available when crafting a Blank Slate, the program will crash (Workaround: make sure there is at least one stone at all times) There is no way to close the program without restarting the computer Planned Features Better UI Bar for blood levels Color (if supported by screen) More overall stability Media Pastebin Link: https://pastebin.com/NpeViDMT Images: https://imgur.com/a/CtIdUXY Video: Comming soon? Have Fun Blood Mages! Haybale100 Credits and License stuff Thanks to WayOfTime and everyone who works on Blood Magic Thanks to Sangar and everyone who works on OpenComputers I distribute this program with a CC BY 4.0 License. Feel free to edit it as you wish
  35. 1 point
    asie

    Nadeshicodec - 320x200 OC video encoder

    https://git.asie.pl/asie-minecraft/Nadeshicodec Apologies for scarce documentation, it's a bit of a project dump. It has a GUI, however. Feel free to fork and clean it up with the terms of the license in mind.
  36. 1 point
    payonel

    Multi Threaded Send and Receive

    > I want to create a server that pulls the modem_message event and prints to the console Cool, you can `listen` or `pull` for that event > but I also want the computer to be able to send messages (based on io.read()) while waiting for a message. `listen` works well for background handling, while in the foreground you are doing other work (such as io.read). However, you want your background to also print to the console? That'll obscure/interfere (visually) with the io.read getting user input. But okay > I tried using threads Sure, threads can do this job too. With threads, your event handling can be designed in a more selfish manner. You can `event.pull` and such without worrying about blocking the rest of the system > but I think I am using them wrong. Feel free to share some code! > As far as I know there is no thread.sleep() so I'm not sure how to suspend a thread for a short period of time No, there isn't. But, calling `os.sleep` from inside the thread is identical to what you would expect from `thread.sleep`. **HOWEVER** (please keep reading) > so that you can still type messages, but still have that thread automatically continue. How would I go about doing this? I wouldn't call `os.sleep` in THIS program because you want your thread to handle specific messages. `os.sleep` is a RUDE sleep, it DROPS events in the garbage. If any modem_messages occur during the sleep, you missed them. Instead, just pull with a timeout, `event.pull(.5, "modem_message")` in fact, I don't see the point of giving a timeout at all. Is your modem_message thread doing anything else or just waiting for modem_messages? Just call `event.pull("modem_message")` in your thread, done local thread = require("thread") local event = require("event") local t = thread.create(function() while true do local pack = table.pack(event.pull("modem_message")) print(table.unpack(pack)) end end) while true do local command = io.read() if command == "quit" then break end end t:kill() BTW: os.sleep *does not* rob events from any other thread or process, it only throws away events of its own process
  37. 1 point
    I whould have tryed to save my position in this argument but that point is simply to good You are right (i gave up quteing at this time...) The thread was not related to any program when this thread was made i was still on the CC side of the community i did rellate it to a program later tho with the checker patten thing i made "it was a joke yes" he lied While thinking about hes math was crappy and forgot how many ticks Per secount minecraft haves. No qestions was asked after that, sens the man infront of him sems to be able to read hes mind. "..." the man lost hes apillity to talk, turned around and walked away "the tree post here..." ye i guess my problem was OC's apillity to Update screens and Why there was so aggressive limits in genual (and yes You May not comment this Line please) conclusion: i suck at forums you are right in all most all your points in You lates post i suck at forums ohhh Wait i Ran out of ideas... Why did i make a list...
  38. 1 point
    Yeah, there is a way to make it faster. In fact, way faster. One of the things that makes it slow is... gpu.setBackground. It's quite expensive in terms of perfomance (tier 3 GPUs consume 1/128 of the call budget when this method is called). Fortunately, your program only involves 4 colors, so it can be easily optimized. Actually, there are two ways to do it. A somewhat naive way would be to process all cells of one color first, then process all cells of another color, etc. That would solve the issue with gpu.setBackground, but there's another thing to worry about. The gpu.set method isn't free. In fact, that program does 160 × 50 = 8000 sets, assuming it's running on the max tier 3 resolution. And that is a lot. Fortunately, OC supports Unicode. In particular, there's a character in Unicode called a full block — █. On OC, I prefer to think of it as of an inverse of " " (a space). If the foreground and background colors are swapped, the space would look like the full block, and vice versa. And it can help us reduce amount of GPU calls significantly. Try replacing the loops with the following: -- i = 0 gpu.setBackground(0xff0000) gpu.set(1, 1, " ") -- i = 1 gpu.setBackground(0x00ff00) gpu.set(1, 2, " ") -- i = 2, 3 gpu.setForeground(0xffff00) gpu.setBackground(0x0000ff) local fullBlock = "\u{2588}" local oddRow = (" " .. fullBlock):rep(math.floor(mx / 2)) local evenRow = (fullBlock .. " "):rep(math.floor(mx / 2)) for y = 1, my do local x = 1 if y % 2 == 1 then if y == 1 then -- Shift the x by 2 to the right to avoid rewriting -- the first two characters. -- OC truncates everything that goes out of the screen bounds, -- so there's no need to worry about that. x = x + 2 end gpu.set(x, y, oddRow) else gpu.set(x, y, evenRow) end end I can't launch Minecraft to run the program and measure the render time, but I can calculate the amount of call budget consumed by the GPU. Assuming the program runs on a tier 3 GPU and screen, there are 4 gpu.setForeground/gpu.setBackground calls, and 52 gpu.set calls. We get (4 × 1 / 128) + (52 × 1 / 256) = 15 / 64 ≈ 0.23. This is enough even if you have a tier 1 processor (whose call budget is 0.5), and the program should be able to run at 20 FPS, though it doesn't really change each frame. Oh, I meant to say "T3" (tier 3), sorry. A tier 2 GPU can only perform 128 sets and 64 fills. https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala#L55-L60 Also, there's a comment a few lines above in that file, which reminds me of yet another reason OC makes indirect calls take 1 tick to run — synchronization. OpenComputers, very much unlike ComputerCraft, saves the state of running computers so that they can be resumed when the chunk is reloaded. Methods that interact with the world in some way (like moving items around) must perform synchronization with the Minecraft world to avoid, well, messing things up. The comment says it's especially important on world saves. Despite that, the GPU methods were made direct, although a "nasty trick" was needed to do this. Well, safe concurrency is hard to achieve.
  39. 1 point
  40. 1 point
    I have this error help ^^ Conf:
  41. 1 point
    I feel like I should add some more information.. Just some things I learned asking around and poking at the OpenOS source. So here it goes. Term "windows" aren't really a feature of the OS, they're kinda hidden, and in my quest to abuse them I learned that at the moment they're kinda 'half baked', although functional. If you look at the `term` library you'll see that a lot of methods take an optional `window` argument but the library lacks a documented way to create or get a new or active pty. Wtf mang. Another tip would be to note that the computer has no preference for screen and/or keyboard proximity, hence why you're in this mess in the first place. So it would be handy to know that the "boot screen" is what will become the "primary" screen component and thus the init process(highest process in the OS) will bind the boot screen and first gpu compatible with that screen. `tty.window` is referenced in `process.info(init_index).data.window` You can see more of this reflected in the concept of primary components and that even extends to the /dev dir... i.e. -- # get the first non-'primary' component of `ctype` local function getSecondary(ctype) -- # dev component/ listings start at 0. Thus /dev/components/by-type/`ctype`/1 is the second gpu.. local fd = assert(io.open('/dev/components/by-type/'..ctype..'/1/address', 'r')) local address = fd:read('*a') fd:close() return address end You could use this in my example above. local component = require "component" local process = require "process" local term = require "term" local function getSecondary(ctype) local fd = assert(io.open('/dev/components/by-type/'..ctype..'/1/address', 'r')) local address = fd:read('*a') fd:close() return address end -- # Get the first non-primary gpu and screen, assuming that this is in a condition where we want to switch the screen... local termGpuAddr, termScrAddr = getSecondary('gpu'), getSecondary('screen') local termGpu = component.proxy(termGpuAddr) termGpu.bind(termScrAddr) local window = term.internal.open() term.bind(termGpu, window) window.keyboard = component.invoke(termScrAddr, 'getKeyboards')[1] local init_index = 1 while true do if process.info(init_index + 1) then init_index = init_index + 1 else break end end process.info(init_index).data.window = window I hope some of this info may save you some time.. Good luck. And feel free to ask away bud
  42. 1 point
    1. Require looks if the library has been loaded before and if so it just returns the cached version, otherwise it searches in some predefined paths (usually the current directory, /lib and /usr/lib) for the library, reads the content of the file and uses the load() function to parse and execute the lua code, it caches the returned value from the executed lua / library file (so it is faster if the library is required again) and returns it. You can find the OpenOS implementation in /lib/package.lua 2. You don't have to make any library for a custom filesystem. In theory you can do everything with the filesystem component. But many systems implement a object oriented filesystem api and also a way to mount other filesystem component (like /mnt in OpenOS). Again you can look at OpenOS implementation in /lib/filesystem.lua and /boot/90_filesystem.lua. If you want a custom directory structure you can also do that. OpenOS uses a unix like structure but you can also make your own. If you use Lua BIOS the only requirement is a init.lua in the root directory, but you can also change that by writing a custom BIOS, if you want. EDIT: You might want to add basic programs to list, copy, rename, delete and edit files and directories and also to go to another directory (like "cd").
  43. 1 point
    Hello. So you know how to make a program in ComputerCraft and you want to switch to OpenComputers or just want to know OC better, this tutorial shows you how to use OpenComputers. 0. Some concepts you have to know You can think of Components like Peripherals in CC. They are basically the same require is a function in Lua that returns a module. It can be compared to ComputerCrafts os.loadAPI. But require doen't load an API global like loadAPI, instead it returns the API and it doesn't return the _G table that the api defines. It returns what the loaded File returns like a function. More examples to that later in that Tutorial A computer from OC has no OS and no BIOS. So a computer can't start or load something without an Lua EEPROM and a typical OS, with a fancy Text terminal and some programs, is also not available without installing OpenOS first. That makes setting up a OC Computer a bit more complicated but it allows you to make a real OS for your Computer and not just a fancy UI or a Overlay to the predefined Operating System. An Address is used instead of the peripheral name and the ID in ComputerCraft. So your computer won't get the name "computer_0" or the id 0. The Address is a random UUID string and not a number that increments for every computer. So a Address looks more like "cd6c4e39-bbb6-491c-826d-48112912f44d". That can be a problem to remember, but components are usually uniquely identifiable by the first 3 characters of the UUID and later we will learn some other tricks to copy them. You can't shutdown a Computer with Ctrl+S or restart it with Ctrl+R. You have to type "reboot" or "shutdown" in the console or press the green button in the UI for the Computer Case. To interrupt a program in OpenComputers you press Ctrl+C or to forcefully kill it you can press Ctrl+Alt+C. In ComputerCraft you would press Ctrl+T and there is no way to forcefully kill a program in ComputerCraft other than restarting the computer. A Computer doesn't restart when you leave the world or the chunk unloads. Instead they keep the memory and the program running on it won't notice that the computer stopped for a moment. Some features are only available with cards. Like the Internet Card for HTTP and TCP (also Pastebin and Wget), Redstone Card for sending and receiving Redstone signals or a graphics card for connecting to a screen. Memory is limited and the amount you can use is determined by the Memory Items you put into the Case Your computer will use Power (If you didn't disable it in the config). Cases can convert RF and other electricity types into OC's own power system. There is also a Adapter that can convert power faster. Creative Cases generate their own power. 1. How to build a Computer If you play with ComputerCraft you just place one block and done. In OpenComputers however you need more. What you have to craft: ComputerCase .... Better Tier means that you can have more components and also components with better tier. CPU or APU ... The Tier of the CPU determines the amount of components that can be connected to your computer. The APU has the same features like a CPU but it can replace the Graphics Cards. OpenComputers allows you to have different Languages by default Lua 5.3 is selected. You can change that by shift+rightclicking the CPU or APU in your hand. Memory ... The memory determines the amount of RAM your program can use. Graphics Card (if you didn't craft a APU) .... This will determine the resolution and the color your screen can have. A Tier 1 Card can only display black and white (like a basic CC Computer) a Tier 2 can display colors (like an advanced Computer) and Tier 3 can display more colors. Screen ... The screen determines the resolution and color like a graphics card. The setup will only be as good as the weakest part. So if you have a Tier 1 Card and a Tier 2 screen you can't display colors and the resolution will only match a Tier 1 setup. So both GPU and Screen should have the same Tier. A Tier 2 or 3 Screen can also handle touch events like an Advanced Computer from ComputerCraft. Keyboard ... The keyboard doesn't really do anything other than enabling the GUI of the screen to type something. Without a keyboard you can only look at the screen and use it as a touchpad (if you have Tier 2 Screen or higher). Disk Drive ... A disk drive is similar to the disk drive in ComputerCraft. A tier 3 cases and a creative cases have a builtin Disk Drive, so you don't need one if you selected one of these cases. OpenOS Floppy ... This item contains the OpenOS ready for installation. This floppy won't get consumed so you only need one and as long as you don't lose it you never have to craft a new one. Hard Disk Drive ... This allows you to store data. The tier determines the amount of storage you have. (Lua BIOS) EEPROM ... This is the BIOS that loads our OS. It is required for the startup of our computer. If you have crafted one, you can copy the EEPROM by combining the Lua BIOS EEPROM in a crafting Table with an empty one. The setup: As you can see on the first image, the power cable can be connected directly to the case (no need for the adapter in this setup). The keyboard has to be a neighbor of the screen, but it doesn't have the be placed on the screen. So if you want to build a fancy table in from of the screen with the keyboard on top of it, you can do that. The Disk Drive and the screen is placed directly next to the case, you can also place the case somewere else and connect the screen and the drive via a cable, like in ComputerCraft. (except you don't need modems) In the second picture you see, how you have to put the components into the UI of the case. The tier of the component has to be the same or lower than the number shown in the slot. OpenComputers helps you by highlighting possible slots and items in your inventory and also in JEI if you have it installed, you just have to hover over the item to see possible slots or hover over the slot to see possible items. In the second picture you can also see, that items get an address. That would be the address of the component if the items acts as a component. Like a redstone card would give you the redstone component. If you have TOP (The One Probe) or WAILA installed the address of a component is also visible in there. You can see them on Cases, Screens, Redstone IO blocks, ... . If you don't have WAILA or TOP installed you can use an analyser from OpenComputers to get the address. If you hold Ctrl while rightclicking a block with the analyer you can copy the address of that component block. 2. Install OpenOS As I already mentioned, the OS is not preinstalled when you build the Computer. You can write your own OS, but that's not what we want to do here. So now its time to put the OpenOS disk into the Disk Drive. You can open the GUI and put it in the slot or you can shift rightclick the disk drive (doens't work on the integrated disk drive in Tier 3 cases). The disk drive block will show you the inserted disk. If you now start the computer by pressing the green button inside the gui or shift rightclicking the case with an empty hand, the light of the computercase will light up with a green color, and you should hear some floppy noise. You should see something like this if you open the UI of the screen. Sadly we are not done yet. If your try to type in " edit test.lua " you will see the error message "file system is read only", that's because the OpenOS disk doesn't store anything on your computer it is a fixed storage, if you craft an empty floppy you would be able to store files on it. But in our case we already installed a Hard Disk Drive we just have to boot from it. To do that we have to copy OpenOS onto it. To do that you simply type " install ". The program asks you if you want to install OpenOS. Now you have to type " y " and enter to start the process. This will take some time. After it is done the program will ask you if you want to reboot. So you can type "y" again. There shouldn't be much floppy sound and more sound from the hard drive. You can now take the floppy disk out and try " edit test.lua " again. It should now open the text editor. In the text editor you can press Ctrl + S to save and Ctrl + W to exit. 3. Troubleshooting So chapter 2. didn't work and your computer won't turn on. If the green light is on but you don't see anything on your screen. It's likely that the screen is not connected or you forgot the graphics card. If there is only a red blinking light you should see a error message in your chat, if that's not the case build an analyser and shift + rightclick the case. You should see the "Last Error". These error messages should tell you what went wrong. Somtimes you also get a blue screen with an error message. If you see the message "Too many components connected" it can means 2 things. One is that you exceeded the maximum amount of components that are allowed for your CPU Tier or you forgot the CPU. 4. Programming This is not a full Lua tutorial I will show you some basic programs and show you the difference to ComputerCraft. First we have to create the file. Simply type "edit test.lua" to open the editor and yes all lua Programms should end with ".lua". Since I want to work with redstone, I put a tier 1 redstone card in the second slot of my case. Since it is the only redstone component it is also the primary component. The primary component should be the first connected component of a type. In this example the redstone card is a "redstone" component. You will see why this is important in a second. --First thing we have to do is to load the component library. --Some libraries are loaded by default but "component" we have to load manualy --Thats the biggest difference from ComputerCraft, that APIs are not loaded from the beginning. local component = require("component") --OpenComputers defines sides as numbers and not as a string like ComputerCraft --But we don`t want to learn every number for every side so we can load a library that does that for us. local sides = require("sides") --Now we see what primary component means. OpenOS defines the primary component as a variable with the name of the type in component. --So we can access component.redstone and will get the redstone card. Later I will show you how to connect to multiple components of --the same type. local redstone = component.redstone while true do --Set the redstone output to 15 (maximum strength). The first argument defines the side. We use the sides api here to help us out --You can also put 3 instead of sides.front but as I sayed we don`t have to remember every number redstone.setOutput(sides.front, 15) --"os" is a library thats loaded by default. We use the sleep function to sleep for 500 milliseconds os.sleep(0.5) redstone.setOutput(sides.front, 0) os.sleep(0.5) end (Sorry it seems like the coloring is a bit off) INFO: You can paste ingame by pressing your mouseweel in the UI of the OpenComputers screen. This program has no exit condition so the only way to stop it is with Ctrl+Alt+C (or reboot the computer). So how can you load multiple components with the same type? We first have to get the Address. You can copy the address into the clipboard by holding Ctrl while clicking with the analyser on a component block. As I mentioned in most cases the first 3 characters in the address should be enough. Lets do the same thing with with a redstone component. --First thing we have to do is to load the component library. --Some libraries are loaded by default but "component" we have to load manualy --Thats the biggest difference from ComputerCraft, that APIs are not loaded from the beginning. local component = require("component") --OpenComputers defines sides as numbers and not as a string like ComputerCraft --But we don`t want to learn every number for every side so we can load a library that does that for us. local sides = require("sides") --This line now contains 2 functions. The proxy function is the same as peripheral.wrap in ComputerCraft but it needs an address and it doesn't work with --sides. To get the full address out of the 3 Characters we have to search for it. The component api has a builtin function called "get" for this purpose. --If you copy the full address with an analyser you can get rid of the component.get call and give the address directly to to proxy function --You should replace "a37" with the address of your redstone card or redstone IO Block local redstone = component.proxy(component.get("a37")) while true do --Set the redstone output to 15 (maximum strength). The first argument defines the side. We use the sides api here to help us out --You can also put 3 instead of sides.front but as I sayed we don`t have to remember every number redstone.setOutput(sides.front, 15) --"os" is a library thats loaded by default. We use the sleep function to sleep for 500 milliseconds os.sleep(0.5) redstone.setOutput(sides.front, 0) os.sleep(0.5) end You can find more information about the apis here: https://ocdoc.cil.li/api In the section "Standard libraries" you can find the libraries that are loaded by default and you don't have to require them In the section "Custom libraries" you can find the libraries that are offered by OpenOS and you have to call "require" in order to load them More information about the components can be found here: https://ocdoc.cil.li/component Many APIs that are built into ComputerCraft are moved to components in OpenComputers like "HTTP", "Redstone", "Rednet", "Disk", "Fs" (partially), "Turtle" (Robot in OC). Fs and Disk are mostly moved to the "filesystem" component, which allows you to get the empty space, rename the disk and basic File access. The "filesystem" api is a more abstract, which allows you to work with file "objects" and it has some more features. HTTP is the internet component in OpenComputers and it is provided by the internet card. The internet component also allows you to make raw TCP requests. The Rednet API in ComputerCraft is basically another way to access the modem peripheral in CC so you can find it in the modem component from OC, which is available if you add a network card or a wireless network card to your setup. Events work similar to the events from ComputerCraft but they have their own Api in OpenComputers called "event". You can find a list of signals (other name for event) here: https://ocdoc.cil.li/component:signals So lets make a example for a touch event: local event = require("event") while true do --This will wait an infinite amount of time for any event local ev, arg1, arg2, arg3, arg4, arg5 = event.pull() --"interrupted" event is fired when you press Ctrl+C if ev == "interrupted" then return --The "touch" event is fired by the screen and gives us: The Screen Address (1), X & Y - Coordinate (2 & 3), The Mouse Button (4) and the Player (5) elseif ev == "touch" then print("Player " .. arg5 .. " touched screen " .. arg1 .. " at X="..arg2.." Y="..arg3) end end You can also filter for one event / signal or give the "pull" function a timeout. If you want to filter for multiple events you can use event.pullMultiple(). More information here: https://ocdoc.cil.li/api:event If you want to handle Ctrl+Alt+C in your program you have to handle errors thrown by event.pull(). You can do that with pcall() but I won't go into details here (this is a normal lua function, so you can search it online). If you want to handle an unknown amount of return arguments from any lua function you can also do " local ev = { event.pull() } " this will create a array with all the arguments and you can access them with ev[1], ev[2], .... 5. Filesystem OpenComputers OpenOS has a more complex filesystem than the OS from ComputerCraft and it resembles the UNIX filesystem. If you bootup your computer you will start in /home. This is where you should write your own programs and store data. /bin ... Programs installed by OpenOS /lib ... Libraries installed by OpenOS ( This is one of the paths where "require" searches for libraries /usr/bin ... Programms installed by the user. Usually via a package manager like OPPM /usr/lib ... Libraries installed by the user. Usually via a package manager like OPPM /usr/man ... Manual pages for programms. You can type " man <command> " to open them /usr/misc ... Some miscellaneous data for some programms /etc ... Configs for programs. /boot ... Scripts that run during bootup /mnt ... This is where you can access other storage devices like floppy disks. OpenOS will create a directory inside mnt with the first letters taken from the address of the disk /tmp ... Temporary storage. Cleaded after a reboot. /init.lua ... File that gets executed by the BIOS /autorun.lua ... This File doesn't exist after a fresh installation. But you can create it to execute a program after startup. (Like the "startup" file in ComputerCraft) INFO: Not all of these directories exist after you install OpenOS. Some of them are created when they are needed by some program. I hope this tutorial helps you to learn how to use OpenComptuers. Maybe I will make a second part about the differences between a CC Turtle and a OC Robot.
  44. 1 point
    Molinko

    How can i terminate this program?

    Your program has an infinite loop. You'll need to yield either with sleep or by pulling an event. Here is a simple solution. repeat energy = toMRf(cube.getEnergyStored()) energyMax = toMRf(cube.getMaxEnergyStored()) energyJ = toJ(cube.getEnergyStored()) energyMaxJ = toJ(cube.getMaxEnergyStored()) label(1, 1, "%.2f MRf / %.2f MJ (Energia Acumulada)", colors.red, energy, energyJ ) label(1, 3, "%.2f MRf / %.2f MJ (Capacidade da bateria)", colors.lime, energyMax, energyMaxJ) until event.pull(1) == "interrupted" -- # change 1 to something smaller to refresh faster
  45. 1 point
    Looking good, neat program! Some advice for dealing with strings: If you want to print some text on your screen and insert some numbers/other variables/returns of functions etc. into that text, instead of writing one part of the text, writing the number, and write the second part of the text you can just concatenate(connect) the different strings and the numbers using the concat operator .. (2 dots), then print it. In other words, combine all the different parts of the text first, and then write it to the screen. This will reduce the number of lines in your code and less screen operations are performed. io.write("string1") io.write("string2") -- # -> string1string2 -- # you get the same result with io.write("string1".."string2") -- # -> string1string2 -- # you can include numbers with io.write("string"..1.."string"..2) -- # -> string1string2 -- # you dont have to use the strings/numbers directly, variables containing strings and numbers work fine as well local s = "string" local num1 = 1 local num2 = 2 io.write(s..num1..s..num2) -- # -> string1string2 -- # one example of your code would be: line 55 - 59 term.write("Energy available/maximum: "..computer.energy().."/"..computer.maxEnergy().."\n") And one question: do you actually want the program to wait before printing a new set of information on the screen or do you just want to let your program yield in order to avoid "too long without yielding errors"?
  46. 1 point
    XyFreak

    Big Reactors Grid Control

    I'll make it official now. Big Reactors Grid Control Version 4.3.1 has been released! Changelog: - Now using the new ER API (0.4.5.48 and higher). Old API is still supported. - Implemented further mitigations for the "too long without yielding" issues. - Included a hack/workaround for a bug with OpenOS 1.7.1 (and earlier) and Lua 5.3 mode. - Fixed a bug where attempting to format a number as an integer (illegal in Lua 5.3 mode). I'm sorry for abusing some of you as beta testers
  47. 1 point
    XyFreak

    Big Reactors Grid Control

    Ok the issue has been fixed @Dreytac @sanovskiy, sorry for missing that... that was stupid of me...
  48. 1 point
    So a few quick things. First, when you get a problem, please send us a screenshot and logs if possible to make it easier for us to identify your problem. Second, when you're looking at an API in the documentation, be sure to look at the examples that they give as they contain lots of hints! For example, the first snippit.lua in the computer api shows why your program doesn't work. I'll demonstrate a working solution here. Before you can call any methods, you have to assign the computer API to a variable. What they usually do in the documentation is to call the variable 'computer' like so: local computer = require("computer") print(computer.totalMemory()) Because you didn't set the api to a variable first, your program tried to call a variable that doesn't exist and gave up. Should be an easy problem to fix
  49. 1 point
    mintgameking

    More Cases for OC

    Will this ever become a thing lol
  50. 1 point
    DevonTheNovice

    More Cases for OC

    This sounds awesome, will definately be watching this! Need something like this for my private server, were building offices and such, and a less block like computer would be amazing! I'd ask for a Dell Precision T5500, but it's just a big black box with vents on the front and back only, and a 'fancy' grey cover on the front.
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
×
×
  • Create New...

Important Information

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