• 因近日遭受攻击,百科现已限制新用户的编辑权限,一段时间后成为自动确认用户方可编辑。

GuillaumeVDN的插件文档/迁移

From Minecraft插件百科
Revision as of 19:40, 23 October 2020 by Qsefthuopq (talk | contribs) (创建页面,内容为“== 迁移至GCore v8和QuestCreator v6 == Version 6 of QuestCreator, and the matching version 8 of GCore, were entierly rewritten from scratch, with perspectives in…”)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

迁移至GCore v8和QuestCreator v6

Version 6 of QuestCreator, and the matching version 8 of GCore, were entierly rewritten from scratch, with perspectives in mind that I didn’t have a few years ago when I first coded them. This allows features that weren’t possible before, optimized performances, more consistency, stuff like that.

And most importantly : it allows more efficient maintenance in the future. And it makes it less painful. The code quality in previous versions, although readable, has gotten to a point where I almost get depressed when I have to fix bugs or work on updates. That’s due to me starting working on those plugins a few years ago, and being a beginner. I have improved a lot in coding, and recoding my plugins have been in my mind for a few months now, and I just needed to do it. So here it is !

I am grateful to all the people who patiently waited for bug fixes and updates during the past months. Although some Karen’s seem to believe I belong to them just because they bought my product, many people have shown support and/or waited patiently during the recode, where updates and bug fixes got rare, if not inexistant. Even if it might sound silly, Minecraft is currently a big part of my life and I appreciate your support. So, many thanks to everyone. revolving_hearts

我的其它插件

I focused on QuestCreator since this is the one I received the most support queries for. An adaptation (or recode) of all my plugins is planned, but it will also take time. I plan to work on it whenever I unlock time for it, during the year 2020-2021.

Currently, only QuestCreator v6 is compatible with GCore v8. If you use another of my plugins along with QuestCreator, you’ll need to download the adapted legacy version of GCore as well (updated on the spigot page for my other plugins). I’m aware it’s annoying, so sorry about that.

警告

This version is not completely stable yet, and should be entierly tested before release on production servers. It went through an alpha-testing on my Discord server to eliminate most critical bugs. Now, I’m releasing this version publicly to accelerate debugging, since it’s already been too long !

Please report any critical problem through a ticket on my Discord server, or on GitLab for less urgent ones.

Bugs will be processed in batches and new builds will be released frequently, maybe every 3-4 days. I can also send the new builds on Discord to avoid useless waiting time (to verified users).

备份你的服务器

To avoid having to adapt to all of the changes manually, GCore v8 and QuestCreator v6 include an automatic conversion system for configuration and data files. It has been tested on a bunch of different files. But as you might know, certain things might break even though we didn’t expect them to break.

Regardless of what some people seem to think, I don’t purposefully include bugs in my plugins ^_^ I try to prevent them and to fix them, but I can’t think of all the possible cases in advance.

So, to avoid data loss, I want you to make a complete backup before migrating on your production server. Not only my plugins files, but the entire server, including maps, player data states, and data from other plugins. Although QuestCreator never directly alters that, there are more than likely commands/economy rewards, item manipulation, etc, in your quests, and new bugs might trigger them unexpectedly.

I won’t bear responsability for data loss or any irreversible change due to you not backing up before an update. But it’s something I unfortunately hear too often, so please, just back up !

除了备份之外, there’s no particular instruction for migration. Back up, and replace old .jar files by the new ones, and migration will begin automatically on start.


主要变更和新增内容

The structure of many things is mostly the same (quests, activators, …), there are new features, config standardization, nomenclature standardization and small changes. And there’s a brand new damn documentation !

I have to admit I didn’t note every single thing that changed, because there are just too many. Here’s a list of most important changes that come to my mind. If you have any doubt about something changing, I advise you to check the relevant part of this documentation. I also just advise you to read through it once, at least the generic and basic sections.

优化和数据

