Skip to content

Commit

Permalink
Jsonify trail's maps (#67470)
Browse files Browse the repository at this point in the history
* Initial JSON stuff

* Initial C++ stuff

* Making a mess of changing types as per usual

* More sensible way

* Fixes trailhead rotation and removes obsoleted regional settings

* Moves test_regions.json into the test mod

* Add width offset accidently 1 too high

* Removes obsoleted region_settings documentation

* Remembered I'm making the width is purposefully larger for easy mod changes

* Adds probably too many items

* All repo mod support?

* Oblige the clang overlords

* Some variants

* Linted

* Update dictionary.txt

* Changes the variants to nests for modding

* Rework forest_trail_intersection for new trail

* A few more variants

* Flag corrections

* Correct the merge

* Implements #67648 and rejigs the palette to make modding easier (hopefully)

* Weight variants

* File reorganisation

* Minor weight change to bump tests

* Changes weights, adds a temp fix for the horse farm
  • Loading branch information
Procyonae authored Dec 9, 2023
1 parent 3438b6a commit 3bc7e4f
Show file tree
Hide file tree
Showing 29 changed files with 1,351 additions and 467 deletions.
24 changes: 24 additions & 0 deletions data/json/furniture_and_terrain/terrain-traps.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,30 @@
},
"bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true }
},
{
"type": "terrain",
"id": "t_den_small",
"name": "small den",
"description": "A small den that burrowing animals such as groundhogs or hares call home.",
"symbol": "0",
"color": "yellow",
"looks_like": "t_den_large",
"move_cost": 3,
"flags": [ "TRANSPARENT", "DIGGABLE" ],
"bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true }
},
{
"type": "terrain",
"id": "t_den_large",
"name": "large den",
"description": "A large den that burrowing animals such as bears and foxes call home.",
"symbol": "0",
"color": "yellow",
"looks_like": "t_pit_shallow",
"move_cost": 6,
"flags": [ "TRANSPARENT", "DIGGABLE" ],
"bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true }
},
{
"type": "terrain",
"id": "t_slime",
Expand Down
58 changes: 0 additions & 58 deletions data/json/mapgen/farm_horse.json
Original file line number Diff line number Diff line change
Expand Up @@ -1411,64 +1411,6 @@
"palettes": [ "farm_lots" ]
}
},
{
"type": "mapgen",
"method": "json",
"om_terrain": "forest_trail_intersection",
"weight": 250,
"object": {
"predecessor_mapgen": "forest",
"rows": [
"........................",
"........................",
".........??????.........",
".......??????????.......",
"......????////????......",
".....???////////???.....",
"....???//////////???....",
"...???////////////???...",
"...??//////////////??...",
"..???//////////////???..",
"..??////////////////??..",
"..??////////////////??..",
"..??////////////////??..",
"..??////////////////??..",
"..???//////////////???..",
"...??//////////////??...",
"...???////////////???...",
"....???//////////???....",
".....???////////???.....",
"......????////????......",
".......??????????.......",
".........??????.........",
"........................",
"........................"
],
"palettes": [ "farm_lots" ],
"terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] },
"place_nested": [
{ "chunks": [ "14x14_forest_trail_intersection_north" ], "x": 5, "y": 0, "neighbors": { "north": "trail" } },
{ "chunks": [ "14x14_forest_trail_intersection_east" ], "x": 10, "y": 5, "neighbors": { "east": "trail" } },
{ "chunks": [ "14x14_forest_trail_intersection_south" ], "x": 5, "y": 10, "neighbors": { "south": "trail" } },
{ "chunks": [ "14x14_forest_trail_intersection_west" ], "x": 0, "y": 5, "neighbors": { "west": "trail" } },
{
"chunks": [ "11x11_forest_trail_intersection_south_fire_lookout" ],
"x": 0,
"y": 13,
"neighbors": { "south": "ws_fire_lookout_tower_base" }
},
{ "chunks": [ [ "null", 25 ], [ "3x3_horseposts", 75 ] ], "x": 7, "y": 7 },
{
"chunks": [ [ "null", 25 ], [ "3x3_firering", 25 ], [ "3x3_trunks", 50 ] ],
"x": [ 11, 12 ],
"y": [ 11, 12 ]
},
{ "chunks": [ [ "null", 50 ], [ "3x3_tree_benches", 50 ] ], "x": 16, "y": 7 },
{ "chunks": [ [ "null", 75 ], [ "3x3_shed_trail_supplies_N", 25 ] ], "x": 16, "y": 16 }
],
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
Expand Down
6 changes: 6 additions & 0 deletions data/json/mapgen/nested/aux_nested.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@
"place_items": [ { "item": "loose_ammo", "x": [ 0, 0 ], "y": [ 0, 0 ], "chance": 50, "repeat": [ 1, 4 ] } ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "1x1_trail_sign",
"object": { "mapgensize": [ 1, 1 ], "place_signs": [ { "snippet": "trailhead", "x": 0, "y": 0 } ] }
},
{
"type": "mapgen",
"method": "json",
Expand Down
114 changes: 1 addition & 113 deletions data/json/mapgen/nested/farm_nested.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "3x3_trunks",
"nested_mapgen_id": "3x3_stumps",
"object": {
"mapgensize": [ 3, 3 ],
"rows": [
Expand Down Expand Up @@ -1018,118 +1018,6 @@
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "14x14_forest_trail_intersection_north",
"object": {
"mapgensize": [ 14, 14 ],
"rotation": [ 0, 3 ],
"rows": [
".??////////??.",
"???////////???",
"??//////////??",
"??//////////??",
"?.///....///.?",
"../......../..",
"..............",
"..............",
"..............",
"..............",
"..............",
"..............",
"..............",
".............."
],
"palettes": [ "farm_lots" ],
"terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] },
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "14x14_forest_trail_intersection_east",
"object": {
"mapgensize": [ 14, 14 ],
"rotation": [ 0, 3 ],
"rows": [
".........????.",
"..........????",
"........////??",
"........./////",
"........./////",
"..........////",
"..........////",
"..........////",
"..........////",
"........./////",
"........./////",
"........////??",
"..........????",
".........????."
],
"palettes": [ "farm_lots" ],
"terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] },
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "14x14_forest_trail_intersection_south",
"object": {
"mapgensize": [ 14, 14 ],
"rotation": [ 0, 3 ],
"rows": [
"..............",
"..............",
"..............",
"..............",
"..............",
"..............",
"..............",
"..............",
"../......../..",
"?.///....///.?",
"??//////////??",
"??//////////??",
"???////////???",
".??////////??."
],
"palettes": [ "farm_lots" ],
"terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] },
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "14x14_forest_trail_intersection_west",
"object": {
"mapgensize": [ 14, 14 ],
"rotation": [ 0, 3 ],
"rows": [
".????.........",
"????..........",
"??////........",
"/////.........",
"/////.........",
"////..........",
"////..........",
"////..........",
"////..........",
"/////.........",
"/////.........",
"??////........",
"????..........",
".????........."
],
"palettes": [ "farm_lots" ],
"terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] },
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ]
}
},
{
"type": "mapgen",
"method": "json",
Expand Down
Loading

0 comments on commit 3bc7e4f

Please sign in to comment.