1692532967
发表于 2014-2-22 11:06
吃东西不生病怎么改
e死了
发表于 2014-2-22 11:41
yzzn2009 发表于 2014-2-20 20:22 static/image/common/back.gif
不排除是游戏版本差异造成的,如果想最大程度地体验修改效果,最好使用3DM的11月15日版(89685版),我用 ...
在哪里下载???我找了半天没有啊。。刚发现了一个是89685版的但是不是3dm的。。。在哪里下载3dm的??
az8720255
发表于 2014-2-22 11:46
Lz 能不能把建墙的距离修改一下现在的距离太近了= =建一个把人物弹开就建歪了{:3_95:}
坏人家里必丧
发表于 2014-2-22 13:12
让易宁哥休息下吧
yzzn2009
发表于 2014-2-22 13:25
e死了 发表于 2014-2-22 09:36 static/image/common/back.gif
我的是在饥荒游戏吧下的3dm22版的。。为什吗看不到种出来的鲜果龙树和小花坛?? ...
官方一直拆东墙补西墙,不排除89685版之后的版本将一些基础技术语句作废了,我用的是这个版本http://bbs.3dmgame.com/thread-3793161-1-1.html,可以正确显示
yzzn2009
发表于 2014-2-22 13:27
1692532967 发表于 2014-2-22 11:06 static/image/common/back.gif
吃东西不生病怎么改
将“小病小灾”代码中的inst.components.eater:SetOnEatFn(OnEat)替换为--inst.components.eater:SetOnEatFn(OnEat)
1750820466
发表于 2014-2-22 13:29
、恋☆Smile 发表于 2014-2-20 17:28 static/image/common/back.gif
是这样啊,谢谢。
再请问这句话是变身不会掉物品还是吃肉变身
都是(凑字)
1750820466
发表于 2014-2-22 13:31
yzzn2009 发表于 2014-2-22 13:25 static/image/common/back.gif
官方一直拆东墙补西墙,不排除89685版之后的版本将一些基础技术语句作废了,我用的是这个版本http://bbs. ...
中文还是英文(英文就算了)有中文的一定要通知我哦
1750820466
发表于 2014-2-22 14:31
能不能做个吸金石(类似懒人护符,不过只吸矿石)懒人护符老捡到其他东西,而且范围也大
无语。。。
发表于 2014-2-22 15:17
本帖最后由 无语。。。 于 2014-2-22 15:20 编辑
1692532967 发表于 2014-2-22 11:06 static/image/common/back.gif
吃东西不生病怎么改
{:3_90:}宁哥你一整天大部分时间都在制作?
az8720255
发表于 2014-2-22 15:42
宁哥鲜龙果树为什么是一个没着火的石头火坑啊是不是和哪项冲突了{:3_125:}
yzzn2009
发表于 2014-2-22 16:08
无语。。。 发表于 2014-2-22 15:17 static/image/common/back.gif
宁哥你一整天大部分时间都在制作?
还要看股票
yzzn2009
发表于 2014-2-22 16:09
az8720255 发表于 2014-2-22 15:42 static/image/common/back.gif
宁哥鲜龙果树为什么是一个没着火的石头火坑啊是不是和哪项冲突了 ...
做好使用89685版,见6248楼
yzzn2009
发表于 2014-2-22 16:12
1750820466 发表于 2014-2-22 14:31 static/image/common/back.gif
能不能做个吸金石(类似懒人护符,不过只吸矿石)懒人护符老捡到其他东西,而且范围也大 ...
只吸矿石功能太单一了,做出来估计很少会有人使用
刹~那一瞬间↑
发表于 2014-2-22 16:18
呼……我回来了……
坑爹坑娘坑奶奶
发表于 2014-2-22 17:20
口袋蜂箱被我改成了口袋猪舍,能力是一样的。经测试口袋猪舍在包里显示猪舍图标,放在地上也是一个小猪舍,地图上显示也是一个猪舍。可是我把他放在任何要打的怪中,猪舍灯一亮,就警告了。。恳求宁哥帮我瞅瞅是哪里出了错。。
用记事本打开游戏目录\data\scripts\prefabs\nightmarefuel.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local pigsounds =
{
takeoff = "dontstarve/pig/pigman_takeoff",
attack = "dontstarve/pig/pigman_attack",
buzz = "dontstarve/pig/pigman_fly_LP",
hit = "dontstarve/pig/pigman_hurt",
death = "dontstarve/pig/pigman_death",
}
local function OnDeploy (inst, pt)
if GetPlayer().components.inventory:Has("goldnugget", 500) then
GetPlayer().components.inventory:ConsumeByName("goldnugget", 500)
local box = SpawnPrefab("nightmarefuel")
box.Transform:SetPosition(pt.x, pt.y, pt.z)
box.AnimState:SetBank("pig_house")
box.AnimState:SetBuild("pig_house")
box.AnimState:PlayAnimation("idle")
box.AnimState:SetMultColour(255/255,0/255,0/255,1)
box.Transform:SetScale(5, 5, 5)
local sound = box.entity:AddSoundEmitter()
local minimap = box.entity:AddMiniMapEntity()
minimap:SetIcon( "pighouse.png" )
box.components.inventoryitem:ChangeImageName("pighouse")
box:RemoveComponent("stackable")
box:RemoveComponent("fuel")
box:RemoveComponent("deployable")
box:AddComponent("workable")
box.components.workable:SetWorkAction(ACTIONS.HAMMER)
box.components.workable:SetWorkLeft(3)
box.components.workable:SetOnFinishCallback(function(box)
SpawnPrefab("collapse_small").Transform:SetPosition(box.Transform:GetWorldPosition())
box.SoundEmitter:PlaySound("dontstarve/common/destroy_wood")
box:Remove()
end )
box.task = box:DoPeriodicTask(2, function(box)
box.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
box:DoTaskInTime(1, function() box.AnimState:SetBloomEffectHandle("") end )
local pos = Vector3(box.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 30)
for k,v in pairs(ents) do
if v.components.health and not v.components.health:IsDead() and not v:HasTag("player") then
if v.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == v or v:HasTag("monster") or v.prefab == "beefalo" or v.prefab == "pigguard" or v.prefab == "merm" or v.prefab == "monkey" or v.prefab == "tallbird" or v.prefab == "walrus" or v.prefab == "little_walrus" or v.prefab == "wasphive" then
local pt1 = box:GetPosition()
local pigman = SpawnPrefab("nightmarefuel")
pigman.Transform:SetPosition(pt1.x, pt1.y, pt1.z)
pigman.AnimState:SetBank("pigman")
pigman.AnimState:SetBuild("pig_angry_build")
pigman.AnimState:PlayAnimation("idle")
pigman.AnimState:SetRayTestOnBB(true)
pigman.AnimState:SetMultColour(255/255,255/255,255/255,1)
pigman.entity:AddSoundEmitter()
pigman.entity:AddLightWatcher()
pigman.entity:AddDynamicShadow()
pigman.DynamicShadow:SetSize( .8, .5 )
pigman.Transform:SetFourFaced()
MakeCharacterPhysics(pigman, 1, .3)
pigman.Physics:SetCollisionGroup(COLLISION.FLYERS)
pigman.Physics:ClearCollisionMask()
pigman.Physics:CollidesWith(COLLISION.WORLD)
pigman.Physics:CollidesWith(COLLISION.FLYERS)
pigman:AddTag("pigman")
pigman:AddComponent("locomotor")
pigman.components.locomotor:EnableGroundSpeedMultiplier(false)
pigman.components.locomotor:SetTriggersPig(false)
pigman:SetStateGraph("SGpig")
pigman:AddComponent("health")
pigman.components.health:SetMaxHealth(200)
pigman:AddComponent("combat")
pigman.components.combat:SetTarget(v)
pigman.components.combat:SetDefaultDamage(20)
pigman.components.combat:SetAttackPeriod(0.1)
pigman.components.combat.hiteffectsymbol = "body"
pigman.components.combat:SetRetargetFunction(1, function(killerbee)
if not pigman.components.health:IsDead() then
return FindEntity(box, 30, function(guy)
if guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") then
return guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy or guy:HasTag("monster") or guy.prefab == "beefalo" or guy.prefab == "pigguard" or guy.prefab == "merm" or guy.prefab == "monkey" or guy.prefab == "tallbird" or guy.prefab == "walrus" or guy.prefab == "little_walrus" or guy.prefab == "wasphive"
end
end)
end
end )
local pigbrain = require("brains/pigbrain")
pigman:SetBrain(pigbrain)
pigman.sounds = pigsounds
pigman:AddComponent("knownlocations")
pigman:ListenForEvent("attacked", function(pigman, data) pigman.components.combat:SetTarget(data.attacker) end )
pigman:RemoveComponent("stackable")
pigman:RemoveComponent("fuel")
pigman:RemoveComponent("deployable")
pigman:RemoveComponent("inventoryitem")
pigman:DoTaskInTime(30, function() pigman:Remove() end )
v:ListenForEvent("death", function() pigman:Remove() end )
end
end
end
end )
box.components.inventoryitem:SetOnPutInInventoryFn(function(box)
box:RemoveTag("doings")
if box.task then box.task:Cancel() box.task = nil end
local pos = Vector3(box.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 3000)
for k,v in pairs(ents) do
if v:HasTag("pigman") then
v:Remove()
end
end
end )
box.components.inventoryitem:SetOnDroppedFn(function(box)
box:AddTag("doings")
box.task = box:DoPeriodicTask(2, function(box)
box.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
box:DoTaskInTime(1, function() box.AnimState:SetBloomEffectHandle("") end )
local pos = Vector3(box.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 30)
for k,v in pairs(ents) do
if v.components.health and not v.components.health:IsDead() and not v:HasTag("player") then
if v.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == v or v:HasTag("monster") or v.prefab == "beefalo" or v.prefab == "pigguard" or v.prefab == "merm" or v.prefab == "monkey" or v.prefab == "tallbird" or v.prefab == "walrus" or v.prefab == "little_walrus" or v.prefab == "wasphive" then
local pt1 = box:GetPosition()
local pigman = SpawnPrefab("nightmarefuel")
pigman.Transform:SetPosition(pt1.x, pt1.y, pt1.z)
pigman.AnimState:SetBank("pigman")
pigman.AnimState:SetBuild("pig_angry_build")
pigman.AnimState:PlayAnimation("idle")
pigman.AnimState:SetRayTestOnBB(true)
pigman.AnimState:SetMultColour(255/255,255/255,255/255,1)
pigman.entity:AddSoundEmitter()
pigman.entity:AddLightWatcher()
pigman.entity:AddDynamicShadow()
pigman.DynamicShadow:SetSize( .8, .5 )
pigman.Transform:SetFourFaced()
MakeCharacterPhysics(pigman, 1, .3)
pigman.Physics:SetCollisionGroup(COLLISION.FLYERS)
pigman.Physics:ClearCollisionMask()
pigman.Physics:CollidesWith(COLLISION.WORLD)
pigman.Physics:CollidesWith(COLLISION.FLYERS)
pigman:AddTag("pigman")
pigman:AddComponent("locomotor")
pigman.components.locomotor:EnableGroundSpeedMultiplier(false)
pigman.components.locomotor:SetTriggersPig(false)
pigman:SetStateGraph("SGpig")
pigman:AddComponent("health")
pigman.components.health:SetMaxHealth(200)
pigman:AddComponent("combat")
pigman.components.combat:SetTarget(v)
pigman.components.combat:SetDefaultDamage(20)
pigman.components.combat:SetAttackPeriod(0.1)
pigman.components.combat.hiteffectsymbol = "body"
pigman.components.combat:SetRetargetFunction(1, function(pigman)
if not pigman.components.health:IsDead() then
return FindEntity(box, 30, function(guy)
if guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") then
return guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy or guy:HasTag("monster") or guy.prefab == "beefalo" or guy.prefab == "pigguard" or guy.prefab == "merm" or guy.prefab == "monkey" or guy.prefab == "tallbird" or guy.prefab == "walrus" or guy.prefab == "little_walrus" or guy.prefab == "wasphive"
end
end)
end
end )
local pigbrain = require("brains/pigbrain")
pigman:SetBrain(pigbrain)
pigman.sounds = pigsounds
pigman:AddComponent("knownlocations")
pigman:ListenForEvent("attacked", function(pigman, data) pigman.components.combat:SetTarget(data.attacker) end )
pigman:RemoveComponent("stackable")
pigman:RemoveComponent("fuel")
pigman:RemoveComponent("deployable")
pigman:RemoveComponent("inventoryitem")
pigman:DoTaskInTime(30, function() pigman:Remove() end )
v:ListenForEvent("death", function() pigman:Remove() end )
end
end
end
end )
end )
box:AddTag("doings")
box:AddTag("boxs")
end
inst.components.stackable:Get():Remove()
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
local function onsave(inst, data)
if inst:HasTag("boxs") then
data.boxs = true
end
if inst:HasTag("doings") then
data.doings = true
end
if inst:HasTag("pigman") then
data.pigman = true
end
end
local function onload(inst, data)
if data and data.boxs then
inst.AnimState:SetBank("pig_house")
inst.AnimState:SetBuild("pig_house")
inst.AnimState:PlayAnimation("idle")
inst.AnimState:SetMultColour(255/255,0/255,0/255,1)
inst.Transform:SetScale(0.5, 0.5, 0.5)
local sound = inst.entity:AddSoundEmitter()
local minimap = inst.entity:AddMiniMapEntity()
minimap:SetIcon( "pighouse.png" )
inst.components.inventoryitem:ChangeImageName("pighouse")
inst:RemoveComponent("stackable")
inst:RemoveComponent("fuel")
inst:RemoveComponent("deployable")
inst:AddComponent("workable")
inst.components.workable:SetWorkAction(ACTIONS.HAMMER)
inst.components.workable:SetWorkLeft(3)
inst.components.workable:SetOnFinishCallback(function(inst)
SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
inst.SoundEmitter:PlaySound("dontstarve/common/destroy_wood")
inst:Remove()
end )
inst.components.inventoryitem:SetOnPutInInventoryFn(function(inst)
inst:RemoveTag("doings")
if inst.task then inst.task:Cancel() inst.task = nil end
local pos = Vector3(inst.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 3000)
for k,v in pairs(ents) do
if v:HasTag("pigman") then
v:Remove()
end
end
end )
inst.components.inventoryitem:SetOnDroppedFn(function(inst)
inst:AddTag("doings")
inst.task = inst:DoPeriodicTask(2, function(inst)
inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
inst:DoTaskInTime(1, function() inst.AnimState:SetBloomEffectHandle("") end )
local pos = Vector3(inst.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 30)
for k,v in pairs(ents) do
if v.components.health and not v.components.health:IsDead() and not v:HasTag("player") then
if v.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == v or v:HasTag("monster") or v.prefab == "beefalo" or v.prefab == "pigguard" or v.prefab == "merm" or v.prefab == "monkey" or v.prefab == "tallbird" or v.prefab == "walrus" or v.prefab == "little_walrus" or v.prefab == "wasphive" then
local pt1 = inst:GetPosition()
local pigman = SpawnPrefab("nightmarefuel")
pigman.Transform:SetPosition(pt1.x, pt1.y, pt1.z)
pigman.AnimState:SetBank("pigman")
pigman.AnimState:SetBuild("pig_angry_build")
pigman.AnimState:PlayAnimation("idle")
pigman.AnimState:SetRayTestOnBB(true)
pigman.AnimState:SetMultColour(255/255,255/255,255/255,1)
pigman.entity:AddSoundEmitter()
pigman.entity:AddLightWatcher()
pigman.entity:AddDynamicShadow()
pigman.DynamicShadow:SetSize( .8, .5 )
pigman.Transform:SetFourFaced()
MakeCharacterPhysics(pigman, 1, .3)
pigman.Physics:SetCollisionGroup(COLLISION.FLYERS)
pigman.Physics:ClearCollisionMask()
pigman.Physics:CollidesWith(COLLISION.WORLD)
pigman.Physics:CollidesWith(COLLISION.FLYERS)
pigman:AddTag("pigman")
pigman:AddComponent("locomotor")
pigman.components.locomotor:EnableGroundSpeedMultiplier(false)
pigman.components.locomotor:SetTriggersPig(false)
pigman:SetStateGraph("SGpig")
pigman:AddComponent("health")
pigman.components.health:SetMaxHealth(200)
pigman:AddComponent("combat")
pigman.components.combat:SetTarget(v)
pigman.components.combat:SetDefaultDamage(20)
pigman.components.combat:SetAttackPeriod(0.1)
pigman.components.combat.hiteffectsymbol = "body"
pigman.components.combat:SetRetargetFunction(1, function(pigman)
if not pigman.components.health:IsDead() then
return FindEntity(inst, 30, function(guy)
if guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") then
return guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy or guy:HasTag("monster") or guy.prefab == "beefalo" or guy.prefab == "pigguard" or guy.prefab == "merm" or guy.prefab == "monkey" or guy.prefab == "tallbird" or guy.prefab == "walrus" or guy.prefab == "little_walrus" or guy.prefab == "wasphive"
end
end)
end
end )
local pigbrain = require("brains/pigbrain")
pigman:SetBrain(pigbrain)
pigman.sounds = pigsounds
pigman:AddComponent("knownlocations")
pigman:ListenForEvent("attacked", function(pigman, data) pigman.components.combat:SetTarget(data.attacker) end )
pigman:RemoveComponent("stackable")
pigman:RemoveComponent("fuel")
pigman:RemoveComponent("deployable")
pigman:RemoveComponent("inventoryitem")
pigman:DoTaskInTime(30, function() pigman:Remove() end )
v:ListenForEvent("death", function() pigman:Remove() end )
end
end
end
end )
end )
inst:AddTag("boxs")
end
if data and data.doings then
inst.task = inst:DoPeriodicTask(2, function(inst)
inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh")
inst:DoTaskInTime(1, function() inst.AnimState:SetBloomEffectHandle("") end )
local pos = Vector3(inst.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 30)
for k,v in pairs(ents) do
if v.components.health and not v.components.health:IsDead() and not v:HasTag("player") then
if v.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == v or v:HasTag("monster") or v.prefab == "beefalo" or v.prefab == "pigguard" or v.prefab == "merm" or v.prefab == "monkey" or v.prefab == "tallbird" or v.prefab == "walrus" or v.prefab == "little_walrus" or v.prefab == "wasphive" then
local pt1 = inst:GetPosition()
local pigman = SpawnPrefab("nightmarefuel")
pigman.Transform:SetPosition(pt1.x, pt1.y, pt1.z)
pigman.AnimState:SetBank("pigman")
pigman.AnimState:SetBuild("pig_angry_build")
pigman.AnimState:PlayAnimation("idle")
pigman.AnimState:SetRayTestOnBB(true)
pigman.AnimState:SetMultColour(255/255,255/255,255/255,1)
pigman.entity:AddSoundEmitter()
pigman.entity:AddLightWatcher()
pigman.entity:AddDynamicShadow()
pigman.DynamicShadow:SetSize( .8, .5 )
pigman.Transform:SetFourFaced()
MakeCharacterPhysics(pigman, 1, .3)
pigman.Physics:SetCollisionGroup(COLLISION.FLYERS)
pigman.Physics:ClearCollisionMask()
pigman.Physics:CollidesWith(COLLISION.WORLD)
pigman.Physics:CollidesWith(COLLISION.FLYERS)
pigman:AddTag("pigman")
pigman:AddComponent("locomotor")
pigman.components.locomotor:EnableGroundSpeedMultiplier(false)
pigman.components.locomotor:SetTriggersPig(false)
pigman:SetStateGraph("SGpig")
pigman:AddComponent("health")
pigman.components.health:SetMaxHealth(200)
pigman:AddComponent("combat")
pigman.components.combat:SetTarget(v)
pigman.components.combat:SetDefaultDamage(20)
pigman.components.combat:SetAttackPeriod(0.1)
pigman.components.combat.hiteffectsymbol = "body"
pigman.components.combat:SetRetargetFunction(1, function(pigman)
if not pigman.components.health:IsDead() then
return FindEntity(inst, 30, function(guy)
if guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") then
return guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy or guy:HasTag("monster") or guy.prefab == "beefalo" or guy.prefab == "pigguard" or guy.prefab == "merm" or guy.prefab == "monkey" or guy.prefab == "tallbird" or guy.prefab == "walrus" or guy.prefab == "little_walrus" or guy.prefab == "wasphive"
end
end)
end
end )
local pigbrain = require("brains/pigbrain")
pigman:SetBrain(pigbrain)
pigman.sounds = pigsounds
pigman:AddComponent("knownlocations")
pigman:ListenForEvent("attacked", function(pigman, data) pigman.components.combat:SetTarget(data.attacker) end )
pigman:RemoveComponent("stackable")
pigman:RemoveComponent("fuel")
pigman:RemoveComponent("deployable")
pigman:RemoveComponent("inventoryitem")
pigman:DoTaskInTime(30, function() pigman:Remove() end )
v:ListenForEvent("death", function() pigman:Remove() end )
end
end
end
end )
inst:AddTag("doings")
end
if data and data.pigman then
inst:Remove()
end
end
inst.OnSave = onsave
inst.OnLoad = onload
佟志伟
发表于 2014-2-22 18:50
宁哥,为什么我口袋猴子活捉的鸟什么的,不能拿出来就只能放在背包里看着,在背包里面点一下准备拿出来就消失了,,消失了,,
1750820466
发表于 2014-2-22 18:56
我的红胡子海盗团,每次到冒险之门旁边的时候,让他们打几下,就自动跳出(没有警告)你看看哪里错了
forest.lua
local assets =
{
Asset("IMAGE", "images/colour_cubes/day05_cc.tex"),
Asset("IMAGE", "images/colour_cubes/dusk03_cc.tex"),
Asset("IMAGE", "images/colour_cubes/night03_cc.tex"),
Asset("IMAGE", "images/colour_cubes/snow_cc.tex"),
Asset("IMAGE", "images/colour_cubes/snowdusk_cc.tex"),
Asset("IMAGE", "images/colour_cubes/night04_cc.tex"),
Asset("IMAGE", "images/colour_cubes/insane_day_cc.tex"),
Asset("IMAGE", "images/colour_cubes/insane_dusk_cc.tex"),
Asset("IMAGE", "images/colour_cubes/insane_night_cc.tex"),
Asset("ANIM", "anim/snow.zip"),
Asset("ANIM", "anim/lightning.zip"),
Asset("ANIM", "anim/splash_ocean.zip"),
Asset("ANIM", "anim/frozen.zip"),
Asset("SOUND", "sound/forest_stream.fsb"),
Asset("IMAGE", "levels/textures/snow.tex"),
Asset("IMAGE", "images/wave.tex"),
}
local forest_prefabs =
{
"world",
"adventure_portal",
"resurrectionstone",
"deerclops",
"gravestone",
"flower",
"animal_track",
"dirtpile",
"beefaloherd",
"beefalo",
"penguinherd",
"penguin_ice",
"penguin",
"koalefant_summer",
"koalefant_winter",
"beehive",
"wasphive",
"walrus_camp",
"pighead",
"mermhead",
"rabbithole",
"carrot_planted",
"tentacle",
"wormhole",
"cave_entrance",
"teleportato_base",
"teleportato_ring",
"teleportato_box",
"teleportato_crank",
"teleportato_potato",
"pond",
"marsh_tree",
"marsh_bush",
"reeds",
"mist",
"snow",
"rain",
"maxwellthrone",
"maxwellendgame",
"maxwelllight",
"maxwelllock",
"maxwellphonograph",
"puppet_wilson",
"puppet_willow",
"puppet_wendy",
"puppet_wickerbottom",
"puppet_wolfgang",
"puppet_wx78",
"puppet_wes",
"puppet_woodie",
"marblepillar",
"marbletree",
"statueharp",
"statuemaxwell",
"eyeplant",
"lureplant",
"purpleamulet",
"monkey",
"livingtree",
}
local function fn(Sim)
local inst = SpawnPrefab("world")
inst.prefab = "forest"
inst.entity:SetCanSleep(false)
--add waves
local waves = inst.entity:AddWaveComponent()
waves:SetRegionSize( 40, 20 )
waves:SetRegionNumWaves( 6 )
waves:SetWaveTexture( "images/wave.tex" )
-- See source\game\components\WaveRegion.h
waves:SetWaveEffect( "shaders/waves.ksh" ) -- texture.ksh
--waves:SetWaveEffect( "shaders/texture.ksh" ) --
waves:SetWaveSize( 2048, 512 )
inst:AddComponent("clock")
inst:AddComponent("seasonmanager")
inst:AddComponent("birdspawner")
inst:AddComponent("butterflyspawner")
inst:AddComponent("hounded")
inst:AddComponent("basehassler")
inst:AddComponent("hunter")
inst.components.butterflyspawner:SetButterfly("butterfly")
inst:AddComponent("frograin")
inst:AddComponent("lureplantspawner")
inst:AddComponent("penguinspawner")
inst:AddComponent("colourcubemanager")
inst.Map:SetOverlayTexture( "levels/textures/snow.tex" )
return inst
end
return Prefab( "forest", fn, assets, forest_prefabs)
adventure_portal.lua
local BigPopupDialogScreen = require "screens/bigpopupdialog"
local assets=
{
Asset("ANIM", "anim/portal_adventure.zip"),
}
local function GetVerb(inst)
return STRINGS.ACTIONS.ACTIVATE.GENERIC
end
local function OnActivate(inst)
--do popup confirmation
--do portal presentation
--save and do restart
ProfileStatsSet("portal_used", true)
SetPause(true,"portal")
local function startadventure()
local function onsaved()
StartNextInstance({reset_action=RESET_ACTION.LOAD_SLOT, save_slot = SaveGameIndex:GetCurrentSaveSlot()}, true)
end
TheFrontEnd:PopScreen()
SetPause(false)
GetPlayer().sg:GoToState("teleportato_teleport")
ProfileStatsSet("portal_accepted", true)
GetPlayer():DoTaskInTime(5, function() SaveGameIndex:StartAdventure(onsaved) end)
end
local function rejectadventure()
TheFrontEnd:PopScreen()
SetPause(false)
inst.components.activatable.inactive = true
ProfileStatsSet("portal_rejected", true)
end
-- A/B test
local bodytext = GetTestGroup() == 0 and STRINGS.UI.STARTADVENTURE.BODY or STRINGS.UI.STARTADVENTURE.BODY_TEST
TheFrontEnd:PushScreen(BigPopupDialogScreen(STRINGS.UI.STARTADVENTURE.TITLE, bodytext,
{{text=STRINGS.UI.STARTADVENTURE.YES, cb = startadventure},
{text=STRINGS.UI.STARTADVENTURE.NO, cb = rejectadventure}}))
end
local function fn(Sim)
local inst = CreateEntity()
local trans = inst.entity:AddTransform()
local anim = inst.entity:AddAnimState()
inst.entity:AddSoundEmitter()
MakeObstaclePhysics(inst, 1)
local minimap = inst.entity:AddMiniMapEntity()
minimap:SetIcon( "portal.png" )
anim:SetBank("portal_adventure")
anim:SetBuild("portal_adventure")
anim:PlayAnimation("idle_off", true)
inst:AddComponent("inspectable")
local function createbandit(inst)
for k = 1,math.random(20,35) do
local pt = inst:GetPosition()
local bandit = SpawnPrefab("beardhair")
bandit.Transform:SetPosition(pt.x+(math.random(50)-math.random(50)), 0, pt.z+(math.random(50)-math.random(50)))
bandit.AnimState:SetBank("wilson")
bandit.AnimState:SetBuild("woodie")
bandit.AnimState:OverrideSymbol("swap_hat", "hat_feather", "swap_hat")
bandit.AnimState:OverrideSymbol("swap_body", "armor_slurper", "swap_body")
bandit.AnimState:Show("HAT")
bandit.AnimState:Show("HAT_HAIR")
bandit.AnimState:Hide("HAIR_NOHAT")
bandit.AnimState:Hide("HAIR")
bandit.AnimState:Hide("ARM_carry")
bandit.AnimState:Show("ARM_normal")
bandit.AnimState:PlayAnimation("idle")
local sound = bandit.entity:AddSoundEmitter()
local shadow = bandit.entity:AddDynamicShadow()
shadow:SetSize( 1.3, .6 )
bandit.Transform:SetFourFaced()
local brain = require "brains/frogbrain"
bandit:SetBrain(brain)
bandit:AddComponent("locomotor")
bandit.components.locomotor.walkspeed = 5
bandit.components.locomotor.runspeed = 10
bandit:SetStateGraph("SGshadowwaxwell")
MakeCharacterPhysics(bandit, 75, .5)
bandit:RemoveComponent("inventoryitem")
bandit:RemoveComponent("stackable")
bandit:RemoveComponent("fuel")
bandit:RemoveComponent("burnable")
bandit:RemoveComponent("propagator")
bandit:AddComponent("inventory")
bandit:AddComponent("thief")
bandit:AddComponent("knownlocations")
bandit:AddComponent("health")
bandit.components.health:SetMaxHealth(1500)
bandit:ListenForEvent("death", function()
local pt1 = bandit:GetPosition()
for k = 1,math.random(15,25) do
local gold = SpawnPrefab("goldnugget")
gold.Transform:SetPosition(pt1.x+(math.random(3)-math.random(3)), 0, pt1.z+(math.random(3)-math.random(3)))
end
if math.random() < 0.1 then
local weapons = {"goldenaxe","spear","tentaclespike","batbat","ruins_bat"}
local weapon = weapons
SpawnPrefab(weapon).Transform:SetPosition(pt1.x, 0, pt1.z)
end
end )
bandit:AddComponent("combat")
bandit.components.combat:SetDefaultDamage(20)
bandit.components.combat:SetAttackPeriod(1)
bandit.components.combat:SetRetargetFunction(2, function(bandit)
if not bandit.components.health:IsDead() then
return FindEntity(bandit, 20, function(guy)
return bandit.components.combat:CanTarget(guy) and not guy:HasTag("bandits")
end )
end
end )
bandit.components.combat.onhitotherfn = function(bandit, other, damage) bandit.components.thief:StealItem(other) end
bandit:ListenForEvent("attacked", function(bandit, data)
bandit.components.combat:SetTarget(data.attacker)
bandit.components.combat:ShareTarget(data.attacker, 30, function(dude) return dude:HasTag("bandits") and not dude.components.health:IsDead() end, 5)
end )
bandit.Physics:SetCollisionCallback(function(bandit, other)
if other and other.components.workable and other.components.workable.workleft > 0 then
other.components.workable:Destroy(bandit)
end
end)
bandit:DoPeriodicTask(1, function(bandit)
local pos = Vector3(bandit.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 3)
for k,v in pairs(ents) do
if v.components.pickable and v.components.pickable:CanBePicked() then
v.components.pickable:Pick(bandit)
end
if v.components.crop then
v.components.crop:Harvest(bandit)
end
end
end )
local minimap = bandit.entity:AddMiniMapEntity()
minimap:SetIcon( "lucy_axe.png" )
bandit:AddTag("monster")
bandit:AddTag("bandits")
end
end
local function delbandit(inst)
local range = 3000
local pos = Vector3(inst.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range)
for k,v in pairs(ents) do
if v:HasTag("bandits") then
v:Remove()
end
end
end
inst:ListenForEvent( "daytime", function() createbandit(inst) end , GetWorld())
inst:ListenForEvent( "nighttime", function() delbandit(inst) end , GetWorld())
inst.components.inspectable:RecordViews()
inst:AddComponent("playerprox")
inst.components.playerprox:SetDist(4,5)
inst.components.playerprox.onnear = function()
inst.AnimState:PushAnimation("activate", false)
inst.AnimState:PushAnimation("idle_loop_on", true)
inst.SoundEmitter:PlaySound("dontstarve/common/maxwellportal_activate")
inst.SoundEmitter:PlaySound("dontstarve/common/maxwellportal_idle", "idle")
inst:DoTaskInTime(1, function()
if inst.ragtime_playing == nil then
inst.ragtime_playing = true
inst.SoundEmitter:PlaySound("dontstarve/common/teleportato/ragtime", "ragtime")
else
inst.SoundEmitter:SetVolume("ragtime",1)
end
end)
end
inst.components.playerprox.onfar = function()
inst.AnimState:PushAnimation("deactivate", false)
inst.AnimState:PushAnimation("idle_off", true)
inst.SoundEmitter:KillSound("idle")
inst.SoundEmitter:PlaySound("dontstarve/common/maxwellportal_shutdown")
inst:DoTaskInTime(1, function()
inst.SoundEmitter:SetVolume("ragtime",0)
end)
end
inst:AddComponent("activatable")
inst.components.activatable.OnActivate = OnActivate
inst.components.activatable.inactive = true
inst.components.activatable.getverb = GetVerb
inst.components.activatable.quickaction = true
return inst
end
return Prefab( "common/adventure_portal", fn, assets)
1750820466
发表于 2014-2-22 19:02
yzzn2009 发表于 2014-2-22 16:12 static/image/common/back.gif
只吸矿石功能太单一了,做出来估计很少会有人使用
或者改良一下,做成炼金室(用保温石种炼金室)点击点一下他获得一个金子,反正保温石也没什么用,已经有“温暖之国”了,还要他干嘛
1750820466
发表于 2014-2-22 19:07
yzzn2009 发表于 2014-2-22 00:44 static/image/common/back.gif
闲话两句:角斗场
那么,怎样改主角的攻击节奏(或者角斗场的另一个人的攻击节奏)
yzzn2009
发表于 2014-2-22 19:39
佟志伟 发表于 2014-2-22 18:50 static/image/common/back.gif
宁哥,为什么我口袋猴子活捉的鸟什么的,不能拿出来就只能放在背包里看着,在背包里面点一下准备拿出来就消 ...
我用89685版没有出现问题,可以正常拿出来,是否与版本差异有关
yzzn2009
发表于 2014-2-22 19:44
1750820466 发表于 2014-2-22 18:56 static/image/common/back.gif
我的红胡子海盗团,每次到冒险之门旁边的时候,让他们打几下,就自动跳出(没有警告)你看看哪里错了
fore& ...
显示的是乱码,看不清。如果你用的是89685版,可以用我修改好的“红胡子强盗团”文件,解压缩后复制到游戏目录
yzzn2009
发表于 2014-2-22 19:48
1750820466 发表于 2014-2-22 19:07 static/image/common/back.gif
那么,怎样改主角的攻击节奏(或者角斗场的另一个人的攻击节奏)
保温石已经用来做“传送石”了,“角斗场”对手攻击节奏的语句为warrior0.components.combat:SetAttackPeriod(2),其中数字2改小则攻击加快
yzzn2009
发表于 2014-2-22 19:55
坑爹坑娘坑奶奶 发表于 2014-2-22 17:20 static/image/common/back.gif
口袋蜂箱被我改成了口袋猪舍,能力是一样的。经测试口袋猪舍在包里显示猪舍图标,放在地上也是一个小猪舍, ...
改错比自己写还费时间,粗略看,主要是模型、贴图、播放动画名称有问题(包含SetBank、SetBuild、AnimStatelayAnimation的语句),并且一些标签貌似也与游戏自带标签重复了
佟志伟
发表于 2014-2-22 20:23
yzzn2009 发表于 2014-2-22 19:39 static/image/common/back.gif
我用89685版没有出现问题,可以正常拿出来,是否与版本差异有关
哦哦,我用的是90423版的,有办法解决么,宁哥。
yzzn2009
发表于 2014-2-22 22:10
本帖最后由 yzzn2009 于 2014-2-22 22:13 编辑
佟志伟 发表于 2014-2-22 20:23 static/image/common/back.gif
哦哦,我用的是90423版的,有办法解决么,宁哥。
90423版和89685版在游戏物品等方面没有任何不同,都是22版,只是官方一直在小修小补,但往往捅出更多bug,如果你不想用89685版,只能暂时先不修改“鲜果龙树”等几项,我一直在等官方DLC出来,或许游戏版本又会有变化,一些被禁用的技术或许会开解,到时修改技巧会针对新版本作全面兼容优化
水銀YUKI
发表于 2014-2-23 07:34
有木有办法让地图里没有鸟! 小电配置低种多了蜘蛛巢玩久了小鸟一出现就卡,想让鸟永远不来了~~鸟带来的种子每次看到还老手贱总要捡,如果看不到就不会捡了 哈哈哈
1750820466
发表于 2014-2-23 08:37
yzzn2009 发表于 2014-2-22 19:44 static/image/common/back.gif
显示的是乱码,看不清。如果你用的是89685版,可以用我修改好的“红胡子强盗团”文件,解压缩后复制到游 ...
我是22版
1750820466
发表于 2014-2-23 08:39
yzzn2009 发表于 2014-2-22 19:48 static/image/common/back.gif
保温石已经用来做“传送石”了,“角斗场”对手攻击节奏的语句为warrior0.components.combat:SetAttackPe ...
反正做个点它就会出来金子的撒
e死了
发表于 2014-2-23 10:22
宁哥。。。我修改的红胡子打不死而且只能看到地上的黑影子!!这是怎嘛回事?