Game scenario generation method, computer program product, electronic device
Patent Information
- Application Number
- CN202610993935.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]本公开提供一种游戏剧情生成方法,以至少在一定程度上解决相关技术中使用游戏道具后产生的道具效果与游戏剧情产生脱节的问题
[0004]本公开提供一种游戏剧情生成方法,以至少在一定程度上解决相关技术中使用游戏道具后产生的道具效果与游戏剧情产生脱节的问题。
Smart Images

Figure CN122806076A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for generating game plots, computer program products, and electronic devices. Background Technology
[0002] In role-playing games (RPGs) and interactive narrative applications, the item system is one of the core mechanisms for player interaction with the game world. Traditional game item systems typically employ a predefined numerical design: each item has fixed attribute values, fixed usage conditions, and fixed effect logic.
[0003] With the development of Large Language Model (LLM) technology, AI-driven free-narrative gameplay is gradually maturing. In this type of gameplay, on the one hand, the sources and types of props are infinite, and traditional predefined props cannot cover all possible prop types and usage scenarios. On the other hand, the effects of predefined props are fixed, which can easily lead to a disconnect between prop effects and the plot context. Furthermore, there is a lack of consistency between predefined prop effects and AI narrative text. Summary of the Invention
[0004] This disclosure provides a method for generating game storylines, which at least partially solves the problem of the disconnect between the effects of game items and the game storylines generated after the use of game items in related technologies.
[0005] According to a first aspect of this disclosure, a method for generating game storylines is provided, the method comprising: Responding to the target item corresponding to the virtual object, and generating action options related to the game's storyline based on the target item; The response determines the target action option from the action options, and inputs the target action option, the game plot, and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data; Based on the plot development data in the results of using the target item, generate the target game plot.
[0006] According to a second aspect of this disclosure, a game plot generation apparatus is provided, the apparatus comprising: The item selection module is used to respond to the target item corresponding to the virtual object and generate action options related to the game plot based on the target item; The result determination module is used to determine the target action option in the action options, and input the target action option, the game plot and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data; The target game plot generation module is used to generate the target game plot based on the plot development data in the target item usage results.
[0007] According to a third aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the first aspect described above and possible implementations thereof.
[0008] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of the first aspect and possible implementations thereof by executing the executable instructions.
[0009] This disclosure provides a game plot generation method that, in response to a target item corresponding to a virtual object, generates action options associated with the game plot based on the target item; in response to determining a target action option from the action options, inputs the target action option, the game plot, and the attribute data of the virtual object into a large language model to obtain a target item usage result, wherein the target item usage result includes attribute update data and plot direction data; and generates a target game plot based on the plot direction data in the target item usage result. On one hand, by responding to a target item corresponding to a virtual object and generating associated action options based on that target item, item usage is highly integrated with the game plot; on the other hand, by generating a target item usage result based on the target action option, target item, and game plot, the item effect dynamically changes with the usage method and plot context; furthermore, by generating a target game plot based on the item usage result, player item behavior directly drives the game plot development, breaking through the limitations of traditional preset plots and fixed item effects, and enhancing the game's freedom, strategy, and narrative immersion. Attached Figure Description
[0010] Figure 1 A flowchart illustrating a game story generation method in this exemplary embodiment is shown. Figure 2 This exemplary embodiment shows a method flowchart for storing items corresponding to item acquisition events into a virtual object's item database; Figure 3This exemplary embodiment illustrates a method for generating action options related to the game's storyline based on a target item corresponding to a virtual object. Figure 4 A flowchart illustrating a game plot generation method when a game plot in this exemplary embodiment includes multiple virtual objects is shown. Figure 5 This exemplary embodiment shows a method flowchart for obtaining the target prop usage result based on the prop effect detection result and the target action option corresponding to each virtual object when the prop effect detection result is the first result; Figure 6 A block diagram of a game plot generation apparatus in this exemplary embodiment is shown; Figure 7 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation
[0011] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0012] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0013] In role-playing games and interactive narrative applications, the item system is one of the core mechanisms for player interaction with the game world. Traditional game item systems typically employ a predefined numerical design: each item has fixed attribute values (such as Agility +2, Charisma +3, etc.), fixed usage conditions, and fixed effect logic. These attributes and effects are coded and determined during game development, and execute only according to preset rules at runtime.
[0014] With the development of large language model technology, AI-driven free narrative gameplay, such as AI scripts and tabletop role-playing games (TRPGs), is gradually maturing. AI scripts, in particular, are interactive free narrative gameplay based on large language models. Players interact with AI-driven virtual characters through natural language, and the plot is dynamically generated based on player input. This can be seen as an automated role-playing experience where AI replaces the human host. In this type of gameplay, the plot content is generated in real-time by the large language model. Players can freely converse with NPCs and make choices through natural language, and the plot dynamically changes based on player input. This highly free narrative mode places new demands on the item system. Players may acquire or use any item with any description at any plot point (such as "a rusty key," "a secret letter stolen from an NPC," or "a simple bandage made of herbs and strips of cloth"). The attributes, functions, and effects of these items are not predefined but need to be dynamically determined based on the current plot context.
[0015] In tabletop role-playing games, the effects of items are typically determined improvised by a human Game Master based on rules and context. For example, if a player claims to use "a stolen drug" to persuade a guard to let them pass, the Game Master will consider factors such as the drug's plausibility, the guard's alertness, and the player character's charm attribute to determine the success of the action and its impact on subsequent events. Transferring this experience to a video game environment requires an automated system capable of replacing the human Game Master in determining item effects.
[0016] Some AI chatbots or text-based adventure AI applications allow users to mention the use of items in conversations. The AI provides narrative descriptions of item effects at the text level, essentially still a free-flowing dialogue based on a large language model. The effects of items are only reflected in the AI's current text response, lacking the following key capabilities: No structured numerical system; items do not produce quantifiable attribute changes after use, and the AI's judgment of item effects relies entirely on vague textual descriptions, lacking consistency and predictability; No persistent state management; item effects are not persistently stored, and as conversation rounds increase and context windows become limited, the AI may forget previously used items and their effects, leading to breaks in narrative coherence; No item library or management mechanism; users cannot systematically view, manage, or select items, and the existence of items depends entirely on natural language mentions in the dialogue text, lacking an item management interface independent of the conversation flow.
[0017] Some TRPG auxiliary tools (such as Roll20 and Foundry VTT) offer digital character cards and item management functions, which can record the numerical attributes of items and perform numerical calculations when they are used. However, these tools still require human operators to predefine item attributes or manually determine the effects and input numerical changes when using them, and they do not have the ability for AI to automatically determine effects. They are essentially a digital transfer of the traditional TRPG process, rather than an AI-driven automated item effect determination system.
[0018] Furthermore, in some multiplayer online text-based role-playing platforms, multiple players can use items in the same narrative scene. However, when the effects of multiple players' items conflict at the same plot point (e.g., one player uses an "invisibility cloak" to try to stealth, while another uses "True Sight" to try to expose the disguise), existing systems usually lack an automated conflict resolution mechanism. They either ignore the conflict and let each item take effect independently, or rely on a human moderator to make a manual judgment, making it impossible to achieve reasonable multi-item conflict resolution in AI-driven scenarios without a moderator.
[0019] In view of the above problems, an exemplary embodiment of this disclosure provides a method for generating game storylines. (See reference...) Figure 1 As shown, the game story generation method may include the following steps: Step S110: Respond to the target item corresponding to the virtual object, and generate action options related to the game plot based on the target item; Step S120: In response, determine the target action option from the action options, and input the target action option, the game plot, and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data; Step S130: Generate the target game storyline based on the plot development data in the target item usage results.
[0020] In the aforementioned game plot generation method, on the one hand, it responds to the target item corresponding to the virtual object and generates associated action options based on the target item, so that the use of the item is highly integrated with the game plot; on the other hand, it generates the result of using the target item based on the target action option, the target item, and the game plot, so that the item effect changes dynamically with the usage method and plot context; furthermore, it generates the target game plot based on the result of the item use, so that the player's item behavior directly drives the development of the game plot, breaking through the limitations of traditional preset plot and fixed item effects, and improving the game's freedom, strategy, and narrative immersion.
[0021] The following will provide further explanation and description of steps S110-S130.
[0022] In step S110, in response to the target item corresponding to the virtual object, action options related to the game's storyline are generated based on the target item.
[0023] The game's storyline may include one or more virtual objects. A virtual object is a virtual character controlled by the player or a virtual character participating in interactions within the game's storyline. A target item is an item usable within the game's storyline. This target item can be obtained within the storyline, acquired from other game systems, or created within the storyline; no specific limitations are placed on the target item in this disclosure. When the game's storyline reaches a point requiring a player choice, several action options can be generated based on the current storyline context for the player to select from.
[0024] In one implementation, before responding to the first target item corresponding to the first virtual object, the method further includes: In response to an item acquisition event, the item corresponding to the item acquisition event is stored in the item database of the virtual object.
[0025] Specifically, the system responds to player item acquisition events, which can be various events that trigger items to enter the virtual object's item database. These include, but are not limited to, in-game acquisition events, item creation events, and external acquisition events. In-game acquisition events occur when players obtain items through exploration, dialogue, or completing quests during the game's story progression. Item creation events occur when players create new items through a custom interface. External acquisition events occur when players obtain items from other game systems and bring them into the current storyline. Items acquired based on these events are stored in the virtual object's item database. This database can be the virtual object's item inventory, independent of the dialogue flow. Players can open it at any time to view their owned item list and browse the attribute data of each item. Furthermore, this inventory is persistent data, independent of the large language model's dialogue context management and unaffected by context window limitations.
[0026] In one implementation, the item acquisition event includes in-game acquisition events; storing the item corresponding to the item acquisition event in the virtual object's item database includes: Extract item information, generate item structured attributes associated with the item information based on the large language model, and store the item structured attributes in the item database.
[0027] Specifically, during the game's storyline progression, items can be acquired through story events. When an item acquisition scenario occurs within the story, the system responds by obtaining the item, extracting its information, and inputting this information into a large language model to generate the item's structured attributes. These structured attributes can serve as a description of the item's structured properties. After obtaining the structured attributes, they are stored in the virtual object's item database. These structured attributes can include the item name, a natural language function description, and a numerical attribute label. The numerical attribute label can represent the virtual object's affected attribute dimensions, such as perception or intelligence. The large language model can be a third-party general-purpose large language model, such as ChatGPT, Hunyuan Large Model, or Wenxin Yiyan, and this disclosure does not specifically limit its use.
[0028] For example, when the game's plot progresses to the branch where the abandoned study is searched, the large language model generates the corresponding game plot as follows: "Opening the dusty drawer of the abandoned study, a sealed letter was found hidden among the yellowed books." Based on this plot text, the discovery of a sealed letter is identified as an in-plot acquisition event. Plain text item information is automatically extracted, and a prompt word is generated based on the extracted item information, the current plot world view, and the multi-dimensional attributes of the virtual object. This prompt word is then input into the large language model, outputting the item's structured attributes. The output item structured attributes can be: Item Name: Sealed Letter.
[0029] Natural Language Function Description: Letters contain clues about private transactions among nobles; showing them to NPCs can increase the success rate of social negotiations; studying them on your own can help you discover hidden clues and improve your ability to observe your surroundings; hostile forces will become more vigilant and hostile upon seeing the letters.
[0030] Numerical attribute tags: Perception, Charm.
[0031] In one implementation, reference Figure 2 As shown, the item acquisition event includes an item creation event, and storing the item corresponding to the item acquisition event into the item database of the virtual object includes: Step S210: In response to the input attribute data corresponding to the prop, input the input attribute data, the game plot, and the attribute data of the current prop of the virtual object into the large language model to evaluate the input attribute data; Step S220: When the input attribute data passes the evaluation, output the item structured attribute corresponding to the input attribute data, and store the item structured attribute in the item database.
[0032] The following will further explain and illustrate steps S210 and S220. Specifically, the game can provide an item DIY interface where players can fill in the item name and function description in natural language. Responding to the item attributes entered by the player in the item DIY interface, the input attribute data, the game's plot context, and the current item attribute data of the virtual object are input into the large language model. A reasonableness evaluation is performed based on the large language model. If the evaluation passes, the structured attribute of the item corresponding to the input attribute data is output and stored in the item database. The reasonableness evaluation of the item's input attribute data based on the large language model can be performed from three dimensions: functional reasonableness, numerical balance, and descriptive completeness. Functional reasonableness refers to whether the item is valid within the game's plot worldview; numerical balance refers to whether the item's effect strength is within the allowed numerical range; and descriptive completeness refers to whether the item's functional description is clear enough to generate a structured attribute. The structured attribute can include: the dimension of the affected attribute, the range of the affected numerical value, and the duration type. If the evaluation fails, return the specific reasons and modification suggestions to the player, and re-evaluate after the player modifies the input attribute data of the item.
[0033] For example, the input attribute data entered by the player in the item DIY interface is: Item Name: Time Freeze Pocket Watch; Function Description: Permanently freezes the time of everyone on the entire map, with no cooldown or usage limit, and can be used in any scene. The large language model evaluates based on the input attribute data, the game's plot context, and the attribute data of existing virtual objects. The evaluation of functional rationality is: Permanently freezing the entire map's time and space is a high-level forbidden technique explicitly prohibited by the script's worldview, and low-level players cannot possess it, violating the worldview setting; the evaluation of numerical balance is: No cooldown, permanent effect across the entire area, the effect strength far exceeds the system's numerical limit, seriously disrupting the game's numerical balance; the evaluation of descriptive completeness is: The function description is clear and there is no missing information. The evaluation result output by the large language model is: Evaluation failed. The reasons for rejection and modification suggestions are pushed to the player simultaneously. The reasons for rejection are: 1. The item permanently freezes the time of the entire area, which conflicts with the current Xianxia script's worldview; 2. No cooldown, no usage limit, the effect strength exceeds the system's allowed numerical range, disrupting the game balance. Suggested modifications: The effect is too strong. It is recommended to add usage restrictions: ① Shorten the freeze duration and limit it to temporary rounds; ② Increase the cooldown rounds and the number of times it can be used per scenario; ③ Narrow the effective range and limit it to a small area around the user; ④ Limit its use to combat scenarios only.
[0034] In one implementation, the item acquisition event includes an external acquisition event; storing the item corresponding to the item acquisition event in the virtual object's item database includes: Obtain the attribute data of the item and store the attribute data in the item database.
[0035] Specifically, when the item acquisition event is an external acquisition event, the virtual object entering the game's storyline carries an item that already possesses predefined basic attribute information. After the game's storyline begins, the item's attribute data can be stored in the virtual object's item database. External acquisition events can include rewards from the main game quests, purchases from the in-game store, and social gifting, etc., and are not specifically limited in this disclosure.
[0036] In one implementation, reference Figure 3 As shown, the response corresponds to a target item of the virtual object, and based on the target item, action options related to the game's storyline are generated, including: Step S310: Generate action options associated with the game plot based on the game plot; Step S320: In response, determine the target item corresponding to the virtual object in the item database and generate an update action option associated with the target item; Step S330: Based on the updated action options, update the action options associated with the game storyline.
[0037] The following will further explain and illustrate steps S310-S330. Specifically, when the game's plot progresses to a point where a choice needs to be made, action options related to the game's plot are generated. At this time, the player can actively open their inventory, select a target item, and use it. The large language model generates updated action options related to the target item based on the player's selected target item and the game's plot, and uses these updated action options to update the action options related to the game's plot.
[0038] For example, when the game's plot progresses to the point where the player arrives at the archives door, which is locked, the current choice is how to enter the locked archives. The system reads the complete game plot context, inputs the plot information into the large language model, and generates basic action options (native default options) based on the plot and without integrated item abilities: attempt to pick the lock (Agility judgment), find the administrator to ask for the key (Charisma judgment), observe the situation inside the room through the window (Perception judgment); and displays the above three action options on the plot choice interface. The player actively opens the independent item inventory interface and selects the target item from the current virtual object exclusive item database: the master key stolen from the gatekeeper; the system responds to the player's selection of the target item, and the large language model generates updated action options based on the current complete game plot context (locked archives scene, plot objective), the natural language description of the target item master key, and the item's structured attributes: quietly unlock the door with the master key (Agility judgment, reduced difficulty), openly use the key to open the door, pretending to have permission to enter (Charisma judgment), first use the key to test the keyhole structure to determine if there is a trap (Perception judgment, reduced difficulty). This updated action option directly overrides the basic action options; the story choice interface refreshes in real time, and the original options of picking locks, finding the administrator, and observing from the window are no longer displayed. Only the updated action options generated by the master key are displayed.
[0039] In one alternative implementation, if the generated updated action options are not satisfactory, a refresh can be performed to obtain a new combination of action options, or a custom usage method can be input via natural language. This disclosure does not impose specific limitations on this.
[0040] In step S120, the response determines the target action option from the action options, and inputs the target action option, the game plot, and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data.
[0041] The game's storyline features multiple action options at selection points, each related to the plot. Players can also actively choose items to use. After an item is selected, the large language model regenerates action options that incorporate the item based on the chosen item, selection point information, and the game's context. Once the player selects a target action from the regenerated options, that target action, the target item, the game's context, and the virtual object's attributes are input into the large language model to generate the target item's usage result. The virtual object's attribute data includes: Strength, Agility, Perception, Intelligence, Charisma, and Willpower, among others, but these are not specifically limited in this disclosure.
[0042] In one implementation, the result of using the target item includes attribute update data and plot progression data. The attribute update data includes: virtual object update attributes, update values, and duration types.
[0043] Specifically, the result of using the target item includes attribute update data and plot development data. The attribute update data may include the virtual object's updated attributes, update value, and duration type. The virtual object's updated attributes are the attribute data of the virtual object that are affected after using the target item. The update value is the change value of the virtual object's updated attributes. The duration type is the type of effect of the result of using the target item, which may be temporary or permanent. This disclosure does not make specific limitations on this.
[0044] In one implementation, the target action options affect one or more attributes of the virtual object's attribute data. In the example above, attempting to pick a lock affects the virtual object's agility, seeking the administrator's key affects the virtual object's charm, and observing the interior from the window affects the virtual object's perception.
[0045] In one implementation, reference Figure 4 As shown, when the game plot includes multiple virtual objects, the method further includes: Step S410: Respond to the target prop corresponding to each virtual object, perform effect detection on the multiple target props corresponding to multiple virtual objects, and obtain prop effect detection results; Step S420: Based on the prop effect detection results and the target action options corresponding to each virtual object, obtain the target prop usage result.
[0046] The following will further explain and illustrate steps S410 and S420. Specifically, when the game plot includes multiple virtual objects, in response to the target item selected by the player at the game plot selection node corresponding to each virtual object, an action option corresponding to the target item is generated based on the selected target item and the game plot context, and the player selects the target action option in the action options corresponding to each virtual object. Conflict detection is performed on multiple target items to obtain the item effect detection result. After obtaining the item effect detection result, the target item usage result is obtained based on the item effect detection result and the target action option corresponding to each virtual object. Among them, the item effect detection result includes effect conflict, effect superposition, and effect irrelevance.
[0047] In one implementation, reference Figure 5As shown, when the prop effect detection result is the first result, the step of obtaining the target prop usage result based on the prop effect detection result and the target action option corresponding to each virtual object includes: Step S510: Based on the item attribute data of the target item, the attribute data of the virtual object, and the game plot, generate a first prompt word; Step S520: Input the first prompt word, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action options corresponding to each target item, and the game plot into the large language model to obtain the target item usage result.
[0048] The following will further explain and illustrate steps S510 and S520. Specifically, when the item effect detection result is the first result, this first result can be an effect conflict, which can be that the effects of two target items are opposite in direction. For example, one target item's effect is invisibility, and another target item's effect is revealing. That is, when the item effect detection result is an effect conflict, the item effect can be detected for multiple target items of multiple virtual objects based on a large language model. First, based on the item attribute data of each target item, the attribute data of each virtual object, and the game plot context information, a first prompt word is generated. This first prompt word, the item attribute data of the target item, the attribute data of the virtual object, the target action option corresponding to each virtual object, and the game plot context are input into the large language model, and the item effect detection result is output based on the large language model. Among them, the item attribute data of the target item can be the dimension of the influencing attribute, the range of the influencing value, and the duration type. The attribute data of the virtual object can be strength, agility, perception, intelligence, charm, and will. The generated first prompt includes at least a clear adjudication framework: comparing the attribute strength and matching degree of the target item among multiple virtual objects, comparing the numerical values of multiple virtual objects in relevant attribute dimensions, considering the strategic rationality of the target item's usage, and considering whether there is a natural advantage for a certain virtual object in the current plot context. The output of the item effect detection results based on the large language model includes attribute update data and plot development data. The attribute update data is the specific numerical impact of the target item's use on the virtual object's attribute data, including: updated virtual object attributes, change values, and duration types; the updated virtual object attributes are the attribute data of the virtual object affected after using the target item; the plot development data is a textual description of the impact of the target item's use on the subsequent plot development of the game.
[0049] For example, the game's plot context is: sneaking into the government warehouse at night, you need to avoid being detected by patrolling constables. In the current plot, characters with high perception attributes have a natural advantage in detection.
[0050] The virtual object A's attribute data is: Strength 3, Agility 5, Perception 2, Intelligence 4, Charisma 3, Willpower 3. The selected target item is an invisibility cloak, with the following attribute data: Numerical attribute tag: Agility, Numerical range: +4, Duration type: Temporary, effective in the current round. The selected target's action option is: Put on the invisibility cloak and hide in the shadow of the pillars to avoid the constables' sight.
[0051] The attribute data for virtual object B is: Strength 2, Agility 3, Perception 6, Intelligence 5, Charisma 2, Willpower 4. The selected target item is the Eye of True Sight, with the following attribute data: Numerical attribute tag: Perception, Numerical range: +5, Duration type: Temporary, effective in the current round. The selected target action option is: Wear the Eye of True Sight and scan the entire area to detect hidden personnel.
[0052] The item effect detection results for the two items show that their effects are completely opposite. The first prompt generated based on the item attribute data of the two target items, the attribute data of the virtual objects, and the game's context can be: comparing the attribute strength and matching degree of both items, comparing the numerical values of the virtual objects in relevant attribute dimensions, evaluating the strategic rationality of the item usage methods, and determining whether there is a natural advantage based on the current context. The large language model, based on this first prompt, the item attribute data of the target items, the attribute data of the virtual objects, the target action options of the virtual objects, and the game's context, outputs the target item usage results, including attribute update data and plot development data. The attribute update data is as follows: Virtual Object A: Updated attribute: Agility, change value: +4, but the stealth effect is completely negated; the temporary effect only retains the agility value bonus; the stealth concealment effect is invalid; duration type: temporarily effective this turn. Virtual Object B: Updated attribute: Perception, change value: +5; the true sight effect is fully effective; duration type: temporarily effective this turn. The plot unfolds as follows: Player A dons an invisibility cloak and hides in the shadow of a pillar, but Player B, equipped with True Sight, has crystal-clear vision and, thanks to the item's significantly enhanced perception, clearly spots Player A lurking in the shadows. In the current scenario, reconnaissance items are naturally suited for nighttime searches; True Sight's ability to see through obstacles completely overshadows the invisibility cloak's concealment. Although the constable remains unaware of the two, Player B has already pinpointed Player A's hiding place.
[0053] In one implementation, when the item effect detection result is a second result, the target item usage result is obtained based on the item effect detection result and the target action option corresponding to each virtual object, including: Based on the item attribute data of the target item and the attribute data of the virtual object, attribute update data is obtained; Based on the item attribute data of the target item, the target action options, and the game plot, a second prompt word is generated; The second prompt word, the item attribute data of multiple target items, the attribute update data of multiple virtual objects, the target action options corresponding to each target item, and the game plot are input into the large language model to obtain the plot direction data.
[0054] Specifically, when the item effect detection result is a second result, this second result can be an effect stacking. Effect stacking can mean that the item effects of multiple virtual objects selected by the target items have the same direction, act on the same target, or have the same attribute. When the item effect detection result is an effect stacking, attribute update data can be obtained directly from the item attribute data of the target item and the attribute data of the virtual object. This attribute update data is the specific numerical impact data of the virtual object's attribute data after the target item is used. At the same time, a second prompt word can be generated from the item attribute data of the target item, the attribute update data of the virtual object, the target action option, and the game's plot context information. This second prompt word is input into a large language model, and based on this large language model, plot direction data is output. This plot direction data is a textual description of the impact of the target item's use on the subsequent plot direction of the game.
[0055] For example, the game's plot context is: sneaking into the government warehouse at night, you need to avoid being detected by patrolling constables. In the current plot, characters with high perception attributes have a natural advantage in detection.
[0056] The virtual object A's attribute data is: Strength 3, Agility 5, Perception 2, Intelligence 4, Charisma 3, Willpower 3. The selected target item is a reconnaissance telescope, with the following attribute data: Numerical attribute tag: Perception, Numerical range: +3, Duration type: Temporary, effective in the current round. The selected target action option is: Raise the telescope to scan the warehouse corridor, observing the patrolling constables' route in advance.
[0057] The attribute data of virtual object B is: Strength 2, Agility 3, Perception 6, Intelligence 5, Charisma 2, Willpower 4. The selected target item is a tracking sachet, with the following attribute data: Numerical attribute tag: Perception, Numerical range: +2, Duration type: Temporary, effective in the current round. The selected target action option is: Wear the sachet to detect the footsteps and scent of the constables' clothing in the air, and predict the constables' approaching location.
[0058] The effect detection results for the two target items are cumulative. Based on the item attribute data of the target items and the attribute data of the two virtual objects, attribute update data is generated by superimposing these values. The attribute update data for virtual object A is: Updated attribute: Perception, Change value: +3, Current effective Perception value: 2+3=5, Duration type: Temporary, effective this round. The attribute update data for virtual object B is: Updated attribute: Perception, Change value: +2, Current effective Perception value: 6+2=8, Duration type: Temporary, effective this round.
[0059] Simultaneously, the generated second cue word can be: combining the actions of two target items, two virtual objects investigating the constables, and the plot of hiding in the government warehouse at night to evade patrolling constables, generating a coherent narrative text, highlighting the super-strong investigation advantage brought by the super combination of the two items, without determining the outcome of the confrontation, focusing on the plot effect of the two virtual objects cooperating to evade the constables. Based on this second cue word, the item attribute data of the target items, the attribute update data of the virtual objects, the target action options corresponding to each target item, and the plot context, the large language model outputs the plot direction data as follows: Virtual object A raises a reconnaissance telescope and looks towards the warehouse corridor, clearly seeing the constables' patrol route from a distance; Virtual object B wears a tracking sachet and concentrates carefully, hearing the subtle sound of the constables' boots hitting the ground and the unique soap scent of their official uniforms in advance. The perception abilities of the two virtual objects are simultaneously superimposed and amplified. Relying on their high perception in this naturally favorable warehouse environment, they fully understand the constables' patrol gaps, successfully finding a blind spot under a beam and pillar, temporarily avoiding the patrol personnel's sight.
[0060] In one implementation, when the item effect detection result is a third result, this third result can be that the effect is irrelevant. This irrelevance can mean that the target item's target object or its effect dimension is completely different. A third prompt word can be generated based on the selected target item, target action option, attribute data of the virtual object, and the game's story context. This third target prompt word, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action option corresponding to each target item, and the game's story context are input into a large language model. Based on this large language model, attribute update data and story progression data are output. The attribute update data is the specific numerical impact of the target item's use on the virtual object's attribute data, including the updated virtual object attributes, change values, and duration types. The updated virtual object attributes are the virtual object and the affected attribute dimensions after using the target item. The story progression data is a textual description of the impact of the target item's use on the subsequent story progression of the game.
[0061] For example, the game's plot context is: sneaking into the government warehouse at night, you need to avoid being detected by patrolling constables. In the current plot, characters with high perception attributes have a natural advantage in detection.
[0062] The virtual object A's attribute data is: Strength 3, Agility 5, Perception 2, Intelligence 4, Charisma 3, Willpower 3. The selected target item is the Invisibility Cloak, with the following attribute data: Numerical Attribute Tag: Agility, Value Range: +4, Duration Type: Temporary, Effective in the current round. The selected target's action option is to put on the Invisibility Cloak and hide in the shadows of the shelf, relying on the invisibility effect to conceal their figure and avoid the sight of patrolling constables.
[0063] The attribute data of virtual object B is: Strength 2, Agility 3, Perception 6, Intelligence 5, Charisma 2, Willpower 4. The selected target item is a fine iron crowbar, with the following attribute data: Numerical attribute tag: Strength, Value range: +2, Duration type: Temporary, effective in the current round. The selected target action option is to retrieve the fine iron crowbar, pry open the locked cabinet inside the warehouse, and search for internal ledger evidence.
[0064] Virtual Object A chooses an item whose effect dimension is Agility, and its goal is to conceal itself from the constables; Virtual Object B chooses an item whose effect dimension is Strength, and its goal is to break the lock and open a secret cabinet. The two have completely different targets and attribute dimensions, with no antagonistic or synergistic benefits, and the item effect detection result is "unrelated." At this point, based on the target item, target action options, virtual object attribute data, and the game's context, the generated third prompt is: Virtual Object A: Base Agility 5, Item: Invisibility Cloak (Agility +4, temporary effect), Action: Hide in the shadows of the shelf to conceal yourself from the constables; Virtual Object B: Base Strength 2, Item: Fine Iron Crowbar (Strength +5, temporary effect), Action: Use the crowbar to pry open the locked secret cabinet to find the ledger; Output requirements: ① Output the attribute update data for each item: including the virtual object, updated attribute, changed value, and duration type; ② Output a coherent plot text integrating the two independent actions, describing the plot changes brought about by the items for each character, without comparing their strength. Based on the third target prompt, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action options corresponding to each target item, and the game's plot context, the large language model outputs the following attribute update data: Virtual Object A's attribute update data: Updated attribute: Agility, Change value: +4, Duration type: Temporary, Effective this turn; Virtual Object B's attribute update data: Updated attribute: Strength, Change value: +5, Duration type: Temporary, Effective this turn. The output plot progression data is as follows: Virtual Object A dons an invisibility cloak, its outline completely obscured by shadows. With its agility greatly increased, it moves slowly and silently, quietly hiding in the gaps between shelves. Passing constables are completely unaware of the figure in the shadows. On the other side, Player B grips a fine iron crowbar. The strength boost from the item allows the crowbar to easily engage the lock on the cabinet door. With a slight click, the sealed cabinet is opened, revealing the stacked government account books inside. The two act independently without interfering with each other; one successfully evades the patrol, and the other smoothly opens the evidence cabinet.
[0065] In one embodiment, the method further includes: The attribute update data and the plot development data are stored, and the attribute update data is managed according to the persistence type in the attribute update data.
[0066] Specifically, after obtaining the result of using a target item, this result can be stored. That is, attribute update data is stored in the virtual object state database, and plot progression data is stored in the context information. The virtual object state database maintains the current values of the virtual object's attribute data and all modification records (including item, change value, effective time, duration type, etc.). For temporary effects, the system automatically manages the effectiveness and expiration of the target item's usage result based on its validity period settings (such as "valid within this chapter," "lasts for 3 rounds," etc.). The current values of the character's attributes are referenced in all subsequent nodes requiring ability assessments, ensuring that item effects have a real impact on the success or failure of subsequent plot choices.
[0067] The persistent plot data will be injected into the prompts of the large language model when generating plot in each subsequent round. This ensures that the effects of previous item usage can be continuously perceived and reflected when generating subsequent plot content, and avoids the AI forgetting the item effects due to the progression of dialogue rounds.
[0068] In one implementation, during the generation of the target item's usage result, the large language model simultaneously conducts a comprehensive evaluation of the compatibility between the target item's application behavior and its inherent attributes, as well as the current plot scene. If it identifies that the application behavior is seriously inconsistent with the item's function and the objective rules of the scene (e.g., using a paper letter to break down an iron gate), the success weight of the action is reduced, or a failure judgment is directly output, and a reasonable explanation that fits the game's worldview is added to the output plot narrative text. The compatibility is used to determine whether the item's application falls within the scope of the item's inherent abilities, whether the item's application conforms to the script's worldview, the physical settings and narrative constraints of the scene environment, and whether the item's operational logic can effectively achieve the desired plot objective.
[0069] In step S130, the target game storyline is generated based on the storyline data in the target item usage results.
[0070] After generating the result of using the target item, subsequent target game storylines can be generated based on the storyline data in the result of using the target item.
[0071] In one implementation, generating the target game storyline based on the storyline data from the target item usage results includes: The plot development data is injected into the plot prompts, and the plot prompts are input into the large language model to generate the target game plot.
[0072] Specifically, after generating the plot direction data, the plot direction data can be injected into the plot prompt words, and the plot prompt words can be used as prompt words to input into the large language model. Based on the large language model, the target game plot associated with the plot direction data can be output.
[0073] In one implementation, after accumulating multiple target item usage results in the plot hints, all plot progression data can be aggregated and deduplicated to control the total length of the injected plot hints while retaining key effect information. Expired temporary plot progression data will be removed from the injection list.
[0074] In one implementation, the outcome of using the target item can be presented through real-time game storyline, specifically: Narrative text presentation: The output plot development data will be presented as part of the plot content through the performance system in the form of character dialogue, narration, scene description, etc. Performance elements will be automatically matched based on the plot development data, including: facial expressions and actions of speaking characters, scene background changes, camera movements, etc., to achieve an immersive audiovisual experience in the narrative impact of prop effects. For example, the narrative text of using a master key to sneak into the archives might correspond to a dark-toned interior scene change, stealthy movements of the characters, and a low-voiced narration tone.
[0075] UI feedback on numerical changes: The attribute update data of the target item's usage result is displayed intuitively through UI elements in the game interface, such as pop-up prompts for attribute value changes and attribute correction markers in the character status panel, so that players can clearly feel the quantitative effect brought about by the use of the item.
[0076] The chain reaction of subsequent plot developments: Since the plot data has been incorporated into the plot hints for later rounds, the impact of item usage will naturally continue and be reflected when generating subsequent plot events. For example, in a round after infiltrating the archives, a plot development might occur where the guards only discover the archives have been disturbed during their shift change, thanks to your previous stealthy entry. This makes the effect of item usage not only reflected in the current round but also has a coherent and lasting impact on the overall narrative.
[0077] The disclosed game story generation method has four key aspects: First, it enables dynamic effect determination of any item in a free narrative scenario, breaking through the limitations of traditional predefined item systems on item types and effects. This allows players to freely use any item using natural language and obtain reasonable effect feedback. Second, by simultaneously outputting determination results from two dimensions—attribute update data and plot development data—through a large language model, it solves the problem in existing AI tools where item effects are merely textual descriptions and cannot be quantified, enabling item use to have a substantial and structured impact on character numerical attributes. Third, through a dual mechanism of persistent storage and context injection per turn, it solves the problem of item effect forgetting caused by the context window limitation of the large language model, ensuring that effects remain effective throughout the entire script cycle. Fourth, by integrating the results of target item usage into the real-time story performance system, it achieves a unified presentation of numerical and narrative expressions, avoiding mechanical numerical pop-ups that disrupt narrative immersion and providing players with a consistent interactive experience. Fifth, the player-customized item mechanism empowers players with the ability to create items, expanding the richness of the item ecosystem and the space for players' personalized expression under the guarantee of the rationality review of the large language model; Sixth, the multi-item conflict adjudication mechanism solves the problem of lack of automated adjudication when the effects of multiple items contradict each other in multi-player scenarios, and realizes unified judgment and coherent narrative of item effects in multi-player confrontation scenarios.
[0078] Exemplary embodiments of this disclosure also provide a game story generation apparatus, with reference to Figure 6 As shown, it includes: The prop selection module 610 is used to respond to a target prop corresponding to a virtual object and generate action options related to the game plot based on the target prop. The result determination module 620 is used to respond to the determination of the target action option in the action options, and to input the target action option, the game plot and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data; The target game plot generation module 630 is used to generate the target game plot based on the plot direction data in the target item usage result.
[0079] In one exemplary embodiment, when the game plot includes multiple virtual objects, the result determination module includes: The prop effect detection result acquisition module is used to respond to the target prop corresponding to each virtual object, perform effect detection on the multiple target props corresponding to multiple virtual objects, and obtain the prop effect detection result; The target prop usage result acquisition module is used to obtain the target prop usage result based on the prop effect detection result and the target action option corresponding to each virtual object.
[0080] In one exemplary embodiment, when the prop effect detection result is a first result, the target prop usage result acquisition module includes: The first target prompt word generation module is used to generate a first prompt word based on the item attribute data of the target item, the attribute data of the virtual object, and the game plot; The result generation module is used to input the first prompt word, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action options corresponding to each target item, and the game plot into the large language model to obtain the target item usage result.
[0081] In one exemplary embodiment, when the prop effect detection result is a second result, the target prop usage result acquisition module includes: The attribute update data acquisition module is used to obtain attribute update data based on the item attribute data of the target item and the attribute data of the virtual object; The second prompt word generation module is used to generate a second prompt word based on the item attribute data of the target item, the target action options, and the game plot; The plot development data acquisition module is used to input the second prompt word, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action options corresponding to each target item, and the game plot into the large language model to obtain the plot development data.
[0082] In one exemplary embodiment, the prop selection module includes: The item acquisition event response module is used to respond to item acquisition events and store the items corresponding to the item acquisition events into the item database of the virtual object.
[0083] In one exemplary embodiment, the item acquisition event includes an in-game acquisition event; the item acquisition event response module includes: The prop information extraction module is used to extract prop information, generate prop structured attributes associated with the prop information based on the large language model, and store the prop structured attributes in the prop database.
[0084] In one exemplary embodiment, the item acquisition event includes an item creation event, and the item acquisition event response module includes: The attribute data input module is used to respond to the input attribute data corresponding to the prop, and input the input attribute data, the game plot and the attribute data of the current prop of the virtual object into the large language model to evaluate the input attribute data; The attribute data structuring module is used to output the item structured attributes corresponding to the input attribute data when the input attribute data evaluation is passed, and to store the item structured attributes in the item database.
[0085] In one exemplary embodiment, the item acquisition event includes an external acquisition event, and the item acquisition event response module includes: The attribute data storage module is used to acquire the attribute data of the item and store the attribute data in the item database.
[0086] In one exemplary embodiment, the result determination module includes: An action option generation module is used to generate action options related to the game's storyline. An update action option generation module is used to generate update action options associated with the target item in response to determining the target item corresponding to the virtual object in the item database; The action option update module is used to update the action options related to the game's storyline based on the updated action options.
[0087] In one exemplary embodiment, the attribute update data includes: virtual object update attributes, update values, and persistence types; the usage result determination module includes: The result storage module is used to store the attribute update data and the plot development data, and to manage the attribute update data according to the persistence type in the attribute update data.
[0088] In one exemplary embodiment, the target game story generation module includes: The game plot generation module is used to inject the plot direction data into the plot prompt words, input the plot prompt words into the large language model, and generate the target game plot.
[0089] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0090] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0091] Furthermore, although the steps of the method in this invention are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0092] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the aforementioned game plot generation method.
[0093] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0094] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0095] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0096] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic radiation, and infrared radiation. Electronic devices can convert signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, the processor of the electronic device to execute) the method steps of various exemplary embodiments of this disclosure, such as the game plot generation method described above, which includes the following steps: Step S110: In response to a target item corresponding to a virtual object, generate action options associated with the game plot based on the target item; Step S120: In response to determining a target action option from the action options, input the target action option, the game plot, and the attribute data of the virtual object into a large language model to obtain a target item usage result, wherein the target item usage result includes attribute update data and plot direction data; Step S130: Generate a target game plot based on the plot direction data in the target item usage result.
[0097] The above method steps are implemented by computer programs. On the one hand, in response to the target item corresponding to the virtual object, associated action options are generated based on the target item, so that the use of the item is highly integrated with the game plot. On the other hand, the result of the use of the target item is generated based on the target action options, the target item, and the game plot, so that the item effect changes dynamically with the usage method and plot context. Furthermore, the target game plot is generated based on the result of the item use, so that the player's item behavior directly drives the development of the game plot, breaking through the limitations of traditional preset plots and fixed item effects, and improving the game's freedom, strategy, and narrative immersion.
[0098] Exemplary embodiments of this disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of various exemplary embodiments of this disclosure. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0099] The following is for reference. Figure 7 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 7 The electronic device 700 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0100] like Figure 7 As shown, the electronic device 700 may include: a processor 710, a memory 720, a bus 730, an I / O (input / output) interface 740, a network adapter 750, and a display 760.
[0101] The memory 720 may include volatile memory, such as RAM 721 and cache unit 722, and may also include non-volatile memory, such as ROM 723. The memory 720 may also include one or more program modules 724, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 724 may include the modules described above.
[0102] The processor 710 may include one or more processing units, such as an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit).
[0103] The processor 710 can be used to execute executable instructions stored in the memory 720, such as the game plot generation method described above, which includes the following steps: Step S110: In response to a target item corresponding to a virtual object, generate action options associated with the game plot based on the target item; Step S120: In response to determining a target action option from the action options, input the target action option, the game plot, and the attribute data of the virtual object into a large language model to obtain a target item usage result, wherein the target item usage result includes attribute update data and plot direction data; Step S130: Generate a target game plot based on the plot direction data in the target item usage result.
[0104] By executing the above method steps through processor 710, on the one hand, it responds to the target item corresponding to the virtual object and generates associated action options based on the target item, so that the use of the item is highly integrated with the game plot; on the other hand, it generates the result of the use of the target item based on the target action options, the target item, and the game plot, so that the effect of the item changes dynamically with the usage method and the plot context; furthermore, it generates the target game plot based on the result of the item use, so that the player's item behavior directly drives the development of the game plot, breaking through the limitations of traditional preset plots and fixed item effects, and improving the game's freedom, strategy, and narrative immersion.
[0105] Bus 730 is used to connect different components of electronic device 700 and may include data bus, address bus and control bus.
[0106] Electronic device 700 can communicate with one or more external devices 800 (such as keyboard, mouse, external controller, etc.) through I / O interface 740.
[0107] Electronic device 700 can communicate with one or more networks via network adapter 750. For example, network adapter 750 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 750 can communicate with other modules of electronic device 700 via bus 730.
[0108] Electronic device 700 can display a graphical user interface via display 760.
[0109] although Figure 7 As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 700, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0110] As can be seen from the above, the technical solutions disclosed herein can be implemented as methods, apparatus, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be referred to as "circuit," "module," or "system," respectively.
[0111] It should be understood that this disclosure is not limited to the specific methods, steps, or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Those skilled in the art will readily conceive of other embodiments based on the specific implementations provided in this disclosure. Therefore, the specific implementations provided in this disclosure are merely exemplary, and the scope and spirit of this disclosure are indicated by the claims, and should cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary technical means in the art not disclosed in this disclosure.
Claims
1. A method for generating game storylines, characterized in that, The method includes: Responding to the target item corresponding to the virtual object, and generating action options related to the game's storyline based on the target item; The response determines the target action option from the action options, and inputs the target action option, the game plot, and the attribute data of the virtual object into the large language model to obtain the target item usage result, wherein the target item usage result includes attribute update data and plot direction data; Based on the plot development data in the results of using the target item, generate the target game plot.
2. The method according to claim 1, characterized in that, When the game plot includes multiple virtual objects, the method further includes: In response to the target prop corresponding to each virtual object, effect detection is performed on the multiple target props corresponding to multiple virtual objects to obtain prop effect detection results; Based on the item effect detection results and the target action options corresponding to each virtual object, the target item usage result is obtained.
3. The method according to claim 2, characterized in that, When the prop effect detection result is the first result, the step of obtaining the target prop usage result based on the prop effect detection result and the target action option corresponding to each virtual object includes: Based on the item attribute data of the target item, the attribute data of the virtual object, and the game plot, a first prompt word is generated; The first prompt word, the item attribute data of multiple target items, the attribute data of multiple virtual objects, the target action options corresponding to each target item, and the game plot are input into the large language model to obtain the target item usage result.
4. The method according to claim 2, characterized in that, When the item effect detection result is the second result, the step of obtaining the target item usage result based on the item effect detection result and the target action option corresponding to each virtual object includes: Based on the item attribute data of the target item and the attribute data of the virtual object, attribute update data is obtained; Based on the item attribute data of the target item, the target action options, and the game plot, a second prompt word is generated; The second prompt word, the item attribute data of multiple target items, the attribute update data of multiple virtual objects, the target action options corresponding to each target item, and the game plot are input into the large language model to obtain the plot direction data.
5. The method according to claim 1, characterized in that, Before responding to the target item corresponding to the virtual object, the method further includes: In response to an item acquisition event, the item corresponding to the item acquisition event is stored in the item database of the virtual object.
6. The method according to claim 5, characterized in that, The item acquisition events include in-game acquisition events. The step of storing the item corresponding to the item acquisition event into the item database of the virtual object includes: Extract item information, generate item structured attributes associated with the item information based on the large language model, and store the item structured attributes in the item database.
7. The method according to claim 5, characterized in that, The item acquisition event includes an item creation event, and storing the item corresponding to the item acquisition event in the item database of the virtual object includes: In response to the input attribute data corresponding to the prop, the input attribute data, the game plot, and the attribute data of the current prop of the virtual object are input into the large language model to evaluate the input attribute data; When the input attribute data passes the evaluation, the structured attribute of the item corresponding to the input attribute data is output, and the structured attribute of the item is stored in the item database.
8. The method according to claim 5, characterized in that, The item acquisition event includes external acquisition events; storing the item corresponding to the item acquisition event into the item database of the virtual object includes: Obtain the attribute data of the item and store the attribute data in the item database.
9. The method according to claim 1, characterized in that, The response corresponds to a target item of the virtual object, and based on the target item, action options related to the game's storyline are generated, including: Generate action options related to the game's storyline; The response determines the target item corresponding to the virtual object in the item database and generates an update action option associated with the target item; Based on the updated action options, the action options related to the game's storyline are updated.
10. The method according to claim 1, characterized in that, The attribute update data includes: virtual object update attributes, update values, and persistence types; the method further includes: The attribute update data and the plot development data are stored, and the attribute update data is managed according to the persistence type in the attribute update data.
11. The method according to claim 1, characterized in that, The step of generating the target game storyline based on the storyline data from the item usage results includes: The plot development data is injected into the plot prompts, and the plot prompts are input into the large language model to generate the target game plot.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 11.
13. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 11 by executing the executable instructions.