游戏达人
- 贡献度
- 80
- 金元
- 18912
- 积分
- 2221
- 精华
- 1
- 注册时间
- 2010-11-27
|
靚仔 发表于 2013-11-5 21:58
把最近的更新发一下
九十一.养殖牛(用牛毛种小牛)
用记事本打开游戏目录\data\scripts\prefabs\beefalowool.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local babybeefalo = SpawnPrefab("babybeefalo")
if babybeefalo then
babybeefalo:PushEvent("growfrombeefalowool")
babybeefalo.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
即可用牛毛种小牛,人工繁育自己的牛群
九十二.养殖兔子(用兔子种兔子洞、兔子可堆叠)
用记事本打开游戏目录\data\scripts\prefabs\rabbit.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local rabbithole = SpawnPrefab("rabbithole")
if rabbithole then
rabbithole:PushEvent("growfromrabbit")
rabbithole.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
inst:AddComponent("stackable")
inst.components.stackable.maxsize = TUNING.STACK_SIZE_LARGEITEM
即可种兔子得兔子洞、兔子可堆叠
九十三.养殖火鸡(用鸡蛋种会下蛋且不用圈养的火鸡)
1.用记事本打开游戏目录\data\scripts\prefabs\egg.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local perd = SpawnPrefab("perd")
if perd then
perd:PushEvent("growfromegg")
perd.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
2.用记事本打开游戏目录\data\scripts\prefabs\perd.lua文件,在inst:AddComponent("inspectable")的下一行插入下列内容:
inst:AddComponent("periodicspawner")
inst.components.periodicspawner:SetPrefab("bird_egg")
inst.components.periodicspawner:SetRandomTimes(360, 480)
inst.components.periodicspawner:Start()
3.用记事本打开游戏目录\data\scripts\brains\perdbrain.lua文件,将下列内容:
WhileNode(function() return clock and not clock:IsDay() end, "IsNight",
DoAction(self.inst, GoHomeAction, "Go Home", true )),
DoAction(self.inst, EatFoodAction, "Eat Food"),
RunAway(self.inst, "scarytoprey", SEE_PLAYER_DIST, STOP_RUN_DIST),
DoAction(self.inst, PickBerriesAction, "Pick Berries", true),
Wander(self.inst, HomePos, MAX_WANDER_DIST),
替换为:
DoAction(self.inst, EatFoodAction, "Eat Food"),
RunAway(self.inst, "scarytoprey", SEE_PLAYER_DIST/2.5, STOP_RUN_DIST/3),
即可用鸡蛋种会下蛋且不用圈养的火鸡,火鸡不会乱跑,养在果树丛旁也不会消失,一天左右下一个蛋
一八五.杂货收购行(将帽子、料理、蜂蜜、猪皮、兔人尾巴卖给帐篷换黄金)
用记事本打开游戏目录\data\scripts\prefabs\tent.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function ShouldAcceptItem(inst, item)
if item:HasTag("hat") then
return true
end
if item:HasTag("preparedfood") and item.prefab ~= "wetgoop" then
return true
end
if item.prefab == "honey" then
return true
end
if item.prefab == "pigskin" then
return true
end
if item.prefab == "manrabbit_tail" then
return true
end
return false
end
local function OnGetItemFromPlayer(inst, giver, item)
local goldnugget = SpawnPrefab("goldnugget")
if item:HasTag("hat") then
for k = 1, 3 do
giver.components.inventory:GiveItem(goldnugget)
end
end
if item:HasTag("preparedfood") and item.prefab ~= "wetgoop" then
for k = 1, 5 do
giver.components.inventory:GiveItem(goldnugget)
end
end
if item.prefab == "honey" then
giver.components.inventory:GiveItem(goldnugget)
end
if item.prefab == "pigskin" then
giver.components.inventory:GiveItem(goldnugget)
end
if item.prefab == "manrabbit_tail" then
for k = 1, 2 do
giver.components.inventory:GiveItem(goldnugget)
end
end
end
inst:AddComponent("trader")
inst.components.trader.onaccept = OnGetItemFromPlayer
inst.components.trader:SetAcceptTest(ShouldAcceptItem)
即可将帽子、料理、蜂蜜、猪皮、兔人尾巴卖给帐篷换黄金(拿着物品对帐篷点鼠标左键),其中料理收购价5个黄金,帽子3个黄金,兔人尾巴2个黄金,猪皮、蜂蜜1个黄金,让饥荒世界多一个赚钱的途径。你也可以在“菜市场”、“肉食店”、“巨型超市”(见本修改技巧)买入食材,加工成料理后卖出,赚取手工费
一八六.收藏品黑市(在鱼人房买收藏品卖给猪王赚差价)
用记事本打开游戏目录\data\scripts\prefabs\mermhouse.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function ShouldAcceptItem(inst, item)
local player = GetPlayer()
if player.components.inventory:Has("goldnugget", 4) then
if item.prefab == "goldnugget" then
return true
end
end
return false
end
local function OnGetItemFromPlayer(inst, giver, item)
local names = {"trinket_1","trinket_2","trinket_3","trinket_4","trinket_5","trinket_6","trinket_7","trinket_8","trinket_9","trinket_10","trinket_11","trinket_12"}
inst.name = names[math.random(#names)]
local trinket = SpawnPrefab(inst.name)
if item.prefab == "goldnugget" then
giver.components.inventory:ConsumeByName("goldnugget", 3)
giver.components.inventory:GiveItem(trinket)
end
end
inst:AddComponent("trader")
inst.components.trader.onaccept = OnGetItemFromPlayer
inst.components.trader:SetAcceptTest(ShouldAcceptItem)
即可在鱼人房用黄金买入收藏品(拿着黄金对鱼人房点鼠标左键),4个黄金买1个,品种随机,收藏品会直接装进主角物品栏。拿到猪王那里卖出(拿着收藏品对猪王点鼠标左键),卖出价2-8个黄金(扔在地上),晚上猪王睡觉时不会交易。黑市交易有一定风险,会遭到流氓(鱼人)攻击,有些收藏品买卖会亏钱。身上黄金不足4个时无法买入
一八七.巨型超市(在主角制造栏中增加商店选项,用黄金买珍贵物品)
1.用记事本打开游戏目录\data\scripts\constants.lua文件,将ANCIENT = {str = "ANCIENT", sort = 10, icon = "tab_crafting_table.tex"}替换为以下内容:
ANCIENT = {str = "ANCIENT", sort = 10, icon = "tab_crafting_table.tex"},
SHOP = {str = "SHOP", sort = 11, icon = "tab_gemology.tex"}
2.用记事本打开游戏目录\data\scripts\strings.lua文件,在ANCIENT = "Ancient",的下一行插入SHOP = "Shop",
3.用记事本打开游戏目录\data\scripts\recipes.lua文件,将----GEMS----替换为以下内容:
----SHOP----
Recipe("nightmarefuel", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("livinglog", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("gears", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("marble", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("petals_evil", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("pigskin", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("silk", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("tentaclespots", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("tentaclespike", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("feather_crow", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("feather_robin", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("feather_robin_winter", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("stinger", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("honeycomb", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("butterflywings", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("houndstooth", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("horn", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("tallbirdegg", {Ingredient("goldnugget", 1+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("manrabbit_tail", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("slurper_pelt", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("poop", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("beardhair", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("mandrake", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("batwing", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("trunk_summer", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("trunk_winter", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("walrus_tusk", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("deerclops_eyeball", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("minotaurhorn", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("lightbulb", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("wormlight", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("lureplantbulb", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("fireflies", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("redgem", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("bluegem", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("orangegem", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("yellowgem", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("greengem", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("thulecite_pieces", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("red_cap", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("green_cap", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("blue_cap", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("monstermeat", {Ingredient("goldnugget", math.random(2))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("honey", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("butter", {Ingredient("goldnugget", math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("butterflymuffin", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("frogglebunwich", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("taffy", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("pumpkincookie", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("stuffedeggplant", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("fishsticks", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("honeynuggets", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("honeyham", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("dragonpie", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("kabobs", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("mandrakesoup", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("baconeggs", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("meatballs", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("bonestew", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("perogies", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("turkeydinner", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("ratatouille", {Ingredient("goldnugget", 1+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("jammypreserves", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("fruitmedley", {Ingredient("goldnugget", 1+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("fishtacos", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("waffles", {Ingredient("goldnugget", 5+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("unagi", {Ingredient("goldnugget", 1+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("krampus_sack", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("slurtlehat", {Ingredient("goldnugget", 3+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
Recipe("armorsnurtleshell", {Ingredient("goldnugget", 8+math.random(3))}, RECIPETABS.SHOP, TECH.NONE,nil,nil,true)
即可在主角制造栏中增加商店选项(制造栏最底下画着宝石戒指),用黄金购买珍贵物品,包括坎普斯背包、珍贵材料、料理等。每次读档后,超市价格都会有一定浮动,趁打折时多买一些吧。如果同时修改了“菜市场”、“肉食店”、“杂货收购行”、“收藏品黑市”(见本修改技巧),即可通过出售农产品、肉类、杂货、收藏品换取购物的黄金,形成饥荒世界完整的金钱交易体系
|
|