Added a basic tutorial to the manual.

This commit is contained in:
Florian Nücke 2015-04-11 20:20:09 +02:00
parent 419697a0c7
commit 9280fc7de4
7 changed files with 69 additions and 13 deletions

View File

@ -1,7 +1,10 @@
# OpenOS
OpenOS is a basic operating system available in OpenComputers. It is required to boot up a [computer](computer.md) for the first time, and can be crafted by placing an empty [floppy disk](../item/floppy.md) and an OpenComputers manual inside a Crafting table.
OpenOS is a basic operating system available in OpenComputers. It is required to boot up a [computer](computer.md) for the first time, and can be crafted by placing an empty [floppy disk](../item/floppy.md) and an OpenComputers [manual](../item/manual.md) inside a crafting table.
Once crafted, the [floppy disk](../item/floppy.md) can be placed inside a [disk drive](../block/diskDrive.md) connected to a [computer](computer.md) system, which will allow the [computer](computer.md) to boot up OpenOS. Once booted, it is advisable to install OpenOS to an empty [hard drive](../item/hdd1.md), foregoing the need for a [floppy disk](../item/floppy.md) and to gain access to a read-write file system ([floppy disk](../item/floppy.md) are read-only). A tier 3 [computer case](../block/case3.md) does not require a [disk drive](../block/diskDrive.md), as it has a slot built in for the [floppy disk](../item/floppy.md). OpenOS can be installed by simply running `install`, and following the on-screen prompts to complete the installation. The [floppy disk](../item/floppy.md) may be removed once the system has been rebooted. OpenOS can be installed on all devices except [drones](../item/drone.md) and [microcontrollers](../block/microcontroller.md) (both of which require manually programming an [EEPROM](../item/eeprom.md) to provide functionality).
Once crafted, the [floppy disk](../item/floppy.md) can be placed inside a [disk drive](../block/diskDrive.md) connected to a [correctly configured](quickstart.md) [computer](computer.md) system, which will allow the [computer](computer.md) to boot up OpenOS.
Once booted, it is advisable to install OpenOS to an empty [hard drive](../item/hdd1.md), foregoing the need for a [floppy disk](../item/floppy.md) and to gain access to a read-write file system (the OpenOS [floppy disk](../item/floppy.md) and other "loot" disks are read-only). A tier 3 [computer case](../block/case3.md) does not require a [disk drive](../block/diskDrive.md), as it has a slot built in for the [floppy disk](../item/floppy.md).
OpenOS can be installed by simply running `install`, and following the on-screen prompts to complete the installation. The [floppy disk](../item/floppy.md) may be removed once the system has been rebooted. OpenOS can be installed on all devices except [drones](../item/drone.md) and [microcontrollers](../block/microcontroller.md) (both of which require manually programming an [EEPROM](../item/eeprom.md) to provide functionality, because they have no built in file system).
OpenOS has many built in functions, the most useful of them is the `lua` command, which opens up a Lua interpreter. This is a good testing space for trying out various commands, and experimenting with component API, before writing the commands into a .lua script. For more information on programming, refer to the [Lua Programming](lua.md) page. To run Lua scripts, simply type in the name of the file and hit enter (for example, script.lua can be run by typing the `script` command in the terminal).
OpenOS has many built in functions, the most useful of them is the `lua` command, which opens up a Lua interpreter. This is a good testing space for trying out various commands, and experimenting with component API, before writing the commands into a .lua script. Take note of the information displayed when starting the interpreter, it will tell you how to show results of the commands you enter, and how to exit it.
For more information on programming, refer to the [Lua Programming](lua.md) page. To run Lua scripts, simply type in the name of the file and hit enter (for example, `script.lua` can be run by typing the `script` command in the terminal).

View File

