# A note for the Devs

**URL:** <https://discourse.stonehearth.net/t/a-note-for-the-devs/6547>\
**Category:** General Discussion\
**Created:** [July 9, 2014, 5:59pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547 "2014-07-09T17:59:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wombat85](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wombat85](https://discourse.stonehearth.net/u/Wombat85)\
**Post date:** [July 9, 2014, 5:59pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/1 "2014-07-09T17:59:47Z")

</div>

So here it is, I am not a sycophant in any way, in fact I got accused of being to hard on the devs but I wanted to say something but first I wanted to provide some context.

I am a senior in Mechanical engineering at the age of 30 (shhhhh), and have some experiance in C, but mainly I spend a lot of time writing .m files and scripts in matlab. I have never seen .json .luac or even tried my hand at java in my life.

So what I wanted to say is how awesome you guys are at making coding in this game accessible. I decided I wanted the mean bed to be a base component for a comfy bed instead of the cloth, 30 min of random trial and error and I had this. I am going to make a tutorial soon but until then just wanted to say a big “great job guys!” Its one thing to code, its another to set things up so a lay coder can interpret what you have done and then edit it.

---

<div class="post-metadata">

**Author:** ![sdee](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/sdee/32/65441_2.png) [@sdee](https://discourse.stonehearth.net/u/sdee)\
**Post date:** [July 9, 2014, 6:03pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/2 "2014-07-09T18:03:08Z")

</div>

> [@Wombat85](#):
>
> wanted the mean bed to be a base component for a comfy bed

Wow, that’s a great idea!

> [@Wombat85](#):
>
> its another to set things up so a lay coder can interpret what you have done and then edit it.

Glad you’re enjoying! It still takes a good deal of effort/initiative to figure it out with no documentation, so props to you. Looking forward to the tutorial!

---

<div class="post-metadata">

**Author:** ![RepeatPan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/repeatpan/32/46418_2.png) [@RepeatPan](https://discourse.stonehearth.net/u/RepeatPan)\
**Post date:** [July 9, 2014, 6:25pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/3 "2014-07-09T18:25:19Z")

</div>

> [@sdee](#):
>
> Wow, that’s a great idea!

Except when you realise that in order to upgrade beds, you’ll need to disassemble-upgrade-assemble beds again or have one spare bed, which will put you at +1 bed at the end of the whole process. Surely not _that_ much of a big deal, but just something to watch out when you have some sort of upgrade-an-item-in-use thing.

---

<div class="post-metadata">

**Author:** ![Wombat85](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wombat85](https://discourse.stonehearth.net/u/Wombat85)\
**Post date:** [July 9, 2014, 6:31pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/4 "2014-07-09T18:31:19Z")

</div>

@RepeatPan this actually isnt a problem, the carpenter automatically deconstructs the bed, tested it several times with no problems, so all you need to do is manually place the upgraded bed. The old bed is consumed in the process.

---

<div class="post-metadata">

**Author:** ![SteveAdamo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/steveadamo/32/13955_2.png) [@SteveAdamo](https://discourse.stonehearth.net/u/SteveAdamo)\
**Post date:** [July 9, 2014, 6:37pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/5 "2014-07-09T18:37:19Z")

</div>

> [@sdee](#):
>
> Wow, that’s a great idea!

agreed… I like the idea of using existing crafted items as a base to upgrade to the next tier… 👍

---

<div class="post-metadata">

**Author:** ![RepeatPan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/repeatpan/32/46418_2.png) [@RepeatPan](https://discourse.stonehearth.net/u/RepeatPan)\
**Post date:** [July 9, 2014, 6:52pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/6 "2014-07-09T18:52:59Z")

</div>

> [@Wombat85](#):
>
> this actually isnt a problem, the carpenter automatically deconstructs the bed, tested it several times with no problems, so all you need to do is manually place the upgraded bed. The old bed is consumed in the process.

I would say it is a problem… If a carpenter is running around and takes already placed equipment to craft something new, you never know which thing he took, or where - as there’s little control over that. It also doesn’t really allow you to plan or prioritise who gets an upgraded bed first.

---

<div class="post-metadata">

**Author:** ![SteveAdamo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/steveadamo/32/13955_2.png) [@SteveAdamo](https://discourse.stonehearth.net/u/SteveAdamo)\
**Post date:** [July 9, 2014, 7:01pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/7 "2014-07-09T19:01:43Z")

</div>

> [@RepeatPan](#):
>
> or prioritise who gets an upgraded bed first

then again, we can’t prioritize who gets _existing_ crafted items either… you drop a bed, and its first-come-first-serve…

---

<div class="post-metadata">

**Author:** ![RepeatPan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/repeatpan/32/46418_2.png) [@RepeatPan](https://discourse.stonehearth.net/u/RepeatPan)\
**Post date:** [July 9, 2014, 7:03pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/8 "2014-07-09T19:03:37Z")

</div>

> [@SteveAdamo](#):
>
> then again, we can’t prioritize who gets existing crafted items either… you drop a bed, and its first-come-first-serve…

True. However, assigning a bed would be an okay mechanic (or rather assigning a house?) but if you have to select the ingredients for what to craft, then it sounds a bit too micromanagey.

---

<div class="post-metadata">

**Author:** ![sdee](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/sdee/32/65441_2.png) [@sdee](https://discourse.stonehearth.net/u/sdee)\
**Post date:** [July 9, 2014, 7:09pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/9 "2014-07-09T19:09:30Z")

</div>

If I were doing it, I would probably have the recipe call for a bed proxy, instead of a bed. That way, you never upgrade a placed bed, just a tiny little placeholder bed.

---

<div class="post-metadata">

**Author:** ![SteveAdamo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/steveadamo/32/13955_2.png) [@SteveAdamo](https://discourse.stonehearth.net/u/SteveAdamo)\
**Post date:** [July 9, 2014, 7:10pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/10 "2014-07-09T19:10:09Z")

</div>

> [@sdee](#):
>
> That way, you never upgrade a placed bed, just a tiny little placeholder bed

that’s why they pay her the big 💰 …

😄 👍

---

<div class="post-metadata">

**Author:** ![Wombat85](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wombat85](https://discourse.stonehearth.net/u/Wombat85)\
**Post date:** [July 9, 2014, 8:06pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/11 "2014-07-09T20:06:28Z")

</div>

@sdee that is what I tried at first, but ingredients has to be a material tag, it wont call anything else, and those are inherited from the true object for proxy at this stage. Tried adding a material tag to the proxy, it doesn’t do anything it still just inherits the main object material.

---

<div class="post-metadata">

**Author:** ![Yeti](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/yeti/32/45362_2.png) [@Yeti](https://discourse.stonehearth.net/u/Yeti)\
**Post date:** [July 9, 2014, 8:37pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/12 "2014-07-09T20:37:12Z")

</div>

A way to solve this problem is to have a movable ghost bed, so if a bed is taken from there, a bed object would just be put to replace it.

---

<div class="post-metadata">

**Author:** ![Teleros](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/teleros/32/63349_2.png) [@Teleros](https://discourse.stonehearth.net/u/Teleros)\
**Post date:** [July 9, 2014, 9:40pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/13 "2014-07-09T21:40:11Z")

</div>

> [@sdee](#):
>
> If I were doing it, I would probably have the recipe call for a bed proxy, instead of a bed. That way, you never upgrade a placed bed, just a tiny little placeholder bed.

1. Weaver makes item: Linen Duvet.
2. Select Mean Bed.
3. Click “Add Linen Duvet”, if bed is not in use (or not?). Nearest (?) Linen Duvet object is tagged as “in use” or whatever, so you can’t try to do this with too few duvets. “Add Linen Duvet” button greyed out so you can’t click it again.
4. Worker goes to fetch a Linen Duvet, takes it to bed, hammers (because placing _anything_ requires hammering 😃 ) it onto the bed.
5. Bed becomes Comfy Bed, retains ownership details etc. No surplus materials used, no placing upgraded beds, etc.

Thoughts?

---

<div class="post-metadata">

**Author:** ![sdee](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/sdee/32/65441_2.png) [@sdee](https://discourse.stonehearth.net/u/sdee)\
**Post date:** [July 9, 2014, 9:46pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/14 "2014-07-09T21:46:21Z")

</div>

> [@Wombat85](#):
>
> but ingredients has to be a material tag, it wont call anything else, and those are inherited from the true object for proxy at this stage. Tried adding a material tag to the proxy, it doesn’t do anything it still just inherits the main object material.

Ah, I see what you mean. The material tags of the proxy are identical to the material tags of the full sized item, since they’re copied. However, I don’t think they’re copied UNTIL the proxy is first placed (this is a technicality, so theoretically it could change. But!) So if you added a material component to the proxy item, and made the material tags there something unique, and then required that unique set of tags from the recipe, then the recipe will only use proxy items that have never been placed. Which is what you want, even if it came about via a loophole, huzzah!

In other words, add something like:

```
"stonehearth:material" : {
     "tags" : "wood furniture crafted chair little"
   },

```

To the wooden\_chair\_proxy.json

Then make the recipe for the arch backed chair require one “wood furniture crafted chair little”

```
"ingredients": [
  {
     "material" : "wood furniture crafted chair little",
     "count" : 1
  }
],

```

And see what happens.

A more robust solution would be to create a component that lives only on proxy items that adds the special “little” tag for you on initialization. But that’s the followup exercise. 😉

**Edit:** you can also change the material to whatever you need. The existing tags do denote some behavior; resource means it’s counted as a resource, wood resource means it’s stocked in stockpiles that take wooden resources, etc, but as long as the two strings match, you’re theoretically good.

---

<div class="post-metadata">

**Author:** ![Wombat85](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wombat85](https://discourse.stonehearth.net/u/Wombat85)\
**Post date:** [July 9, 2014, 9:59pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/15 "2014-07-09T21:59:04Z")

</div>

Thanks @sdee yea tried that to, it still just inherits the tag, it goes to the stockpile then just sits there. On another note my carpenter can now make rabbits. In case anyone is wondering I am the sort who abstractly figures out how to do things ahead of a project. All this is laying the ground work for my mod, just dont know what the mod will be yet but had some good ideas today.

---

<div class="post-metadata">

**Author:** ![sdee](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/sdee/32/65441_2.png) [@sdee](https://discourse.stonehearth.net/u/sdee)\
**Post date:** [July 9, 2014, 11:01pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/16 "2014-07-09T23:01:00Z")

</div>

> [@Wombat85](#):
>
> it still just inherits the tag, it goes to the stockpile then just sits there.

Huh, that’s weird; I tried it out and it works in my test environment. But it could be a timing thing! If you post your recipe file, your simple bed file, and your comfy bed file, I can take a look!

---

<div class="post-metadata">

**Author:** ![SteveAdamo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/steveadamo/32/13955_2.png) [@SteveAdamo](https://discourse.stonehearth.net/u/SteveAdamo)\
**Post date:** [July 9, 2014, 11:10pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/17 "2014-07-09T23:10:19Z")

</div>

I’m thoroughly enjoying seeing this come together… @Wombat85, you’ve sparked my interest in resuming my modding efforts… thanks! 😄 👍

---

<div class="post-metadata">

**Author:** ![Wombat85](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wombat85](https://discourse.stonehearth.net/u/Wombat85)\
**Post date:** [July 10, 2014, 1:14am UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/18 "2014-07-10T01:14:51Z")

</div>

@SteveAdamo come help the EVE project, a crafted human.

---

<div class="post-metadata">

**Author:** ![phoriist](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/phoriist/32/41825_2.png) [@phoriist](https://discourse.stonehearth.net/u/phoriist)\
**Post date:** [July 10, 2014, 9:19am UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/19 "2014-07-10T09:19:13Z")

</div>

another idea: Let’s make an option to change items back to their ‘miniature transportable versions’.  
It could be very useable if we will simply ‘upgrading’ items rather than crafting new ones.

---

<div class="post-metadata">

**Author:** ![Teleros](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/teleros/32/63349_2.png) [@Teleros](https://discourse.stonehearth.net/u/Teleros)\
**Post date:** [July 10, 2014, 1:02pm UTC](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547/20 "2014-07-10T13:02:18Z")

</div>

[quote=“phoriist, post:19, topic:6547, full:true”]another idea: Let’s make an option to change items back to their ‘miniature transportable versions’.  
It could be very useable if we will simply ‘upgrading’ items rather than crafting new ones.[/quote]  
Yeah, that could work nicely with what I was suggesting above. So you select a Mean Bed, and it has the following options:

1. Designate Owner (for when it’s not in an owned structure / room)
2. Store / Cancel Store Order (worker disassembles bed into portable version, places in nearest furniture stockpile)
3. Add Linen Duvet (for making it into a Comfy Bed etc, as I detailed above)
4. Add Silk Duvet (for making it into a Luxury Bed, same principle as the Comfy Bed)

Thoughts?

[Next page](https://discourse.stonehearth.net/t/a-note-for-the-devs/6547.md?page=2)
