Information processing method and device in game, electronic equipment and storage medium

By creating a global formula structure and character formula data in the game, the problems of memory waste and cumbersome development process caused by iterative attribute value calculation formulas were solved, enabling quick and intuitive formula modification and display, and improving the game's operational stability.

CN115390899BActive Publication Date: 2026-11-06NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211013653.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2026-11-06
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In games, the existing formulas for calculating attribute values ​​require multiple iterations and modifications, resulting in wasted memory and a cumbersome development process. Furthermore, game designers cannot quickly observe how the formulas perform in the game.

Method used

By creating a global formula structure, formula data is separated from the formula structure. A global formula structure is generated, and unique character formula data is generated for each virtual object. Attribute values ​​are updated in response to triggered events, and the modified effects are displayed in the game.

Benefits of technology

It simplifies the R&D process of formula modification and iteration, reduces memory consumption, and enables game designers to quickly and intuitively observe the performance of formulas in the game, thus improving operational stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390899B_ABST
    Figure CN115390899B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for information processing in games, including: reading a configuration file; generating a global formula structure for attribute calculation formulas in the game based on the topological relationships between parameter nodes; generating character formula data corresponding to the target attributes of at least one virtual object created in the game; and updating the target attributes of the target virtual object under the trigger event in the game based on the global formula structure and the character formula data corresponding to the target virtual object, in response to a trigger event for a target virtual object among the at least one virtual object. This application effectively reduces memory consumption by creating a global formula structure and separating the formula data from the formula structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, and in particular to an information processing method, apparatus, electronic device and storage medium in games. Background Technology

[0002] In games, it is often necessary to calculate the attribute values ​​of a large number of virtual objects. A good attribute value calculation formula is often the foundation of a game, and a good attribute value calculation formula often needs to be modified and iterated many times.

[0003] Currently, when loading attribute value calculation formulas in games, attribute calculation data is usually created separately for each virtual object, resulting in multiple copies of the attribute calculation data and wasting memory. Summary of the Invention

[0004] In view of this, embodiments of this application provide at least one information processing method, apparatus, electronic device, and storage medium in a game, which effectively reduces memory consumption by creating a global formula structure to separate formula data from the formula structure.

[0005] In a first aspect, an exemplary embodiment of this application provides an information processing method in a game, comprising: reading a configuration file, the configuration file recording each parameter node in an attribute calculation formula for a target attribute and the topological relationships between each parameter node; generating a global formula structure in the game for the attribute calculation formula based on the topological relationships between each parameter node; generating character formula data corresponding to the target attribute possessed by each virtual object for at least one virtual object created in the game, the character formula data including node attribute values ​​corresponding to each parameter node; and updating the target attribute of the target virtual object under the triggering event in the game based on the global formula structure and the character formula data corresponding to the target virtual object, in response to a triggering event for a target virtual object among the at least one virtual object.

[0006] In one possible implementation, the global formula structure includes each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. The ancestor node refers to a node in the attribute calculation formula whose node attribute value can be affected by the corresponding parameter node.

[0007] In one possible implementation, the target virtual object's target attribute under the triggering event is updated by: determining, from the attribute calculation formula for the target attribute, an update node whose node attribute value is updated due to the triggering event; based on the global formula structure, determining at least one ancestor node with a calculation relationship to the update node, and the calculation relationship between the update node and each ancestor node; for each determined ancestor node, determining the ancestor node's node update value according to the calculation relationship between the ancestor node and the update node, based on the node update value of the update node after being affected by the triggering event; and updating the target virtual object's target attribute under the triggering event based on the node update value of the update node and the node update values ​​of each ancestor node.

[0008] In one possible implementation, character formula data corresponding to the target attribute of each virtual object is generated by: determining each parameter node in the attribute calculation formula of the target attribute according to the global formula structure; and for each virtual object, reading the node attribute values ​​corresponding to each parameter node from the game to form the character formula data corresponding to the virtual object.

[0009] In one possible implementation, the triggering event includes any of the following: a simulated control command entered in a command window, wherein the simulated control command is a simulated command that acts on a target virtual object and is used to affect changes in the target attribute, and the command window is a program window created for the target attribute and used to monitor changes in the attribute value of the target attribute; or a triggering event generated in the game scene of the game, wherein the triggering event is a triggering action that acts on the target virtual object and is used to affect changes in the target attribute.

[0010] In one possible implementation, the method further includes: displaying the target attributes of the target virtual object under the triggering event, wherein the target attributes of the target virtual object under the triggering event are displayed in the following manner: presenting the node update values ​​of the target ancestor nodes and / or the attribute values ​​of the target attributes in the command window, wherein the target ancestor nodes are each ancestor node that has a calculation relationship with the updating node, and the updating node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the simulation control command; and displaying the target attributes of the target virtual object under the triggering event in the game scene of the game.

[0011] In one possible implementation, the target attribute of the target virtual object under the triggering event is updated in the following way: the character formula data corresponding to the target virtual object is updated according to the node update value of the update node and the node update value of the ancestor node corresponding to the update node, wherein the update node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the triggering event; the attribute value of the target attribute possessed by the target virtual object is determined based on the updated character formula data; and the target attribute of the target virtual object under the determined attribute value is updated in the game.

[0012] In one possible implementation, the method further includes: searching for target code that matches the target attribute from the game's preset code library; using the found target code, loading the attribute calculation formula for the target attribute into the game, so as to display the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0013] In one possible implementation, the preset code library stores attribute calculation formulas for different attributes, the formula structure of each attribute calculation formula, and the corresponding code for each attribute calculation formula. The step of searching for target code matching the target attribute from the game's preset code library includes: searching the game's preset code library for the existence of an attribute calculation formula corresponding to the target attribute; if it exists, determining whether the formula structure of the target attribute's attribute calculation formula is consistent with the formula structure of the searched attribute calculation formula; if consistent, identifying the code in the preset code library corresponding to the searched attribute calculation formula as the target code.

[0014] In one possible implementation, the topological relationship between each parameter node includes ancestor nodes that have a computational relationship with the parameter node and the computational relationship between the parameter node and each ancestor node. The step of generating a global formula structure for the attribute calculation formula in the game based on the topological relationship between the parameter nodes includes: creating a structure entry for each parameter node in the attribute calculation formula, each structure entry including ancestor nodes that have a computational relationship with the parameter node and the computational relationship between the parameter node and each ancestor node; and forming the global formula structure from the structure entries corresponding to all parameter nodes.

[0015] In one possible implementation, the configuration file is generated as follows: determining the in-degree of each parameter node in the attribute calculation formula for the target attribute; constructing a directed topology graph of the attribute calculation formula, wherein the directed topology graph includes topology nodes and directed edges, each topology node corresponds to a parameter node in the attribute calculation formula, parameter nodes with an in-degree of zero in the attribute calculation formula are determined as leaf nodes of the directed topology graph, two topology nodes with a calculation relationship are connected by directed edges, and the edge attribute of each directed edge is used to record the calculation relationship between the two connected topology nodes; based on the constructed directed topology graph, determining the ancestor node corresponding to each parameter node and the calculation relationship between each parameter node and its corresponding ancestor node to form the configuration file.

