# Trying to add a new building into game and met an error

**URL:** <https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526>\
**Category:** The Lab\
**Created:** [September 14, 2015, 5:38pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526 "2015-09-14T17:38:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 14, 2015, 5:38pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/1 "2015-09-14T17:38:07Z")

</div>

Greetings! I have a problem: when I try to add a new building into game, it shows me debug message:

> Error: Tried to generate map for omtype intcafe\_east, "cyber cafe" (id\_mapgen intcafe)

The building itself does not spawn in its place, there is only a empty floor instead.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 14, 2015, 5:48pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/2 "2015-09-14T17:48:19Z")

</div>

What does your json look like?

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 14, 2015, 5:55pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/3 "2015-09-14T17:55:07Z")

</div>

This json itself:

[spoiler][  
{  
“type”: “mapgen”,  
“om\_terrain”: [  
“intcafe”  
],  
“method”: “json”,  
“weight”: 500,  
“object”: {  
“rows”: [  
"~~",  
"~~",  
"_|-000000–|:|-000000-|_",  
"_|y…r…#.ydddd|_",  
“_0%…%…%…%h…hd0_”,  
“_0dh.dh.dh…#…d0_”,  
“_0…%h…0_”,  
“_0%…%…%…######.0_”,  
“_0dh.dh.dh…0_”,  
"_|…y|_",  
"_|%…%…%…|±|±|_",  
“_0dh.dh.dh…|.D|.D|_”,  
“_0…|.s|.s|_”,  
“_0…|±|±|_”,  
"_|y…y|.t|.t|_",  
"_|------±------------|_",  
"_|[[FD…]|%%%%%%%|$.r|_",  
"_|h…]|…|Z.r|_",  
“_0…]|-±----|Z.r|_”,  
“_0d%d…+…i…r|_”,  
"_|dh…y|y???[y|…r|_",  
"_|—00------00-------|_",  
"\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*",  
"\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_"  
],  
“terrain”: {  
".": “t\_floor”,  
"_": “t\_grass”,  
"~": “t\_sidewalk”,  
"-": “t\_wall”,  
"|": “t\_wall”,  
"+": “t\_door\_c”,  
";": “t\_door\_locked”,  
“i”: “t\_door\_locked\_interior”,  
":": “t\_door\_glass\_c”,  
“O”: “t\_window”,  
“9”: “t\_window\_domestic”,  
“0”: “t\_window\_alarm”,  
“W”: “t\_chainfence\_h”,  
“w”: “t\_chainfence\_v”,  
"^": “t\_chaingate\_c”,  
"=": “t\_wall\_glass”,  
"#": “t\_floor”,  
“h”: “t\_floor”,  
"[": “t\_floor”,  
“Z”: “t\_floor”,  
"$": “t\_floor”,  
“d”: “t\_floor”,  
"]": “t\_floor”,  
“s”: “t\_floor”,  
“t”: “t\_floor”,  
“B”: “t\_floor”,  
“y”: “t\_floor”,  
“F”: “t\_floor”,  
“D”: “t\_floor”,  
"?": “t\_floor”,  
“r”: “t\_floor”,  
"%": “t\_console\_broken”  
},  
“furniture”: {  
"#": “f\_counter”,  
“h”: “f\_chair”,  
"[": “f\_table”,  
“Z”: “f\_locker”,  
"$": “f\_safe\_l”,  
“d”: “f\_desk”,  
"]": “f\_bookcase”,  
“s”: “f\_sink”,  
“B”: “f\_bed”,  
“y”: “f\_indoor\_plant\_y”,  
“F”: “f\_fridge”,  
“D”: “f\_trashcan”,  
"?": “f\_sofa”,  
“r”: “f\_rack”  
},  
“toilets”: {  
“t”: “f\_toilet”  
},  
“place\_items”: [  
{ “item”: “waitingroom”, “chance”: 60, “x”: 11, “y”: 3 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: 16, “y”: 20 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: [16,17], “y”: 6, “repeat”: [1,2] },  
{ “item”: “doctorsoffice”, “chance”: 60, “x”: 19, “y”: [9,10], “repeat”: [1,2] },  
{ “item”: “doctorsoffice”, “chance”: 60, “x”: 19, “y”: [13,14], “repeat”: [1,2] },  
{ “item”: “cleaning”, “chance”: 60, “x”: 19, “y”: 17 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5,8], “y”: 5, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: [2,5,8], “y”: 8, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: [2,5,8], “y”: 11, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 20, “x”: [18,19,20,21], “y”: 3, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 20, “x”: 21, “y”: [4,5], “repeat”: [1,2] }

```
       ]
        "comment": "end of mapgen json definition ---v"
    },
    "comment": "end of mapgen entry ---v"
}

```

]

[/spoiler]

This from regional\_map\_settings.json:

“shops”: { “//”: “weighted list of oterrains for commercial zoning”,  
“s\_gas”: 5,  
“s\_pharm”: 3,  
“s\_grocery”: 15,  
“s\_hardware”: 5,  
“s\_sports”: 5,  
“dojo”: 2,  
“gym”: 1,  
“gym\_fitness”: 2,  
“s\_liquor”: 5,  
“s\_gun”: 5,  
“s\_clothes”: 5,  
“s\_library”: 2,  
“s\_bookstore”: 2,  
“s\_restaurant”: 4,  
“sub\_station”: 5,  
“bank”: 3,  
“s\_pizza\_parlor”: 4,  
“bar”: 4,  
“s\_electronics”: 5,  
“pawn”: 3,  
“mil\_surplus”: 2,  
“s\_garage”: 5,  
“station\_radio”: 4,  
“office\_doctor”: 2,  
“s\_restaurant\_fast”: 4,  
“s\_restaurant\_coffee”: 3,  
“bowling\_alley”: 2,  
“church”: 2,  
“office\_cubical”: 2,  
“furniture”: 2,  
“abstorefront”: 2,  
“police”: 1,  
“fire\_station”: 2,  
“home\_improvement”: 2,  
“s\_lot”: 4,  
“s\_arcade”: 2,  
“s\_jewelry”:2,  
“s\_antique”: 2,  
“s\_gardening”: 2,  
“museum”: 1,  
“s\_music”: 2,  
“s\_laundromat”: 1,  
“intcafe”: 3  
}

This from overmap\_terrain.json

```
       {
	"type" : "overmap_terrain",
	"id" : "intcafe",
	"name" : "cyber cafe",
	"rotate" : true,
	"sym" : [94, 62, 118, 60],
	"color" : "light_gray",
	"see_cost" : 5,
	"extras" : "build",
	"mondensity" : 2,
	"sidewalk" : true
}

```

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 14, 2015, 7:06pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/4 "2015-09-14T19:06:34Z")

