yzzn2009
发表于 2014-1-18 23:57
笑佛--弥勒佛 发表于 2014-1-18 23:46 static/image/common/back.gif
为啥曼拉草不能改这样
曼德拉草有几种状态,如种在地上、采下等,都需要插入设定尺寸语句
yzzn2009
发表于 2014-1-19 00:02
43880757 发表于 2014-1-18 23:52 static/image/common/back.gif
电动斧子 17版游戏更改后,声音是有,但是没效果啊,荧光果也有,没有自动使用荧光果,是版本问题吗?还是 ...
不排除是版本的问题,17版实在是太老了。正常是身上有荧光果时,装备黄金斧子,会扣一个荧光果,同时发出机器的声音,碰到树就会自动砍倒
loliy01
发表于 2014-1-19 01:44
yzzn2009 发表于 2014-1-18 20:44 static/image/common/back.gif
更新预告:二00.饥饿的儿童(不时有儿童向你乞讨,施舍黄金后离开,否则跟随你并在夜晚饿死,89685版及以 ...
好可怜……感觉易宁哥快把游戏弄成高端大气上档次的家园游戏了~哈哈哈
loliy01
发表于 2014-1-19 02:17
本帖最后由 loliy01 于 2014-1-19 02:21 编辑
易宁哥,我今晚有反复测试了一下优化的红胡子脚本,可是。。。还是不显示人物。。。{:3_91:}
yzzn2009
发表于 2014-1-19 02:57
本帖最后由 yzzn2009 于 2014-1-19 03:11 编辑
loliy01 发表于 2014-1-19 02:17 static/image/common/back.gif
易宁哥,我今晚有反复测试了一下优化的红胡子脚本,可是。。。还是不显示人物。。。
...
我又优化了一下,按这个版本改,再试试
一九九.红胡子强盗团(强盗团通过冒险之门入侵,烧杀抢掠,打死强盗可得黄金、武器,89685版及以后游戏使用)
1.用记事本打开游戏目录\data\scripts\prefabs\forest.lua文件,在"puppet_wes",的下一行插入"puppet_woodie",
2.用记事本打开游戏目录\data\scripts\prefabs\adventure_portal.lua文件,在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()
for k = 1,math.random(15,25) do
local pt1 = bandit:GetPosition()
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 pt2 = bandit:GetPosition()
local weapons = {"goldenaxe","spear","tentaclespike","batbat","ruins_bat"}
local weapon = weapons
SpawnPrefab(weapon).Transform:SetPosition(pt2.x, 0, pt2.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())
3.用记事本打开游戏目录\data\scripts\prefabs\beardhair.lua文件,在Asset("ANIM", "anim/beardhair.zip"),的下一行插入以下内容:
Asset("ANIM", "anim/woodie.zip"),
Asset("SOUND", "sound/woodie.fsb"),
4.在inst:AddComponent("inspectable")的下一行插入以下内容:
local names = {"swap_goldenaxe","swap_spear","swap_spike","swap_batbat","swap_ruins_bat"}
local weapon = names
local items = { SWORD = weapon }
local function EquipItem(inst, item)
if item then
inst.AnimState:OverrideSymbol("swap_object", item, item)
inst.AnimState:Show("ARM_carry")
inst.AnimState:Hide("ARM_normal")
end
end
inst.items = items
inst.equipfn = EquipItem
EquipItem(inst)
local function onsave(inst, data)
if inst:HasTag("bandits") then
data.bandits = true
end
end
local function onload(inst, data)
if data and data.bandits then
inst.AnimState:SetBank("wilson")
inst.AnimState:SetBuild("woodie")
inst.AnimState:OverrideSymbol("swap_hat", "hat_feather", "swap_hat")
inst.AnimState:OverrideSymbol("swap_body", "armor_slurper", "swap_body")
inst.AnimState:Show("HAT")
inst.AnimState:Show("HAT_HAIR")
inst.AnimState:Hide("HAIR_NOHAT")
inst.AnimState:Hide("HAIR")
inst.AnimState:Hide("ARM_carry")
inst.AnimState:Show("ARM_normal")
inst.AnimState:PlayAnimation("idle")
local sound = inst.entity:AddSoundEmitter()
local shadow = inst.entity:AddDynamicShadow()
shadow:SetSize( 1.3, .6 )
inst.Transform:SetFourFaced()
local brain = require "brains/frogbrain"
inst:SetBrain(brain)
inst:AddComponent("locomotor")
inst.components.locomotor.walkspeed = 5
inst.components.locomotor.runspeed = 10
inst:SetStateGraph("SGshadowwaxwell")
MakeCharacterPhysics(inst, 75, .5)
inst:RemoveComponent("inventoryitem")
inst:RemoveComponent("stackable")
inst:RemoveComponent("fuel")
inst:RemoveComponent("burnable")
inst:RemoveComponent("propagator")
inst:AddComponent("inventory")
inst:AddComponent("thief")
inst:AddComponent("knownlocations")
inst:AddComponent("health")
inst.components.health:SetMaxHealth(1500)
inst:ListenForEvent("death", function()
for k = 1,math.random(15,25) do
local pt1 = inst:GetPosition()
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 pt2 = inst:GetPosition()
local weapons = {"goldenaxe","spear","tentaclespike","batbat","ruins_bat"}
local weapon = weapons
SpawnPrefab(weapon).Transform:SetPosition(pt2.x, 0, pt2.z)
end
end )
inst:AddComponent("combat")
inst.components.combat:SetDefaultDamage(20)
inst.components.combat:SetAttackPeriod(1)
inst.components.combat:SetRetargetFunction(2, function(inst)
if not inst.components.health:IsDead() then
return FindEntity(inst, 20, function(guy)
return inst.components.combat:CanTarget(guy) and not guy:HasTag("bandits")
end )
end
end )
inst.components.combat.onhitotherfn = function(inst, other, damage) inst.components.thief:StealItem(other) end
inst:ListenForEvent("attacked", function(inst, data)
inst.components.combat:SetTarget(data.attacker)
inst.components.combat:ShareTarget(data.attacker, 30, function(dude) return dude:HasTag("bandits") and not dude.components.health:IsDead() end, 5)
end )
inst.Physics:SetCollisionCallback(function(inst, other)
if other and other.components.workable and other.components.workable.workleft > 0 then
other.components.workable:Destroy(inst)
end
end)
inst:DoPeriodicTask(1, function(inst)
local pos = Vector3(inst.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(inst)
end
if v.components.crop then
v.components.crop:Harvest(inst)
end
end
end )
local minimap = inst.entity:AddMiniMapEntity()
minimap:SetIcon( "lucy_axe.png" )
inst:AddTag("monster")
inst:AddTag("bandits")
end
end
inst.OnSave = onsave
inst.OnLoad = onload
即可有红胡子强盗通过冒险之门入侵你的大陆(修改后第2天早晨出现),他们将盘踞在冒险之门附近,毁坏森林、拆毁建筑、抢掠农作物,所到之处没有活口。通过小地图可查询强盗所在位置,显示为红斧子图标。与强盗交战时,他们会抢掠你身上的物品,并且附近的强盗将一起来围攻你,蛮干无异于送死,争取各个击破吧。从此在冒险之门周围,白天和傍晚都是危险的,只有漆黑的夜里,才是你可以喘息之际。打死强盗可获得战利品(不菲的黄金和他们抢来的赃物),还有一定概率掉落武器。如果同时修改了“雇佣兵工厂”,你的铁甲战团终于有了用武之地。同胞们,饥荒世界正遭遇重大危机,亿万苍生期盼着你,起兵去攻打强盗吧,这是旷日持久的反抗,也是正义而光荣的战争,用你的每一滴鲜血去证明,新一代的救世主,从此诞生了
yzzn2009
发表于 2014-1-19 03:31
loliy01 发表于 2014-1-19 02:17 static/image/common/back.gif
易宁哥,我今晚有反复测试了一下优化的红胡子脚本,可是。。。还是不显示人物。。。
...
用温蒂开档,也可以正常显示
无语。。。
发表于 2014-1-19 08:39
宁哥,那个饥饿的儿童为什么给他的是10个金块?而不是食物?
中猥杜
发表于 2014-1-19 11:47
宁哥 求解如何扩大物品栏边框 能具体说下嘛?
yzzn2009
发表于 2014-1-19 13:00
中猥杜 发表于 2014-1-19 11:47 static/image/common/back.gif
宁哥 求解如何扩大物品栏边框 能具体说下嘛?
物品栏边框是一张底纹图片,用记事本打开游戏目录\data\scripts\widgets\inventorybar.lua文件,其中有一句self.bg:SetScale(1.15,1,1)是设定物品栏底纹图片大小的,括号里的1.15是宽度,比如改成2就更宽;第2个数字1是高度,比如改成2就是2倍高度;第3个数字1是纵深,不用管。这是89685版的方法,之后版本没有测试过,不排除官方又改动过,使该方法失效
yzzn2009
发表于 2014-1-19 13:08
无语。。。 发表于 2014-1-19 08:39 static/image/common/back.gif
宁哥,那个饥饿的儿童为什么给他的是10个金块?而不是食物?
因为我们已经有太多赚黄金的方法了,所以设计初衷是消化过剩的黄金,同时又唤起同情心,让已经衣食无忧的玩家,不要忘记在这冰冷的世界,还有许多人在挨饿。施舍设定为黄金,可以让孩子除了购买食物以外,还可以看病(或给弟弟妹妹看病)、买衣服穿等等
loliy01
发表于 2014-1-19 14:15
易宁哥,我试了优化的,还是不行。
loliy01
发表于 2014-1-19 14:28
1.用记事本打开游戏目录\data\scripts\prefabs\forest.lua文件,在"puppet_wes",的下一行插入"puppet_woodie",
易宁哥,我刚重新又试了一次,可能是以上的这个修改的地方,我插入的下一行前面没有加上和上行一样的空白。我把空白加上以后,人物就出来了,不过我今晚会在测试一次。
jiong3683
发表于 2014-1-19 14:51
你能让挖坟,地震时掉点别的东西吗???
无语。。。
发表于 2014-1-19 16:49
为什么我每次叫大军打强盗,都快解决了,突然就警告,每一次都是,时间不定,反正很容易出现警告,我都不敢去打强盗了
jiong3683
发表于 2014-1-19 17:19
开吸地牛的时候死了,然后。。。。。。。。。卡了。
yzzn2009
发表于 2014-1-19 19:08
无语。。。 发表于 2014-1-19 16:49 static/image/common/back.gif
为什么我每次叫大军打强盗,都快解决了,突然就警告,每一次都是,时间不定,反正很容易出现警告,我都不敢 ...
方便发一张报错截图
yzzn2009
发表于 2014-1-19 19:14
jiong3683 发表于 2014-1-19 17:19 static/image/common/back.gif
开吸地牛的时候死了,然后。。。。。。。。。卡了。
是跳出吗,方便发一张报错界面的截图
yzzn2009
发表于 2014-1-20 00:37
本帖最后由 yzzn2009 于 2014-1-20 02:02 编辑
更新预告:一九一.找矿蜗牛(用蜗牛龟盔甲种找矿蜗牛,为你勘探新石矿)
用蜗牛龟盔甲种找矿蜗牛,鼠标左键点蜗牛,可将其放入物品栏(显示为蜗牛龟盔甲的图标)。在空旷的地上放下找矿蜗牛,它会为你勘探出新的石矿,石头从此成为可再生资源。找矿蜗牛只会专注于找矿,不会跟随你,别把它弄丢了,如果真找不到了,存档退出后再读档,它会出现在你身边。不想要找矿蜗牛时,在物品栏中对其按鼠标右键即可。蜗牛龟盔甲可在地下一层打蜗牛龟时获得,如果修改了“巨型超市”,也可以花9-11个黄金购买
无语。。。
发表于 2014-1-20 08:15
yzzn2009 发表于 2014-1-20 00:37 static/image/common/back.gif
更新预告:一九一.找矿蜗牛(用蜗牛龟盔甲种找矿蜗牛,为你勘探新石矿)
宁哥,为什么不让蜗牛在地图上显示?
无语。。。
发表于 2014-1-20 08:51
本帖最后由 无语。。。 于 2014-1-20 08:53 编辑
yzzn2009 发表于 2014-1-19 19:08 static/image/common/back.gif
方便发一张报错截图
少年童真无知时
发表于 2014-1-20 09:25
之前3dm怎么了,怎么上不了啊~
B珊姐姐
发表于 2014-1-20 11:27
昨天很兴奋花了大半天时间去改了很多....结果.....一打开游戏直接跳出了......因为一下子改了太多所以找不出是哪个的问题= =、没有人有这种情况的吗?
另外,刚刚重头改了前面一部分,试了一下,进游戏一捡东西就弹出警告。
警告内容:(因为不知道怎么传图,就直接手打了..)
.../data/scripts/widgets/itemtile.lua:93:attempttocallmethod'HasSpoilage'(anilvalue)
LUAERROR satck traceback:
.../data/scripts/widgets/itemtile.lua(93,1)infunction'_ctor'
.../data/scripts/class.lua(28,1)infunction'ItemTile'
.../data/scripts/widgets/inventorybar.lua(828,1)infunction'OnItemGet'
.../data/scripts/widgets/inventorybar.lua(78,1)infunction'fn'
.../data/scripts/entityscript.lua(634,1)infunction'PushEvent'
.../data/scripts/components/inventory.lua(537,1)infunction'GiveItem'
.../data/scripts/components/pickable.lua(315,1)infunction'Pick'
.../data/scripts/actions.lua(421,1)infunction'fn'
这貌似是二十九.全部物品无限使用的问题?求解。
无语。。。
发表于 2014-1-20 11:49
B珊姐姐 发表于 2014-1-20 11:27 static/image/common/back.gif
昨天很兴奋花了大半天时间去改了很多....结果.....一打开游戏直接跳出了......因为一下子改了太多所以 ...
你的版本是22的?如果是你试一试吧物品无限使用的还原
无语。。。
发表于 2014-1-20 11:51
我刚才不小心弄了一个玄武岩,弄不掉怎么办,改了玄武岩可以烧掉还是没有用
B珊姐姐
发表于 2014-1-20 12:07
无语。。。 发表于 2014-1-20 11:49 static/image/common/back.gif
你的版本是22的?如果是你试一试吧物品无限使用的还原
不行啊(#°Д°) ....
算了,我放弃了( ̄△ ̄;),重装好了,不改了{:3_123:}
费力不讨好的东西{:3_122:}
yzzn2009
发表于 2014-1-20 12:17
无语。。。 发表于 2014-1-20 08:51 static/image/common/back.gif
出错的不是“红胡子强盗团”,而是“蜘蛛座骑”的语句,我又测试了一遍骑着蜘蛛打强盗,没有出现问题,貌似是修改语句插入不全,或没删干净导致的
yzzn2009
发表于 2014-1-20 12:21
本帖最后由 yzzn2009 于 2014-1-20 12:34 编辑
B珊姐姐 发表于 2014-1-20 11:27 static/image/common/back.gif
昨天很兴奋花了大半天时间去改了很多....结果.....一打开游戏直接跳出了......因为一下子改了太多所以 ...
是“全部物品无限使用”的语句跳出,不排除使用非89685版游戏导致,或语句没有替换准确,如果是后者,就重新修改一遍。你刚接触修改,很多地方不熟悉,一定要备份好原文件
yzzn2009
发表于 2014-1-20 12:29
无语。。。 发表于 2014-1-20 11:51 static/image/common/back.gif
我刚才不小心弄了一个玄武岩,弄不掉怎么办,改了玄武岩可以烧掉还是没有用 ...
玄武岩可烧掉
用记事本打开游戏目录\data\scripts\prefabs\basalt.lua文件,在inst:AddComponent("inspectable")的下一行插入MakeMediumBurnable(inst)
yzzn2009
发表于 2014-1-20 12:32
无语。。。 发表于 2014-1-20 08:15 static/image/common/back.gif
宁哥,为什么不让蜗牛在地图上显示?
可以在地图上显示,但石矿的图标容易挡住蜗牛,还是不好找到,所以昨晚又加了个读档找人的功能
yzzn2009
发表于 2014-1-20 12:33
少年童真无知时 发表于 2014-1-20 09:25 static/image/common/back.gif
之前3dm怎么了,怎么上不了啊~
好像正在整改,什么时候恢复还不清楚