Revised the military bunkers

I gave the mil bunkers some love. Let me know what you think. Is there too much loot? Are the changes acceptable?

FYI: These changes were done on version 0.C-6380

  • added shelves (loot should appear only on them, and not on the floor)
  • added other containers
  • now you can’t see all of the loot through the window but you might see the containers
  • reworked the loot
  • organized the loot, i.e. each room has a category, a theme (mil people should be organized after all)
  • added item group called ‘military vehicle parts’ (actually: mil_vehicle_parts), which is one of the room loot themes. Here you’ll find a few random loose spare parts.
  • contains a secret / easter egg (NOTE: don’t look at the bunker.json too closely if you don’t want to know what it is)

Two files were changed:
\data\json\mapgen\bunker.json
\data\json\item_groups.json

So if you want to test these changed versions, you’ll have to replace the text inside the bunker.json with the stuff below. I suggest using notepad++. Make back-ups of the originals.

bunker.json

[
  {
    "type": "mapgen",
    "method": "json",
    "om_terrain": [ "bunker" ],
    "object": {
      "rows": [
        "                        ",
        " -----------------------",
        " |                     |",
        " |                     |",
        " |                     |",
        " |                     |",
        " |                     |",
        " |     MMMMMMMMMM      |",
        " |     MMMMMMMMMM      |",
        " |     MMMM>>MMMM      |",
        " |     MM,,,,,,MM      |",
        " |     MMMM,,MMMM      |",
        " |     MM,,,,,,MM      |",
        " //*/  MMMM,,MMMM   /*//",
        " I#,/  MM,,,,,,MM   /,#I",
        " I00/  MMMMDDMMMM   /00I",
        " |     MMMM  6MMM      |",
        " +                     +",
        " +                     +",
        " +                     +",
        " +                     +",
        " +                     +",
        " +-------++++++--------+",
        "                        "
      ],
      "terrain": {
        " ": [ "t_grass", "t_grass", "t_grass", "t_dirt" ],
        "#": "t_floor",
        "*": "t_door_c",
        "+": "t_chaingate_l",
        ",": "t_floor",
        "-": "t_chainfence_h",
        "/": "t_concrete_wall",
        "0": "t_window",
        "6": "t_card_military",
        ">": "t_stairs_down",
        "D": "t_door_metal_locked",
        "I": "t_reinforced_glass",
        "M": "t_wall_metal",
        "|": "t_chainfence_v"
      },
      "furniture": {
        "#": "f_table"
      },
      "place_monster": [
        { "monster": "mon_turret_rifle", "x": 9, "y": 10 },
        { "monster": "mon_turret_rifle", "x": 14, "y": 10 },
        { "monster": "mon_turret_rifle", "x": 9, "y": 12 },
        { "monster": "mon_turret_rifle", "x": 14, "y": 12 },
        { "monster": "mon_turret_rifle", "x": 9, "y": 14 },
        { "monster": "mon_turret_rifle", "x": 14, "y": 14 }
      ]
    }
  },
  {
    "type": "mapgen",
    "method": "json",
    "om_terrain": [ "bunker_basement" ],
    "object": {
      "//": "TODO: When it was hardcoded, each room had at most one of the bots, grenades, etc. groups in it, but the way it is now, it's possible for a room to have items from both the bots and grenades group in it.",
      "rows": [
        "########################",
        "#MMMMMMMMMMMMMMMMMMMMMM#",
        "#Mccccccc6    6lllllllM#",
        "#M       +    +      lM#",
        "#Mcccccc |    |      lM#",  
        "#Mcccccc |    M      lM#",
        "#M       |    M6+|||||M#",
        "#McccccccM    M       M#",
        "#MMMMMMMMM    M ggggg M#",
        "#Mccccccc6    MMMMMMMMM#",
        "#M       +    M       M#",
        "#Mcccccc |    MCCCCCCCM#",
        "#Mcccccc |    MMMMMMMMM#",
        "#M       |            M#",
        "#McccccccM            M#",
        "#MMMMMMMMM    MMMMMMMMM#",
        "#Mccccccc6    6cccccccM#",
        "#M       +    +       M#",
        "#Mcccccc |    | ccccccM#",
        "#Mcccccc |    | ccccccM#",
        "#M       |    |       M#",
        "#McccccccM << McccccccM#",
        "#MMMMMMMMMMMMMMMMMMMMMM#",
        "########################"
      ],
      "terrain": {
        " ": "t_floor",
		"c": "t_floor",
		"C": "t_floor",
		"g": "t_floor",
		"l": "t_floor",
        "#": "t_rock",
        "+": "t_door_metal_locked",
        "6": "t_card_military",
        "<": "t_stairs_up",
        "M": "t_wall_metal",
        "|": "t_reinforced_glass"
      },
	  "furniture": {
        "c": "f_rack",
		"l": "f_locker",
		"C": "f_crate_c",
		"g": "f_gun_safe_el"
      },
      "place_items": [
        { "item": "bunker_basement_food", "x": [ 2, 8 ], "y": [ 2, 2 ], "chance": 80 },
        { "item": "bunker_basement_food", "x": [ 2, 7 ], "y": [ 4, 5 ], "chance": 80 },
        { "item": "bunker_basement_food", "x": [ 2, 8 ], "y": [ 7, 7 ], "chance": 80 },
        { "item": "bunker_basement_apparel", "x": [ 2, 8 ], "y": [ 9, 9 ], "chance": 80 },
        { "item": "bunker_basement_apparel", "x": [ 2, 7 ], "y": [ 11, 12 ], "chance": 80 },
        { "item": "bunker_basement_apparel", "x": [ 2, 8 ], "y": [ 14, 14 ], "chance": 80 },
		{ "item": "bunker_basement_loot", "x": [ 2, 8 ], "y": [ 16, 16 ], "chance": 80 },
		{ "item": "bunker_basement_loot", "x": [ 2, 7 ], "y": [ 18, 19 ], "chance": 80 },
		{ "item": "bunker_basement_loot", "x": [ 2, 8 ], "y": [ 21, 21 ], "chance": 80 },
		{ "item": "bunker_basement_guns", "x": [ 15, 20 ], "y": [ 2, 2 ], "chance": 90 },
		{ "item": "bunker_basement_guns", "x": [ 21, 21 ], "y": [ 2, 5 ], "chance": 90 },
		{ "item": "bunker_basement_bionics", "x": [ 16, 20 ], "y": [ 8, 8 ], "chance": 80 },
		{ "item": "bunker_basement_loot_2", "x": [ 15, 21 ], "y": [ 11, 11 ], "chance": 90 },
		{ "item": "mil_vehicle_parts", "x": [ 15, 21 ], "y": [ 16, 16 ], "chance": 80 },
		{ "item": "mil_vehicle_parts", "x": [ 16, 21 ], "y": [ 18, 19 ], "chance": 80 },
		{ "item": "mil_vehicle_parts", "x": [ 15, 21 ], "y": [ 21, 21 ], "chance": 80 }
      ]
    }
  },
  {
    "id": "bunker_basement_loot",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "bots", "prob": 1 },
      { "group": "guns_launcher_milspec", "prob": 1 },
      { "group": "guns_rifle_milspec", "prob": 2 },
      { "group": "mags_milspec", "prob": 1 },
      { "group": "ammo_milspec", "prob": 3 },
      { "group": "grenades", "prob": 1 },
      { "group": "mil_hw", "prob": 1 }
    ]
  },
  {
    "id": "bunker_basement_loot_2",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "bots", "prob": 1 },
      { "group": "guns_launcher_milspec", "prob": 1 },
      { "group": "guns_rifle_milspec", "prob": 1 },
      { "group": "mags_milspec", "prob": 1 },
      { "group": "ammo_milspec", "prob": 1 },
	  { "group": "ammo_parts", "prob": 4 },
	  { "group": "gunmod_common", "prob": 1 },
	  { "group": "gunmod_rare", "prob": 1 },
      { "group": "grenades", "prob": 2 },
      { "group": "mil_hw", "prob": 1 }
    ]
  },
  {
    "id": "bunker_basement_apparel",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "mil_armor", "prob": 1 }
    ]
  },
  {
    "id": "bunker_basement_food",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "mil_food", "prob": 3 }
	]
  },
  {  
    "id": "bunker_basement_guns",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "bots", "prob": 1 },
      { "group": "guns_launcher_milspec", "prob": 1 },
      { "group": "guns_rifle_milspec", "prob": 2 },
      { "group": "mags_milspec", "prob": 1 },
      { "group": "ammo_milspec", "prob": 3 },
      { "group": "grenades", "prob": 1 },
      { "group": "mil_hw", "prob": 1 }
    ]
  },
  {  
    "id": "bunker_basement_bionics",
    "type": "item_group",
    "subtype": "distribution",
    "ammo": 100,
    "entries": [
      { "group": "bionics_mil", "prob": 2 }
    ]
  },
  {
	"id": "mil_vehicle_parts",
	"type": "item_group",
	"subtype": "distribution",
    "ammo": 100,
    "entries": [
	  { "group": "mil_vehicle_parts", "prob": 2 }
    ]
  }
]

And for the item_groups.json, you’ll have to ADD this entry to somewhere in the file (end of the file works fine). Make sure to add the proper brackets [] and curly brackets {}. The file content itself was way too big to just copy here.

    "type" 	: "item_group",
    "id" 	: "mil_vehicle_parts",
    "items" : [
      ["mil_plate", 			20],
      ["hard_plate", 			20],
      ["wheel_armor", 			20],
	  ["reinforced_glass_sheet", 20],
	  ["headlight_reinforced", 	20],
	  ["recharge_station", 		10],
	  ["cargo_rack", 			10]

(Feel free to turn this into a pull request.)

Just a quick reminder: This is the first I messed with .json files this heavily. Looks like the indentations were sloppy (although they line up just fine in notepad++ ). It shouldn’t matter anyway. I tested these changes myself in the game (teleported my way arould quickly to 10+ bunkers in total) and you shouldn’t get any debugger warnings or whatever. (I managed to work them out)

Oh, and you’ll have to start a new game of course. Or reset the world? I’m not 100% if that works, but a new world is PROBABLY needed regardless. It’s possible an undiscovered bunker is spawned with the new revised bunker contents, but I wouldn’t know for sure. This is new territory to me.

if someone vist bunker for first time in his old world he will see your new bunker