内容发布更新时间 : 2024/12/24 11:06:42星期一 下面是文章的全部内容请认真阅读。
[04:49:27]: isday false
[04:49:27]: remainingdaysinseason 6 [04:49:27]: isnight false [04:49:27]: isdusk true [04:49:27]: isspring true [04:49:27]: isautumn false [04:49:27]: issnowing false [04:49:27]: snowlevel 0
[04:49:27]: issnowcovered false [04:49:27]: autumnlength 20 [04:49:27]: phase dusk
[04:49:27]: temperature 38.151284629022 [04:49:27]: wetness 14.76150894165 [04:49:27]: pop 0.36728030875334 [04:49:27]: season spring [04:49:27]: israining false
[04:49:27]: time 0.79473068118095 [04:49:27]: cycles 49
[04:49:27]: precipitation none
[04:49:27]: timeinphase 0.95938441412789
[04:49:27]: \\\\================================================================== ===//
------------隐藏------------------- function c_makeinvisible()
---------------------------------- 作用未知
function c_selectnext(name) 以下应该是召唤boss 召唤鹿的马蹄声
function c_summondeerclops() 召唤熊德
function c_summonbearger() -------------聚集队员--------------- function c_gatherplayers()
local x,y,z = ConsoleWorldPosition():Get() for k,v in pairs(AllPlayers) do
v.Transform:SetPosition(x,y,z) end end
------------加速---------------- function c_speedup()
TheSim:SetTimeScale(TheSim:GetTimeScale() *10) print(\
10
end
-------------跳过多少天---------------------
function c_skip(num) num = num or 1
LongUpdate(TUNING.TOTAL_DAY_TIME * num) end
----------------投票----------------------- function c_togglevotekick() TheWorld.net.components.voter:ToggleVoteKick() end
---------------地面类型-------------------- function c_groundtype()
local index, table = ConsoleCommandPlayer():GetCurrentTileType() print(\
for k,v in pairs(table) do print(k,v) end end
-------------搜索---------------------- function c_searchprefabs(str)
例如
c_searchprefabs(\
[04:57:55]: ConsoleInput: \[04:57:55]: Found 10 matches: [04:57:55]: log
[04:57:55]: yellowgem
[04:57:55]: maxwellphonograph [04:57:55]: livinglog
[04:57:55]: glommerwings
[04:57:55]: deerclopswarning_lvl1 [04:57:55]: deerclopswarning_lvl4 [04:57:55]: deerclopswarning_lvl3 [04:57:55]: deerclopswarning_lvl2 [04:57:55]: teleportato_ring ---------------锁定健康--------------------
function c_maintainhealth(player, percent)
player = player or ConsoleCommandPlayer() if player.debug_maintainhealthtask ~= nil then player.debug_maintainhealthtask:Cancel() end
player.debug_maintainhealthtask = player:DoPeriodicTask(3, inst.components.health:SetPercent(percent or 1) end)
11
function(inst)
end
----------------锁定san-------------------
function c_maintainsanity(player, percent)
player = player or ConsoleCommandPlayer() if player.debug_maintainsanitytask ~= nil then player.debug_maintainsanitytask:Cancel() end
player.debug_maintainsanitytask = player:DoPeriodicTask(3, inst.components.sanity:SetPercent(percent or 1) end) end
----------------锁定饥饿-------------------
function c_maintainhunger(player, percent)
player = player or ConsoleCommandPlayer() if player.debug_maintainhungertask ~= nil then player.debug_maintainhungertask:Cancel() end
player.debug_maintainhungertask = player:DoPeriodicTask(3, inst.components.hunger:SetPercent(percent or 1) end) end
---------------锁定温度--------------------
function c_maintaintemperature(player, temp) player = player or ConsoleCommandPlayer() if player.debug_maintaintemptask ~= nil then player.debug_maintaintemptask:Cancel() end
player.debug_maintaintemptask = player:DoPeriodicTask(3, inst.components.temperature:SetTemperature(temp or 25) end) end
---------------锁定湿度--------------------
function c_maintainmoisture(player, percent) player = player or ConsoleCommandPlayer()
if player.debug_maintainmoisturetask ~= nil then player.debug_maintainmoisturetask:Cancel() end
player.debug_maintainmoisturetask = player:DoPeriodicTask(3, inst.components.moisture:SetPercent(percent or 0) end) end
--------------锁定以上所有---------------------
-- Use this instead of godmode if you still want to see deltas and things function c_maintainall(player)
player = player or ConsoleCommandPlayer() c_maintainhealth(player) c_maintainsanity(player) c_maintainhunger(player)
12
function(inst)
function(inst)
function(inst)
function(inst)
c_maintaintemperature(player) c_maintainmoisture(player) end
c_maintainall()
------------取消锁定----------------------- function c_cancelmaintaintasks(player)
player = player or ConsoleCommandPlayer() if player.debug_maintainhealthtask ~= nil then player.debug_maintainhealthtask:Cancel() player.debug_maintainhealthtask = nil end
if player.debug_maintainsanitytask ~= nil then player.debug_maintainsanitytask:Cancel() player.debug_maintainsanitytask = nil end
if player.debug_maintainhungertask ~= nil then player.debug_maintainhungertask:Cancel() player.debug_maintainhungertask = nil end
if player.debug_maintaintemptask ~= nil then player.debug_maintaintemptask:Cancel() player.debug_maintaintemptask = nil end
if player.debug_maintainmoisturetask ~= nil then player.debug_maintainmoisturetask:Cancel() player.debug_maintainmoisturetask = nil end end
-------------未知---------------------- function c_removeallwithtags(...)
for k,ent in pairs(Ents) do for i,tag in ipairs(arg) do if ent:HasTag(tag) then ent:Remove() break end end end end
----------------------------------- ----------------------------------- -----------------------------------
13
三、高级控制台命令:请自行翻译
Get a certain player AllPlayers[number]
AllPlayers[1] will get ThePlayer if you are the host. Other players should have numbers as shown on the scoreboard (In certain situations, the number may be wrong. You can be more precise by using c_listallplayers() first to see the username and character for each player number.). Most of ThePlayer commands can be used with AllPlayers[number] instead of ThePlayer.
Apply a command to all players
for k,v in pairs(AllPlayers) do command end
Replace command with another command, using \\
Move another player
c_move(AllPlayers[number])
Moves the player to the cursor position. c_move(AllPlayers[1]) Kill a player
AllPlayers[number]:PushEvent('death') Kills the player.
Resurrect a player
AllPlayers[number]:PushEvent('respawnfromghost') Resurrects the player.
AllPlayers[number]:PushEvent('respawnfromghost') Teleport to a player
c_goto(AllPlayers[number])
Teleports you to to the player corresponding to the player number from c_listallplayers().
Return a player to character select c_despawn(AllPlayers[number])
Note that this will delete their items, so it is recommended that you kill them first to drop their items.
World commandsEdit Teleport to Prefab c_gonext(\
After pressing enter, it teleports you to the first numerical instance of the named prefab. If multiple iterations of the prefab exist, a list of the entity numbers will be displayed in the console log, and each subsequent execution of the same command will transport the player from entity to entity in the order they were generated in the world.
14