[0016] Secondly, an exemplary embodiment of this application provides an information processing device for a game, comprising: a file reading module for reading a configuration file, the configuration file recording each parameter node and the topological relationship between each parameter node in an attribute calculation formula for a target attribute; a structure generation module for generating a global formula structure in the game for the attribute calculation formula based on the topological relationship between each parameter node; a data creation module for generating character formula data corresponding to the target attribute of each virtual object created in the game for at least one virtual object, the character formula data including the node attribute value corresponding to each parameter node; and an attribute update module for updating the target attribute of the target virtual object under the triggering event in the game based on the global formula structure and the character formula data corresponding to the target virtual object, in response to a triggering event for a target virtual object among the at least one virtual object.

[0017] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the information processing method in the game in the first aspect or any possible implementation of the first aspect.

[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the information processing method in the game as described in the first aspect or any possible implementation of the first aspect.

[0019] The information processing method, apparatus, electronic device, and storage medium in the game provided in this application embodiment effectively reduce memory consumption by creating a global formula structure and separating the formula data from the formula structure.

[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating an exemplary embodiment of this application shows a method for processing information in a game.

[0023] Figure 2 A flowchart illustrating the steps for generating a configuration file provided in an exemplary embodiment of this application;

[0024] Figure 3 A directed topological graph illustrating the attribute calculation formulas provided in an exemplary embodiment of this application is shown.

[0025] Figure 4 A flowchart illustrating the steps for determining the target attributes of a target virtual object under a triggering event, as provided in an exemplary embodiment of this application;

[0026] Figure 5 This diagram illustrates the determination of target attributes provided by an exemplary embodiment of this application.

[0027] Figure 6 A flowchart illustrating the steps of displaying target attributes in a game scene provided by an exemplary embodiment of this application;

[0028] Figure 7 A flowchart illustrating the steps of loading attribute calculation formulas in a game according to an exemplary embodiment of this application;

[0029] Figure 8 A flowchart illustrating the steps of determining the target code of the attribute calculation formula provided in an exemplary embodiment of this application;

[0030] Figure 9 This invention provides a schematic diagram of the structure of an information processing device in a game according to an exemplary embodiment of this application.

[0031] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0033] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.

[0034] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.

[0035] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0036] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0037] In games, it is often necessary to calculate the attribute values ​​of a large number of virtual objects. A good attribute value calculation formula is often the foundation of a game, and a good attribute value calculation formula often needs to be modified and iterated many times.

[0038] Currently, the development process for attribute value calculation formulas is as follows: After the game designer designs the attribute value calculation formula, they notify the corresponding developers, who then develop and upload the code corresponding to the formula. The game designer then notifies the game designer, who updates the code and then checks the specific implementation of the designed attribute value calculation formula in the game.

[0039] In the above approach, the development chain—from game designer to game developer and back to game designer—is very long. Game designers cannot quickly observe the performance of their designed formulas in the game. Furthermore, if frequent iterations of the formulas are required, the above development process must be repeated continuously, making the entire development workflow extremely cumbersome.

[0040] Furthermore, when loading attribute value calculation formulas in a game, attribute calculation data is usually created separately for each virtual object. Each attribute calculation data includes a formula structure and formula data. This results in the formula structure in the attribute calculation data being repeated multiple times, leading to a waste of memory.

[0041] In response, this application proposes an information processing method, apparatus, electronic device, and storage medium for games to overcome at least one of the above-mentioned problems: simplifying the R&D process of iterative formula modification, enabling convenient formula modification while intuitively observing the results of the modified formula, and reducing memory consumption.

[0042] To facilitate understanding of this application, the following provides a detailed description of the information processing methods, apparatus, electronic devices, and storage media in games provided in the embodiments of this application.

[0043] Please see Figure 1 The flowchart of the information processing method in the game provided as an exemplary embodiment of this application specifically includes:

[0044] Step S101: Read the configuration file. Here, the configuration file records the parameter nodes in the attribute calculation formula for the target attribute and the topological relationships between these parameter nodes.

[0045] In this embodiment of the application, a configuration file can be assigned to each attribute in the game. For example, the aforementioned attribute may refer to the state attribute of a virtual object in the game.

[0046] For example, in a game, multiple players join the same virtual match. After entering the virtual match, different identities are assigned to the virtual objects controlled by different players. By assigning different identities, different factions are determined, and players can win the game by performing tasks assigned by the game at different stages of the virtual match.

[0047] As an example, virtual objects can refer to both controlled and uncontrolled virtual objects in a virtual environment. Controlled virtual objects can be virtual characters controlled by the player, including but not limited to at least one of virtual characters, virtual animals, and anime characters. Uncontrolled virtual objects can be virtual characters not controlled by the player (NPCs), or virtual objects, referring to static objects in a virtual scene, such as terrain, houses, bridges, and vegetation. Static objects are often not directly controlled by the player, but can respond to the interactive behaviors of virtual objects in the scene (e.g., attacking, demolishing, etc.) and exhibit corresponding behaviors. For example, virtual objects can demolish, pick up, drag, and build buildings. Optionally, virtual objects may not respond to the interactive behaviors of other virtual objects. For example, virtual objects can also be buildings, doors, windows, and vegetation in a virtual scene, but virtual objects cannot interact with them. For instance, virtual objects cannot destroy or demolish windows. Optionally, when the virtual environment is a three-dimensional virtual environment, virtual objects can be three-dimensional virtual models. Each virtual object has its own shape and volume in the three-dimensional virtual environment and occupies a portion of the space in the three-dimensional virtual environment. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology. This virtual object achieves different external appearances by wearing different skins. In some implementations, the virtual object can also be implemented using a 2.5D or 2D model, and this application embodiment does not limit this.

[0048] In a virtual match, there exists battle status data and state attributes of virtual objects. For example, battle status data may refer to parameters used to describe the battle scene of the virtual match; that is, it may include all battle scene factors and / or battle environment factors that can affect the battle. For example, battle status data may include at least one of the following: map attributes, shrinking poison gas time, and shrinking poison gas range. Battle status data does not change with the interaction behavior of virtual objects in the virtual match.

[0049] In the embodiments of this application, the state attribute of a virtual object can refer to a parameter used to characterize the virtual ability of the virtual object in the game. This virtual ability reflects the combat ability of the virtual object in the virtual game. In other words, virtual ability can be used to characterize the interactive ability of the virtual object in the game.

[0050] For example, the state attributes of a virtual object may include, but are not limited to, at least one of the following: virtual health points, attack attribute, defense attribute, and appearance attribute. The attack attribute is used to represent the degree of damage caused by the virtual object when it launches an attack on the target virtual object, and the defense attribute is used to represent the strength of the virtual object's defense when it is attacked.

[0051] For different state attributes of virtual objects, a corresponding attribute calculation formula is usually designed to determine the state attributes that the virtual object possesses in the game. This attribute calculation formula includes various factors that can affect the changes of the state attribute.

