The conventional MMORPG skill system

 


Generalized say, content and combat settlement related are considered skill system, including skills, information management, skills call interface, skills, goals look, skills, performance, skills settlement, skills creation body (buff / spell field / ballistics) management, in addition to modules covered include: AI module (skills caller), the action module, wayfinding / mobile module, and character attributes and values damage settlement.

Let me talk about the responsibilities and skills under the principle of each part of the module:
 

  • Information management skills: management unit have the skills and skill levels, cd and so on. In our game, there is also need to manage Rune, Rune skill information will be modified.
  • Skill Call Interface: AI or UI operation triggers skills, may have chosen a target (AI) is triggered skills, but also may not be the goal.
  • Practical process management: a plurality of sub-skill skill possible to perform a combination mode of the mobile, and for each skill execution there is a final process is performed, generally comprising: a roll former Process - Clearing Point - after shaking procedure. Skills into the real skills of the front end shake when the settlement process, settlement process can create a bullet, it could trigger buf or to create magic field.
  • Skill Find: already set a target skills unit (such as the monster AI release skills) If the skill is triggered, it will directly target unit, or to choose a target based on a certain strategy. In addition, when the release of the skills required to release information such as direction and a release position, it is also available through this module.
  • Performance skills: Skills release process, we need to create the appropriate special effects, and perform the appropriate action.
  • Skills creation body (buf / Ballistic / magic field) Management: buf hanging in the unit body, which may affect some of the behavior and state unit of; spell field general by the scene management, affect the unit within the scene in a certain range; trajectory is skills to create a bullet, the bullet may move to a different route (straight line / parabola / direct hit, etc.)


1, skills table

first of all say that the basic ideas under realization skills. The basic idea is to achieve skills by completing the form planned to be formulated into certain skills, in the implementation of certain skills, respectively, according to the contents of these tables to determine how performance skills. The basic logic is:

  1. if skillTable.get ( "movement skills"):
  2.      paly action
  3. if skillTable.get ( "effects"):
  4.      Playback effects
  5. if skillTable.get ( "magic field"):
  6.     Creating magic field
  7. ....
Copy the code


2, information management skills

when unit is created, the module management unit may use what skills, such as games in which players can choose which skills to use.

Upgrade the skills of the game, add a little skill, management skill pool in this module.

This module also requires management to modify the skill level / Rune / equipment such as an external module on the skill parameters.

3, skills call interface

provides an interface for AI or player operation invocation skills called, can provide a target unit when called, may not provide the skills to make themselves look.

It provides three interfaces:
 

  • Skill start skill_enter: begin execution skills, if the skills are not cycle, the skills can automatically end.
  • Skill end skill_exit: Some skills can not be the end of their own, such as some cycling skills, skills for circulating the player can hold the button has been released. Release the button when the player is called skill end interface to tell the end of the current skills so that, after this time skill reaches the point of shaking, skills no longer continue.
  • Skill Stop skill_stop: When a skill is forced to interrupt, such as being attacked, dizziness, lack of blue, skills will be forced to stop.


In addition, new skills to start calling the current executing a skill, then new skills call information will be saved. In general, all new skills will not call the saved information, as it becomes a sequence of execution of skills. We save the game only a new skill call information.

In general, as little skill module provides an interface for the upper logical using AI / UI etc., can be effectively decoupled from the AI and UI.

4, process management skills

skills process discussed here two points:

(1) a plurality of sub-skill skill possible to combine a certain pattern.

A plurality of sub-skill skill is often a combination of a certain mode, such as a triple click section, such as Emergency cut (first charge after cut) and the like, there is even choose to perform a different sub-environments depending on the skills. Demand planning analysis found that skills can be divided into a tree structure, the tree structure is very similar to the behavior of the tree, the same node can be divided into control nodes and node execution, even including the condition node. To this end, we project to introduce the concept of a skill tree to describe the data structure.

