summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-05-16 12:03:49 +0200
committertroido <troido@protonmail.com>2020-05-16 12:03:49 +0200
commitdc25e66031fc0a1fbdb15579ad346bcb3903b3bb (patch)
tree5d1bb73ce84afec2683367e29a73968603fe1898 /content
parent9c4e59b670d22fbfa23def1d66a10ea3af4c214d (diff)
encyclopedia can be split over different files
Diffstat (limited to 'content')
-rw-r--r--content/encyclopediae/base.json91
-rw-r--r--content/encyclopediae/crops.json164
-rw-r--r--content/encyclopediae/default_encyclopedia.json319
-rw-r--r--content/encyclopediae/npcs.json78
-rw-r--r--content/world.json2
5 files changed, 334 insertions, 320 deletions
diff --git a/content/encyclopediae/base.json b/content/encyclopediae/base.json
new file mode 100644
index 0000000..e6806b5
--- /dev/null
+++ b/content/encyclopediae/base.json
@@ -0,0 +1,91 @@
+{
+ "assemblages": {
+ "wall": {
+ "sprite": "wall",
+ "height": 2,
+ "flags": ["Blocking"]
+ },
+ "rock": {
+ "sprite": "rock",
+ "height": 10,
+ "flags": ["Blocking"]
+ },
+ "tree": {
+ "sprite": "tree",
+ "height": 3,
+ "flags": ["Blocking"]
+ },
+ "fence": {
+ "sprite": "fence",
+ "height": 1,
+ "flags": ["Blocking"]
+ },
+ "grass": {
+ "components": [
+ ["Visible", {
+ "sprite": ["random", [
+ "grass1",
+ "grass2",
+ "grass3",
+ "grass1",
+ "grass2",
+ "grass3",
+ "ground"
+ ]],
+ "height": 0.1,
+ "name": "grass"
+ }]
+ ],
+ "flags": ["Floor", "Soil"]
+ },
+ "greengrass": {
+ "components": [
+ ["Visible", {
+ "sprite": ["random", [
+ "grass1",
+ "grass2",
+ "grass3"
+ ]],
+ "height": 0.1,
+ "name": "grass"
+ }]
+ ],
+ "flags": ["Floor", "Soil"]
+ },
+ "ground": {
+ "sprite": "ground",
+ "height": 0.1,
+ "flags": ["Floor", "Soil"]
+ },
+ "floor": {
+ "sprite": "floor",
+ "height": 0.1,
+ "flags": ["Floor"]
+ },
+ "bridge": {
+ "sprite": "bridge",
+ "height": 0.1,
+ "flags": ["Floor"]
+ },
+ "water": {
+ "sprite": "water",
+ "height": 0.0
+ },
+ "house": {"height": 3.0, "sprite": "house"},
+ "freeland": {},
+ "img": {
+ "arguments": [["sprite", "string", ""], ["height", "float", 1.0]],
+ "components": [
+ ["Visible", {"name": ["arg", "sprite"], "sprite": ["arg", "sprite"], "height": ["arg", "height"]}]
+ ]
+ },
+ "letter": {
+ "arguments": [["char", "string"]],
+ "components": [["Visible", {
+ "name": ["concat", ["letter_", ["arg", "char"]]],
+ "sprite": ["concat", ["emptyletter-", ["arg", "char"]]],
+ "height": 1.0
+ }]]
+ }
+ }
+}
diff --git a/content/encyclopediae/crops.json b/content/encyclopediae/crops.json
new file mode 100644
index 0000000..2d2b5ce
--- /dev/null
+++ b/content/encyclopediae/crops.json
@@ -0,0 +1,164 @@
+{
+ "assemblages": {
+ "radishplant": {
+ "sprite": "smallplant",
+ "name": "radishplant",
+ "height": 0.5,
+ "components": [
+ ["Interactable", {"action": ["interaction", ["trigger", "die"]]}],
+ ["Loot", {"loot": ["list", [
+ ["list", [{"type": "radishseed"}, 0.92]],
+ ["list", [{"type": "radishseed"}, 0.20]],
+ ["list", [{"type": "radish"}, 0.8]],
+ ["list", [{"type": "radish"}, 0.4]]
+ ]]}]
+ ],
+ "flags": ["Occupied"]
+ },
+ "plantedradishseed": {
+ "arguments": [["target_time", "int", -1]],
+ "sprite": "seed",
+ "height": 0.05,
+ "name": "seed",
+ "components": [
+ ["Timer", {
+ "delay": 600,
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["template", "radishseedling"]}]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "radishseedling": {
+ "arguments": [["target_time", "int", -1]],
+ "sprite": "seedling",
+ "height": 0.05,
+ "name": "seedling",
+ "components": [
+ ["Timer", {
+ "delay": 600,
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["template", "youngradishplant"]}]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "youngradishplant": {
+ "arguments": [["target_time", "int", -1]],
+ "sprite": "youngplant",
+ "height": 0.8,
+ "name": "youngradishplant",
+ "components": [
+ ["Timer", {
+ "delay": 600,
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["template", "radishplant"]}]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "plantedseed": {
+ "arguments": [["target_time", "int", -1], ["next", "template"], ["delay", "int"]],
+ "sprite": "seed",
+ "height": 0.05,
+ "name": "plantedseed",
+ "components": [
+ ["Timer", {
+ "delay": ["arg", "delay"],
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["arg", "next"]}]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "seedling": {
+ "arguments": [["target_time", "int", -1], ["next", "template"], ["delay", "int"]],
+ "sprite": "seed",
+ "height": 0.09,
+ "name": "seedling",
+ "components": [
+ ["Timer", {
+ "delay": ["arg", "delay"],
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["arg", "next"]}]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "youngplant": {
+ "arguments": [["target_time", "int", -1], ["next", "template"], ["crop", "string"], ["delay", "int"]],
+ "components": [
+ ["Timer", {
+ "delay": ["arg", "delay"],
+ "spread": 0.5,
+ "target_time": ["arg", "target_time"],
+ "trigger": "change"
+ }],
+ ["Build", {"obj": ["arg", "next"]}],
+ ["Visible", {
+ "name": ["concat", [["string", "young"], ["arg", "crop"], ["string", "plant"]]],
+ "sprite": "youngplant",
+ "height": 0.8
+ }]
+ ],
+ "extract": {
+ "target_time": ["Timer", "target_time"]
+ },
+ "flags": ["Occupied"]
+ },
+ "carrotplant": {
+ "sprite": "smallplant",
+ "name": "carrotplant",
+ "height": 1.0,
+ "components": [
+ ["Interactable", {"action": ["interaction", ["trigger", "die"]]}],
+ ["Loot", {"loot": ["list", [
+ ["list", [{"type": "carrotseed"}, 1.0]],
+ ["list", [{"type": "carrot"}, 1.0]]
+ ]]}]
+ ],
+ "flags": ["Occupied"]
+ },
+ "radishes": {
+ "substitute": "radish"
+ }
+ },
+ "items": {
+ "radishseed": {"sprite": "seed", "action": ["build", ["plantedradishseed", ["Floor", "Soil"], ["Occupied", "Blocking"]]]},
+ "radish": {"sprite": "food", "action": ["eat", 3]},
+ "radishes": {"sprite": "food", "name": "radish", "entity": "radish", "action": ["eat", 3]},
+ "eldritch_radish": {"sprite": "food", "name": "eldritch_radish", "action": ["eat", 20]},
+ "carrotseed": {"sprite": "seed", "action": ["build", ["plantedcarrotseed", ["Floor", "Soil"], ["Occupied", "Blocking"]]]},
+ "carrot": {"sprite": "food", "action": ["eat", 5]}
+ },
+ "templates":{
+ "plantedcarrotseed": ["plantedseed", {"delay": 60, "next": "carrotseedling"}],
+ "carrotseedling": ["seedling", {"delay": 60, "next": "youngcarrotplant"}],
+ "youngcarrotplant": ["youngplant", {"crop": "carrot", "delay": 60, "next": "carrotplant"}]
+ }
+}
diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json
index 2571997..118b9cd 100644
--- a/content/encyclopediae/default_encyclopedia.json
+++ b/content/encyclopediae/default_encyclopedia.json
@@ -1,78 +1,5 @@
{
"assemblages": {
- "wall": {
- "sprite": "wall",
- "height": 2,
- "flags": ["Blocking"]
- },
- "rock": {
- "sprite": "rock",
- "height": 10,
- "flags": ["Blocking"]
- },
- "tree": {
- "sprite": "tree",
- "height": 3,
- "flags": ["Blocking"]
- },
- "fence": {
- "sprite": "fence",
- "height": 1,
- "flags": ["Blocking"]
- },
- "grass": {
- "components": [
- ["Visible", {
- "sprite": ["random", [
- "grass1",
- "grass2",
- "grass3",
- "grass1",
- "grass2",
- "grass3",
- "ground"
- ]],
- "height": 0.1,
- "name": "grass"
- }]
- ],
- "flags": ["Floor", "Soil"]
- },
- "greengrass": {
- "components": [
- ["Visible", {
- "sprite": ["random", [
- "grass1",
- "grass2",
- "grass3"
- ]],
- "height": 0.1,
- "name": "grass"
- }]
- ],
- "flags": ["Floor", "Soil"]
- },
- "ground": {
- "sprite": "ground",
- "height": 0.1,
- "flags": ["Floor", "Soil"]
- },
- "floor": {
- "sprite": "floor",
- "height": 0.1,
- "flags": ["Floor"]
- },
- "bridge": {
- "sprite": "bridge",
- "height": 0.1,
- "flags": ["Floor"]
- },
- "water": {
- "sprite": "water",
- "height": 0.0
- },
- "house": {"height": 3.0, "sprite": "house"},
- "freeland": {},
"portal": {
"arguments": [["destination", "string"], ["destpos", "string", ""]],
"components": [
@@ -91,12 +18,6 @@
],
"flags": ["Floor"]
},
- "img": {
- "arguments": [["sprite", "string", ""], ["height", "float", 1.0]],
- "components": [
- ["Visible", {"name": ["arg", "sprite"], "sprite": ["arg", "sprite"], "height": ["arg", "height"]}]
- ]
- },
"builtwall": {
"arguments": [["health", "int", 100]],
"components": [
@@ -127,80 +48,6 @@
"components": [["Timer", {"delay": 3, "spread": 0.0, "trigger": "remove", "target_time": -1}]],
"save": false
},
- "rat": {
- "sprite": "rat",
- "height": 1.0,
- "components": [
- ["MonsterAI", {
- "view_distance": 3,
- "move_chance": 0.08,
- "homesickness": 0.1
- }],
- ["Health", {"health": 8, "maxhealth": 8}],
- ["Fighter", {"damage": 2, "cooldown": 6}],
- ["Movable", {"cooldown": 3}],
- ["Faction", {"faction": "evil"}],
- ["Loot", {"loot": ["list", [
- ["list", [{"type": "radishseed"}, 1.0]]
- ]]}]
- ]
- },
- "goblin": {
- "sprite": "goblin",
- "height": 1.0,
- "components": [
- ["MonsterAI", {
- "view_distance": 8,
- "move_chance": 0.02,
- "homesickness": 0.1
- }],
- ["Health", {"health": 15, "maxhealth": 15}],
- ["Fighter", {"damage": 5, "cooldown": 8}],
- ["Movable", {"cooldown": 4}],
- ["Faction", {"faction": "evil"}],
- ["Loot", {"loot": ["list", [
- ["list", [{"type": "sword"}, 0.05]],
- ["list", [{"type": "club"}, 0.1]],
- ["list", [{"type": "radish"}, 0.25]]
- ]]}]
- ]
- },
- "troll": {
- "sprite": "troll",
- "height": 1.0,
- "components": [
- ["MonsterAI", {
- "view_distance": 8,
- "move_chance": 0.01,
- "homesickness": 0.1
- }],
- ["Health", {"health": 75, "maxhealth": 75}],
- ["Fighter", {"damage": 15, "cooldown": 10}],
- ["Movable", {"cooldown": 5}],
- ["Faction", {"faction": "evil"}],
- ["Loot", {"loot": ["list", [
- ["list", [{"type": "stone"}, 1.0]],
- ["list", [{"type": "stone"}, 0.3]],
- ["list", [{"type": "pebble"}, 0.5]],
- ["list", [{"type": "pebble"}, 0.5]],
- ["list", [{"type": "pebble"}, 0.5]]
- ]]}]
-
- ]
- },
- "rabbit": {
- "sprite": "rabbit",
- "height": 1.0,
- "components": [
- ["MonsterAI", {
- "view_distance": 3,
- "move_chance": 0.08,
- "homesickness": 0.1
- }],
- ["Movable", {"cooldown": 3}],
- ["Faction", {"faction": "neutral"}]
- ]
- },
"spawner": {
"arguments": [["template", "template"], ["amount", "int", 1], ["delay", "int", 0], ["clan", "string", ""], ["initial_spawn", "bool", true]],
"components": [
@@ -217,86 +64,6 @@
}]
]
},
- "letter": {
- "arguments": [["char", "string"]],
- "components": [["Visible", {
- "name": ["concat", ["letter_", ["arg", "char"]]],
- "sprite": ["concat", ["emptyletter-", ["arg", "char"]]],
- "height": 1.0
- }]]
- },
- "radishplant": {
- "sprite": "smallplant",
- "name": "radishplant",
- "height": 0.5,
- "components": [
- ["Interactable", {"action": ["interaction", ["trigger", "die"]]}],
- ["Loot", {"loot": ["list", [
- ["list", [{"type": "radishseed"}, 0.92]],
- ["list", [{"type": "radishseed"}, 0.20]],
- ["list", [{"type": "radish"}, 0.8]],
- ["list", [{"type": "radish"}, 0.4]]
- ]]}]
- ],
- "flags": ["Occupied"]
- },
- "plantedradishseed": {
- "arguments": [["target_time", "int", -1]],
- "sprite": "seed",
- "height": 0.05,
- "name": "seed",
- "components": [
- ["Timer", {
- "delay": 600,
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["template", "radishseedling"]}]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
- "radishseedling": {
- "arguments": [["target_time", "int", -1]],
- "sprite": "seedling",
- "height": 0.05,
- "name": "seedling",
- "components": [
- ["Timer", {
- "delay": 600,
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["template", "youngradishplant"]}]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
- "youngradishplant": {
- "arguments": [["target_time", "int", -1]],
- "sprite": "youngplant",
- "height": 0.8,
- "name": "youngradishplant",
- "components": [
- ["Timer", {
- "delay": 600,
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["template", "radishplant"]}]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
"closeddoor": {
"sprite": "closeddoor",
"height": 2,
@@ -342,78 +109,6 @@
}]]]}]
]
},
- "plantedseed": {
- "arguments": [["target_time", "int", -1], ["next", "template"], ["delay", "int"]],
- "sprite": "seed",
- "height": 0.05,
- "name": "plantedseed",
- "components": [
- ["Timer", {
- "delay": ["arg", "delay"],
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["arg", "next"]}]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
- "seedling": {
- "arguments": [["target_time", "int", -1], ["next", "template"], ["delay", "int"]],
- "sprite": "seed",
- "height": 0.09,
- "name": "seedling",
- "components": [
- ["Timer", {
- "delay": ["arg", "delay"],
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["arg", "next"]}]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
- "youngplant": {
- "arguments": [["target_time", "int", -1], ["next", "template"], ["crop", "string"], ["delay", "int"]],
- "components": [
- ["Timer", {
- "delay": ["arg", "delay"],
- "spread": 0.5,
- "target_time": ["arg", "target_time"],
- "trigger": "change"
- }],
- ["Build", {"obj": ["arg", "next"]}],
- ["Visible", {
- "name": ["concat", [["string", "young"], ["arg", "crop"], ["string", "plant"]]],
- "sprite": "youngplant",
- "height": 0.8
- }]
- ],
- "extract": {
- "target_time": ["Timer", "target_time"]
- },
- "flags": ["Occupied"]
- },
- "carrotplant": {
- "sprite": "smallplant",
- "name": "carrotplant",
- "height": 1.0,
- "components": [
- ["Interactable", {"action": ["interaction", ["trigger", "die"]]}],
- ["Loot", {"loot": ["list", [
- ["list", [{"type": "carrotseed"}, 1.0]],
- ["list", [{"type": "carrot"}, 1.0]]
- ]]}]
- ],
- "flags": ["Occupied"]
- },
"quarry": {
"sprite": "quarry",
"height": 2,
@@ -424,20 +119,11 @@
["list", [{"type": "stone"}, 1.0]]
]]}]
]
- },
- "radishes": {
- "substitute": "radish"
}
},
"items": {
"pebble": {},
"stone": {"action": ["build", ["builtwall", ["Floor"], ["Blocking"]]]},
- "radishseed": {"sprite": "seed", "action": ["build", ["plantedradishseed", ["Floor", "Soil"], ["Occupied", "Blocking"]]]},
- "radish": {"sprite": "food", "action": ["eat", 3]},
- "radishes": {"sprite": "food", "name": "radish", "entity": "radish", "action": ["eat", 3]},
- "eldritch_radish": {"sprite": "food", "name": "eldritch_radish", "action": ["eat", 20]},
- "carrotseed": {"sprite": "seed", "action": ["build", ["plantedcarrotseed", ["Floor", "Soil"], ["Occupied", "Blocking"]]]},
- "carrot": {"sprite": "food", "action": ["eat", 5]},
"sword": {"action": ["equip", {
"slot": "hand",
"stats": {"strength": 5}
@@ -465,10 +151,5 @@
"stats": {"mining": 5}
}]
}
- },
- "templates":{
- "plantedcarrotseed": ["plantedseed", {"delay": 60, "next": "carrotseedling"}],
- "carrotseedling": ["seedling", {"delay": 60, "next": "youngcarrotplant"}],
- "youngcarrotplant": ["youngplant", {"crop": "carrot", "delay": 60, "next": "carrotplant"}]
}
}
diff --git a/content/encyclopediae/npcs.json b/content/encyclopediae/npcs.json
new file mode 100644
index 0000000..cef6f0b
--- /dev/null
+++ b/content/encyclopediae/npcs.json
@@ -0,0 +1,78 @@
+{
+ "assemblages": {
+ "rat": {
+ "sprite": "rat",
+ "height": 1.0,
+ "components": [
+ ["MonsterAI", {
+ "view_distance": 3,
+ "move_chance": 0.08,
+ "homesickness": 0.1
+ }],
+ ["Health", {"health": 8, "maxhealth": 8}],
+ ["Fighter", {"damage": 2, "cooldown": 6}],
+ ["Movable", {"cooldown": 3}],
+ ["Faction", {"faction": "evil"}],
+ ["Loot", {"loot": ["list", [
+ ["list", [{"type": "radishseed"}, 1.0]]
+ ]]}]
+ ]
+ },
+ "goblin": {
+ "sprite": "goblin",
+ "height": 1.0,
+ "components": [
+ ["MonsterAI", {
+ "view_distance": 8,
+ "move_chance": 0.02,
+ "homesickness": 0.1
+ }],
+ ["Health", {"health": 15, "maxhealth": 15}],
+ ["Fighter", {"damage": 5, "cooldown": 8}],
+ ["Movable", {"cooldown": 4}],
+ ["Faction", {"faction": "evil"}],
+ ["Loot", {"loot": ["list", [
+ ["list", [{"type": "sword"}, 0.05]],
+ ["list", [{"type": "club"}, 0.1]],
+ ["list", [{"type": "radish"}, 0.25]]
+ ]]}]
+ ]
+ },
+ "troll": {
+ "sprite": "troll",
+ "height": 1.0,
+ "components": [
+ ["MonsterAI", {
+ "view_distance": 8,
+ "move_chance": 0.01,
+ "homesickness": 0.1
+ }],
+ ["Health", {"health": 75, "maxhealth": 75}],
+ ["Fighter", {"damage": 15, "cooldown": 10}],
+ ["Movable", {"cooldown": 5}],
+ ["Faction", {"faction": "evil"}],
+ ["Loot", {"loot": ["list", [
+ ["list", [{"type": "stone"}, 1.0]],
+ ["list", [{"type": "stone"}, 0.3]],
+ ["list", [{"type": "pebble"}, 0.5]],
+ ["list", [{"type": "pebble"}, 0.5]],
+ ["list", [{"type": "pebble"}, 0.5]]
+ ]]}]
+
+ ]
+ },
+ "rabbit": {
+ "sprite": "rabbit",
+ "height": 1.0,
+ "components": [
+ ["MonsterAI", {
+ "view_distance": 3,
+ "move_chance": 0.08,
+ "homesickness": 0.1
+ }],
+ ["Movable", {"cooldown": 3}],
+ ["Faction", {"faction": "neutral"}]
+ ]
+ }
+ }
+}
diff --git a/content/world.json b/content/world.json
index e544bb3..3437cb8 100644
--- a/content/world.json
+++ b/content/world.json
@@ -1,4 +1,4 @@
{
"default_room": "tutorial",
- "encyclopedia": "default_encyclopedia"
+ "encyclopediae": ["default_encyclopedia", "crops", "base", "npcs"]
}