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

Calculating energy needed for robot travel distance

Question

Hi All,

I'm working on improving the default dig program and am trying to figure out how to calculate energy usage to handle returning the robot to a power station. This was easy with ComputerCraft because turtles effectively use exactly 1 "energy" for every move, and don't consume power otherwise. But OC robots seem to consume a variable (or at least arbitrary) amount of power per different actions, and of course use power even when idle. I haven't exactly been able to put my finger on a pattern.

Can anyone tell me how I might estimate the amount of energy a robot uses over time, depending on what it's doing? I'm hoping there's a simpler solution than tracking energy usage and developing a heuristic to guess.

Thanks!

== Roachy

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

For whatever reason I hadn't considered trolling through the config. I'm reading through it now, and it seems most things do have different energy costs, and that there are additional factors to consider such as the "exhaustion" modifer, sleep factor, generator efficiency, etc. Hmm...

 

Edit: P.S. Also thanks to the devs for reminding me why digging through code is its own reward sometimes:

# Determines whether robots are a pretty cool guy. Ususally cobwebs are
# the bane of anything using a tool other than a sword or shears. This is
# an utter pain in the part you sit on, because it makes robots meant to
# dig holes utterly useless: the poor things couldn't break cobwebs in
# mining shafts with their golden pick axes. So, if this setting is true,
# we check for cobwebs and allow robots to break 'em anyway, no matter
# their current tool. After all, the hardness value of cobweb can only
# rationally explained by Steve's fear of spiders, anyway.
notAfraidOfSpiders=true

 

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.