trader_village.lua 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. --------------------------------------------
  2. -- Trader for villages
  3. --------------------------------------------
  4. -- general textures shared by the traders in the villages
  5. mobf_trader.VILLAGE_TRADER_TEXTURES = {'kuhhaendler.png', 'bauer_in_sonntagskleidung.png', 'character.png'};
  6. -- the smith takes twice as much as he'll really need
  7. mobf_trader.price_smith = function( anz_iron, anz_copper, anz_stick )
  8. local price = {};
  9. if( anz_iron > 0 ) then
  10. table.insert( price, 'default:iron_lump '..tostring( anz_iron * 2 ) );
  11. end
  12. if( anz_copper > 0 ) then
  13. table.insert( price, 'default:copper_lump '..tostring( anz_copper * 2 ) );
  14. end
  15. if( anz_iron > 0 or anz_copper > 0 ) then
  16. table.insert( price, 'default:coal_lump '..tostring( (anz_iron + anz_copper) * 2 ));
  17. end
  18. if( anz_stick > 0 ) then
  19. table.insert( price, 'default:stick '..tostring( anz_stick * 2 ));
  20. end
  21. return price;
  22. end
  23. -- a smith; does steel and bronze
  24. -- sells pick, axe, shovel, hoe and sword out of steel
  25. -- also sells blocks and ingots out of those materials
  26. -- also sells locked chests, buckets, steel doors, hatch, stovepipe, rails, steel bottle and scredriver
  27. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  28. 'Blacksmith',
  29. 'blacksmith',
  30. {
  31. { 'default:pick_steel', mobf_trader.price_smith( 3, 0, 2 ) },
  32. { 'default:axe_steel', mobf_trader.price_smith( 3, 0, 2 ) },
  33. { 'default:shovel_steel', mobf_trader.price_smith( 1, 0, 2 ) },
  34. { 'farming:hoe_steel', mobf_trader.price_smith( 2, 0, 2 ) },
  35. { 'default:sword_steel', mobf_trader.price_smith( 2, 0, 1 ) },
  36. { 'screwdriver:screwdriver',mobf_trader.price_smith( 1, 0, 1 ) },
  37. { 'cottages:hammer', mobf_trader.price_smith( 6, 0, 1 ) },
  38. { 'cottages:anvil', mobf_trader.price_smith( 7, 0, 1 ) },
  39. { 'default:steelblock', mobf_trader.price_smith( 9, 0, 0 ) },
  40. { 'default:steel_ingot', mobf_trader.price_smith( 1, 0, 0 ) },
  41. { 'default:chest_locked', {'default:tree 4', 'default:iron_lump 2', 'default:coal_lump 2'}},
  42. { 'bucket:bucket_empty', mobf_trader.price_smith( 3, 0, 0 ) },
  43. { 'doors:door_steel', mobf_trader.price_smith( 6, 0, 0 ) },
  44. { 'cottages:hatch_steel', mobf_trader.price_smith( 2, 0, 0 ) },
  45. -- the stovepipe is too seldom needed, and there was one item too many offered
  46. -- { 'cottages:stovepipe', mobf_trader.price_smith( 1, 0, 0 ) },
  47. { 'default:rail 15', mobf_trader.price_smith( 6, 0, 2 ) },
  48. { 'vessels:steel_bottle', mobf_trader.price_smith( 1, 0, 0 ) },
  49. { 'animalmaterials:scissors',mobf_trader.price_smith(2, 0, 2 ) },
  50. },
  51. { 'Blacky','Simon'},
  52. {'blacksmith.png'}
  53. );
  54. -- copper/bronze is done by another guy (too much for one smith)
  55. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  56. 'Bronze smith',
  57. 'bronzesmith',
  58. {
  59. { 'default:pick_bronze', mobf_trader.price_smith( 3, 3, 2 ) },
  60. { 'default:axe_bronze', mobf_trader.price_smith( 3, 3, 2 ) },
  61. { 'default:shovel_bronze', mobf_trader.price_smith( 1, 1, 2 ) },
  62. { 'farming:hoe_bronze', mobf_trader.price_smith( 2, 2, 2 ) },
  63. { 'default:sword_bronze', mobf_trader.price_smith( 2, 2, 1 ) },
  64. { 'default:copperblock', mobf_trader.price_smith( 0, 9, 0 ) },
  65. { 'default:bronzeblock', mobf_trader.price_smith( 9, 9, 0 ) },
  66. { 'default:copper_ingot', mobf_trader.price_smith( 0, 1, 0 ) },
  67. { 'default:bronze_ingot', mobf_trader.price_smith( 1, 1, 0 ) },
  68. },
  69. { 'Charly','Bert'},
  70. {'blacksmith.png'}
  71. );
  72. -- the stonemason calculates his prices based on cobble, stone and sticks used;
  73. -- he takes wood instead of cobble because he's got a lot of cobble already and
  74. -- intends to either use the wood or trade it for other items
  75. -- (obtaining wood is roughly comparable to obtaining cobble; at least for players)
  76. mobf_trader.price_stonemason = function( anz_cobble, anz_stone, anz_stick )
  77. local price = {};
  78. if( anz_cobble > 0 ) then
  79. table.insert( price, 'default:wood '..tostring( anz_cobble * 2 ) );
  80. end
  81. if( anz_stone > 0 ) then
  82. table.insert( price, 'default:wood '..tostring( anz_stone * 2 ));
  83. -- cobble needs to be smelted in order to get stone
  84. table.insert( price, 'default:coal_lump '..tostring( anz_stone * 2 ));
  85. end
  86. if( anz_stick > 0 ) then
  87. table.insert( price, 'default:stick '..tostring( anz_stick * 2 ));
  88. end
  89. return price;
  90. end
  91. -- a stonemason (=Steinmetz)
  92. -- this one does NOT provide sandstone and such - that's the domain of the clay trader
  93. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  94. 'Stonemason',
  95. 'stonemason',
  96. {
  97. { 'default:pick_stone', mobf_trader.price_stonemason( 3, 0, 2 ) },
  98. { 'default:axe_stone', mobf_trader.price_stonemason( 3, 0, 2 ) },
  99. { 'default:shovel_stone', mobf_trader.price_stonemason( 1, 0, 2 ) },
  100. { 'farming:hoe_stone', mobf_trader.price_stonemason( 2, 0, 2 ) },
  101. { 'default:sword_stone', mobf_trader.price_stonemason( 2, 0, 1 ) },
  102. -- even a furnace is a bit of work
  103. { 'default:furnace', {'default:tree 2', 'default:pick_steel' }},
  104. -- this is a useful and rather expensive item; it seperates harvested wheat into straw and seeds
  105. { 'cottages:threshing_floor', {'default:tree 4', 'default:chest', 'default:chest_locked 2', 'default:pick_bronze' }},
  106. -- the mill allows to craft wheat seeds into flour
  107. { 'cottages:handmill', {'default:tree 12', 'default:coal_lump 24', 'default:steel_ingot', 'default:pick_bronze' }},
  108. -- stairs and slabs are sold in larger quantities
  109. { 'stairs:stair_cobble 12', mobf_trader.price_stonemason(12, 0, 0 ) },
  110. { 'stairs:stair_stone 12', mobf_trader.price_stonemason( 0,12, 0 ) },
  111. { 'stairs:stair_sandstone 12', mobf_trader.price_stonemason( 0,48, 0 ) },
  112. { 'stairs:stair_stonebrick 12',mobf_trader.price_stonemason( 0,48, 0 ) },
  113. { 'stairs:slab_cobble 24', mobf_trader.price_stonemason(12, 0, 0 ) },
  114. { 'stairs:slab_stone 24', mobf_trader.price_stonemason( 0,12, 0 ) },
  115. { 'stairs:slab_sandstone 24', mobf_trader.price_stonemason( 0,48, 0 ) },
  116. { 'stairs:slab_stonebrick 24', mobf_trader.price_stonemason( 0,48, 0 ) },
  117. },
  118. { 'Metz'},
  119. mobf_trader.VILLAGE_TRADER_TEXTURES
  120. );
  121. -- TODO: a better name for this guy would be helpful
  122. -- all these items where too many for the stonemason; plus the stones themshelves are better sold by a miner
  123. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  124. 'stoneminer',
  125. 'stoneminer',
  126. {
  127. -- those items are needed in larger quantities
  128. { 'default:stone 24', mobf_trader.price_stonemason( 0,24, 1 ) },
  129. { 'default:mossycobble 12', mobf_trader.price_stonemason( 3,24, 0 ) },
  130. { 'default:stonebrick 12', mobf_trader.price_stonemason( 0,24, 0 ) },
  131. { 'default:desert_stone 12', mobf_trader.price_stonemason(12, 0, 1 ) },
  132. { 'default:desert_stonebrick 12',mobf_trader.price_stonemason(24,0, 1 ) },
  133. { 'default:gravel 12', mobf_trader.price_stonemason( 0, 2, 0 ) }, -- he probably has a grinder from technic at home :-)
  134. },
  135. {'Stoni'},
  136. mobf_trader.VILLAGE_TRADER_TEXTURES
  137. );
  138. -- woodworkers use wood and turn it into other useful stuff
  139. mobf_trader.price_woodworker = function( anz_wood, anz_tree, anz_stick )
  140. local price = {};
  141. if( anz_wood > 0 ) then
  142. table.insert( price, 'default:wood '..tostring( anz_wood * 2 ) );
  143. end
  144. if( anz_tree > 0 ) then
  145. table.insert( price, 'default:tree '..tostring( anz_tree * 2 ));
  146. end
  147. if( anz_stick > 0 ) then
  148. table.insert( price, 'default:stick '..tostring( anz_stick * 2 ));
  149. end
  150. return price;
  151. end
  152. -- carpenter (=Zimmerer)
  153. -- It is very unlikely that players want individual fences; thus, packages are sold
  154. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  155. 'Carpenter, specialized in fences',
  156. 'carpenter',
  157. {
  158. { 'default:fence_wood 16', mobf_trader.price_woodworker( 0, 3, 0 ) },
  159. { 'cottages:fence_small 24', mobf_trader.price_woodworker( 0, 3, 0 ) },
  160. { 'cottages:fence_corner 4', mobf_trader.price_woodworker( 0, 1, 0 ) },
  161. { 'cottages:fence_end 2', mobf_trader.price_woodworker( 0, 1, 0 ) },
  162. { 'cottages:gate_closed', mobf_trader.price_woodworker( 0, 1, 0 ) },
  163. },
  164. { 'Friedrich', 'Friedhelm' },
  165. mobf_trader.VILLAGE_TRADER_TEXTURES
  166. );
  167. -- this one does wooden tools
  168. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  169. 'Joiner, specialized in tools',
  170. 'toolmaker',
  171. {
  172. { 'default:pick_wood', mobf_trader.price_woodworker( 3, 0, 2 ) },
  173. { 'default:axe_wood', mobf_trader.price_woodworker( 3, 0, 2 ) },
  174. { 'default:shovel_wood', mobf_trader.price_woodworker( 1, 0, 2 ) },
  175. { 'farming:hoe_wood', mobf_trader.price_woodworker( 2, 0, 2 ) },
  176. { 'default:sword_wood', mobf_trader.price_woodworker( 2, 0, 1 ) },
  177. },
  178. { 'Ted' },
  179. mobf_trader.VILLAGE_TRADER_TEXTURES
  180. );
  181. -- joiner (=Schreiner, Tischler)
  182. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  183. 'Joiner, specialized in doors',
  184. 'doormaker',
  185. {
  186. { 'doors:door_wood', mobf_trader.price_woodworker( 6, 0, 0 ) },
  187. { 'cottages:hatch_wood', mobf_trader.price_woodworker( 2, 0, 0 ) },
  188. { 'cottages:window_shutter_open', mobf_trader.price_woodworker( 2, 0, 0 ) },
  189. { 'cottages:half_door 2', mobf_trader.price_woodworker( 7, 0, 0 ) },
  190. { 'cottages:gate_closed', mobf_trader.price_woodworker( 2, 0, 0 ) },
  191. },
  192. { 'Donald' },
  193. mobf_trader.VILLAGE_TRADER_TEXTURES
  194. );
  195. -- this is done by a joiner as well..
  196. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  197. 'Joiner, specialized in furniture',
  198. 'furnituremaker',
  199. {
  200. { 'cottages:bench', mobf_trader.price_woodworker( 0, 0, 4 ) },
  201. { 'cottages:table', mobf_trader.price_woodworker( 1, 0, 1 ) },
  202. { 'cottages:shelf', mobf_trader.price_woodworker( 2, 0, 6 ) },
  203. { 'default:chest', mobf_trader.price_woodworker( 8, 0, 0 ) },
  204. { 'default:bookshelf', {'default:book 3', 'default:wood 12'}},
  205. { {'cottages:bed_head', 'cottages:bed_foot'}, {'wool:white 2', 'default:wood 4', 'default:stick 6'}},
  206. { 'default:ladder 3', mobf_trader.price_woodworker( 0, 0, 7 ) },
  207. { 'default:sign_wall 4', mobf_trader.price_woodworker( 6, 0, 1 ) },
  208. },
  209. { 'Donald' },
  210. mobf_trader.VILLAGE_TRADER_TEXTURES
  211. );
  212. -- a joiner who does ladders and staircases
  213. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  214. 'Joiner, specialized in stairs',
  215. 'stairmaker',
  216. {
  217. { 'stairs:stair_wood 12', mobf_trader.price_woodworker(12, 0, 0 ) },
  218. { 'stairs:stair_junglewood 12', mobf_trader.price_woodworker(12, 0, 0 ) },
  219. { 'stairs:slab_wood 24', mobf_trader.price_woodworker(12, 0, 0 ) },
  220. { 'stairs:slab_junglewood 24', mobf_trader.price_woodworker(12, 0, 0 ) },
  221. { 'default:ladder 3', mobf_trader.price_woodworker( 0, 0, 7 ) },
  222. },
  223. { 'Siegfried' },
  224. mobf_trader.VILLAGE_TRADER_TEXTURES
  225. );
  226. -- cooper (=Boettcher)
  227. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  228. 'cooper',
  229. 'cooper',
  230. {
  231. { 'cottages:barrel', {'default:wood 10', 'default:steel_ingot 4'}},
  232. { 'cottages:tub', {'default:wood 5', 'default:steel_ingot 2'}},
  233. },
  234. { 'Balduin' },
  235. mobf_trader.VILLAGE_TRADER_TEXTURES
  236. );
  237. -- weelwright (=Wagner)
  238. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  239. 'wheelwright',
  240. 'wheelwright',
  241. {
  242. { 'cottages:wagon_wheel', {'default:wood 4', 'default:stick 20', 'default:steel_ingot 2'}},
  243. },
  244. { 'Werner' },
  245. mobf_trader.VILLAGE_TRADER_TEXTURES
  246. );
  247. -- saddler (=Sattler)
  248. -- most of these products are from animalmaterials
  249. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  250. 'Saddler',
  251. 'saddler',
  252. {
  253. { 'cottages:sleeping_mat', {'wool:white', 'cottages:straw_mat 4'}},
  254. { 'unified_inventory:bag_small 2', {'default:wood 8', 'default:stick 2'}},
  255. { 'unified_inventory:bag_medium', {'wool:white 2', 'default:stick 2'}},
  256. { 'unified_inventory:bag_large', {'wool:white 4', 'default:stick 3'}},
  257. { 'animalmaterials:lasso', 'wool:white 8'},
  258. { 'animalmaterials:net', 'wool:white 10'},
  259. { 'animalmaterials:saddle', {'wool:white 5', 'default:sword_steel'}},
  260. },
  261. { 'Sammy' },
  262. mobf_trader.VILLAGE_TRADER_TEXTURES
  263. );
  264. -- roofer (=Dachdecker); although they tend to place that stuff on the roof and not create it...
  265. -- the actual receipes require diffrent dye-replacements (i.e. coal, dirt, clay lump), but that
  266. -- would be impractical here
  267. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  268. 'Roofer',
  269. 'roofer',
  270. {
  271. { 'cottages:roof_straw 24', 'cottages:straw_mat 12'},
  272. { 'cottages:roof_reet 24', 'default:papyrus 12'},
  273. { 'cottages:roof_wood 24', mobf_trader.price_woodworker( 8, 0, 0 ) },
  274. { 'cottages:roof_red 24', mobf_trader.price_woodworker( 8, 0, 0 ) },
  275. { 'cottages:roof_black 24', mobf_trader.price_woodworker( 8, 0, 0 ) },
  276. { 'cottages:roof_brown 24', mobf_trader.price_woodworker( 8, 0, 0 ) },
  277. { 'cottages:roof_slate 24', mobf_trader.price_woodworker( 8, 0, 0 ) },
  278. -- removed the roof connectors as those would be too many; left one so that all the items are aligned well
  279. { 'cottages:roof_connector_straw 6',{'cottages:straw_mat 3', 'default:wood 1'} },
  280. -- { 'cottages:roof_connector_reet 6', {'default:papyrus 3', 'default:wood 1'} },
  281. -- { 'cottages:roof_connector_wood 6', mobf_trader.price_woodworker( 3, 0, 0 ) },
  282. -- { 'cottages:roof_connector_red 6', mobf_trader.price_woodworker( 3, 0, 0 ) },
  283. -- { 'cottages:roof_connector_black 6',mobf_trader.price_woodworker( 3, 0, 0 ) },
  284. -- { 'cottages:roof_connector_brown 6',mobf_trader.price_woodworker( 3, 0, 0 ) },
  285. -- { 'cottages:roof_connector_slate 6',mobf_trader.price_woodworker( 3, 0, 0 ) },
  286. { 'cottages:roof_flat_straw 6', 'cottages:straw_mat 6'},
  287. { 'cottages:roof_flat_reet 6', 'default:papyrus 6'},
  288. { 'cottages:roof_flat_wood 6', mobf_trader.price_woodworker( 2, 0, 0 ) },
  289. { 'cottages:roof_flat_red 6', mobf_trader.price_woodworker( 2, 0, 0 ) },
  290. { 'cottages:roof_flat_black 6', mobf_trader.price_woodworker( 2, 0, 0 ) },
  291. { 'cottages:roof_flat_brown 6', mobf_trader.price_woodworker( 2, 0, 0 ) },
  292. { 'cottages:roof_flat_slate 6', mobf_trader.price_woodworker( 2, 0, 0 ) },
  293. },
  294. { 'Ronald', 'Robert' },
  295. mobf_trader.VILLAGE_TRADER_TEXTURES
  296. );
  297. -- bread production:
  298. -- (anyone) digging wheat -> farming:wheat
  299. -- (anyone) farming:wheat -> farming:seed_wheat + cottages:straw_mat
  300. -- miller: farming:seed_wheat -> farming:flour (same as the handmill)
  301. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  302. 'miller',
  303. 'miller',
  304. {
  305. { 'farming:flour 10', 'farming:seed_wheat 15'},
  306. { 'farming:flour 40', 'farming:seed_wheat 49'},
  307. { 'farming:flour 90', 'farming:seed_wheat 99'},
  308. },
  309. { 'Martin' },
  310. mobf_trader.VILLAGE_TRADER_TEXTURES
  311. );
  312. -- baker: farming:flour -> farming:bread (can be done in a furnace as well); also sells pies
  313. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  314. 'baker',
  315. 'baker',
  316. {
  317. { 'farming:bread 6', {'farming:flour 10', 'default:coal_lump 3'}},
  318. { 'bushes:blueberry_pie_slice', {'default:papyrus 2'}},
  319. { 'bushes:blackberry_pie_cooked', {'bushes:blackberry 9', 'default:coal_lump 2'}},
  320. { 'bushes:blueberry_pie_cooked', {'bushes:blueberry 9', 'default:coal_lump 2'}},
  321. { 'bushes:gooseberry_pie_cooked', {'bushes:gooseberry 9', 'default:coal_lump 2'}},
  322. { 'bushes:mixed_berry_pie_cooked', {'bushes:blackberry 18', 'default:coal_lump 2'}},
  323. { 'bushes:raspberry_pie_cooked', {'bushes:raspberry 9', 'default:coal_lump 2'}},
  324. { 'bushes:strawberry_pie_cooked', {'bushes:strawberry 9', 'default:coal_lump 2'}},
  325. { 'farming:bread 34', {'farming:flour 49', 'default:coal_lump 12'}},
  326. { 'farming:bread 80', {'farming:flour 90', 'default:coal_lump 20'}},
  327. { 'bushes:basket_blackberry', {'bushes:blackberry 24', 'default:coal_lump 2'}},
  328. { 'bushes:basket_blueberry', {'bushes:blueberry 24', 'default:coal_lump 2'}},
  329. { 'bushes:basket_gooseberry', {'bushes:gooseberry 24', 'default:coal_lump 2'}},
  330. { 'bushes:basket_mixed_berry', {'bushes:blackberry 36', 'default:coal_lump 2'}},
  331. { 'bushes:basket_raspberry', {'bushes:raspberry 24', 'default:coal_lump 2'}},
  332. { 'bushes:basket_strawberry', {'bushes:strawberry 24', 'default:coal_lump 2'}},
  333. },
  334. { 'Ben', 'Berthold' },
  335. mobf_trader.VILLAGE_TRADER_TEXTURES
  336. );
  337. -- a teacher - sells paper and books (librarians are less likely to be found in villages)
  338. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  339. 'teacher',
  340. 'teacher',
  341. {
  342. {'default:paper 2', {'default:papyrus 6', 'default:coal_lump 1'}},
  343. {'default:book', {'default:papyrus 9', 'default:tree 4'}}, -- for heating the school
  344. },
  345. { 'Lars', 'Leon' },
  346. mobf_trader.VILLAGE_TRADER_TEXTURES
  347. );
  348. -- ice trader
  349. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  350. 'iceman',
  351. 'iceman',
  352. {
  353. {'default:ice', 'default:pick_steel'},
  354. },
  355. { 'Ian', 'Jan' },
  356. mobf_trader.VILLAGE_TRADER_TEXTURES
  357. );
  358. -- potterer (Toepfer)
  359. -- TODO: the potterer could have more work to do...
  360. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  361. 'potterer',
  362. 'potterer',
  363. {
  364. {'default:clay_lump 2', 'default:coal_lump'},
  365. {'default:clay 6', 'default:shovel_stone'},
  366. {'cottages:washing', 'default:shovel_steel'}, -- 1 clay
  367. },
  368. { 'Peter', 'Paul' },
  369. mobf_trader.VILLAGE_TRADER_TEXTURES
  370. );
  371. -- a bricklayer
  372. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  373. 'bricklayer',
  374. 'bricklayer',
  375. {
  376. {'default:clay_brick 8', {'default:shovel_stone', 'default:coal_lump 2'}},
  377. {'default:brick 12', {'default:shovel_steel', 'default:coal_lump 12'}},
  378. {'stairs:stair_brick 8', {'default:shovel_stone', 'default:coal_lump 12'}},
  379. {'stairs:slab_brick 6', {'default:shovel_stone', 'default:coal_lump 3'}},
  380. },
  381. { 'Billy' },
  382. mobf_trader.VILLAGE_TRADER_TEXTURES
  383. );
  384. -- someone has to color the wool
  385. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  386. 'dyemaker',
  387. 'dyemaker',
  388. {
  389. {'wool:red 4', {'wool:white 4', 'flowers:rose'}},
  390. {'wool:yellow 4', {'wool:white 4', 'flowers:dandelion_yellow'}},
  391. {'wool:green 4', {'wool:white 4', 'default:cactus'}},
  392. {'wool:dark_green 4', {'wool:white 4', 'default:cactus', 'default:coal_lump'}},
  393. {'wool:cyan 4', {'wool:white 4', 'flowers:geranium'}},
  394. {'wool:blue 4', {'wool:white 4', 'flowers:geranium'}},
  395. {'wool:magenta 4', {'wool:white 4', 'flowers:tulip'}},
  396. {'wool:orange 4', {'wool:white 4', 'flowers:tulip'}},
  397. {'wool:violet 4', {'wool:white 4', 'flowers:viola'}},
  398. {'wool:brown 4', {'wool:white 4', 'default:junglewood 4'}},
  399. {'wool:pink 4', {'wool:white 4', 'flowers:rose'}},
  400. {'wool:grey 4', {'wool:white 4', 'default:coal_lump'}},
  401. {'wool:dark_grey 4', {'wool:white 4', 'default:coal_lump 2'}},
  402. {'wool:black 4', {'wool:white 4', 'default:coal_lump 3'}},
  403. },
  404. { 'Fabian' },
  405. mobf_trader.VILLAGE_TRADER_TEXTURES
  406. );
  407. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  408. 'dyemaker, specialized in large quantities',
  409. 'dyemakerl',
  410. {
  411. {'wool:red 24', {'wool:white 24', 'flowers:rose 2', 'cottages:tub'}},
  412. {'wool:yellow 24', {'wool:white 24', 'flowers:dandelion_yellow 2', 'cottages:tub'}},
  413. {'wool:green 24', {'wool:white 24', 'default:cactus 2', 'cottages:tub'}},
  414. {'wool:dark_green 24', {'wool:white 24', 'default:cactus', 'default:coal_lump 2', 'cottages:tub'}},
  415. {'wool:cyan 24', {'wool:white 24', 'flowers:geranium 2', 'cottages:tub'}},
  416. {'wool:blue 24', {'wool:white 24', 'flowers:geranium 2', 'cottages:tub'}},
  417. {'wool:magenta 24', {'wool:white 24', 'flowers:tulip 2', 'cottages:tub'}},
  418. {'wool:orange 24', {'wool:white 24', 'flowers:tulip 2', 'cottages:tub'}},
  419. {'wool:violet 24', {'wool:white 24', 'flowers:viola 2', 'cottages:tub'}},
  420. {'wool:brown 24', {'wool:white 24', 'default:junglewood 8', 'cottages:tub'}},
  421. {'wool:pink 24', {'wool:white 24', 'flowers:rose 2', 'cottages:tub'}},
  422. {'wool:grey 24', {'wool:white 24', 'default:coal_lump 2', 'cottages:tub'}},
  423. {'wool:dark_grey 24', {'wool:white 24', 'default:coal_lump 4', 'cottages:tub'}},
  424. {'wool:black 24', {'wool:white 24', 'default:coal_lump 6', 'cottages:tub'}},
  425. },
  426. { 'Friedrich' },
  427. mobf_trader.VILLAGE_TRADER_TEXTURES
  428. );
  429. -- there is the clay trader who also sells glass; however, for the medieval villages, an extra trader is more practical
  430. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  431. 'glassmaker',
  432. 'glassmaker',
  433. {
  434. {'default:glass 2', {'default:sand 1', 'default:coal_lump 3'}},
  435. {'default:glass 12', {'default:sand 5', 'default:coal_lump 9', 'default:shovel_stone'}},
  436. {'default:glass 48', {'default:sand 19', 'default:coal_lump 30', 'default:shovel_steel'}},
  437. {'default:obsidian_glass 2', {'default:obsidian_shard 2', 'default:wood 2'}},
  438. {'default:obsidian_glass 12', {'default:obsidian', 'default:coal_lump 6', 'default:shovel_stone'}},
  439. {'default:obsidian_glass 48', {'default:obsidian 4', 'default:coal_lump 30','default:shovel_steel', 'default:pick_steel'}},
  440. {'cottages:glass_pane 12', {'default:sand 2', 'default:coal_lump 1'}},
  441. {'vessels:glass_bottle', {'default:sand', 'default:wood 1'}},
  442. {'vessels:drinking_glass 2', {'default:sand', 'default:wood 1'}},
  443. },
  444. { 'Peter', 'Paul' },
  445. mobf_trader.VILLAGE_TRADER_TEXTURES
  446. );
  447. -- charachoal burners (=Koehler) used to be located outside villages
  448. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  449. 'characoal burner',
  450. 'charachoal',
  451. {
  452. {'default:coal_lump', 'default:tree 2', 'default:apple'},
  453. {'default:coal_lump 12', 'default:tree 16', 'default:apple 12'},
  454. {'default:coal_lump 19', 'default:tree 25', 'farming:bread 2', 'default:apple 19', 'bucket:bucket_empty'},
  455. {'default:coalblock', 'default:tree 12', 'farming:bread 1', 'default:apple 9'},
  456. {'default:coalblock 9', 'default:tree 99', 'farming:bread 8'},
  457. },
  458. { 'Christian', 'Rauchi' },
  459. mobf_trader.VILLAGE_TRADER_TEXTURES
  460. );
  461. -- someone has to color the wool
  462. mobf_trader.village_jobs = {
  463. forge = {'blacksmith', 'bronzesmith'},
  464. farm_tiny = { 'stonemason', 'stoneminer', 'carpenter', 'toolmaker', 'doormaker', 'furnituremaker', 'stairmaker', 'cooper', 'wheelwright', 'saddler', 'roofer',
  465. 'iceman', 'potterer', 'dyemaker', 'dyemakerl', 'glassmaker'},
  466. -- -- candidates for independent buildings
  467. -- 'stonemason', 'iceman', 'potterer', 'dyemaker', 'glassmaker'
  468. mill = {'miller'},
  469. bakery = {'baker'},
  470. school = {'teacher'},
  471. outside = {'charachoal'}, -- plus lumberjacks and miners
  472. };
  473. -- TODO: innkeeper - sell drinks, food and beds for restoring health?
  474. -- TODO: fisher
  475. -- animalmaterials: feather, milk, eggs -> something for the females
  476. -- loam, reet - can be produced by all villagers
  477. -- TODO: apple
  478. -- TODO: gold stuff; mese, diamond
  479. -- TODO nicht sinnvoll: schuster, tuchmacher (evtl. wollhaendler?), weber (auch wolle?), schneider (auch wolle?), maler, barbiere,
  480. -- TODO sinnvoll: fischer, schlachter, gerber, schaefer, tuermer (eher in stadt/burg), bader?, spielleute
  481. -- TODO: jaeger, waechter
  482. -- TODO: fahrender haendler
  483. -- TODO: bei den villages auch ab und an nur mal einen wagen hinstellen
  484. -- TODO: neben wagen auch backhaus, wachturm, fischerhuette/loeschteich, kohlenmeiler