-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable disguised target evaluation behaviour in new ScriptType attack actions #1169
base: develop
Are you sure you want to change the base?
Customizable disguised target evaluation behaviour in new ScriptType attack actions #1169
Conversation
Customizable disguised target evaluation behaviour in new ScriptType attack actions. - By default, any unit with `DetectDisguise=yes` seeking targets via new [attack team missions introduced in Phobos](AI-Scripting-and-Mapping.md#10000-10049-attack-actions) always detects the disguised units. The probability to detect a disguised object now can be customized. - `DetectDisguise.Percent` values represent the probabilities in hard, medium & easy difficulty, in that order. In rulesmd.ini: [SOMETECHNO] ; TechnoType DetectDisguise.Percent=1.0, 1.0, 1.0 ; float, percents or absolute
Similar behaviour of the YR tag From rulesmd.ini comments:
So 6 units in a AI team capable to detect disguised units with the new |
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. |
@@ -182,6 +182,8 @@ class TechnoTypeExt | |||
Nullable<Leptons> SpawnDistanceFromTarget; | |||
Nullable<int> SpawnHeight; | |||
|
|||
ValueableVector<double> DetectDisguise_Percent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is only use based on AIDifficulty
right ?
mean it is only require 3 items at max , please use PartialVector3D
instead of ValueableVector
.
@@ -399,7 +413,7 @@ void ScriptExt::Mission_Attack(TeamClass* pTeam, bool repeatAction = true, int c | |||
} | |||
} | |||
|
|||
TechnoClass* ScriptExt::GreatestThreat(TechnoClass* pTechno, int method, int calcThreatMode = 0, HouseClass* onlyTargetThisHouseEnemy = nullptr, int attackAITargetType = -1, int idxAITargetTypeItem = -1, bool agentMode = false) | |||
TechnoClass* ScriptExt::GreatestThreat(TechnoClass* pTechno, int method, int calcThreatMode = 0, HouseClass* onlyTargetThisHouseEnemy = nullptr, int attackAITargetType = -1, int idxAITargetTypeItem = -1, bool agentMode = false, std::vector<double> disguiseDetection = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass the value of PartialVector3D
as const reference if no modification required , to avoid unnessesary copy
.
detectionValue = pTechnoData->DetectDisguise_Percent[AIDifficulty]; | ||
|
||
detectionValue = detectionValue > 0.0 ? detectionValue : 1.0; | ||
disguiseDetection.push_back(detectionValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont do this every time function called, fix this on INIReading
moment instead.
Warning Rate Limit Exceeded@FS-21 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 29 minutes and 28 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
DetectDisguise=yes
seeking targets via new attack team missions introduced in Phobos always detects the disguised units (100% probability). The probability to detect a disguised object now can be customized.DetectDisguise.Percent
values represent the probabilities in hard, medium & easy difficulty, in that order.In rulesmd.ini:
[SOMETECHNO] ; TechnoType
DetectDisguise.Percent=1.0, 1.0, 1.0 ; float, percents or absolute