Welcome to the Bitcave! Nerdiness, Jokes, Mods, Ideas, and coding!

Ahh, my old stomping ground… Thanks for the link @voxel_pirate, always clever to incorporate training with entertainment… :+1:

This looks cool… seems like a good way to learn while having fun :slight_smile:

If you guys are interested in a very modder supported, nicely coded game that supports Lua - Don’t Starve is good. I been playing around with it here and there to learn the syntax for when Stonehearth pops out. Easy way to see how code works, limited amount of docs on it, and people often use ‘work arounds’ but it will get you comfortable if you’ve coded a bit and want to step into Lua. Not really suggesting it to someone learning how to code.

awesome… I read about that elsewhere (was it here?)… do they have an existing modding API, or have the fans simply hacked their way in?

*their… :stuck_out_tongue: Sorry, force of habit.

Anywho, I heard that it didn’t have mod support, what’s the big deal? BUT, if it’s not too difficult to get into, I’d certainly like to give it a try.

1 Like

The 3 mentioned in the first post are Civ 5, Garrys Mod and ComputerCraft, I’ve also mentioned ToME but I didn’t see that on the list, there’s a few things out there.


Good news everyone!

FIRST REMEMBER: The graphics demo could have significant changes to the actual release, there might even still be major changes to the modding api.

Now though that we have a kind of crippled demo of the Stonehearth engine, this demo contains two ‘smod’ files in the mods folder that likely contain all the lua. My initial instincts were correct on them and they’re actually just renamed zip files. After quickly extracting them it revealed they had a whole load of luac files there seems to be a whole bunch of lua decompilers across the web however I couldn’t get one working. I have confirmed though that modifying the json works fine based off my teleporting bunnies.

Just throwing that out there.

5 Likes

Well, if I’m not mistaken, .luac (Lua Compiled) files aren’t actually Lua logic files… I believe it said that .luac files are more for UI logic and things, rather than, well, actual game logic.

i believe you are correct sir… at least, Google agrees with you…

.lua/.luac control mostly user interface - buttons, what to display, etc.

1 Like

Except in some cases. eg. Stonehearth where it controls pretty much everything due to how the modding works. You build the ai and everything out of it it seems like so it would in fact control game logic in Stonehearth. Besides I managed to get a decompiler working and although it doesn’t seem to work on every luac file in there it only fails on like one or two of them so it’s fine.

I just wanted to post here so I could say thanks for posting all the links about learning lua! I have been thinking of learning lua again. I learnt it back in 2008 but It’s been 4-5 years since I last used it and I only learned the basics which I have forgotten. :cake: and :candy: for you!

EDIT: Oops. 2008 not '09 :stuck_out_tongue:

1 Like

They have some minor APIs - not sure if they put them out or someone else did.

They mostly only convert format and so forth. They literally just left the Lua scripts sitting in the folders for you to play with. It makes it pretty easy to bounce around and figure out whats going on since 90% of the game seems to be injected using Lua. Very neatly typed out code - not commented but everything is named so well often you don’t need it.

Well it seems I came to the right place to learn coding…
I was wondering where I should start?, having no experience, I like the idea of modding Stonehearth but it would take awhile to learn so that may not be possible.

A good start would be to browse the forum here. Depending on what you would like to learn (especially which language), you will find some threads including learning resources…

2 Likes

Thanks, That’s next weekend all sorted…

Well coding is interesting… I feel my life being sucked away… oh and I’m using Codecademy to learn Java! what are the languages that i need to learn to mod stonehearth???
Thanks for the help!

1 Like

Depends of course on what you want to mod, but this would be Lua, JavaScript and HTML / CSS.

Okay thanks, might take some time… but it’s going to be a journey!

If you really want to learn it “only” for Stonehearth, maybe start with JavaScript and HTML / CSS. With this you can already start doing some modding and as your ideas become more complex, you can turn towards Lua.

For sure coding can be quite entertaining and rewarding (once it works what you want to code). So that’s not lost time if you ask me :wink:.

3 Likes

Greetings,

I started making my first steps in Lua thanks to this thread,so thanks for that;)

Also,i found this today,

https://love2d.org/

Bassicaly (if i understood correctly) you can make simple 2D games using Lua. I am in no position to try it or know good it is but it seems to be a cool way to use and test what you learn. So i am hoping to be able to make something in the months to come.

Also a question,does anyone have a link with a bunch of exercices for Lua,even better with “answers”? I want to test my measly knowledge but i don’t really know how:P

Thanks

1 Like

welcome aboard! :smile:

LÖVE is a neat little framework… i only toyed around with it a bit, when i revisited Lua last year… from what i’ve seen, there are a good number of helpful tutorials that can be leveraged to help folks gain familiarity with the language/platform…