AcControl - 为 AutoCraft 提供阵营感知功能的空域控制插件
我喜欢 AutoCraft,也喜欢 Factions。但我不希望飞艇飞过其他阵营的领地——这会让在 PvP 服务器上袭击其他基地变得过于容易。
AutoCraft 并不禁止飞越阵营领地,也不提供此类功能。这就是 AcController 发挥作用的地方。它本质上是一个让 AutoCraft 具备阵营感知能力的附加组件。如果你飞得太接近禁飞区域,你的飞船将失去操控并停止前进。
该插件需要安装 AutoCraft 和 Factions。在默认配置下,它仅允许飞艇飞越荒野(Wilderness)、战区(Warzones)以及你自己所属的阵营领地。但你可以根据需要进行更改。具体命令见下文。
由于这是首个开发者版本,目前文档尚不完善,且可能存在一些 Bug,尽管我已经进行了相当充分的测试。配置可以通过标准的 config.yml 文件或在游戏内命令完成。
其工作原理是:系统会检查驾驶员与外国领地的距离,如果距离过近,驾驶员将被解除操控。在禁飞领地上进行驾驶操作是被禁止并阻止的,同样,试图转向使船只漂浮在禁飞领地上也会被阻止。保持驾驶员(及其船只)远离禁飞区的距离等于飞艇可能的大小加上一个可配置的安全区。系统还会考虑船速,并在尝试移动时将速度因素加入距离计算中。
命令:
- /acc setdebug (true/false) : 启用或禁用调试输出。
- /acc showsettings : 列出当前活动的设置。
- /acc listallowed : 列出你被允许飞越的所有阵营。
- /acc setsafetyzone (int) : 在禁止飞行的外来领地允许距离之外增加一个额外的缓冲区域。
- /acc setallallowed (true/false) : 允许在所有地方飞行!
- /acc setplayerfactionok (true/false) : 是否允许飞越玩家自己的领地?
- /acc setalliedfactionok (true/false) : 是否允许飞越盟友阵营的领地?
- /acc addallowed (faction tag) : 将一个阵营添加到允许飞越的名单中。
- /acc removeallowed (faction tag) : 从允许飞越的名单中移除一个阵营。
- /acc saveconfig : 将当前设置保存到文件。
- /acc reloadconfig : 从文件重新加载设置,并覆盖你在中间所做的更改。
权限
权限默认为“OP”(管理员专用)。
它们对应于上述列出的命令。
- accontrol.showsettings: true
- accontrol.listallowed: true
- accontrol.setdebug: true
- accontrol.setallallowed: true
- accontrol.setplayerfactionok: true
- accontrol.setalliedfactionok: true
- accontrol.setsafetyzone: true
- accontrol.addallowed: true
- accontrol.removeallowed: true
- accontrol.saveconfig: true
- accontrol.reloadconfig: true
安装
将插件放入服务器的 /plugin 文件夹即可。服务器重启后所有设置将生效。
配置
默认的 config.yml:
# debug: 调试模式 - 输出相关信息
# safetyzone: 以方块为单位,保持与禁止飞行的阵营的距离
# factions: Factions 插件部分
# PlayerFactionOK: 是否允许飞越玩家所属的阵营?
# AllAllowedOK: 是否允许在所有地方飞行?(基本上会关闭此插件的功能)
# AlliedFactionOK: 是否允许飞越盟友阵营的领地?
# AllowedFactionIds: 包含允许飞越的阵营 ID 的列表 - 不是标签,因为标签可能会改变
# 0= 荒野, -1=安全区, -2=战区
debug: false
safetyzone: 8
factions:
PlayerFactionOK: true
AllAllowed: false
AlliedFactionOK: false
AllowedFactionIds:
- 0
- -2
源码
依赖项
.plan
- 做一些小的美化工作,或者如果 AutoCraft 决定将我编写的此功能整合进去,可能会删除该项目。不确定……
Stuff and Blurb
玩得开心!
:)
AcControl - the Factions-aware air space control for AutoCraft
I like Autocraft and I like Factions. But I wanted the airships not to fly over foreign factions territory - it would have made raiding other bases (on PvP servers) too easy.
Autocraft does not disallow flying over Faction lands and does not offer such a functionality. And thats where AcController comes in. Its basically an Add-On for Autocraft to be factions-aware. If you fly to near to forbidden territory you get unpiloted and thus stopped.
The plugin requires Autocraft and Factions to be installed. In the standard configuration it allows flying airships only over Wilderness, Warzones and your own factions land. But you can change that. Commands are described below.
Since this is a first developer release theres not much documentation yet and there might be some bugs, though I have done quite some testing. Configuration is done by standard config.yml and / or in-game commands.
It works such, that the pilots distance to foreign territory is checked and if he gets too near he is unpiloted. Piloting on forbidden lands is prohibited and blocked as well as turning your ship to have it float over forbidden lands. The distance to keep the pilot (and its ship) away is the possible size of the airship plus a configurable safetyzone. The ship velocity is taken into account and added to the distance when trying to move.
Commands:
- /acc setdebug (true/false) : enables or disables debug output.
- /acc showsettings : List the currently active settings.
- /acc listallowed : Lists all factions you are allowed to fly over.
- /acc setsafetyzone (int) : adds an additional buffer zone to the allowed distance from foreign land where flying is disallowed.
- /acc setallallowed (true/false) : Flying everywhere !
- /acc setplayerfactionok (true/false) : Flying over Players own land allowed?
- /acc setalliedfactionok (true/false) : Flying over allied factions land allowed?
- /acc addallowed (faction tag) : Add a faction to the list of allowed factions to fly over.
- /acc removeallowed (faction tag) : Remove a faction from the list of allowed factions to fly over.
- /acc saveconfig : Save current settings to file.
- /acc reloadconfig : Reload settings from file and overwrite changes you made in between.
Permissions
Permissions default to "OP" - Operators only.
They refer to the commands listed above.
- accontrol.showsettings: true
- accontrol.listallowed: true
- accontrol.setdebug: true
- accontrol.setallallowed: true
- accontrol.setplayerfactionok: true
- accontrol.setalliedfactionok: true
- accontrol.setsafetyzone: true
- accontrol.addallowed: true
- accontrol.removeallowed: true
- accontrol.saveconfig: true
- accontrol.reloadconfig: true
Installation
Put the plugin into our servers /plugin folder and you're good to go. All is set up after server restart.
Configuration
The Default config.yml:
# debug: debug mode - spits out stuff
# safetyzone: distance to keep away from disallowed factions with ship in blocks
# factions: factions plugin section
# PlayerFactionOK: Flying over players faction allowed?
# AllAllowedOK: Flying everywhere allowed? (Basically switches off the plugin functionality)
# AlliedFactionOK: Flying over allied factions allowed?
# AllowedFactionIds: list with Ids of allowed factions - not tags, since tags can change
# 0= Wilderness, -1=Safezone, -2=Warzone
debug: false
safetyzone: 8
factions:
PlayerFactionOK: true
AllAllowed: false
AlliedFactionOK: false
AllowedFactionIds:
- 0
- -2
Source
Dependencies
.plan
- minor beautifying, maybe deleting the project if AutoCraft decides to incorporate the functionality I programmed here. No idea ....
Stuff and Blurb
Have Fun !
:)
评论 0
登录后参与评分
还没有评论,来抢沙发吧