[0052] In an exemplary scenario, the aforementioned attack attributes may include physical attack strength, physical attack bonus coefficient, magic attack strength, magic attack bonus coefficient, etc., wherein the physical attack bonus coefficient or the magic attack bonus coefficient is determined comprehensively based on the virtual object's character characteristics, the equipment currently worn by the virtual object, the runes currently equipped by the virtual object, and the skin currently used by the virtual object. The aforementioned defensive attributes may include physical defense strength, magic defense strength, etc.

[0053] For example, formulas typically begin with an equal sign (=), and all or some elements in an attribute calculation formula may include the following items: variables, constants, and operators. As an example, a variable may refer to a quantity that changes as the virtual object interacts with the game; a constant may refer to a value that does not require calculation; and an operator may refer to arithmetic operators. For example, arithmetic operators may include operators used to represent the four arithmetic operations (i.e., addition, subtraction, multiplication, and division). It should be understood that other forms of operation may also be included in attribute calculation formulas.

[0054] The following reference Figure 2 This section will introduce the process of generating configuration files.

[0055] Figure 2 A flowchart illustrating the steps for generating a configuration file provided by an exemplary embodiment of this application is shown.

[0056] Reference Figure 2 In step S201, the in-degree of each parameter node in the attribute calculation formula for the target attribute is determined.

[0057] Here, the in-degree of a parameter node can refer to the number of times a parameter node's value is affected by other parameter nodes, or it can refer to the number of directed edges ending at that parameter node. The leaf nodes of the directed topology graph are then determined based on the calculated in-degree. It should be understood that this application is not limited to this, and leaf nodes can also be determined in other ways.

[0058] In step S202, a directed topological graph of the attribute calculation formula is constructed.

[0059] Here, the directed topology graph includes topology nodes and directed edges. Each topology node corresponds to a parameter node in the attribute calculation formula. The parameter node with an in-degree of zero in the attribute calculation formula serves as the leaf node of the directed topology graph. Two topology nodes with a calculation relationship are connected by directed edges. The edge attribute of each directed edge is used to record the calculation relationship between the two connected topology nodes.

[0060] In step S203, based on the constructed directed topology graph, the ancestor node corresponding to each parameter node and the computational relationship between each parameter node and its corresponding ancestor node are determined to form a configuration file.

[0061] Here, the ancestor nodes corresponding to each parameter node include all nodes on the path from the parameter node to the root node, but do not include the parameter node itself.

[0062] The following reference Figure 3 The example shown illustrates the process of generating a configuration file based on the attribute calculation formula designed by the game designer, using topological sorting to parse the formula.

[0063] Figure 3 This illustrates a directed topological graph of the attribute calculation formulas provided in an exemplary embodiment of this application.

[0064] In this example, taking the virtual object's virtual health in the game as the target attribute, the virtual health (HP) can be calculated using the following formula:

[0065] HP = BASE_HP + VAR_HP

[0066] BASE_HP = 10 × CON

[0067] CON = BASE_CON + VAR_CON

[0068] In the above formula, HP represents the virtual object's virtual health (such as health points), BASE_HP represents the virtual health portion resulting from the virtual object's fixed attributes, and VAR_HP represents the increased virtual health portion resulting from buffs in the game. For example, fixed attributes may include, but are not limited to, at least one of the following: the virtual object's character traits, class traits, character level, and equipped items; buffs may include altering the virtual object's virtual health by applying magic or potions to the virtual object.

[0069] CON represents the "body" attribute of the virtual object. The BASE health of the virtual object is 10 times the stamina value. BASE_CON represents the stamina value brought by the fixed attributes of the virtual object. VAR_CON represents the stamina value brought by the buffs in the game.

[0070] The above formula for calculating virtual life value can be abstracted into a directed acyclic graph, that is, Figure 3 The directed topology graph is shown below. In this example, the number of times a parameter node's value is affected by other parameter nodes is called the in-degree of that parameter node. Parameter nodes with an in-degree of 0 are identified as leaf nodes. For the attribute calculation formula for calculating virtual health values ​​mentioned above, BASE_CON, VAR_CON, VAR_HP, and 10 are all leaf nodes.

[0071] After constructing the directed topology graph described above, topological sorting can be used to sort the parameter nodes in the attribute calculation formula, assign a number to each sorted parameter node, and determine the ancestor nodes that will be affected by the modification of the value of the parameter node, so as to form the node parameter table of each parameter node in the attribute calculation formula shown in Table 1 below.

[0072] Table 1

[0073] Node Name Parameter node number Ancestor node number BASE_CON 1 5、6、7 VAR_CON 2 5、6、7 10 3 6、7 VAR_HP 4 7 CON 5 6、7 BASE_HP 6 7 HP 7

[0074] In this embodiment of the application, referring to Table 1, the topological relationship between each parameter node includes the ancestor node that has a computational relationship with the parameter node and the computational relationship between the parameter node and each ancestor node.

[0075] In one embodiment of this application, a configuration file containing the attribute calculation formula for the target attribute can be generated offline for subsequent game loading. It should be understood that this application is not limited to this; the configuration file can also be generated online or in other ways to view the design effect of the attribute calculation formula in real time.

[0076] return Figure 1 Step S102: Generate a global formula structure for the attribute calculation formula in the game based on the topological relationship between each parameter node.

[0077] In this embodiment of the application, a target attribute in the game corresponds to only one global formula structure. That is, all calculations involving the target attribute in the game rely on a global formula structure, which avoids the repeated creation of formula structures and can effectively reduce memory consumption.

[0078] Here, the global formula structure is used to represent the layout structure between parameter nodes in the attribute calculation formula and the dependencies between them. For example, the global formula structure may include each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. As an example, an ancestor node refers to a node in the attribute calculation formula whose attribute value can be affected by the corresponding parameter node. The ancestor node corresponding to a parameter node can be empty, or it can be one or more ancestor nodes.

[0079] For example, the global formula structure for attribute calculation formulas in the game can be generated as follows: For each parameter node in the attribute calculation formula, create a structure entry. Each structure entry includes ancestor nodes that have a calculation relationship with that parameter node, as well as the calculation relationships between that parameter node and each ancestor node. The global formula structure is formed by the structure entries corresponding to all parameter nodes (see [reference]). Figure 5 (As shown).

[0080] Step S103: For at least one virtual object created in the game, generate character formula data corresponding to the target attributes of each virtual object.

[0081] In this embodiment, after reading the configuration file generated in the above steps, a unique set of character formula data is also generated for different virtual objects in the game when generating the global formula structure. This separation design can greatly reduce the memory usage during game runtime and avoid the memory waste caused by multiple duplicate formula structures.

[0082] For example, the character formula data corresponding to each virtual object includes each parameter node in the attribute calculation formula for the target attribute and the node attribute value corresponding to each parameter node.

[0083] In a preferred embodiment, character formula data corresponding to the target attribute of each virtual object can be generated in the following way: based on the global formula structure, determine each parameter node in the attribute calculation formula of the target attribute; for each virtual object, read the node attribute values ​​corresponding to each parameter node from the game to form the character formula data corresponding to the virtual object.

