Game data processing method, device and equipment, computer readable storage medium and computer program product
By generating and iteratively executing decision links based on NPC attributes and experiences, the problem of single performance of existing NPCs is solved, which improves decision differentiation and performance diversity, and enhances the freshness of the game experience and user stickiness.
Patent Information
- Application Number
- CN202411670829.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-18
AI Technical Summary
In existing games, non-player characters (NPCs) can only perform fixed performances or single responses after being attacked by players, lacking differentiation in decision making and performance diversity, resulting in a lack of substitution and freshness in player experience.
By generating candidate decisions during gameplay, target decisions are determined based on NPC's attribute information and experience information, and the decision link is iteratively executed until the NPC executes the last decision. This method combines NPC attributes and experience dynamic changes to improve decision differentiation, and continuously adjusts decisions based on feedback behavior of virtual objects.
It improves the differentiation of decisions and performance diversity of NPCs, enhances the sense of exploration surprise in the game, and improves user stickiness.
Smart Images

Figure CN119633383A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data processing technology, and in particular to a game data processing method, device, equipment, computer-readable storage medium and computer program product. Background Art
[0002] Non-Player Characters (NPCs) are game characters that are not controlled by real players and are used to assign tasks to players or promote the development of the plot. NPCs are generally controlled by computer artificial intelligence. In related technologies, after being attacked by players, NPCs can only perform fixed performances in place, or make a single response to the player's attack, which cannot provide players with a sense of immersion and freshness. Summary of the invention
[0003] The embodiments of the present application provide a game data processing method, device, computer-readable storage medium, and computer program product, which can improve the decision-making differentiation and performance diversity of non-player characters.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a method for processing game data, the method comprising:
[0006] During the game play, in response to reaching a decision generation timing for a non-player character, generating at least one candidate decision;
[0007] Determining a first target decision from at least one of the candidate decisions based on the attribute information and experience information of the non-player character, and controlling the non-player character to execute the first target decision;
[0008] When the decision chain corresponding to the non-player character includes other decisions after the first target decision, the following steps are iteratively performed until the non-player character executes the last decision in the decision chain:
[0009] Obtaining behavior information of a first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and the attribute information, and controlling the non-player character to execute the second target decision
[0010] The present application provides a game data processing device, including:
[0011] A decision generation module, for generating at least one candidate decision in response to reaching a decision generation timing for a non-player character during a game match;
[0012] a decision determination module, configured to determine a first target decision from at least one of the candidate decisions based on at least one of the attribute information and the experience information of the non-player character, and control the non-player character to execute the first target decision;
[0013] A decision execution module, for iteratively executing the following steps when the decision chain corresponding to the non-player character includes other decisions after the first target decision, until the non-player character executes the last decision in the decision chain: obtaining behavior information of a first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and the attribute information, and controlling the non-player character to execute the second target decision.
[0014] An embodiment of the present application provides a computer device, the computer device comprising:
[0015] A memory for storing computer executable instructions;
[0016] The processor is used to implement the game data processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0017] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the game data processing method provided in the embodiment of the present application when executed by a processor.
[0018] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the game data processing method provided in the embodiment of the present application is implemented.
[0019] The embodiments of the present application have the following beneficial effects:
[0020] During the game, when the decision generation timing for the non-player character is reached, at least one candidate decision is first generated, and then a first target decision is determined from the at least one candidate decision based on the attribute information and experience information of the non-player character. Since the experience information of the non-player character will change dynamically, even in the same scene, the first target decision determined will be different based on the changed experience information, so that the decision differentiation degree of the non-player character can be improved; when the decision chain corresponding to the non-player character includes other decisions after the first target decision, the following steps are iteratively performed to obtain the behavior information of the first virtual object interacting with the non-player character; based on the behavior information and the attribute information, a second target decision is determined, and the non-player character is controlled to execute the second target decision until the non-player character executes the last decision in the decision chain, that is, after executing the first target decision, the non-player character will continuously determine a new target decision based on the feedback behavior of the first virtual object and the attribute information of the non-player character itself. Since the feedback behaviors of different first virtual objects are different, different target decisions will be generated, thereby making the performance of the NPC more diversified, improving the sense of surprise of game exploration, and thus improving user stickiness. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the interface of NPC behavior feedback in the related technology;
[0022] Figure 2 is a schematic diagram of the network architecture of the game data processing system 100 provided in an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of the structure of the server 200 provided in an embodiment of the present application;
[0024] Figure 4A is a first flow chart of the game data processing method provided by an embodiment of the present application;
[0025] Figure 4B It is a schematic diagram of the implementation process of determining the first target decision provided in an embodiment of the present application;
[0026] Figure 5 is a second flow chart of the game data processing method provided in an embodiment of the present application;
[0027] Fig. 6A This is a schematic diagram of an interface for displaying NPC character information provided in an embodiment of the present application;
[0028] Figure 6B is a schematic diagram of an interface for displaying NPC relationship information provided in an embodiment of the present application;
[0029] Figure 6CThis is a schematic diagram of an interface for displaying NPC experience information provided in an embodiment of the present application;
[0030] Fig. 7A is a first interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application;
[0031] Figure 7B is a second interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application;
[0032] Figure 7C This is a third interaction diagram between an NPC and a first virtual object provided in an embodiment of the present application.
[0033] Fig. 8A This is a fourth interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application;
[0034] Figure 8B This is a fifth interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application;
[0035] Fig. 9 This is a schematic diagram of a third implementation flow of the game data processing method provided in an embodiment of the present application;
[0036] Fig.10 is a schematic diagram of the structure of a game data processing system provided in an embodiment of the present application;
[0037] Fig.11 is a schematic diagram of the data structure of the memory chain provided in an embodiment of the present application;
[0038] Fig.12 It is a schematic diagram of the experience text generation process provided by the embodiment of the present application;
[0039] Fig.13 This is a schematic diagram of using a large language model for text polishing;
[0040] Fig.14 It is a schematic diagram of determining the behavior identifier to be fed back through a large language model provided in an embodiment of the present application.
[0041] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0043] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0044] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0045] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0046] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0047] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0048] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0049] 1) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed may be executed.
[0050] 2) Mobile terminal: generally refers to the mobile phone terminal, including but not limited to other handheld portable gaming devices.
[0051] 3) Client: An application running in the terminal to provide various services, such as game clients and exercise simulation clients.
[0052] 4) Virtual scene: a virtual scene displayed (or provided) when the application is running on the terminal. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and users can control virtual objects to move in the virtual scene.
[0053] 5) Virtual objects: images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable objects can be virtual characters, virtual animals, cartoon characters, etc. The virtual object can be a virtual image in the virtual scene that represents the user. A virtual scene can include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.
[0054] 6) NPC refers to a character in video games, tabletop role-playing games, and other interactive media that is controlled by a computer program or game administrator rather than directly by the player.
[0055] In games, NPCs usually play the following roles: Interactive roles: Players can talk to them, trade with them, obtain tasks or get information in the game. Environmental roles: They play background roles in the game, such as citizens, merchants or pedestrians, etc., adding realism to the game world. Quest-driven roles: This type of NPC is usually related to the game tasks or plot, and players need to interact with them to advance the game process.
[0056] The behavior of NPCs is usually controlled by pre-programmed instruction sets or artificial intelligence algorithms, which enable them to perform specific tasks or produce specific behaviors without direct control by the player. In game design, the use of NPCs can enrich the game content and improve the player's immersion and interactivity.
[0057] 7) NPC character parameters (also known as NPC attribute information): including the NPC's identity information (job type), body type information (male, female, young or old), personality information (based on MBTI), etc. These serve as the NPC's basic information configuration, and these basic information configurations will have a practical impact on all NPC functions and gameplay in the game, and are the basis for differentiation and emergence.
[0058] 8) Decision-making: Each NPC will make some logical behaviors based on its own experience and personality when affected by the player or receiving the events happening around it through audio-visual and parameter reception, such as: performing, fighting, escaping, begging for mercy, strong interaction, and other behaviors with logical parameters.
[0059] 9) Experience: After each NPC is influenced by the player, or receives the events happening around it through audio-visual and parameter reception, and performs some logical behaviors that are consistent with its own experience and personality, the events that the NPC actually experienced are recorded in the form of text information to obtain text. The experience can affect the subsequent decision-making of the NPC, and can also be viewed at any time in the NPC information interface.
[0060] 10) Private property: A large world object that belongs to an NPC. Any operation on the object (F interaction, chanting, destruction, etc.) will be passed to the owner of the object (that is, the NPC). The owner will make different decision feedback based on the different types of operations on different private properties by the player, his own personality and added experience, or the distance from the large world object.
[0061] 11) Preferences: Each NPC will have varying degrees of likes, dislikes, or indifferences to most in-game items based on their own personality parameters. This can be reflected through player gifts, as well as system gameplay such as the judgment and performance of picking up objects dropped in the big world.
[0062] In order to better understand the game data processing method for controlling NPCs provided in the embodiments of the present application, the NPC behavior feedback method in the related art and its existing shortcomings are first explained.
[0063] There are currently two main ways to provide NPC behavior feedback in the game:
[0064] Method 1: Figure 1 As shown, the NPC will perform fixed interactive actions based on the trigger operation received by F key 001. Figure 1 The NPC in the game is a blacksmith boss. When the NPC receives the interactive command of the F key, it will only perform the fixed action of forging iron. Or after being attacked and collided by the player, the NPC will perform a fixed performance on the spot, or the NPC will take the initiative to attack or interact with the player, and the player will respond passively. The NPC is more like the initiator of the function or performance.
[0065] Method 2: Players attack, steal, and acupuncture the NPC, and the NPC will respond to the player's behavior after receiving these actions. These NPC responses are driven by an anger bar as a whole. The system logic level is actually more convergent, and the emergent divergent results are relatively weak. The NPC's decision feedback will be more single, and the subsequent sense of surprise brought to players in the later stages of the game will gradually disappear.
[0066] In the first method mentioned above, NPCs are more like tools that purely perform the atmosphere or initiate some gameplay or functions, and cannot provide players with a sense of immersion and freshness, as well as the surprise of repeated experience and exploration. In the second method mentioned above, although NPCs can respond to some behaviors of players, their behaviors are relatively simple, and NPCs will not change their original decisions based on previous player behaviors or some special factors; nor do they have the ability to differentiate NPC decisions based on similar experiences, personality, etc., so players will lack freshness and fun after continuously experiencing the big world gameplay.
[0067] Based on this, the embodiments of the present application provide a game data processing method, apparatus, device, computer-readable storage medium, and computer program product, which can improve the decision differentiation and performance diversity of non-player characters. The following describes an exemplary application of the computer device provided by the embodiments of the present application. The computer device provided by the embodiments of the present application can be implemented as various types of terminals such as laptops, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, and vehicle-mounted terminals, and can also be implemented as servers. Below, an exemplary application when the device is implemented as a server will be described.
[0068] See also Figure 2 , Figure 2 1 is a schematic diagram of the network architecture of the game data processing system 100 provided in the embodiment of the present application. To support a game application, the terminal 400 is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The network architecture is suitable for an application mode that relies on the computing power of the server 200 to complete the virtual scene calculation and output the virtual scene at the terminal 400.
[0069] Taking the visual perception of the virtual scene 100 as an example, the server 200 calculates the virtual scene related display data and sends it to the terminal 400. The terminal 400 relies on the graphics computing hardware to complete the loading, parsing and rendering of the calculated display data, and relies on the graphics output hardware to output the virtual scene to form a visual perception. For example, a two-dimensional video frame can be presented on the display screen of a smartphone, or a video frame with a three-dimensional display effect can be projected on the lenses of augmented reality / virtual reality glasses. As for the perception of the form of the virtual scene, it can be understood that the corresponding hardware output of the terminal can be used, such as using a microphone output to form an auditory perception, using a vibrator output to form a tactile perception, and so on.
[0070] As an example, the terminal 400 runs a client 410 (e.g., a network version of a game application), and interacts with other users in the game by connecting to a game server (i.e., server 200). The terminal 400 outputs a virtual scene of the client 410, which may include multiple virtual objects, such as virtual objects of one's own side and a friendly side, and may also include virtual objects of an enemy side, and the virtual scene also includes non-player characters, i.e., NPCs. NPCs can perform ecological performances and can also interact with other virtual objects in the virtual scene. During the game match, the terminal 400 and the server transmit game match data, and the server 200 generates at least one candidate decision in response to reaching a decision generation timing for a non-player character, and determines a first target decision from at least one of the candidate decisions based on the attribute information and experience information of the non-player character, and controls the non-player character to execute the first target decision. The server 200 sends the game data of the non-player character executing the first target decision to the terminal 400, and the terminal 400 displays the behavior of the non-player character executing the first target decision in the virtual scene based on the game data. When the decision chain corresponding to the non-player character includes other decisions after the first target decision, the following steps are iteratively executed until the non-player character executes the last decision in the decision chain: obtain the behavior information of the first virtual object that interacts with the non-player character; determine the second target decision based on the behavior information and the attribute information, and control the non-player character to execute the second target decision. After executing the first target decision, the non-player character will continuously determine new target decisions based on the feedback behavior of the first virtual object and the attribute information of the non-player character itself. Since different first virtual objects have different feedback behaviors, different target decisions will be generated, thereby making the NPC's performance more diversified, increasing the sense of surprise in game exploration, and thus improving user stickiness.
[0071] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0072] See also Figure 3 , Figure 3 is a schematic diagram of the structure of the server 200 provided in an embodiment of the present application, Figure 3 The server 200 shown includes: at least one processor 210, a memory 230 and at least one network interface 220. The various components in the server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 3 Various buses are labeled as bus system 240 .
[0073] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0074] The memory 230 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 230 may optionally include one or more storage devices that are physically remote from the processor 210.
[0075] The memory 230 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 230 described in the embodiments of the present application is intended to include any suitable type of memory.
[0076] In some embodiments, memory 230 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0077] Operating system 231, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0078] The network communication module 232 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 220. Exemplary network interfaces 220 include: Bluetooth, Wireless Authentication (WiFi), and Universal Serial Bus (USB).
[0079] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 3 The game data processing device 233 stored in the memory 230 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: a decision generation module 2331, a decision determination module 2332, and a decision execution module 2333. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0080] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the game data processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.
[0081] In some embodiments, the terminal or server can implement the game data processing method provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a game APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.
[0082] The game data processing method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the computer device provided in the embodiment of the present application.
[0083] The following describes the game data processing method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the game data processing method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.
[0084] See also Figure 4A , Figure 4A is a flowchart of a game data processing method provided in an embodiment of the present application, which will be combined with Figure 4A The steps shown are explained, Figure 4A The body of the step is the server.
[0085] In step 101, during a game session, in response to reaching a decision generation opportunity for a non-player character, at least one candidate decision is generated.
[0086] In some embodiments, after starting a game, the virtual scene displayed in the human-computer interaction interface of the terminal may be displayed from a first-person perspective (for example, the player plays the virtual object in the game from his own perspective); or from a third-person perspective (for example, the player chases the virtual object in the game to play the game); or from a bird's-eye view; wherein the above perspectives may be switched arbitrarily.
[0087] The virtual scene may include a variety of virtual objects, for example, it may include virtual objects controlled by the terminal corresponding to the player, it may also include virtual objects controlled by other users or enemy interactive objects (such as monsters) controlled by robots, and it may also include non-player characters. Virtual objects can be divided into multiple teams, and the teams may be in hostile or collaborative relationships. The teams in the virtual scene may include one or all of the above relationships. Taking the first-person perspective display of the virtual scene as an example, the virtual scene displayed in the human-computer interaction interface may include: according to the viewing position and field of view of the virtual object in the complete virtual scene, determine the field of view area of the virtual object, and present a partial virtual scene in the field of view area of the complete virtual scene, that is, the displayed virtual scene may be a partial virtual scene relative to the panoramic virtual scene. Because the first-person perspective is the most impactful viewing perspective for users, it can achieve immersive perception of users during the operation.
[0088] During the game, when at least one of the following situations is detected, it is determined that the decision generation timing for the non-player character has been reached: the first virtual object performs an interactive action on the non-player character, and the first virtual object triggers at least one preset event that affects the non-player character. Here, the first virtual object can be a virtual object controlled by the player, and can also be an enemy interactive virtual object (such as a monster). The interactive action performed by the first virtual object on the non-player character refers to an interactive action performed on the non-player character itself or on the private property of the non-player character. Exemplarily, the interactive action can be an attack of the first virtual object on the non-player character, a snatch action of the first virtual object on the private property of the non-player character, and an action of the first virtual object giving virtual resources to the non-player character. The at least one preset event that the first virtual object affects the non-player character can be an action that does not directly act on the non-player character, but will affect the non-player character. Exemplarily, the preset event may be that the first virtual character attacks the second virtual character, while the second virtual character and the non-player character are relatives or friends. The preset event may also be that the first virtual character robs the private property of the second virtual character, while the second virtual character and the non-player character are relatives or friends. The preset event may also be that the first virtual character approaches the non-player character, while the first virtual character may be a robber character.
[0089] When it is determined that the decision generation timing for the non-player character has been reached, candidate decisions will be generated based on the interactive action or preset event that triggers the decision generation timing, and one interactive action or one preset event will generate one candidate decision. When the decision generation timing is triggered by at least one interactive action or at least one preset event, or by both the interactive action and the preset event, multiple candidate decisions will be generated. Exemplarily, when the first virtual character attacks the non-player character, the third virtual character approaches the non-player character, and the third virtual character is a bandit character, then one candidate decision will be generated based on the first virtual character attacking the non-player, and one candidate decision will be generated based on the preset event that the third virtual character approaches the non-player character, so two candidate decisions will be generated at this time.
[0090] In step 102, based on the attribute information and experience information of the non-player character, a first target decision is determined from at least one candidate decision, and the non-player character is controlled to execute the first target decision.
[0091] In some embodiments, the attribute information of the non-player character includes gender information, personality information, identity information, body shape information, etc., wherein the gender information is male or female, female or male, etc., and the personality information can be determined based on the Myers-Briggs Type Indicator (MBTI), which measures individual behavioral differences in four dimensions. The different preference tendencies of the four dimensions are arranged and combined to form 16 personality types, and each type of personality characteristics is represented by 4 letters. It is also a personality test tool to measure and describe the psychological activity rules and personality types in obtaining information, making decisions, etc. The personality information can be one of a thinker, an inventor, an explorer, a philanthropist, a supervisor, a protector, an architect, a doer, etc. The identity information is used to characterize the work of the non-player character. For example, the identity information can be a civilian, a guard, a sheriff, a businessman, a blacksmith shop owner, a robber, etc., and the body shape information can be thin, burly, obese, etc. The attribute information of the non-player character can be pre-set by the copywriter, or it can be randomly created by the NPC batch generation tool. The experience information is text information recording the events experienced by the non-player character after the non-player character makes a decision when the non-player character receives an interactive action performed on the non-player character by the first virtual object or detects a preset event. The experience information can have an impact on the subsequent decision to be made by the non-player character.
[0092] In some implementations, when the player terminal receives an information viewing operation for a non-player character, in response to the information viewing operation for the non-player character, an information display interface is presented; the attribute information and experience information of the non-player character are presented on the information display interface; the information display interface may also display an image of the non-player character. The attribute information includes at least one of the following: personality information, identity information, and relationship information, and the relationship information includes a role identifier associated with the non-player character and a relationship identifier. The role identifier may be a role avatar, and may also include a role name, and the relationship identifier may be a father-son relationship, a mother-daughter relationship, a brother relationship, a friend relationship, an enemy relationship, etc.
[0093] It should be noted that the attribute information and experience information of the non-player character can be displayed on the same information display interface. In some embodiments, the attribute information and experience information of the non-player character can be displayed on different information display interfaces. When an information viewing operation is received, the information display interface is presented, the attribute information can be displayed on the information display interface, and a first entry control for viewing the experience information is displayed on the information display interface. When a trigger operation for the first entry control is received, an information display interface for displaying the experience information can be displayed.
[0094] See also Figure 4B , the step 102 of “determining a first target decision from at least one candidate decision based on the attribute information and experience information of the non-player character” can be performed by Figure 4B The steps 1021 to 102 shown are implemented as described in detail below.
[0095] In step 1021, it is determined whether the number of candidate decisions is greater than one.
[0096] Among them, when the number of candidate decisions is greater than 1, that is, the number of candidate decisions is two or more, the first target decision can be determined based on the selection probability through steps 1022A to 1023A, and the first target decision can also be determined based on the priority through steps 1022B and 1023B.
[0097] When the number of candidate decisions is not greater than 1, that is, the number of candidate decisions is one, proceed to step 1024 .
[0098] In step 1022A, the selection probability of each candidate decision is determined based on the attribute information and the experience information.
[0099] In some embodiments, the attribute information includes at least one of character information and identity information. When step 1022A is implemented, first, based on at least one of the character information and the identity information, and the experience information, the selection weight of the non-player character for each candidate decision is determined; then, based on the selection weight of the non-player character for each of the candidate decisions, the total weight is determined; finally, based on the selection weight of the non-player character for each candidate decision and the total weight, the selection probability of each candidate decision is determined.
[0100] In some embodiments, the selection weights for executing various decisions can be pre-set on at least one dimension of personality, identity, and experience, thereby obtaining a weight selection table. Therefore, for non-player characters with different personalities, identities, and experiences, the selection weights of the non-player characters for candidate decisions can be determined from the weight selection table based on personality, identity, and experience. The selection weight can be an integer value from 0 to 100. For example, an NPC with the identity of a guard and the personality of a protector has a selection weight of 10 for the candidate decision of assisting in seeking help, a selection weight of 2 for the candidate decision of watching the battle, and a selection weight of 0 for the candidate decision of continuing the ecological performance.
[0101] Then, the selection weights of the non-player character for each candidate decision are added together to obtain the total weight. Continuing with the above example, the total weight of the non-player character is 12. Finally, the ratio of the selection weight of each candidate decision to the total weight is determined as the selection probability of each candidate decision. Continuing with the above example, the probability of the non-player character selecting the candidate decision of assisting in seeking help is 0.83, the probability of selecting the candidate decision of watching the battle is 0.17, and the probability of selecting the candidate decision of continuing the ecological performance is 0.
[0102] In step 1023A, a first target decision is randomly determined from at least two candidate decisions based on the selection probability of each candidate decision.
[0103] In the embodiment of the present application, the first target decision is randomly selected from at least two candidate decisions based on the selection probability of each candidate decision. For example, the number of candidate decisions is 3, the selection probability of candidate decision 1 is 0.6, the selection probability of candidate decision 2 is 0.3, and the selection probability of candidate decision 3 is 0.1. Although the selection probability of candidate decision 1 is the highest, it can only mean that candidate decision 1 has the highest probability of being selected, but the final selection may not necessarily be candidate decision 1, but candidate decision 3.
[0104] Through the above steps 1022A and 1023A, the selection probability corresponding to each candidate decision can be determined based on the selection weight of the non-player characters for the candidate decisions, so that the first target decision is randomly selected from multiple candidate decisions based on the selection probability, rather than determining the candidate decision with the highest selection probability as the first target decision. In this way, the non-player characters may execute different decisions in the same scenario, thereby improving the randomness of the selected first target decision and enhancing the sense of surprise in game exploration.
[0105] In step 1022B, a priority of each candidate decision is determined based on the attribute information and the experience information.
[0106] In some embodiments, the priority of candidate decisions can be determined based on the personality information, identity information, and experience information in the attribute information. First, an evaluation system is established, and evaluation criteria such as influence, urgency, moral considerations, emotional factors, etc. are defined. Then a weight is set for each criterion, which should be determined based on the NPC's personality, experience, and professional characteristics; then the personality characteristics are analyzed: for each personality trait, analyze how it affects the decision. For example, a highly responsible NPC may pay more attention to decisions that have a positive impact on others; and assign weights based on the strength of the personality trait. The more significant the personality trait, the greater its influence in decision-making; and analyze the impact of the NPC's past experience on its behavior and decision-making. For example, if an NPC has suffered betrayal in the past, they may be more cautious in interpersonal relationships, so the impact of the experience on the decision is converted into a weight, and the weight is adjusted according to the significance of the experience, and the restrictions and requirements of the NPC's identity information on the decision are also considered. For example, an officer may prioritize mission completion and the safety of soldiers, and assign weights to decision factors related to professional roles, and consider the impact of professional norms and responsibilities on decision-making. For each candidate decision, use the weights set above to evaluate its individual criteria scores, multiply each criterion score by its weight, and then sum all weighted scores to obtain the overall score of each decision, and sort all candidate decisions according to the overall score of each candidate decision to obtain the priority of the candidate decision. The priority can be an integer value between 0 and 100, and the larger the value, the higher the priority.
[0107] In step 1023B, the candidate decision with the highest priority is determined as the first target decision.
[0108] In some embodiments, since the priority of candidate decisions is determined based on the attribute information and experience information of the non-player character, determining the candidate decision with the highest priority as the first target decision can not only ensure that the NPC allocates the most resources and attention to the most critical tasks, thereby improving the efficiency of actions; it also helps to promote the development of the plot, making the NPC's behavior more consistent with its role and story background, and enhancing the story.
[0109] In some embodiments, when the number of candidate decisions is two or more, after step 1023A or step 1023B, a first decision and a second decision may be determined from other candidate decisions except the first target decision, wherein the first decision has a suspending capability and the second decision does not have a suspending capability; the first decision is suspended and the second decision is discarded. After the non-player character is controlled to execute the first target decision, the suspension of the first decision is canceled and the non-player character is controlled to execute the first decision.
[0110] In an embodiment of the present application, whether a candidate decision has the ability to suspend is pre-set. For example, a flag bit indicating whether it has the ability to suspend can be set. When the candidate decision has the ability to suspend, the flag bit is set to 1; when the candidate decision does not have the ability to suspend, the flag bit is set to 0. The suspending ability of a candidate decision means that the candidate decision can be temporarily shelved instead of being executed immediately or completely abandoned. Non-player characters may need to interact with virtual objects to obtain more information, and suspending decisions can leave room for such interactions. In addition, in a game or virtual environment, suspending candidate decisions can also promote the development of the plot and provide players with more opportunities for exploration and decision-making. In general, the first decision with the ability to suspend makes the behavior of NPCs richer and more realistic, and they can flexibly adjust the decision-making process according to their own logic and external environment. This ability helps to enhance the interactivity and immersion of games or virtual environments.
[0111] As for the second decision that does not have the ability to be suspended, it can be directly discarded, so that resources can be allocated more effectively and resources can be avoided from being wasted on unimportant or inefficient decisions.
[0112] In step 1024, it is determined whether the non-player character has target experience information for changing its behavior.
[0113] When the non-player character does not have the target experience information for changing its own behavior, the process proceeds to step 1025 ; when the non-player character has the target experience information for changing its own behavior, the process proceeds to step 1026 .
[0114] At step 1025 , the candidate decision is determined as the first target decision.
[0115] In some embodiments, when the number of candidate decisions is one and the non-player character does not have target experience information for changing its own behavior, the candidate decision can be directly determined as the first target decision. In this way, while ensuring that the decision is correct, the decision-making process can be simplified, the NPC's reaction speed can be improved, and the fluency of the game can be improved.
[0116] At step 1026 , a first target decision is determined based on the target experience information and the attribute information.
[0117] Wherein, the first target decision is different from the candidate decision. Exemplarily, when the candidate decision is to accept the virtual resources presented by the first virtual object, based on the target experience information that the first virtual object fights with the non-player character and the non-player character object fails and the attribute information of the non-player character, it can be determined that the first target decision is to reject the virtual resources presented by the first virtual object.
[0118] Through the above steps 1021 to 1026, a first target decision can be determined based on the experience information, attribute information and candidate decisions of the non-player character, and when there is only one candidate decision, when the experience information of the non-player character includes target experience information for changing its own behavior, a first target decision different from the candidate decision can be determined based on the target experience information and attribute information. This ensures that even in the same scenario, due to the update of the non-player character's experience information, the non-player character will execute different decisions, thereby increasing the diversity of gameplay and enhancing freshness.
[0119] In some embodiments, after step 1026, the decision link corresponding to the non-player character may also be updated based on the first target decision. The decision link records the NPC's feedback on the instant behavior or preset event. When updating the decision link based on the first target decision, if the decision link includes the historical decision corresponding to the event or action that triggers the first target decision, the historical decision may be replaced with the first target decision; if the decision link does not include the historical decision corresponding to the event or action that triggers the first target decision, the event or action that triggers the first target decision and the first target decision may be added to the decision link.
[0120] Exemplarily, the decision link is: I was attacked by the first virtual object today → I want to fight back. That is, the decision for the interactive action "I was attacked by the first virtual object" is to fight back, and the experience information of the non-player character includes the target experience information that the first virtual object defeated the non-player character. Then, when the non-player character is attacked by the first virtual object again, the first target decision is: I beg for mercy from the first virtual object. At this time, the updated decision link is: I was attacked by the first virtual object today → I beg for mercy. Assume that later, the feedback information of the first virtual object for the non-player character's decision to beg for mercy is that it did not fight with the non-player character. The non-player character determines the decision to thank the first virtual object for this feedback information. Further, the updated decision link is: I was attacked by the first virtual object today → I beg for mercy → the first virtual character spared me → I performed a thank-you performance for the first virtual object.
[0121] Continue to refer to Figure 4A , proceed to step 102 for description.
[0122] In step 103, when the decision chain corresponding to the non-player character includes other decisions after the first target decision, the following steps are iteratively performed until the non-player character executes the last decision in the decision chain: obtaining behavior information of the first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and attribute information, and controlling the non-player character to execute the second target decision.
[0123] Here, the first virtual object can be a player-controlled character or a monster character controlled by AI in the game. The behavior information of the first virtual object interacting with the non-player character can be an interactive behavior that directly acts on the non-player character. For example, it can be the attack behavior of the first virtual object on the non-player character; it can also be an interactive behavior that does not directly act on the non-player character. Although the interactive behavior does not directly act on the non-player character, it will have an impact on the non-player character. For example, it can be that the first virtual object approaches the non-player character. The non-player character will determine the second target decision based on the behavior information fed back by the first virtual object and its own attribute information, and control the non-player character to execute the second target decision. In this way, as the non-player character continuously receives the behavior information or preset events fed back by the first virtual object, the performance of the non-player character also tends to be diversified, forming emergence.
[0124] In some embodiments, when the decision chain corresponding to the non-player character does not include other decisions after the first target decision, it means that the first target decision is the last decision in the decision chain, and the survival status of the non-player character can be determined at this time; the survival status of the non-player character can be alive or dead. When the survival status of the non-player character is alive, the first execution result after the non-player character executes the first target decision is obtained, and the experience information is updated based on the first target decision, the first execution result and the attribute information; when the survival status is dead, it means that the non-player character no longer exists, then the experience information of the non-player character can be deleted, thereby reducing the occupation of storage space by the experience information.
[0125] In some embodiments, when updating the experience information based on the first target decision, the first execution result and the attribute information, the attribute information, the first target decision and the first execution result can be concatenated to generate prompt words, and then a text rewriting service is requested from a pre-trained large language model, and the pre-trained large language model is used to rewrite the text based on the generated prompt words to obtain the output text, and then the output text is added to the experience information of the non-player character, thereby realizing the update of the experience information, which can ensure that the latest and accurate data basis is provided for determining the decision.
[0126] In some embodiments, Figure 5 As shown, after the non-player character executes the last decision in the decision chain, the following steps 104 and 105 may also be executed:
[0127] In step 104, each decision executed by the non-player character, from the first target decision to the last decision, and a second execution result after executing each decision are obtained.
[0128] In some embodiments, each decision from the first target decision to the last decision is obtained from the decision chain corresponding to the non-player character, as well as a second execution result after executing each decision.
[0129] Exemplarily, the first virtual object attacks a non-player character, and the first target decision is: counterattack, and the result of executing the first target decision is that the non-player character fails; the next decision is: the non-player character begs for mercy from the first virtual object, and the result of executing this decision is that the non-player character is spared by the first virtual object, and the next decision is: express gratitude to the first virtual object character.
[0130] In step 105, the experience information is updated based on the respective decisions, the respective second execution results, and the attribute information.
[0131] In some embodiments, when step 105 is implemented, first, based on each of the decisions and each of the second execution results, the event cause text, the event process text and the event result text are determined; then, the attribute information, the event cause text, the event process text and the event result text are concatenated to obtain the initial experience text; then, the initial experience text is rewritten to obtain the experience text to be added; finally, the experience text to be added is added to the experience information.
[0132] Among them, the event cause text can be determined based on the interactive action or preset event that triggers the decision, the event process text can be determined based on the decision behavior, and the event result text can be determined based on the second execution result of the decision. Exemplarily, the interactive action that triggers the decision is: the first virtual object uses a virtual prop to attack the non-player character, the event cause text can be that the first virtual object slashed a knife, and the determined decision is: counterattack, then the event experience text can be that I fought with the first virtual object, and the second execution result is: the non-player character failed, then the event result text can be that I failed. In some embodiments, the initial experience text can be determined as the prompt word of the large language model, and the pre-trained large language model is used to rewrite the text based on the prompt word to obtain the experience text to be added, and the experience text to be added is added to the experience information, wherein, when the experience text to be added is added to the experience information, time information can be recorded, so that each experience text in the experience information can form a memory link based on the time information, providing the necessary data basis for determining the non-player decision.
[0133] In some embodiments, when the number of candidate decisions is one, the interactive action performed by the first virtual object on the non-player character includes forcibly obtaining the virtual resources of the non-player character, and the candidate decision is to demand compensation from the first virtual object, the attribute information and experience information of the non-player character are obtained; that is, the first virtual object robbed the virtual resources of the non-player character, and the virtual resources can be private property such as props or treasure boxes of the non-player character. When the experience information does not include the game experience between the first virtual object and the non-player character, or the experience information includes the game experience between the first virtual object and the non-player character and the game experience represents a victory in the game, it is determined that the non-player character does not have the target experience information to change its own behavior; then the candidate decision is not changed at this time, and demanding compensation from the first virtual object can be determined as the first target decision. That is to say, when the private property of the non-player character is robbed by the first virtual character, if the non-player character has no battle experience with the first virtual object, or has a battle experience and the non-player character defeats the first virtual object, then the non-player character will keep the candidate decision unchanged and claim compensation from the first virtual object. For example, the first virtual object may be asked for virtual coins, virtual points, etc.
[0134] After the non-player character executes the first target decision, when the behavior information of the first virtual object for the first target decision is to play a game with the non-player character object, determine a game result, the game result being a game win or a game lose; based on the behavior information and the game result, determine a third execution result of the first target decision; illustratively, the third execution result may be: I fought with the first virtual object, but I failed, and the third execution result may also be: I fought with the first virtual object, and I won. Update the experience information based on the first target decision, the third execution result, and the attribute information.
[0135] Here, similar to the implementation process of step 105, the event cause text, event process text and event result text are first determined based on the first target decision and the third execution result; then the attribute information, event cause text, event process text and event result text are concatenated to obtain the initial experience text; then the initial experience text is rewritten using the pre-trained large language model to obtain the experience text to be added; finally, the experience text to be added is added to the experience information.
[0136] In some embodiments, when the experience information includes the game experience between the first virtual object and a non-player character, and the game experience represents a game failure, it is determined that the non-player character has the target experience information to change its own behavior, and providing virtual resources to the first virtual object is determined as the first target decision.
[0137] It should be noted that when the experience information includes at least two game experiences between the first virtual object and the non-player character, the game result in the most recent game experience can be obtained. When the game result is a game failure, it is determined that the non-player character has the target experience information to change its own behavior, and the most recent game experience is determined as the target experience information. When the experience information includes at least two game experiences between the first virtual object and the non-player character, the failure probability can be determined based on the game result in each game experience. When the failure probability is greater than a preset probability threshold, it is determined that the non-player character has the target experience information to change its own behavior, and the game experience of the most recent game failure is determined as the target experience information. At this time, it is necessary to determine a first target decision different from the candidate decision of claiming compensation from the first virtual object, that is, providing virtual resources to the first virtual object is determined as the first target decision. In some embodiments, when executing the decision to provide virtual resources to the first virtual object, the non-player character can also show a fearful expression or action, so that the behavior of the non-player character is more in line with its role and story background, and the story is enhanced.
[0138] When the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a first type of relationship, it is determined that the first virtual object triggers at least one preset event that affects the non-player character, and the candidate decision is determined to be playing against the first virtual character, and the first type of relationship represents a friendly relationship; illustratively, the first type of relationship can be a family relationship (father-son relationship, brother relationship, etc.), or a friend relationship. That is, when the non-player character detects that the first virtual object is playing against the second virtual object with which it has a friendly relationship, it is determined that a preset event is detected, and at this time, the attribute information and experience information of the non-player character are obtained; when the experience information does not include the game experience of the first virtual object and the non-player character, or the experience information includes the game experience of the first virtual object and the non-player character and the game experience represents a game victory, it is determined that the non-player character does not have the target experience information to change its own behavior; playing against the first virtual character is determined as the first target decision.
[0139] Here, when the experience information includes a game experience between the first virtual object and the non-player character, when the game result of the game experience is a game victory, it is determined that the non-player character does not have the target experience information to change its own behavior. When the experience information includes at least two game experiences between the first virtual object and the non-player character, it can be when the game result of the most recent game experience between the first virtual object and the non-player character is a game victory, it is determined that the non-player character does not have the target experience information to change its own behavior; it can also determine the victory probability of the non-player character based on the game result of each game experience, and when the winning probability is greater than the victory threshold, it is determined that the non-player character does not have the target experience information to change its own behavior, and at this time, the candidate decision is determined as the first target decision, that is, the game with the first virtual object is determined as the first target decision.
[0140] When the experience information includes the game experience between the first virtual object and the non-player character, and the game experience represents a game failure, it is determined that the non-player character has the target experience information to change its own behavior; and continuing the ecological performance or watching the game is determined as the first target decision.
[0141] Here, whether the game experience represents a game failure can refer to the aforementioned judgment method. When the game experience represents a game failure, it means that the non-player character has the target experience information to change its own behavior; continuing the ecological performance is determined as the first target decision. In some embodiments, watching the game can also be determined as the first target decision, and calling a companion to play a game with the first virtual object can also be determined as the first target decision. In the actual application process, when the non-player character has the target experience information to change its own behavior, it is necessary to determine a first target decision that is different from the candidate decision based on the target experience information and attribute information.
[0142] Exemplarily, when a non-player character detects that a first virtual object is playing against a second virtual object, and the second virtual object has a first type of relationship with the non-player character that represents friendship, if the personality of the non-player character represents that the non-player character is timid and cowardly, then the first target decision may be to continue the ecological performance; if the personality of the non-player character represents that it likes to join in the fun, then the first target decision may be to watch the game; or if the personality of the non-player character represents that it is enthusiastic and cheerful, then the first target decision may be to call on companions to play against the first virtual object.
[0143] When the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a second type of relationship, it is determined that the first virtual object triggers at least one preset event that affects the non-player character, and the candidate decision is determined to be playing against the second virtual character, and the second type of relationship represents a hostile relationship; the attribute information and experience information of the non-player character are obtained; when the experience information does not include the game experience of the second virtual object and the non-player character, or the experience information includes the game experience of the non-player character and the second virtual object and the game experience represents a game victory, it is determined that the non-player character does not have the target experience information to change its own behavior; and the game with the second virtual character is determined as the first target decision.
[0144] When the experience information includes the game experience between the non-player character and the second virtual object, and the game experience represents a game failure, it is determined that the non-player character has the target experience information to change its own behavior; and continuing the ecological performance or watching the game is determined as the first target decision.
[0145] That is to say, when the non-player character performs an ecological performance, if the first virtual object and the second virtual object are seen fighting, since the non-player character and the second virtual object are in a hostile relationship, it is determined that the first virtual object has triggered a preset event, and the candidate decision is to play against the second virtual object, that is, to attack the second virtual object together with the first virtual object. The preset event affects the non-player character, so if the non-player character has no experience of playing against the second virtual character, or has played against the second virtual character, and defeated the second virtual character, the candidate decision is directly determined as the first target decision. If the non-player character has played against the second virtual character, and the experience of playing against the second virtual character indicates a failure in the game, it means that the non-player character may fail again in the game against the second virtual object, or even die, then the first target decision will be to continue the ecological performance or watch the game, and the calling of companions to play against the second virtual object can also be determined as the first target decision.
[0146] When the interactive action performed by the first virtual object on the non-player character includes giving a virtual resource to the non-player character, and the candidate decision is to accept the gift, when the experience information does not include the experience of a third virtual object forcibly obtaining the virtual resource, or the experience information includes the experience of a third virtual object forcibly obtaining the virtual resource and the third virtual object fails to obtain the virtual resource, it is determined that the non-player character does not have the target experience information to change its own behavior; and accepting the gift is determined as the first target decision.
[0147] When the experience information includes the experience of the third virtual object forcibly obtaining the virtual resource and the third virtual object successfully obtains the virtual resource, it is determined that the non-player character has the target experience information to change its behavior; and refusing the gift is determined as the first target decision.
[0148] In the embodiment of the present application, when the first virtual object presents a virtual resource to the non-player character, the decision to be executed by the non-player character under normal circumstances is to accept the gift, so the candidate decision can be to accept the gift. At this time, the experience information of the non-player character can be queried. If there is no experience of the third virtual object forcibly obtaining (i.e., snatching) the virtual resource, or there is a third virtual object snatching the virtual resource, but when the snatch fails, it means that the non-player character has the ability to protect and own the virtual resource, then it is determined that the non-player character does not have the target experience information to change its own behavior, so the candidate decision can be determined as the first target decision. When there is a third virtual object snatching the virtual resource in the experience information of the non-player character, and the snatch is successful, it means that the non-player character may cause trouble because of owning the virtual resource, then it is determined that the non-player character has the target experience information to change its own behavior, then refusing to give can be determined as the first target decision. In some embodiments, it can also be determined as the first target decision to refuse to give and express gratitude to the first virtual object.
[0149] In some embodiments, when the first virtual object presents a virtual resource to a non-player character and the candidate decision is to accept the gift, the non-player character's preference information for the virtual resource may also be obtained. When the preference information indicates that the non-player character likes the virtual resource, the candidate decision may be determined as the first target decision. When the preference information indicates that the non-player character does not like the virtual resource, the first target decision may be determined as refusing to accept the gift.
[0150] In the game data processing method provided in the embodiment of the present application, a first target decision can be determined based on the attribute information and experience information of the non-player character. Since the experience information of the non-player character will change dynamically, even in the same scene, the determined first target decision will be different based on the changing experience information, which can improve the degree of differentiation of the non-player character's decision; and after the non-player character executes the first target decision, it will continuously determine a new target decision based on the feedback behavior of the first virtual object and the attribute information of the non-player character itself. Since different first virtual objects have different feedback behaviors, different target decisions will be generated, thereby making the NPC's performance more diversified, improving the sense of surprise of game exploration, and thus improving user retention rate.
[0151] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.
[0152] In the application embodiment, the NPC's personality, job, region, body type and other personal information will be set, which can be set through text or randomly created through the NPC batch generation tool. These personal information will determine the NPC's decision feedback when it is first subjected to player behavior or detects a preset event.
[0153] The NPC's personality information, relationship information, and experience information may be presented on the display interface of the terminal in response to receiving an information viewing operation. Fig. 6A is a schematic diagram of an interface for displaying NPC character information provided in an embodiment of the present application, such as Fig. 6A As shown, the game interface displays the NPC's name, gender, strength, personality, region, job type, wealth and other information. Figure 6B is a schematic diagram of an interface for displaying NPC relationship information provided by an embodiment of the present application, such as Figure 6B As shown, the NPC's younger brother, younger sister and partner are displayed on the game interface. Figure 6C is a schematic diagram of an interface for displaying NPC experience information provided by an embodiment of the present application, such as Figure 6C As shown, the game interface shows today's new experience: a stranger comes to talk to you, and I don't know what he means. Maybe there is something exciting or a chance for power.
[0154] In some embodiments, the NPC's personality information, relationship information, and experience information can also be displayed on the same display interface, which can reduce the operational complexity of information display and improve the toy's information acquisition efficiency.
[0155] In the embodiment of the present application, the NPC will provide timely feedback to the player's attacks, chanting (picture, place, vision), interactions, gifts, requests, and various behaviors against private property based on its own personality information and experience information; it will also make new responses due to the player's further feedback on its feedback. When the player's interactive behavior or certain preset events have an impact on the NPC, the player's interactive behavior or preset event will be added to the experience information. Based on this experience information, the NPC will make new decisions and feedback on the same player behavior in combination with its own personality parameters, and update the decision chain based on the new decision. Because the NPC is constantly accepting the player's interactive behavior or detecting preset events, the NPC's performance also tends to be diversified, forming an emergent nature.
[0156] Fig. 7A is a first interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application, such as Fig. 7A As shown, NPC 701 is responsible for guarding the private treasure box props. When the first virtual character 702 takes the private treasure box props, NPC 701 is a miser with a bad temper, so NPC 701 interrupts the first virtual object and initiates a claim. When the first virtual object refuses the claim, a battle begins, and the result of the battle is that the NPC is defeated by the first virtual object and begs for mercy. Figure 7B is a second interaction diagram between an NPC and a first virtual object provided in an embodiment of the present application, such as Figure 7B As shown, NPC 701 begs for mercy from the first virtual object 702, saying "I don't want to die, all my treasures are yours, please let me go." The first virtual object 702 can accept the NPC 701's begging for mercy and let her go. Figure 7C is a third interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application, such as Figure 7C As shown, when the first virtual object uses the treasure chest of NPC 701 again, NPC 701, having the experience of being defeated by the first virtual object, will no longer interrupt the "stealing" behavior of the first virtual object, but will instead perform a scared performance.
[0157] Fig. 8A is a fourth interaction schematic diagram between an NPC and a first virtual object provided in an embodiment of the present application, such as Fig. 8AAs shown, NPC 801 will call for help from other nearby NPCs because it has entered a battle. The NPC that receives the call for help will make a comprehensive judgment based on the relationship between itself and the calling NPC, as well as the relationship between itself and the first virtual object controlled by the player to decide whether to help the NPC or the player, or to run away or watch the battle. The relationship between NPCs can be family relationships (belonging to the same family), colleagues (belonging to the same job type) or strangers (no relationship). The relationship between an NPC and the first virtual object controlled by the player can be a hostile relationship, a friendly relationship or a stranger relationship. Figure 8B As shown, NPC 802 will join the battle, while NPC 803 will choose to watch the battle.
[0158] As an example, when the first virtual object is fighting with NPC A, if NPC B and NPC A are family members, but B is timid, then when NPC A calls for help from NPC B, the decision generated for NPC B is not to join the battle; if NPC B and NPC A are strangers, but are hostile to the first virtual object, then when NPC A calls for help from NPC B, the decision generated for NPC B is to join the battle and attack the first virtual object.
[0159] It should be noted that the above is only a partial display of the NPC's decision-making based on experience and personality information. In actual gameplay, there will be a lot of emergent situations that can reduce the repetition of players when experiencing NPC content.
[0160] Fig. 9 This is a schematic diagram of a third implementation flow of the game data processing method provided in the embodiment of the present application. Fig. 9 Provide explanation.
[0161] Step 901, NPC performs an ecological performance.
[0162] In some embodiments, when an NPC does not receive interactive actions from other virtual objects or detects a preset event that affects itself, the NPC can perform a preset ecological performance. For example, an NPC who is the owner of a blacksmith shop can perform a blacksmithing performance.
[0163] Step 902: The player performs an interactive action on the NPC.
[0164] Here, the player's interactive behavior on the NPC refers to the first virtual object controlled by the player performing an interactive behavior on the NPC. The interactive behavior can be an attack behavior of the first virtual object on the NPC, or a gift-giving behavior of the first virtual object on the NPC.
[0165] Step 903: The player triggers a preset event that affects the NPC.
[0166] Here, the preset event triggered by the player to affect the NPC may be that the first virtual object controlled by the player fights with other NPCs with whom the NPC has a kinship, or that the first virtual object controlled by the player walks toward the NPC.
[0167] It should be noted that when a player performs an interactive behavior on an NPC or a player triggers a preset event that affects an NPC, a decision will be made. When a player performs multiple interactive behaviors on an NPC or a player triggers multiple preset events that affect an NPC, multiple decisions will be made.
[0168] Step 904, determining whether multiple decisions are generated simultaneously.
[0169] If multiple decisions are made at the same time, proceed to step 905. If multiple decisions are not made at the same time, proceed to step
[0170] Step 905, respond to high priority decisions first.
[0171] In some embodiments, a priority is preset for each decision. The priority can be represented by a positive integer value, wherein the higher the value, the higher the priority. For example, the performance currently performed by the NPC is sitting and drinking tea. At this time, the first virtual object attacks the NPC. The decision at this time may include continuing to drink tea and counterattacking. Assuming that the priority of counterattacking is 80, the priority of continuing to drink tea can be 10, that is, the priority of counterattacking is higher than the priority of continuing to drink tea.
[0172] Step 906, determine whether the low priority decision has the ability to be suspended.
[0173] Among them, if the low priority decision has the ability to suspend, it means that the low priority decision will not be executed temporarily, but will not be abandoned, and will be executed after the high priority decision is executed. Whether a decision has the ability to suspend is preset. When the low priority decision has the ability to suspend, it goes to step 907. When the low priority decision does not have the ability to suspend, it goes to step 908.
[0174] Step 907, the low priority decision is discarded.
[0175] Step 908, wait for the higher priority decision to be executed, and then go to step 911.
[0176] Step 909, determining whether the NPC has the experience to change its behavior.
[0177] Among them, by querying the existing experience information, it can be determined whether the NPC has the experience of changing its own behavior. If so, go to step 910, otherwise go to step 911.
[0178] In step 910, the NPC makes a decision based on its own personality information and experience, and then proceeds to step 912.
[0179] In some embodiments, since the NPC has experience in changing his or her own behavior, this step requires combining the NPC's personality information and experience in changing his or her own behavior to make a decision, thereby ensuring the accuracy of the decision.
[0180] Step 911, the NPC makes a decision based on its own character information.
[0181] Here, if the NPC does not have the experience of changing its own behavior, then the decision can be made based on the character information, which can simplify the complexity of determining the decision and improve the efficiency of decision processing.
[0182] Step 912, determining whether the decision is the final decision in the decision chain.
[0183] If the decision is the last decision in the decision chain, execute step 913; otherwise, execute step 916.
[0184] Step 913, the NPC generates a complete experience / or removes all experiences.
[0185] In some embodiments, when the NPC executes the last decision in the decision chain, if the NPC is alive, a complete experience will be generated based on the decision executed by the NPC; if the NPC is dead, all experiences will be deleted.
[0186] Step 914, record the new experience.
[0187] In some embodiments, an NPC records new experiences after executing a decision in a decision chain or creating a new NPC after death.
[0188] Step 915, NPC returns to the ecological performance.
[0189] Step 916: The player takes further action on the NPC decision.
[0190] Step 917, the NPC makes a new decision on the player's new behavior based on its own personality and enters step 912.
[0191] Fig.10 is a schematic diagram of the structure of the game data processing system provided in the embodiment of the present application, such as Fig.10As shown, the game data processing system includes an event detection module 1001, a decision behavior generation module 1002, a decision system 1003, a decision behavior execution module 1004 and an NPC experience system 1005, wherein:
[0192] The event detection module 1001 is used to detect whether an event that affects the NPC is triggered. When an event that affects the NPC is triggered, the decision-making behavior generation module 1002 will generate a decision-making behavior based on the NPC's personality, identity, experience and other data, and submit the decision-making behavior to the decision-making system 1003. The decision-making system 1003 will screen out the target decision-making behavior and submit the target decision-making behavior to the decision-making behavior execution module 1004. The decision-making behavior execution module 1004 controls the NPC to execute the target decision-making behavior. During the execution of the decision-making behavior, the first virtual object controlled by the player will give feedback on the target decision-making behavior executed by the NPC, and the feedback information will flow to the decision-making behavior generation module 1002 again. In addition, the preset event detected by the event detection module 1001, the target decision-making behavior determined by the decision-making behavior execution module 1004, and the player's feedback information will all be transmitted to the NPC experience system 1005, so as to update the NPC experience.
[0193] The experience data of the NPC experience system will be persistently stored on the server, and support the configuration of memory duration. The experience system data is mainly composed of multiple memory chains, each of which contains elements such as the cause of the event, process 1, ..., process n, and the result. The experience text will be polished by the large language model and displayed to the player.
[0194] Fig.11 is a schematic diagram of the data structure of the memory chain provided in the embodiment of the present application, such as Fig.11 As shown, the memory chain includes memory chain information 1101 and experience text 1102 , and the memory information further includes occurrence time 11011 and text identifier 11012 .
[0195] Fig.12 Schematic diagram of the experience text generation process provided by the embodiment of the present application. Fig.12 As shown, the process includes:
[0196] Step 1201, triggering a memory chain end event.
[0197] Step 1202, assemble the text.
[0198] Here, the NPC's character information and memory chain splicing text can be assembled to obtain prompt words for text polishing.
[0199] Step 1203: Request text polishing service of the large language model.
[0200] Step 1204: Determine the polished text as the experienced text.
[0201] Fig.13 This is a schematic diagram of using a large language model for text polishing, such as Fig.13 As shown, the NPC's character information is: Name: Caravan A, Gender Female, Age 16, Personality: Debater - Pursuing innovation and change, not bound by tradition, and likes to explore new possibilities. Everything you say will fully reflect your personality. The identity is a wanderer. The memory chain splicing text includes: Text 1. A stranger hit me without explanation, and I angrily decided to fight back! When I was about to be defeated by her, I decided to appeal to her emotions and reason, but she was hard-hearted and refused to listen! Text 2. You live in an imaginary world view, similar to the game world of medieval Europe. You don't know any knowledge of the contemporary real world. Assemble the character information and the memory chain splicing text to get the following Fig.13 As shown in 1301, the prompt word for text polishing is used to perform text polishing based on the prompt word through the large language model, and the following is obtained: Fig.13 The polished text shown in 1302: Strangers attacked me for no reason, and when I was about to fight back and was about to be defeated, persuasion was useless. It was so infuriating!
[0202] In the embodiment of the present application, single events and multiple event combinations are supported, and when a preset event is detected, a decision behavior will be triggered. Table 1 is an active behavior detection configuration table. As shown in Table 1, in the embodiment of the present application, multiple events such as the presence of players in the field of view, AI status detection, and regional threat star rating are supported.
[0203] Table 1. Active behavior monitoring configuration table
[0204]
[0205] Table 2 is an active behavior table, where the ID in Table 2 is the ID in the referenced active behavior detection configuration table. As shown in Table 2, the same behavior supports simultaneous execution of logic such as the upper limit of the number and the cooling time configuration.
[0206] Table 2. Active behavior table
[0207]
[0208] Table 3 is an active behavior decision customization table. The ID in Table 3 refers to the ID in the active behavior table. As shown in Table 3, different NPCs support different decision behaviors for the same event.
[0209] Table 3. Active behavior decision customization table
[0210]
[0211] In the embodiment of the present application, the decision-making behavior generation module determines the decision-making behavior based on the NPC's personality, work, experience, etc. Table 4 is a weight configuration table of decision-making behaviors. As shown in Table 4, for the same event, multiple decision-making behaviors with different weights can be configured, and they are randomly selected according to the weights. Therefore, for the same event and the same NPC, different decision-making behaviors may also be generated.
[0212] Table 4 is the weight configuration table of decision-making behavior
[0213]
[0214]
[0215] In some embodiments, it is also supported to make decisions with the help of a large language model. Table 5 is a chat feedback configuration table. When the player chats with the NPC through the first virtual object, the large language model will analyze the chat content and return a decision result based on Table 5, such as happy performance, fight or escape, etc.
[0216] Table 5. Chat feedback configuration table
[0217]
[0218] Fig.14 is a schematic diagram of determining a behavior identifier to be fed back through a large language model provided in an embodiment of the present application. Fig.14 14 shows a prompt word 1401 for determining a behavior identifier, and the large language model outputs a behavior identifier based on the prompt word: behavior: 5.
[0219] The decision system is responsible for managing decision behaviors and regularly screening out target decision behaviors for execution. Target decision behaviors can be the highest priority behaviors, while low priority behaviors may be suspended or abandoned. The priority of decision behaviors is statically configured based on the business call chain. Table 6 is a decision priority configuration table. As shown in Table 6, the priority of "Vision. Performance" is 1000, and the priority of "Fault. Performance" is 2000.
[0220] Table 6. Decision priority configuration table
[0221] Call chain describe Priority ChantView.Perform Vision.Performance 1000 AccidentHurt.Perform Accidental injury. Performance 2000 Combat fighting 3000 Escape Escape 3000
[0222] In the embodiment of the present application, a behavior set is constructed to facilitate planning and configuration, such as fighting, escaping, claiming, performing, etc. At the same time, the behavior supports personalized configuration of parameters. Table 7 is a table of behavior parameters corresponding to the same experience type under different decision-making personality parameters. As shown in Table 7, the same performance behavior may have different corresponding behavior parameters (behavior ID).
[0223] Table 7. Behavioral parameters corresponding to the same experience type under different decision-making personality parameters
[0224]
[0225]
[0226] The player's feedback on the NPC's execution of the target decision-making behavior can be behavior, such as the NPC decided to fight the player, but the player ran away; or it can be a choice in the plot, such as the NPC asking the player for compensation, and the player chose to refuse to pay.
[0227] In the game scene, NPC itself is one of the important contents for players to experience the big world game. Most current games may define non-plot NPC as atmosphere or vase, and cannot give them actual game value. However, these NPCs actually have a great impact on players' perception of the playability and freedom of the entire game, whether it is the game experience, the map running experience, or the inadvertent interaction.
[0228] When most players are playing single-level games, they see themselves as the master and savior of the game. This is not only triggered by the plot, but also by the desire for more similar experiences during the game experience. NPCs are an important manifestation of the player being the core or master of this virtual world. NPCs will give feedback on most of the player's actions, and the influence of the player on them will accompany them throughout their lives as NPCs. Players will also feel refreshed when they can make disobedient NPCs obedient or fearful of them, or even make them disappear.
[0229] At the same time, since the NPC's decision is influenced by the player and can even be shaped, the player's sense of repetition will be reduced in the process of experiencing the game. In fact, most 3A games rely on the fine customization of each NPC, which consumes a lot of manpower and material resources. Although the quality is very high, whether it can bring equivalent benefits in the fast-paced current game market is risky. The NPC decision system provided in the embodiment of the present application is used to control the NPC's decision, and some additional factors are used to make the NPC produce some emergent decisions or performances. Finally, the NPC is graded on this basis, and the customization of NPCs of different grades is strengthened according to the gradient. The refined content can not only reduce the cost of game development, but also improve the player's sense of freshness and desire for exploration.
[0230] The following is a description of an exemplary structure of the game data processing device 233 provided in the present application as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the game data processing device 233 of the memory 230 may include:
[0231] A decision generation module 2331 is used to generate at least one candidate decision in response to reaching a decision generation timing for a non-player character during a game match; a decision determination module 2332 is used to determine a first target decision from at least one of the candidate decisions based on at least one of the attribute information and experience information of the non-player character, and control the non-player character to execute the first target decision; a decision execution module 2333 is used to iteratively execute the following steps until the non-player character executes the last decision in the decision chain when the decision chain corresponding to the non-player character includes other decisions located after the first target decision: obtaining behavior information of a first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and the attribute information, and controlling the non-player character to execute the second target decision.
[0232] In some embodiments, the decision determination module 2332 is also used to: when the number of the candidate decisions is two or more, determine the selection probability of each of the candidate decisions based on the attribute information and the experience information; and based on the selection probability of each of the candidate decisions, randomly determine the first target decision from at least two candidate decisions.
[0233] In some embodiments, the attribute information includes at least one of personality information and identity information, and the decision determination module 2332 is further used to: determine the selection weight of the non-player character for each of the candidate decisions based on the personality information, at least one of the identity information and the experience information; determine the total weight based on the selection weight of the non-player character for each of the candidate decisions; determine the selection probability of each of the candidate decisions based on the selection weight of the non-player character for each of the candidate decisions and the total weight.
[0234] In some embodiments, the decision determination module 2332 is further used to: when the number of the candidate decisions is two or more, determine the priority of each of the candidate decisions based on the attribute information and the experience information; and determine the candidate decision with the highest priority as the first target decision.
[0235] In some embodiments, the device also includes: a first determination module, used to determine a first decision and a second decision from other candidate decisions except the first target decision, the first decision has the suspension capability, and the second decision does not have the suspension capability; a decision suspension module, used to suspend the first decision and discard the second decision.
[0236] In some embodiments, the device further includes: a suspension cancellation module, configured to cancel the suspension of the first decision and control the non-player character to execute the first decision.
[0237] In some embodiments, the device also includes: a second determination module, which is used to determine the candidate decision as the first target decision when the number of the candidate decisions is one and the non-player character does not have the target experience information to change its own behavior; the decision determination module is also used to determine the first target decision based on the target experience information and the attribute information when the number of the candidate decisions is one and the non-player character has the target experience information to change its own behavior, and the first target decision is different from the candidate decision; a link update module is used to update the decision link based on the first target decision.
[0238] In some embodiments, the device also includes: a third determination module, used to determine the survival status of the non-player character when the decision chain corresponding to the non-player character does not include other decisions located after the first target decision; a first update module, used to obtain a first execution result after the non-player character executes the first target decision when the survival status is survival, and update the experience information based on the first target decision, the first execution result and the attribute information; an experience deletion module, used to delete the experience information when the survival status is death.
[0239] In some embodiments, the device also includes: a first acquisition module, used to acquire each decision executed by the non-player character, from the first target decision to the last decision, and a second execution result after executing each of the decisions; a second update module, used to update the experience information based on each of the decisions, each of the second execution results and the attribute information.
[0240] In some embodiments, the second update module is also used to determine the event cause text, the event process text and the event result text based on each of the decisions and each of the second execution results; concatenate the attribute information, the event cause text, the event process text and the event result text to obtain the initial experience text; rewrite the initial experience text to obtain the experience text to be added; and add the experience text to be added to the experience information.
[0241] In some embodiments, the device also includes: a fourth determination module, which is used to determine that the timing for making a decision for the non-player character has been reached when at least one of the following situations is detected during the game: the first virtual object performs an interactive action on the non-player character, and the first virtual object triggers at least one preset event that affects the non-player character.
[0242] In some embodiments, when the interactive action performed by the first virtual object on the non-player character includes forcibly obtaining the virtual resources of the non-player character, and the candidate decision is to demand compensation from the first virtual object, the decision determination module 2332 is also used to: obtain attribute information and experience information of the non-player character; when the experience information does not include the game experience between the first virtual object and the non-player character, or the experience information includes the game experience between the first virtual object and the non-player character and the game experience represents a victory in the game, determine that the non-player character does not have the target experience information to change its own behavior; and determine demanding compensation from the first virtual object as the first target decision.
[0243] In some embodiments, the device also includes: a fifth determination module, which is used to determine the result of the game when the behavior information of the first virtual object for the first target decision is to play a game with the non-player character object, and the game result is a game victory or a game failure; a sixth determination module, which is used to determine the third execution result of the first target decision based on the behavior information and the game result; and a third update module, which is used to update the experience information based on the first target decision, the third execution result and the attribute information.
[0244] In some embodiments, the decision determination module 2332 is also used for: when the experience information includes the game experience between the first virtual object and the non-player character, and the game experience represents a game failure, determining that the non-player character has the target experience information to change its own behavior; and determining the provision of the virtual resources to the first virtual object as the first target decision.
[0245] In some embodiments, the decision determination module 2332 is also used for: when the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a first type of relationship, determining that the first virtual object triggers at least one preset event that affects the non-player character, and determining the candidate decision to play against the first virtual character, and the first type of relationship represents a friendly relationship; obtaining the attribute information and experience information of the non-player character; when the experience information does not include the game experience between the first virtual object and the non-player character, or the experience information includes the game experience between the first virtual object and the non-player character and the game experience represents a victory, determining that the non-player character does not have the target experience information to change its own behavior; and determining the game with the first virtual character as the first target decision.
[0246] In some embodiments, the decision determination module 2332 is also used for: when the experience information includes the game experience between the first virtual object and the non-player character, and the game experience represents a game failure, determining that the non-player character has the target experience information to change its own behavior; and continuing the ecological performance is determined as the first target decision.
[0247] In some embodiments, the decision determination module 2332 is also used for: when the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a second type of relationship, determining that the first virtual object triggers at least one preset event that affects the non-player character, and determining the candidate decision to play against the second virtual character, and the second type of relationship represents a hostile relationship; obtaining the attribute information and experience information of the non-player character; when the experience information does not include the game experience of the second virtual object and the non-player character, or the experience information includes the game experience of the non-player character and the second virtual object and the game experience represents a victory, determining that the non-player character does not have the target experience information to change its own behavior; and determining the game with the second virtual character as the first target decision.
[0248] In some embodiments, the decision determination module 2332 is also used for: when the experience information includes the game experience between the non-player character and the second virtual object, and the game experience represents a game failure, determining that the non-player character has the target experience information to change its own behavior; and continuing the ecological performance is determined as the first target decision.
[0249] In some embodiments, the decision determination module 2332 is also used for: when the interactive action performed by the first virtual object on the non-player character includes giving a virtual resource to the non-player character, and the candidate decision is to accept the gift, when the experience information does not include the experience of a third virtual object forcibly obtaining the virtual resource, or the experience information includes the experience of a third virtual object forcibly obtaining the virtual resource and the third virtual object fails to obtain the virtual resource, determining that the non-player character does not have the target experience information to change its own behavior; and determining acceptance of the gift as the first target decision.
[0250] In some embodiments, the decision determination module 2332 is also used for: when the experience information includes the experience of a third virtual object forcibly obtaining the virtual resource and the third virtual object successfully obtains the virtual resource, determining that the non-player character has the target experience information to change its own behavior; and determining the refusal of the gift as the first target decision.
[0251] In some embodiments, the device further includes: a first presentation module, for presenting an information display interface in response to an information viewing operation for the non-player character; a second presentation module, for presenting the attribute information and experience information of the non-player character on the information display interface; the attribute information includes at least one of the following: personality information, identity information, relationship information, and the relationship information includes a role identifier and a relationship identifier that have an associated relationship with the non-player character.
[0252] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the game data processing method described in the embodiment of the present application.
[0253] The present application embodiment provides a computer-readable storage medium, in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will execute the game data processing method provided by the present application embodiment, for example, Figure 4A The game data processing method is shown.
[0254] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0255] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0256] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0257] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0258] In summary, through the embodiments of the present application, when the NPC or a virtual object or other NPC related to the NPC is subjected to interactive behavior or detects a preset event, the NPC can make a decision based on basic attribute information and combined with its own experience information, and when the NPC makes a decision, the virtual object's decision feedback to the NPC will make the NPC make a new decision feedback, thereby forming a decision chain. At the same time, in this process, the NPC's decision or the behavior and events it receives will be connected in series into a complete experience chain, and the experience chain will affect the subsequent NPC decision, so that the same NPC will produce different decision feedback at different times and stages for the same event, forming an emergent performance.
[0259] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for processing game data, characterized in that: The method comprises: During the game play, in response to reaching a decision generation timing for a non-player character, generating at least one candidate decision; Determining a first target decision from at least one of the candidate decisions based on the attribute information and experience information of the non-player character, and controlling the non-player character to execute the first target decision; When the decision chain corresponding to the non-player character includes other decisions after the first target decision, the following steps are iteratively performed until the non-player character executes the last decision in the decision chain: Obtaining behavior information of a first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and the attribute information, and controlling the non-player character to execute the second target decision.
2. The method according to claim 1, characterized in that: The step of determining a first target decision from at least one of the candidate decisions based on the attribute information and experience information of the non-player character comprises: When the number of the candidate decisions is two or more, determining a selection probability of each of the candidate decisions based on the attribute information and the experience information; The first target decision is randomly determined from at least two candidate decisions based on the selection probability of each of the candidate decisions.
3. The method according to claim 2, characterized in that The attribute information includes at least one of personality information and identity information, and determining the selection probability of each candidate decision based on the attribute information includes: Determining a selection weight of the non-player character for each of the candidate decisions based on at least one of the personality information and the identity information and the experience information; Determining a total weight based on the selection weight of each of the candidate decisions by the non-player character; The selection probability of each candidate decision is determined based on the selection weight of the non-player character for each candidate decision and the total weight.
4. The method according to claim 1, characterized in that: The step of determining a first target decision from at least one of the candidate decisions based on the attribute information and experience information of the non-player character comprises: When the number of the candidate decisions is two or more, determining the priority of each of the candidate decisions based on the attribute information and the experience information; The candidate decision with the highest priority is determined as the first target decision.
5. The method according to claim 4, characterized in that The method further comprises: Determine a first decision and a second decision from other candidate decisions except the first target decision, wherein the first decision has a suspend capability and the second decision does not have a suspend capability; The first decision is suspended, and the second decision is discarded.
6. The method according to claim 5, characterized in that After controlling the non-player character to execute the first target decision, the method further includes: The first decision is cancelled and the non-player character is controlled to execute the first decision.
7. The method according to claim 1, characterized in that The method further comprises: When the number of the candidate decisions is one and the non-player character does not have target experience information for changing its own behavior, determining the candidate decision as the first target decision; When the number of the candidate decisions is one and the non-player character has target experience information for changing its behavior, determining a first target decision based on the target experience information and the attribute information, the first target decision being different from the candidate decisions; The decision link is updated based on the first target decision.
8. The method according to claim 7, characterized in that The method further comprises: When the decision chain corresponding to the non-player character does not include other decisions located after the first target decision, determining the survival status of the non-player character; When the survival state is survival, obtaining a first execution result after the non-player character executes the first target decision, and updating the experience information based on the first target decision, the first execution result and the attribute information; When the survival state is death, the experience information is deleted.
9. The method according to any one of claims 1 to 8, characterized in that: After the non-player character executes the last decision in the decision chain, the method further includes: Acquire each decision executed by the non-player character, from the first target decision to the last decision, and a second execution result after executing each of the decisions; The experience information is updated based on the respective decisions, the respective second execution results, and the attribute information.
10. The method according to claim 9, characterized in that The updating of the experience information based on each of the decisions, each of the second execution results and the attribute information includes: Based on each of the decisions and each of the second execution results, determine an event cause text, an event process text, and an event result text; The attribute information, the event cause text, the event process text and the event result text are spliced to obtain an initial experience text; Rewriting the initial experience text to obtain the experience text to be added; The experience text to be added is added to the experience information.
11. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: During the game, when at least one of the following situations is detected, it is determined that the decision generation timing for the non-player character has been reached: The first virtual object performs an interactive action on the non-player character, and the first virtual object triggers at least one preset event that affects the non-player character.
12. The method according to claim 11, characterized in that When the interactive action performed by the first virtual object on the non-player character includes forcibly acquiring the virtual resources of the non-player character, and the candidate decision is to demand compensation from the first virtual object, Obtaining attribute information and experience information of the non-player character; When the experience information does not include the game experience between the first virtual object and the non-player character, or the experience information includes the game experience between the first virtual object and the non-player character and the game experience represents a game victory, determining that the non-player character does not have the target experience information for changing its own behavior; Demanding compensation from the first virtual object is determined as a first target decision.
13. The method according to claim 12, characterized in that After the non-player character executes the first target decision, When the behavior information of the first virtual object in response to the first target decision is to play a game with the non-player character object, determining a game result, wherein the game result is a game win or a game lose; Determining a third execution result of the first target decision based on the behavior information and the game result; The experience information is updated based on the first target decision, the third execution result, and the attribute information.
14. The method according to claim 12, characterized in that When the experience information includes a game experience between the first virtual object and the non-player character, and the game experience indicates a game failure, determining that the non-player character has target experience information for changing its behavior; Providing the virtual resource to the first virtual object is determined as a first target decision.
15. The method according to claim 11, characterized in that When the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a first type of relationship, determining that the first virtual object triggers at least one preset event that affects the non-player character, and determining that the candidate decision is to play against the first virtual character, and the first type of relationship represents a friendly relationship; Obtaining attribute information and experience information of the non-player character; When the experience information does not include the game experience between the first virtual object and the non-player character, or the experience information includes the game experience between the first virtual object and the non-player character and the game experience represents a game victory, determining that the non-player character does not have the target experience information for changing its own behavior; Playing a game with the first virtual character is determined as a first target decision.
16. The method according to claim 15, characterized in that When the experience information includes a game experience between the first virtual object and the non-player character, and the game experience indicates a game failure, determining that the non-player character has target experience information for changing its behavior; The first goal decision will be to continue the ecological performance or watch the game.
17. The method according to claim 11, characterized in that When the non-player character is performing an ecological performance, it is detected that the first virtual object is playing against the second virtual object, and the association relationship between the non-player character and the second virtual object is a second type of relationship, determining that the first virtual object triggers at least one preset event that affects the non-player character, and determining that the candidate decision is to play against the second virtual character, and the second type of relationship represents a hostile relationship; Obtaining attribute information and experience information of the non-player character; When the experience information does not include the game experience between the second virtual object and the non-player character, or the experience information includes the game experience between the non-player character and the second virtual object and the game experience represents a game victory, determining that the non-player character does not have the target experience information for changing its own behavior; Playing a game with the second virtual character is determined as a first target decision.
18. The method according to claim 17, characterized in that When the experience information includes a game experience between the non-player character and the second virtual object, and the game experience represents a game failure, determining that the non-player character has target experience information for changing its behavior; The first goal decision will be to continue the ecological performance or watch the game.
19. The method according to claim 11, characterized in that When the interactive action performed by the first virtual object on the non-player character includes giving a virtual resource to the non-player character, and the candidate decision is to accept the gift, When the experience information does not include the experience of the third virtual object forcibly acquiring the virtual resource, or the experience information includes the experience of the third virtual object forcibly acquiring the virtual resource and the third virtual object fails to acquire the virtual resource, determining that the non-player character does not have the target experience information for changing its own behavior; Make accepting the gift the first target decision.
20. The method according to claim 19, characterized in that When the experience information includes the experience of the third virtual object forcibly acquiring the virtual resource and the third virtual object successfully acquires the virtual resource, determining that the non-player character has the target experience information for changing its own behavior; Make refusing the gift your first target decision.
21. The method according to any one of claims 1 to 8, characterized in that The method further comprises: In response to an information viewing operation for the non-player character, presenting an information display interface; Presenting the attribute information and experience information of the non-player character on the information display interface; The attribute information includes at least one of the following: character information, identity information, and relationship information, and the relationship information includes a role identifier associated with the non-player character and a relationship identifier.
22. A game data processing device, characterized in that: The device comprises: A decision generation module, for generating at least one candidate decision in response to reaching a decision generation timing for a non-player character during a game match; a decision determination module, configured to determine a first target decision from at least one of the candidate decisions based on at least one of the attribute information and the experience information of the non-player character, and control the non-player character to execute the first target decision; A decision execution module is used for iteratively executing the following steps when the decision chain corresponding to the non-player character includes other decisions after the first target decision, until the non-player character executes the last decision in the decision chain: Obtaining behavior information of a first virtual object interacting with the non-player character; determining a second target decision based on the behavior information and the attribute information, and controlling the non-player character to execute the second target decision.
23. A computer device, characterized in that: The computer device comprises: A memory for storing computer executable instructions; A processor, configured to implement the method according to any one of claims 1 to 21 when executing computer executable instructions stored in the memory.
24. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the method according to any one of claims 1 to 21 is implemented.
25. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the method according to any one of claims 1 to 21 is implemented.
Citation Information
Cited By
Data processing method and device
CN121155125A