A control method and system based on NPC self-loop performance, electronic equipment and computer program product
By dynamically updating NPC behavior and animations, the problem of monotonous NPC character performance is solved, the game experience is improved, and production and storage costs are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, the fixed daily behaviors of NPC characters lead to monotonous performance, which reduces the gaming experience and results in high production and storage costs.
By acquiring standard behavioral parameters matching the target character and combining them with the collected parameters of the current environment to form initial image data, the behavior and animation of the NPC are dynamically updated during the control period. The collected data is used to form associated commands to enrich the NPC's performance.
It enables NPCs to display diverse visuals in different environments, decouples planning and system configuration, and enhances the richness of NPC character performance and user experience.
Smart Images

Figure CN114653064B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network games, in particular to a control method and system based on NPC self-loop performance, an electronic device and a computer program product. BACKGROUND
[0002] With the game becoming larger and more intensive, the performance requirements of NPC characters will certainly become higher and higher. The performance of NPC characters determines the world experience of players in the game. Due to the huge number and rich types of NPC characters, if the richness is to be reflected, a large amount of animation data (such as the implementation of current 3A games) is required, which requires a large amount of production cost and storage space. The behavior of a general NPC character is controlled by a "daily behavior table", which records a certain time point, where to go, and what to do, and is fixed. Unless some specific event is triggered, such as a player finding an NPC character, triggering the logic of accepting a task, but the basic daily behavior of the NPC character will not change, for example, an NPC character attended a party all night the previous night, and the starting address for going to work in the morning should be the place where he stayed overnight. However, because the daily behavior of the NPC character is fixed, the NPC character will be refreshed to the preset starting position every day, that is, the NPC character will still go to work from the preset position (such as home) in the morning. Such a game environment setting greatly reduces the richness of the performance of NPC characters and the experience of players in the game. SUMMARY
[0003] In view of the deficiencies of the prior art, the present application provides a control method and system based on NPC self-loop performance, an electronic device and a computer program product.
[0004] To achieve the above purpose, the present application realizes the following technical scheme:
[0005] On the one hand, the present application provides a control method based on NPC self-loop performance, which comprises,
[0006] Upon obtaining the standard behavior parameters matched with the current target character, reading the first control instruction associated with the current target character in the current environment from the standard behavior parameters, and forming an initial image data according to the first control instruction and the first collection parameters;
[0007] Obtaining the second collection parameters within a valid range of a control duration, obtaining the associated instruction matched with the second collection parameters according to the second collection parameters, and executing the associated behavior matched with the associated instruction or playing the associated animation matched with the associated instruction;
[0008] According to the associated behavior, the standard behavior parameter table is updated in the state that the associated behavior is not completed or the associated animation is not completed.
[0009] Preferably, the NPC self-loop performance-based control method, wherein in the state that the standard behavior parameter matching the current target role is obtained, an initial image data is formed according to the first control instruction and the first collection parameter, specifically including:
[0010] According to the current target role, a target action matching the current time and a next scheduled time are read, and a duration matching the random action is formed according to the current time and the next scheduled time.
[0011] The first control instruction is formed according to the target action, and the control duration is formed according to the duration.
[0012] The initial image data is formed according to the first control instruction.
[0013] Preferably, the NPC self-loop performance-based control method, wherein the second collection parameter is obtained in the control duration effective range, the associated instruction matching the second collection parameter is obtained according to the second collection parameter, and the associated behavior matching the associated instruction or the associated animation matching the associated instruction is played; specifically including,
[0014] In the control duration effective range, the collection data is obtained in the environment where the current target role is located, and the second collection data is formed according to the collection data in the state that the collection data does not match the preset data.
[0015] The second collection data type of the second collection data is read, and the associated instruction matching the second collection data type is formed according to the second collection data type.
[0016] The associated behavior matching the associated instruction or the associated animation matching the associated instruction is played.
[0017] Preferably, the NPC self-loop performance-based control method, wherein the second collection data type of the second collection data is read, and the associated instruction matching the second collection data type is formed according to the second collection data type, specifically including:
[0018] The second collection data type of the second collection data is read.
[0019] In the case that the second type of collected data matches the first type of collected data, a first association sub-instruction is formed according to the first type of collected data;
[0020] In the case that the second type of collected data matches the second type of collected data, a second association sub-instruction is formed according to the second type of collected data;
[0021] In the case that the second type of collected data matches the third type of collected data, a third association sub-instruction is formed according to the third type of collected data.
[0022] In another aspect, the present application further provides a control system based on NPC self-loop performance, wherein:
[0023] An initial image data forming unit, in the case that a standard behavior parameter matching a current target role is obtained, reads a first control instruction associated with the current target role in a current environment according to the standard behavior parameter, and forms an initial image data according to the first control instruction and a first collected parameter;
[0024] A monitoring unit, in the case that a second type of collected parameter is obtained within a valid range of a control duration, obtains an association instruction matching the second collected parameter according to the second collected parameter, and performs an association behavior matching the association instruction or plays an association animation matching the association instruction;
[0025] An updating unit, in the case that the monitoring duration ends and the association behavior is not completed or the association animation is not played, updates the standard behavior parameter table according to the association behavior.
[0026] Preferably, the control system based on NPC self-loop performance, wherein the initial image data forming unit specifically comprises:
[0027] According to the current target role, a target action matching a current time and a next scheduled time are read, and a duration matching the random action is formed according to the current time and the next scheduled time;
[0028] The first control instruction is formed according to the target action, and the control duration is formed according to the duration;
[0029] An initial image data is formed according to the first control instruction.
[0030] Preferably, the control system based on NPC self-loop performance, wherein the monitoring unit specifically comprises:
[0031] The second type of data collection forming device acquires data in the environment where the target character is located within the effective range of the control duration, and forms the second type of data collection according to the acquired data when the acquired data does not match the preset data.
[0032] The association instruction forming device reads the second type of data collection data type of the second type of data collection, and forms an association instruction matching the second type of data collection data type according to the second type of data collection data type.
[0033] The display device performs an association behavior matching the association instruction or plays an association animation matching the association instruction.
[0034] Preferably, the above-mentioned control system based on the self-loop performance of the NPC, wherein the association instruction forming device specifically comprises:
[0035] The second type of data collection data type of the second type of data collection is read;
[0036] When the second type of data collection data type matches the first type of data collection, a first association sub-instruction is formed according to the first type of data collection;
[0037] When the second type of data collection data type matches the second type of data collection, a second association sub-instruction is formed according to the second type of data collection;
[0038] When the second type of data collection data type matches the third type of data collection, a third association sub-instruction is formed according to the third type of data collection.
[0039] In another aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement any of the above-mentioned control methods based on the self-loop performance of the NPC.
[0040] Finally, the present application further provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, wherein the processor executes the computer program to implement any of the above-mentioned control methods based on the self-loop performance of the NPC.
[0041] The present application has the following advantages:
[0042] In the state of obtaining the standard behavior parameter matched with the current target role, a first control instruction associated with the current target role in the current environment is read, an initial image data is formed according to the first control instruction and the first acquisition parameter; the second type of acquisition parameter is obtained in the effective range of the control duration period, the associated instruction matched with the second acquisition parameter is obtained according to the second acquisition parameter, and the associated behavior matched with the associated instruction or the associated animation matched with the associated instruction is played; in the state of the end of the monitoring duration period and the state of the associated behavior not being completed or the associated animation not being played, the standard behavior parameter table is updated according to the associated behavior. Through the above method, the NPC role can show different pictures in different environments or scenes. According to the scheme, the address and the work content are configured separately, the work of decoupling the planning and the system configuration is completed automatically, and the behavior of the user is more consistent with the work. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 A control method flow chart based on NPC self-circulation performance provided for an embodiment of the application;
[0044] Figure 2 A control method flow chart based on NPC self-circulation performance provided for an embodiment of the application;
[0045] Figure 3 A control method flow chart based on NPC self-circulation performance provided for an embodiment of the application;
[0046] Figure 4 An electronic device structure schematic diagram provided for an embodiment of the application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the application.
[0048] Embodiment one
[0049] The method disclosed in the embodiment aims to control the NPC roles in the game environment, each NPC role is configured with a daily behavior basic parameter list recording the daily behavior of each NPC role, for example, the daily behavior basic parameter list of the NPC role No. 1 is to get up at 7 o'clock, leave home to the restaurant at 8 o'clock, get off work at 5 o'clock in the afternoon, get home at 6 o'clock in the afternoon, and the work task in the restaurant area is to calculate accounts. The daily behavior basic parameter list of the NPC role No. 2 is to get up at 6 o'clock, leave the rented house to the bookstore at 7:30, return to the rented house at 6 o'clock in the afternoon, and the task done in the bookstore area is to read books.
[0050] As shown in Figure 1 A control method based on NPC self-loop performance is applied to a server, comprising:
[0051] In step S110, when the standard behavior parameter matched with the current target role is obtained, the first control instruction associated with the current target role in the current environment is read according to the standard behavior parameter, and an initial image data is formed according to the first control instruction and the first collection parameter;
[0052] Specifically, as shown in Figure 2 In step S1101, the target action matched with the current time and the next scheduled time are read according to the current target role, and a duration matched with the random action is formed according to the current time and the next scheduled time.
[0053] Wherein, the current target role can be understood as an NPC role, and the next scheduled time can be the start time of the action or behavior, for example, the NPC role has a behavior or action of buying coffee at 3 o'clock in the afternoon, so the next scheduled time is 3 o'clock in the afternoon, and when the game time reaches 3 o'clock in the afternoon, the current time is the current time in the game environment, for example, the game time is 1 o'clock in the afternoon at this time, and the current time is 1 o'clock.
[0054] The duration of the random action and the target action matched with the scheduled time in the current environment are read, and the target action is the target action matched with the behavior of the next scheduled time. For example, the action corresponding to the next scheduled time of 7 o'clock for the NPC is to get up, so the "get up" action is the target action. The duration is obtained through the basic parameter list, for example, the daily behavior basic parameter list of the NPC role No. 1 is to get up at 7 o'clock and leave home to the restaurant at 8 o'clock, the current scheduled time is 7 o'clock, and the next scheduled time is 8 o'clock, and the duration is formed according to the current time and the next scheduled time, that is, one hour, and the action of the NPC role within one hour is defined as a random action.
[0055] Step S1102, forming the first control instruction according to the target action, and forming the control duration period according to the duration; for example, the current target action is "getting up", a first control instruction matched with "getting up" is formed according to "getting up", which can be an action execution instruction or a playing instruction.
[0056] Step S1103, forming an initial image data according to the first control instruction. When the first control instruction is an action instruction, the current NPC character is controlled to execute the "getting up" action, and the initial image data is formed according to the picture of the current NPC character executing the "getting up" action; when the first control instruction is a playing instruction, the image data matched with "getting up" is obtained, and the initial image data is formed according to the image data, which is directly displayed by playing.
[0057] Step S120, obtaining the second type of collection parameters within the effective range of the control duration period, obtaining the associated instruction matched with the second collection parameters according to the second collection parameters, and executing the associated behavior matched with the associated instruction or playing the associated animation matched with the associated instruction. Specifically,
[0058] As shown in Figure 3 Step S1201, obtaining the collection data within the environment of the current target character within the effective range of the control duration period, and forming the second type of collection data according to the collection data when the collection data does not match the preset data; for example, the control duration period is one hour, and the preset data is road, tree and grassland. When the collection data within the environment of the current target character does not match the preset data, the second type of collection data is formed according to the collection data; for example, a small animal appears in the current collection data, and the small action does not belong to the preset data, and then the second type of collection data is formed according to the "small animal".
[0059] Step S1202, reading the second type of collection data of the second type of collection data, and forming the associated instruction matched with the second type of collection data according to the second type of collection data; reading the type of the second type of collection data, and forming the associated instruction matched with the second type of collection data according to the type. For example, the type of the current second type of collection data is a small animal, and the action instruction of the NPC character to the small animal is obtained according to the small animal, which can be feeding or other.
[0060] Step S1203, performing the association behavior matched with the association instruction or playing the association animation matched with the association instruction. When the action image matched with the association instruction has been stored, the action image matched with the association instruction is called according to the association instruction, and the action image is played. When the action image matched with the association instruction has not been stored, the action matched with the association instruction is performed according to the association instruction, and the image of performing the action matched with the association instruction is saved to form the action image.
[0061] The step S1202 described above, reading the second type of collection data type of the second type of collection data, and forming the association instruction matched with the second type of collection data type according to the second type of collection data type specifically includes:
[0062] Step S12021, reading the second type of collection data type of the second type of collection data; wherein the second type of collection data type can be determined according to actual conditions. Illustratively, in the case of more types, the user can set multiple types, and similarly in the case of fewer types, the user can set a small number of types. In the present embodiment, the user sets three types. The three types are only illustrative types and are not a limitation on the disclosed solutions of the present application, but are only an explanatory manner. Those skilled in the art can increase or decrease the number of second type of collection data types based on actual conditions.
[0063] Step S12022, in the state that the second type of collection data type matches the first type of collection data, forming a first association sub-instruction according to the first type of collection data; each NPC character has a social relationship corresponding to the character, which can be formed by nerves or can be formed in a pre-set manner. For example, the first type of collection data is familiar people, and when the NPC character detects the presence of people having a social relationship with the NPC character (which can also be understood as people known to the NPC character) in the current environment area through collision detection, area detection, ray detection or other detection methods, the first association sub-instruction can be to greet the known people.
[0064] Step S12023, in the state that the second type of collection data type matches the second type of collection data, forming a second association sub-instruction according to the second type of collection data; the second type of collection data can be weather changes, for example, the pre-set environment is a clear sky, and the NPC character can walk in a conventional manner, but suddenly detects that the weather changes from "clear sky" to "rain", and changes the current walking manner of the NPC character, such as accelerating the pace or directly hiding nearby to avoid the rain, etc.
[0065] Step S12024, in the state that the second type of collection data matches the third type of collection data, a third association sub-instruction is formed according to the third type of collection data. The third type of collection data can be a sudden event, for example, a tree falls down suddenly in the process of walking. The "tree falls down" can be defined as a sudden event, and a third association sub-instruction is formed according to the highest emergency response matched with the sudden event.
[0066] It should be noted that the association sub-instruction can be formed by a plurality of sub-sub-instructions, and the triggering of the plurality of sub-sub-instructions is selected according to the current environment. A sub-sub-instruction with the highest probability is determined to be executed by the current environment.
[0067] Step 130, in the state that the monitoring duration ends and the association behavior is not completed or the association animation is not completed, the standard behavior parameter table is updated according to the association behavior. That is, the standard behavior parameter table is updated once in the state that the behavior changes.
[0068] In the embodiment, the control parameter matched with the current state parameter of the NPC role is formed by acquiring the current state parameter of the NPC role, so that the NPC role shows different pictures in different environments or scenes.
[0069] Embodiment two
[0070] The application further provides a control system based on the self-loop performance of an NPC, wherein:
[0071] An initial image data forming unit, in the state that the standard behavior parameter matched with the current target role is acquired, a first control instruction associated with the current target role in the current environment is read according to the standard behavior parameter, and an initial image data is formed according to the first control instruction and the first collection parameter;
[0072] A monitoring unit, in the effective range of a control duration, a second type of collection parameter is acquired, an association instruction matched with the second collection parameter is acquired according to the second collection parameter, and an association behavior matched with the association instruction or an association animation matched with the association instruction is executed;
[0073] An updating unit, in the state that the monitoring duration ends and the association behavior is not completed or the association animation is not completed, the standard behavior parameter table is updated according to the association behavior.
[0074] As a further preferred embodiment, the above-mentioned control system based on the self-loop performance of an NPC, wherein: the initial image data forming unit specifically comprises:
[0075] reading a target action matching the current time instant and a next scheduled time instant according to the current target role, forming a duration matching the random action according to the current time instant and the next scheduled time instant;
[0076] forming the first control instruction according to the target action, and forming the control duration according to the duration;
[0077] forming an initial image data according to the first control instruction.
[0078] As a further preferred embodiment, the above-mentioned control system based on NPC self-loop performance, wherein the monitoring unit specifically comprises,
[0079] a second type of data acquisition forming device, acquiring data in the environment where the current target role is located within the effective range of the control duration, and forming the second type of data acquisition according to the acquired data when the acquired data does not match the preset data;
[0080] an association instruction forming device, reading the second type of data acquisition of the second type of data acquisition, and forming an association instruction matching the second type of data acquisition according to the second type of data acquisition;
[0081] a display device, performing an association behavior matching the association instruction or playing an association animation matching the association instruction.
[0082] As a further preferred embodiment, the above-mentioned control system based on NPC self-loop performance, wherein the association instruction forming device specifically comprises:
[0083] reading the second type of data acquisition of the second type of data acquisition;
[0084] forming a first association sub-instruction according to the first type of data acquisition when the second type of data acquisition matches the first type of data acquisition;
[0085] forming a second association sub-instruction according to the second type of data acquisition when the second type of data acquisition matches the second type of data acquisition;
[0086] forming a third association sub-instruction according to the third type of data acquisition when the second type of data acquisition matches the third type of data acquisition.
[0087] The above-mentioned control system based on NPC self-loop performance has the same working principle as the above-mentioned control method based on NPC self-loop performance, and thus will not be described here.
[0088] Embodiment Three
[0089] This application provides an electronic device that can integrate the control method based on NPC self-looping behavior provided in this application. Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of this application. Figure 4 As shown, this embodiment provides an electronic device 400, which includes: one or more processors 420; and a storage device 410 for storing one or more programs, which, when executed by the one or more processors 420, cause the one or more processors 420 to perform:
[0090] Upon obtaining the standard behavioral parameters that match the current target role, the system reads the first control command associated with the current target role in the current environment based on the standard behavioral parameters, and forms an initial image data based on the first control command and the first acquisition parameters.
[0091] Within a controlled duration, a second type of acquisition parameter is acquired; based on the second acquisition parameter, an associated instruction matching the second acquisition parameter is acquired; and an associated behavior matching the associated instruction is executed or an associated animation matching the associated instruction is played.
[0092] When the monitoring period ends, and the associated behavior or associated animation has not been completed, the standard behavior parameter table is updated according to the associated behavior.
[0093] like Figure 4 As shown, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device can be one or more. Figure 4 Taking a processor 420 as an example; the processor 420, storage device 410, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 4 For example, China and Israel are connected via bus 450.
[0094] Storage device 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the control method based on NPC self-loop behavior in the embodiments of this application.
[0095] The storage 410 can include a program storage area that stores an operating system and at least one application program required for a function, and a data storage area that stores data created according to use of the terminal, etc. In addition, the storage 410 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, or other non-volatile solid state memory device. In some examples, the storage 410 can further include a memory disposed remotely with respect to the processor 420, and these remote memories can be connected through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0096] The input device 430 can be used to receive inputted numbers, character information, or voice information, and to generate key signal inputs related to user settings and function controls of the electronic device. The output device 440 can include a display screen, a speaker, etc.
[0097] Embodiment Four
[0098] In some embodiments, the above-described methods can be implemented as a computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions stored thereon, the computer readable program instructions being used to perform various aspects of the present disclosure. Specifically:
[0099] In a state where the standard behavior parameter matching the current target role is acquired, a first control instruction associated with the current target role in the current environment is read, and an initial image data is formed according to the first control instruction and the first acquisition parameter;
[0100] In a control duration effective range, a second type of acquisition parameter is acquired, an associated instruction matching the second acquisition parameter is acquired according to the second acquisition parameter, and an associated behavior matching the associated instruction or an associated animation matching the associated instruction is played;
[0101] In a state where the monitoring duration ends and the associated behavior is not completed or the associated animation is not completed, the standard behavior parameter table is updated according to the associated behavior.
[0102] The computer readable storage medium described above can be a tangible device that can retain and store instructions for execution by a
[0103] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0104] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including object oriented programming languages and procedural programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to configure the electronic circuitry in order to act in accord with the
[0105] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include non- transitory computer readable storage media that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer readable storage medium having instructions for causing an apparatus to implement one or more functions / acts specified in the flowchart and / or block diagram block or blocks can be utilized.
[0106] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0107] The computer program product of the second aspect can include a computer readable storage medium. The computer readable storage medium can include instructions. The instructions can include one or both of: instructions for causing a computer to enable a user equipment device to receive a configuration message from a base station, the configuration message comprising an indication of a set of one or more parameters for a first type of hybrid automatic repeat request process, the first type of hybrid automatic repeat request process being associated with a first type of data; and instructions for causing a computer to enable a user equipment device to receive a configuration message from a base station, the configuration message comprising an indication of a set of one or more parameters for a first type of hybrid automatic repeat request process, the first type of hybrid automatic repeat request process being associated with a first type of data.
[0108] Embodiments of the present disclosure have been described above, with the understanding that these embodiments are exemplary only, and are not restrictive, and are not limited to the disclosed embodiments. Many modifications and changes to this disclosure would be apparent to those of ordinary skill in the art. The scope of the technology disclosed is not to be limited by the specific illustrative embodiments presented above, but only by the claims that follow. The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting.
Claims
1. A control method based on NPC self-looping behavior, characterized in that: include, Upon obtaining the standard behavior parameters that match the current NPC character, the system reads the first control command associated with the current NPC character in the current environment based on the standard behavior parameters, and forms an initial image data based on the first control command and the first acquisition parameters. Within a controlled duration, a second acquisition parameter is acquired; based on the second acquisition parameter, an associated instruction matching the second acquisition parameter is acquired; and an associated behavior matching the associated instruction is executed or an associated animation matching the associated instruction is played. When the control duration ends, and the associated behavior or associated animation has not been completed, the standard behavior parameter table is updated according to the associated behavior so that the NPC character displays different screens in different environments or scenes.
2. The control method based on NPC self-looping behavior according to claim 1, characterized in that: Upon obtaining standard behavioral parameters matching the current NPC character, the system reads the first control command associated with the current NPC character in the current environment based on the standard behavioral parameters, and forms initial image data according to the first control command and the first acquisition parameters, specifically including: Based on the current NPC character, read the target action that matches the current time and the next scheduled time, and form a duration that matches the random action based on the current time and the next scheduled time; The first control command is generated based on the target action, and the control duration is generated based on the duration. An initial image data is generated according to the first control command.
3. The control method based on NPC self-looping behavior according to claim 2, characterized in that: Within a controlled duration, a second acquisition parameter is acquired; based on the second acquisition parameter, an associated instruction matching the second acquisition parameter is obtained; and an associated behavior matching the associated instruction is executed or an associated animation matching the associated instruction is played. Specifically, this includes: Within the effective range of the control duration, data is collected within the environment where the current NPC character is located. If the collected data does not match the preset data, the second collection parameter is formed based on the collected data. Read the second acquisition parameter type of the second acquisition parameter, and generate an association instruction that matches the second acquisition parameter type based on the second acquisition parameter type; Execute the associated behavior that matches the associated instruction or play the associated animation that matches the associated instruction.
4. The control method based on NPC self-looping behavior according to claim 3, characterized in that: Reading the second acquisition parameter type of the second acquisition parameter and forming an association instruction matching the second acquisition parameter type specifically includes: Read the second acquisition parameter type of the second acquisition parameter; When the second type of acquisition parameter matches the first type of acquisition data, a first associated sub-instruction is formed based on the first type of acquisition data; When the second type of acquisition parameter matches the second type of acquisition data, a second associated sub-instruction is formed based on the second type of acquisition data; When the second acquisition parameter type matches the third type of acquisition data, a third associated sub-instruction is formed based on the third type of acquisition data.
5. A control system based on NPC self-looping behavior, characterized in that: include, The initial image data forming unit, upon obtaining standard behavioral parameters matching the current NPC character, reads the first control command associated with the current NPC character in the current environment based on the standard behavioral parameters, and forms an initial image data according to the first control command and the first acquisition parameters. The monitoring unit acquires a second acquisition parameter within a control duration effective range, acquires an associated instruction matching the second acquisition parameter based on the second acquisition parameter, executes an associated behavior matching the associated instruction, or plays an associated animation matching the associated instruction. The update unit updates the standard behavior parameter table according to the associated behavior when the monitoring period ends and the associated behavior or associated animation has not been completed, so that the NPC character can display different screens in different environments or scenes.
6. A control system based on NPC self-looping behavior according to claim 5, characterized in that: The initial image data forming unit specifically includes: Based on the current NPC character, read the target action that matches the current time and the next scheduled time, and form a duration that matches the random action based on the current time and the next scheduled time; The first control command is generated based on the target action, and the control duration is generated based on the duration. An initial image data is generated according to the first control command.
7. A control system based on NPC self-looping behavior according to claim 6, characterized in that: The monitoring unit specifically includes, The second acquisition parameter forming device acquires acquisition data within the effective range of the control duration period and within the environment where the current NPC character is located. When the acquisition data does not match the preset data, the second acquisition parameter is formed based on the acquisition data. The association instruction forming device reads the second acquisition parameter type of the second acquisition parameter and forms an association instruction that matches the second acquisition parameter type according to the second acquisition parameter type; The display device executes an associated action matching the associated instruction or plays an associated animation matching the associated instruction.
8. A control system based on NPC self-looping behavior according to claim 7, characterized in that: The associated instruction forming apparatus specifically includes: Read the second acquisition parameter type of the second acquisition parameter; When the second type of acquisition parameter matches the first type of acquisition data, a first associated sub-instruction is formed based on the first type of acquisition data; When the second type of acquisition parameter matches the second type of acquisition data, a second associated sub-instruction is formed based on the second type of acquisition data; When the second acquisition parameter type matches the third type of acquisition data, a third associated sub-instruction is formed based on the third type of acquisition data.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements any one of the control methods based on NPC self-loop behavior as described in claims 1 to 4.
10. A computer program product, characterized in that, Includes computer-readable code, or a readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes a control method based on NPC self-loop behavior according to any one of claims 1 to 4.
Citation Information
Patent Citations
Game non-player character NPC behavior control method and device and storage medium
CN114053716A