[0084] Using the above method, a global formula structure can be formed based on the configuration file, and then the node attribute values ​​corresponding to each parameter node of each virtual object can be read from the game to form the character formula data. Formula structure and formula data can be constructed based on different data acquisition methods.

[0085] Step S104: In response to a trigger event for a target virtual object in at least one virtual object, update the target attribute of the target virtual object in the game based on the global formula structure and the character formula data corresponding to the target virtual object.

[0086] In a preferred embodiment of this application, a triggering event may refer to a triggering action or control instruction that acts on a target virtual object and is used to influence changes in the target's attributes.

[0087] The following reference Figure 4 and Figure 5 This section describes the process of updating the target properties of a target virtual object under the triggering event.

[0088] Figure 4 This is a flowchart illustrating the steps of updating the target attributes of a target virtual object under a triggering event, as provided in an exemplary embodiment of this application.

[0089] Reference Figure 4 In step S501, the update node whose node attribute value is updated due to the triggering event is determined from the attribute calculation formula for the target attribute.

[0090] Here, each triggering event can affect the node attribute value of a parameter node in the attribute calculation formula of the target attribute, and after the triggering event is detected, the update node directly affected by the triggering event can be determined from the attribute calculation formula.

[0091] In step S502, based on the global formula structure, at least one ancestor node that has a computational relationship with the update node is determined, as well as the computational relationship between the update node and each ancestor node.

[0092] For example, with Figure 5 Taking the global formula structure shown as including multiple structure entries as an example, the target structure entry corresponding to the update node can be determined from the global formula structure. Then, the ancestor nodes corresponding to the update node and the calculation relationships between the update node and each ancestor node can be extracted from the target structure entries (the calculation relationships are in...). Figure 5 (Not shown in the image).

[0093] In step S503, for each determined ancestor node, the node update value of the ancestor node is determined according to the calculation relationship between the ancestor node and the update node, based on the node update value of the update node after being affected by the triggered event.

[0094] In step S504, the target attribute of the target virtual object under the triggered event is updated according to the node update value of the updated node and the node update values ​​of each ancestor node.

[0095] In other words, when the target virtual object is affected by a triggered event, causing the node attribute value of the update node in the character formula data to be updated, the number of the ancestor node corresponding to the update node in the global formula structure is read, and then the node attribute value of the ancestor node is updated synchronously according to the corresponding calculation relationship, so as to realize the update of the target attribute.

[0096] In this embodiment of the application, the information processing method may further include: displaying the target attributes of the target virtual object under the triggering event. For example, the attribute calculation formula can be displayed in the game in the following way.

[0097] In one scenario, the attribute calculation formulas are displayed in the game through a command window.

[0098] In this case, the triggering event can refer to the simulated control command entered in the command window.

[0099] Here, the simulated control instruction is an instruction used to simulate a triggering operation on a virtual object in a game. For example, the triggering operation could refer to simulating the virtual object putting on certain equipment or casting a certain spell on the virtual object. For instance, the simulated control instruction is a simulated instruction that acts on a target virtual object and is used to influence changes in the target's attributes.

[0100] The command window described above can be a program window created for a target attribute to monitor changes in the attribute value of the target attribute. For example, a game designer can create an attribute calculation formula for the target attribute in the command window. When a simulation control command is received in the command window, the node attribute values ​​of each ancestor node are updated based on the global formula structure and the character formula data of the target virtual object, referring to the node value update method described above. The updated node values, updated ancestor node values, and the attribute values ​​of the target attribute before / after the update can be displayed in the command window in the form of command lines, so that the game designer can observe the performance of the attribute calculation formula.

[0101] In other words, the target attributes of the target virtual character under a triggered event can be displayed in the following way: the updated values ​​of the target ancestor nodes and / or the attribute values ​​of the target attributes are presented in the command window. Here, the target ancestor nodes are each ancestor node that has a calculation relationship with the updating node, and the updating node is the node whose attribute value is updated due to the influence of the simulation control command in the attribute calculation formula.

[0102] By presenting the attribute values ​​in the above way, the problem of long development chains between game designers and game developers can be overcome, allowing game designers to quickly and directly see how the attribute calculation formulas are performed in the game.

[0103] In another scenario, the attribute calculation formula is displayed in the game scene, showing how it manifests in the game.

[0104] In this context, a triggering event can refer to a triggering event that occurs in the game scene. This triggering event can refer to a triggering action that acts on the target virtual object and affects the change of the target's attributes. Based on this triggering event, the target virtual object is displayed in the game scene with the target attributes under the determined attribute values.

[0105] At this point, it is necessary to first load the attribute calculation formula of the target attribute into the game, and then observe the performance of the attribute calculation formula in the game scene.

[0106] The following reference Figure 6 This section describes the process of updating the target attributes of a target virtual object in a game.

[0107] Figure 6 A flowchart illustrating the steps of updating a target attribute in a game, as provided in an exemplary embodiment of this application, is shown.

[0108] Reference Figure 6 In step S701, the character formula data corresponding to the target virtual object is updated based on the node update value of the updated node and the node update value of the ancestor node corresponding to the updated node.

[0109] Here, the update node is the node in the attribute calculation formula whose attribute value is updated due to the triggering event. In this embodiment, a virtual object corresponds to a character formula data. After a triggering event is detected, the node attribute values ​​of each parameter node in the character formula data are updated according to the update node and ancestor node involved in the triggering event to obtain the updated character formula data.

[0110] In step S702, the attribute values ​​of the target attributes possessed by the target virtual object are determined based on the updated character formula data.

[0111] Based on the final value of the target attribute in the updated character formula data (such as...) Figure 5 The virtual health value (HP) shown is used to update the target attributes of the target virtual object in the game. For example, the target virtual object can be presented in the game scene, and the target attributes of the presented target virtual object are the attribute values ​​under the influence of the triggered event.

[0112] In step S703, the target attribute of the target virtual object is updated in the game to be at the determined attribute value.

[0113] Here, the target attributes of the virtual object change with the triggering event, and these changes are influenced by the calculation relationships between the parameter nodes in the attribute calculation formula. By displaying the target attributes of the virtual object in the game scene as described above, the constraint effect of the attribute calculation formula on the target attributes can be intuitively reflected.

[0114] The following reference Figure 7 This section will introduce the process of loading the attribute calculation formula of the target attribute into the game.

[0115] Figure 7 A flowchart illustrating the steps of loading attribute calculation formulas in a game according to an exemplary embodiment of this application is shown.

[0116] Reference Figure 7 In step S801, the target code that matches the target attribute is searched from the game's preset code library.

[0117] Here, obtaining the desired attribute value calculation formula often requires multiple modifications and iterations. In this application, to simplify the R&D process of modifying and iterating the formula, the corresponding code for the attribute calculation formula of each attribute can be written in advance and stored in the preset code library. The written code is used to load the corresponding attribute calculation formula into the game.