(2) a specific skill (skill tree execution node) has a fixed execution flow. This process is generally: Shake before the procedure, before the end of the process of shaking = skill clearing point in time, after shaking point in time.

4.1 skill tree

skill tree reference to the traditional behavior of the tree design, using a tree structure to control the flow of execution skills.

Skill trees and behavior tree is similar in structure, but there is a big difference in the operating logic.

First, focus on skill tree is not the context to select an appropriate node based on the execution, but to a certain strategy will traverse the execution skill tree from start to finish again.

Secondly, there is no concept of tick skill tree, but on the callback, such as a sequence of nodes, the nodes in order after a child node is finished, immediately notify the order of the nodes, the lower order node performs a child node, until the last child node of the order node is finished, the order of the nodes will notify the parent (if any) it has already been implemented.

In addition, in order to complete some of the demand for skills, control nodes tend to hold more control information to control the flow of execution of child nodes. Specific information provided in accordance with the planning requirements, such as the order of the node and the cycle properties include atomic properties. If a node has a sequence of atomic properties, then the nodes along the tree will not be executed during the end, only the end of all the sub-node can perform end.

With our game fighters Pugong three sections strike as an example:
 


Strike itself is a three-stage sequence node, skills began when implementing the three children of this node order. For the first child, it is still an order of the nodes, the first assault before the target unit to the body, then slashing the target units. However, the node also includes a charge for condition Condition, and when the close distance to the target, the charge node is skipped, directly slashing.

Pu Gong is a cycle skills, the skills of the players as long as the release button is not lit, skills will have been executed, so the root node (Pu Gong) is a sequence of nodes with cyclic properties. As for the sub-skills 1 (control node), he is a property of atoms with a sequence of skills, that is, when the unit is assault, the player release the button, the unit will complete the implementation will be released after slashing skills.

! About skill trees and thinking of using

design thinking skill tree began that process and the implementation of some skill tree similar behavior, such as the implementation of a series of sub-skills in a certain order, such as determining the flow of execution of skills depending on the context. Briefly, introduction of skill tree has the following advantages: a capability to make the module portion skill AI can be obtained, so that the strong correlation between AI and skills on the logic module allows Practical skills and AI module reduces coupling module 2 can clearly. the description of skills processes 3. using the tree increase scalability, planning can design a variety of complex skills.

The nice thing about 1, for example: butcher boss's skills can hook the player to pull over, pull over if successful, boss performs a sub-attack skills, or do not perform. By this way you can hook people and attack as two sub-skills constitutes skill tree, there is a condition to attack the sub-skills course, that the judge a sub-skill success.

Skill tree slowly found some problems in the use of, first, the synchronization requires skill tree for each tree node synchronization, synchronous increase the burden, secondly, skill itself does not have too complex control structures.

To do this, then we have the skill tree has been optimized:
 

  • Simplify the synchronization information no longer synchronize all nodes enter ( "synchronization skills module," with particular reference to Article) / exit information.

 

  • Cancel parallel nodes, do more than one thing at the same time realize a header by expanding skills.


The final skill tree substantially only sequential / random two control type node, the node has a milder condition function.

Process nodes perform skills 4.2

In general, the skill of the implementation process, including:

pre-roll time: skill start, but the real skill of the settlement process has not yet begun. After the start of skills, performance-related special effects and action will start playing.

Shake before the end of time: the beginning of the real skills of the release and settlement before the end when shaking skills, so after the end of the roll, skills, real skills before release and settlement. Release including the creation of a corresponding trajectory / spells field and buff.

After shaking skill points: When playing skills to shake after a point in time, the real skill end. At this time, skills and character actions corresponding effects likely to continue to play, but the skills process has officially ended. In other words, the next skill can be performed.

5, skills, goals look

upon skills of the release, the target may have been passed on skills module by the AI, there may not be a goal, such as the player control units.

When casting a spell skill games, trajectory, it is important that the direction of skills rather than general skills, goals, skills, get a target object later, is the interpretation of those skills to the target direction.