</div>

I’m not seeing anything immediately that jumps out at me as wrong, except for:  
[tt]  
“toilets”: {  
“t”: “f\_toilet”  
},  
[/tt]

All you really need there is “t”: {}. The “toilets” field is just an easy way to place a set amount of water at the location specified. You still need to bind “t” to “f\_toilet” in the furniture bindings.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [September 14, 2015, 7:08pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/5 "2015-09-14T19:08:07Z")

</div>

This error happens when mapgen can’t find the json for the building itself.

That is, it places it on the overmap and rotates it correctly, but then fails at the generation itself. This suggests that the game can’t load the json file with the definition itself (the first file).

If the definition itself was wrong, you should get a different message first, at game load, before any mapgen takes place.

Looks like the game doesn’t see the file (and it reads all .json files in all subdirectories in data/json). Make sure it has the correct extension, is saved etc.

If that doesn’t work, try temporarily replacing it with some other definition (copy+paste it, just change the “om\_terrain” to [“intcafe”]). If that still prints the error, I’m out of ideas. If it does generate the structure, it must mean that it silently discards your definition, which would be a bug (even if it has reasons to discard it, it should print a message).

And on a minor note: don’t use tabs. Use 4 spaces.

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 14, 2015, 7:20pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/6 "2015-09-14T19:20:10Z")

</div>

Moved .json into other directory, cleaned up the code. All works properly, thank very much, all of you!

UPD: How should I properly mark the coordinates for item groups and items spawning?

---

<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:** [September 14, 2015, 7:37pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/7 "2015-09-14T19:37:26Z")

</div>

[quote=“Osobist, post:6, topic:10526”]Moved .json into other directory, cleaned up the code. All works properly, thank very much, all of you!

UPD: How should I properly mark the coordinates for item groups and items spawning?[/quote]

Format of a mapgen map is a 24x24 tile square, numbered 0-23, with X being horizontal and Y being vertical. If you need an example, guess I could snag a mapgen file to demonstrate with. XP

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 15, 2015, 3:50am UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/8 "2015-09-15T03:50:46Z")

</div>

Here is my example. What is the “repeat” operator?

“place\_items”: [  
{ “item”: “waitingroom”, “chance”: 60, “x”: 11, “y”: 3 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: 16, “y”: 20 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: [16,17], “y”: 6, “repeat”: [1,2] },  
{ “item”: “cleaning”, “chance”: 60, “x”: 19, “y”: 17 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 5, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 8, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 11, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: [5,8], “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: 11 },  
{ “item”: “office”, “chance”: 20, “x”: [18,19], “y”: 3, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 20, “x”: [20,21], “y”: 3, “repeat”: [1,2] },  
{ “item”: “office”, “chance”: 20, “x”: 21, “y”: [4,5], “repeat”: [1,2] }  
]

---

