# Elf-Mod

**URL:** <https://discourse.cataclysmdda.org/t/elf-mod/11110>\
**Category:** The Lab\
**Created:** [December 19, 2015, 2:34am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110 "2015-12-19T02:34:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malkeus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/malkeus/32/12037_2.png) [@Malkeus](https://discourse.cataclysmdda.org/u/Malkeus)\
**Post date:** [December 19, 2015, 2:34am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/1 "2015-12-19T02:34:38Z")

</div>

-\>[quote=“Malkeus, post:18, topic:10466”][quote=“Random\_dragon, post:17, topic:10466”]Ah, interesting.

That reminds me, the documentation for the game has an “example mod” that spawns elves over time. I wish I knew how to un-defunct it…[/quote]

Ah, that one was easy 😉 The data.json has an entry for the ‘elf’ monster in it, which is missing the default\_faction data entry. Adding [“default\_faction”:“zombie”,] below “species”:“ZOMBIE”, will let it load without error. I waited a day and the lua code seems to have executed properly as well. Haven’t found an elf yet though.[/quote][quote=“Random\_dragon, post:19, topic:10466”]Ah, how odd. PR the fix then? o3o[/quote][quote=“Malkeus, post:20, topic:10466”]hmm, guess i can do that. I’ll see if I can’t find one of these elves first though[/quote][quote=“Random\_dragon, post:21, topic:10466”]Aye. Because I tried it some time ago and the LUA spat out an error at the point it was supposed to spawn an elf.[/quote]

I can’t seem to find an elf, but I’m not getting any errors either in game or in the debug.log. I’ve let several days pass, and every night at midnight the lua seems to be executing properly, if the message I’m seeing in-game is any indicator. Where did you see the error?

---

<div class="post-metadata">

**Author:** ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)\
**Post date:** [December 19, 2015, 2:43am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/2 "2015-12-19T02:43:57Z")

</div>

Meep. Let me grab the latest build, dump the mod in, and see if I get the error again.

---

<div class="post-metadata">

**Author:** ![Malkeus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/malkeus/32/12037_2.png) [@Malkeus](https://discourse.cataclysmdda.org/u/Malkeus)\
**Post date:** [December 19, 2015, 2:56am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/3 "2015-12-19T02:56:13Z")

</div>

I spawned one in via debug menu. He found me by smell and beat me to death. Good times 😉

---

<div class="post-metadata">

**Author:** ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)\
**Post date:** [December 19, 2015, 3:02am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/4 "2015-12-19T03:02:50Z")

</div>

Though if they aren’t spawn on their own, that bodes unwell.

---

<div class="post-metadata">

**Author:** ![Malkeus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/malkeus/32/12037_2.png) [@Malkeus](https://discourse.cataclysmdda.org/u/Malkeus)\
**Post date:** [December 19, 2015, 3:07am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/5 "2015-12-19T03:07:32Z")

</div>

The lua says it spawns a group in the top left corner of the current overmap, what are the dimensions of an overmap?

---

<div class="post-metadata">

**Author:** ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)\
**Post date:** [December 19, 2015, 3:46am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/6 "2015-12-19T03:46:07Z")

</div>

I’m unsure if that means a single map tile (24x24) or the WHOLE map, in which case good fucking luck.

---

<div class="post-metadata">

**Author:** ![Malkeus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/malkeus/32/12037_2.png) [@Malkeus](https://discourse.cataclysmdda.org/u/Malkeus)\
**Post date:** [December 19, 2015, 3:56am UTC](https://discourse.cataclysmdda.org/t/elf-mod/11110/7 "2015-12-19T03:56:47Z")

</div>

Well, it’s definitely not the 24x24 single map tile. I traveled northwest for 2 days, I covered about 5 times the size of the default overmap view distance, with debug\_vision going, and I didn’t see any elves. Each night at midnight I got the message about elves spawning and no errors. I’m going to start a new character (my bio-infiltrator is getting boring, he’s to strong) with elf-mod. We’ll see what happens.

If it’s some unimaginable distance away…by the time I get there, there will be a lot of elves around ;). In which case, the mod probably needs a bit of refining. Go figure haha.

Edit: Well, it definitely interferes with the stats thru skills mod. Probably triggers on the same event…I’ll take a look. Yeah, they both trigger on on\_day\_passed. I don’t know lua in the slightest. I’m turning it off, maybe someone with knowledge can work it out.