[0118] For example, the preset code library stores attribute identifiers, each attribute identifier is used to indicate different attributes possessed by the virtual object, and also stores the code corresponding to the calculation formula of each attribute, that is, the code corresponding to the attribute calculation formula of the attribute indicated by each attribute identifier.

[0119] At this point, after reading the configuration file, based on the target attributes indicated in the configuration file, the system searches for attribute identifiers that match the target attributes in the preset code library, and determines the code corresponding to the found attribute identifiers as the target code that matches the target attributes.

[0120] In a preferred embodiment, the preset code library may also store the formula structure of the attribute calculation formula corresponding to each attribute identifier, and the target code can be searched from the preset code library based on the attribute identifier and the formula structure.

[0121] Figure 8 A flowchart illustrating the steps of determining the target code of the attribute calculation formula provided by an exemplary embodiment of this application.

[0122] Reference Figure 8 In step S901, the game's preset code library is searched to see if there is an attribute calculation formula corresponding to the target attribute.

[0123] For example, after reading the configuration file, based on the target attributes indicated in the configuration file, the system searches for attribute identifiers that match the target attributes in the preset code library and determines the attribute calculation formula corresponding to the found attribute identifiers.

[0124] If it does not exist, return to step S901 to continue searching for the existence of an attribute calculation formula corresponding to the target attribute, or jump to the end.

[0125] If it exists, proceed to step S902: determine whether the formula structure of the attribute calculation formula of the target attribute is consistent with the formula structure of the searched attribute calculation formula.

[0126] For example, the consistency of the formula structure can be determined based on the number of parameter nodes in the attribute calculation formula, or based on the number of parameter nodes and the calculation relationship between each parameter node.

[0127] Regarding consistency determination based on the number of parameter nodes, if the number of parameter nodes in two formulas is the same, then the formula structure of the target attribute's calculation formula is consistent with the formula structure of the searched attribute calculation formula. If the number of parameter nodes in the two formulas is inconsistent, then the formula structure of the target attribute's calculation formula is inconsistent with the formula structure of the searched attribute calculation formula. In this case, because parameter nodes have been added or removed from the target attribute's calculation formula, the game developer needs to rewrite the code for the attribute calculation formula and cannot directly call the code stored in the preset code library.

[0128] Regarding consistency determination based on the number of parameter nodes and calculation relationships, if the two formulas have the same number of parameter nodes and the calculation relationships between each parameter node are also consistent, then the formula structure of the target attribute's calculation formula is determined to be consistent with the formula structure of the searched attribute calculation formula. If at least one of the two formulas' parameter node counts or calculation relationships between each parameter node is inconsistent, then the formula structure of the target attribute's calculation formula is determined to be inconsistent with the formula structure of the searched attribute calculation formula. In this case, because parameter nodes have been added or removed, or calculation relationships have been modified in the target attribute's calculation formula, game developers need to rewrite the code for the attribute calculation formula and cannot directly call the code stored in the preset code library.

[0129] If there is a discrepancy, return to step S902 or proceed to the end.

[0130] If they match, proceed to step S903: determine the code in the preset code library that corresponds to the searched attribute calculation formula as the target code.

[0131] To address the consistency determination based on the number of parameter nodes, after finding the code corresponding to the attribute calculation formula, it is necessary to compare whether the calculation relationships between the parameter nodes in the target attribute's calculation formula are consistent with those in the searched attribute calculation formula. If they are consistent, the searched code is directly identified as the target code. If they are inconsistent, the differing target calculation relationships are identified, and the target program segment in the searched code is modified based on these target calculation relationships. This target program segment is the program segment in the searched code used to represent the target calculation relationship, and the modified code is identified as the target code.

[0132] For cases where consistency is determined based on the number of parameter nodes and computational relationships, the searched code can be directly identified as the target code.

[0133] In addition, during the process of modifying and iterating the attribute calculation formula, game designers may modify the assignment of parameter nodes in the attribute calculation formula, in order to... Figure 3 Taking the example shown, the value of one of the parameter nodes can be changed from 10 to 20 (modifying the constant in the formula). At this time, the formula structure of the attribute calculation formula (the number of parameter nodes and the calculation relationship) remains unchanged. The generated configuration file can carry parameter node identifiers. These parameter node identifiers are used to indicate the parameter nodes in the attribute calculation formula and to indicate that the assignment of the marked parameter node has been modified. When determining the target code, the assignment of the parameter node indicated by the parameter node identifier in the attribute calculation formula of the target attribute is used to replace the assignment of the parameter node indicated by the parameter node identifier in the searched code, and the replaced code is determined as the target code.

[0134] return Figure 7 In step S802, the target code is found and the attribute calculation formula for the target attribute is loaded into the game so as to display the target virtual object's target attribute under the triggered event in the game scene.

[0135] The above method allows for convenient modification of formulas while providing a clear and intuitive view of the results. In other words, it enables game designers to quickly see the effects of formulas within the game after completion, without requiring secondary development by game developers.

[0136] In addition, by adopting the Python+cpp development model, CPU consumption can be reduced while enabling rapid development.

[0137] The information processing method in the game according to the embodiments of this application adopts a design method that separates formula data from formula structure, effectively reducing memory consumption and bringing higher operational stability to the game while facilitating development. Furthermore, it can quickly parse and load the attribute calculation formulas written by the game designer into the game server, allowing the game designer to quickly view the combat and numerical performance resulting from the newly designed attribute calculation formulas.

[0138] Based on the same application concept, this application also provides an information processing device in the game corresponding to the method provided in the above embodiments. Since the principle of the device in this application to solve the problem is similar to the information processing method in the game in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0139] Figure 9 A schematic diagram of the structure of an information processing device in a game provided as an exemplary embodiment of this application. (e.g.) Figure 9 As shown, the information processing device 100 in the game includes:

[0140] The file reading module 110 reads the configuration file, which records the parameter nodes in the attribute calculation formula for the target attribute and the topological relationships between the parameter nodes.

[0141] The structure generation module 120 generates a global formula structure for the attribute calculation formula in the game based on the topological relationship between each parameter node.

[0142] The data creation module 130 generates character formula data corresponding to the target attributes of each virtual object for at least one virtual object created in the game. The character formula data includes the node attribute value corresponding to each parameter node.

[0143] The attribute update module 140 responds to a trigger event for a target virtual object in at least one virtual object, and updates the target attribute of the target virtual object in the game based on the global formula structure and the character formula data corresponding to the target virtual object.

[0144] In one possible implementation of this application, the global formula structure includes each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. The ancestor node refers to a node in the attribute calculation formula whose node attribute value can be affected by the corresponding parameter node.

[0145] In one possible implementation of this application, the attribute update module 140 may update the target attribute of the target virtual object under the triggering event in the following manner: determining the update node whose node attribute value is updated due to the triggering event from the attribute calculation formula for the target attribute; determining at least one ancestor node that has a calculation relationship with the update node, and the calculation relationship between the update node and each ancestor node, based on the global formula structure; for each determined ancestor node, determining the node update value of the ancestor node according to the calculation relationship between the ancestor node and the update node, based on the node update value of the update node after being affected by the triggering event; and updating the target attribute of the target virtual object under the triggering event based on the node update value of the update node and the node update values ​​of each ancestor node.