<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:** [September 15, 2015, 4:19am UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/9 "2015-09-15T04:19:20Z")

</div>

Fropm what I’ve seen, repeat isn’t mandatory, and seems to basically make it randomly re-roll that item placement a certain number of times, adding more chances or spawning stuff in that area.

At least I’m fairly certain that’s the way it works.

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 15, 2015, 4:53pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/10 "2015-09-15T16:53:55Z")

</div>

Something like “repeat”:[1, 2] means attempt that placement 1 to 2 times. These examples you cited are actually all incorrect, because the repeat field doesn’t really matter for item groups. Item groups do their own repetition when they roll for what items spawn. Repeat is usually used for things like single items, or to place random terrains. So if you tried to place a terrain with something like {“terrain”:“t\_grass”, “x”:[1, 10], “y”:[1, 5], “repeat”:[3,9]} (note, not correct json) it would pick between 3 and 9 tiles in the range (1, 1) to (10, 5) and set them to t\_grass.

---

<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:** [September 15, 2015, 4:58pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/11 "2015-09-15T16:58:46Z")

</div>

Oh derp.

See, this is why I just copy-paste the item/itemgroup placement. Messier, but less finicky. ;A;

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 15, 2015, 5:45pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/12 "2015-09-15T17:45:17Z")

</div>

Oh, that’s interesting. And another problem: sometimes items not spawn in specified places (like in x: 5, y: 7), but spawn nearby. What should I do to avoid this?

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 15, 2015, 5:49pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/13 "2015-09-15T17:49:53Z")

</div>

Nearby like where? Keep in mind that those coordinates are indexed from 0 to 23, not 1 to 24.

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 15, 2015, 5:58pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/14 "2015-09-15T17:58:42Z")

</div>

On next tile. For example: I’ve added a trashcan in x8y8, but items spawn in x7x8.

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 15, 2015, 6:01pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/15 "2015-09-15T18:01:00Z")

</div>

You’re gonna have to show an example of the code that’s broken and possibly a screenshot of what it looks like in game as well.

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 15, 2015, 6:18pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/16 "2015-09-15T18:18:37Z")

</div>

Code:

