Jump to content

OpenComputers [v1.5.21]


Sangar

Recommended Posts

MHb3VNc.png This mod adds programmable, modular and persistent computers to the game.

 

You'll need Minecraft 1.7.10 and at least Forge version 10.13.0.1180 or Minecraft 1.8 and at least Forge version 11.14.1.1313.
 

Download for MC1.7.10
Download for MC1.8

Download for MC1.8.8

As with any mod, just put it into your mods folder and you're good to go. You can always find the latest releases on the Github releases page. For the adventurous, there are also you can also go here for development builds.

The mod accepts EU, RF, Mekanism and UE Joules, Factorization Charge, Applied Energistics 2 energy, as well as power from Electrical Age (it has it's own converter). If none of these mods is present, power use is disabled.

Please report any bugs over on the issue tracker on Github. Note that the mod is open source, a critical eye (in particular regarding security issues) is always appreciated, as are patches.

If you have questions check out the documentation and if you can't find an answer there, ask here. There's also a forum which you can find over at http://oc.cil.li/. I'm usually on #oc on esper.net, so feel free to drop by if you want. Even if I'm not there, someone else is likely to help you.

Getting started / Tutorials

Version 1.3 Update
Some explanation of the changes and additions to the 1.3 version of OpenComputers.

English, Part 1:

English, Part 2:


A list of more tutorials can be found here.


What's in this mod?

As mentioned above, this mod adds

programmable computers, i.e. blocks that can be used to write and run Lua programs. It also adds robots, which are basically mobile mini-computers that can interact with the world much like the player can: they can use items, break and place blocks, activate blocks and so on.

Here are a few key concepts of the mod:
  • Computers persist: they will resume where they were interrupted when loaded again after the chunk they're in was unloaded (e.g. when you quit the game and load the world again or go to the nether and come back).
  • Computers are modular: you can configure your computers as you like by installing different expansion cards (redstone, network) and different tiers of memory (RAM) and hard drives.
  • Computers need power: you'll want to use this mod alongside some other mod that allows generating power, such as BuildCraft, IndustrialCraft2, Thermal Expansion or a mod that generates Universal Electricity. This can be disabled in the config, though.

Limited Resources
You'll notice is that computers are not cheap. There are several recipe sets, included are, aside from the default one, a hardmode set, which makes the recipes more complex and expensive, and a GregTech set which builds upon the hardmode set but uses GT specific items in a couple of recipes.

Aside from the crafting prices, there are two more resources, memory (RAM) and disk space (Floppy Disks and Hard Disk Drives). You'll need at least one memory module in you computer to get it running. Having more means you can run more complex programs (by the way, this is the actual amount of memory used by the Lua VM, excluding kernel overhead). If your computer runs out of memory, best case is the currently running program will crash, worst case the whole computer will stop.

HDDs on the other hand are semi-optional: each computer has a built-in /tmp file system, that provides a small amount of writable space. All data in the temporary file system will be wiped on reboot, though, so if you want to store something longer than one session, you'll want a floppy or hard disk.


Interactions with other Mods

OpenComputers accepts

power from a lot of mods, can interact with many mods' bundled redstone systems and provides a lot of options for interaction with other mods in general. A more or less updated list can be found on the wiki.


Native Library

This mod uses a native library (included in the ZIP, you don't have to do anything). If you're running Minecraft on something exotic (read: Windows XP or older, PowerPC Mac or Solaris), the mod will enter a 'fallback mode' using LuaJ. In this mode computers will

not persist, and memory use will not be limited. But as mentioned above, it is enough for the host to run on a supported platform.

Why a native library, when Java is such a beautifully cross-platform (as if) programming language? It's for the Lua state persistence. All Java implementations of Lua I'm aware of use Java threads to implement Lua's coroutines. Meaning there's no just way they could be persisted. But that's very much a core feature of this mod, so I saw no other way than going deep. It's just one little shared library, containing Lua plus Eris (the persistence library), and the JNLua wrapper. All of those are open source, too. Feel free to inspect the sources.


For Modders / Extending the Mod

If you're a modder yourself and would like to extend the mod, there is

an API that allows defining new block and item components, similar to how you can extend ComputerCraft via peripherals. I'd be interested to hear if you find something to be missing from the API.
Don't worry: while the mod itself is written in Scala, the API is pure Java. If you need any help with API, please do not hesitate to ask! We're more than happy to help!


License / Modpacks

This mod is licensed under the MIT License, which basically means you can do whatever you want: use it in modpacks, fork it, copy parts of it, as long as you include the license file with it. If you use it in modpacks: the file is in the ZIP, so you don't have to worry about that. Giving credit would be appreciated but isn't obligatory.


If you do make code changes, please make it abundantly clear to anyone using that modified version that they should come to you for support, first, though.
Edited by Sangar
Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

This is pretty cool. I'll definitely be trying this out.

Quick question, when you say native libraries crash and world cannot be saved, does that mean no last second save by the server and the world is rolled back a bit, or world is beyond saving and corrupt?

Link to comment
Share on other sites

Thanks, let me know what you think.

What I meant to say is that Minecraft's "emergency save" that it usually performs when something crashes won't run, so yeah, the world will be rolled back a bit, but it shouldn't be in a corrupt state. Pretty much the same thing as when OpenGL causes a crash. I'll clarify this in the OP.

However, worst case scenario: the lib crashes while the world is currently saving. I'm not sure how MC handles that (i.e. whether it first saves to a new file and then swaps the saves or whether it directly overwrites the old savegame). I suspect this would "only" corrupt the chunk it was currently trying to save, not the entire world, if at all.

Link to comment
Share on other sites

Rollbacks are a minor speedbump considering that this brings to the party, especially when combine with RiM. Execution persistence through unloads/resets is a huge gamechanger.

I notice your have the CC API in the codebase. Is this compatible with existing CC peripherals? Or did you include is so your stuff can be used as CC peripherals?

Link to comment
Share on other sites

The CC API is there for two things at the moment: support for CC floppy disks and for using the Adapter block as a pseudo network card from CC. That is, the Adapter block (amongst other things) acts as a peripheral for CC that provides an API pretty much the same as the CC modem, and messages sent through it can be received by OpenComputers network cards - and vice versa, i.e. messages sent from OC network cards are received by the Adapter block and injected as a "modem_message" event in attached CC computers.

I originally experimented a bit with native CC peripheral support, but there were too many differences in the architecture of the two mods for that to properly work out. Also, I don't think the CC authors would have approved that anyway.

Link to comment
Share on other sites

So basically... it's computercraft, but with persistence, higher requirements, and some improvements. Regardless of what you say it's basically an improved version of the same thing. Maybe if a different language was used or something, you could say it isn't the same, but really, beating it into the ground that it's "different" doesn't accomplish much.

Don't get me wrong though, it is nice because CC is kind of unbalanced honestly, like what kind of computer is made out of stone? And persistence without extra coding is cool too. The parts portion is also good. It just frustrated me that you went out of your way to point out how "different" it is, when really it isn't. You should focus on saying how it's better rather than saying it's different.

Link to comment
Share on other sites

I just posted this page to reddit. Mikeemoo was the first one to comment.

Thanks, but oh dear, Dan isn't pleased. Not sure whether I should try to respond to that...

So basically... it's computercraft, but with persistence, higher requirements, and some improvements. Regardless of what you say it's basically an improved version of the same thing. Maybe if a different language was used or something, you could say it isn't the same, but really, beating it into the ground that it's "different" doesn't accomplish much.

Don't get me wrong though, it is nice because CC is kind of unbalanced honestly, like what kind of computer is made out of stone? And persistence without extra coding is cool too. The parts portion is also good. It just frustrated me that you went out of your way to point out how "different" it is, when really it isn't. You should focus on saying how it's better rather than saying it's different.

Point taken. Maybe it just feels that way to me, since I really put a lot of thought into this, so I feel pretty strongly it's not just CC with different colors. But I guess I can see how it looks like that for people coming from CC. I'll think of rewriting that part of the post a bit. Thanks for the honest feedback.

Link to comment
Share on other sites

So far everything bad in that thread has been directed at the title and not the fact there's a competitor LUA interpreter mod.

Even cloudy's response seems more annoyed with the claim in the title than having competition.

Well if you put it that way... yes, I can see the truth in that.

Edit: except for the "plagiarism" thing. True, some methods are named the same, but there's just so many sensible method names for a specific use case. Plus in some cases it was indeed deliberate to make it easier to switch back and forth between the mods (robot vs. turtle API).

Version 1.0.1 is out with the following changes:

  • Fixed all input being caught in edit when Ctrl was being pressed, now only used for known combinations (caused issues with German keyboard layout, where the right Alt triggers a Ctrl+Alt but is required for a bunch of chars to be typed).
  • Fixed behavior when wrenching screens and computer cases to rotate them (not opening GUI anymore).
  • Fixed / improved text rendering in robot GUI when a lower resolution is used.
  • Fixed an issue where added components were not updated correctly.
  • Usability improvement for placing multi-blocks screens: showing an overlay that indicates the screens' orientation, so that it becomes clear why screens won't merge.
  • Slight usability improvements for cp and mv programs.
  • Charger can now wrenched to invert how it interprets redstone signals (so it defaults to "on").
  • Chinese localization (thanks to crafteverywhere).

You may have to reboot your (ingame) computers for some of these changes to take effect.

Link to comment
Share on other sites

I think this highlights fears in the community with some mod devs and why they choose to close their source code. I was just hoping it would be a more unique and creative idea than a CC spinoff. There are differences, I agree but not enough to convince people whole-heartily without trying the mod and I think that's what you should aim for. However in the end it'll be up to the community and a little competition/diversity didn't hurt anyone. I will definitely be trying this mod out.

Link to comment
Share on other sites

Thanks, but oh dear, Dan isn't pleased. Not sure whether I should try to respond to that...

Don't be afraid to talk to him, if you want to. Dan200 is a very agreeable guy, he takes this far better than many modders would, especially considering he's quit his day job to work on indie games and mods. I hope (and think!) there's room for you all!

Link to comment
Share on other sites

Don't be afraid to talk to him, if you want to. Dan200 is a very agreeable guy, he takes this far better than many modders would, especially considering he's quit his day job to work on indie games and mods. I hope (and think!) there's room for you all!

I agree, Nothing better than a little friendly competition

Link to comment
Share on other sites

I'm all for friendly competition. Let's talk again when there actually is any, because let's stay realistic here: the mod is way too small for the CC devs really having a reason to care for what I do at this point in time ;) As for being unique, I'd imagine that to become less of an issue as I get to add more features over time. I already have a couple of ideas and hopefully there'll be a few more coming from the community.

I just wanted to get a first version that is complete in its most basic features out, primarily to see how well the native libraries work across multiple platforms, but also to get some general feedback. For example, it was interesting to see that the API seems to intimidate people. I may write a small tutorial on how to use it and see if that helps, because I really don't think it's that bad - there's just much in there in case it's needed, but usually it won't be.

Edit: Sorry for the release spam, but version 1.0.2 fixes a pretty bad bug, so I decided to push it out rather sooner than later:

  • Added support for Intel based Mac systems.
  • Fixed robots also being added to external network.
  • Fixed initialization of robots' energy buffer when first placed (was only correct after loading again).
  • Fixed an issue where resuming computers could fail (may still fail one last time when loading).

Also, I got my hands on a Mac Mini, so it should work on Mac OS, too, now (Intel based Macs at least).

Link to comment
Share on other sites

Version 1.0.3 is out, with the following changes:

  • Fixed default config failing to load on some systems (hopefully).
  • Fixed modem.broadcast of wireless network cards skipping the first data parameter.
  • Fixed possibility of invalid orientations of computer case and disk drive on placement introduced in last patch.
  • Fixed render glitch on some items when equipped by a robot.
  • Fixed the generator upgrade not saving its remaining burn time when no more items were in its internal queue.
  • Robot upgrades can now render themselves as part of the robot model (via their IItemRenderer).

Link to comment
Share on other sites

I don't think anyone's yelling ;) There are a couple of things I'm thinking about. The one that'll see the light of day soonest will be something along the lines of specialized "servers" with remote terminals, allowing you to access said servers from around your base and by extension controlling your base. I've elaborated on the idea a bit in the Github ticket. I'd welcome some early feedback.

Link to comment
Share on other sites

I'd love to. Currently I'm waiting for them to fix their interface that allows interacting with the mod without implementing Forge Multipart.

Edit: version 1.0.4 is out, with the following changes:

  • Fixed potential crashes when robots with upgrades were sent to clients too soon after their chunk was loaded.
  • Fixed crashes on dedicated server when placing keyboards next to cables.
  • Added a `sneaky` parameter to `robot.swing`.
  • Moved whitelist example entries to comments so that the blacklist is used by default.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • Anything claiming to be official Technic servers are not allowed here, for obvious reasons



×
×
  • Create New...