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

Newbie Questions about OC

Question

Hello Everyone!

This is my very first post in these forums and I really like this mod. I've watched some tutorials in youtube about this mod, how to use it, how it works, blocks and components, etc. I am still confused, I usually work with ComputerCraft, it's a more simple mod, simple to work with, however this has more potential. So I'm going to ask some questions:
 

  • When is autorun.lua initiated?
    I've made an autorun.lua with a installed OpenOS on my harddrive, when it ran, it printed Hello World! what I told it to do, but only after that it showed the box made of hashtags with information about OpenOS? Is it initiated at some stage of OpenOS loading or what? What I want to do is when the computer boots, there is no box made of hashtags?
  • How do I use the debug card?
    I've done =component.debug in lua command prompt and I've iterated names of all values but I can't find anyway to set blocks? Or can't you do that? Or, literally, some guide to using debug card? I'm really into adventure map-making and that's like the only reason I'm using this mod.
  • Why do Command Blocks execute commands so slowly, can you change this?
    I have OpenComponents, and I use Command Blocks with the adapter, it executes commands every like split second, that's 5 ticks, I'd expect it to do it every tick or even faster, can I change this, maybe in the config? I've tried but can't remember what I did in the config but it didn't work. Any other way of executing command block commands, like scoreboards faster?

Regards
augustas656

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

autoruns are run before the shell starts, to allow installing a custom shell in the autorun script. Register a timer to run at a later time, if you want something to happen after the shell started (but beware that this can then interfere with the shell itself printing stuff to the screen!)

If someone could write a tutorial for the debug card that'd be nice, yes :P For now, you're close. What you want is to the the world by calling `getWorld()`. That object gives you a bunch of methods, including for setting blocks (use `w=getWorld()` and then `=w` to show those methods). Same for any player (using `getPlayer(name)`).

Command blocks are triggered "synchronously", i.e. from the server thread, to make sure no concurrent modifications are summoned, destroying your worlds. And while those synchronous calls can be called at the fastest at once per tick, because then Lua has to kick in inbetween again, which happens in a separate thread, it is actually throttled a little, because there were issues with the command blocks behaving weirdly when called too frequently :/

Link to post
Share on other sites
  • 0

Thanks! I've been waiting for a mod that literally allows you to do a lot of what you can do with the bukkit API when you are making plugins. It's like you aren't making mods, like new features, but you are using already existing resources without limit creating something, like for me, adventure map making. When this mod updates to 1.8, if that will be, if you were to add all the possible things you can do with command blocks into the computers and maybe more, this mod would be the ultimate adventure map-making mod. Adventure maps powered by OpenComputers. You would be able to use MCPC+ to run servers, and this would be like extremely useful.

EDIT: If you continue to make it more capable to control everything, I imagine the future possibilities being creation of even stuff like strategy games, lime tint glass of the outline of buildings when you can build them, and it spawns on wherever your cursor is pointed at, and then maybe plays a sound of anvil when built.

Regards
augustas656

Link to post
Share on other sites
  • 0

I'll most likely keep adding things to it as time goes on, but it won't be a priority. Feel free to add requests for specific features on the Github issue tracker, though! Someone else might pick it up and implement it.

`component.debug.getPlayer("player's ingame name")` worked for me last time I tested it. I'm actually not sure if this is case sensitive.

Link to post
Share on other sites
  • 0

When I try to do in lua interpreter: player = component.debug.getPlayer("augustas656")

I get:
 

stdin:1: attempt to call field 'getPlayer' (a nil value)
stack traceback:
    kernel:137: in function 'getPlayer'
    stdin:1: in main chunk
    [C]: in function 'xpcall'
    kernel:132: in function 'xpcall'
    /bin/lua.lua:62: in main chunk
    (...tail calls...)

And when I do: =component.debug

I get:
 

{address="3e678639-5c9a-4b98-bee6-7191cd1a1535",
  changeBuffer=function(value:number):number
  getWorld=function():userdata
  getX=function():number
  getY=function():number
  getZ=function():number
  type="debug"}

Regards,
Augustas656

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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