# MOD: Item Spawner \[Download now\]

**URL:** https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797
**Category:** Modding
**Created:** [January 5, 2014, 11:53pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797 "2014-01-05T23:53:54Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 5, 2014, 11:53pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/1 "2014-01-05T23:53:54Z")

</div>

## Item Spawner mod

I created a mod that enable you to spawn almost any item or mob in game.  
**Requires RP Loader!  
Requires Alpha 1 Release 14!**

Showcase video:  
This a little [preview](http://youtu.be/h1N6HglZNt8) (outdated) .

_ **Usage:** _

Mod adds to campstand two new buttons with enable you to spawn : Spawner and Spawner2.Spawners can change in to most of items or mobs in game ,spawners in to furniture and nature ,spawners-2 in to bolts,toys and creatures.

**TIP:  
After spawner changed into something else doesn’t use his popup menu that stays.**

_ **Changelog:** _

- 1.1.2
- Optimization

_ **Screenshots:** _

 ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/2X/9/96f0c190b180d55198f4a48a8e72afcc4501226e.jpg) ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/2X/1/19b3f2fc3902c84984629a28a6772d03aa7c4421.jpg) ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/2X/5/579fcf730e3ed75e91815cf0427d154251cca19f.jpg) ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/2X/4/49c4bc1e23cb6c3ab6a65eb4a96972bdb3f34133.jpg)

_ **How to install :** _

1. Download [RP Loader](http://www.stonehearthguru.com/forums/alpha-beta-testing-nexus/modding/50980-mod-rp-loader-and-repeatpans-mods-now-independent)
2. Download [mod](http://www.stonehearthkingdom.com/files/download/23-items-spawner-mod/)
3. Copy RP Loader to [your Stonehearth installation folder]\mods
4. Unpack mod to [your Stonehearth installation folder]\mods(not \mods\too\_many\_items !!!)
5. Run Stonehearth and enjoy mod 😉

_ **Planned features:** _

- Special spawner for modders to spawn their mods items

- More items nad mobs

_ **Known bugs** _:

- Icons in spawners sometimes change order

- After spawner changes to something else popup menu stays

---

<div class="post-metadata">

### Author: ![Pandemic](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/pandemic/32/51381_2.png) [@Pandemic](https://discourse.stonehearth.net/u/Pandemic)
#### Post date: [January 6, 2014, 12:00am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/2 "2014-01-06T00:00:16Z")

</div>

This is probubly one of the most awesome things ever. this will be amazing when the full game is out!

---

<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: [January 6, 2014, 12:25am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/3 "2014-01-06T00:25:41Z")

</div>

so, you basically just gave us “creative mode”… ❓

congratulations, i now love you _marginally_ more than i do @Geoffers747… 💗 😉

---

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 6, 2014, 12:37am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/4 "2014-01-06T00:37:38Z")

</div>

Yes I did . I think it will be helpful for mod and alpha testing.

---

<div class="post-metadata">

### Author: ![Warstories](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/warstories/32/65614_2.png) [@Warstories](https://discourse.stonehearth.net/u/Warstories)
#### Post date: [January 6, 2014, 1:22am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/5 "2014-01-06T01:22:47Z")

</div>

This is very cool and fun to use 😄

---

<div class="post-metadata">

### Author: ![Xavion](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xavion/32/43501_2.png) [@Xavion](https://discourse.stonehearth.net/u/Xavion)
#### Post date: [January 6, 2014, 1:56am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/6 "2014-01-06T01:56:34Z")

</div>

Do you know how to make it generate a list of items for usage at runtime? and how were you planning on dealing with the potentially hundreds of items by full release? It should be possible to make a list of items at least, I know that the code can find a list of the factions so it should be feasible at least.

---

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 6, 2014, 12:13pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/7 "2014-01-06T12:13:13Z")

</div>

