Skip to content

Commit

Permalink
[theFox6#4]: dedup trivia strings
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaddox committed Dec 13, 2023
1 parent f7fac44 commit 82c5ac1
Show file tree
Hide file tree
Showing 36 changed files with 644 additions and 426 deletions.
7 changes: 7 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ The plan is to make villagers build up their own villages.
* starfleet
* need some way for flyingships-like mods to notify villagers that all their location data just got teleported

* expose job functions to create meta-jobs that switch between jobs, eg
* for a pioneer AI that finds a good spot, inits the area, and switches to mayor tasks)
* for a manager-type that can jump in to help team members
* maybe make a recipe to convert other mod's building signs to ours and vice-versa
* egg-registering integration


## implemented Features
no crafting recipes yet (you will have to use creative)
features:
Expand Down
56 changes: 56 additions & 0 deletions TODO.MD
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,59 @@ so e.g., composter, wafflemaker, etc., can juggle multiple appliances


deduplicate strings -- job tasks have cross-cutting features and the associated strings should be in one place

night shift




## Planned Features
* villages
* built up by the villagers
* villagers
* trading and building up an economy
* working / doing their jobs
* jobs
* miner, farmer, woodcutter and many more

* realism
* villagers experience hunger, stamina and other effects
* villagers use tools, integrated with tool ranks
* drop inv, bones on death
* more realism
* integration with getname
* mobs_redo-like offspring and lineage-tracking
* => randomly generated stories
* generation of histories & other heirlooms
* => randomly generated villages with high rank items with cool backstories
* more jobs
* blacksmith: repairs tools
* craftsmen: higher level crafts needed for builder, salesmen and military
* build on a single craftsman AI, but limited to certain recipes for simplying automation
=> mineables go to the mason
=> choppables go to the carpenter
this will help regulate how much of each material goes to each recipe,
which make it easier to build a pipeline from raw resources to an overpriced retail front
combined with toolranks and tool repair, we might be able to make products worth buying
* clothing, armor, upgrades
* I think the mods add inv lists to the player for these, so likewise can be done to the villagers
* starfleet
* need some way for flyingships-like mods to notify villagers that all their location data just got teleported

* expose job functions to create meta-jobs that switch between jobs, eg
* for a pioneer AI that finds a good spot, inits the area, and switches to mayor tasks)
* for a manager-type that can jump in to help team members
* maybe make a recipe to convert other mod's building signs to ours and vice-versa
* egg-registering integration


## implemented Features
no crafting recipes yet (you will have to use creative)
features:
* building markers
* for building houses and saving the houses details
* save the position of the door and the bed
* some jobs will let the villagers return home at night
* at home the villagers will go to bed
* spawn-eggs for villagers
* female and male
24 changes: 12 additions & 12 deletions working_villagers/jobs/baker.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

