Disclosure of Invention
The embodiment of the invention provides a role attribute configuration method and device, a storage medium and an electronic device.
According to an embodiment of the present invention, a role attribute configuration method is provided, including: responding to a synthesis instruction of the master virtual role, and respectively generating a first slave virtual role and a second slave virtual role in the virtual scene according to the first fragment resource and the second fragment resource; generating a first relation value and a second relation value according to the resource interaction behavior of the master virtual role corresponding to the first slave virtual role and the second slave virtual role respectively; responding to the association instruction of the master virtual role, and judging whether the first slave virtual role is matched with the second slave virtual role; and if the first subordinate virtual role is matched with the second subordinate virtual role, configuring a gain attribute value for the first subordinate virtual role and the second subordinate virtual role.
Optionally, after responding to the synthesis instruction of the master virtual role and generating a first slave virtual role and a second slave virtual role in the virtual scene according to the first shard resource and the second shard resource, the method further includes: issuing a game task; in response to a selection instruction of the master virtual character, selecting a target character from the first slave virtual character and the second slave virtual character to execute the game task based on the selection instruction; calculating the matching degree of the game task and the target role; and configuring the execution success rate of the game task based on the matching degree, wherein the execution success rate is positively correlated with the matching degree.
Optionally, the determining whether the first subordinate virtual role is matched with the second subordinate virtual role includes: acquiring a first role identifier and the first relation value of the first slave virtual role, and acquiring a second role identifier and the second relation value of the second slave virtual role, wherein the first role identifier and the second role identifier are respectively identification identifiers of the first slave virtual role and the second slave virtual role in a virtual scene; judging whether the combination of the first role identification and the second role identification hits a preset role combination or not, and judging that the first relation value and the second relation value are both larger than a preset threshold value; and if the combination of the first role identification and the second role identification hits a preset role combination, and the first relation value and the second relation value are both greater than a preset threshold value, determining that the first subordinate virtual role is matched with the second subordinate virtual role.
Optionally, configuring a gain attribute value for the first slave virtual role and the second slave virtual role includes: acquiring the matching level of the first slave virtual role and the second slave virtual role, and acquiring the basic attribute values of the first slave virtual role and the second slave virtual role, wherein the matching level is used for representing the matching degree of the first slave virtual role and the second slave virtual role in a virtual scene; calculating the gain attribute value based on the matching level and/or the base attribute value; configuring the gain attribute values for the first slave avatar and the second slave avatar.
Optionally, the generating a first relationship value and a second relationship value according to the resource interaction behavior of the master virtual character corresponding to the first slave virtual character and the second slave virtual character respectively includes: monitoring a first resource amount of a first prop resource transferred from the master virtual character to the first slave virtual character, and monitoring a second resource amount of a second prop resource transferred from the master virtual character to the second slave virtual character; calculating a first relationship value of the master virtual character to the first slave virtual character based on the first amount of resources, and calculating a second relationship value of the master virtual character to the second slave virtual character based on the second amount of resources.
Optionally, calculating a first relationship value between the master virtual character and the first slave virtual character based on the first resource amount includes: analyzing the resource type of the first road tool resource; acquiring a unit relation value of the first road tool resource according to the resource type; calculating the first relationship value based on the unit relationship value and the first resource amount.
Optionally, if the first slave virtual role is matched with the second slave virtual role, the method further includes: responding to a matching instruction triggered by the master virtual role, and binding the first slave virtual role and the second slave virtual role to obtain a role combination; and after receiving the virtual prop sent by the master virtual character to the character combination, increasing the matching level of the first slave virtual character and the second slave virtual character.
Optionally, after configuring the gain attribute values for the first slave virtual character and the second slave virtual character, the method further includes: calculating a first role attribute value for the first slave virtual role based on the base attribute value and the gain attribute value for the first slave virtual role, and calculating a second role attribute value for the second slave virtual role based on the base attribute value and the gain attribute value for the second slave virtual role; if the master virtual character, the first slave virtual character, the second slave virtual character and the attribute conversion prop appear at the same scene position of the virtual scene, at least one part of the first character attribute value and/or the second character attribute value is transferred to the corresponding attribute of the master virtual character.
Optionally, transferring at least a portion of the first character attribute value or the second character attribute value to a corresponding attribute of the primary virtual character includes: acquiring the conversion rate of the attribute conversion prop; calculating a first transfer attribute value to be converted of the first role attribute value and/or a second transfer attribute value to be converted of the second role attribute value according to the conversion rate; adding the first transition attribute value and/or the second transition attribute value to the corresponding attribute of the primary virtual character.
Optionally, after generating the first slave virtual role and the second slave virtual role in the virtual scene according to the first shard resource and the second shard resource, respectively, the method further includes: judging whether the subordinate virtual role sets of a preset role type are synthesized or not, wherein the subordinate virtual role sets comprise a plurality of subordinate virtual roles; and if the subordinate virtual role sets of the preset role types are synthesized, distributing virtual game resources for the main virtual role.
According to another embodiment of the present invention, there is provided a role attribute configuration apparatus, including: the synthesis module is used for responding to a synthesis instruction of the master virtual role and respectively generating a first slave virtual role and a second slave virtual role in the virtual scene according to the first fragment resource and the second fragment resource; a generating module, configured to generate a first relationship value and a second relationship value according to resource interaction behaviors of the master virtual role and the first slave virtual role and the second slave virtual role, respectively; the first judging module is used for responding to the association instruction of the master virtual role and judging whether the first slave virtual role is matched with the second slave virtual role or not; a configuration module, configured to configure a gain attribute value for the first subordinate virtual role and the second subordinate virtual role if the first subordinate virtual role and the second subordinate virtual role are matched.
Optionally, the apparatus further comprises: the issuing module is used for issuing a game task after the synthesis module responds to a synthesis instruction of the master virtual character and respectively generates a first slave virtual character and a second slave virtual character in a virtual scene according to the first fragment resource and the second fragment resource; the selection module is used for responding to a selection instruction of the master virtual character, and selecting a target character from the first slave virtual character and the second slave virtual character to execute the game task based on the selection instruction; the computing module is used for computing the matching degree of the game task and the target role; the first distribution module is used for configuring the execution success rate of the game task based on the matching degree, wherein the execution success rate is positively correlated with the matching degree.
Optionally, the first determining module includes: an obtaining unit, configured to obtain a first role identifier and the first relationship value of the first slave virtual role, and obtain a second role identifier and the second relationship value of the second slave virtual role, where the first role identifier and the second role identifier are identification identifiers of the first slave virtual role and the second slave virtual role in a virtual scene, respectively; the judging unit is used for judging whether the combination of the first role identifier and the second role identifier hits a preset role combination or not and judging that the first relation value and the second relation value are both larger than a preset threshold value; and the determining unit is used for determining that the first subordinate virtual role is matched with the second subordinate virtual role if the combination of the first role identification and the second role identification hits a preset role combination and the first relation value and the second relation value are both greater than a preset threshold value.
Optionally, the configuration module includes: the obtaining unit is used for obtaining the matching level of the first slave virtual role and the second slave virtual role and obtaining the basic attribute values of the first slave virtual role and the second slave virtual role, wherein the matching level is used for representing the matching degree of the first slave virtual role and the second slave virtual role in a virtual scene; a calculation unit for calculating the gain attribute value based on the matching level and/or the base attribute value; a configuration unit, configured to configure the gain attribute value for the first slave virtual role and the second slave virtual role.
Optionally, the generating module includes: the monitoring unit is used for monitoring a first resource amount of a first prop resource transferred from the master virtual character to the first slave virtual character and monitoring a second resource amount of a second prop resource transferred from the master virtual character to the second slave virtual character; a calculating unit, configured to calculate a first relationship value between the master virtual character and the first slave virtual character based on the first resource amount, and calculate a second relationship value between the master virtual character and the second slave virtual character based on the second resource amount.
Optionally, the computing unit includes: the analysis subunit is used for analyzing the resource type of the first channel resource; the acquisition subunit is used for acquiring the unit relation value of the first channel resource according to the resource type; a calculation subunit operable to calculate the first relationship value based on the unit relationship value and the first resource amount.
Optionally, if the first slave virtual role is matched with the second slave virtual role, the apparatus further includes: the binding module is used for binding the first subordinate virtual role and the second subordinate virtual role in response to a matching instruction triggered by the master virtual role to obtain a role combination; and the adding module is used for adding the matching level of the first subordinate virtual role and the second subordinate virtual role after receiving the virtual prop sent by the master virtual role to the role combination.
Optionally, the apparatus further comprises: a calculation module, configured to calculate a first role attribute value of the first slave virtual role based on the base attribute value and the gain attribute value of the first slave virtual role and calculate a second role attribute value of the second slave virtual role based on the base attribute value and the gain attribute value of the second slave virtual role after the configuration module configures the gain attribute values for the first slave virtual role and the second slave virtual role; and the transfer module is used for transferring at least one part of the first role attribute value and/or the second role attribute value to the corresponding attribute of the master virtual role if the master virtual role, the first slave virtual role, the second slave virtual role and the attribute conversion prop appear at the same scene position of a virtual scene.
Optionally, the transfer module includes: the acquiring unit is used for acquiring the conversion rate of the attribute conversion prop; a calculating unit, configured to calculate, according to the conversion rate, a first transition attribute value to be converted of the first role attribute value and/or a second transition attribute value to be converted of the second role attribute value; an adding unit, configured to add the first transition attribute value and/or the second transition attribute value to a corresponding attribute of the master virtual character.
Optionally, the apparatus further comprises: a second determining module, configured to determine whether each of slave virtual role sets of a predetermined role type has been synthesized after the synthesizing module synthesizes a first slave virtual role and a second slave virtual role in a virtual scene according to the first role fragment resource and the second role fragment resource, respectively, where the slave virtual role sets include a plurality of slave virtual roles; and the second distribution module is used for distributing virtual game resources to the main virtual role if the subordinate virtual role sets of the preset role types are synthesized.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
By the invention, a first subordinate virtual role and a second subordinate virtual role are respectively generated in a virtual scene according to a first fragment resource and a second fragment resource in response to a synthesis instruction of a master virtual role, a first relation value and a second relation value are respectively generated according to the interaction behavior of the master virtual role with the resources of the first subordinate virtual role and the second subordinate virtual role, whether the first subordinate virtual role is matched with the second subordinate virtual role is judged in response to the association instruction of the master virtual role, if the first subordinate virtual role is matched with the second subordinate virtual role, a gain attribute value is configured for the first subordinate virtual role and the second subordinate virtual role, whether the two subordinate virtual roles are matched is judged, and the gain attribute value is configured for the subordinate virtual role based on the judgment result, so that a role attribute value configuration mode is realized, and the technical problem that the related technology can not configure the attribute value for the subordinate virtual role according to the matching condition is solved, the interactivity and the relevance of the subordinate virtual characters in the virtual scene are improved, and meanwhile the game playability and the user experience are improved.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile phone, a tablet, a server, a computer, or a similar electronic terminal. Taking the example of running on a computer, fig. 1 is a hardware structure block diagram of a configuration computer of role attributes according to an embodiment of the present invention. As shown in fig. 1, the computer may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and amemory 104 for storing data, and optionally, atransmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the configuration shown in FIG. 1 is illustrative only and is not intended to limit the configuration of the computer described above. For example, a computer may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
Thememory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a role attribute configuration method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in thememory 104, so as to implement the above-mentioned method. Thememory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, thememory 104 may further include memory located remotely from the processor 102, which may be connected to a computer through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. In the present embodiment, theprocessor 104 is configured to control the target virtual character to perform a specified operation to complete the game task in response to the human-machine interaction instruction and the game policy. Thememory 104 is used for storing program scripts of the electronic game, configuration information, attribute information of the virtual character, and the like.
Thetransmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer. In one example, thetransmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, thetransmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
Optionally, the input/output device 108 further includes a human-computer interaction screen for acquiring a human-computer interaction instruction through a human-computer interaction interface and for presenting a game picture in a game scene;
in this embodiment, a role attribute configuration method is provided, and fig. 2 is a schematic flowchart of a role attribute configuration method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, responding to a synthesis instruction of the master virtual role, and respectively generating a first slave virtual role and a second slave virtual role in a virtual scene according to the first fragment resource and the second fragment resource;
optionally, the virtual scene of this embodiment may be a virtual game scene, a virtual teaching scene, a virtual demonstration scene, and the like, where the virtual scene includes a plurality of virtual characters, and the virtual characters may be Controlled by user operations or system AI, where a master virtual Character may be Controlled by a user, such as PCC (Player-Controlled Character) in a virtual game Controlled by a master Player, and a slave virtual Character is Controlled and interacts with the system AI, such as a Non-Player Character (NPC) in the virtual game. In this embodiment, a virtual scene is taken as an example of a game scene.
The character fragment resource in this embodiment is a virtual game resource for synthesizing the subordinate virtual character, and may be a game resource such as a virtual letter or a puzzle of the subordinate virtual character.
The master virtual character is controlled by the master player through the game client, after the slave virtual characters are synthesized, the master virtual character and the slave virtual characters are bound in the game server, the synthesized slave virtual characters and the master virtual character are combined in the virtual scene in the same battle or team, the game tasks distributed to the master virtual character by the system can be executed, and the game events, tasks and the like such as battle events and the like can be executed together with the master virtual character.
Step S204, generating a first relation value and a second relation value according to the resource interaction behavior of the master virtual character and the resource interaction behavior of the first slave virtual character and the resource interaction behavior of the second slave virtual character respectively;
optionally, the resource interaction behavior includes a resource transfer behavior, a resource interaction behavior, and the like, and the relationship value is used to represent a preference or a perception of the master virtual character to the slave virtual character.
Step S206, responding to the association instruction of the master virtual role, and judging whether the first slave virtual role is matched with the second slave virtual role;
in this embodiment, the matching relationship existing among the multiple master virtual characters can be embodied as a matching type relationship of friends, teachers and apprentices, couples, parents and children, and the like in a game occasion. In some scenarios, when the master virtual character has synthesized multiple slave virtual characters, a pairing instruction for at least two slave virtual characters may be further responded to, and whether the first slave virtual character and the second slave virtual character are matched or not may be further determined.
In step S208, if the first slave virtual role matches the second slave virtual role, a gain attribute value is configured for the first slave virtual role and the second slave virtual role.
The gain attribute value of this embodiment is an attack and defense attribute value (which may be further divided into an attack attribute value, a defense attribute value, a movement attribute value, and the like) or a combat attribute value in a virtual scene, and is a role attribute, and when a slave virtual role is synthesized in the virtual scene, the system may further allocate a basic attribute value to the slave virtual role, where the basic attribute value may be a fixed value, or may generate a certain amount of gain to the basic attribute value as conditions such as the task volume, the account number level, and the online time completed by the slave virtual role or a corresponding master virtual role in the virtual scene increase or decrease.
Through the above steps, in response to a synthesis instruction of a master virtual character, a first slave virtual character and a second slave virtual character are respectively generated in a virtual scene according to a first fragment resource and a second fragment resource, a first relation value and a second relation value are respectively generated according to resource interaction behaviors of the master virtual character and the first slave virtual character and the second slave virtual character, whether the first slave virtual character is matched with the second slave virtual character is judged in response to a correlation instruction of the master virtual character, if the first slave virtual character is matched with the second slave virtual character, a gain attribute value is configured for the first slave virtual character and the second slave virtual character, a configuration mode of a character attribute value is realized by judging whether the two slave virtual characters are matched, and a gain attribute value is configured for the slave virtual character based on a judgment result, thereby solving the technical problem that the related technology can not configure the attribute value for the slave virtual character according to the matching condition, the interactivity and the relevance of the subordinate virtual characters in the virtual scene are improved, and meanwhile the game playability and the user experience are improved.
In an implementation scenario of this embodiment, after generating, in response to a composition instruction of a master virtual character, a first slave virtual character and a second slave virtual character in a virtual scenario according to a first shard resource and a second shard resource, respectively, the method further includes:
s11, issuing game tasks;
the game task in the implementation scenario is a virtual task executed by the master virtual character, such as a resource acquisition task, a battle task and the like, and the master virtual character selects and assigns the slave virtual character to execute the game task from a plurality of slave virtual characters bound with the master virtual character.
S12, responding to the selection instruction of the master virtual character, selecting a target character from the first slave virtual character and the second slave virtual character to execute the game task based on the selection instruction;
s13, calculating the matching degree of the game task and the target role;
in this implementation scenario, the game tasks and the subordinate virtual characters may be classified according to types, for example, the game tasks and the subordinate virtual characters may be divided into five types of game tasks and subordinate virtual characters, which are configured by identifiers in attributes of the game tasks and the subordinate virtual characters, respectively, each type of game tasks or subordinate virtual characters includes a plurality of game tasks or subordinate virtual characters, and for example, the 1 type of subordinate virtual characters includes a character a, a character B, and a character C.
Optionally, for a certain game task, the master virtual character may select one or more slave virtual characters to execute, for example, select multiple slave virtual characters as target characters, may select multiple slave virtual characters to execute the same game task at the same time, so as to increase the execution speed of the game task, and may select multiple slave virtual characters to execute multiple different game tasks in parallel, so as to increase the resource output of the game task.
And S14, configuring the execution success rate of the game task based on the matching degree, wherein the execution success rate is positively correlated with the matching degree.
In one embodiment of the present implementation scenario, calculating a degree of match between the game task and the target character includes: acquiring a task identifier of a game task and a role attribute identifier of a target role, wherein the task identifier is used for representing a task type to which the game task belongs, and the role attribute identifier is used for representing a role type to which the target role belongs; and calculating the matching degree based on the similarity of the role attribute identifier and the task identifier, wherein if the role attribute identifier is completely the same as the task identifier, the matching degree is 100%, if the role attribute identifier is completely different from the task identifier, the matching degree is 0, and the rest values are analogized.
Optionally, only two execution success rates may be set, and the two execution success rates are respectively matched or not matched (if the matching degree is greater than the threshold value, the two execution success rates are matched, or else the two execution success rates are not matched), and if the game task is matched with the game task, the first execution success rate is allocated to the game task; and if the game task is not matched with the game task, distributing a second execution success rate to the game task, wherein the first execution success rate is greater than the second execution success rate.
By executing the game task, if the execution is successful, certain game resources, such as virtual props, virtual money and the like, can be acquired and distributed to the master virtual character dispatching the game task, and optionally, a slave virtual character executing the game task can also obtain certain attribute (such as character grade, attack and defense attribute and the like) gain, relationship value and the like.
In one example, the virtual game system issues a knight-errant task (a game task in a virtual game scene), the task has certain attributes (such as musical instruments, books, swords, wines and flowers), the master virtual character selects the knight-errant (a name of a slave virtual character in the virtual game scene), the obtained knight-errant is dispatched to complete the task, the master virtual character can hang up to complete the task, the success rate of the task is higher when the type of the knight-errant is the same as the type of the task, the knight-errant returns to the master virtual character or a preset position after a period of time, the task is completed, and the player obtains certain game resource rewards.
In one implementation of this embodiment, the determining whether the first slave virtual character and the second slave virtual character match includes: acquiring a first role identifier and a first relation value of a first subordinate virtual role, and acquiring a second role identifier and a second relation value of a second subordinate virtual role, wherein the first role identifier and the second role identifier are respectively identification identifiers of the first subordinate virtual role and the second subordinate virtual role in a virtual scene; judging whether the combination of the first role identification and the second role identification hits a preset role combination or not, and judging that the first relation value and the second relation value are both larger than a preset threshold value; and if the combination of the first role identification and the second role identification hits the preset role combination, and the first relation value and the second relation value are both greater than a preset threshold value, determining that the first subordinate virtual role is matched with the second subordinate virtual role.
And determining that the first subordinate virtual role is matched with the second subordinate virtual role only when the relation value reaches a preset value and accords with the relation of the preset role combination. Optionally, if the combination of the first role identifier and the second role identifier does not hit the preset role combination, or the first relationship value or the second relationship value is less than or equal to the preset threshold, it is determined that the first subordinate virtual role is not matched with the second subordinate virtual role.
In one example, the virtual scene includes 6 subordinate virtual roles, which are role a, role B, role C, role D, role E, and role F, and the role a and the role B, the role a and the role D, the role B and the role C, the role E and the role F, and the role B and the role E are matched role combinations set in advance in the system, and if two subordinate virtual roles currently bound by the master virtual role can hit the combinations, and the relationship values between the master virtual role and the two subordinate virtual roles are all greater than a preset threshold value, the matching is performed, for example, if the two subordinate virtual roles currently bound by the master virtual role are role a and role B, the role a is matched with the role B.
In other examples, the matching may be performed according to the basic attribute values of the subordinate virtual roles, for example, any two subordinate virtual roles whose difference between the basic attribute values is smaller than a preset threshold are matched, or the matching may be performed according to the gender attribute (gender such as men and women), the form attribute (form such as thickness, height, etc.), the role relationship, and the like of the subordinate virtual roles.
In an implementation manner of this embodiment, configuring the gain attribute values for the first slave virtual character and the second slave virtual character includes: the method comprises the steps of obtaining the matching level of a first subordinate virtual role and a second subordinate virtual role, and obtaining the basic attribute values of the first subordinate virtual role and the second subordinate virtual role, wherein the matching level is used for representing the matching degree of the first subordinate virtual role and the second subordinate virtual role in a virtual scene; calculating a gain attribute value based on the matching level and/or the base attribute value; configuring a gain attribute value for the first slave virtual character and the second slave virtual character.
In this embodiment, the matching levels of the two subordinate virtual roles may be upgraded on the basis of a certain condition in the virtual scene, or may be a preset fixed value, for example, the matching level of the role a and the role B is 2, and the matching level of the role a and the role D is 3, based on which, when the master virtual role generates three subordinate virtual roles a, the role B, and the role D, the master virtual role may select the matching level with a high matching level for matching.
In one implementation of this embodiment, generating the first relationship value and the second relationship value according to the resource interaction behavior of the master virtual character corresponding to the first slave virtual character and the second slave virtual character respectively includes: monitoring a first resource amount of a first prop resource transferred from a master virtual character to a first slave virtual character and monitoring a second resource amount of a second prop resource transferred from the master virtual character to a second slave virtual character; a first relationship value of the master virtual character to the first slave virtual character is calculated based on the first amount of resources, and a second relationship value of the master virtual character to the second slave virtual character is calculated based on the second amount of resources.
Based on this embodiment, calculating the first relationship value for the master virtual character and the first slave virtual character based on the first amount of resources includes: analyzing the resource type of the first channel resource; acquiring a unit relation value of a first road tool resource according to the resource type; a first relationship value is calculated based on the unit relationship value and the first resource amount.
In this embodiment, the master virtual character transfers the second prop resource to the slave virtual character, and the relationship value is improved by "gift offering" to increase the perceptibility. In one example, the property resources include multiple types, each type of property resource corresponds to a unit relationship value, different types of property resources are used, the promotion speed of the relationship values is different, different gifts have different effects on different subordinate virtual roles, for example, for a subordinate virtual role a, the unit relationship value of the property resource "wine" is 5, the unit relationship value of the property resource "flower" is 4, the master virtual role transfers "one pot of wine" to the subordinate virtual role, the relationship value between the master virtual role and the subordinate virtual role is promoted by 5, correspondingly, the master virtual role transfers "one flower", and the relationship value between the master virtual role and the subordinate virtual role is promoted by 4.
Optionally, if the first slave virtual role is matched with the second slave virtual role, the scheme of this embodiment further includes: responding to a matching instruction triggered by the master virtual role, and binding the first slave virtual role and the second slave virtual role to obtain a role combination; and after receiving the virtual prop sent by the master virtual character to the character combination, increasing the matching level of the first slave virtual character and the second slave virtual character.
In one example, the master virtual character and the slave virtual character can be provided with a virtual gift (a virtual prop) to increase the quality (a game attribute) between them, thereby increasing the matching level of the slave virtual character, and thus increasing the gain attribute value and the basic attribute value (such as attack, and defense) of the slave virtual character. When the master virtual character obtains a plurality of slave virtual characters, after the two slave virtual characters reach a certain grade, the two slave virtual characters can be matched with each other to form a game combination such as knight-errant margin and the like, for example, the two slave virtual characters in a virtual scene are a group of matched combinations and the like.
In an implementation manner of this embodiment, after configuring the gain attribute values for the first slave virtual character and the second slave virtual character, the method further includes:
s21, calculating a first role attribute value of the first subordinate virtual role based on the base attribute value and the gain attribute value of the first subordinate virtual role, and calculating a second role attribute value of the second subordinate virtual role based on the base attribute value and the gain attribute value of the second subordinate virtual role;
and S22, if the master virtual character, the first slave virtual character, the second slave virtual character and the attribute conversion prop appear at the same scene position of the virtual scene, at least one part of the first character attribute value and/or the second character attribute value is transferred to the corresponding attribute of the master virtual character.
When the master virtual role, the first slave virtual role and the second slave virtual role appear simultaneously and the master virtual role carries the attribute conversion prop, the attribute directional transfer of the slave virtual roles can be realized, so that the corresponding attributes of the master virtual role are improved.
Based on the above embodiments, transferring at least a portion of the first character attribute value and/or the second character attribute value to the corresponding attribute of the primary virtual character comprises: acquiring the conversion rate of the attribute conversion prop; calculating a first transfer attribute value to be converted of the first role attribute value and/or a second transfer attribute value to be converted of the second role attribute value according to the conversion rate; adding a first transition attribute value and/or a second transition attribute value to the corresponding attribute of the primary virtual character.
Optionally, the master virtual character may also obtain a specific game resource in the virtual scene, for example, in the form of a synthetic prop to improve the conversion rate of the synthetic prop, or may select one of the synthetic props with different conversion rates.
By using virtual props (concentric knots, square knots and the like) for the obtained slave virtual characters, the goodness level of the slave virtual characters can be improved, namely, the relationship value is improved, after the goodness level of the slave virtual characters is improved, the total attribute value of the slave virtual characters is also improved, a player can use an array bitmap and other conversion props to transfer part or all of the attribute values of the slave virtual characters to the master virtual character, if the attack capability of any row (slave virtual character) is 1000, the conversion rate of the array bitmap is 30%, through conversion, the player can obtain the attack force of anyrow 300, after the conversion is completed, the slave virtual characters automatically disappear or continue to be reserved, the attributes and the attribute values of each slave virtual character can be different, and the master virtual character can automatically select the most appropriate to transfer. FIG. 3 is a schematic diagram of a conversion according to an embodiment of the present invention.
In an embodiment of this embodiment, after generating the first slave virtual character and the second slave virtual character in the virtual scene according to the first shard resource and the second shard resource, respectively, the method further includes: judging whether the subordinate virtual role sets of the preset role types are synthesized or not, wherein the subordinate virtual role sets comprise a plurality of subordinate virtual roles; if the subordinate virtual character sets of the preset character types are synthesized, virtual game resources are distributed to the main virtual character.
Optionally, when each slave virtual character is synthesized, a certain amount of virtual game resources may be allocated to the master virtual character.
In one example, the virtual scene includes five types of slave virtual roles, namely, a piano, a book, a sword, wine and a flower, all or part of the slave virtual roles in each type can form a role set, the system can initially allocate one slave virtual role to a master virtual role, meanwhile, the master virtual role further synthesizes the slave virtual roles after the collection is complete by collecting fragment resources such as knight-errant and guest letters (fragments), the master virtual role acquires and binds the corresponding slave virtual roles to realize the binding between the master virtual role and the slave virtual roles, and after the master virtual role collects all the slave virtual roles in one type of role set, a certain reward, such as a prop reward, is acquired.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a role attribute configuration device is further provided for implementing the foregoing embodiments and preferred embodiments, which have already been described and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram illustrating a configuration apparatus for role attributes according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes: an obtaining module 40, a generating module 42, a first determining module 44, and a configuring module 46, wherein,
a synthesizing module 40, configured to respond to a synthesizing instruction of the master virtual role, and generate a first slave virtual role and a second slave virtual role in the virtual scene according to the first fragment resource and the second fragment resource, respectively;
a generating module 42, configured to generate a first relationship value and a second relationship value according to resource interaction behaviors of the master virtual role and the first slave virtual role and the second slave virtual role, respectively;
a first determining module 44, configured to determine, in response to the association instruction of the master virtual role, whether the first slave virtual role is matched with the second slave virtual role;
a configuration module 46, configured to configure a gain attribute value for the first slave virtual role and the second slave virtual role if the first slave virtual role and the second slave virtual role are matched.
Optionally, the apparatus further comprises: the issuing module is used for issuing a game task after the synthesis module responds to a synthesis instruction of the master virtual character and respectively generates a first slave virtual character and a second slave virtual character in a virtual scene according to the first fragment resource and the second fragment resource; the selection module is used for responding to a selection instruction of the master virtual character, and selecting a target character from the first slave virtual character and the second slave virtual character to execute the game task based on the selection instruction; the computing module is used for computing the matching degree of the game task and the target role; the first distribution module is used for configuring the execution success rate of the game task based on the matching degree, wherein the execution success rate is positively correlated with the matching degree.
Optionally, the first determining module includes: an obtaining unit, configured to obtain a first role identifier and the first relationship value of the first slave virtual role, and obtain a second role identifier and the second relationship value of the second slave virtual role, where the first role identifier and the second role identifier are identification identifiers of the first slave virtual role and the second slave virtual role in a virtual scene, respectively; the judging unit is used for judging whether the combination of the first role identifier and the second role identifier hits a preset role combination or not and judging that the first relation value and the second relation value are both larger than a preset threshold value; and the determining unit is used for determining that the first subordinate virtual role is matched with the second subordinate virtual role if the combination of the first role identification and the second role identification hits a preset role combination and the first relation value and the second relation value are both greater than a preset threshold value.
Optionally, the configuration module includes: the obtaining unit is used for obtaining the matching level of the first slave virtual role and the second slave virtual role and obtaining the basic attribute values of the first slave virtual role and the second slave virtual role, wherein the matching level is used for representing the matching degree of the first slave virtual role and the second slave virtual role in a virtual scene; a calculation unit for calculating the gain attribute value based on the matching level and/or the base attribute value; a configuration unit, configured to configure the gain attribute value for the first slave virtual role and the second slave virtual role.
Optionally, the synthesis module includes: the monitoring unit is used for monitoring a first resource amount of a first prop resource transferred from the master virtual character to the first slave virtual character and monitoring a second resource amount of a second prop resource transferred from the master virtual character to the second slave virtual character; a calculating unit, configured to calculate a first relationship value between the master virtual character and the first slave virtual character based on the first resource amount, and calculate a second relationship value between the master virtual character and the second slave virtual character based on the second resource amount.
Optionally, the computing unit includes: the analysis subunit is used for analyzing the resource type of the first channel resource; the acquisition subunit is used for acquiring the unit relation value of the first channel resource according to the resource type; a calculation subunit operable to calculate the first relationship value based on the unit relationship value and the first resource amount.
Optionally, if the first slave virtual role is matched with the second slave virtual role, the apparatus further includes: the binding module is used for binding the first subordinate virtual role and the second subordinate virtual role in response to a matching instruction triggered by the master virtual role to obtain a role combination; and the adding module is used for adding the matching level of the first subordinate virtual role and the second subordinate virtual role after receiving the virtual prop sent by the master virtual role to the role combination.
Optionally, the apparatus further comprises: a calculation module, configured to calculate a first role attribute value of the first slave virtual role based on the base attribute value and the gain attribute value of the first slave virtual role and calculate a second role attribute value of the second slave virtual role based on the base attribute value and the gain attribute value of the second slave virtual role after the configuration module configures the gain attribute values for the first slave virtual role and the second slave virtual role; a transfer module, configured to transfer at least a part of the first role attribute value and/or the second role attribute value to a corresponding attribute of the master virtual role if the first slave virtual role, the second slave virtual role, and the attribute conversion prop appear at a same scene position of a virtual scene.
Optionally, the transfer module includes: the acquiring unit is used for acquiring the conversion rate of the attribute conversion prop; a calculating unit, configured to calculate, according to the conversion rate, a first transition attribute value to be converted of the first role attribute value and/or a second transition attribute value to be converted of the second role attribute value; an adding unit, configured to add the first transition attribute value and/or the second transition attribute value to a corresponding attribute of the master virtual character.
Optionally, the apparatus further comprises: a second determining module, configured to determine whether a slave virtual role set of a predetermined role type has been synthesized after the synthesizing module synthesizes a first slave virtual role and a second slave virtual role in a virtual scene according to the first role fragment resource and the second role fragment resource, respectively, where the slave virtual role set includes a plurality of master virtual roles; and the second distribution module is used for distributing virtual game resources to the main virtual role if the subordinate virtual role sets of the preset role types are synthesized.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Fig. 5 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes aprocessor 51, acommunication interface 52, amemory 53 and acommunication bus 54, where theprocessor 51, thecommunication interface 52, and thememory 53 complete communication with each other through thecommunication bus 54, and thememory 53 is used for storing a computer program;
theprocessor 51 is configured to implement the following steps when executing the program stored in the memory 53: responding to a synthesis instruction of the master virtual role, and respectively generating a first slave virtual role and a second slave virtual role in the virtual scene according to the first fragment resource and the second fragment resource; generating a first relation value and a second relation value according to the resource interaction behavior of the master virtual role corresponding to the first slave virtual role and the second slave virtual role respectively; responding to the association instruction of the master virtual role, and judging whether the first slave virtual role is matched with the second slave virtual role; and if the first subordinate virtual role is matched with the second subordinate virtual role, configuring a gain attribute value for the first subordinate virtual role and the second subordinate virtual role.
Optionally, after responding to the synthesis instruction of the master virtual role and generating a first slave virtual role and a second slave virtual role in the virtual scene according to the first shard resource and the second shard resource, the method further includes: issuing a game task; in response to a selection instruction of the master virtual character, selecting a target character from the first slave virtual character and the second slave virtual character to execute the game task based on the selection instruction; calculating the matching degree of the game task and the target role; and configuring the execution success rate of the game task based on the matching degree, wherein the execution success rate is positively correlated with the matching degree.
Optionally, the determining whether the first subordinate virtual role is matched with the second subordinate virtual role includes: acquiring a first role identifier and the first relation value of the first slave virtual role, and acquiring a second role identifier and the second relation value of the second slave virtual role, wherein the first role identifier and the second role identifier are respectively identification identifiers of the first slave virtual role and the second slave virtual role in a virtual scene; judging whether the combination of the first role identification and the second role identification hits a preset role combination or not, and judging that the first relation value and the second relation value are both larger than a preset threshold value; and if the combination of the first role identification and the second role identification hits a preset role combination, and the first relation value and the second relation value are both greater than a preset threshold value, determining that the first subordinate virtual role is matched with the second subordinate virtual role.
Optionally, configuring a gain attribute value for the first slave virtual role and the second slave virtual role includes: acquiring the matching level of the first slave virtual role and the second slave virtual role, and acquiring the basic attribute values of the first slave virtual role and the second slave virtual role, wherein the matching level is used for representing the matching degree of the first slave virtual role and the second slave virtual role in a virtual scene; calculating the gain attribute value based on the matching level and/or the base attribute value; configuring the gain attribute values for the first slave avatar and the second slave avatar.
Optionally, the generating a first relationship value and a second relationship value according to the resource interaction behavior of the master virtual character corresponding to the first slave virtual character and the second slave virtual character respectively includes: monitoring a first resource amount of a first prop resource transferred from the master virtual character to the first slave virtual character, and monitoring a second resource amount of a second prop resource transferred from the master virtual character to the second slave virtual character; calculating a first relationship value of the master virtual character to the first slave virtual character based on the first amount of resources, and calculating a second relationship value of the master virtual character to the second slave virtual character based on the second amount of resources.
Optionally, calculating a first relationship value between the master virtual character and the first slave virtual character based on the first resource amount includes: analyzing the resource type of the first road tool resource; acquiring a unit relation value of the first road tool resource according to the resource type; calculating the first relationship value based on the unit relationship value and the first resource amount.
Optionally, if the first slave virtual role is matched with the second slave virtual role, the method further includes: responding to a matching instruction triggered by the master virtual role, and binding the first slave virtual role and the second slave virtual role to obtain a role combination; and after receiving the virtual prop sent by the master virtual character to the character combination, increasing the matching level of the first slave virtual character and the second slave virtual character.
Optionally, after configuring the gain attribute values for the first slave virtual character and the second slave virtual character, the method further includes: calculating a first role attribute value for the first slave virtual role based on the base attribute value and the gain attribute value for the first slave virtual role, and calculating a second role attribute value for the second slave virtual role based on the base attribute value and the gain attribute value for the second slave virtual role; if the master virtual character, the first slave virtual character, the second slave virtual character and the attribute conversion prop appear at the same scene position of the virtual scene, at least one part of the first character attribute value and/or the second character attribute value is transferred to the corresponding attribute of the master virtual character.
Optionally, transferring at least a portion of the first character attribute value and/or the second character attribute value to a corresponding attribute of the primary virtual character includes: acquiring the conversion rate of the attribute conversion prop; calculating a first transfer attribute value to be converted of the first role attribute value and/or a second transfer attribute value to be converted of the second role attribute value according to the conversion rate; adding the first transition attribute value and/or the second transition attribute value to the corresponding attribute of the primary virtual character.
Optionally, after generating the first slave virtual role and the second slave virtual role in the virtual scene according to the first shard resource and the second shard resource, respectively, the method further includes: judging whether the subordinate virtual role sets of a preset role type are synthesized or not, wherein the subordinate virtual role sets comprise a plurality of subordinate virtual roles; and if the subordinate virtual role sets of the preset role types are synthesized, distributing virtual game resources for the main virtual role.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the role attribute configuration method in any one of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for configuring role attributes as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.