关于战争模式 PVP/PVE

允许 PVE 和 PVP 玩家同时存在于服务器上。PVE 玩家将拥有某些可配置的保护和限制。您可以让玩家使用命令将自己标记为 PVP/PVE,也可以在他们首次生成时将其分配给他们。如果您有 ZoneManager,您还可以指定特定区域以强制玩家为 PVE 或 PVP。Plugin 还与 SimpleStatus 兼容。

注意:视频已过时,请参阅文档以获取新功能的完整列表!

文档:
此 google doc 链接中提供了包含权限、命令和配置选项的完整自述文件。

免责声明:
就像我所有的插件一样 – 这个插件按原样出售。我很乐意考虑功能请求,但不保证哪些请求会得到实现。请在购买前参考功能列表!

开发者 API:

API 方法

        // Returns the mode of the given entity. Also takes into account if the entity is in a forced mode zone.
        string GetEntityMode(BaseEntity entity);

        // Returns the group name for the given mode. For example if given 'pve' will return 'warmodepve'
        string GetModeGroup(string modeId);

        // Returns the target type for a given entity. Target types are the category that an entity falls into.
        // For example, if given a BasePlayer entity, it will return 'players'. If given a horse entity is will
        // return 'horses'.
        string GetEntityTargetType(BaseEntity entity);

Hooks – 将它们放在你的插件中,WarMode 将调用它们。

// Called when a player's mode has been updated or config changes have ocurred that may affect the mode.
private void WarMode_PlayerModeUpdated(string userid, string modeId)

// Used to override WarMode logic for taking damage.
// If true/false is returned then WarMode logic will be skipped. Return null to continue WarMode logic.
private object CanEntityTakeDamage(BaseCombatEntity target, HitInfo info)

// Used to override WarMode logic for targeting.
// If true/false is returned then WarMode logic will be skipped. Return null to continue WarMode logic.
private object CanEntityBeTargeted(BasePlayer target, BaseEntity attacker, bool skipVendingCheck)

// Used to override WarMode logic for triggering a trap.
// If true/false is returned then WarMode logic will be skipped. Return null to continue WarMode logic.
private object CanEntityTrapTrigger(BaseTrap trap, BasePlayer basePlayer)

// Used to override WarMode logic for looting an entity.
// If true/false is returned then WarMode logic will be skipped. Return null to continue WarMode logic.
private object CanEntityLoot(BasePlayer looter, BaseEntity target, bool skipVendingCheck)

免费扩展插件:

战争模式管理面板
使用 /warmode.config 或 /wmc 命令打开一个面板,允许管理员更新游戏中的模式规则,而无需重新加载命令。需要 warmode.admin 权限才能使用。

强烈建议你使用这个扩展!

WarModeAdminPanel.cs正在获取信息…
image.png.bed1e2efeaddce811a1531742a9d9372.png

战争模式生成 UI
提供一个 UI,该 UI 在玩家首次生成时向玩家显示,提示他们选择是要成为 PVP 还是 PVE。还支持自定义模式。提供本地化和配置选项。也可以将其配置为在玩家使用 /flag 命令时显示。

WarModeSpawnUI.cs正在获取信息…

 

image.png.8d1a12e50a67ef162e4624878b6e8703.png

 

战争模式规则 UI
:使用 /rules 命令(可配置),玩家可以看到他们对当前模式的限制列表。这些规则将根据您的配置设置动态更新。

WarModeRulesUI.cs正在获取信息…
image.png.9eaf91c08594e41d153fda2053be2d03.png

 

对抗战模式徽章

可自定义的 UI 元素,将显示在玩家的 HUD 上,以指示其当前模式。

WarModeBadges.cs正在获取信息…
image.png.fc0651d5351dac493bb0dce2cf0d229f.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。