Partial Keepinventory
注意:此模组仍处于 Alpha 测试阶段,且由我个人开发。出现 Bug 是难免的。
一个用于修改保留物品(keep inventory)行为的 Fabric 模组。
有关我正在规划和进行的工作的更多信息,请参阅路线图。
GUI
使用 /pki-gui 打开图形界面。这要求你在客户端侧安装了该模组。
表达式
表达式是一种动态改变物品掉落方式的方法。可以通过使用给定变量的简单公式来实现。invExpression 返回的值会被限制在 0 到 1 之间。
可在提供的表格中找到变量列表:
基础
| Variable |
Meaning |
| spawnDistance |
玩家与其重生点之间的距离 |
| spawnX, spawnY, spawnZ |
玩家的重生位置 |
| playerX, playerY, playerZ |
玩家的位置 |
物品栏
| Variable |
Meaning |
| isCommon, isUncommon, isRare, isEpic |
物品是否具有某种稀有度。当为真时值为 1.0,为假时值为 0.0。 |
| rarityPercent |
配置的该物品稀有度的掉落率。 |
| dropPercent |
静态的物品栏掉落率 |
经验值
| Variable |
Meaning |
| xpPoints |
玩家的 XP 点数。 |
| xpLevel |
玩家的 XP 等级。 |
表达式预设:
距离衰减
将 DISTANCE_IN_BLOCKS 更改为你停止掉落物品的重生点距离(掉落率线性降低)。
abs(1-(spawnDistance/DISTANCE_IN_BLOCKS))
命令
启用/禁用模组
/pki [enable|disable]
设置掉落行为
/pki inv mode [vanilla / static / rarity / custom]
设置物品栏/稀有度的掉落率(0-100)
/pki inv droprate [static / common / uncommon / rare / epic] <percentage>
列出将获得正常保留物品(keepinventory)行为的玩家
/pki inv savedPlayers list
移除/添加获得正常保留物品(keepinventory)行为的玩家
/pki inv savedPlayers [add / remove] <name>
设置自定义掉落率公式
/pki inv invExpression set [invExpression]
经验值掉落率
目前有两个变量可以改变经验值的掉落方式:
- 损失百分比(损失多少经验值)
- 掉落百分比(掉落那部分经验值的比例)
/pki xp droprate [drop / loss] <percentage>
这些变量还有两种“模式”可以运行。
获取经验所需的数量随等级增加而增加,这使得当你处于较高等级时,基于等级的模式惩罚性更强。
/pki xp mode [vanilla / static-level / static-points / custom-level / custom-points]
许可证
Partial Keepinventory
NOTE: This mod is still in alpha, and I am just one person. Bugs are bound to happen.
A fabric mod for changing the behaviour of keep inventory.
For more information on what I'm planning and working on see the Roadmap.
GUI
Open the GUI using /pki-gui. This requires you to have the mod installed on the client side.
Expressions
Expressions are a way to dynamically change how items are dropped. This can be done with a simple formula that uses given variables. The value returned by the invExpression is clamped between 0 and 1.
A list of variables can be found in the provided table:
Base
| Variable |
Meaning |
| spawnDistance |
The distance from the player to their spawnpoint |
| spawnX, spawnY, spawnZ |
The player's spawn position |
| playerX, playerY, playerZ |
The player's position |
Inventory
| Variable |
Meaning |
| isCommon, isUncommon, isRare, isEpic |
Whether an item has a certain rarity, These are 1.0 when true and 0.0 when false. |
| rarityPercent |
The configured droprate of the item's rarity. |
| dropPercent |
The static inventory droprate |
Experience
| Variable |
Meaning |
| xpPoints |
Player's XP point amount. |
| xpLevel |
Player's XP level. |
Expression presets:
Distance falloff
Change DISTANCE_IN_BLOCKS to the distance from spawn where you stop dropping items (the droprate decreases linearly).
abs(1-(spawnDistance/DISTANCE_IN_BLOCKS))
Commands
Enable/disable the mod
/pki [enable|disable]
Set the drop behaviour
/pki inv mode [vanilla / static / rarity / custom]
Set droprate for the inventory/rarities (0-100)
/pki inv droprate [static / common / uncommon / rare / epic] <percentage>
List players who will get the normal keepinventory behaviour
/pki inv savedPlayers list
Remove/add players who get normal keepinventory behaviour
/pki inv savedPlayers [add / remove] <name>
Set the custom droprate formula
/pki inv invExpression set [invExpression]
Experience Droprate
There's currently 2 variables that change how XP is dropped:
- Loss percentage (How much experience is lost)
- Drop percentage (How much of that experience is dropped)
/pki xp droprate [drop / loss] <percentage>
There's also 2 "modes" in which these variables can operate.
- Based on levels
- Based on experience points
Levels take increasingly more experience to get, which makes that mode increasingly more punishing when you're on a higher level.
/pki xp mode [vanilla / static-level / static-points / custom-level / custom-points]
License
评论 0
登录后参与评分
还没有评论,来抢沙发吧