InfinitiesLoop / oclib

Suite of Minecraft OpenComputers Libraries
Apache License 2.0
9 stars 0 forks source link

Is this program still working? #3

Open SparshSriva opened 5 years ago

EidosTrace commented 5 years ago

Actually i saw it has a lot of errors. Don't know exactly the reason of the errors. However, i readed the code and, aside being a completely useless in programming, i can understand parts of the code. In the "builder.lua" there's a massive chain of failures, but there's one that refers to "modem". I thought that i should add a modem to the robot, but was futile. I think that a lot of the error that appears to me are related to modem, supossing that, for example, "serialize.lua" requires a modem to work. The question is how to fix this. I've been working for more than 23h on row just because i want this fixed. Im pretty sure that InifinitiesLoop will not read this message...however, just to be honest, i'll try to help with the little i know. It's not so much, but it's all i can do. I read that he left this project due to "not enought interest from our part". I understand. Also have been 2 years since the project started and i appear 2 years later. Bad thing i've looked for this thing so late... I believe, if there's someone out there, that we can fix the issues. Maybe InifinitiesLoop will come back to aid us, maybe not. But fixing a program that has such potential...it's something that i must try. So, consider this as a wake-up call to repair the issues together. I'll be trying on my own, don't mather if you join me or not. From here on, it's up to you.

Keks4Gaming commented 5 years ago

I tried and it worked. If you need help to get started answer me.

EidosTrace commented 5 years ago

I tried and it worked. If you need help to get started answer me.

I'd like to know how to put this to work, i'll store the data and the steps so i will be able to read it whenever i need to. Could you help me?

Keks4Gaming commented 5 years ago

Okay theres a bunch of Stuff you have to be aware of.

You need a Robot with following upgrades and stuff:

Disk Drive Card Container (Tier 2) Upgrade Container (Tier 1) Hover Upgrade (Tier 2) Angel Upgrade Inventory Controller Upgrade Screen (Tier 1) Keyboard Inventory Upgrade Graphics Card (Tier 3) Network Card Internet Card Central Processing Unit (Tier 3) Memory (Tier 3.5) 2x EEPROM (Lua Bios) Hard Disk Drive (Tier 3)

When you have one install him the OpenOS Software and put a 2nd Inventory Upgrade into the Upgrade Container. You need this because the robot will try to put 2 rows of each material you need into his inventory and with just one upgrade he is full then.

After that you make some directorys by yourself: mkdir oclib/builder mkdir oclib/builder/models mkdir usr/objectstore

Now you exit your world in MC and go to the OpenComputer directory in MC saves folder. PS: If you play online you need to do the steps ingame, write me then.

My Directory: C:\Program Files (x86)\Minecraft\Instances\SkyFactory 4\saves\New World\opencomputers

There you find all of your Robots as a bunch of numbers and letters. Find the one you craftet earlier by looking for empty oclib folders in home folder: C:\Program Files (x86)\Minecraft\Instances\SkyFactory 4\saves\New World\opencomputers\4ebe5224-c4cd-4fbf-b4f1-d195da12d515\home\oclib

There you create 2 new Files: init.lua and init.files and fill them up with the content of the files from this Git. Save them and load your world in MC. Place your Robot over a charger connected with a powerconverter and some kind of energy production. Place a chest left and right of the charger and fill it up with some glass, marble and cobblestone, to try if everything works.

PS: the charger needs some kind of redstone signal to be ready, so make lever on its side or something.

Start your Robot go to your oclib folder and type init.lua not more. Because you have the init.files it loads all the files you not have.

now go to home with ../home and execute: wget https://gist.githubusercontent.com/Fingercomp/6563c64d70a4472f26923f78d77caeb9/raw/aa4f461ddee2af70a8040065be8974069e240e27/crash.lua /usr/bin/crash.lua

The programm you got now writes a crashlog when your programm crashes you use with it.

So everytime you start the builder go to oclib with cd oclib and use this format: ../crash.lua /crash.log builder/builder.lua start --model=builder/models/yourmodel.model For testing try ../crash.lua /crash.log builder/builder.lua start --model=builder/models/simplehouse.model

If anything go wrong, look into the crash.log it generates in your home folder of the robot you use. Maybe post it here so i can tell where the error comes from.

If it is to hard i make a video for you if you want :)

Greetings Keks

EidosTrace commented 5 years ago

I'm playing on a server, so I'll be grateful if you could explain the playing online part =P

Keks4Gaming commented 5 years ago

Well Ok. Instead of exiting your mc world you need to go to the path /home/oclib by just typing: cd oclib then type: edit init.lua now switch to the init.lua file here on github and copy the content into your clipboard. You need to find out which key is for inserting into opencomputer in your settings in MC and paste the clipboard into the file you opened before. Press CTRL+S to save and then CTRL+W to exit the editor. Do the same thing with the init.files.

Now you can go on with starting the init.lua i descripe above.

Hope you got it to work. Please let me know.

PS: I found out that you need a Upgrade Container instead of the Card Container because big project, like the worldtree, are designed to have a battery upgrade. My Robot run out of Fuel at 3 Blocks before the Charger. If that happens you can take the Robot put it back on the Charger and instead of start you write resume and he build up from there he stopped.

