[Mod] Scriptmine

dulsimikar
New member
 
Posts: 3
Joined: Wed Oct 26, 2016 11:30
GitHub: dulsi

[Mod] Scriptmine

by dulsimikar » Wed Oct 26, 2016 11:56

My son recently attended a "Coding with Minecraft" class at the library. He enjoyed himself and wanted to play with it at home. Since we don't have minecraft, I decided to see how hard it would be to implement it in minetest. The class used scriptcaft. After a little playing around, I managed to load the duktape javascript engine in minetest and get echo working. It's just a prototype at the moment. I don't have compiling/installing instructions yet.

https://github.com/dulsi/scriptmine

Why use javascript instead of just teaching him lua? Because he has friends using minecraft. If he has a compatible mod, they can trade scripts. Also scriptcraft is hard for people to install. If I had a simple package with minetest, I can probably get more people to try it out.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: [Mod] Scriptmine

by twoelk » Wed Oct 26, 2016 14:25

 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Scriptmine

by azekill_DIABLO » Thu Oct 27, 2016 11:13

looks nice!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

dulsimikar
New member
 
Posts: 3
Joined: Wed Oct 26, 2016 11:30
GitHub: dulsi

Re: [Mod] Scriptmine

by dulsimikar » Fri Oct 28, 2016 03:30

I got box and box0 functions on drones working. Looking at some of the other functions have made me wonder about my approach. Right now Drone is mostly implemented in C code. I'm thinking I should reuse the javascript implementation in ScriptCraft as much as possible instead.
 

dulsimikar
New member
 
Posts: 3
Joined: Wed Oct 26, 2016 11:30
GitHub: dulsi

Re: [Mod] Scriptmine

by dulsimikar » Sun Oct 30, 2016 00:53

Ok. Hack as much code as quickly as possible to get scriptcraft's drone working is done. I can now do '/js sphere0(10, 41)' and make a giant gold hollow sphere. Some of the scriptcraft drone is not implemented yet like doors, ladders, garden, etc. My son wants to make a castle so I've focused on the functions needed for that. I've got the chessboard.js working. fort.js needs doors, ladders, and torches. Looks like castle.js doesn't need anything else.

How do I place a door in lua? I tried set_node and place-node but I haven't gotten them to work. Is item_place_node needed to do that? Does anyone have a example placing a door in lua?

I also decided to look at building the mod for windows. The windows minetest build is not dynamically linking to lua/luajit. Which means I can just hook this in. I haven't decided how I'm going to solve that problem yet.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron