New AI Teams Selector - #810
Open
FS-21 wants to merge 92 commits into
Open
Conversation
If set this option.
And removed comments and commented old code
|
Nightly build for this pull request:
|
Fixed all the bugs related to the Teams categorization, now all the AI teams go to the right category depending the members of the Taskforce. Added 2 new boolean tags for overwriting the categorization of some units: - ConsideredNaval - ConsideredVehicle
Now AI will be able to unlock secret lab units and use them in Teams. Other bugfixes and improvements.
Point to the latest YRpp that can compile...
Trigger conditions 18 and 19 for checking Bridges status
Starkku
force-pushed
the
develop
branch
2 times, most recently
from
June 3, 2023 10:14
aae92fd to
a32076e
Compare
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
- Prerequisite tags were cleaned after a change of map/restart. - More laxed when adding the AI triggers in their respective houses arrays. The main Team's selection loop will decide if the trigger is currently valid. - Some code tweaks & additional log lines in the AI selection loop. - Now AI teams are directly discarded from the selection loop if doesn't exist the required factories if Autocreate=yes
…n PrerequisitesMet
…prerequisites and case-insensitive matching
… allocations, and use O(1) condition checks
…redundant candidate vectors
…non-matching category candidate evaluation
… proportional category rolling, and integer side comparison
…e, and optimized VIP checks
…are reachable from factories
…targets are reachable from factories" This reverts commit 48320ef.
…ynamic max weight mode
Contributor
Author
|
Reworked & optimized, updated docs and first post |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More details in the documentation:
NewTeamsSelector.MergeUnclassifiedCategoryWithcan be used for merging the mixed category (units are from different categories) into one of the main categories.Autocreate=yesAI will care about all units prerequisites so if the house's tech tree is incomplete for the trigger it gets discarded. It understands Ares tags likePrerequisite.RequiredTheaters,Prerequisite.Negative,Prerequisite.Lists&Generic prerequisitessection.NewTeamsSelector.VIPWeightcontrols the VIP trigger threshold. If a trigger meets this threshold, AI discards non-VIP candidates and picks exclusively from VIP triggers with equal chance (categories are bypassed in VIP mode).5000.0(vanilla behavior).NewTeamsSelector.VIPWeight=-1enables dynamic VIP mode where each trigger becomes VIP when itsWeight_Current >= Weight_Maximum.NewTeamsSelector.VIPWeight=0disables VIP mode completely.ConsideredVehicleandConsideredNavalboolean tags.In
rulesmd.ini:ANDcomparator so each object must obey the same comparationsANDcomparator so each object must obey the same comparationsANDcomparator so each object must obey the same comparationsANDcomparator so each object must obey the same comparationsBridgeRepairHut=yeslinked with destroyed bridgesBridgeRepairHut=yeslinked with undamaged bridges[AITargetTypes]. The index of the list is written in hexadecimal and in little endian format. The value must be written at the end of the trigger:00000000000000000000000000000000000000000000000000000000AABBCCDDFor example: list 0 is written 00 (put it in AA), list 1 is written 01 (put it in AA), list 10 is written 0A (put it in AA), 255 is 0xFF (put it in AA) and 256 is 0x0001 (put it in AABB), etc.
AITargetTypesindex# values are obtained in the newAITargetTypessection that must be declared inrulesmd.ini:In
rulesmd.ini: