游戏达人
![Rank: 7](static/image/common/star_level3.gif) ![Rank: 7](static/image/common/star_level2.gif) ![Rank: 7](static/image/common/star_level1.gif)
- 贡献度
- 80
- 金元
- 18912
- 积分
- 2221
- 精华
- 1
- 注册时间
- 2010-11-27
|
靚仔 发表于 2013-10-13 17:33 ![](static/image/common/back.gif)
能不能把最近的修改给我,我开了乱码,不用之前的,就最近的就可以了,谢谢
...
十.主角不怕火、无惧黑暗
用记事本打开游戏目录\data\scripts\prefabs\player_common.lua文件,将下列内容:
inst:AddComponent("grue")
inst.components.grue:SetSounds("dontstarve/charlie/warn","dontstarve/charlie/attack")
替换为:
--inst:AddComponent("grue")
--inst.components.grue:SetSounds("dontstarve/charlie/warn","dontstarve/charlie/attack")
inst.components.health.fire_damage_scale = 0
即可让主角不怕火、无惧黑暗
二十三.背包格子增大至39格
用记事本打开游戏目录\data\scripts\prefabs\backpack.lua文件,
1.将下列内容:
for y = 0, 3 do
table.insert(slotpos, Vector3(-162, -y*75 + 114 ,0))
table.insert(slotpos, Vector3(-162 +75, -y*75 + 114 ,0))
替换为:
for y = 0, 12 do
table.insert(slotpos, Vector3(-162, -y*75 + 435 ,0))
table.insert(slotpos, Vector3(-162 +75, -y*75 + 435 ,0))
table.insert(slotpos, Vector3(-162 +150, -y*75 + 435 ,0))
2.将下列内容:
inst.components.container.widgetanimbank = "ui_backpack_2x4"
inst.components.container.widgetanimbuild = "ui_backpack_2x4"
inst.components.container.widgetpos = Vector3(-5,-50,0)
替换为:
--inst.components.container.widgetanimbank = "ui_backpack_2x4"
--inst.components.container.widgetanimbuild = "ui_backpack_2x4"
inst.components.container.widgetpos = Vector3(-25,-50,0)
即可让普通背包格子增大至39格。增大背包格子以前有人发过类似修改,本不想再发,但要的人太多,只好加入修改技巧
七十八.蜂箱容量增加10倍(最多可采60个蜂蜜)
用记事本打开游戏目录\data\scripts\prefabs\beebox.lua文件,
1.将下列内容:
{ amount=6, idle="honey3", hit="hit_honey3" },
{ amount=3, idle="honey2", hit="hit_honey2" },
{ amount=1, idle="honey1", hit="hit_honey1" },
替换为:
{ amount=60, idle="honey3", hit="hit_honey3" },
{ amount=30, idle="honey2", hit="hit_honey2" },
{ amount=10, idle="honey1", hit="hit_honey1" },
2.将inst.components.harvestable:SetUp("honey", 6, nil, onharvest, updatelevel)替换为inst.components.harvestable:SetUp("honey", 60, nil, onharvest, updatelevel)
即可让蜂箱容量增加10倍,可减少照管的时间
八十.喂牛蔬菜无限产黄油
用记事本打开游戏目录\data\scripts\prefabs\beefalo.lua文件,在inst.components.eater:SetVegetarian()的下一行插入下列内容:
local function OnGetItemFromPlayer(inst, giver, item)
if item.components.edible.foodtype == "VEGGIE" then
SpawnPrefab("butter").Transform:SetPosition(inst.Transform:GetWorldPosition())
end
end
inst:AddComponent("trader")
inst.components.trader.onaccept = OnGetItemFromPlayer
即可喂牛胡罗卜、浆果等蔬菜无限产黄油,相当于挤牛奶吧
八十一.牛醒着也可剪牛毛
用记事本打开游戏目录\data\scripts\prefabs\beefalo文件,将下列内容:
inst.components.beard.canshavetest = function() if not inst.components.sleeper:IsAsleep() then return false, "AWAKEBEEFALO" end return true end
替换为:
inst.components.beard.canshavetest = function() if not inst.components.sleeper:IsAsleep() then return true, "AWAKEBEEFALO" end return true end
即可在牛醒着时也可剪牛毛
八十二.游牧生涯(带牛毛帽让牛群跟随,牛不集体攻击主角)
1.用记事本打开游戏目录\data\scripts\prefabs\hats.lua文件,将下列内容:
local function beefalo_equip(inst, owner)
onequip(inst, owner)
owner:AddTag("beefalo")
end
local function beefalo_unequip(inst, owner)
onunequip(inst, owner)
owner:RemoveTag("beefalo")
end
local function beefalo()
local inst = simple()
inst.components.equippable:SetOnEquip( beefalo_equip )
inst.components.equippable:SetOnUnequip( beefalo_unequip )
inst:AddComponent("insulator")
inst.components.insulator.insulation = TUNING.INSULATION_LARGE
inst:AddComponent("fueled")
inst.components.fueled.fueltype = "USAGE"
inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME)
inst.components.fueled:SetDepletedFn(generic_perish)
return inst
end
替换为以下内容:
local function beefalo_disable(inst)
if inst.updatetask then
inst.updatetask:Cancel()
inst.updatetask = nil
end
local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner
owner.components.leader:RemoveFollowersByTag("beefalo")
end
local function beefalo_update(inst)
local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner
if owner and owner.components.leader then
local x,y,z = owner.Transform:GetWorldPosition()
local ents = TheSim:FindEntities(x,y,z, TUNING.SPIDERHAT_RANGE, {"beefalo"})
for k,v in pairs(ents) do
if v.components.follower and not v.components.follower.leader and not owner.components.leader:IsFollower(v) and owner.components.leader.numfollowers < 50 then
owner.components.leader:AddFollower(v)
end
end
end
end
local function beefalo_enable(inst)
local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner
if owner and owner.components.leader then
end
inst.updatetask = inst:DoPeriodicTask(0.5, beefalo_update, 1)
end
local function beefalo_equip(inst, owner)
onequip(inst, owner)
beefalo_enable(inst)
owner:AddTag("beefalo")
end
local function beefalo_unequip(inst, owner)
onunequip(inst, owner)
beefalo_disable(inst)
owner:RemoveTag("beefalo")
end
local function beefalo_perish(inst)
beefalo_disable(inst)
inst:Remove()
end
local function beefalo()
local inst = simple()
inst.components.equippable:SetOnEquip( beefalo_equip )
inst.components.equippable:SetOnUnequip( beefalo_unequip )
inst.components.inventoryitem:SetOnDroppedFn( beefalo_disable )
inst:AddComponent("insulator")
inst.components.insulator.insulation = TUNING.INSULATION_LARGE
inst:AddComponent("fueled")
inst.components.fueled.fueltype = "USAGE"
inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME)
inst.components.fueled:SetDepletedFn(beefalo_perish)
return inst
end
2.用记事本打开游戏目录\data\scripts\prefabs\beefalo.lua文件,将return not guy:HasTag("beefalo") and替换为return not guy:HasTag("beefalo") and not guy:HasTag("player") and
3.将return dude:HasTag("beefalo") and not dude:HasTag("player") and not dude.components.health:IsDead()替换为return dude:HasTag("beefalo") and dude:HasTag("player") and not dude.components.health:IsDead()
4.将inst.components.locomotor.walkspeed = 1.5替换为inst.components.locomotor.walkspeed = 3
即可带牛毛帽让牛群跟随,杀牛它们不会集体反击,也提高了牛走路的速度。加上“牛产便便速度增加1倍”、“喂牛蔬菜无限产黄油”、“牛醒着也可剪牛毛”的修改(见本修改技巧),就可以烧着便便取暖,吃牛肉、黄油,经营自己的牛群吧
九十六.用硝石种麦斯威尔灯(靠近自动点燃、远离自动灭)
1.用记事本打开游戏目录\data\scripts\prefabs\nitre.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local maxwelllight = SpawnPrefab("maxwelllight")
if maxwelllight then
maxwelllight:PushEvent("growfromnitre")
maxwelllight.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\maxwelllight.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function onhammered(inst, worker)
SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("nitre").Transform:SetPosition(inst.Transform:GetWorldPosition())
inst:Remove()
end
inst:AddComponent("playerprox")
inst.components.playerprox:SetDist(17, 27 )
inst.components.playerprox:SetOnPlayerNear(function() if not inst.components.burnable:IsBurning() then inst.components.burnable:Ignite() end end)
inst.components.playerprox:SetOnPlayerFar(extinguish)
inst:AddComponent("workable")
inst.components.workable:SetWorkAction(ACTIONS.HAMMER)
inst.components.workable:SetWorkLeft(1)
inst.components.workable:SetOnFinishCallback(onhammered)
3.用记事本打开游戏目录\data\scripts\prefabs\maxwelllight_flame.lua文件,将下列内容:
{anim="level1", sound="dontstarve/common/maxlight", radius=1, intensity=.75, falloff= 1, colour = {207/255,234/255,245/255}, soundintensity=.1},
{anim="level2", sound="dontstarve/common/maxlight", radius=1.5, intensity=.8, falloff=.9, colour = {207/255,234/255,245/255}, soundintensity=.3},
{anim="level3", sound="dontstarve/common/maxlight", radius=2, intensity=.8, falloff=.8, colour = {207/255,234/255,245/255}, soundintensity=.6},
{anim="level4", sound="dontstarve/common/maxlight", radius=2.5, intensity=.9, falloff=.7, colour = {207/255,234/255,245/255}, soundintensity=1},
{anim="level1", sound="dontstarve/common/maxlight", radius=2, intensity=.75, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.1},
{anim="level2", sound="dontstarve/common/maxlight", radius=3, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.3},
{anim="level3", sound="dontstarve/common/maxlight", radius=4, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.6},
{anim="level4", sound="dontstarve/common/maxlight", radius=6, intensity=.9, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=1},
替换为
{anim="level1", sound="dontstarve/common/maxlight", radius=5, intensity=.75, falloff= 1, colour = {207/255,234/255,245/255}, soundintensity=.1},
{anim="level2", sound="dontstarve/common/maxlight", radius=7.5, intensity=.8, falloff=.9, colour = {207/255,234/255,245/255}, soundintensity=.3},
{anim="level3", sound="dontstarve/common/maxlight", radius=10, intensity=.8, falloff=.8, colour = {207/255,234/255,245/255}, soundintensity=.6},
{anim="level4", sound="dontstarve/common/maxlight", radius=12.5, intensity=.9, falloff=.7, colour = {207/255,234/255,245/255}, soundintensity=1},
{anim="level1", sound="dontstarve/common/maxlight", radius=10, intensity=.75, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.1},
{anim="level2", sound="dontstarve/common/maxlight", radius=15, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.3},
{anim="level3", sound="dontstarve/common/maxlight", radius=20, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.6},
{anim="level4", sound="dontstarve/common/maxlight", radius=30, intensity=.9, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=1},
即可用硝石种麦斯威尔灯,靠近自动点燃、远离自动灭,不想要时用锤子砸毁即可
一五三.光阴似箭(对指南针按右键跳到下个时段)
用记事本打开游戏目录\data\scripts\prefabs\compass.lua文件,在local function GetStatus(inst, viewer)的下一行插入GetClock():NextPhase()
即可对指南针按右键跳到下个时段,即白天变傍晚、傍晚变黑夜、黑夜变白天,采蘑菇、捉萤火虫等有时段要求的事情,无须再等待了
一六五.打地面蜘蛛巢掉3个蜘蛛卵
用记事本打开游戏目录\data\scripts\prefabs\spiderden.lua文件,
1.将inst.components.lootdropper:SetLoot({ "silk","silk"})替换为inst.components.lootdropper:SetLoot({ "silk","silk", "spidereggsack", "spidereggsack", "spidereggsack"})
2.将inst.components.lootdropper:SetLoot({ "silk","silk","silk","silk"})替换为inst.components.lootdropper:SetLoot({ "silk","silk","silk","silk", "spidereggsack", "spidereggsack", "spidereggsack"})
3.将inst.components.lootdropper:SetLoot({ "silk","silk","silk","silk","silk","silk", "spidereggsack"})替换为inst.components.lootdropper:SetLoot({ "silk","silk","silk","silk","silk","silk", "spidereggsack", "spidereggsack", "spidereggsack"})
即可无论打大、中、小三种地面蜘蛛巢都掉3个蜘蛛卵,游戏原来只有大蜘蛛巢才有1个蜘蛛卵,很容易让蜘蛛绝种
一八0.无限刷洞穴(用岩石种洞穴入口,用铲子可挖掉洞穴入口)
1.用记事本打开游戏目录\data\scripts\prefabs\inv_rocks.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
local cave_entrance = SpawnPrefab("cave_entrance")
if cave_entrance then
cave_entrance:PushEvent("growfrominv_rocks")
cave_entrance.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\cave_entrance.lua文件,将inst:RemoveComponent("workable")替换为以下内容:
local function dig_up(inst, chopper)
inst:Remove()
end
inst:AddComponent("workable")
inst.components.workable:SetWorkAction(ACTIONS.DIG)
inst.components.workable:SetOnFinishCallback(dig_up)
inst.components.workable:SetWorkLeft(1)
即可无限刷洞穴,在地面用岩石种洞穴入口将下到洞穴层,在洞穴层用岩石种洞穴入口将下到远古层,注意不要在远古层再种洞穴入口了。不需要该洞穴时,用铲子将洞口铲掉即可
|
|