Computer Craft

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

namiasdf

New Member
Jul 29, 2019
2,183
0
0
Just a general question.

I am playing on single player. This means every time I am finished playing, I close the world. This is a problem because the computers I have in my base running programs, also restart. Meaning every time I load the world I have to restart my programs.

This is especially bad because one specifically controls a crucial junction regarding the regulation of EU in my base.

Is there anyway to keep the computer from restarting? If not, is there a way to auto load programs?

Just when I thought I had the ideal solution, qq.
 

BlackFire

New Member
Jul 29, 2019
344
0
0
Umm, they shouldn't stop because you save and leave. That is really weird. They should keep running. Ever had this problem.

Are their programs running as "startup"?
What pack are you using?
 

NTaylor

New Member
Jul 29, 2019
221
0
0
Umm, they shouldn't stop because you save and leave. That is really weird. They should keep running. Ever had this problem.

Are their programs running as "startup"?
What pack are you using?


Computers always restart when you close the game or the chunk unloads it is a general problem that they have.

The main solution though is to create a startup program to run the program for you.
Any computer with a program named startup on it will attempt to run that program on world or chunk load.
So if you create a program called startup and in that set the command as

shell.run("whatever the name of your program is")
end

then it should auto load your programs for you.
 
  • Like
Reactions: shockwave95

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Yeah, the problem with that however is that you programs will start running from the top, which is highly annoying with feller or miner turtles. To offset this, there's the GPS module OR you could save the coords/variables in a file BUT that's a ton of work.

Everyone who says CC is OP needs to program something first. Really if I had the power, then I'd lock every single person who says that in a dark room and wouldn't let him leave before solving one of the above problems.
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
Even on a chunk loaded server I still make sure to either rename the main program to "startup" or do the shell.run that NTaylor has suggested. I also make sure I name every turtle or computer.
 

BlackFire

New Member
Jul 29, 2019
344
0
0
Yeah, the problem with that however is that you programs will start running from the top, which is highly annoying with feller or miner turtles. To offset this, there's the GPS module OR you could save the coords/variables in a file BUT that's a ton of work.

Everyone who says CC is OP needs to program something first. Really if I had the power, then I'd lock every single person who says that in a dark room and wouldn't let him leave before solving one of the above problems.
That would be fun! Set up a kind of Portal type game where all you get is a turtle. Evil ;)
 

namiasdf

New Member
Jul 29, 2019
2,183
0
0
Ah, thanks guys.

It's a simple program that manages redstone signal. I have it designed in a way that starting from the top would be okay.


Another question. Do you know the syntax to access directories in a program? The program is saved on a disk, so I'd have to cd to the disk drive before the computer would know. (I'm lazy heh...)
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Ah, thanks guys.

It's a simple program that manages redstone signal. I have it designed in a way that starting from the top would be okay.


Another question. Do you know the syntax to access directories in a program? The program is saved on a disk, so I'd have to cd to the disk drive before the computer would know. (I'm lazy heh...)
not sure but I think it's just /drive/files

Not sure if you have to wrap it first.

But you should be able to just do os.run("drive/myAwesomeProgram")
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
Its been a while since I played with disks. But it is possible to use the full path to your program in the startup program. I use pastebin for everything now and just store all my programs on the root of the computer or turtle. Something like shell.run("/disk/programname") should work.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
you don't need the end. There's no function/condition/loop you need to close

Also, I just realized, shell.run might be better in this case.
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
Yeah, the problem with that however is that you programs will start running from the top, which is highly annoying with feller or miner turtles. To offset this, there's the GPS module OR you could save the coords/variables in a file BUT that's a ton of work.

Everyone who says CC is OP needs to program something first. Really if I had the power, then I'd lock every single person who says that in a dark room and wouldn't let him leave before solving one of the above problems.


Most people's complaint about CC is that when someone else does the work noobs can pastebin it and this makes some people uber mad. Most of the other complaints are nonsense. Turtles are usually the hardest solution for any given problem. They see slightly more use now because of the absence of frames in 1.5.2/1.6, but only pretty high end builds and builders can really unlock their potential.

And even then, they're awkward to fuel, pretty slow, and often have weird restrictions. You might not find CC exciting, but it's hard to call it OP.
 
  • Like
Reactions: ScottulusMaximus

Hoff