{  
“type”: “mapgen”,  
“om\_terrain”: [  
“intcafe”  
],  
“method”: “json”,  
“weight”: 500,  
“object”: {  
[pre] “rows”: [  
“~~",  
"~~”,  
“_|-000000–|:|-000000-|_”,  
“_|y…r…#.ydddd|_”,  
“_0%…%…%…%h…hd0_”,  
“_0dh.dh.dh…#…d0_”,  
“_0…%h…0_”,  
“_0%…%…%…######.0_”,  
“_0dh.dh.dh…0_”,  
“_|…y|_”,  
“_|%…%…%…|±|±|_”,  
“_0dh.dh.dh…|.D|.D|_”,  
“_0…!|.s|.s|_”,  
“_0…|±|±|_”,  
“_|y…!!..y|.t|.t|_”,  
“_|------±------------|_”,  
“\*|[[FD…]|PPPPPP%|.r|\*", "\*|h......]|.......|Z.r|\*", "\*0.......]|-+-----|Z.r|\*", "\*0d%d.....+.......i..r|\*", "\*|dh.....y|y????[y|..r|\*", "\*|---00------00-------|\*", "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*", "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"], "terrain": { ".": "t\_floor", "\*": "t\_grass", "~": "t\_sidewalk", "-": "t\_wall", "|": "t\_wall", "+": "t\_door\_c", ";": "t\_door\_locked", "i": "t\_door\_locked\_interior", ":": "t\_door\_glass\_c", "O": "t\_window", "9": "t\_window\_domestic", "0": "t\_window\_alarm", "W": "t\_chainfence\_h", "w": "t\_chainfence\_v", "^": "t\_chaingate\_c", "=": "t\_wall\_glass", "8": "t\_floor", "h": "t\_floor", "[": "t\_floor", "Z": "t\_floor", "”: “t\_floor”,  
“d”: “t\_floor”,  
“]”: “t\_floor”,  
“s”: “t\_floor”,  
“t”: “t\_floor”,  
“B”: “t\_floor”,  
“y”: “t\_floor”,  
“F”: “t\_floor”,  
“D”: “t\_floor”,  
“?”: “t\_floor”,  
“r”: “t\_floor”,  
“!”: “t\_floor”,  
“#”: “t\_floor”,  
“%”: “t\_console\_broken”,  
“P”: “t\_sai\_box”  
},  
“furniture”: {  
“#”: “f\_counter”,  
“h”: “f\_chair”,  
“[”: “f\_table”,  
“Z”: “f\_locker”,  
“$”: “f\_safe\_l”,  
“d”: “f\_desk”,  
“]”: “f\_bookcase”,  
“s”: “f\_sink”,  
“B”: “f\_bed”,  
“y”: “f\_indoor\_plant”,  
“F”: “f\_fridge”,  
“D”: “f\_trashcan”,  
“?”: “f\_sofa”,  
“r”: “f\_rack”,  
“t”: “f\_toilet”,  
“!”: “f\_vending\_c”  
},  
“toilets”: {  
“t”: {}  
},  
“place\_vendingmachines”: [  
{ “x”: 15, “y”: 12 },  
{ “x”: 11, “y”: 14 },  
{ “x”: 12, “y”: 14 }  
],  
“add”: [  
{ “item”: “microwave”, “x”: 3, “y”: 15, “chance”: 90 },  
{ “item”: “pda”, “x”: 15, “y”: 3, “chance”: 60 }  
],  
“place\_items”: [  
{ “item”: “waitingroom”, “chance”: 60, “x”: 11, “y”: 3 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: 16, “y”: 20 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: [16,17], “y”: 7 },  
{ “item”: “waitingroom”, “chance”: 60, “x”: [18,19], “y”: 7 },  
{ “item”: “trash\_intcafe”, “chance”: 50, “x”: [17,20], “y”: 12 },  
{ “item”: “trash\_intcafe”, “chance”: 30, “x”: 5, “y”: 17 },  
{ “item”: “cleaning”, “chance”: 60, “x”: 19, “y”: 17 },  
{ “item”: “fast\_food”, “chance”: 30, “x”: 4, “y”: 15 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 5 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 8 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 11 },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: [5,8] },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: 11 },  
{ “item”: “office”, “chance”: 20, “x”: [18,19], “y”: 3 },  
{ “item”: “office”, “chance”: 20, “x”: [20,21], “y”: 3 },  
{ “item”: “office”, “chance”: 20, “x”: 21, “y”: [4,5] },  
{ “item”: “office”, “chance”: 20, “x”: 2, “y”: [19,20] },  
{ “item”: “office”, “chance”: 20, “x”: 2, “y”: [19,20] },  
{ “item”: “electronics\_intcafe”, “chance”: 40, “x”: 21, “y”: [15,16] },  
{ “item”: “electronics\_intcafe”, “chance”: 40, “x”: 21, “y”: [17,18] },  
{ “item”: “electronics\_intcafe”, “chance”: 40, “x”: 21, “y”: 19 },  
{ “item”: “books\_intcafe”, “chance”: 40, “x”: 9, “y”: [15,16] },  
{ “item”: “books\_intcafe”, “chance”: 40, “x”: 9, “y”: 17 },  
{ “item”: “intcafe\_safe”, “chance”: 70, “x”: [19,19], “y”: [16,16]}

```
       ],
        "comment": "end of mapgen json definition ---v"
    },
    "comment": "end of mapgen entry ---v"
}

```

]  
[/pre]

Screenshot:

 ![](http://cs625819.vk.me/v625819369/416ba/fzlOsOoK9HA.jpg)

Check the pile of glasses on the floor. They should lay on table.

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [September 15, 2015, 6:30pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/17 "2015-09-15T18:30:20Z")

</div>

[tt]  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 5 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 8 },  
{ “item”: “office”, “chance”: 50, “x”: [2,5], “y”: 11 },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: [5,8] },  
{ “item”: “office”, “chance”: 50, “x”: 8, “y”: 11 },  
[/tt]

You have desks at (2,5), (5,5), (8,5), (2,8), (5,8), (8,8), (2,11), (5,11), and (8,11). You need to specify each of these individually, as in { “x”:5, “y”:2 }, not using the array notation, as in { “x”:[5,8], “y”:2 }. The array notation tries to place that group between the values 5 and 8, so instead of a single point group at the location, you end up with a line going from (5, 2) to (8, 2).

Edit: mixed up x and y coordinates.

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [September 15, 2015, 6:35pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/18 "2015-09-15T18:35:29Z")

</div>

Understood, thanks for the help! I’ll fix it tomorrow.

---

<div class="post-metadata">

**Author:** ![Osobist](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Osobist](https://discourse.cataclysmdda.org/u/Osobist)\
**Post date:** [October 13, 2015, 11:29am UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/19 "2015-10-13T11:29:37Z")

</div>

Hello. Don’t want to produce multiple threads, so I’ll ask here: is there any mean to add new iuse function only in mode, without touching the main game data?

---

<div class="post-metadata">

**Author:** ![Litppunk](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/litppunk/32/409_2.png) [@Litppunk](https://discourse.cataclysmdda.org/u/Litppunk)\
**Post date:** [October 13, 2015, 12:48pm UTC](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526/20 "2015-10-13T12:48:13Z")

</div>

hmmm this seams like the wrong thread for that kind of question…

[Next page](https://discourse.cataclysmdda.org/t/trying-to-add-a-new-building-into-game-and-met-an-error/10526.md?page=2)
