RK007BBC
发表于 2013-11-6 21:17
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:18
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:22
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:23
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:24
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:24
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:24
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:25
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:25
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:26
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:27
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:27
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:27
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:28
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:28
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:42
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:42
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:43
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
RK007BBC
发表于 2013-11-6 21:45
顶顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶
yzzn2009
发表于 2013-11-6 21:52
Mue战天。 发表于 2013-11-6 21:07 static/image/common/back.gif
我修改了,出现错误,而且我认真看过n次,还是修改错误,我用的版本是22版 ...
我应该找到问题所在了,方便按下面的再改一下,期待你的测试结果,十分感谢
一八三.高压电避难所(按加号键筑一圈带高压电的玄武岩墙,按减号键消失)
1.用记事本打开游戏目录\data\scripts\prefabs\basalt.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnExplode(inst, target)
if target and not target:HasTag("smallbird") and not target:HasTag("chester") then
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(target.Transform:GetWorldPosition())
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
target.components.health:DoDelta(-3000)
end
inst:DoTaskInTime(.1, function() inst.components.mine:Reset() end )
end
inst:AddComponent("mine")
inst.components.mine:SetRadius(4)
inst.components.mine:SetAlignment("player")
inst.components.mine:SetOnExplodeFn(OnExplode)
inst.components.mine:Reset()
2.用记事本打开游戏目录\data\scripts\prefabs\player_common.lua文件,在inst:AddComponent("catcher")的下一行插入以下内容:
local function basalt(inst)
local player = GetPlayer()
local pt = Vector3(player.Transform:GetWorldPosition())
for k = 1, 50 do
local theta = 1 * 2 * PI
local radius = 8
local result_offset = FindValidPositionByFan(theta, radius, 50, function(offset)
local x,y,z = (pt + offset):Get()
local ents = TheSim:FindEntities(x,y,z , 1)
return not next(ents)
end)
if result_offset then
local tentacle = SpawnPrefab("basalt_pillar")
tentacle.Transform:SetPosition((pt + result_offset):Get())
GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.2, 0.02, .25, 40)
local fx = SpawnPrefab("lightning_rod_fx")
local pos = pt + result_offset
fx.Transform:SetPosition(pos.x, pos.y, pos.z)
end
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
end
end
function sleepfn(inst)
local player = GetPlayer()
local range = 15
local pos = Vector3(player.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range)
for k,v in pairs(ents) do
if v.prefab == "basalt_pillar" then
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(v.Transform:GetWorldPosition())
v:Remove()
end
end
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
return true
end
TheInput:AddKeyUpHandler(KEY_KP_PLUS, function() basalt(inst) end )
TheInput:AddKeyUpHandler(KEY_KP_MINUS, function() sleepfn(inst) end )
即可按小键盘加号键,在主角周围筑起一圈带高压电的玄武岩墙,怪物靠近会被电死,按小键盘减号键自动消失。注意不要离怪物太近时按加号键,会把怪物也圈进来或使墙有缺口
靚仔
发表于 2013-11-6 22:01
本帖最后由 靚仔 于 2013-11-6 22:02 编辑
yzzn2009 发表于 2013-11-6 21:52 static/image/common/back.gif
我应该找到问题所在了,方便按下面的再改一下,期待你的测试结果,十分感谢
一八三.高压电避难所(按加 ...
还是不行啊,闪退了
yzzn2009
发表于 2013-11-6 22:30
本帖最后由 yzzn2009 于 2013-11-6 23:55 编辑
靚仔 发表于 2013-11-6 22:01 static/image/common/back.gif
还是不行啊,闪退了
之前有问题的版本,是因为修改过“收割者”才可以用,没修改就有问题。这个是修复的版本,在完全无修改的游戏和修改很多项的游戏上都试了,都可以运行啊。方便替换回原文件后,再修改一次,如果还不行,说明兼容性不好,我就准备撤下这条了
yzzn2009
发表于 2013-11-7 01:06
本帖最后由 yzzn2009 于 2013-11-7 13:06 编辑
十分抱歉
今天新加的“高压电避难所”出现了兼容性问题,在我本地能够使用,但许多人提出修改出错。经过分批替换比对,终于发现了问题所在,只有之前修改过“收割者”才能正常使用,而没有修改过“收割者”则会读档闪退。我修改了fn的名称,使用游戏原文件中曾出现的fn,修复这个问题,拜托几个人帮助测试,还没有得到足够反馈。目前在我本地游戏中,无论未修改过的纯净版本,还是修改了过百项的版本,都能够正常使用了,也希望能听到更多的好消息。想想今天在修复前,已经有一百多人下载过,是我的测试不够严谨,才给大家带来了困扰,心里非常内疚,在这里说声抱歉。希望你们原谅我的失误,一如既往地支持我们的修改技巧,让它能继续完善,带给更多人快乐,谢谢!
易宁
2013年11月7日
后续情况通报,已经得到个别反馈,问题已修复。我再次优化了“高压电避难所”,彻底避开了fn的问题,已经发在7日更新的修改技巧中,如果原来的版本你不能用,请使用优化过的最新版本
yzzn2009
发表于 2013-11-7 04:32
“一八三.高压电避难所(按加号键筑一圈带高压电的玄武岩墙,按减号键消失)”通过调参数,可以圈起更大的空间
Mue战天。
发表于 2013-11-7 12:29
yzzn2009 发表于 2013-11-7 04:32
“一八三.高压电避难所(按加号键筑一圈带高压电的玄武岩墙,按减号键消失)”通过调参数,可以圈起更大的 ...
老兄,把你修改这一项的文件发过来,给我替换试试吧!
Mue战天。
发表于 2013-11-7 12:32
yzzn2009 发表于 2013-11-6 21:13
是什么反应呢,是进不去游戏,还是读档闪退,还是进游戏后按加号跳出?是否挂载mod?方便请卸载mod再试试
...
是读档时闪退,还没试过关闭mod,我会去试试的,
yzzn2009
发表于 2013-11-7 12:54
Mue战天。 发表于 2013-11-7 12:32 static/image/common/back.gif
是读档时闪退,还没试过关闭mod,我会去试试的,
给你个我刚优化的版本,你试试
一八三.高压电避难所(按加号键筑一圈带高压电的玄武岩墙,按减号键消失)
1.用记事本打开游戏目录\data\scripts\prefabs\basalt.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnExplode(inst, target)
if target and not target:HasTag("smallbird") and not target:HasTag("chester") then
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(target.Transform:GetWorldPosition())
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
target.components.health:DoDelta(-3000)
end
inst:DoTaskInTime(.1, function() inst.components.mine:Reset() end )
end
inst:AddComponent("mine")
inst.components.mine:SetRadius(4)
inst.components.mine:SetAlignment("player")
inst.components.mine:SetOnExplodeFn(OnExplode)
inst.components.mine:Reset()
2.用记事本打开游戏目录\data\scripts\prefabs\player_common.lua文件,在inst:AddComponent("catcher")的下一行插入以下内容:
TheInput:AddKeyUpHandler(KEY_KP_PLUS, function()
local player = GetPlayer()
local pt = Vector3(player.Transform:GetWorldPosition())
for k = 1, 50 do
local theta = 1 * 2 * PI
local radius = 8
local result_offset = FindValidPositionByFan(theta, radius, 50, function(offset)
local x,y,z = (pt + offset):Get()
local ents = TheSim:FindEntities(x,y,z , 1)
return not next(ents)
end)
if result_offset then
local tentacle = SpawnPrefab("basalt_pillar")
tentacle.Transform:SetPosition((pt + result_offset):Get())
GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.2, 0.02, .25, 40)
local fx = SpawnPrefab("lightning_rod_fx")
local pos = pt + result_offset
fx.Transform:SetPosition(pos.x, pos.y, pos.z)
end
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
end
end)
TheInput:AddKeyUpHandler(KEY_KP_MINUS, function()
local player = GetPlayer()
local range = 15
local pos = Vector3(player.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range)
for k,v in pairs(ents) do
if v.prefab == "basalt_pillar" then
SpawnPrefab("lightning_rod_fx").Transform:SetPosition(v.Transform:GetWorldPosition())
v:Remove()
end
end
inst.SoundEmitter:PlaySound("dontstarve/common/lightningrod")
end)
即可按小键盘加号键,在主角周围筑起一圈带高压电的玄武岩墙,怪物靠近会被电死,按小键盘减号键自动消失。注意不要离怪物太近时按加号键,会把怪物也圈进来或使墙有缺口。如果使用橙色魔杖或“瑞士手杖”(见本修改技巧),就可以自由出入各个避难所,把家具、农田放在里面,再也不怕狗和巨鹿了
pmjjay
发表于 2013-11-7 13:06
yzzn2009 发表于 2013-11-5 22:19 static/image/common/back.gif
挖坟只出齿轮
用记事本打开游戏目录\data\scripts\prefabs\mound.lua文件,将下列内容:
谢谢易宁大神{:3_94:}
顶顶13406283869
发表于 2013-11-7 13:10
求大神添加 地毯可保暖 我想要在冬天的时候在基地里不用穿寒冬衣服
Mue战天。
发表于 2013-11-7 13:16
谢谢大神,还是算了吧