local furnaces = {
names = {
Expand Down Expand Up @@ -176,19 +176,19 @@ local function put_cookable(_,stack)
end

working_villages.register_job("working_villages:job_baker", {
description = "baker (working_villages)",
long_description = "I look for a furnace and start putting the contents of your chest into it.",
trivia = {
description = S("baker (working_villages)"),
long_description = S("I look for a furnace and start putting the contents of your chest into it."),
trivia = trivia.get_trivia({
"My job position was the first to use appliances.",
},
}, {trivia.appliances,}), -- trivia.bread_basket
workflow = {
"Wake up",
"Handle my chest",
"Go to work",
"Search for furnaces",
"Go to furnace",
"Handle furnace",
"Periodically look away thoughtfully",
S("Wake up"),
S("Handle my chest"),
S("Go to work"),
S("Search for furnaces"),
S("Go to furnace"),
S("Handle furnace"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_builder.png",
jobfunc = function(self)
Expand Down
27 changes: 13 additions & 14 deletions working_villagers/jobs/beekeeper.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

-- limited support to two replant definitions
local beehives = {
Expand Down Expand Up @@ -82,20 +82,19 @@ local function put_bee(_,stack)
end

working_villages.register_job("working_villages:job_beekeeper", {
description = "beekeeper (working_villages)",
long_description = "I look for a beehive and start taking that sweet, sweet honey.",
trivia = {
"I'm part of the bread basket infrastructure.",
"I'm the reason the herb collector has a no-raze (responsible foraging) option.",
},
description = S("beekeeper (working_villages)"),
long_description = S("I look for a beehive and start taking that sweet, sweet honey."),
trivia = trivia.get_trivia({
S("I'm the reason the herb collector has a no-raze (responsible foraging) option."),
}, {trivia.break_basket,trivia.appliances,})
workflow = {
"Wake up",
"Handle my chest",
"Go to work",
"Search for beehives",
"Go to beehive",
"Handle beehive",
"Periodically look away thoughtfully",
S("Wake up"),
S("Handle my chest"),
S("Go to work"),
S("Search for beehives"),
S("Go to beehive"),
S("Handle beehive"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_builder.png",
jobfunc = function(self)
Expand Down
25 changes: 11 additions & 14 deletions working_villagers/jobs/biofuel.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

-- limited support to two replant definitions
local refineries = {
Expand Down Expand Up @@ -67,20 +67,17 @@ local function put_cookable(_,stack)
end

working_villages.register_job("working_villages:job_biofuel", {
description = "biofuel (working_villages)",
long_description = "I look for a refinery and start putting the contents of your chest into it.",
trivia = {
"I'm part of the pooper scooper crew!",
"I fuel the military-industrial complex.",
},
description = S("biofuel (working_villages)"),
long_description = S("I look for a refinery and start putting the contents of your chest into it."),
trivia = trivia.get_trivia({}, {trivia.waste_management, trivia.power_management, trivia.appliances}),
workflow = {
"Wake up",
"Handle my chest",
"Go to work",
"Search for refineries",
"Go to refinery",
"Handle refinery",
"Periodically look away thoughtfully",
S("Wake up"),
S("Handle my chest"),
S("Go to work"),
S("Search for refineries"),
S("Go to refinery"),
S("Handle refinery"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_builder.png",
jobfunc = function(self)
Expand Down
27 changes: 12 additions & 15 deletions working_villagers/jobs/bone_collector.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

local bones = {
-- more priority definitions
Expand Down Expand Up @@ -72,22 +73,18 @@ end

-- copied from the plant/herb collector
working_villages.register_job("working_villages:job_bonecollector", {
description = "bone collector (working_villages)",
long_description = "I am the undertaker.",
trivia = {
"Me and the herb collector are kinda the same.",
"I've seen things...",
"I clean up after the military-industrial complex.",
},
description = S("bone collector (working_villages)"),
long_description = S("I am the undertaker."),
trivia = trivia.get_trivia({}, {trivia.herb_collector, trivia.waste_management, trivia.first_responder,}),
workflow = {
"Wake up",
"Handle my chest",
"Equip my tool",
"Go to work",
"Search for bones",
"Go to bones",
"Collect (dig) bones",
"Periodically look away thoughtfully",
S("Wake up"),
S("Handle my chest"),
S("Equip my tool"),
S("Go to work"),
S("Search for bones"),
S("Go to bones"),
S("Collect (dig) bones"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_herb_collector.png",
jobfunc = function(self)
Expand Down
18 changes: 16 additions & 2 deletions working_villagers/jobs/brewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

local fermenting_barrels = {
names = {
Expand Down Expand Up @@ -180,8 +181,21 @@ local function put_cookable(_,stack)
end

working_villages.register_job("working_villages:job_brewer", {
description = "brewer (working_villages)",
long_description = "I look for a barrel and start preserving the farming surplus.",
description = S("brewer (working_villages)"),
long_description = S("I look for a barrel and start preserving the farming surplus."),
-- TODO
trivia = trivia.get_trivia({}, {trivia.herb_collector, trivia.waste_management, trivia.first_responder,trivia.appliances,}),
-- TODO
workflow = {
S("Wake up"),
S("Handle my chest"),
S("Equip my tool"),
S("Go to work"),
S("Search for bones"),
S("Go to bones"),
S("Collect (dig) bones"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_builder.png",
jobfunc = function(self)
self:handle_night()
Expand Down
26 changes: 13 additions & 13 deletions working_villagers/jobs/brush_collector.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

local shrubs = {
-- more priority definitions
Expand Down Expand Up @@ -76,22 +77,21 @@ local searching_range = {x = 10, y = 5, z = 10}

-- copied from the plant/herb collector
working_villages.register_job("working_villages:job_brushcollector", {
description = "brush collector (working_villages)",
long_description = "I look for all sorts of brush and collect it.",
inventory_image = "default_paper.png^working_villages_herb_collector.png",
trivia = {
"Me and the herb collector are kinda the same.",
description = S("brush collector (working_villages)"),
long_description = S("I look for all sorts of brush and collect it."),
trivia = trivia.get_trivia({
"I just pick up a few things that the herb collector and wood cutter leave behind.",
},
}, {trivia.herb_collector,}),
workflow = {
"Wake up",
"Handle my chest",
"Go to work",
"Search for brush",
"Go to brush",
"Collect (dig) brush",
"Periodically look away thoughtfully",
S("Wake up"),
S("Handle my chest"),
S("Go to work"),
S("Search for brush"),
S("Go to brush"),
S("Collect (dig) brush"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_herb_collector.png",
jobfunc = function(self)
self:handle_night()
-- TODO wield item ?
Expand Down
28 changes: 14 additions & 14 deletions working_villagers/jobs/bug_collector.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")

local bugs = {
-- more priority definitions
Expand Down Expand Up @@ -75,24 +76,23 @@ end

-- copied from the plant/herb collector
working_villages.register_job("working_villages:job_bugcollector", {
description = "bug collector (working_villages)",
long_description = "I look for all sorts of bugs and collect them.",
inventory_image = "default_paper.png^working_villages_herb_collector.png",
trivia = {
"Me and the herb collector are kinda the same.",
},
description = S("bug collector (working_villages)"),
long_description = S("I look for all sorts of bugs and collect them."),
trivia = trivia.get_trivia({}, {trivia.herb_collector,}),
workflow = {
--"Wake up",
"Handle my chest",
"Equip my tool",
"Go to work",
"Search for bugs",
"Go to bugs",
--S("Wake up"),
S("Handle my chest"),
S("Equip my tool"),
S("Go to work"),
S("Search for bugs"),
S("Go to bugs"),
-- TODO handle entity-type bugs
"Collect (dig) bugs",
"Periodically look away thoughtfully",
S("Collect (dig) bugs"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_herb_collector.png",
jobfunc = function(self)
-- TODO night-shift version of handle_night
-- TODO more reasonable sleep schedule
-- need to be up at night for fireflies
-- and also during the day for butterflies
Expand Down
19 changes: 16 additions & 3 deletions working_villagers/jobs/builder.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local func = working_villages.require("jobs/util")
local S = minetest.get_translator("working_villages")
local trivia = working_villages.require("jobs/trivia")
local co_command = working_villages.require("job_coroutines").commands

local function find_building(p)
Expand All @@ -22,11 +23,23 @@ end
local searching_range = {x = 10, y = 6, z = 10}

working_villages.register_job("working_villages:job_builder", {
description = "builder (working_villages)",
long_description = "I look for the nearest building marker with a started building site. "..
description = S("builder (working_villages)"),
long_description = S("I look for the nearest building marker with a started building site. "..
"There I'll help building up the building.\
If I have the materials of course. Also I'll look for building markers within a 10 block radius. "..
"And I ignore paused building sites.",
"And I ignore paused building sites."),
trivia = trivia.get_trivia({}, {trivia.og, trivia.construction, trivia.griefer,}),
workflow = {
--S("Wake up"),
S("Handle my chest"),
S("Equip my tool"),
S("Go to work"),
S("Search for bugs"),
S("Go to bugs"),
-- TODO handle entity-type bugs
S("Collect (dig) bugs"),
S("Periodically look away thoughtfully"),
},
inventory_image = "default_paper.png^working_villages_builder.png",
jobfunc = function(self)
self:handle_night()
Expand Down
Loading

0 comments on commit 82c5ac1

Please sign in to comment.