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

[AI] Add CriticalError fucntion to AI interface #4690

Open
Cjkjvfnby opened this issue Aug 18, 2023 · 2 comments
Open

[AI] Add CriticalError fucntion to AI interface #4690

Cjkjvfnby opened this issue Aug 18, 2023 · 2 comments
Labels
category:feature The Issue/PR describes or implements a new game feature. component:AI The Issue/PR deals with the Python AI decision making code or affects it.

Comments

@Cjkjvfnby
Copy link
Contributor

When this method should be used by AI developers:
At the beginning of the AI initialization to ensure AI consistency with the game content.

What this command will do:

  • It will show a notification to the user (popup windows) and allow them to continue the game or exit the main menu.
  • It will fail to cause test build failure (where we execute AI)

Cases:

As an alternative, we might have a function like startNewGame that will be called before startNewGame and resumeLoadedGame`.

@Cjkjvfnby Cjkjvfnby added category:feature The Issue/PR describes or implements a new game feature. component:AI The Issue/PR deals with the Python AI decision making code or affects it. labels Aug 18, 2023
@geoffthemedio
Copy link
Member

we might have a function like startNewGame that will be called before startNewGame and resumeLoadedGame`.

I don't understand what that means. A function that will be called before itself?

What this command will do:
* It will show a notification to the user (popup windows) and allow them to continue the game or exit the main menu.

So similar to the existing error popup when universe generation has an error?
universe gen error

* It will fail to cause test build failure (where we execute AI)

Could you clarify that double negative? It will do nothing in test builds?

@Cjkjvfnby
Copy link
Contributor Author

I don't understand what that means. A function that will be called before itself?

A new global function that is called by C++. It will be called before calling StartNewGame and LoadSave.

on Python side it will have content compatibility checks. If this function fails, the message will be shown.

So similar to the existing error popup when universe generation has an error?

Yes, similar to that, but with the option to pass the message.

Could you clarify that double negative? It will do nothing in test builds?

Done.
When CI tests are run and this function is failed, CI build should fail too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:feature The Issue/PR describes or implements a new game feature. component:AI The Issue/PR deals with the Python AI decision making code or affects it.
Projects
None yet
Development

No branches or pull requests

2 participants