[0146] In one possible implementation of this application, the data creation module 130 generates character formula data corresponding to the target attributes of each virtual object in the following manner: based on the global formula structure, it determines each parameter node in the attribute calculation formula of the target attribute; for each virtual object, it reads the node attribute values ​​corresponding to each parameter node from the game to form the character formula data corresponding to the virtual object.

[0147] In one possible implementation of this application, the triggering event includes any one of the following: a simulated control command entered in a command window, wherein the simulated control command is a simulated command that acts on a target virtual object and is used to affect changes in the target attribute, and the command window is a program window created for the target attribute and used to monitor changes in the attribute value of the target attribute; or a triggering event generated in a game scene of a game, wherein the triggering event is a triggering action that acts on a target virtual object and is used to affect changes in the target attribute.

[0148] In one possible implementation of this application, the attribute update module 140 further displays the target attributes of the target virtual object under the triggering event. The attribute update module 140 displays the target attributes of the target virtual object under the triggering event in the following ways: presenting the node update values ​​of the target ancestor nodes and / or the attribute values ​​of the target attributes in the command window, wherein the target ancestor nodes are each ancestor node that has a calculation relationship with the updating node, and the updating node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the simulation control command; and displaying the target attributes of the target virtual object under the triggering event in the game scene of the game.

[0149] In one possible implementation of this application, the attribute update module 140 updates the target attribute of the target virtual object under the triggering event in the following manner: updating the character formula data corresponding to the target virtual object according to the node update value of the update node and the node update value of the ancestor node corresponding to the update node, wherein the update node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the triggering event; determining the attribute value of the target attribute possessed by the target virtual object based on the updated character formula data; and updating the target attribute of the target virtual object under the determined attribute value in the game.

[0150] In one possible implementation of this application, the attribute update module 140 searches for target code that matches the target attribute from the game's preset code library; using the found target code, it loads the attribute calculation formula for the target attribute into the game, so as to display the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0151] In one possible implementation of this application, the preset code library stores attribute calculation formulas for different attributes, the formula structure of each attribute calculation formula, and the code corresponding to each attribute calculation formula. The attribute update module 140 searches the game's preset code library for the existence of an attribute calculation formula corresponding to the target attribute. If it exists, it determines whether the formula structure of the target attribute calculation formula matches the formula structure of the searched attribute calculation formula. If they match, the code in the preset code library corresponding to the searched attribute calculation formula is identified as the target code.

[0152] In one possible implementation of this application, the topological relationship between each parameter node includes the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node. The structure generation module 120 creates a structure entry for each parameter node in the attribute calculation formula. Each structure entry includes the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node. The global formula structure is formed by the structure entries corresponding to all parameter nodes.

[0153] In one possible embodiment of this application, the information processing device in the game may further include a file generation module, which generates the configuration file by: determining the in-degree of each parameter node in the attribute calculation formula for the target attribute; constructing a directed topology graph of the attribute calculation formula, wherein the directed topology graph includes topology nodes and directed edges, each topology node corresponds to a parameter node in the attribute calculation formula, the parameter node with an in-degree of zero in the attribute calculation formula is determined as the leaf node of the directed topology graph, two topology nodes with a calculation relationship are connected by directed edges, and the edge attribute of each directed edge is used to record the calculation relationship between the two connected topology nodes; and determining the ancestor node corresponding to each parameter node and the calculation relationship between each parameter node and its corresponding ancestor node based on the constructed directed topology graph, so as to form the configuration file.

[0154] The information processing device in the game according to the embodiments of this application adopts a design method that separates formula data from formula structure, effectively reducing memory consumption and bringing higher operational stability to the game while facilitating development. Furthermore, it can quickly parse and load attribute calculation formulas written by game designers into the game server, allowing game designers to quickly view the combat and numerical performance resulting from newly designed attribute calculation formulas.

[0155] Please see Figure 10 , Figure 10 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. For example... Figure 10 As shown, the electronic device 200 includes a processor 210, a memory 220, and a bus 230.

[0156] The memory 220 stores machine-readable instructions executable by the processor 210. When the electronic device 200 is running, the processor 210 communicates with the memory 220 via the bus 230. When the machine-readable instructions are executed by the processor 210, the steps of the information processing method in the game as described in any of the above embodiments can be executed, as follows:

[0157] The system reads a configuration file containing the parameter nodes and topological relationships between them in the attribute calculation formula for the target attribute. Based on these topological relationships, a global formula structure for the attribute calculation formula in the game is generated. For at least one virtual object created in the game, character formula data corresponding to the target attribute of each virtual object is generated, and the character formula data includes the node attribute value corresponding to each parameter node. In response to a trigger event for the target virtual object among the at least one virtual object, the system updates the target attribute of the target virtual object in the game under the trigger event, based on the global formula structure and the character formula data corresponding to the target virtual object.

[0158] In one possible implementation of this application, the global formula structure includes each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. The ancestor node refers to a node in the attribute calculation formula whose node attribute value can be affected by the corresponding parameter node.

[0159] In one possible implementation of this application, the processor 210 may perform the following processing to update the target attribute of the target virtual object under the triggering event in the following manner: determining, from the attribute calculation formula for the target attribute, the update node whose node attribute value is updated due to the triggering event; determining, based on the global formula structure, at least one ancestor node that has a calculation relationship with the update node, and the calculation relationship between the update node and each ancestor node; for each determined ancestor node, determining the node update value of the ancestor node according to the calculation relationship between the ancestor node and the update node based on the node update value of the update node after being affected by the triggering event; and updating the target attribute of the target virtual object under the triggering event based on the node update value of the update node and the node update values ​​of each ancestor node.

[0160] In one possible implementation of this application, the processor 210 may perform the following processing to generate character formula data corresponding to the target attributes possessed by each virtual object in the following manner: determining each parameter node in the attribute calculation formula of the target attribute according to the global formula structure; for each virtual object, reading the node attribute values ​​corresponding to each parameter node from the game to form the character formula data corresponding to the virtual object.

[0161] In one possible implementation of this application, the triggering event includes any one of the following: a simulated control command entered in a command window, wherein the simulated control command is a simulated command that acts on a target virtual object and is used to affect changes in the target attribute, and the command window is a program window created for the target attribute and used to monitor changes in the attribute value of the target attribute; or a triggering event generated in a game scene of a game, wherein the triggering event is a triggering action that acts on a target virtual object and is used to affect changes in the target attribute.

[0162] In one possible implementation of this application, the processor 210 may perform the following processing to display the target attribute of the target virtual object under the triggering event in the following manner: presenting the node update value of the target ancestor node and / or the attribute value of the target attribute in the command window, wherein the target ancestor node is each ancestor node that has a calculation relationship with the updating node, and the updating node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the simulation control command; and displaying the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0163] In one possible implementation of this application, the processor 210 may perform the following processing to update the target attribute of the target virtual object under the triggering event in the following manner: updating the character formula data corresponding to the target virtual object according to the node update value of the update node and the node update value of the ancestor node corresponding to the update node, wherein the update node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the triggering event; determining the attribute value of the target attribute possessed by the target virtual object based on the updated character formula data; and updating the target attribute of the target virtual object under the determined attribute value in the game.

