正在加载

饥荒代码有哪些-饥荒代码指令大全

时间:2026-02-14 来源:信息源下载 作者:佚名

饥荒代码主要用于调试、速通、创意建造或克服卡关难题。很多玩家想知道饥荒代码有哪些,所以下面小编为大家带来了饥荒代码指令大全,包含了多种效果指令,让你的游戏更加简单,一起来看看吧!

\

饥荒代码大全

一、基础功能代码

开启控制台

游戏中按 <kbd>~</kbd> 键(Tab键上方)调出控制台窗口,首次使用需在设置中启用开发者模式。

常用指令

上帝模式:c_godmode()(无敌状态)

解锁全制造:GetPlayer().components.builder:GiveAllRecipes()(无需材料直接建造)

全地图显示:分两次输入:

minimap = TheSim:FindFirstEntityWithTag("minimap")

minimap.MiniMap:ShowArea(0,0,0,10000)

删除目标物体:TheInput:GetWorldEntityUnderMouse():Remove()

传送至坐标:GetPlayer().Transform:SetPosition(X,Y,Z)(例:SetPosition(100,0,200))

\

二、物品生成代码

格式:c_give("物品代码", 数量)(物品进背包)或 c_spawn("物品代码", 数量)(物品放鼠标位置)。

常用物品代码:

类别物品示例代码

材料木头、金子、石头log, goldnugget, rocks

工具/武器斧头、长矛、提灯axe, spear, lantern

防具木盔甲、暗影盔甲armorwood, armor_sanity

食物肉、鱼、浆果meat, fish, berries

特殊物品重生护符、火焰法杖amulet, firestaff

完整物品代码表:

材料类:割草 cutgrass、树枝 twigs、噩梦燃料 nightmarefuel

装备类:矿工帽 minerhat、眼球伞 eyebrellahat

生物掉落:巨鹿眼球 deerclops_eyeball、蜘蛛丝 silk

三、角色状态修改

生命值:

GetPlayer().components.health:SetMaxHealth(500) -- 上限

GetPlayer().components.health:SetCurrentHealth(500) -- 当前值

饥饿值:

GetPlayer().components.hunger:SetMax(500) -- 上限

GetPlayer().components.hunger:SetCurrent(500) -- 当前值

精神值:

GetPlayer().components.sanity:SetMax(500) -- 上限

GetPlayer().components.sanity:SetCurrent(500) -- 当前值

移动速度:GetPlayer().components.locomotor:SetExternalSpeedMultiplier(GetPlayer(), "speedboost", 2)(2倍速)

伤害倍数:GetPlayer().components.combat.damagemultiplier = 5(5倍伤害)

四、世界环境控制

时间与季节

跳至下一时段:TheWorld:PushEvent("ms_nextphase")

强制夏季:TheWorld:PushEvent("ms_setseason", "summer")(可换为winter/spring/autumn)

天气控制

开始下雨:TheWorld:PushEvent("ms_forceprecipitation")

停止下雨:TheWorld:PushEvent("ms_forceprecipitation", false)

生物生成

生成巨鹿:c_spawn("deerclops")

生成蜻蜓龙:c_spawn("dragonfly")

以上就是小编为大家带来的饥荒代码介绍了,希望对大家带来帮助!

手游排行榜

  • 最新排行
  • 最热排行
  • 评分最高