In addition, the direction of skills may require some configuration, such as locking the front shake (shake before the process of moving targets, skills, direction change), UI can be controlled (skills of the release process, the player can control the release of UI by controlling the direction of skills).

6, performance skills,

skills, performance include action, special effects, shader, and sound effects. Among them, more complex effects, you need to configure the content will be more. For example, some special effects to hang on the model, some special effects to hang in the scene. For the field of special effects magic, magic games, respectively, can be divided into beginning, settlement, the end of the special effects, respectively, at the start of the magic field, the time of settlement, displayed at the end. For the buff is similar.

7, ballistics, and buff spells field skills such as creation of body

Narrow sense, the skills are only responsible for the execution process skills (skill tree management and process management skills), but the real skill is the main settlement of its creation settlement body. When the shaking skills come into force before the end, skills and magic to create the corresponding trajectory field, there may be generated when the corresponding buff spells hit the enemy ballistic field.

In general, the field is a magic block detection areas of a scene, the magic field detector at intervals of enemies in this area, and its settlement attack.

Ballistic is a kind of abstract movement path of the bullet, create a ballistic effects, says a bullet moving along this trajectory and detect enemies on the path.

buff is a state having a duration of hanging in the unit body, the state produced some positive or negative impact on the unit, and within this period of time, from time to time carry out an injury settlement.

It is not fixed for the function definition between skills, spells field, buff, such skills can directly cause harm to the unit, the field magic can damage the unit, even skills can only create magic games, magic games can only detect targets can not hurt, can only hang buff, and all injuries are settled by buff. Of course, this is not necessarily good, in general, skills and spells field can cause damage to the unit.

In short, the creation of defined body functions need to be adjusted according to demand planning, efficiency considerations and other factors.

7.1 Buff state

Buff is hanging in the unit body for a certain period of beneficial or harmful to the state, where state = buff.

Buff module should be noted that there is a relationship between Buff, such as rejection (A state, state B not hang up), clearance (A hang state while causing the disappearance of the B-state) and the like.

To achieve the above function, the easiest way is to fill in the state A direct relationship status field state, state A as rejection status B / C / D / E ... , A cleared state X / Y / Z ....

The implementation of the above there is a problem, and so do the game late, we have thousands of buff state, then a magic immune status, planning status may need to fill in a form of rejection thousands.

To solve this problem, you can use the classification of the ideas to solve. Define certain rules between state and another state.

Based on the above idea, the introduction of a concept of state called buff atoms, atomic state indicates a class of state, such as deceleration, forbidden magic, the magic-free, floating, dizziness, etc., etc. Sheep.

Prior to the unit linked to a new buff, query the relationship between the state of this buff to hold some atomic atomic state and units who have judged the new atomic state what actions should be used according to the unit body existing atomic state deal with.

What behavior here is the rule between the atomic state representatives, such as exclusion. These rules allow planners to fill a table called "atomic state relations", this table is a two-dimensional array of n * n, n is an all atoms in the number of state of the game.

The number of atoms in states far less than the number of buff, it is possible to easily define those rules.

7.2 magic field

spell description field effect on a region, this region may be a detection intervals, the detection unit in this region, and the unit settled.

Spell field requires attention to a problem, is a magic field every settlement may be settled using different parameters, such as a skill, the first settlement were dazed for each unit, the second unit of the settlement of the damage.

More direct way to solve this problem is to create two magic skill games directly, each spell field once settled, the second spell field is created with the delay time. But there is a problem in this way, it is possible to make a settlement plan needs ten times and each time the settlement parameters are different spells field. So, a skill at certain time intervals to create a field of magic, spells while management field has a certain cost, resulting in reduced efficiency.

To solve this problem, we optimize the implementation mechanism of settlement of magic field, added a new field of magic: the magic sequence field. Such planning may be configured magic spell field time between each field interval and billing clearinghouse spell each field parameters used

Published 11 original articles · won praise 8 · views 80000 +

Guess you like

Origin blog.csdn.net/a1047120490/article/details/105107851