[0164] In one possible implementation of this application, the processor 210 may further perform the following processing: searching for target code that matches the target attribute from the game's preset code library; using the found target code, loading the attribute calculation formula for the target attribute into the game, so as to display the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0165] In one possible implementation of this application, the preset code library stores attribute calculation formulas for different attributes, the formula structure of each attribute calculation formula, and the code corresponding to each attribute calculation formula. The processor 210 may further perform the following processing: searching the game's preset code library for the existence of an attribute calculation formula corresponding to the target attribute; if it exists, determining whether the formula structure of the target attribute's attribute calculation formula is consistent with the formula structure of the searched attribute calculation formula; if consistent, determining the code in the preset code library corresponding to the searched attribute calculation formula as the target code.

[0166] In one possible implementation of this application, the topological relationship between each parameter node includes the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node. The processor 210 may further perform the following processing: for each parameter node in the attribute calculation formula, create a structure entry, each structure entry including the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node; the global formula structure is formed by the structure entries corresponding to all parameter nodes.

[0167] In one possible embodiment of this application, the processor 210 may perform the following processing to generate the configuration file in the following manner: determining the in-degree of each parameter node in the attribute calculation formula for the target attribute; constructing a directed topology graph of the attribute calculation formula, wherein the directed topology graph includes topology nodes and directed edges, each topology node corresponds to a parameter node in the attribute calculation formula, the parameter node with an in-degree of zero in the attribute calculation formula is determined as the leaf node of the directed topology graph, two topology nodes with a calculation relationship are connected by directed edges, and the edge attribute of each directed edge is used to record the calculation relationship between the two connected topology nodes; and determining the ancestor node corresponding to each parameter node and the calculation relationship between each parameter node and its corresponding ancestor node based on the constructed directed topology graph to form the configuration file.

[0168] The electronic device according to embodiments of this application adopts a design method that separates formula data from formula structure, effectively reducing memory consumption and facilitating development while also bringing higher operational stability to the game. Furthermore, it can quickly parse and load attribute calculation formulas written by game designers into the game server, allowing game designers to quickly view the combat and numerical performance resulting from newly designed attribute calculation formulas.

[0169] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it can execute the steps of the information processing method in the game as described in any of the above embodiments, as follows:

[0170] The system reads a configuration file containing the parameter nodes and topological relationships between them in the attribute calculation formula for the target attribute. Based on these topological relationships, a global formula structure for the attribute calculation formula in the game is generated. For at least one virtual object created in the game, character formula data corresponding to the target attribute of each virtual object is generated, and the character formula data includes the node attribute value corresponding to each parameter node. In response to a trigger event for the target virtual object among the at least one virtual object, the system updates the target attribute of the target virtual object in the game under the trigger event, based on the global formula structure and the character formula data corresponding to the target virtual object.

[0171] In one possible implementation of this application, the global formula structure includes each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. The ancestor node refers to a node in the attribute calculation formula whose node attribute value can be affected by the corresponding parameter node.

[0172] In one possible implementation of this application, the processor may perform the following processing to update the target attribute of the target virtual object under the triggering event in the following manner: determining, from the attribute calculation formula for the target attribute, the update node whose node attribute value is updated due to the triggering event; determining, based on the global formula structure, at least one ancestor node that has a calculation relationship with the update node, and the calculation relationship between the update node and each ancestor node; for each determined ancestor node, determining the node update value of the ancestor node according to the calculation relationship between the ancestor node and the update node based on the node update value of the update node after being affected by the triggering event; and updating the target attribute of the target virtual object under the triggering event based on the node update value of the update node and the node update values ​​of each ancestor node.

[0173] In one possible implementation of this application, the processor may perform the following processing to generate character formula data corresponding to the target attributes of each virtual object in the following manner: determining each parameter node in the attribute calculation formula of the target attribute according to the global formula structure; for each virtual object, reading the node attribute values ​​corresponding to each parameter node from the game to form the character formula data corresponding to the virtual object.

[0174] In one possible implementation of this application, the triggering event includes any one of the following: a simulated control command entered in a command window, wherein the simulated control command is a simulated command that acts on a target virtual object and is used to affect changes in the target attribute, and the command window is a program window created for the target attribute and used to monitor changes in the attribute value of the target attribute; or a triggering event generated in a game scene of a game, wherein the triggering event is a triggering action that acts on a target virtual object and is used to affect changes in the target attribute.

[0175] In one possible implementation of this application, the processor may perform the following processing to display the target attribute of the target virtual object under the triggering event in the following manner: presenting the node update value of the target ancestor node and / or the attribute value of the target attribute in the command window, wherein the target ancestor node is each ancestor node that has a calculation relationship with the updating node, and the updating node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the simulation control command; and displaying the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0176] In one possible implementation of this application, the processor may perform the following processing to update the target attribute of the target virtual object under the triggering event in the following manner: updating the character formula data corresponding to the target virtual object according to the node update value of the update node and the node update value of the ancestor node corresponding to the update node, wherein the update node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the triggering event; determining the attribute value of the target attribute possessed by the target virtual object based on the updated character formula data; and updating the target attribute of the target virtual object under the determined attribute value in the game.

[0177] In one possible implementation of this application, the processor may further perform the following processing: searching for target code that matches the target attribute from the game's preset code library; using the found target code, loading the attribute calculation formula for the target attribute into the game, so as to display the target attribute of the target virtual object under the triggering event in the game scene of the game.

[0178] In one possible implementation of this application, the preset code library stores attribute calculation formulas for different attributes, the formula structure of each attribute calculation formula, and the code corresponding to each attribute calculation formula. The processor may further perform the following processing: searching the game's preset code library for the existence of an attribute calculation formula corresponding to the target attribute; if it exists, determining whether the formula structure of the target attribute's attribute calculation formula is consistent with the formula structure of the searched attribute calculation formula; if consistent, determining the code in the preset code library corresponding to the searched attribute calculation formula as the target code.

[0179] In one possible implementation of this application, the topological relationship between each parameter node includes the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node. The processor may further perform the following processing: for each parameter node in the attribute calculation formula, create a structure entry, each structure entry including the ancestor node with which the parameter node has a computational relationship and the computational relationship between the parameter node and each ancestor node; the global formula structure is formed by the structure entries corresponding to all parameter nodes.

[0180] In one possible implementation of this application, the processor may perform the following processing to generate the configuration file in the following manner: determining the in-degree of each parameter node in the attribute calculation formula for the target attribute; constructing a directed topology graph of the attribute calculation formula, wherein the directed topology graph includes topology nodes and directed edges, each topology node corresponds to a parameter node in the attribute calculation formula, parameter nodes with an in-degree of zero in the attribute calculation formula are determined as leaf nodes of the directed topology graph, two topology nodes with a calculation relationship are connected by directed edges, and the edge attribute of each directed edge is used to record the calculation relationship between the two connected topology nodes; and determining the ancestor node corresponding to each parameter node and the calculation relationship between each parameter node and its corresponding ancestor node based on the constructed directed topology graph to form the configuration file.

[0181] The computer-readable storage medium according to embodiments of this application employs a design method that separates formula data from formula structure, effectively reducing memory consumption and facilitating development while also providing higher operational stability for the game. Furthermore, it allows for the rapid parsing and loading of attribute calculation formulas written by game designers into the game server, enabling game designers to quickly view the combat and numerical performance resulting from newly designed attribute calculation formulas.

[0182] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0183] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0184] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0185] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0186] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An information processing method in a game, characterized in that, include: Read the configuration file, which records the parameter nodes in the attribute calculation formula for the target attribute and the topological relationships between the parameter nodes. Each configuration file corresponds to one attribute. Based on the topological relationship between the parameter nodes, a structure entry is created for each parameter node in the attribute calculation formula. Each structure entry includes the ancestor nodes that have a calculation relationship with the parameter node and the calculation relationship between the parameter node and each ancestor node. The structure entries corresponding to all parameter nodes form the global formula structure for the attribute calculation formula in the game. For at least one virtual object created in the game, character formula data corresponding to the target attributes possessed by each virtual object is generated. Each virtual object corresponds to a unique set of character formula data, and the character formula data includes the node attribute values ​​corresponding to each parameter node obtained from the game. In response to a trigger event for a target virtual object among the at least one virtual objects, the target attribute of the target virtual object under the trigger event is updated in the game based on the global formula structure and the character formula data corresponding to the target virtual object.

2. The method according to claim 1, characterized in that, The global formula structure includes each parameter node in the attribute calculation formula, the ancestor node corresponding to each parameter node, and the calculation relationship between each parameter node and its corresponding ancestor node. The ancestor node refers to the node in the attribute calculation formula whose node attribute value can be affected by the corresponding parameter node.

3. The method according to claim 2, characterized in that, Update the target virtual object's target properties under the triggered event in the following manner: The updated node whose node attribute value is updated due to the triggering event is determined from the attribute calculation formula for the target attribute; Based on the global formula structure, at least one ancestor node that has a computational relationship with the update node is determined, and the computational relationship between the update node and each ancestor node is determined. For each identified ancestor node, the node update value of the ancestor node is determined according to the calculation relationship between the ancestor node and the update node, based on the node update value of the update node after being affected by the triggering event. Based on the node update value of the updating node and the node update values ​​of each ancestor node, update the target attribute of the target virtual object under the triggered event.

4. The method according to claim 1, characterized in that, The character formula data corresponding to the target attributes of each virtual object is generated in the following way: Based on the global formula structure, determine each parameter node in the attribute calculation formula of the target attribute; For each virtual object, the node attribute values ​​corresponding to the virtual object and each parameter node are read from the game to form the character formula data corresponding to the virtual object.

5. The method according to claim 1, characterized in that, The triggering event includes any one of the following: The simulation control command entered in the command window is a simulation command that acts on the target virtual object and is used to affect the change of the target attribute. The command window is a program window created for the target attribute and used to monitor the change of the attribute value of the target attribute. Triggering events generated in the game scene are triggering actions that act on a target virtual object and affect changes in the target's attributes.

6. The method according to claim 5, characterized in that, Also includes: Display the target properties of the target virtual object under the triggered event. The target properties of the target virtual object under the triggering event are displayed in the following manner: The command window displays the node update value of the target ancestor node and / or the attribute value of the target attribute. The target ancestor node is each ancestor node that has a calculation relationship with the updated node. The updated node is the node whose node attribute value is updated due to the influence of the simulation control command in the attribute calculation formula. The target attributes of the target virtual object are displayed in the game scene of the game under the triggering event.

7. The method according to claim 2, characterized in that, Update the target virtual object's target properties under the triggered event in the following manner: The character formula data corresponding to the target virtual object is updated based on the node update value of the update node and the node update value of the ancestor node corresponding to the update node. The update node is the node in the attribute calculation formula whose node attribute value is updated due to the influence of the triggering event. Based on the updated character formula data, determine the attribute values ​​of the target attributes possessed by the target virtual object; In the game, update the target attributes of the target virtual object to the determined attribute values.

8. The method according to claim 6, characterized in that, Also includes: Search the game's preset code library for target code that matches the target attribute; Using the found target code, the attribute calculation formula for the target attribute is loaded into the game to display the target virtual object's target attribute under the triggered event in the game scene.

9. The method according to claim 8, characterized in that, The preset code library stores attribute calculation formulas for different attributes, the formula structure of each attribute calculation formula, and the corresponding code for each attribute calculation formula. The step of searching for target code that matches the target attribute from the game's preset code library includes: Search the game's preset code library for the existence of an attribute calculation formula corresponding to the target attribute; If it exists, determine whether the formula structure of the attribute calculation formula of the target attribute is consistent with the formula structure of the searched attribute calculation formula; If they match, the code in the preset code library that corresponds to the searched attribute calculation formula is determined as the target code.

10. The method according to claim 1, characterized in that, The configuration file is generated in the following way: Determine the in-degree of each parameter node in the attribute calculation formula for the target attribute; A directed topological graph for attribute calculation formulas is constructed, wherein the directed topological graph includes topological nodes and directed edges. Each topological node corresponds to a parameter node in the attribute calculation formula. The parameter node with an in-degree of zero in the attribute calculation formula is determined as the leaf node of the directed topological graph. Two topological nodes with a calculation relationship are connected by directed edges. The edge attribute of each directed edge is used to record the calculation relationship between the two connected topological nodes. Based on the constructed directed topology graph, the ancestor node corresponding to each parameter node and the computational relationship between each parameter node and its corresponding ancestor node are determined to form the configuration file.

11. An information processing device for games, characterized in that, include: The file reading module reads the configuration file, which records the parameter nodes in the attribute calculation formula for the target attribute and the topological relationship between the parameter nodes. Each configuration file corresponds to one attribute. The structure generation module creates a structure entry for each parameter node in the attribute calculation formula based on the topological relationship between the parameter nodes. Each structure entry includes ancestor nodes that have a calculation relationship with the parameter node and the calculation relationship between the parameter node and each ancestor node. The structure entries corresponding to all parameter nodes form a global formula structure for the attribute calculation formula in the game. The data creation module generates character formula data corresponding to the target attributes of each virtual object for at least one virtual object created in the game. Each virtual object has a unique set of character formula data, which includes node attribute values ​​corresponding to each parameter node obtained from the game. The attribute update module responds to a trigger event for a target virtual object among the at least one virtual objects, and updates the target attribute of the target virtual object in the game under the trigger event based on the global formula structure and the character formula data corresponding to the target virtual object.

12. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the information processing method in the game as claimed in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the information processing method in the game as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Game expression formula processing method, system and device and medium

    CN114404990A