screeps 游戲中的 tips

screeps 系列教程

screeps 里會時不時的給你一個提示,平時也沒怎么看過,今天特地點了一遍,把常見的 tip 都記錄一下供大家參考。


Walking over swamps is 5 times slower compared to plain land.

在沼澤地上行走比平原慢5倍。


Ramparts and walls initially have 1 hit point. Repair them after construction.

城墻和城墻最初有1點hit。要記得施工后進行維修。


If you want to play from scratch, you can always Respawn in a new room.

如果你想從頭開始玩,你可以在一個新房間里重生。


You can output HTML content to the console, like links to rooms.

您可以將HTML內(nèi)容輸出到控制臺,例如一個跳轉(zhuǎn)到指定房間的超文本鏈接。


The RANGED_ATTACK body part is 2 times weaker than ATTACK and 2 times costlier at that.

RANGED_ATTACK身體部件的相對傷害只有ATTACK部件的 1/2,成本卻高2倍。


Observers allow to get the Room object for the rooms that have no objects of yours.

Observers可以獲取那些沒有你單位存在的房間對象。


Respawning in a chosen room would automatically destroy all structures except walls and roads

在選定的房間重生會自動破壞房間內(nèi)除墻和道路以外的所有建筑。


You can build and repair roads in any rooms, even neutral ones.

你可以在任何房間修建和維修道路,甚至是中立房間。(容器container也可以)


A creep can execute some commands simultaneously in one tick, for example move+build+dropEnergy.

creep可以在一個tick內(nèi)同時執(zhí)行多個命令,例如 move + build + dropEnergy。


Use storage to not lose surplus of mined resources.

使用storage來存儲開采出來的過量資源。


There is a keyword debugger in the simulator that stops your script in the browser.

模擬器中有一個關(guān)鍵字debugger,可以用于在瀏覽器中暫停腳本。


The console.log function of the simulator displays a live expandable object in the browser console.

模擬器的console.log函數(shù)可以在瀏覽器的控制臺中同步顯示(可以對object進行展開操作)。


If CPU limit raises, your script will execute only partially.

如果運算量超過CPU限制,腳本將只執(zhí)行部分代碼。


To output an object content into the console, use JSON.stringify.

要將對象內(nèi)容輸出到控制臺,請使用JSON.stringify。


Sources in neutral rooms have reduced capacity. Reserve or claim the room to restore it to full capacity.

中立房間礦的能量上限只有1500。預訂或占領(lǐng)房間可以使其恢復到最大容量。


Send emails to yourself with the function Game.notify to be aware of everything happening in the game.

使用Game.notify函數(shù)向自己發(fā)送電子郵件來了解游戲中發(fā)生的一切。


You can apply transfer and heal to another player’s creep, and transfer, build and repair to others’ structures.

你可以transferheal另一個玩家的creep,以及transfer,buildrepair到其他玩家的建筑。


Walls and roads don’t belong to any player, so they should be searched with the help of FIND_STRUCTURES, not FIND_MY_STRUCTURES.

墻壁和道路不屬于任何玩家,因此應(yīng)該使用FIND_STRUCTURES進行搜索,而不是FIND_MY_STRUCTURES。


A creep with an ATTACK part automatically strikes back at every attacker by ATTACK.

一個帶有ATTACK部分的creep會自動反擊任何帶有ATTACK的攻擊者。


To save your CPU, use less creeps of a larger size.

生成數(shù)量更少、身體部件更多的creep來節(jié)省你的CPU


Use Room.energyAvailable and Room.energyCapacityAvailable to determine how much energy all the spawns and extensions in the room contain.

使用Room.energyAvailableRoom.energyCapacityAvailable來確定房間中所有spawnextensions包含多少能量及能量上限是多少。


You can use more CPU than your CPU limit allows in short bursts.

你的CPU使用量可以在短時間內(nèi)使用超過你CPU上限。(“短時間”取決于你的cpu桶中的余額)


Roads wear out as they are used, so don’t forget to repair them.

道路在使用過程中會逐漸磨損,所以別忘了修理它們。


Build roads to save on MOVE body parts of your creeps.

建造道路可以讓你的creep使用更少的MOVE部件。


Use try/catch blocks in right places to avoid a complete halt of your script due to errors.

在適當?shù)奈恢檬褂?code>try/catch代碼塊,以避免由于異常而導致腳本退出。


A tower’s effectiveness depends on the distance to the target.

tower的工作效率取決于tower到目標的距離。


Energy in a storage can not be used to spawn creeps. Transfer it to a spawn or extensions instead.

storage里儲存的能量不能用來產(chǎn)生creep,要先將能轉(zhuǎn)移到一個spawnextension。


Spawn extensions capacity increases on room levels 7 and 8.

RCL7 和 RCL8 將提升 extension 的容量。


Use towers to set up automatic defense of your room.

使用tower來建立你房間的自動防御。


Dead body parts have weight and generate fatigue as well.

一個壞掉的身體部件也會產(chǎn)生疲勞。


The game is fully recorded, so you can see replay of any room for the past several days.

游戲已經(jīng)被完整錄制,所以你可以隨時回放過去幾天發(fā)生的事情。


Unless you use up your CPU limit each tick, it is stored for future use.

除非你每tick都用光了你的CPU,不然沒有用掉的會被存起來以備以后使用。


The more spawn extensions in a room, the more energy you can spend on building one creep.

一個房間中的spawnextension越多,你就可以用更多的能量來構(gòu)建一個creep。


Modular architecture of a script will allow easy testing of individual functions in the simulator.

腳本的模塊化架構(gòu)使得你可以在模擬器中輕松測試單個函數(shù)。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容