PPS: For testing purposes i recommend to make a superflat world with creative.

Have Fun

Keks

InfinitiesLoop commented 5 years ago

Great work!! The chests should be to the left only of the robot. It starts on top of the charger facing the direction of the build. The build file defines its starting place and direction. You can put multiple chests to the left to hold more. You should have empty space for the bot to dump junk into. It needs a tool to mine out blocks in the way (or not if it’s all empty anyway). It will even monitor the tool and switch tools when it needs to, and will dump off broken tools and pick up fresh ones. The whole idea is that it can run unattended indefinitely, as long as you provide the tools, materials, dumping space, and power. In the time lapse video you can see it has a tinkers pick. It never breaks which makes the tool swapping moot.

Sorry again I haven’t been super helpful here. Really burned out building this thing!

InfinitiesLoop commented 5 years ago

Also build files can actually be downloaded by the bot (requires wireless networking). Any public github will work. I forget the details off hand but it works. It even downloads only one level at a time, because on really large builds (like the world tree) the whole thing won’t even fit in memory. That’s why good memory upgrades are important.

EidosTrace commented 5 years ago

Alright. I'll check it out when the admin start the server. Keks, about the battery upgrade you say, you can try to put a solar panel to add a small recharge on the robot or add a experience upgrade(i'll use this one because it upgrades energy storage and overall speed of the robot) to level it up fast you can obtain exp bottles and then put it on the robot selected slot, then type "lua" and there "component.experience.consume() while true do component.experience.consume() end" You will need to reboot the robot when you done with the level-up of the robot) InfinitiesLoop, any idea of how i can "map" a structure i've done? I'm a bit lost about that part XD

Keks4Gaming commented 5 years ago

Hey Dave, i really like your project. I wish i would completely understand it to upgrade it to a programm that works on a computer/server to handle multiple robots to build the structures to improve speed.

Like something that divide the levels by the amount of robots and give every robot just the levels that it needs, to build more levels at the same time.

@EidosTrace i never used the experience upgrade, i will look into it. THX!

Have a nice Day!

Keks

EidosTrace commented 5 years ago

Hey, im thinking on a way to use chamelium blocks for a building. However, the difference in colors seems to be detected by a "damage" value when using inventory controller. For example, white one has "damage=15" while black has "damage=0"(if i remember well...=P) How can i tell the bot to select one color or another? I've seen the "simple house" template and the string for cobblestone in the inventory controller was "minecraft:cobblestone". So i don't even know if i can use material from mods in there and how should i select what color of chamelium may use in the building. Also, have a nice day! NOTE: @Keks4Gaming Experience upgrade can add a maximum level of 30. I don't know if you can stack two experience upgrades. However, the speed of the bot is increased a bit on each level. For works that use a lot of time, this small speed up can be great. I mean, a 10% of 10 minutes is so little...a 10% of 10 hours it's another thing... =D

InfinitiesLoop commented 5 years ago

@Keks4Gaming Multiple bots would be great. But you're talking about something that's an order of magnitude more complicated to implement. The build algorithm is very specific. The robot has to chart a course through the level -- which it doesn't know ahead of time -- which guarantees that at any point of the build, it can return to the starting position to charge, swap tools, or get more resources. That's why, for example, it builds the starting level last -- it has to ensure a path to the charger, which is on the starting level. Every block it places has to meet a specific criteria and be in a certain order to ensure it does not block itself off. It knows ahead of time the exact spot that will be the 'last' block placed for each level, which it places as it navigates from that level to the next (the only block which it places in the up or down direction).

So, to add multiple bots, which can get in the way of each other? Or place blocks which block each other? It's madness I tell you!

InfinitiesLoop commented 5 years ago

@EidosTrace It uses the string to match the block names partially... it doesn't care exactly what it is, as long as the name seems to match. So see if you can write a build file using the various names of the blocks (as they appear in tooltips), and maybe that will just work. But, I'm skeptical it will work.. the real solution would be to extend the format to support specifying specific NBT data.

Keks4Gaming commented 3 years ago

@InfinitiesLoop Mulitple Bots could work if you split the levels of the building by the number of robots you have and let every bot build his own height levels. They only know their specific levels they should build and think the last level they got is the last level and they will travel back.

With this in mind you could build with a maximum amount of robots depending on the levels you have.

So the only thing we need to do, is to code a handler that handles the levels of a building to a specified amount of robots. That should work, shouldn't it?

Greetings Keks

tt-thoma commented 3 years ago

Ok I want ot make an installer for the project So the program need to:

The list seems long, but we can easily make the porgram with the help of the documentation

tt-thoma commented 3 years ago

I'll try to make it and then I'll upload it

Keks4Gaming commented 3 years ago

I can test your installer if you want to give you feedback. And if you have trouble with something maybe I can help.

Greetings Keks

tt-thoma commented 3 years ago

I pretty finished the program. It's not incredible but I think this gonna be useful I am also workig on another program to launch the builder Here is the pastebin of the finished installer: https://pastebin.com/vShCR471 / pastebin run vShCR471

tt-thoma commented 1 year ago

This post is old but I'm impressed by the quality of my code at the time