Skip to content

Conversation

@FloPinguin
Copy link
Contributor

Description:

Explanation of the bot farming strategy in the discord: https://discord.com/channels/1359946986937258015/1359949371956789289/1460928540575928478
"the result is that a player can build unlimited factories for 125 000 gold discount, trade with themselves with each train being worth 50 000 gold. First the 25 000 for neutral trade and then another 25 000 when the bot is harvested."
"If you have a minute and ally people around you it should be trivial to get 10 of both cities and factories for 1.25mil"

It's debatable if we want to let people do that (close this PR) or see it as an abusive mechanic.

Here is the fix, bots try to delete all structures now. You can simply retake them to stop the deletion:

2026-01-14.12-23-49.mp4

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

FloPinguin

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

The BotExecution module now enqueues deletion tasks for all structure units on every tick after initialization by calling a new private method deleteAllStructures that identifies structure-typed units and queues DeleteUnitExecution for each before other logic runs.

Changes

Cohort / File(s) Summary
Bot Execution Structure Cleanup
src/core/execution/BotExecution.ts
Added isStructureType and DeleteUnitExecution imports. Added private deleteAllStructures that iterates units, checks isStructureType, and enqueues DeleteUnitExecution for deletable structures. deleteAllStructures is invoked on each tick after initialization, before attack/movement logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🏗️ Each tick the bot looks round and then,
It marks old structures for their end,
Queues up the deletes, one by one,
Softly the cleanup work is done,
A tidy world when tasks have run.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Reduce bot farming problem' clearly describes the main change: implementing a fix to address the bot farming exploit by making bots delete structures.
Description check ✅ Passed The description is well-related to the changeset, explaining the bot farming problem, the exploit mechanism, the implemented fix, and providing a link to a visual demonstration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ryanbarlow97 ryanbarlow97 added the Meta Minor balancing adjustment, mostly value changes, minor calculation changes. label Jan 17, 2026
@ryanbarlow97 ryanbarlow97 added this to the v30 milestone Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Minor balancing adjustment, mostly value changes, minor calculation changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants