[Tutorial] How to add a custom, craftable item

I think you and @TobiasSabathius would get along nicely!

I’m loving the artwork on that rune pillar, simple yet still retains that Stonehearth vibe to it.

As for the big tree replacing the flag I would have to echo @voxel_pirate in that I’m a big fan.

Faction/ Race specific starting markers instead of a banner would be pretty awesome.

3 Likes

I like the idea of a large tree.

1 Like

I am finding that “stonehearth vibe” is a pain in the ass to do properly, took a lot of tweaking to get that big tree to look like it actually belonged in Stonehearth, currently kicking around a couple ideas for the runestones, trying to decide between a christmas tree and a more Stonehearthy square pillar, opinions? (I have not voxel shaded them yet).


1 Like

@grmachiavelli, these are AWESOME. Everyone-at-the-office-clusters-around-and-all-agrees-its-awesome, awesome. :slight_smile: The effort you’ve put into making the giant tree Stonehearth-appropriate voxel resolutions definitely shows. :slight_smile: :slight_smile: :slight_smile: Thanks so much for sharing!

1 Like

first of all, welcome aboard! :smile:

second, this is some brilliant stuff, and right out of the gate too! :+1:

echoing other comments in that the artwork fits perfectly with the SH theme…

oh yes, this would be a wonderful touch… :+1:

edit: as for which pillar, thats difficult… they both look great, and both would fit right into the landscape… i suppose my initial reaction would be for the first option? adds a little more of a unique design?

2 Likes

Took quite a bit, but finally I think I am there (or at least close to). So here is a first screenshot with 2 professions (the second one was a bit hungry and thought some berries might be of help) :wink:.

P.S. Need to summarize what I have changed and make it a bit more understandable. Also I need to put a bit more effort to make the additional workshop functional. Once this is done, the second tutorial will follow.

6 Likes

nice, looking forward to the tutorial.

seconded! i really am thoroughly enjoying all the progress folks are making in cracking open the code and implementing their own ideas… this community never ceases to amaze… :smile:

Uff… that was a hard bit of work. But finally I have a custom profession up and running (so it is also crafting and logging the promotion). Once I have customized the look a bit, the tutorial will follow. The bad part is that if you want to setup a custom profession you will have to edit two Lua-files. I am pretty sure this will change soon… but that’s part of the game, no? :wink:

2 Likes

Which two? Let me know and I’ll see if there’s another way. I’m pretty sure I added weaver without adding anything to lua.

@sdee I need to add my custom profession to:

:one: “…\Stonehearth\mods\stonehearth\professions”

… where I have to add a folder with the name of the profession and the folder has to include a file named “profession.lua” with several references to components. If this file is missing, the profession is not working (Stonehearth stops after the promotion).

:two: “…\Stonehearth\mods\stonehearth\services\personality”

… where I need a similar entry to the existing ones for the weaver and carpenter, otherwise the log-entries are not generated / stored (if I see it right):

  self:_load_activity("stonehearth:personal_logs:promote_carpenter")
self:_load_activity("stonehearth:personal_logs:promote_weaver")

At least the second one should be rather easy to replace with some generic code for someone skilled as you are :stuck_out_tongue_closed_eyes:.

P.S. You might have added the weaver without issues because both files / entries are already existing for the weaver in the actual release.

1 Like

Ah, I’d forgotten the .promote() functions. Your guess is right; Tom had added the weaver one a long time ago, before I actually added the weaver. Hm, well, at least this one has very little logic, and is mostly like a config file. I’ll see what we might be able to do to automate that. (No guarantees.)

The second one is absolutely going to change later. We still need to talk about it, but we’re probably going to make that load_activity function public, so it can be called from any mod’s lua file, or from a mod’s manifest.

Good reminders, thanks!

2 Likes

this is why we love indie/kickstarter games in general, and Team Radiant in particular… watching the game evolve, taking fan input along the way… very cool stuff folks… :+1:

and totally worth the tradeoff of being forced into contractual labor with @Geoffers747… only six more years to go! :calendar:

3 Likes

We get new golf carts in 2016.

Hopefully these ones have go faster stripes so we can exceed 5 mph. sighs

5 Likes

Golf carts?! You two are spoilt… :wink:

1 Like

Golf carts! Where’s Qubicle I got a new project…

1 Like

This tutorial has been super rad! I’ve been using it to try and make a spear for the profession I’m making in that other thread I made. Baby steps, right?

So I ran into a couple hitches. So far I’ve managed to overcome all of them, but now I’m getting a C++ error with my item. It seems that “expected script path to end with .lua” is what’s killing the program.

The errant behavior is that I get the script error as soon as the item finishes crafting and my carpenter takes the item to the stockpile. When the item is placed on the ground the game just shuts down with the following error:

2014-Jun-19 22:40:04.548639 | 0 | lua.code | – Script Error (native) Begin -------------------------------
2014-Jun-19 22:40:04.548639 | 0 | lua.code | c++ exception: expected script path to end with .lua
2014-Jun-19 22:40:04.548639 | 0 | lua.code | stack traceback:
2014-Jun-19 22:40:04.548639 | 0 | lua.code | [C]: in function 'resume’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | stonehearth/services/server/threads/thread.lua:372: in function '_do_resume’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | stonehearth/services/server/threads/thread.lua:47: in function 'resume_thread’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | stonehearth/services/server/threads/thread.lua:23: in function 'loop’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | …nehearth/services/server/threads/threads_service.lua:9: in function 'self’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | radiant/modules/events.lua:167: in function 'trigger’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | radiant/modules/events.lua:194: in function '_update’
2014-Jun-19 22:40:04.548639 | 0 | lua.code | radiant/server.lua:112: in function <radiant/server.lua:106>
2014-Jun-19 22:40:04.548639 | 0 | lua.code | – Lua Error End -------------------------------

Sorry if this is necroposting, but any ideas what I could have done wrong?

1 Like

@EDC… sounds to me like you are referring to a Lua-file somewhere within your mod but the linked file does not have the file-ending “.lua”. I would start with checking the file-names and the references in your files.

2 Likes

It sounds like an issue with threads, however, which are only ever really used inside of AI stuff to my knowledge.

Figured it out. Sorry for being invisible on this!

My source file I copied was the iron_sword .jsons, which have weapon data in them.

It turns out the reason I was getting this error was due to the combat data included in the weapon_info tag. I removed that block and everything works fine. That’s what I get for trying to pre-empt the combat engine, I guess.

Hope this was helpful learning : P

3 Likes