The first thing that comes to my mind about this update is optimization. That’s not something that’s actually visible to you, but the code is way clearier, more optimized, more consistent, and all of that cool stuff. This will allow better maintenance. I also standardized many libraries, which means things like “that bug you fixed here happened there as well” will no longer happen.

Data boards now are handled much more consistently, with proper async/callback management. I won’t get into details here but it means data saving is much more consistent, and some random problems you might have sometimes (duplicated quests, data files not removing, …), won’t happen anymore.

配置、物品和变体

I have rewritten a YAML parser, instead of using the default bukkit one. The most major improvement to me is that it keeps comments and config organization whenever re-writing the file. Find out more info about it on that page.

Many configuration sections weren’t consistent from one place to another. The main example I can think of are items : it wasn’t always the same settings from one place to another. Sometimes you could have some settings, but sometimes not ; and most of the time, settings such as ‘exact_match’ or ‘remove_after_action’ were included in the items configuration, but weren’t accepted everywhere. Now, everything is consistent : items have their own sections and specific settings are located outside. Most of those generic configuration sections are documented here

Items are now handled much better and have a much more consistent behavior. You can configure most of the specific item meta, and also NBT tags more clearly (instead of an unreadable base64 encoded text).

Read more details about variants (materials/sounds/particles) here. This doesn’t change much as I used the same old names most of the time, but this allows more freedom and clarity (mainly for me, but you’re also free to edit it and you always have an up-to-date list of available materials/sounds/particles for your server).

文本

Texts are to me the main downside of this update, and something I have to apologize about : I couldn’t find a way to smoothly convert existing lang files. Because of many reasons (many texts were added, removed or modified, the meaning of some texts changed, placeholders aren’t the same, etc).

Doing an automatic conversion for texts would just give a messy, incoherent, not good-looking result, and also would take too much time (and I’m running out of time for this summer). So you will have to retranslate your texts in your own language. I’m sorry about that to all the translators, I know translating texts can be really boring and take a long time.

On the brighter side, texts now have their own folders for each plugin, instead of just one messy texts.yml file with all the languages in. So translating will be less annoying and clearier.

指令

With every major update seem to come improvements to my commands library. I guess most of you will be happy with the main change : no more -argument:value format.

Where you previously needed to write /qc start -q:farm_quest -p:player, you can just write /qc start farm_quest player, like a regular, normal, not annoying command system.

Arguments musn’t follow a particular order : /qc start farm_quest GuillaumeVDN, /qc start GuillaumeVDN farm_quest will have the same effect.

Argument detection was improved, you don’t have to write the entierty of arguments, and there’s also a better autocompletion system. If the plugin stops suggesting values for an argument, it means it found a single fitting value. For instance, typing ‘Guillaume’ will result in ‘GuillaumeVDN’ for a player argument, or even just ‘g’ if there are no other players whose name start with the letter G.

So all of those commands will have the same effect : /qc start GuillaumeVDN farm_quest, /qc start Guillaume farm, /qc start g farm, /qc start g fa. This makes commands less annoying to type, but beware to not shorten the things too much, as you might accidentally start another quest starting with fa, or for another player starting with g.

Most commands with a target player argument will be performed for the sender if none is specified.

It’s also a cool thing to note that the reload commands now completely unloads all config and data and reloads a fresh instance of everything.

文件结构

File structure didn’t change a lot for GCore, but it did for QuestCreator.

Here’s a summary of the new hierarchy. New features and changes are explained further below.

  • /plugins/QuestCreator/ :
    • data_v6/ : player/server data files (there are some local files even if you’re using MySQL) for QuestCreator *(previously all data files were centralized in GCore
    • quest_models/ (same as before)
    • quest_models_functional/ (new)
    • quest_activators/ (previously all activators were in the same config file)
    • quest_groups/ (previously all groups were in the same config file)
    • quest_pools/ (previously all pools were in the same config file)
    • quest_states/ (new)
    • guis/ (same as before)
    • global_branches/ (new)
    • global_conditions/ (previously all global conditions were in the same config file)
    • global_gui_items/ (new)
    • global_objects/ (new)
    • global_time_frames/ (new)
    • global_variables.yml (same as before)
    • server_variables.yml (new)
    • default_variables.yml (previously in config.yml)
    • points_categories.yml (previously in config.yml)
    • config.yml (same as before)

GUI

GUI handling was recoded as well and comes with some improvements. Everything is handled to try to avoid lag as much as possible, especially when loading big multi-page GUIs, or ranking GUIs with many player skins to fetch and stuff like that.

If you have ProtocolLib installed, a client-side packets implementation of GUIs will be used. This avoids extra event processing by Spigot and should result in slightly better performance if you have many plugins interacting with inventories.

Some config improvements and freedom were brought as well, such as page configuration and clicks overrides. More information on this page.

激活器和注册

Some useless activator types have been removed, such as ENABLED, DISABLED, and stuff like that. A quest now don’t need an activator anymore. If it has no activator, it can still be started using the GUI or command, as long as they have the permission to do so. Some activator types also were adapted/removed.

The registration file is also gone. You don’t need to register your quest models in order for them to be started. Activators can be configured directly in the quest model file. Groups now have their quests configured inside their own configuration.

任务目标和条件

Most quest objects and conditions were converted (with nomenclature standardization for names and settings) or deleted/replaced by alternatives. A few useful things were added, such as special objects CONDITIONS_SWITCH, LOGIC_SWITCH and DIVERGE_GUI. See the new list of objects for reference.

多目标任务目标(方块/实体/物品)

A feature that has been requested for a long time now is multiple goals within the same objects. That is now possible for most blocks, entities and items player objects.

For existing blocks/items/entities quests, that currently only have one possible objective, the plugin will create an objective in the multiple objectives list. This objective will have the id a. For instance :

# Old configuration
my_object:
  type: PLAYER_BLOCK_BREAK
  block_type: [DIRT,GRASS_BLOCK]
  amount: 50

# New, converted configuration
my_object:
  type: PLAYER_BLOCKS_BREAK
  blocks:
    a:
      types: [DIRT,GRASS_BLOCK]
      goal: 50.0

Is is crucial that you leave this id to a. If you change it, progression for objects currently active for players will be reset to 0.

物品目标和关联条件

Some integrations had their own item conditions and objects. For instance, PLAYER_QUANTUMRPG_ITEM_PICKUP or MMOITEMS_ITEM.

Those objects have been removed (except some very specific ones) because of the new easy NBT configuration. It was kind of painful to maintain all of those, instead of having one, consistent item condition/object type.

For those specific conditions and objects, you might have to import them again. Some testing will be required, don’t hesitate to contact me about that.

逻辑目标和条件

Most conditions that previously required a certain number to be validated, such as ‘having X money’ or ‘having a certain value for a variable’, have been refactored into logic strings. This requires basic knowledge of logic conditions, explained here.

For instance :

# Old configuration
my_condition:
  type: HEROES_SKILL_LEVEL
  skill_name: my_skill
  operation: AT_LEAST
  value: 10
# New configuration
my_condition:
  type: HEROES_SKILL_LEVEL
  skill: my_skill
  logic: '{skill_level} >= 10'

The same thing goes for objects : the ones that previously affected a certain value, such as ‘modifying money’ or ‘modifying veriable’, have been refactored into math expressions strings.

For instance :

# Old configuration
my_object:
  type: SERVER_MONEY_CHANGE
  operation: ADD
  value: 100.0
# New configuration
my_object:
  type: SERVER_LOGIC_MONEY
  value_formula: '{value} + 10'  # taking the current money and adding 10 to  
特例:CONDITIONS条件目标

CONDITIONS目标在新版中被移除了,现根据用法现已被分为了多个其它目标。

a) If it had a fail goto (used as a junction between two objects) :

