Nice idea, if you continue to keep this post up-to-date . Actually there is a category in this forum called “Scripting & Code” (almost forgot about it). A first step might be to take a look on what is already mentioned there (and in other places of the forum).
@ManOfRet This does not fit completely into the BitCave-Thread, if you ask me. The BitCave is about Lua so far and (at least I see it like that) about exchange of ideas and challenging eachother… more than providing a repository. But this is just my view.
JavaScript:
While I was browsing a bit around, I did find a nice site called **JS Bin** :
JS Bin is a webapp specifically designed to help JavaScript and CSS
folk test snippets of code, within some context, and debug the code
collaboratively.
So you can register and create an own account with JS Bin. After that, you can upload code, run it and share it with others. One of the nice features is that you can add libraries like jQuery, Ember.js and Handlebars.
So if you are thinking about getting prepared…
Lua (general coding):
[image]
Welcome to the BitCave!
Last Updated 12:27am PDT 02/11/14
This is Bits , and I’d like to welcome you to the BitCave, a central thread for discussion of the technical, design and coding aspects of Lua, AI, and Mods in general (I wish there was a way to Cross-Post). There will be tons of resources in this thread, and I will update the OP regularly with new info and ideas (It’s likely to get quite long). So with that, a disclaimer:
!!!WARNING!!!
This thread contains learning, humor, and …
This following script allows to check if a defined file exists. This could be useful if you want to check if e.g. a certain Mod is installed.
To receive the expected results this needs a bit of preparation. If you want to give it a try, please create a Folder “C:\Stonehearth\Mods” and save a .txt-File in this folder which you call “Test Mod.txt”. We will check the existance of this file during the example.
Update: This code might only work out under Windows.
(Translation into German is also i…
As one or the other of you, I have also started to play a bit around with Lua (you might know why ^^). Actually I do have some background in coding… but that’s an awfully long time ago. So maybe I can share a bit what I learn, if that is interesting at all ;-).
Under this link you will find a translation into German.
For the beginning I had this scenario in my mind:
I want to control the behaviour of a setter. Based on a random value
(which I want to influence), the settler should have a te…
I would like to link this second script to the first one, posted here . The initial script could be used to cause one of the workers to hug / greet someone else. This time I would like to find out which of workers is the most happiest, i.e. was hugged most.
Again a “translation” of the script into German is available .
Taking a look into Lua, tables are something you cannot avoid. They are powerful structures, which could potentially be used in Stonehearth to hold the data for each worker (tabl…
Hello everyone! I’m making this to help out people who want to learn Lua so they can get in on modding as soon as the game is in beta. I’m gonna start off by giving a small overview of Lua, and my personal background in Lua.
Lua is a scripting language made in South America, by a few gentlemen who spoke Portugese; hence the name Lua which means “moon”. When Lua is referenced we call it by the Portugese word not as L-U-A. It has a syntax similar to C and Java in many ways, but is FAR less picky …
3 Likes