Skip to content
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

How do i find the AI difficulty? #104

Open
Bast75 opened this issue Sep 11, 2020 · 1 comment
Open

How do i find the AI difficulty? #104

Bast75 opened this issue Sep 11, 2020 · 1 comment

Comments

@Bast75
Copy link

Bast75 commented Sep 11, 2020

How do i find the difficulty the AI is using? Like Easy, Medium or Hard.
I want to give the easy AI other build limits vs the Medium or Hard AI.
Someting like: easy AI=1 warfactory, medium AI=3 warfactories, hard AI=8 warfactories

I placed this in HOUSE.CPP:

bool DoDifficultyTest = true;
if (DoDifficultyTest && !IsHuman) {
int DifficultyTestLimit = 1; //does this work for each AI seperate?
switch (<<<<what do i need to use here?>>>>) {
case DIFF_EASY:
DifficultyTestLimit = 1;
break;
case DIFF_NORMAL:
DifficultyTestLimit = 4;
break;
case DIFF_HARD:
DifficultyTestLimit = 10;
break;
}
if (BQuantity[STRUCT_POWER] < DifficultyTestLimit ) {
b = &BuildingTypeClass::As_Reference(STRUCT_POWER);
if (Can_Build(b, ActLike)) {
choiceptr = BuildChoice.Alloc();
*choiceptr = BuildChoiceClass(URGENCY_HIGH, b->Type);
}
}
}

I tried:
Difficulty
Result: AI keeps building 4 in easy, medium & hard.

PlayerPtr->Difficulty
Result: AI keeps building 4 in easy, medium & hard.

Anyone a tip for me?

@Bast75
Copy link
Author

Bast75 commented Dec 22, 2020

Nobody?

Also tried cdiffculty
Still no idea on how to dectect AI difficulty mode....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant