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 cannot buy unbuildable constructions #10581

Open
1 task done
SeventhM opened this issue Nov 25, 2023 · 5 comments
Open
1 task done

AI cannot buy unbuildable constructions #10581

SeventhM opened this issue Nov 25, 2023 · 5 comments
Labels

Comments

@SeventhM
Copy link
Collaborator

SeventhM commented Nov 25, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Game Version

4.9.2

Describe the bug

Reporting a bug someone on discord noticed:

AIs cannot buy units or buildings that are purchasable via a stat if it has the unbuildable unique. This is because the AI cannot purchase objects unless it is currently building it. See here. Funny side effect of how the function is written is it can only ever purchase one object a turn per city. Also it cannot purchase with anything except gold unless you talk about hardcoded unit categories

Seems like the AI purchase logic in general needs fixing up

Steps to Reproduce

N/A

Expected Behavior

I will pretend the answer is "N/A"

Screenshots

No response

Link to save file

No response

Operating System

Android

Additional Information

No response

@SomeTroglodyte
Copy link
Collaborator

I will pretend the answer is 42

Good catch - except I expect most of the original coders were aware they were building better-than-nothing limited approaches, only the big picture got lost...?

Anyway, go ahead, we know you're a proficient coder.

@SeventhM
Copy link
Collaborator Author

we know you're a proficient coder

Yeah, but I'm not much of an AI dev. I'd probably copy over some of the build construction logic and call it a day. I know Tuvus has been making adjustments to the AI, so this issue is more making note of something to fix than just a setup for me to fix

@SomeTroglodyte
Copy link
Collaborator

not much of an AI dev

Exactly, me neither. And you might just as well have added a @ to spam them right away... I reined myself in on that.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@SeventhM
Copy link
Collaborator Author

Removing Stale label, but only as an aide to #11264

@SeventhM SeventhM removed the Stale label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants