
R.E.P.O.
You are viewing a potentially older version of this package. View Latest Version

QQ 群:573485890,欢迎进群讨论、反馈问题。
🤖 AI 辅助开发声明
本模组代码由 DeepSeek 辅助生成。
版本:1.0.3 | 许可证:MIT
核心随机价格库,为《REPO》模组提供统一的贵重物品价格随机化逻辑。
将 RandomValueLib.dll 放入 BepInEx/plugins 文件夹(作为其他模组的依赖自动安装,一般无需手动操作)。
using RandomValueLib;
var config = new RandomizationConfig
{
MinMultiplier = 0.5f,
MaxMultiplier = 2.0f,
// 根据需要设置其他规则
};
// 方式一:直接应用随机价格
float newPrice = RandomValueService.ApplyRandomPrice(valuableObject, config);
// 方式二:先判断是否随机化
if (RandomValueService.ShouldRandomize(obj, config))
{
float price = RandomValueService.GetRandomPrice(instanceID, originalPrice, config);
RandomValueService.SetItemPrice(vo, price);
}