Tech Support
Oct 30, 2012
2,901
1,502
218
Yeah, the problem with that however is that you programs will start running from the top, which is highly annoying with feller or miner turtles. To offset this, there's the GPS module OR you could save the coords/variables in a file BUT that's a ton of work.

Everyone who says CC is OP needs to program something first. Really if I had the power, then I'd lock every single person who says that in a dark room and wouldn't let him leave before solving one of the above problems.

Saving it to a file doesn't have to be a ton of work. Depending on how complex the program is. But of course that depends on the person doing it.

I completely agree with you though lol.
 
  • Like
Reactions: Poppycocks

egor66

New Member
Jul 29, 2019
1,235
0
0
Most people's complaint about CC is that when someone else does the work noobs can pastebin it and this makes some people uber mad. Most of the other complaints are nonsense. Turtles are usually the hardest solution for any given problem. They see slightly more use now because of the absence of frames in 1.5.2/1.6, but only pretty high end builds and builders can really unlock their potential.

And even then, they're awkward to fuel, pretty slow, and often have weird restrictions. You might not find CC exciting, but it's hard to call it OP.
You should have seen the build 2 guys did on a server I was on, something like 40 turtles, a cube of turtles with t5 in centre, wall, floor & ceiling all turtles controlled by a cc computer, only 2 things missing, an off switch & some way to collect the xp orbs, no really its true, I was noticing minor lag increasing slowly, so started hopping base to base to check, found this made but 2 guys on there second day (3ish hours) on server, then 2 issues arose 1 how with the very limited time did they collect the resources & seeing as they had no machines setup did they get the 40ish turtles & cc, I know it could be done but they spent all there time chatting & looking at other players homes, 2 if there that good why two basic flaws, I did check there code while waiting for the admin, looked really good, used sleep (0.5) & a rs signal to control the on/off sequence of turtles, but no way to shut down or collect orbs, the orbs where making some lag.

In the right hands turtles & CC can be very powerful, but when pasebin-ing you dont learn anything, I my self am no coder but manage to make turtles do my bidding by use of my own codes or other ppls that I have edited to suit, ether way I learned as I went, viewing other ppls code can be a great way to learn.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Saving it to a file doesn't have to be a ton of work. Depending on how complex the program is. But of course that depends on the person doing it.

I completely agree with you though lol.
Lol, I knew there had to be at least one thing we can agree on :D.
 
  • Like
Reactions: Hoff

gattsuru

Well-Known Member
May 25, 2013
364
103
68
... Turtles are usually the hardest solution for any given problem. They see slightly more use now because of the absence of frames in 1.5.2/1.6, but only pretty high end builds and builders can really unlock their potential.

And even then, they're awkward to fuel, pretty slow, and often have weird restrictions. You might not find CC exciting, but it's hard to call it OP.
Eh... perhaps it's because I'm too used to working in scripting languages, but there's a lot of things you can teach turtles to do without being very fancy /or/ requiring extreme amounts of resources. A lot of fairly capable commands don't have a fuel cost, and fairly simple loops of things like Turtle.Attack() can really go nuts in a multiple-mod environment. Making a /good/ Turtle design is really, really tough, since even pastebin'd code to replace a Quarry completely still needs well-designed GPS. Making a good-enough design, unfortunately, is rather trivial, and it tends to result in Computers or Turtles appearing because the designer didn't want to devote space or thought to a design.

((On the flip side, I'd rather people on a server use a Computer to do a thousand-plus-second timer than a redstone clock tower. And adding durability to turtle tools helps fix things a lot.))
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
A lot of fairly capable commands don't have a fuel cost, and fairly simple loops of things like Turtle.Attack() can really go nuts in a multiple-mod environment.

Or you could just use MFR. Which is what everyone does on all the RR testing servers. Cheaper, more reliable, easier, more options. It is not that big a deal. There is ONE outstanding issue with Dartcraft, but BlueDart is gonna clear that up and PowerCrystals is routing around it anyways.

Making a good-enough design, unfortunately, is rather trivial, and it tends to result in Computers or Turtles appearing because the designer didn't want to devote space or thought to a design.

Except to write the code, make sure its fed, etc. People keep saying, "Turtles let you break anything". And I say, "How." Usually 2 things get mentioned: DireWolf20's new style mining well quarry and Turtle.Attack(). I find neither to be terribly impressive or compelling examples.