? WildEncounters ⚪
Cobblemon 模组中的野生遭遇。此数据包将《宝可梦》中标志性的“草丛遇敌”机制引入 Minecraft,让玩家在穿越高草时有机会随机遭遇野生宝可梦!
PT/BR 项目分支:(
WildEncounters PT/BR)
⚙️ 工作原理 ?
当走进一小片草地时,有一定几率会出现一只野生宝可梦。这些宝可梦会生成在玩家附近,为探索增添刺激和不可预测的元素。你可以自定义可出现的宝可梦种类及其生成概率。无论你是想重现经典的《宝可梦》体验,还是为你的 Minecraft 世界增添独特的趣味,此数据包都能让你的冒险更加生动!
? WildEncounters 命令 ?️
- 你可以使用 /function wildencounters:change_cooldown 来更改野生遭遇的冷却时间。只需左键点击 + 或 - 即可增加或减少冷却时间。默认时间为 21 tick(即现实中的 1 秒;额外增加的 1 tick 是为了让计时器能够检测冷却是否已重置)。请注意,不要在玩家计时器运行期间更改冷却时间,否则可能导致错误;
- 你可以使用 /function wildencounters:reset_cooldown 将冷却时间重置为原始状态(21 tick 或 1 秒)。如果冷却时间出现错误,此命令非常有用;
- 你可以使用 /function wildencounters:uninstall 卸载此数据包。运行此命令后,请从你的数据包文件夹中移除该数据包,并运行 /reload;
? 更改宝可梦 ?
重要提示:修改数据包对新手来说可能具有挑战性。请谨慎操作!
⚠️
若要自定义生成的宝可梦,你需要将数据包的文件夹解压,并将其放置在 datapacks 目录中。解压后,导航至以下路径:
WildEncountersDatapack\data\cobblemon\molang\random_spawn
在该文件中,你会找到所有可在草丛中生成的宝可梦列表。
要更改列表中的某只宝可梦,请修改文件中的这部分内容:
t.roll == 1 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' rattata lvl=' + t.random_level);
q.player.tell('§aA wild Rattata has appeared!');
return 1;
};
如果你想将宝可梦改为皮卡丘(Pikachu),则需将函数中的相应部分修改为:
t.roll == 1 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' pikachu lvl=' + t.random_level);
q.player.tell('§aA wild Pikachu has appeared!');
return 1;
};
如果你想更改宝可梦的生成等级,你只需将 lvl= 部分改为类似 lvl=10 的值,并移除 "+ t.random_level"。别忘了在 lvl=10 后面加上闭合的单引号。
你还可以通过修改这一行来更改宝可梦的生成概率:t.roll = math.random_integer(1, 720);。目前宝可梦的生成概率为 36/720,即约 5%。你可以通过将右侧的数值 720 更改为其他值来调整生成概率。
若要添加更多宝可梦,只需在生成器文件中添加带有正确值的以下代码行:
t.roll == 36 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' arceus lvl=' + t.random_level);
q.player.tell('§aA wild Arceus has appeared!');
return 1;
};
如果最后一个值为 36,接下来的值应为 37,依此类推。
遇到问题?你可以加入官方 Cobblemon Discord 服务器,搜索 'WildEncounters' 并提出你的问题,或者你也可以通过 Discord 私聊联系我。
? WildEncounters ⚪
WildEncounters in the Cobblemon mod. This datapack brings the iconic Wild Grass mechanic from Pokémon into Minecraft, allowing players to encounter random wild Pokémon while walking through tall grass!
PT/BR Project fork: (
WildEncounters PT/BR)
⚙️ How it works ?
By walking into a small patch of grass there is a small chance for a wild Pokémon to appear. These Pokémon will spawn right near the player, adding an exciting and unpredictable element to your exploration. Customize the types of Pokémon that can appear and their spawn rates. Whether you're recreating a classic Pokémon experience or adding a unique twist to your Minecraft world, this datapack will bring your adventures to life!
? WildEncounters commands ?️
- You can use /function wildencounters:change_cooldown to change the cooldown of the wild encounters. To change the time simply left click on the + or - to add or remove time to the cooldown. The default time is 21 ticks or 1 second in real time (the 1 extra tick that is added is so when you want the encounters to have no cooldown, the timer can detect if the cooldown has reset or not). Be aware to not change the cooldown whilst a player has their timer running or it can cause bugs;
- You can use /function wildencounters:reset_cooldown to reset the cooldown to its original state (21 ticks or 1 second). This command can be useful if the cooldown gets bugged;
- You can use /function wildencounters:uninstall to uninstall the datapack. After running this command remove the datapack from your datapack's folder and run /reload;
? Change Pokémon ?
Important Note: Modifying datapacks can be challenging for beginners. Proceed with caution!
⚠️
To customize the Pokémon that spawn, you'll need to have the datapack folder unzipped and placed in your datapacks directory. Once unzipped, navigate to the following location:
WildEncountersDatapack\data\cobblemon\molang\random_spawn
In this file, you'll find a list of all the Pokémon that can spawn in the grass.
To change a Pokémon from the list change this part of the file:
t.roll == 1 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' rattata lvl=' + t.random_level);
q.player.tell('§aA wild Rattata has appeared!');
return 1;
};
If you wanted to change the Pokémon to Pikachu you'd change the part of the function to this:
t.roll == 1 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' pikachu lvl=' + t.random_level);
q.player.tell('§aA wild Pikachu has appeared!');
return 1;
};
If you want to change the level at which a Pokémon spawns, you'd only change the lvl= part to something like lvl=10, removing "+ t.random_level". Don't forget to close the ' after lvl=10.
You can also change the chance for a Pokémon to spawn by modifying this line: t.roll = math.random_integer(1, 720);. The chance of a Pokémon spawning are 36/720, or around 5%. You can change the chance of a Pokémon spawning by changing the right value 720 to something else.
To add more Pokémon just add these lines to the spawner file with the correct values:
t.roll == 36 ? {
q.run_command('pokespawnat ' + q.player.x + ' ' + q.player.y + ' ' + q.player.z + ' arceus lvl=' + t.random_level);
q.player.tell('§aA wild Arceus has appeared!');
return 1;
};
If the last value is 36 the next ones will be 37 and so on.
Have some issues? You can join the Official Cobblemon discord server, search for 'WildEncounters' and ask your questions there, or alternatively, you can DM me on discord.
评论 0
登录后参与评分
还没有评论,来抢沙发吧