Virtual lineup arrangement method and device, storage medium and computer equipment
Patent Information
- Application Number
- CN202611283964.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]目前,游戏中的出战阵容阵型排布大多依赖玩家手动操作,玩家需要根据自身的游戏经验,逐个挑选出战英雄并调整站位完成布阵;也有少数游戏可以依靠预先存储的预设的固定布阵策略进行自动布阵,但随着游戏的运营升级,战斗场景和英雄角色越发复杂化和多样化,固定的布阵策略难以快速适配不同的战斗场景或敌方阵容,提升了玩家决策的门槛及操作复杂性
本申请提供的虚拟阵容的阵型排布方法、装置、存储介质及计算机设备,当虚拟战斗场景中触发战斗准备指令后,可以获取该虚拟战斗场景的场景环境信息和敌方阵容信息,实现对战斗相关信息的综合感知,进而可以对场景环境信息和敌方阵容信息进行克制关系分析,得到与实际战斗需求高度适配的出战阵容规模;根据该出战阵容规模,本申请可以在虚拟对象库中对各个虚拟对象进行阵容匹配,通过不同英雄之间的组合效果,选出整体战斗力最高的目标出战阵容,然后可以基于场景环境信息对该目标出战阵容进行排兵布阵模拟,进一步分析不同英雄站位对战斗过程产生的影响,生成最优阵型排布;最后可以将目标出战阵容及其最优阵型排布共同显示于虚拟战斗场景的预设交互区域中,为玩家提供精准的布阵提示。
Smart Images

Figure CN122806073A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a method, apparatus, storage medium, and computer equipment for arranging virtual lineups. Background Technology
[0002] With the continuous development of game technology, in order to improve the diversity of gameplay, more and more types of games have introduced combat gameplay, such as arrest missions and arena battles. In these scenarios, the combat effects produced by different lineups and formations vary greatly. Therefore, the player's tactical decisions can directly affect the outcome of the battle.
[0003] Currently, the formation of battle lineups in games mostly relies on manual operation by players. Players need to select heroes one by one and adjust their positions to complete the formation based on their own game experience. A few games can automatically arrange formations by relying on pre-stored fixed formation strategies. However, as the operation and upgrading of games have made battle scenarios and hero characters more complex and diverse, fixed formation strategies are difficult to adapt to different battle scenarios or enemy lineups quickly, which increases the threshold for player decision-making and the complexity of operation. Summary of the Invention
[0004] The purpose of this application is to at least solve one of the aforementioned technical defects, particularly the technical defect in the existing technology that fixed formation strategies in battle scenarios are difficult to quickly adapt to different battle scenarios or enemy lineups, thus failing to provide players with accurate formation prompts and reducing the threshold for player decision-making and operational complexity.
[0005] This application provides a method for arranging the formation of a virtual lineup, the method comprising: In response to combat preparation commands triggered in a virtual combat scenario, the system acquires a virtual object library, as well as scenario environment information and enemy lineup information for the virtual combat scenario. The scene environment information and the enemy lineup information are analyzed for their counter-relationship to obtain the size of the battle lineup. Based on the size of the battle lineup, the lineups of each virtual object in the virtual object library are matched to obtain the target battle lineup. Based on the scenario environment information, the target battle lineup is simulated for deployment to obtain the optimal formation, and the target battle lineup and the optimal formation are output in the virtual battle scenario.
[0006] Optionally, the virtual object library and the scene environment information and enemy lineup information of the virtual battle scene are obtained, including: The player's user identifier is determined by the combat preparation command, and the virtual object library of the user identifier at the current moment is loaded. The system reads scene data corresponding to the virtual battle scene from a preset scene database, and obtains the time data and weather data of the game system at the current moment, and generates scene environment information of the virtual battle scene based on the scene data, the time data and the weather data. The enemy lineup information corresponding to the scene environment information is obtained by matching the preset enemy database.
[0007] Optionally, reading scene data corresponding to the virtual battle scene from a preset scene database includes: The scene type and scene identifier of the virtual battle scene are determined, and the terrain information corresponding to the scene identifier is obtained by indexing the preset scene database; The scene data of the virtual battle scene is generated based on the scene type and the terrain information.
[0008] Optionally, the step of matching enemy lineup information corresponding to the scene environment information from a preset enemy database includes: The set of enemy troop types in the virtual battle scene is determined based on the scene type in the scene data; Based on the set of enemy troop types, the enemy troop formation corresponding to the time data and the weather data is obtained by matching from the enemy database; The activity distribution data of the enemy troop formation is determined based on the terrain information in the scene data; Enemy lineup information is generated based on the enemy's defensive lineup and the activity distribution data.
[0009] Optionally, the step of performing a counter-relationship analysis on the scene environment information and the enemy lineup information to obtain the size of the deployed lineup includes: The enemy formation information is analyzed for troop characteristics to obtain the enemy troop type and the number of enemy troops. The object type combination that counters the enemy force type is determined according to the preset type counter relationship table, and the number of virtual objects corresponding to the object type combination is determined according to the number of enemy forces. The terrain utilization coefficient of the virtual battle scene is determined based on the scene environment information, and the terrain utilization coefficient is used to correct the object type combination and the number of virtual objects to obtain the scale of the battle lineup.
[0010] Optionally, determining the combination of object types that counter the enemy force type according to a preset type counter relationship table includes: When the enemy force type is a scattered and disorganized type, the object type combination is determined to be a stealth object and a combat object; When the enemy force type is a small-scale armed type, the object type combination is determined to be a combat object and a technology object; When the enemy force type is a large-scale cluster type, the object type combination is determined to be a combat object, a technical object, and an auxiliary object; When the enemy force type is an elite squad, the object type combination is determined to be a stealth object, a combat object, and a support object.
[0011] Optionally, determining the number of virtual objects corresponding to the object type combination based on the number of enemy troops includes: The threshold for the number of objects to be deployed in the combination of object types is determined based on the number of enemy troops, and the counterweight of each object type in the combination of object types is read. The number of objects to be deployed is allocated according to each restraint weight to obtain the number of objects to be deployed for each object type. The number of virtual objects for the combination of object types is generated based on the number of objects of each object type in battle.
[0012] Optionally, determining the terrain utilization coefficient of the virtual combat scene based on the scene environment information includes: The environmental information of the scene is analyzed to obtain scene type, terrain features, weather features and time features; Based on the scene type, a basic terrain coefficient corresponding to the terrain feature is determined, and a correction coefficient for the basic terrain coefficient is determined based on the weather feature and the time feature; The base terrain coefficient is corrected using the correction coefficient to obtain the terrain utilization coefficient of the virtual battle scene.
[0013] Optionally, the step of using the terrain utilization coefficient to correct the object type combination and the number of virtual objects to obtain the battle lineup size includes: The terrain utilization coefficient is used to correct the restraint weight of each object type in the object type combination, and the number of virtual objects is updated according to the corrected object type combination. The size of the battle lineup is generated based on the updated combination of object types and the number of virtual objects.
[0014] Optionally, the step of matching virtual objects in the virtual object library to obtain the target lineup based on the size of the battle lineup includes: Determine the combination of object types and the number of virtual objects in the aforementioned battle lineup size; Candidate virtual objects corresponding to each object type in the combination of object types are obtained from the virtual object library, and the attribute parameters corresponding to each candidate virtual object are obtained. Candidate virtual objects of each object type are prioritized according to their respective attribute parameters to obtain a sorting result. Virtual objects matching the number of virtual objects are selected according to the sorting result and combined to obtain the target battle lineup.
[0015] Optionally, the step of simulating the deployment of the target battle formation based on the scenario environment information to obtain the optimal formation includes: The terrain features of the scene environment information are determined, and multiple candidate deployment areas in the virtual battle scene are determined based on the terrain features; Determine the formation position preference of each virtual object in the target lineup, and simulate the object's position in each candidate formation area based on the formation position preference of each virtual object to obtain multiple formation arrangement schemes; Obtain the activity distribution data of the enemy troop formation in the enemy formation information, and evaluate the combat effectiveness of each formation arrangement based on the activity distribution data to obtain the evaluation results; Based on the evaluation results, the formation with the highest combat effectiveness is selected from all formation layout schemes as the optimal formation layout.
[0016] Optionally, the evaluation of the combat effectiveness of each formation arrangement scheme based on the activity distribution data, to obtain the evaluation results, includes: Determine the performance evaluation weight of each virtual object in the target battle lineup; For each formation arrangement scheme, the distance parameters, angle parameters, and terrain obstruction parameters between each virtual object in the formation arrangement scheme and the enemy force formation are determined based on the activity distribution data. The distance parameters, angle parameters, and terrain obstruction parameters corresponding to each virtual object are weighted and calculated based on each effectiveness evaluation weight to obtain the combat effectiveness score of the formation arrangement scheme. Evaluation results are generated based on the combat effectiveness scores of each formation arrangement.
[0017] This application also provides a virtual formation arrangement device, including: The data acquisition module is used to respond to the battle preparation command triggered in the virtual battle scene, and to acquire the virtual object library, as well as the scene environment information and enemy lineup information of the virtual battle scene. The lineup determination module is used to analyze the counter-relationship between the scene environment information and the enemy lineup information to obtain the size of the battle lineup, and to perform lineup matching on each virtual object in the virtual object library according to the size of the battle lineup to obtain the target battle lineup. The formation arrangement module is used to simulate the formation arrangement of the target battle lineup based on the scene environment information, obtain the optimal formation arrangement, and output the target battle lineup and the optimal formation arrangement in the virtual battle scene.
[0018] This application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the virtual formation arrangement method as described in any of the above embodiments.
[0019] This application also provides a computer device, including: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the virtual formation arrangement method as described in any of the above embodiments.
[0020] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The virtual lineup arrangement method, device, storage medium, and computer equipment provided in this application can acquire scene environment information and enemy lineup information of the virtual battle scene after a battle preparation command is triggered in the virtual battle scene, realizing comprehensive perception of battle-related information. Furthermore, it can analyze the restraint relationships between scene environment information and enemy lineup information to obtain a battle lineup size highly adapted to actual battle needs. Based on this battle lineup size, this application can perform lineup matching on various virtual objects in a virtual object library. Through the combination effects between different heroes, it selects the target battle lineup with the highest overall combat power. Then, based on scene environment information, it can simulate the formation of this target battle lineup, further analyze the impact of different hero positions on the battle process, and generate the optimal formation arrangement. Finally, it can display the target battle lineup and its optimal formation arrangement together in a preset interactive area of the virtual battle scene, providing players with accurate formation prompts. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram of an application architecture provided for an embodiment of this application; Figure 2A flowchart illustrating a virtual formation arrangement method provided in an embodiment of this application; Figure 3 A schematic diagram of the interface of a virtual object library provided in an embodiment of this application; Figure 4 A schematic diagram of an interface for recommending team formations provided in an embodiment of this application; Figure 5 A schematic diagram of an interface for a virtual battle scene provided in an embodiment of this application; Figure 6 A schematic diagram of a type restraint relationship table provided for embodiments of this application; Figure 7 A flowchart illustrating a process for determining the number of virtual objects, provided as an embodiment of this application; Figure 8 A flowchart illustrating a troop deployment simulation process provided in this application embodiment; Figure 9 A schematic diagram of the structure of a virtual formation arrangement device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] Currently, most game lineups rely on manual player operation for formation. Players need to select heroes and adjust their positions based on their game experience to complete the formation. A few games can automatically arrange formations using pre-stored fixed formation strategies. However, as games are upgraded and battle scenarios and hero characters become more diverse, fixed formation strategies are difficult to quickly adapt to different battle scenarios or enemy lineups and provide players with accurate formation prompts.
[0025] For example, in multi-army combat gameplay of open-world strategy games, when players are about to attack a valley stronghold heavily guarded by the enemy, existing solutions often only recommend a fixed list of heroes and positioning templates based on the enemy's basic troop strength, completely ignoring whether the terrain of the stronghold is a narrow valley or an open plain, or whether the battle takes place during the day or night—the two environments have drastically different vision ranges and marching speeds. Furthermore, they fail to consider the enemy's troop type—whether it's a scattered force or an elite squad—to adjust counter-strategies and formation emphasis. Even the ambush advantages of the high ground on both sides of the valley are not reflected in the formation plan. The ultimately recommended lineup and positioning neither meet the actual combat environment requirements nor effectively counter the enemy's troop composition, thus failing to provide players with a valuable combat assistance experience. To address these problems in existing technologies, this application proposes a formation arrangement scheme that dynamically counters the enemy's lineup and the environment. This scheme can effectively improve the accuracy of lineup recommendations and battlefield adaptability, providing players with more strategic depth and practical value in their formation guidance.
[0026] It should be noted that the virtual formation arrangement method in this application can be applied to various types of battle scenarios, such as large-scale legion battles, elite squad raids, defensive counter-attacks, and fair arena battles. It can also be applied to asymmetrical combat gameplay, such as player-versus-player breakout battles and timed attack-defense battles. This application does not specifically limit its application scenarios. By developing hero characters and unlocking different character object types and skills, players can continuously enrich their virtual object library. Different types and roles of virtual objects can play different roles when facing different enemy forces and battlefield environments, helping players gain a greater tactical advantage and chance of victory in battle.
[0027] Furthermore, before describing the specific implementation process of this application, the application environment of this application will first be described. Please refer to [link / reference needed]. Figure 1 , Figure 1 A schematic diagram of an application architecture provided for an embodiment of this application; Figure 1The application architecture includes server 110 and client 120. Server 110 can be of various types, such as a game server or application server. It is used to store game data, process player requests, and execute the core logic of virtual lineup formation. Server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Client 120 can be a terminal device such as a smartphone, tablet, personal computer, or smartwatch. Players interact with the game system through the graphical user interface of client 120, such as triggering battle preparation commands in virtual battle scenarios and viewing recommended target lineups and formations. Server 110 and client 120 establish a communication connection through a network to achieve real-time data transmission and synchronization. For example, client 120 sends a formation request to server 110, and server 110 returns the target lineup and its optimal formation.
[0028] It is understood that the above-mentioned virtual lineup arrangement method can run on personal mobile terminals, on server 110, or on third-party devices to provide virtual lineup arrangement services. The specific virtual lineup arrangement method can run as a program on the above-mentioned devices, or as a system component of the above-mentioned devices, or as a cloud service program. The specific operating mode depends on the actual scenario and is not limited here.
[0029] In one embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a virtual lineup formation arrangement method provided in this application embodiment; this application embodiment provides a virtual lineup formation arrangement method, specifically including the following: S110: Responds to combat preparation commands triggered in a virtual combat scenario, and obtains information about the virtual object library, the virtual combat scenario environment, and the enemy lineup.
[0030] In this embodiment, when a player enters the virtual battle scene interface in the game and triggers the battle preparation command, the game system can obtain the virtual object library currently owned by the player, as well as the scene environment information and enemy lineup information of the virtual battle scene, to achieve comprehensive perception of battle-related information.
[0031] Specifically, when a player enters the battle preparation phase in the game, the game system can detect the battle preparation actions triggered by the player in response to the current virtual battle scenario. For example, in strategy games, players can click the "Expedition" button to enter the battle preparation interface; in role-playing games, players can trigger story battle events as they progress through the game's plot; in competitive games, players can enter the corresponding formation interface after being matched with an opponent. When the game system detects any of the above actions, it can identify the action as a battle preparation command for the current virtual battle scenario and automatically trigger the acquisition of relevant information about the current battle, including the virtual object library, the scene environment information of the virtual battle scenario, and the enemy lineup information, forming the battle preparation data corresponding to the current virtual battle scenario.
[0032] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the interface of a virtual object library provided in an embodiment of this application. The virtual object library refers to the collection of all deployable virtual objects that a player has unlocked or owned under the current game account, including but not limited to different types of deployable combat units such as hero characters, legion units, and combat vehicles. Each virtual object corresponds to specific type attributes, combat power parameters, and skill characteristics. This virtual object library can change dynamically with the game progress. For example, before a battle, the player may obtain new virtual objects through card draws, recruitment, or leveling up, or some virtual objects may be temporarily unable to be deployed due to damage. Therefore, the virtual object library at the current moment needs to be obtained in real time before each battle preparation to ensure the accuracy and effectiveness of subsequent lineup matching results.
[0033] Furthermore, scene environment information refers to various environmental parameters related to the current virtual battle scene. These parameters can directly affect the skill effects, movement speed, attack range, and terrain utilization efficiency of virtual objects in the battle. The scene environment information in this application can include static environmental parameters such as the scene type and terrain information of the virtual battle scene, as well as dynamic environmental parameters such as the game system's time data and weather data at the current moment. Enemy lineup information refers to the troop configuration of the opposing faction in the current virtual battle scene. In the game system, different virtual battle scenes often have different preset enemy guard lineups, and the specific composition of the enemy lineup may be dynamically adjusted with changes in scene, time, and weather. For example, the same stronghold may be guarded by scattered enemy soldiers during the day, while at night a higher-level elite squad may spawn.
[0034] S120: Analyze the counter-relationship between scene environment information and enemy lineup information to obtain the size of the battle lineup, and match the lineups of each virtual object in the virtual object library according to the size of the battle lineup to obtain the target battle lineup.
[0035] In this step, after obtaining the virtual object library, scene environment information, and enemy lineup information through step S110, the game system can perform a counter-relationship analysis on these two pieces of information to obtain a battle lineup size that is highly adapted to the actual combat needs. Based on this battle lineup size, this application can perform lineup matching on each virtual object in the virtual object library, and select the target battle lineup with the highest overall combat power through the combination effects between different heroes.
[0036] The scale of the battle formation refers to the combination structure of virtual objects that can be deployed in this virtual battle, which can include two dimensions in this application: type and quantity. Since different types and quantities of virtual objects have different counter-effects when facing different types of enemy forces, this application can obtain the scale of the battle formation by analyzing the counter-relationship between scene environment information and enemy formation information.
[0037] Specifically, the game system can first analyze the enemy's lineup information to determine the enemy's troop types, numbers, combat roles, and other troop parameters. Then, combined with scene environment information, it determines the environmental adaptability of the current virtual battle scene to each type of object in the virtual object library. Based on these enemy troop parameters and environmental adaptability, it can then perform a counter-requirement analysis on each troop in the enemy lineup, thereby determining the types and quantities of virtual objects needed to counter the enemy lineup and the current scene environment, forming a battle lineup size that matches the actual combat needs. After determining the battle lineup size, the game system can match the various virtual objects in the virtual object library to the lineup. For example, the game system can first filter virtual objects from the virtual object library that meet the current battle scene's deployment conditions, and then select the strongest virtual object from the same type to deploy, thus forming the target battle lineup.
[0038] Furthermore, when matching specific lineups, the game system can also analyze the combination effects between different virtual objects, such as skill synergy effects, attribute bonus effects, complementary role positioning effects, control and output synergy effects, and damage absorption and healing synergy effects. Thus, while meeting the requirements for the size of the battle lineup, the system can select the group of virtual objects with the highest overall combat power and combination bonuses, thereby further improving the overall combat effectiveness of the target battle lineup and avoiding the problem of insufficient compatibility caused by selecting based solely on the individual combat power of a single virtual object.
[0039] S130: Simulate the deployment of the target's battle lineup based on scene environment information, obtain the optimal formation, and output the target's battle lineup and the optimal formation in the virtual battle scene.
[0040] In this step, after determining the target lineup in step S120, the game system can simulate the formation of the target lineup based on the scene environment information, further analyze the impact of different hero positions on the battle process, and generate the optimal formation arrangement; finally, the target lineup and its optimal formation arrangement can be output in the virtual battle scene, providing players with accurate formation prompts.
[0041] Understandably, in virtual combat, even with identical lineups, different positioning can often produce drastically different results. For example, placing defensive virtual objects at the front of the team can effectively absorb enemy fire, protecting backline teammates for safe damage output; conversely, exposing support virtual objects to enemy range may result in them being focused down at the start, causing the team to lose its sustain. Furthermore, terrain also significantly impacts positioning effectiveness. Placing ranged attack objects on high ground provides range and vision advantages, while placing stealth objects near bushes or obstacles facilitates covert approach to the enemy backline. Therefore, after determining the target lineup, further refined positioning simulation and optimization tailored to the specific battlefield environment has significant tactical value.
[0042] Specifically, the game system can determine the available positions for the target lineup based on the current virtual battle scene's map structure, terrain distribution, obstacle locations, passable areas, and battle area range. It then generates multiple formation arrangements based on the combat positioning, attack range, defensive capabilities, skill range, and skill activation conditions of each virtual object within the target lineup. For each formation arrangement, the game system simulates the battle between the target lineup and the enemy lineup according to preset battle simulation rules, obtaining simulation results corresponding to that candidate formation arrangement. By comparing the simulation results of different formation arrangements, the game system can determine the optimal formation arrangement.
[0043] Furthermore, after determining the target lineup and optimal formation, the game system can display the recommended target lineup and optimal formation in a preset interactive area of the virtual battle scene. (Illustratively, as shown...) Figure 4 As shown, Figure 4 A schematic diagram of an interface for recommending team formations provided in an embodiment of this application; Figure 4In the game, the target battle lineup can be displayed as a list of recommended virtual objects and their key attributes, with core damage dealers or key control targets highlighted. Below the target battle lineup, the optimal formation layout for the virtual battle scene can be indicated, such as displaying the corresponding virtual object's icon, halo mark, or arrow guide at each recommended position, making it easy for players to understand where each virtual object should be deployed. Furthermore, the game system provides a one-click application function; players can confirm and instantly deploy the recommended target battle lineup and optimal formation to the battlefield, eliminating the need for manual drag-and-drop adjustments and greatly improving deployment efficiency.
[0044] For example, in the Valley Fortress scenario, the game system recommends a target lineup of 2 stealth heroes, 2 combat heroes, and 2 support heroes. Because the Valley Fortress's terrain is a narrow valley flanked by high ground on both sides, the game system, after simulating formation deployment, ultimately confirms the optimal formation as follows: one combat hero deployed at the front of the valley passage to engage the enemy head-on; one support hero deployed in the middle of the passage to provide sustain; one stealth hero deployed in the grass on the left high ground to prepare for a flanking attack on the enemy's core; and another stealth hero deployed on the right high ground slope to prepare for a flank attack on the enemy's skirmisher line. The game system can then display this target lineup and optimal formation in a preset interactive area of the virtual battle scene for players to reference when deploying their own troops.
[0045] In the above embodiments, when a battle preparation command is triggered in a virtual battle scene, the player's virtual database, as well as the scene environment information and enemy lineup information of the virtual battle scene, can be obtained to achieve comprehensive perception of battle-related information. Furthermore, the restraint relationship analysis of the scene environment information and enemy lineup information can be performed to obtain a battle lineup size highly adapted to actual battle needs. Based on this battle lineup size, this application can perform lineup matching on various virtual objects in the virtual object library. Through the combination effects between different heroes, the target battle lineup with the highest overall combat power can be selected. Then, based on the scene environment information, the formation of the target battle lineup can be simulated, further analyzing the impact of different hero positions on the battle process to generate the optimal formation arrangement. Finally, the target battle lineup and its optimal formation arrangement can be output in the virtual battle scene, providing players with accurate formation prompts.
[0046] In one embodiment, the process of obtaining the virtual object library, the scene environment information of the virtual battle scene, and the enemy lineup information in step S110 may include: S111: Determine the player's user ID through the battle preparation command and load the virtual object library of the user ID at the current moment.
[0047] S112: Read the scene data corresponding to the virtual battle scene from the preset scene database, and obtain the game system's time data and weather data at the current moment, and generate the scene environment information of the virtual battle scene based on the scene data, time data and weather data.
[0048] S113: Match enemy lineup information with scene environment information from the preset enemy database.
[0049] In this embodiment, after receiving the battle preparation command, the game system can determine the player's user identifier through the battle preparation command, load the virtual object library of the user identifier at the current moment, and at the same time, read the scene data corresponding to the virtual battle scene from the preset scene database, as well as obtain the game system's time data and weather data at the current moment. Based on the scene data, time data, and weather data, the system generates scene environment information of the virtual battle scene, and matches the enemy lineup information corresponding to the scene environment information from the preset enemy database.
[0050] Specifically, the game system can parse the user identifier of the player initiating the battle preparation from the battle preparation command. This user identifier is a unique identity credential that distinguishes different players in the game system, and can be a session ID assigned when the player logs in, a game account ID, or a unique device identifier, etc. After determining the user identifier, the game system accesses the game database or cache server based on the identifier and loads the player's virtual object library at the current moment, which contains all the virtual object data owned by the player. Since the player's virtual object library changes dynamically with the game progress, for example, the player may obtain a new hero character through card recruitment before battle preparation, or improve the level and skills of an existing hero through the development system, or some virtual objects may be in a "damaged and resting" state due to damage in previous battles and thus unable to participate in battle, this application loads the virtual object library at the current moment in real time during each battle preparation, rather than calling expired data from the historical cache, to ensure that the virtual object data used for subsequent lineup matching is accurate.
[0051] In addition, the game system can also obtain environmental information related to the current virtual battle scene, including reading static scene data corresponding to the current virtual battle scene from the preset scene database, and obtaining dynamic scene data such as the current time and weather data from the global state of the game system. Finally, the two are merged to generate complete scene environment information. When reading scene data from the scene database, the game system can index the scene data corresponding to the current virtual battle scene in the preset scene database based on the scene identifier of the current virtual battle scene. This scene data can be used to describe the basic environmental characteristics of the virtual battle scene, such as scene type, terrain structure, battle area range, obstacle distribution, passable areas, special areas, etc. Time data can be maintained by the game's internal day-night cycle system. Common time periods can include dawn, daytime, dusk, night, etc. Different time periods will affect the virtual object's field of vision, concealment judgment, damage coefficient of some skills, and other combat attributes. Weather data can include different types such as sunny, cloudy, light rain, heavy rain, blizzard, fog, sandstorm, etc. Different weather conditions will also have different effects on the battle process. For example, rain will reduce the damage of fire attribute skills and increase the effect of water attribute skills, and fog will shorten the field of vision and attack distance of all units.
[0052] Meanwhile, the game system can also retrieve enemy lineup information corresponding to the scene environment from a pre-set enemy database. It's worth noting that the game system pre-configures enemy databases for different scenes, time periods, and weather conditions to control combat difficulty and enrich the player's combat experience. The enemy database can store multiple enemy lineup templates, each corresponding to a specific combination of scene environment conditions. During matching, the game system can retrieve enemy troop lineups matching the scene environment conditions, along with their battlefield distribution—including the initial spawn location, patrol routes, and alert range of each enemy unit—from the enemy database based on scene data, time data, and weather data. This information is then aggregated to generate complete enemy lineup information.
[0053] For example, after a player triggers the battle preparation command in the Valley Fortress scenario, the game system can first parse the command to determine the player's user identifier as "Player_01," and load a virtual object library consisting of the player's currently owned 15 heroes and 3 regular unit types. Simultaneously, the game system can index the Valley Fortress scenario's scene data from the scene database. (Illustratively, as shown...) Figure 5 As shown, Figure 5 A schematic diagram of an interface for a virtual battle scene provided in an embodiment of this application; Figure 5In the example valley fortress scenario, the specific scenario data is "a city siege battle, the battlefield is a narrow valley flanked by two high grounds, the valley floor passage extends to the fortress wall, there is a collapsed wooden barricade in the middle that can be used as an obstacle, there is grass on the high ground on the left, and a slope on the high ground on the right." The game's global status also indicates the current time is "night" and the weather is "dense fog." Next, the game system can match the corresponding enemy lineup information from the enemy database based on this scenario environment information. The enemy troop type is a mixed configuration of "scattered soldiers" and "elite squads," with a total force of approximately 20 units. 15 scattered soldiers are distributed in the valley entrance area and on the two high ground outposts, while 5 elite squads are concentrated in the core area of the fortress.
[0054] In one embodiment, the process of reading scene data corresponding to the virtual battle scene from a preset scene database in step S112 may include: S1121: Determine the scene type and scene identifier of the virtual battle scene, and retrieve the terrain information corresponding to the scene identifier by indexing the preset scene database.
[0055] S1122: Generate scene data for virtual battle scenarios based on scene type and terrain information.
[0056] In this embodiment, when reading scene data, the game system can first determine the scene type and scene identifier of the virtual battle scene, index the terrain information corresponding to the scene identifier in the preset scene database, and then generate scene data according to the scene type and terrain information of the virtual battle scene.
[0057] Scene type refers to the category of virtual battle scene according to core gameplay and battle form. For example, it can be divided into city siege battle, wild encounter battle, defensive blocking battle, breakout and evacuation battle, etc. Different scene types correspond to different core battle objectives. Scene identifier is the unique ID code that distinguishes each specific battle scene in the game. It is usually bound to a specific area or level in the game map. For example, "Valley_Fort_07" can represent the Valley Fortress scene numbered 07 in the game world map.
[0058] Specifically, the game system can directly read the scene type and scene identifier fields from the battle preparation command, or it can retrieve the corresponding scene type and scene identifier from the game scene configuration table based on the location coordinate information carried in the command after receiving the battle preparation command. After determining the scene type and scene identifier, the game system can use the scene identifier as the index key to perform an index query operation in the scene database, quickly locate and read the terrain information of the corresponding virtual battle scene. The scene database of this application is a pre-configured static data storage module in the game system. It uses the scene identifier as the primary key and stores detailed terrain information for each specific scene. The terrain information here refers to all static data related to the geospatial attributes of the battle scene, which may include the two-dimensional or three-dimensional dimensions of the battlefield map, terrain elevation data, surface cover type and its distribution range, the location and size of obstacles, the area covered by terrain elements that can provide concealment such as grass, the location of terrain elements that can provide advantages in vision and range such as high ground, and the precise division of passable and impassable areas, such as cliffs, rivers, and city walls.
[0059] Furthermore, after acquiring the scene type and terrain information of the virtual battle scenario, the game system can merge the scene type and terrain information to generate the current scene data of the virtual battle scenario. It should be noted that the final generated scene data is the integrated and encapsulated result of scene type and terrain information. Therefore, it can contain scene type category tags, complete terrain information data structures, and derived data extracted from scene type and terrain information that is valuable for subsequent battle analysis. For example, the battlefield depth calculated based on terrain information, the effective area available for deployment, and the number and distribution of key terrain control points.
[0060] In one embodiment, the process of matching enemy lineup information corresponding to scene environment information from a preset enemy database in step S113 may include: S1131: Determine the set of enemy troop types in the virtual battle scene based on the scene type in the scene data.
[0061] S1132: Based on the set of enemy troop types, match the enemy troop formations corresponding to time and weather data from the enemy database.
[0062] S1133: Determine the activity distribution data of the enemy's troop formation based on the terrain information in the scene data.
[0063] S1134: Generate enemy lineup information based on enemy guard lineup and activity distribution data.
[0064] In this embodiment, after generating the scene environment information of the virtual battle scenario, the game system can match the enemy lineup information corresponding to that scene environment information from a preset enemy database. The enemy database is a data storage module pre-configured in the game system to store various enemy force templates. It is configured with corresponding enemy force composition data according to different scene types, time periods, and weather conditions to control the challenge difficulty in different battle scenarios and enrich the player's combat experience.
[0065] Specifically, because the composition of enemy troop types varies significantly across different battle scenarios, the game system can determine the set of enemy troop types for a virtual battle scenario based on the scenario type in the scenario data. For example, in open-field encounters, the enemy is typically composed of bandits or patrols, and their troop type set includes, but is not limited to, scattered and disorganized units; in medium-sized stronghold sieges, the enemy often possesses a certain level of organization and weaponry, and their troop type set includes, but is not limited to, small-scale armed units; in large-scale legion battles, the enemy has a large number of troops and the ability to coordinate operations, and their troop type set includes, but is not limited to, large-scale cluster units; in high-difficulty dungeons or boss battles, the enemy consists of well-equipped elite units, and their troop type set includes, but is not limited to, elite squad units. Here, the game system can use the scenario type tags carried in the scenario data to query the set of enemy troop types corresponding to that scenario type from a preset troop type mapping table, thereby clarifying the range of enemy troop types that may appear in this battle.
[0066] After determining the set of enemy troop types, the game system can match this set with the enemy database to obtain the specific enemy troop formation corresponding to the current time and weather data. The enemy database can configure multiple different enemy troop formation templates for the same set of enemy troop types. The differences between these templates lie in the specific composition, quantity, and attribute strength of the enemy troops, and each template corresponds to different time and weather data. For example, during the day, the number of guards at the same stronghold is smaller and mostly consists of scattered soldiers, while at night, smaller armed groups or elite squads with higher alert levels appear. On clear days, the enemy has a wide field of vision and a higher level of alert, so the enemy troop formation includes more small armed groups, while in blizzard weather, the enemy may huddle behind cover to avoid the cold, and the proportion of scattered soldiers relatively increases. Based on this, the game system can use the set of enemy troop types as the main key and the time period type and weather data as the filtering conditions to perform a matching query in the enemy database to obtain the enemy troop lineup that precisely corresponds to the current environmental conditions. This lineup specifically includes data such as the troop type, quantity, and attributes of each enemy unit.
[0067] Subsequently, the game system can also determine the activity distribution data of the enemy force lineup on the battlefield based on the terrain information in the scene data. In this application, the specific distribution location of the enemy force lineup on the combat scene is not randomly generated, but closely related to the terrain structure. Since terrain information describes the spatial structural characteristics of the combat scene, including the size of the battlefield, changes in terrain elevation, the distribution of obstacles, and the location of special terrain areas, different terrain features can determine different enemy deployment strategies and patrol patterns. For example, in a valley fortress scenario, scattered units are deployed at the valley entrance and high ground on both sides to perform guard duties, small-scale armed units are concentrated at key passage entrances to form a blockade, large-scale clusters are often deployed in open areas, and elite squads are usually deployed in the core area or around the leader to form the last line of defense. Based on this, the game system can determine the initial spawn location, patrol route, warning range, and coordination relationships between different enemy units based on the location of key terrain elements in the terrain information, combined with the functional positioning and force type of each unit in the enemy force lineup, thus forming complete activity distribution data.
[0068] Finally, the game system can integrate enemy troop formation and activity distribution data to generate complete enemy lineup information. The enemy troop formation focuses on describing the compositional dimensions of "what types of troops are there, how many of each, and what their attributes are," while the activity distribution data focuses on describing the spatial behavior dimensions of "where the enemy is located, how they move, and what their alert range is." These two aspects complement each other, together forming a comprehensive depiction of the enemy's combat strength, thus providing an important basis for subsequent formation layout simulation.
[0069] In one embodiment, the process of performing a counter-relationship analysis on the scene environment information and enemy lineup information to obtain the size of the battle lineup in step S120 may include: S121: Analyze the enemy's troop characteristics to obtain the enemy's troop type and number.
[0070] S122: Determine the object type combination that counters the enemy's troop type based on the preset type counter relationship table, and determine the number of virtual objects corresponding to the object type combination based on the number of enemy troops.
[0071] S123: Determine the terrain utilization coefficient of the virtual battle scene based on the scene environment information, and use the terrain utilization coefficient to correct the combination of object types and the number of virtual objects to obtain the scale of the battle lineup.
[0072] In this embodiment, after obtaining the enemy's lineup information, the computer device can perform troop characteristic analysis on the enemy's lineup information to obtain the enemy's troop type and number. Then, according to the preset type restraint relationship table, it determines the object type combination that restrains the enemy's troop type, and determines the number of virtual objects corresponding to the object type combination according to the number of enemy troops. Then, it can determine the terrain utilization coefficient of the virtual battle scene according to the scene environment information, and use the terrain utilization coefficient to correct the object type combination and the number of virtual objects to obtain the scale of the battle lineup.
[0073] Specifically, by analyzing the troop characteristics of the enemy's formation information, the game system can read the enemy troop type and enemy troop quantity fields from the enemy formation information data structure. The enemy troop type is a macro-level classification of the overall combat characteristics of enemy units, which can include at least one type such as scattered troops, small-scale armed forces, large-scale clusters, and elite squads. Different types of enemy troops have different combat characteristics and weaknesses, thus requiring differentiated counter-strategies. The enemy troop quantity records the specific number of enemy units, which is an important reference for determining how many virtual objects our side needs to deploy.
[0074] Furthermore, the game system pre-constructs a type-counter relationship table, which defines the virtual object types that can effectively counter each enemy force type, along with their counter weights. Different enemy force types have fundamentally different combat characteristics, thus requiring completely different object types for countering. For example, weak and poorly organized units can be countered with object types that emphasize burst damage; well-organized units capable of ranged attacks can be countered with object types that combine frontal combat and tactical control capabilities. Therefore, through the type-counter relationship table, the game system can perform counter analysis on enemy force types, matching each enemy force type with a countering object type, thus forming a virtual object type combination. Subsequently, the game system can determine the number of virtual objects corresponding to this combination based on the number of enemy forces, representing the size of the battle formation. Generally, the more enemy forces there are, the more virtual objects need to be deployed to ensure that the player is not at a significant disadvantage in terms of troop numbers.
[0075] Furthermore, after determining the combination of object types and the number of virtual objects to be deployed, the game system can also consider the impact of scene environment factors on the combat effect. Different terrain, weather, and time of day conditions will significantly affect the combat effectiveness of various virtual objects. For example, under certain terrain conditions, specific types of objects can gain additional tactical advantages, while others may be weakened to varying degrees. To this end, the game system quantifies the impact of environmental factors such as current battlefield terrain, weather, and time on the combat effectiveness of virtual objects based on scene environment information, obtaining a terrain utilization coefficient. It should be noted that different object types may have different terrain utilization coefficients under the same environmental conditions. For example, high ground has a beneficial effect on ranged attack virtual objects but a weakening effect on melee charging virtual objects, and nighttime has a beneficial effect on stealth combat virtual objects but a weakening effect on frontal combat virtual objects. Based on this, the game system can use the terrain utilization coefficient to correct the weights of each object type in the initially determined object type combination, and adjust the number of virtual objects for each type accordingly. This ensures that the final battle formation not only counters the enemy's forces in terms of type but also adapts to the current battlefield conditions in terms of quantity, thereby maximizing the combat effectiveness of each virtual object. Finally, the game system summarizes the object type combinations and the number of virtual objects corrected by the terrain utilization coefficient to generate the final battle formation size.
[0076] In one embodiment, the process of determining the combination of object types that counter the enemy force type according to a preset type counter relationship table in step S122 may include: S1221: When the enemy force type is scattered soldiers, determine the object type combination as stealth object and combat object.
[0077] S1222: When the enemy force type is small-scale armed type, determine the object type combination as combat object and technology object.
[0078] S1223: When the enemy force type is a large-scale cluster type, determine the object type combination as combat object, technical object and auxiliary object.
[0079] S1224: When the enemy force type is elite squad, determine the object type combination as stealth object, combat object, and support object.
[0080] In this embodiment, as Figure 6 As shown, Figure 6 A schematic diagram of a type restraint relationship table provided for embodiments of this application; Figure 6In this system, after analyzing the enemy's troop type by analyzing its troop characteristics, the system needs to determine the combination of target types that can effectively counter that enemy troop type based on a preset type counter relationship table. The enemy troop types in this application include, but are not limited to, scattered soldiers, small-scale armed groups, large-scale clusters, and elite squads.
[0081] Specifically, when the enemy force is of the scattered and disorganized type, the game system determines that the combination of object types must include at least stealth-type objects and combat-type objects. Scattered and disorganized forces are typically numerous but individually weak, poorly organized, and have unstable morale. They lack effective coordinated combat capabilities, are scattered across the battlefield, and are easily defeated one by one, leading to a chain reaction of collapse. Therefore, this application can counter them using stealth-type and combat-type objects. Stealth-type objects excel at covert approach and burst damage, eliminating key targets one by one before the enemy can mount an effective response. Combat-type objects, on the other hand, are responsible for drawing enemy fire and eliminating remaining targets. The combination of these two types can quickly dismantle the enemy's combat power before they can mount an effective resistance.
[0082] When the enemy force is a small-scale armed group, the game system determines at least one combination of combat and technical targets. Small-scale armed groups typically possess a certain level of organization and tactical coordination, with relatively uniform equipment levels and potentially long-range firepower units, forming a basic offensive and defensive system. Their weakness lies in their relatively limited tactical options and ability to handle complex battlefield situations. Therefore, this application suggests using combat and technical targets to counter them. Combat targets are responsible for holding the front line and suppressing enemy firepower, creating operational space for technical targets. Technical targets excel at setting traps, using control skills, or dividing the battlefield, and can weaken the enemy's organizational advantage by disrupting their formation and limiting their mobility. The combination of these two can effectively dismantle the tactical system of small-scale armed groups.
[0083] When the enemy force is a large-scale cluster, the game system determines at least three object types: combat objects, technical objects, and support objects. Large-scale clusters are typically characterized by their sheer numbers, coordinated combat capabilities, and sustained combat endurance. They can overwhelm the enemy through sheer numbers, but their weaknesses lie in their relatively slow movement, inflexible formation adjustments, and reliance on the overall combat effectiveness of the cluster. Therefore, this application can counter them using combat objects, technical objects, and support objects. Combat objects construct defensive lines and absorb the main damage, technical objects use area-of-effect control skills to limit the enemy cluster's advance speed and formation deployment, and support objects provide continuous healing and buffs to combat objects to maintain the defensive line's durability. Together, these three constitute a complete tactical system for resisting the impact of large-scale clusters.
[0084] When the enemy force is an elite squad, the game system can determine at least three target types: stealth, combat, and support. Elite squads typically possess extremely high individual combat strength, superior equipment, comprehensive skill sets, and strong teamwork capabilities, with virtually no obvious weaknesses. Conventional head-on confrontations often fail to yield an advantage. Therefore, this application utilizes stealth, combat, and support targets to counter them. Stealth targets are responsible for infiltrating the enemy's backline or launching surprise attacks, prioritizing the weakening of the enemy's core damage dealers or healers, disrupting the elite squad's coordinated rhythm. Combat targets are responsible for engaging the enemy head-on and absorbing the main damage, preventing the enemy's main force from pursuing the stealth targets. Support targets provide continuous sustain and crucial buffs to teammates in the front lines, ensuring the sustained operation of the entire tactical system. The three targets work together to apply pressure on multiple fronts, identifying and amplifying potential time differences or positioning gaps in the elite squad's coordination, thus creating an effective counter.
[0085] Furthermore, if the enemy force is a mixed force type, the game system can match each type of unit within that mixed force type with a corresponding counter-type, deduplicate the corresponding object types for each subtype, and then merge them to obtain a complete object type combination covering all enemy types. For example, when the enemy includes both skirmishers and elite squads, the system will match stealth-type objects and combat-type objects, as well as stealth-type objects, combat-type objects, and support-type objects. After merging and deduplicating, a final object type combination including stealth-type objects, combat-type objects, and support-type objects will be obtained, ensuring effective counter-attack against all types of enemy forces and avoiding situations where a single type is not countered, thus affecting the overall combat effect.
[0086] In one embodiment, such as Figure 7 As shown, Figure 7 A flowchart illustrating a process for determining the number of virtual objects, provided as an embodiment of this application; Figure 7 In step S122, the process of determining the number of virtual objects corresponding to the combination of object types based on the number of enemy troops may include: S1225: Determine the threshold for the number of enemy troops to be deployed in the object type combination, and read the counter weight of each object type in the object type combination.
[0087] S1226: Allocate the number of objects to be deployed according to each restraint weight to obtain the number of objects to be deployed for each object type.
[0088] S1227: Generate the number of virtual objects of each object type combination based on the number of objects of each object type in battle.
[0089] In this embodiment, after obtaining the object type combination, the game system can determine the deployment quantity threshold of the object type combination based on the number of enemy troops, and read the counter weight of each object type in the object type combination. Then, it can allocate the deployment quantity threshold according to each counter weight to obtain the number of deployed objects corresponding to each object type. Finally, the game system can generate the number of virtual objects of the object type combination based on the number of deployed objects of each object type.
[0090] Specifically, the game system can first determine the deployment threshold for object type combinations based on the number of enemy troops. This deployment threshold refers to the total number of virtual objects recommended for deployment to effectively counter the current enemy forces, and it represents the upper limit of subsequent quantity allocation. Here, the game system can map the number of enemy troops to the corresponding deployment threshold based on preset quantity mapping rules. Understandably, as the number of enemy troops increases, the deployment threshold also increases accordingly. However, to maintain the challenge and strategic depth of the battle, the deployment threshold is usually set with a reasonable upper limit to avoid bloated formations and redundant operations due to excessive deployments. For example, when the number of enemy troops is small, the deployment threshold can be set to 4 virtual objects; when the number of enemy troops is medium, the threshold can be set to 8 virtual objects; and when the number of enemy troops is large, the threshold can be set to 12 virtual objects or higher. The specific values can be flexibly configured and dynamically adjusted according to the game's numerical balance requirements.
[0091] After determining the threshold for the number of enemy units to be deployed, the game system can read the counter-weight of each object type in the object type combination. This counter-weight reflects the relative importance of an object type in countering the current enemy force type. For the same enemy force type, different object types have different counter-effects. For example, when dealing with scattered enemy forces, the stealthy object's ability to eliminate them one by one is key, and its counter-weight is higher than that of combat objects mainly used for containment. When dealing with large-scale clusters, the frontal resistance of combat objects and the area control ability of technical objects are equally important, and their counter-weights are relatively close. The counter-weights of each object type can be pre-configured in a type counter-relationship table and stored in conjunction with the object type combination. Therefore, the game system can read all object types together when matching them, forming the object type combination.
[0092] Based on various counter-weights, the game system can proportionally allocate the deployment quantity threshold according to these weights, obtaining the number of deployment objects corresponding to each object type. The allocation method can employ a weighted allocation algorithm: dividing the counter-weight of each object type by the sum of the counter-weights of all object types yields the distribution ratio of that object type in the total deployment quantity. The deployment quantity threshold is then multiplied by this ratio, and rounded to the nearest integer to obtain the number of deployment objects corresponding to that object type. To ensure the accuracy of the deployment quantity, for any discrepancies in the total after rounding, the game system can fine-tune the total according to the counter-weights from highest to lowest, ensuring that the sum of the deployment object counts for each type perfectly matches the deployment quantity threshold. Finally, the game system can generate the number of virtual objects for each object type combination based on the number of deployment objects for each object type. This number of virtual objects is described in key-value pairs as "object type: number of deployments," indicating how many virtual objects of each object type need to be deployed.
[0093] For example, in the Valley Fortress scenario, the enemy force is an elite squad of 20. Therefore, the game system determines the enemy type combination to be stealth, combat, and support, with a minimum deployment threshold of 8 virtual objects. The game system then reads the type advantage / disadvantage weight of each object type against the elite squad from the type advantage / disadvantage table. The advantage / disadvantage weights are 0.4 for stealth objects, 0.35 for combat objects, and 0.25 for support objects. Based on this, the game system can allocate the deployment threshold of 8 according to these advantage / disadvantage weights: stealth objects account for 40% (3.2 objects, rounded up to 3); combat objects account for 35% (2.8 objects, rounded up to 3); and support objects account for 25% (2.0 objects, rounded up to 2). The sum of these three is 8, consistent with the deployment threshold. Ultimately, the number of virtual objects generated by the game system can be displayed as follows: 3 stealth objects, 3 combat objects, and 2 support objects.
[0094] In one embodiment, the process of determining the terrain utilization coefficient of the virtual combat scene based on the scene environment information in step S123 may include: S1231: Perform environmental feature analysis on the scene environment information to obtain scene type, terrain features, weather features, and time features.
[0095] S1232: Determine the basic terrain coefficients corresponding to the terrain features based on the scene type, and determine the correction coefficients of the basic terrain coefficients based on weather and time features.
[0096] S1233: The basic terrain coefficient is corrected using a correction factor to obtain the terrain utilization coefficient of the virtual combat scene.
[0097] In this embodiment, when determining the terrain utilization coefficient of a virtual battle scene, the game system can first analyze the environmental features of the scene environment to obtain the scene type, terrain features, weather features, and time features. Then, based on the scene type, it determines the basic terrain coefficient corresponding to the terrain features, and determines the correction coefficient of the basic terrain coefficient based on the weather features and time features. The correction coefficient can then be used to correct the basic terrain coefficient to obtain the terrain utilization coefficient of the virtual battle scene. This allows for the quantification of the comprehensive impact of different environmental factors on the combat effectiveness of various virtual objects.
[0098] Specifically, the game system can first analyze the scene environment information to extract environmental parameters in four dimensions: scene type, terrain features, weather features, and time features. Scene type can include types such as wilderness encounters and city siege battles; terrain features can include features such as terrain complexity, surface cover type, and obstacle distribution; weather features can include features such as sunny days, light rain, heavy rain, blizzards, dense fog, and sandstorms; and time features can include features such as dawn, daytime, dusk, and night.
[0099] Subsequently, the game system can determine the basic terrain coefficients corresponding to the terrain features based on the scene type. This reflects the fundamental impact of the battle scene terrain itself on the combat effectiveness of various virtual objects within a specific scene type. In this application, different combinations of scene types and terrain features can determine the basic combat effectiveness of different types of virtual objects under those terrain conditions. For example, in a city siege, if the terrain feature is a "narrow valley flanked by high ground on both sides," the high ground terrain provides range and field of view advantages for ranged virtual objects, thus resulting in a higher basic terrain coefficient for ranged virtual objects. Meanwhile, the valley floor passages offer an advantage in limiting the enemy's deployment range for frontal defense objects, thus resulting in a relatively higher basic terrain coefficient for combat objects. However, the passage terrain limits the concealment and mobility space for stealth objects, resulting in a relatively lower basic terrain coefficient for stealth objects. Based on this, the game system can pre-configure the basic terrain coefficient values for various virtual objects for different combinations of scene types and terrain features, forming a terrain coefficient benchmark table. Through this benchmark table, the game system can directly query the basic terrain coefficients corresponding to various virtual objects based on the scene type and terrain features of the virtual game scene.
[0100] After determining the base terrain coefficient, the game system can further determine a correction coefficient for this base terrain coefficient based on weather and time characteristics. This correction coefficient reflects the positive or negative effects of current weather and time conditions on the combat effectiveness of various virtual objects. Understandably, different weather and time conditions will have varying impacts on different types of virtual objects. For example, foggy weather will shorten the field of vision and attack range of all objects, with a particularly noticeable impact on ranged attack objects; therefore, ranged attack objects will have a lower correction coefficient in foggy weather. Nighttime will enhance the stealth capabilities of stealth objects, making it easier for them to approach targets; therefore, stealth objects will have a higher correction coefficient at night. Based on this, the game system can retrieve the corresponding correction coefficient values for various virtual objects from a pre-set correction coefficient mapping table based on weather and time characteristics. This mapping table pre-configures correction coefficients for various virtual objects for different combinations of weather and time characteristics, used for subsequent adjustments to the base terrain coefficient.
[0101] After obtaining the base terrain coefficient and the correction coefficient, the game system can use the correction coefficient to adjust the base terrain coefficient, thus obtaining the final terrain utilization coefficient for various virtual objects in the current combat scenario. The correction method can be to multiply the base terrain coefficient and the correction coefficient, or to use weighted summation or other composite calculation methods, which can be flexibly configured according to the game's numerical balance requirements. After correction, a terrain utilization coefficient greater than 1 indicates that the virtual object of that type receives a beneficial effect in the current environment, a value less than 1 indicates a weakening effect, and a value equal to 1 indicates a neutral environmental impact.
[0102] For example, in the Valley Fortress scenario, the scenario type is "City Siege," the terrain feature is a "narrow valley flanked by high ground on both sides," the weather feature is "dense fog," and the time feature is "night." Based on the scenario type and terrain features, the game system can determine the base terrain coefficients for each type of virtual object. The base terrain coefficient for stealth objects is 0.85, for combat objects it's 1.05, and for support objects it's 1.0. Then, based on the weather feature "dense fog" and the time feature "night," the system can determine the correction coefficients for each type of virtual object. The correction coefficient for stealth objects under night and fog conditions is 1.3, for combat objects it's 0.9, and for support objects it's 0.95. Therefore, multiplying the base terrain coefficients by the correction coefficients yields the final terrain utilization coefficients for each type of virtual object: 1.105 for stealth objects, 0.945 for combat objects, and 0.95 for support objects.
[0103] In one embodiment, the process of adjusting the object type combination and the number of virtual objects using a terrain utilization coefficient to obtain the size of the battle lineup in step S123 may include: S1234: Use the terrain utilization coefficient to correct the restraint weight of each object type in the object type combination, and update the number of virtual objects according to the corrected object type combination.
[0104] S1235: Generate the size of the battle lineup based on the updated combination of object types and the number of virtual objects.
[0105] In this embodiment, after determining the terrain utilization coefficient, the game system can use the terrain utilization coefficient to modify the restraint weight of each object type in the object type combination, and update the number of virtual objects according to the modified object type combination, and then generate the battle lineup size according to the updated object type combination and the number of virtual objects.
[0106] It is understandable that the initial counterweights in the object type combination represent the relative countereffects of each object type against the current enemy force type, without considering environmental factors. However, in actual combat, the actual countereffects of the same object type can vary significantly under different environmental conditions. If environmental factors are not considered for adjustment, it may lead to recommending virtual object types that, while having type counters, are severely weakened in the current environment in specific scenarios.
[0107] Therefore, this application can calculate the terrain utilization coefficient for each object type and multiply it by its initial counter weight to obtain the modified counter weight for that object type under the current environmental conditions. If a type gains an advantage in the current environment, its modified counter weight will be higher than its initial weight, meaning that the priority of that type in the lineup will increase accordingly; conversely, if a type is weakened in the current environment, its modified counter weight will be lower than its initial weight, meaning that the priority of that type in the lineup will decrease accordingly. After modifying the counter weight for each object type, the game system can obtain a modified combination of object types that adapts to the environment.
[0108] Furthermore, after adjusting the counter-weights for each object type, the game system can update the number of virtual objects based on the adjusted object type combinations. Here, the game system redistributes the deployment thresholds based on the adjusted counter-weights for each object type, resulting in the adjusted number of deployable objects for each type. Object types that benefit from the current environment will receive more deployment slots, while those weakened by the environment will have fewer deployment slots, thus making the overall lineup more aligned with the current battlefield conditions. Finally, the game system generates the final deployment lineup size based on the updated object type combinations and the number of virtual objects, serving as a constraint for subsequent lineup matching within the virtual object library.
[0109] In one embodiment, step S120, which involves matching virtual objects in the virtual object library to obtain the target lineup based on the size of the battle lineup, may include: S124: Determine the combination of object types and the number of virtual objects in the size of the battle lineup.
[0110] S125: Filter the virtual object library to obtain candidate virtual objects corresponding to each object type in the combination of object types, and obtain the attribute parameters corresponding to each candidate virtual object.
[0111] S126: Prioritize the candidate virtual objects of each object type according to each attribute parameter, obtain the sorting result, and select virtual objects that match the number of virtual objects according to the sorting result to obtain the target lineup.
[0112] In this embodiment, based on the combination of object types and the number of virtual objects in the battle lineup, the game system can determine the combination of object types and the number of virtual objects in the battle lineup. Then, it can filter out candidate virtual objects corresponding to each object type in the object type combination from the virtual object library, and obtain the attribute parameters corresponding to each candidate virtual object. Then, it can prioritize and sort the candidate virtual objects of each object type according to each attribute parameter to obtain the sorting result. Finally, it can select virtual objects that match the number of virtual objects according to the sorting result to combine them to obtain the target battle lineup.
[0113] Specifically, the game system can first determine the combination of object types and the number of virtual objects in the battle lineup. The object type combination limits the range of virtual object types to be included in this battle, such as "stealth-type objects, combat-type objects, and support-type objects." The number of virtual objects specifies the exact number of each type to be deployed, such as "3 stealth-type objects, 3 combat-type objects, and 2 support-type objects." Then, the game system can perform matching and filtering in the virtual object library to obtain all candidate virtual objects that are available for deployment within the corresponding object type, along with the attribute parameters for each candidate virtual object. These attribute parameters are multi-dimensional quantitative indicators that measure the individual combat ability and battlefield value of a virtual object, including but not limited to level, star rating, skill configuration, skill level, equipment rating, and overall combat power. Based on various attribute parameters, the game system can prioritize candidate virtual objects for each object type. This involves calculating a comprehensive score by combining multiple attribute parameters, such as level, star rating, skill level, and equipment rating, according to preset weights. This yields a comprehensive combat power score for each candidate virtual object, which is then sorted from highest to lowest score to reflect the relative strengths and weaknesses of virtual objects within the same type. After sorting, the game system selects virtual objects matching the number of available virtual objects based on the ranking, and then merges and combines the selected virtual objects from each type to create a complete target battle lineup.
[0114] Furthermore, in some cases, the number of candidate virtual objects for a certain object type may be less than the number required for that type to be deployed in battle. In other words, the player currently possesses insufficient virtual objects of that type to meet the requirements for the size of the battle lineup. In this situation, the game system can prioritize selecting all available candidate virtual objects of that type and, according to preset substitution rules, select suitable virtual objects from other types to fill the gaps. Alternatively, it can reduce the number of virtual objects of that type to be deployed and redistribute the difference to other types to ensure that the final generated target battle lineup is complete and usable in terms of quantity.
[0115] In one embodiment, such as Figure 8 As shown, Figure 8 A flowchart illustrating a troop deployment simulation process provided in this application embodiment; Figure 8 In step S130, the process of simulating the deployment of the target battle lineup based on scene environment information to obtain the optimal formation may include: S131: Determine the terrain features of the scene environment information, and determine multiple candidate deployment areas in the virtual battle scene based on the terrain features.
[0116] S132: Determine the formation position preference of each virtual object in the target lineup, and simulate the object's position in each candidate formation area based on the formation position preference of each virtual object to obtain multiple formation arrangement schemes.
[0117] S133: Obtain the activity distribution data of the enemy's troop formation in the enemy's lineup information, and evaluate the combat effectiveness of each formation arrangement based on the activity distribution data to obtain the evaluation results.
[0118] S134: Based on the evaluation results, select the formation with the highest combat effectiveness from all formation layouts as the optimal formation layout.
[0119] In this embodiment, after obtaining the target battle lineup, the game system can determine multiple candidate deployment areas in the virtual battle scene based on the terrain features in the scene environment information. At the same time, it can determine the formation position preference of each virtual object in the target battle lineup. Thus, based on the formation position preference of each virtual object, it can simulate the object's position in each candidate deployment area to obtain multiple formation layout schemes. Subsequently, the game system can obtain the activity distribution data of the enemy's troop lineup in the enemy lineup information, and evaluate the combat effectiveness of each formation layout scheme based on the activity distribution data to obtain the evaluation results. Then, based on the evaluation results, it can select the scheme with the highest combat effectiveness from each formation layout scheme as the optimal formation layout.
[0120] Specifically, based on the terrain features in the scene environment information, the game system can select multiple candidate deployment areas from the entire virtual battle scene and label each area with its tactical attribute tags, such as "high ground - suitable for ranged output", "grassland - suitable for stealth and concealment", "passage - suitable for melee blocking", and "open ground - suitable for frontal formation". The granularity of the candidate deployment areas can be flexibly configured according to the game's performance and accuracy requirements. For example, a coarser-grained area division can be used in mobile games to save computing resources, while a finer-grained division of positions can be used in PC or console games to improve deployment accuracy. There are no restrictions here.
[0121] After determining the candidate deployment areas, the game system can determine the formation position preference of each virtual object in the target lineup. This formation position preference mainly represents the degree to which a virtual object adapts to different positions on the battlefield based on its own type, skill characteristics, and combat role. For example, combat-type objects prefer to be located at the front of the team or at the forefront of the battle line to engage the enemy in close combat and absorb damage; stealth-type objects prefer to be located on the flanks of the battlefield or in areas with cover to approach and infiltrate the enemy's backline covertly; support-type objects prefer to be located in the middle and rear of the team, so as to cover teammates in front and not be easily targeted by the enemy; and technical-type objects prefer to be located in complex terrain where traps or control facilities can be placed. Based on the formation position preferences of each virtual object, the game system can simulate object positioning in each candidate deployment area and generate multiple feasible formation layout schemes.
[0122] Subsequently, the game system can obtain the activity distribution data of the enemy's troop formation from the enemy lineup information. Based on the enemy's position and movement patterns in the activity distribution data, it simulates and analyzes the relative spatial relationship between each virtual object and the enemy's troop formation in the proposed plan. For example, it considers whether the virtual object is within the enemy's alert range, whether it occupies a favorable high ground, whether it can use obstacles for cover, and whether it is within the skill range of teammates. This comprehensive assessment evaluates the combat effectiveness of each plan in actual combat. Through the evaluation results of various formation arrangements, the game system can select the plan with the highest combat effectiveness as the optimal formation arrangement for this virtual battle scenario. This optimal formation arrangement clearly defines the specific position of each virtual object in the target's combat formation on the battlefield. Therefore, players can directly deploy virtual objects to designated positions according to this arrangement to achieve the best tactical effect, thereby reducing the threshold for player decision-making and operational complexity.
[0123] In one embodiment, the process of evaluating the combat effectiveness of each formation arrangement scheme based on activity distribution data and obtaining the evaluation results in step S133 may include: S1331: Determine the performance evaluation weight of each virtual object in the target lineup.
[0124] S1332: For each formation layout scheme, determine the distance parameters, angle parameters, and terrain obstruction parameters between each virtual object and the enemy force formation based on the activity distribution data. Then, calculate the weighted distance parameters, angle parameters, and terrain obstruction parameters corresponding to each virtual object based on the various effectiveness evaluation weights to obtain the combat effectiveness score of the formation layout scheme.
[0125] S1333: Generates evaluation results based on the combat effectiveness scores of each formation arrangement.
[0126] In this embodiment, during combat effectiveness evaluation, the game system can first determine the effectiveness evaluation weight of each virtual object in the target's battle formation. Then, for each formation arrangement, based on the activity distribution data, it determines the distance parameters, angle parameters, and terrain obstruction parameters between each virtual object and the enemy's troop formation. Based on each effectiveness evaluation weight, it performs a weighted calculation on the distance parameters, angle parameters, and terrain obstruction parameters corresponding to each virtual object to obtain the combat effectiveness score of the formation arrangement. Based on the combat effectiveness scores of each formation arrangement, the game system can generate the evaluation results.
[0127] The effectiveness evaluation weight reflects the importance of a virtual object to the overall outcome of a battle, and is typically related to the object's rarity, level, suitability for the current battle scenario, and its core function within the team composition. For example, core damage dealers in a team often have a high effectiveness evaluation weight because their survival and damage output directly determine the speed of battle progression. Support objects, while not directly causing damage, provide healing and buffs that ensure the team's continued combat, and thus also have a high weight. Virtual objects with relatively simple functions or high substitutability have relatively low effectiveness evaluation weights. The effectiveness evaluation weights in this application can be pre-configured in the attribute data of the virtual objects, or they can be dynamically calculated based on the current enemy lineup and scenario environment. For example, when the enemy primarily uses physical damage, the weight of support objects with physical defense buffs will increase accordingly, without any restrictions.
[0128] Specifically, during combat effectiveness evaluation, the game system can determine the distance, angle, and terrain obstruction parameters between each virtual object and the enemy force based on the enemy's troop distribution data. It then calculates the spatial relationship characteristics of each virtual object relative to the enemy force. The distance parameter reflects the spatial distance between the virtual object and the enemy force, the angle parameter reflects the directional angle of the virtual object relative to the enemy force, and the terrain obstruction parameter reflects the presence of terrain obstacles between the virtual object and the enemy force. Based on the calculation of the spatial relationship characteristics between each virtual object and the enemy force, the game system obtains the individual effectiveness score for each virtual object in its deployment position. Multiplying the individual effectiveness score by its effectiveness evaluation weight yields the weighted contribution value of the virtual object. Finally, the game system sums the weighted contribution values of all virtual objects to obtain the overall combat effectiveness score of the formation. It should be noted that a higher combat effectiveness score indicates that the formation can exert stronger overall combat power under the current battlefield conditions.
[0129] The formation arrangement device for the virtual lineup provided in the embodiments of this application will be described below. The formation arrangement device for the virtual lineup described below can be referred to in correspondence with the formation arrangement method for the virtual lineup described above.
[0130] In one embodiment, such as Figure 9 As shown, Figure 9 This application provides a schematic diagram of a virtual formation arrangement device according to an embodiment of the present application; this application also provides a virtual formation arrangement device, including a data acquisition module 210, a formation determination module 220, and a formation arrangement module 230, specifically including the following: The data acquisition module 210 is used to respond to the battle preparation command triggered in the virtual battle scene, and to acquire the virtual object library, scene environment information and enemy lineup information of the virtual battle scene.
[0131] The lineup determination module 220 is used to analyze the counter-relationship between scene environment information and enemy lineup information to obtain the size of the battle lineup, and to match the lineups of each virtual object in the virtual object library according to the size of the battle lineup to obtain the target battle lineup.
[0132] The formation arrangement module 230 is used to simulate the formation arrangement of the target's battle lineup based on the scene environment information, obtain the optimal formation arrangement, and output the target's battle lineup and the optimal formation arrangement in the virtual battle scene.
[0133] In the above embodiments, when a battle preparation command is triggered in a virtual battle scene, the player's current virtual object library, as well as the scene environment information and enemy lineup information of the virtual battle scene, can be obtained to achieve comprehensive perception of battle-related information. Furthermore, the restraint relationship analysis of the scene environment information and enemy lineup information can be performed to obtain a battle lineup size highly adapted to actual battle needs. Based on this battle lineup size, this application can perform lineup matching on various virtual objects in the virtual object library. Through the combination effects between different heroes, the target battle lineup with the highest overall combat power can be selected. Then, based on the scene environment information, the formation of the target battle lineup can be simulated, further analyzing the impact of different hero positions on the battle process to generate the optimal formation arrangement. Finally, the target battle lineup and its optimal formation arrangement can be displayed together in a preset interactive area of the virtual battle scene, providing players with accurate formation prompts.
[0134] In one embodiment, the data acquisition module 210 may include: The Object Library Loading Submodule is used to determine the player's user identifier through the battle preparation command and load the virtual object library of the user identifier at the current moment.
[0135] The environmental information acquisition submodule is used to read scene data corresponding to the virtual battle scene from the preset scene database, as well as to obtain the game system's time data and weather data at the current moment, and generate scene environment information of the virtual battle scene based on the scene data, time data and weather data.
[0136] The lineup information acquisition submodule is used to match enemy lineup information with scene environment information from a preset enemy database.
[0137] In one embodiment, the environmental information acquisition submodule may include: The information indexing unit is used to determine the scene type and scene identifier of the virtual battle scene, and to index the terrain information corresponding to the scene identifier in the preset scene database.
[0138] The data generation unit is used to generate scene data for virtual combat scenarios based on scene type and terrain information.
[0139] In one embodiment, the lineup information acquisition submodule may include: The set determination unit is used to determine the set of enemy troop types in the virtual combat scenario based on the scenario type in the scenario data.
[0140] The formation matching unit is used to match enemy formations with time and weather data from the enemy database based on the set of enemy force types.
[0141] The distribution determination unit is used to determine the activity distribution data of the enemy's troop formation based on the terrain information in the scene data.
[0142] The information generation unit is used to generate enemy lineup information based on enemy defense lineup and activity distribution data.
[0143] In one embodiment, the lineup determination module 220 may include: The troop strength feature analysis submodule is used to analyze the troop strength features of the enemy's formation information to obtain the enemy's troop strength type and quantity.
[0144] The combination quantity determination submodule is used to determine the combination of object types that counter the enemy's troop type based on a preset type counter relationship table, and to determine the number of virtual objects corresponding to the combination of object types based on the number of enemy troops.
[0145] The lineup size determination submodule is used to determine the terrain utilization coefficient of the virtual battle scene based on the scene environment information, and to use the terrain utilization coefficient to correct the combination of object types and the number of virtual objects to obtain the lineup size.
[0146] In one embodiment, the combination quantity determination submodule may include: The first combination determination unit is used to determine the object type combination as stealth object and combat object when the enemy force type is scattered soldiers.
[0147] The second combination determination unit is used to determine the object type combination as combat object and technical object when the enemy force type is small-scale armed type.
[0148] The third combination determination unit is used to determine the object type combination as combat object, technical object, and auxiliary object when the enemy force type is a large-scale cluster type.
[0149] The fourth combination determination unit is used to determine the object type combination as stealth object, combat object, and support object when the enemy force type is elite squad.
[0150] In one embodiment, the combination quantity determination submodule may further include: The weight reading unit is used to determine the threshold for the number of enemy troops to be deployed in the object type combination, and to read the counter weight of each object type in the object type combination.
[0151] The number allocation unit is used to allocate the number of objects to be deployed according to each restraint weight, so as to obtain the number of objects to be deployed for each object type.
[0152] The quantity determination unit is used to generate the number of virtual objects of each object type combination based on the number of objects of each object type in battle.
[0153] In one embodiment, the lineup size determination submodule may include: The environmental feature analysis unit is used to analyze the environmental features of the scene to obtain scene type, terrain features, weather features and time features.
[0154] The correction coefficient determination unit is used to determine the basic terrain coefficient corresponding to the terrain features based on the scene type, and to determine the correction coefficient of the basic terrain coefficient based on weather features and time features.
[0155] The terrain coefficient correction unit is used to correct the basic terrain coefficient using a correction coefficient to obtain the terrain utilization coefficient of the virtual combat scene.
[0156] In one embodiment, the lineup size determination submodule may further include: The restraint weight correction unit is used to correct the restraint weight of each object type in the object type combination using the terrain utilization coefficient, and update the number of virtual objects according to the corrected object type combination.
[0157] The lineup size generation unit is used to generate the size of the battle lineup based on the updated combination of object types and the number of virtual objects.
[0158] In one embodiment, the lineup determination module 220 may further include: The scale parameter determination submodule is used to determine the combination of object types and the number of virtual objects in the size of the battle lineup.
[0159] The candidate object filtering submodule is used to filter candidate virtual objects in the virtual object library for each object type in the combination of object types, and to obtain the attribute parameters corresponding to each candidate virtual object.
[0160] The object selection submodule is used to prioritize candidate virtual objects of each object type according to various attribute parameters, obtain the sorting results, and select virtual objects that match the number of virtual objects according to the sorting results to form the target lineup.
[0161] In one embodiment, the array arrangement module 230 may include: The candidate region determination submodule is used to determine the terrain features of the scene environment information and determine multiple candidate deployment areas in the virtual battle scene based on the terrain features.
[0162] The scheme generation submodule is used to determine the formation position preference of each virtual object in the target lineup, and to simulate the object's position in each candidate formation area based on the formation position preference of each virtual object, so as to obtain multiple formation arrangement schemes.
[0163] The effectiveness evaluation submodule is used to obtain the activity distribution data of the enemy's troop formation in the enemy's lineup information, and to evaluate the combat effectiveness of each formation arrangement based on the activity distribution data, and obtain the evaluation results.
[0164] The optimal solution selection submodule is used to select the most effective formation from various formation layout schemes based on the evaluation results, and then use it as the optimal formation layout.
[0165] In one embodiment, the performance evaluation submodule may include: The weighting determination unit is used to determine the performance evaluation weight of each virtual object in the target lineup.
[0166] The effectiveness calculation unit is used to determine the distance parameters, angle parameters, and terrain obstruction parameters between each virtual object and the enemy force formation in each formation arrangement scheme based on the activity distribution data. It also performs weighted calculations on the distance parameters, angle parameters, and terrain obstruction parameters corresponding to each virtual object based on various effectiveness evaluation weights to obtain the combat effectiveness score of the formation arrangement scheme.
[0167] The results generation unit is used to generate evaluation results based on the combat effectiveness scores of each formation arrangement scheme.
[0168] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the virtual formation arrangement method as described in any of the above embodiments.
[0169] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the virtual formation arrangement method as described in any of the above embodiments.
[0170] Indicatively, such as Figure 10 As shown, Figure 10 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 10 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the formation arrangement method of the virtual lineup in any of the above embodiments.
[0171] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0172] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0173] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0174] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0175] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for arranging the formation of a virtual lineup, characterized in that, The method includes: In response to combat preparation commands triggered in a virtual combat scenario, the system acquires a virtual object library, as well as scenario environment information and enemy lineup information for the virtual combat scenario. The scene environment information and the enemy lineup information are analyzed for their counter-relationship to obtain the size of the battle lineup. Based on the size of the battle lineup, the lineups of each virtual object in the virtual object library are matched to obtain the target battle lineup. Based on the scenario environment information, the target battle lineup is simulated for deployment to obtain the optimal formation, and the target battle lineup and the optimal formation are output in the virtual battle scenario.
2. The virtual formation arrangement method according to claim 1, characterized in that, The acquisition of the virtual object library and the scene environment information and enemy lineup information of the virtual battle scene includes: The player's user identifier is determined by the combat preparation command, and the virtual object library of the user identifier at the current moment is loaded. The system reads scene data corresponding to the virtual battle scene from a preset scene database, and obtains the time data and weather data of the game system at the current moment, and generates scene environment information of the virtual battle scene based on the scene data, the time data and the weather data. The enemy lineup information corresponding to the scene environment information is obtained by matching the preset enemy database.
3. The virtual formation arrangement method according to claim 2, characterized in that, The step of reading scene data corresponding to the virtual battle scene from a preset scene database includes: The scene type and scene identifier of the virtual battle scene are determined, and the terrain information corresponding to the scene identifier is obtained by indexing the preset scene database; The scene data of the virtual battle scene is generated based on the scene type and the terrain information.
4. The virtual formation arrangement method according to claim 2, characterized in that, The step of matching enemy lineup information corresponding to the scene environment information from a preset enemy database includes: The set of enemy troop types in the virtual battle scene is determined based on the scene type in the scene data; Based on the set of enemy troop types, the enemy troop formation corresponding to the time data and the weather data is obtained by matching from the enemy database; The activity distribution data of the enemy troop formation is determined based on the terrain information in the scene data; Enemy lineup information is generated based on the enemy's defensive lineup and the activity distribution data.
5. The virtual formation arrangement method according to claim 1, characterized in that, The analysis of the counter-relationship between the scene environment information and the enemy lineup information to obtain the size of the battle lineup includes: The enemy formation information is analyzed for troop characteristics to obtain the enemy troop type and the number of enemy troops. The object type combination that counters the enemy force type is determined according to the preset type counter relationship table, and the number of virtual objects corresponding to the object type combination is determined according to the number of enemy forces. The terrain utilization coefficient of the virtual battle scene is determined based on the scene environment information, and the terrain utilization coefficient is used to correct the object type combination and the number of virtual objects to obtain the scale of the battle lineup.
6. The virtual formation arrangement method according to claim 5, characterized in that, The step of determining the combination of object types that counter the enemy force type according to a preset type counter relationship table includes: When the enemy force type is a scattered and disorganized type, the object type combination is determined to be a stealth object and a combat object; When the enemy force type is a small-scale armed type, the object type combination is determined to be a combat object and a technology object; When the enemy force type is a large-scale cluster type, the object type combination is determined to be a combat object, a technical object, and an auxiliary object; When the enemy force type is an elite squad, the object type combination is determined to be a stealth object, a combat object, and a support object.
7. The virtual formation arrangement method according to claim 5, characterized in that, Determining the number of virtual objects corresponding to the object type combination based on the enemy troop strength includes: The threshold for the number of objects to be deployed in the combination of object types is determined based on the number of enemy troops, and the counterweight of each object type in the combination of object types is read. The number of objects to be deployed is allocated according to each restraint weight to obtain the number of objects to be deployed for each object type. The number of virtual objects for the combination of object types is generated based on the number of objects of each object type in battle.
8. The virtual formation arrangement method according to claim 5, characterized in that, Determining the terrain utilization coefficient of the virtual combat scene based on the scene environment information includes: The environmental information of the scene is analyzed to obtain scene type, terrain features, weather features and time features; Based on the scene type, a basic terrain coefficient corresponding to the terrain feature is determined, and a correction coefficient for the basic terrain coefficient is determined based on the weather feature and the time feature; The base terrain coefficient is corrected using the correction coefficient to obtain the terrain utilization coefficient of the virtual battle scene.
9. The virtual formation arrangement method according to claim 5, characterized in that, The process of using the terrain utilization coefficient to adjust the object type combination and the number of virtual objects to obtain the battle lineup size includes: The terrain utilization coefficient is used to correct the restraint weight of each object type in the object type combination, and the number of virtual objects is updated according to the corrected object type combination. The size of the battle lineup is generated based on the updated combination of object types and the number of virtual objects.
10. The virtual formation arrangement method according to claim 1, characterized in that, The step of matching virtual objects in the virtual object library to obtain the target battle lineup based on the size of the battle lineup includes: Determine the combination of object types and the number of virtual objects in the aforementioned battle lineup size; Candidate virtual objects corresponding to each object type in the combination of object types are obtained from the virtual object library, and the attribute parameters corresponding to each candidate virtual object are obtained. Candidate virtual objects of each object type are prioritized according to their respective attribute parameters to obtain a sorting result. Virtual objects matching the number of virtual objects are selected according to the sorting result and combined to obtain the target battle lineup.
11. The virtual formation arrangement method according to claim 1, characterized in that, The step of simulating the deployment of the target battle lineup based on the scenario environment information to obtain the optimal formation includes: The terrain features of the scene environment information are determined, and multiple candidate deployment areas in the virtual battle scene are determined based on the terrain features; Determine the formation position preference of each virtual object in the target lineup, and simulate the object's position in each candidate formation area based on the formation position preference of each virtual object to obtain multiple formation arrangement schemes; Obtain the activity distribution data of the enemy troop formation in the enemy formation information, and evaluate the combat effectiveness of each formation arrangement based on the activity distribution data to obtain the evaluation results; Based on the evaluation results, the formation with the highest combat effectiveness is selected from all formation layout schemes as the optimal formation layout.
12. The virtual formation arrangement method according to claim 11, characterized in that, The combat effectiveness evaluation of each formation arrangement scheme based on the activity distribution data is obtained, including: Determine the performance evaluation weight of each virtual object in the target battle lineup; For each formation arrangement scheme, the distance parameters, angle parameters, and terrain obstruction parameters between each virtual object in the formation arrangement scheme and the enemy force formation are determined based on the activity distribution data. The distance parameters, angle parameters, and terrain obstruction parameters corresponding to each virtual object are weighted and calculated based on each effectiveness evaluation weight to obtain the combat effectiveness score of the formation arrangement scheme. Evaluation results are generated based on the combat effectiveness scores of each formation arrangement.
13. A virtual formation arrangement device, characterized in that, include: The data acquisition module is used to respond to the battle preparation command triggered in the virtual battle scene, and to acquire the virtual object library, as well as the scene environment information and enemy lineup information of the virtual battle scene. The lineup determination module is used to analyze the counter-relationship between the scene environment information and the enemy lineup information to obtain the size of the battle lineup, and to perform lineup matching on each virtual object in the virtual object library according to the size of the battle lineup to obtain the target battle lineup. The formation arrangement module is used to simulate the formation arrangement of the target battle lineup based on the scene environment information, obtain the optimal formation arrangement, and output the target battle lineup and the optimal formation arrangement in the virtual battle scene.
14. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the formation arrangement method of the virtual lineup as described in any one of claims 1 to 12.
15. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions that, when executed by the one or more processors, perform the steps of the formation arrangement method for the virtual lineup as described in any one of claims 1 to 12.