Skip to content

Commit

Permalink
add json-based map extras for fields
Browse files Browse the repository at this point in the history
linting and fix leftover from testing

fix cp error

switch to update mapgen mode

begin integrating update_mapgen

Update wilderness.json

Update wilderness.json

add shed

Update regional_map_settings.json

adjust frequencies based on playtest

lint

Update wilderness.json
  • Loading branch information
I-am-Erk committed Dec 12, 2019
1 parent 84de815 commit 6d45426
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 21 deletions.
256 changes: 256 additions & 0 deletions data/json/mapgen/map_extras/wilderness.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
[
{
"type": "palette",
"id": "long_grass_meadow_palette",
"terrain": {
" ": "t_null",
".": [ [ "t_region_groundcover", 10 ], "t_grass_long" ],
",": [ [ "t_region_groundcover", 4 ], "t_grass_long" ],
";": [ "t_region_groundcover", [ "t_grass_long", 2 ] ],
"|": [ "t_region_groundcover", [ "t_grass_long", 10 ] ]
},
"furniture": {
".": [ [ "f_null", 200 ], [ "f_region_weed", 7 ], [ "f_boulder_small", 2 ], "f_boulder_medium", "f_boulder_large" ],
",": [ [ "f_null", 200 ], [ "f_region_weed", 8 ], [ "f_boulder_small", 2 ], "f_boulder_medium", "f_boulder_large" ],
";": [ [ "f_null", 200 ], [ "f_region_weed", 9 ], [ "f_boulder_small", 2 ], "f_boulder_medium", "f_boulder_large" ],
"|": [ [ "f_null", 200 ], [ "f_region_weed", 10 ], [ "f_boulder_small", 2 ], "f_boulder_medium", "f_boulder_large" ]
}
},
{
"type": "palette",
"id": "copse_trees_palette",
"terrain": {
" ": "t_null",
".": [ [ "t_region_groundcover", 60 ], "t_region_tree", "t_region_shrub" ],
",": [ [ "t_region_groundcover", 30 ], [ "t_region_groundcover_forest", 8 ], [ "t_region_tree", 2 ], "t_region_shrub" ],
";": [ [ "t_region_groundcover", 10 ], [ "t_region_groundcover_forest", 8 ], [ "t_region_tree", 6 ], "t_region_shrub" ],
"|": [ [ "t_region_groundcover_forest", 7 ], "t_water_sh" ]
},
"furniture": {
".": [ [ "f_null", 200 ], [ "f_region_weed", 7 ] ],
",": [ [ "f_null", 200 ], [ "f_region_weed", 8 ] ],
";": [ [ "f_null", 200 ], [ "f_region_weed", 10 ] ]
}
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_grass_map",
"object": {
"rows": [
" ......... ",
" ............... ",
" .......,,,,,....... ",
" .....,,,,,,,,,,..... ",
" ...,,,,,,,,,,,,,,.... ",
" ....,,,;;;;;;;,,,,.... ",
" ...,,,;;;;;;;;;,,,,... ",
"....,,;;;;||;;;;,,,,....",
"...,,,,;;;;;||;;,,,,,...",
"...,;,;;||;||;;;;,,,,...",
"...,,;;;;;;;;||;;,,,,...",
"...,;,;||;||;;;;;,,,,...",
"...,,,,;;;;;;||;,,,,,...",
"...,;,,;;||;||;;,,,,,...",
"...,,,;;|;;;;||;;,,,,...",
"...,,,,,;;||;;;;,,,,,...",
"....,,;,;;;;;;;,,,,,....",
" ...,,,,,,;;||;;;,,,... ",
" ....,,,,,;;;;;,,,,.... ",
" ....,,,,,,,,,,,,,,.... ",
" .......,,,,,,....... ",
" .................... ",
" ................ ",
" .......... "
],
"palettes": [ "long_grass_meadow_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_grass_map",
"object": { "place_nested": [ { "chunks": [ [ "mx_grass_nested", 100 ] ], "x": [ 0, 17 ], "y": [ 0, 17 ], "repeat": [ 1, 6 ] } ] }
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_grass_nested",
"object": {
"mapgensize": [ 6, 6 ],
"rows": [
" .... ",
".,,,,.",
".,|;,.",
".,;|,.",
".,,,,.",
" .... "
],
"palettes": [ "long_grass_meadow_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_grass_nested",
"object": {
"mapgensize": [ 8, 8 ],
"rows": [
" ...... ",
"..,,,,..",
".,,|;,,.",
".,;||;,.",
".,;|;;,.",
".,,;|,,.",
"..,,,,..",
" ...... "
],
"palettes": [ "long_grass_meadow_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_trees_map",
"object": {
"rows": [
" ......... ",
" ............... ",
" .......,,,,,....... ",
" .....,,,,,,,,,,..... ",
" ...,,,,,,,,,,,,,,.... ",
" ....,,,;;;;;;;,,,,.... ",
" ...,,,;;;;;;;;;,,,,... ",
"....,,;;;;||;;;;,,,,....",
"...,,,,;;;;;||;;,,,,,...",
"...,;,;;||;||;;;;,,,,...",
"...,,;;;;;;;;||;;,,,,...",
"...,;,;||;||;;;;;,,,,...",
"...,,,,;;;;;;||;,,,,,...",
"...,;,,;;||;||;;,,,,,...",
"...,,,;;|;;;;||;;,,,,...",
"...,,,,,;;||;;;;,,,,,...",
"....,,;,;;;;;;;,,,,,....",
" ...,,,,,,;;||;;;,,,... ",
" ....,,,,,;;;;;,,,,.... ",
" ....,,,,,,,,,,,,,,.... ",
" .......,,,,,,....... ",
" .................... ",
" ................ ",
" .......... "
],
"palettes": [ "copse_trees_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_trees_map",
"object": { "place_nested": [ { "chunks": [ [ "mx_trees_nested", 100 ] ], "x": [ 0, 17 ], "y": [ 0, 17 ], "repeat": [ 1, 6 ] } ] }
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_trees_nested",
"object": {
"mapgensize": [ 6, 6 ],
"rows": [
" .... ",
".,,,,.",
".,|;,.",
".,;|,.",
".,,,,.",
" .... "
],
"palettes": [ "copse_trees_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_trees_nested",
"object": {
"mapgensize": [ 8, 8 ],
"rows": [
" ...... ",
"..,,,,..",
".,,|;,,.",
".,;||;,.",
".,;|;;,.",
".,,;|,,.",
"..,,,,..",
" ...... "
],
"palettes": [ "copse_trees_palette" ]
}
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "mx_fallen_shed_map",
"object": {
"place_nested": [
{
"chunks": [ [ "mx_grass_nested", 70 ], [ "mx_trees_nested", 30 ] ],
"x": [ 0, 17 ],
"y": [ 0, 17 ],
"repeat": [ 2, 6 ]
},
{ "chunks": [ [ "mx_fallen_shed_nested", 100 ] ], "x": [ 0, 11 ], "y": [ 0, 11 ] }
]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_fallen_shed_nested",
"object": {
"mapgensize": [ 11, 11 ],
"rows": [
"--++++--||-",
"-_______RR|",
"w_______RRw",
"w________Rw",
"|_________|",
"||-_____|||",
"|_________|",
"w_________w",
"w_________w",
"-_________|",
"--||||||-||"
],
"palettes": [ "desolatebarn_palette" ],
"terrain": { "_": "t_dirt" },
"furniture": { "_": [ [ "f_null", 30 ], "f_rubble", "f_rubble_rock" ] },
"items": {
"_": { "item": "wood_workshop", "chance": 1 },
"R": [ { "item": "wood_workshop", "chance": 3 }, { "item": "mischw", "chance": 2 } ]
}
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "mx_fallen_shed_nested",
"object": {
"mapgensize": [ 8, 8 ],
"rows": [
"--w_-||-",
"-______|",
"|______+",
"|R_____+",
"|RR____|",
"|_RRR__w",
"-__RRR_w",
"--w||-||"
],
"palettes": [ "desolatebarn_palette" ],
"terrain": { "_": "t_dirt" },
"furniture": { "_": [ [ "f_null", 30 ], "f_rubble", "f_rubble_rock" ] },
"items": {
"_": { "item": "wood_workshop", "chance": 1 },
"R": [ { "item": "wood_workshop", "chance": 3 }, { "item": "mischw", "chance": 2 } ]
}
}
}
]
10 changes: 5 additions & 5 deletions data/json/mapgen_palettes/abandoned_barn_p.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"terrain": {
".": [ [ "t_region_groundcover", 50 ], [ "t_region_shrub", 2 ], "t_region_tree" ],
"#": "t_region_shrub",
"&": "t_wall_wood_broken",
"&": [ [ "t_wall_wood_broken", 4 ], "t_wall_wood_chipped" ],
"+": [ [ "t_door_c", 2 ], [ "t_door_o", 2 ], "t_door_boarded", "t_door_boarded_damaged" ],
"-": "t_wall_wood_chipped",
"-": [ [ "t_wall_wood_chipped", 4 ], "t_wall_wood" ],
":": "t_fencegate_c",
"~": [ "t_swater_sh", [ "t_covered_well", 3 ], "t_water_pump" ],
"0": "t_window_empty",
Expand All @@ -21,7 +21,7 @@
"_": "t_dirtfloor",
"=": "t_dirtfloor",
"{": "t_dirtfloor",
"%": "t_wall_wood_broken",
"%": [ [ "t_wall_wood_broken", 4 ], "t_wall_wood_chipped" ],
"!": "t_dirtfloor",
"a": "t_grass",
"b": "t_dirtfloor",
Expand All @@ -33,7 +33,7 @@
"g": "t_generator_broken",
"h": "t_dirtfloor",
"I": "t_dirtfloor",
"L": [ "t_covered_well", "t_water_pump", "t_water_pump" ],
"L": [ "t_covered_well", [ "t_water_pump", 2 ] ],
"m": "t_machinery_old",
"M": "t_milking_machine",
"n": "t_dirtfloor",
Expand All @@ -52,7 +52,7 @@
"Q": "t_bulk_tank",
"w": "t_window_boarded_noglass",
"W": "t_window",
"|": "t_wall_wood",
"|": [ [ "t_wall_wood", 4 ], "t_wall_wood_chipped" ],
"<": "t_ladder_up",
">": "t_ladder_down"
},
Expand Down
21 changes: 21 additions & 0 deletions data/json/overmap/map_extras.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,27 @@
"color": "yellow",
"autonote": true
},
{
"id": "mx_trees",
"type": "map_extra",
"name": "Stand of trees",
"description": "A copse of trees.",
"generator": { "generator_method": "update_mapgen", "generator_id": "mx_trees_map" }
},
{
"id": "mx_grass",
"type": "map_extra",
"name": "Tall grass",
"description": "A meadow of tall grass.",
"generator": { "generator_method": "update_mapgen", "generator_id": "mx_grass_map" }
},
{
"id": "mx_fallen_shed",
"type": "map_extra",
"name": "Derelict shed",
"description": "A collapsed shed.",
"generator": { "generator_method": "update_mapgen", "generator_id": "mx_fallen_shed_map" }
},
{
"id": "mx_clay_deposit",
"type": "map_extra",
Expand Down
36 changes: 20 additions & 16 deletions data/json/regional_map_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"default_groundcover": [ [ "t_region_groundcover", 1 ] ],
"region_terrain_and_furniture": {
"terrain": {
"t_region_groundcover": { "t_grass": 10, "t_grass_long": 2, "t_grass_dead": 2, "t_dirt": 1 },
"t_region_groundcover_urban": { "t_grass": 20, "t_grass_dead": 3, "t_dirt": 1 },
"t_region_groundcover": { "t_grass": 12, "t_grass_dead": 2, "t_dirt": 1 },
"t_region_groundcover_urban": { "t_grass": 20, "t_grass_dead": 3 },
"t_region_groundcover_forest": { "t_grass_long": 5, "t_grass_tall": 1, "t_moss": 1, "t_grass_dead": 3 },
"t_region_groundcover_swamp": { "t_grass_long": 3, "t_grass_tall": 1, "t_moss": 2, "t_dirt": 2 },
"t_region_shrub": {
Expand Down Expand Up @@ -431,21 +431,25 @@
}
},
"field": {
"chance": 90,
"chance": 3,
"extras": {
"mx_helicopter": 8,
"mx_military": 8,
"mx_science": 20,
"mx_collegekids": 25,
"mx_drugdeal": 20,
"mx_supplydrop": 10,
"mx_portal": 3,
"mx_crater": 10,
"mx_portal_in": 3,
"mx_point_dead_vegetation": 50,
"mx_point_burned_ground": 50,
"mx_casings": 50,
"mx_corpses": 30
"mx_helicopter": 6,
"mx_military": 2,
"mx_science": 1,
"mx_collegekids": 3,
"mx_drugdeal": 3,
"mx_supplydrop": 4,
"mx_portal": 1,
"mx_crater": 15,
"mx_portal_in": 1,
"mx_point_dead_vegetation": 100,
"mx_grass": 600,
"mx_trees": 200,
"mx_fallen_shed": 150,
"mx_pond": 120,
"mx_point_burned_ground": 100,
"mx_casings": 20,
"mx_corpses": 3
}
},
"road": {
Expand Down

0 comments on commit 6d45426

Please sign in to comment.