> [@Xavion](#):
>
> Do you know how to make it generate a list of items for usage at runtime?

For now,no but i will find a way. The problem is items have no things like tags i will need to find way to filter them,also some items require special spawn atributs.

> [@Xavion](#):
>
> how were you planning on dealing with the potentially hundreds of items by full release?

I think i will do a interface similar to that from workshop with categories.

---

<div class="post-metadata">

### Author: ![Xavion](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xavion/32/43501_2.png) [@Xavion](https://discourse.stonehearth.net/u/Xavion)
#### Post date: [January 6, 2014, 12:15pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/8 "2014-01-06T12:15:06Z")

</div>

I might a shot at trying to get a list of items, I have some ideas. The interface idea seems sound.

---

<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: [January 6, 2014, 12:34pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/9 "2014-01-06T12:34:54Z")

</div>

I would probably try reading the manifest’s entities section and work with a few white/blacklists, for example excluding all _\_proxy_ entities, while including only those within _entities/construction_, _entities/furniture_ et cetera. That should get you the majority of all items.

---

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 6, 2014, 5:59pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/10 "2014-01-06T17:59:54Z")

</div>

> [@RepeatPan](#):
>
> I would probably try reading the manifest’s entities section and work with a few white/blacklists, for example excluding all _\_proxy_ entities, while including only those within _entities/construction_, _entities/furniture_ et cetera. That should get you the majority of all items.

I created a [simple mod](https://www.dropbox.com/s/4mxw4jy5sfznszh/show_items.smod) that create manifest.log file with list of all entities that are not \_proxy ,it is quite messy code so i will need to clean it up but it work.  
(This just for demonstration if you are not a moder don’t use it !)  
Require RP loader

---

<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: [January 6, 2014, 6:20pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/11 "2014-01-06T18:20:50Z")

</div>

Wooo! Now I want one of these for our test worlds! 😄

---

<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: [January 7, 2014, 7:08pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/12 "2014-01-07T19:08:05Z")

</div>

Heh, not quite the most elegant reason but I can see where I have to add work ;). In the current repos version of RP I’ve added access to all mods that are recognized (i.e. all mods with a manifest) to be saved within `rp.available_mods`. This way, the manifests are already there for you (and you don’t need to `dir`). A few things, however (keep in mind - just tips!):

- `io.output()` sets the output for **everything**. This means that RP would now log into your manifest.log too. It’s better to `io.open('manifest.log', 'w')` and use the file handle returned by that to log your process (using a local print version similar to what you do). I really wish we had the loggers available to us, but alas. I might add something rp-ish to make this process easier.
- The check for `manifest.rp` is going to fail for Stonehearth because it (obviously) isn’t using rp. Simply checking for `manifest.radiant and manifest.radiant.entities` should do the trick.
- `for key,value in pairs(requirement) do`: `pairs` already gives you `value` (which is identical to `requirement[key]`. You don’t need to save it in another variable (`s`)
- Splitting is not required. What you will need is the entity name (i.e. the key; “dining\_table” for example would then resolve to “stonehearth:dining\_table”, not any part of the path.

I’ll give an item spawner a shot. It will be nice to see if I can get the JS integration a bit further (and to mess around with commands).

I would do the exact same, however - modifying other’s code is a great way to learn a language (or concepts). So far I’ve been the one modifying however, I haven’t seen anyone doing this on my code… Feels a bit odd 😃

---

<div class="post-metadata">

### Author: ![tkh](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tkh/32/62619_2.png) [@tkh](https://discourse.stonehearth.net/u/tkh)
#### Post date: [January 7, 2014, 11:03pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/13 "2014-01-07T23:03:38Z")

</div>

I just did a quick “mod spotlight” of this. Very fun and promising, so keep it up and I will gladly try out later releases as well 😊 Hope you enjoy the video, I sure enjoyed the mod!

Of course, creds to @RepeatPan for the RP Loader.

---

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 8, 2014, 1:16am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/14 "2014-01-08T01:16:43Z")

</div>

Thanks for tips ,they are very useful for me . I just started programing lua ,i know only how to program in C# .

---

<div class="post-metadata">

### Author: ![BFHDD](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/bfhdd/32/42171_2.png) [@BFHDD](https://discourse.stonehearth.net/u/BFHDD)
#### Post date: [January 8, 2014, 5:41pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/15 "2014-01-08T17:41:50Z")

</div>

Working On 2.0 version 😄

**Seed are not working** ☹ i was just playing with menus but check button stays 😃

 ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/5/9/597073549dfe73b056f73e80a6aea9111223259b.PNG)

---

<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: [January 8, 2014, 6:09pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/16 "2014-01-08T18:09:39Z")

</div>

> [@BFHDD](#):
>
> Seed are working only for terrain not for trees ,berry bushes etc.

i dont really think _ **squeeeee** _! is sufficient, but its all i can muster right now (my head is pounding)…

cant wait to see more! 😄

---

<div class="post-metadata">

### Author: ![Xavion](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xavion/32/43501_2.png) [@Xavion](https://discourse.stonehearth.net/u/Xavion)
#### Post date: [January 9, 2014, 5:17am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/17 "2014-01-09T05:17:42Z")

</div>

How’d you enable that? Was it through a separate mod or within the stonehearth mod?

---

<div class="post-metadata">

### Author: ![Inumel](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/inumel/32/43488_2.png) [@Inumel](https://discourse.stonehearth.net/u/Inumel)
#### Post date: [January 9, 2014, 5:24am UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/18 "2014-01-09T05:24:34Z")

</div>

I should start poking around the files… I have some knowledge of Lua thanks to the ComputerCraft mod for Minecraft, although different and somewhat out of date most of the concepts still apply, Either way very lovely mod! If I could thumbs up more than once well… 💥

---

<div class="post-metadata">

### Author: ![shawnkeijsers](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@shawnkeijsers](https://discourse.stonehearth.net/u/shawnkeijsers)
#### Post date: [August 4, 2014, 11:08pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/19 "2014-08-04T23:08:28Z")

</div>

the link for rp loader doesn’t bring you anywhere where you should be able to download it, and also the mod link doesn’t work

---

<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: [August 5, 2014, 8:10pm UTC](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797/20 "2014-08-05T20:10:41Z")

</div>

Both mods haven’t been maintained for ages. They’re not usable anymore.

[Next page](https://discourse.stonehearth.net/t/mod-item-spawner-download-now/4797.md?page=2)
