Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application or Documentation to Aid the Usability of the Program #1

Open
LadyJosephine opened this issue Jan 21, 2018 · 5 comments
Open

Comments

@LadyJosephine
Copy link

As it says in the title, I need help getting your program to work. I'm trying to get a build of mine made into a model for use with the Generic Builder.

P.S. Here is the .nbt file, if you are curious.
Laboratory_0.0.1.zip

@InfinitiesLoop
Copy link
Owner

I'm terrible that I haven't updated the README yet. Interest in the program will motivate me. I put a lot into making this and the video if you haven't seen it, and just got kinda burned out. I want to help tho!

To get started you should go into your robot, and make a place for the lib

mkdir oclib

Due to a bug you'll also have to create some other folders manually:

mkdir oclib/builder
mkdir oclib/builder/models
mkdir usr/objectstore

Again, once I fix the but in init.lua this part won't be necessary.

Then copy the init.lua file that's in the root of this repo into init.lua in the oclib folder you created. You can do that by copying it to your clipboard on your (actual) computer, then pasting it into the robot:

edit oclib/init.lua
<paste>

The paste key depends on your platform. You can look it up in the keybindings, sorry I forget what it is.

Now... you just have to run this init script to download everything. Go into the folder and call it like so:

cd oclib
init.lua oclib/InfinitiesLoop

This will download everything into the appropriate folders. In the future, to get the latest version of the code, you only need to run 'init.lua' with no arguments. It remembers which repo it came from. init.lua is a generic downloader script I wrote that you could use for your own repos, too (it relies on the init.files file you see in the root of this repo.

Now that the library is on your robot, you can use its programs. Each one has a help command that will list the commands available to it. Each command then has its own help, too. For example:

quarry help
quarry start help
builder/builder help
builder/builder start help

The builder program takes a --model argument to point to the model you want to build. To build your own model, once you generate the model file, just put it in the builder/models directory on the robot. If it's a very big model (like if each level is 100x100), it wont fit in your robot's memory very well, and if its really really big it wont even fit on the robot's disk drive -- so the builder program has ways of dealing with that. Take a look at the worldtree model in this repo for how that is done. Your model file ends up just being pointers to each level, which the robot downloads on demand when it needs them. The model file just contains info about where it should be when it builds that level, etc.

If I were you though I'd first make sure everything is working by having the robot build the simplehouse model. It's small and should only take it 10 minutes or so to do. You should always set the robot up on a charger like it shows in the very beginning of my video. The robot knows to go there when it needs to charge, and it knows that any number of chests should be present to the left of the charger when it needs to pick up building materials or drop off trash it has mined, or even to drop off broken tools and pick up fresh ones. It does a lot of stuff so that it can run unattended for a very long time. In the video, everything you see built was done without any intervention from me, from start to finish.

If you want to build your own thing, the simplest way is just author a model file yourself. The levels are just ASCII text. If you want to convert an nbt into a model, you'll have to run the converter program that is in this repro. I didn't put very much work into making that program super easy to run by just anyone -- currently you'd have to know how to build the java program to even get started.

I know all this is complicated sounding, but it's easy once you get started. This reply helps me because I can use it as a starting point for a proper read me :) I was really hoping the video would help get interest in the lib so that I could get the motivation to go the extra mile to make it easier to get started, easier to create model files, add how tos and examples and not to mention fix the setup bug.

@LadyJosephine
Copy link
Author

Thank you oh so very much for the prompt reply! I'll certainly use this information well. Please attempt to increase the accessibility of your .nbt to .model converter. I would very much appreciated that! Good luck on crafting an excellent, proper README and making the model files easier to make! I'm cheering for you! <3

@tt-thoma
Copy link

Is there an installer to make these steps automatically ?

@Keks4Gaming
Copy link

No, there isn't. But it would be a nice project for winter season.
You can find a step by step guide here --> https://github.com/InfinitiesLoop/oclib/issues/3.
Greetings Keks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@InfinitiesLoop @LadyJosephine @Keks4Gaming @tt-thoma and others