# Old configuration
my_object:
  type: CONDITIONS
  conditions:
    # ... conditions settings
    goto_if_not_valid: QUEST_FAIL
  goto: OBJECT continue

# New, converted configuration
my_object:
  type: CONDITIONS_SWITCH
  cases:
    a:
      conditions:
        # ... conditions settings
      goto: continue
    # ... there can be other cases
  goto: QUEST_FAIL  # default goto

b) If it had no fail goto (just waiting for the conditions to be valid to continue) :

# Old configuration
my_object:
  type: CONDITIONS
  conditions:
    # ... conditions settings
  goto: OBJECT continue

# New, converted configuration
my_object:
  type: NONE
  progress_conditions:
    # ... conditions settings
  goto: continue

更多设置

Many settings were added and standardized for a bunch of elements. For most quest objects were added cool things like “items_needed” and “position_stay”. For quest pools were added more control settings for each quest and also groups configuration. A clearier actor restriction management. And many settings specific to each element, read more about it on relevant pages.

全局元素

To avoid repetition through configuration, I introduced ‘global variables’ and ‘global conditions’ a bunch of updates ago. I have extended this principle to objects, branches, gui items and time frames. It’s useful if you spend a lot of time copy/pasting the same config parts from one quest to another. Read more about it on this page.

还有更多内容!

There are a bunch of configuration improvements, and also new features I didn’t list above, that are detailed in the documentation.

Including, but not limited to :

  • Particle scripts (for activators or animations, instead of single particles)
  • Better (and many more) position settings (also for Citizens, MythicMobs and WorldGuard)
  • Functional quest models to create server mechanics using QuestCreator without having to use an actual quest
  • Reworked placeholders
  • Model and server variables.
  • Improvements to the in-game editor to make it more efficient, less submenus to edit simple values, searching for enum values, and many more values can now be imported as well, especially in integrations.
  • A bunch of integrations (Boss, Denizen, Gangs+, HolographicDisplays, MMOCore, Parties, Shopkeepers, SuperiorSkyblock2 and TokenEnchant).
  • Better BungeeCord support
  • Multi-currencies support (suggest currencies on gitlab)
  • Number rounding

… etc ! Just go quickly over the sidebar and read about stuff you don’t know about if you’re curious about those new things ! :D

已关闭的GitLab提问

已关闭这些GitLab上的提问(已解决大多数问题):

  • #627 Show diffrent text if condition is not met in DIVERGE (by zemoz)
  • #625 Allow players to have multiple quests open via permissions (by viveleroi)
  • #621 SUGGESTION: Multiple quests in the scoreboard (by Mr_Mint_)
  • #226 SUGGESTION: coop quest (by timmy0707)
  • #252 Suggestion: Global Server Quest (by TheOnlyTermin)
  • #299 SUGGESTION NEW OBJECT (by timmy0707)
  • #307 SUGGESTION SCOREBOARD (by timmy0707)
  • #320 SUGGESTION ADD CONDITION (by timmy0707)
  • #346 To do : multiple items for some PLAYER_ITEM objects (by GuillaumeVDN)
  • #350 [Suggestion] QOL Update for Console Neatness/Readability. (by NolanMC)
  • #365 Suggestion (by joker19102002)
  • #369 Suggestion: MythicMobs ITEMS (by Mortesaison)
  • #453 SUGGESTION ingame editor color code tolowercase (by timmy0707)
  • #448 Propostion : Priorité d’affichage des quêtes dans la actionbar/bossbar/scoreboard (by Ssomarrr)
  • #474 New Condition Operation: “BETWEEN” (by NolanMC)
  • #514 Support option “remove_after_action” for PLAYER_CONTAINER_MANIPULATE (by kelvinjunilson)
  • #522 Compatibility with ‘ItemsAdderV1’ (by FlameCat)
  • #550 Suggestion - OR Condition with multiple options (by AshenGaming)
  • #551 SUGGESTION PLAYER_MOB_INTERACT (by timmy0707)
  • #554 Global variable (by pristatauminecraft84)
  • #587 Suggestion: Breed Objective (Ex. breed 5 horses) (by MyTale)
  • #589 Suggestion: Tier name option for QuantumRPG objects. (by MyTale)
  • #590 Suggestion: Brewing Objective (by MyTale)
  • #609 A suggestion: PLAYER_MMOITEMS_ITEM_PICKUP (by BastaMasta)
  • #613 SUGGESTION: Server Variables (by Leopled)
  • #615 SUGGESTION: Variables to be given a primitive type modifier (by Leopled)
  • #616 SUGGESTION: Add - PLAYER_MOB_BREED (by nikita.sineiko)
  • #617 SUGGESTION: Add - ELYTRA_FLIGHT_DISTANCE (by nikita.sineiko)
  • #630 GPS Spam when QC quest is active (by denisamania)
  • #165 GPS Feature (by phamductrungbmt)
  • #207 Suggestion: Search Type (by timmy0707)
  • #290 SUGGESTION GPS (by timmy0707)
  • #239 suggestion condition slot (by Yuky-Mystic)
  • #241 DIVERGE object GUI option (by junpark8903)
  • #249 Suggestion - PLAYER_MOB_FEED object (by bccyv)
  • #272 delay_repeat_message_goto_not_reached: (by Lordinouille)
  • #361 SUGGESTION pre quest dialog (by timmy0707)
  • #351 Suggestion missing Config Option to stop Quests from auto sorting (by quorn23)
  • #338 Mission zone (by Lordinouille)
  • #296 Quest Differ with Permission in Same Menu (by MacTonight8)
  • #325 SUGGESTION object diverge amount limit (by timmy0707)
  • #348 SUGGESTION SERVER_ITEM_EDIT (by timmy0707)
  • #273 create an hologram object above cinematics client side npc (by pigmen26gamesYT)
  • #370 SUGGESTION item particle (by timmy0707)
  • #396 Hologram aesthetics and function (by techdude404gaming)
  • #374 custom message checkpoint (by Lordinouille)
  • #230 GangPlus Support (by AlessioTW)
  • #378 SUGGESTION QuestPoint Placeholder (by timmy0707)
  • #362 SuperiorSkyblock integration (by Faceless0102)
  • #381 Shopkeeper Plugin Support (by AkiraKokiri)
  • #382 Object PLAYER_CITIZENS_NPC_DELIVER_ITEMS (by Hellgato)
  • #397 [Suggestion] - gvariables & variables settings (by Hellgato)
  • #399 SUGGESTION different progression text for delegates when completed (by timmy0707)
  • #634 DAY_OF_MONTH condition (by emohobo)
  • #434 [Suggestion] Object area (by Lordinouille)
  • #444 [Suggestion] add name_contains, lore_contains etc (by Lordinouille)
  • #398 Intégration de MMOCore (by jajamic)
  • #411 MMOCore Support Suggestion (by ItsSniper)
  • #422 [Suggestion] MMOCore EXP/Party intergration. (by gitoez)
  • #439 Will QuestCreator support MMOCore? (by easonchu)
  • #604 Suggestion: MMOCore’s variables condition (by harunalisa10)
  • #404 Support for MCMMO Overhaul (by NolanMC)
  • #624 Support mcMMO Overhauled (by viveleroi)
  • #445 SUGGESTION object setting invisible (by timmy0707)
  • #447 SUGGESTION new object (by timmy0707)
  • #453 SUGGESTION ingame editor color code tolowercase (by timmy0707)
  • #464 Reception data ( suggested feature) (by hammad_alhassan)
  • #467 execution_chance and progress_chance fail goto’s (by timmy0707)
  • #469 SuperiorSkyblock2 Hook for QuestCreator (by studiotadikl)
  • #476 Suggestions for location (by HuJunwei23333)
  • #462 TokenEnchant Feature (by miwasakytb)
  • #487 SUGGESTION npc id auto detect (by timmy0707)
  • #493 Possibility to delete old Userdata (by maxklug1999)
  • #510 NPC conversation suggestions (DIVERGE OBJECT) (by gingycraft)
  • #535 Suggestion - hiding completed objectives from the scoreboard in a GROUP object (by Silvark)
  • #541 Quantum rpg: level system integration (by koviazin.pro)
  • #559 New variable: running_concurrent_quest_count (by kelvinjunilson)
  • #586 Suggestion: Option to remove vanilla lore on GUI items. (by MyTale)
  • #623 Quetes entre membres d’ile (by WarnDangerous)
  • #501 SERVER_ACTION_LIST Argument Addition Request (by techdude404gaming)
  • #521 Ajouter une commande pour ouvrir le journal directement (by titidelaff)
  • #620 [SUGGESTION/BUGFIX] Please FIX quest MOVEMENT & ORDER (by nikita.sineiko)
  • #618 SUGGESTION: Add - PLAYER_SWIM_DISTANCE (by nikita.sineiko)
  • #581 Execute Denizen scripts Support (by Renin)
  • #591 DungeonXL condition: location (by koviazin.pro)
  • #592 Suggestion: Add option to detect mobs spawned by spawners (by deadfish12)
  • #597 Condition INVENTORY_FREE_FOR (by Lordinouille)
  • #600 Suggestion: progress_sound (by juankaplay)
  • #635 Server stall on boot, appears related to player head web requests (by viveleroi)
  • #629 NuVotifier Integration not working (by viveleroi)
  • #632 HONEY_LEVEL block state (by GuillaumeVDN)
  • #614 SUGGESTION: Co-op leave via command (by Leopled)
  • #598 Suggestion: Better support for brewing and repairing (by MyTale)
  • #638 SUGGESTION configurable region activator (by timmy0707)
  • #637 Add sounds to GUI (by Tactical_Spatula)
  • #633 QC recode : SERVER_ACTION to play a particle script at a certain position (by GuillaumeVDN)
  • #599 Suggestion: Particles in OBJECTS (by MrFeikon)
  • #619 SWEET_BERRIES cannot be identified in the GUI ITEM (by johnsoncui02)
  • #629 NuVotifier Integration not working (by viveleroi)
  • #561 SOME or maybe MANY RE-CODING SUGGESTION (by timmy0707)
  • #610 SUGGESTION: ADD HEX COLOR SUPPORT - 1.16 (by MrFeikon)
  • #507 Add CMI Bossbar support (by AshenGaming)
  • #335 Multiserver Support (by Cerexus)
  • #359 Suggestion plugin integration Boss (by jimmyyeung06)
  • #438 Quest Menu empty until /quest progress (by CM_lectric)
  • #315 “PLAYER_CHAT_VARIABLE” Problem (by Mr_Mint_)
  • #206 items: amout: 1 problem and shitty way of being coded <3 (by Lordinouille)
  • #570 BUG quest queue (by timmy0707)
  • #495 cancel_event for object PLAYER_CHAT (by PizzaMC)
  • #389 BUG ScoreBoard (by timmy0707)
  • #419 [Suggestion] Option to specify item/mob type in the object “forbidden” setting (by deadfish12)
  • #456 Quest Progress Placeholders not formatted with Commas (by CM_lectric)
  • #449 BUG scoreboard text (by timmy0707)
  • #483 {objective_goal} value distorting at 10 billion (by CM_lectric)
  • #485 player rank cause huge lags (by Dusan7991)
GuillaumeVDN的插件文档
页面

GuillaumeVDN的插件文档 · 迁移

所有插件都有的常见内容

配置 · 杂项 · 关联

QuestCreator

基础内容 · 示例 · 详细特性 · 高级内容 · 关联