Main Menu

Survival Toolkit

Started by Inksaver, Dec 17, 2020, 11:18 AM

Previous topic - Next topic

Inksaver

I have written a toolkit for use in survival mode, once you have your first Crafty Mining Turtle. The code began in 2014 when I solved the self-replicating challenge on the old forums, and has now been adapted to run on ccTweaked with MC 1.16.3, but this time with player supervision



It is designed to allow you to use just one program to farm crops and trees, mine diamonds and ancient debris, create dungeon mob spawner farms, build canals across land and water. (Canal on water? - parallel lines of cobble 2 blocks apart over the ocean), bridges and pathways in overworld and End, land shaping, ocean monument draining and much more.

I have uploaded 10 videos to youtube so far, with more to follow: Playlist for Toolkit


The toolkit consists of a main file and 2 library files:
main file: https://pastebin.com/UFvjc1bw which will automatically download the library files into a folder called 'lib'

You can get this and a bunch of other utilities by using the command: pastebin run 8qbeZevX

This is still in active development, and I am happy to answer any questions and deal with bugs and improvements
Sent from a computer using a keyboard and mouse.

QuickMuffin8782

#1
One question, does the turtle itself use the direct pathfinding?
GOTTA GO FAST!!!! - Sunrise Studios now calling testers! Check the post!
Gitlab - Join my official discord! - SS Discord

Inksaver

Not sure what direct pathfinding is...
There is nothing that uses any coordinates, with the exception of asking the player for the current Y value on a couple of the utilities.
Sent from a computer using a keyboard and mouse.

QuickMuffin8782

Well direct pathfinding is actually finding a path with any ability to tackle any obstacles that may be in the way.
GOTTA GO FAST!!!! - Sunrise Studios now calling testers! Check the post!
Gitlab - Join my official discord! - SS Discord

Earther



I just get this error when trying to use pastebin run on it, I'm using 1.16.4(/1.95), but I would think that this would be the same?

Inksaver

@QuickMuffin8782
As this toolkit is designed to be under direct player control, there is no need for direct pathfinding.
The self-replicating scripts had this ability, as they were designed to be started and left to their own devices:
2014 original https://pastebin.com/JVD1RPfg
2018 update using .inspect() and .getItemDetail() https://pastebin.com/2Zf5an8H


@Earther
I uploaded a script after debugging and missed the ]] used to end a multi-line comment. There is a new version added just now with this corrected, or you can delete the ]] on line 2018 and save. The current version is 20210107.1047.

The getTools.lua script has been modified so it will check versions of all the files and update as required. pastebin run 8qbeZevX or view at https://pastebin.com/8qbeZevX
Sent from a computer using a keyboard and mouse.

hdbuon

does it work in 1.12.2?
since i prefer to play in that version

Inksaver

It works in all versions from 1.7.2 onwards. I am currently using it in 1.16.5

There is a youtube series on this utility at: https://www.youtube.com/playlist?list=PLE8GQEkUWuwFNLS9cdTCr_1qalC4eGBOr
Sent from a computer using a keyboard and mouse.

QuickMuffin8782

#8
Quote from: Inksaver on Jan 15, 2021, 10:16 AM-snip-

That explains everything on the toolkit.
Suggestion: So users can navigate better, have a menu that they can interact in. https://devbin.dev/mxRBjyCT
GOTTA GO FAST!!!! - Sunrise Studios now calling testers! Check the post!
Gitlab - Join my official discord! - SS Discord

Shadow3641

Hey Inksaver Love your program I use it all the time just wondering if you're still actively working on it.

Inksaver

Yes

The files on pastebin have a version embedded in them: eg version = 20230515.1500 which gives the YYYY/MM/DD:HHMM date.

I am making major updates at the moment, and that is introducing errors, so keep updating your copy with
"pastebin run 8qbeZevX". Report any errors with the version no and the error message.

Will be updated again later today.
Sent from a computer using a keyboard and mouse.

Shadow3641

#11
version = 20230515.1500
if you run tk.lua and try hit q on the second option you get this error

/tk.lua:9381: attempt to compare number with nill

you just need to flip the if statements and it seems to work just fine

if modifier == "q" then
 R.choice = 0
 return R -- quit task system so it re-starts first menu
 elseif modifier == "h" then -- get help on main menu items
 R = lib.getHelp(R, itemsRequired) -- if R.choice reset to 0 then will continue
 end
 if subChoice > 9 then -- need more than 9 sub-options
 R.choice = subChoice + (mainChoice * 100) -- 10 = 10 + 1000 = 1100
 else -- eg main option 1 (mining), sub-option 1 (create mine) = 1 + 10 = 11
 R.choice = subChoice + (mainChoice * 10) -- 9 = 9 + 9 * 10 = 99, 1 + 10*10 = 101
 end

Inksaver

Thanks for pointing this out.

The menu system returns 2 values, where the first is nil if the user chooses "q" or 'h'
There are a number of ways to fix it, but all I did was to check for nil first.

I wanted 'q' on the second menu to return to the root menu, rather than quit entirely, so R.choice is set to 0. Change this to -1 for total exit.
if subChoice ~= nil then
if subChoice > 9 then -- need more than 9 sub-options
R.choice = subChoice + (mainChoice * 100) -- 10 = 10 + 1000 = 1100
else -- eg main option 1 (mining), sub-option 1 (create mine) = 1 + 10 = 11
R.choice = subChoice + (mainChoice * 10) -- 9 = 9 + 9 * 10 = 99, 1 + 10*10 = 101
end
end
-- eg chosen option 1 mining or option 10 measuring
if modifier == "q" then
R.choice = 0 -- return to root menu. change this to -1 if quit application preferred
return R -- quit task system so it re-starts first menu
elseif modifier == "h" then -- get help on main menu items
R = lib.getHelp(R, itemsRequired) -- if R.choice reset to 0 then will continue
end


Version 20230520.0700 now live.
Sent from a computer using a keyboard and mouse.

Shadow3641

Awesome I will go check it out!

Maestro

Hey Inksaver, apologies if the necro comes unappreciated, but is this still in active development?