@ -0,0 +1,48 @@
# Getting Started
Also know as "how to build your first computer". To get your first [computer](computer.md) to run, you will need to first set it up correctly. There are many different types of computers in OpenComputers, but let's start with the basic one: the standard computer.
**Disclaimer**: this will be step-by-step, and also provide some information on how to look for issues yourself later on, so this is quite long. If you never built a computer in real life, and/or are completely new to the mod, it is highly recommended you read through it all.
First off, you will need a [computer case](../block/case1.md). This is the block into which you will build most of the components, defining the behavior of the computer you're building.
![A tier two computer case.](oredict:oc:case2)
For example, you will need to choose what tier of [graphics card](../item/graphicsCard1.md) you wish to use, if you need a [network card](../item/lanCard.md), a [redstone card](../item/redstoneCard1.md) or, if you're just playing around in creative mode, maybe even a [debug card](../item/debugCard.md).
When you open the computer case's GUI you will see a few slots to the right. The number of slots, and what tier of component can be placed into them (indicated by the small roman numeral in the slot) depends on the tier of the case itself.
![GUI of a tier two computer case.](opencomputers:doc/img/configuration_case1.png)
In their empty state, computer cases are pretty useless. You can try to power up your computer now, but it'll immediately print an error message to your chat log, and make its dissatisfaction heard by beeping at you. Good thing the error message is telling you what you can do to fix this situation: it's missing energy. Connect your computer to some power, either directly or via a [power converter](../block/powerConverter.md).
When you try to start it now, it'll tell you that you need a [CPU](../item/cpu1.md). These come in different tiers - a trend you'll notice is present all throughout OpenComputers. For CPUs, higher tiers mean more components at a time, as well as faster execution. So pick a tier, and put it in your computer.
Next up you'll be asked to insert some [memory](../item/ram1.md). Notice that the beep code is different now: long-short. Higher tiers of RAM mean more memory available to the programs running on your computer. To run [OpenOS](openOS.md), which is the goal of this introduction, you'll want to use at least two tier one memory sticks.
We're making good progress here. By now your computer case will look somewhat like this:
![Partially configured computer.](opencomputers:doc/img/configuration_case2.png)
And behold, turning it on now does not print any more error messages! But alas, it still doesn't do much. At least it beeps twice now. That means the actual execution of the computer failed. In other words: it technically runs! This is where a very useful tool comes into play: the [analyzer](../item/analyzer.md). This tool allows inspecting many of OpenComputers' blocks, as well as some blocks from other mods. To use it on the computer, use the analyzer on the case while sneaking.
You should now see the error that caused the computer to crash:
`no bios found; install configured EEPROM`
The emphasis here is on *configured*. Crafting an [EEPROM](../item/eeprom.md) is pretty simple. To configure it, you will usually use a computer - but that's a little difficult right now, so we're going to use a recipe to craft a configured "Lua BIOS" EEPROM. The standard recipe is an EEPROM plus a [manual](../item/manual.md). Put the configured EEPROM into your computer, aaaand.
Nope. Still nothing. But we know what to do: player uses analyzer, it's super effective! Now we have a different error message:
`no bootable medium found; file not found`
Well then. That means the BIOS is working. It's just not finding a file system to boot from, such as a [floppy](../item/floppy.md) and [hard drive](../item/hdd1.md). The Lua BIOS in particular expects such a file system to furthermore contain a file named `init.lua` at root level. As with the EEPROM, you usually write to file systems using a computer. You probably guessed it: we now need to craft our operating system floppy. Take a blank floppy disk and a manual, craft them together, and you'll get an OpenOS disk.
Now, if you used a tier two case as in the screenshots above, you'll have nowhere to place that floppy. If you have a tier three or creative case, you can place the floppy right into the case. Otherwise you'll need to place a [disk drive](../block/diskDrive.md) next to your case (or connect it via [cables](../block/cable.md)). Once your disk is in place, you know what to do. Press the power button.
It lives! Or should, anyway. If it doesn't something went wrong, and you'll want to investigate using the analyzer. But assuming it's running now, you're pretty much done. The hardest part is over. All that's left is to make it take input and show some output.
To allow the computer to show some output, you'll want to grab a [screen](../block/screen1.md) and a [graphics card](../item/graphicsCard1.md).
![No, it's not a flatscreen.](oredict:oc:screen2)
Place the screen adjacent to your computer case, or, again, connect it using some cable. Then place a graphics card of your choice into the computer case. You should now see a blinking cursor on the screen. Finally, place a [keyboard](../block/keyboard.md) either on the screen itself, or in a way so that it faces the screen, to enable keyboard input.
And with that, you're done. The computer is up and running and ready for action. Try using it now! Type `lua` in the shell and press enter, and you'll be greeted with a bit of information on how to use the Lua interpreter. Here you can test basic Lua commands. For more information this topic see [the Lua page](lua.md).
![It lives!](opencomputers:doc/img/configuration_done.png)
Have fun building more complex computers, messing with [servers](../item/server1.md) and assembling [robots](../block/robot.md), [drones](../item/drone.md), [microcontrollers](../block/microcontroller.md) and [tablets](../item/tablet.md) in the [assembler](../block/assembler.md).
Happy coding!

View File

@ -4,7 +4,9 @@ OpenComputers is a mod that adds persistent, modular, and highly configurable [c
To learn about how to use the manual, check out [the page about the manual](item/manual.md) (that green text is a link, you can click it). You can find a table of contents at the bottom of this page.
Persistence ensures that a running [computer](general/computer.md) retains its state when the chunk it is in is unloaded. This means that if the player moves away from the [computer](general/computer.md), or logs off, the [computer](general/computer.md) will remember its last known state and continue from that point on when the player goes near the [computer](general/computer.md). Persistence works for all devices except for [tablets](item/tablet.md).
## Prologue
As mentioned above, computers in OpenComputers feature persistence, which means that a running [computer](general/computer.md) retains its state when the chunk it is in is unloaded. This means that if the player moves away from the [computer](general/computer.md), or logs off, the [computer](general/computer.md) will remember its last known state and continue from that point on when the player goes near the [computer](general/computer.md). Persistence works for all devices except for [tablets](item/tablet.md).
All devices are modular and can be assembled with a wide range of components, just like [computers](general/computer.md) in real life. Players who enjoy tinkering will be able to optimize devices to their heart's content. If desired, devices can be [dismantled](block/disassembler.md) and rebuilt if the initial configuration wasn't satisfactory. For [computers](general/computer.md) and [servers](item/server1.md), components can be swapped out on-the-fly simply by opening the corresponding GUI.
@ -19,16 +21,19 @@ This manual contains detailed information regarding all blocks and items, how to
## Table of Contents
### Devices
- [Computers](general/computer.md)
- [Servers](item/server1.md)
- [Microcontrollers](block/microcontroller.md)
- [Robots](block/robot.md)
- [Drones](item/drone.md)
- [Computers](general/computer.md)
- [Servers](item/server1.md)
- [Microcontrollers](block/microcontroller.md)
- [Robots](block/robot.md)
- [Drones](item/drone.md)
### Software and Programming
- [OpenOS](general/openOS.md)
- [OpenOS](general/openOS.md)
- [Lua](general/lua.md)
### Blocks and Items
- [Items](item/index.md)
- [Blocks](block/index.md)
- [Items](item/index.md)
- [Blocks](block/index.md)
### Guides
- [Getting Started](general/quickstart.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

View File

@ -40,7 +40,7 @@ object Mods {
val Forestry = new SimpleMod(IDs.Forestry)
val ForgeMultipart = new SimpleMod(IDs.ForgeMultipart)
val Galacticraft = new SimpleMod(IDs.Galacticraft, providesPower = true)
val GregTech = new ClassBasedMod(IDs.GregTech,"gregtech.api.GregTech_API")()
val GregTech = new ClassBasedMod(IDs.GregTech, "gregtech.api.GregTech_API")()
val IndustrialCraft2 = new SimpleMod(IDs.IndustrialCraft2, providesPower = true)
val IndustrialCraft2Classic = new SimpleMod(IDs.IndustrialCraft2Classic, providesPower = true)
val Mekanism = new SimpleMod(IDs.Mekanism, providesPower = true)