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

Have autochop limit trees cut in a year #1269

Open
TV4Fun opened this issue May 13, 2018 · 6 comments
Open

Have autochop limit trees cut in a year #1269

TV4Fun opened this issue May 13, 2018 · 6 comments
Labels
idea Suggestions, etc.

Comments

@TV4Fun
Copy link

TV4Fun commented May 13, 2018

To satisfy the demands of the elvish diplomats, I would like it if it were possible for autochop to limit the total number of trees cut. I could just set a limit that autochop could decrement for every tree cut, and then undesignate when it gets to 0.

@lethosor lethosor added idea Suggestions, etc. autochop labels May 14, 2018
@ab9rf
Copy link
Member

ab9rf commented Jul 31, 2018

It should be possible for autochop to detect if there is a tree diplomacy agreement currently in force, and if there is, limit chopping so as to not exceed the limit in the agreement. (I need a savegame with a tree diplomacy agreement currently in force in order to investigate this.)

Note, however, that autochop currently simply marks all eligible trees for chopping and then unmarks them when the threshold is exceeded. It would be better if autochop would instead only mark the largest eligible trees, up to the lesser of the limit allowed by the agreement or the number required to reach its cutoff threshold, but this is a significantly more difficult strategy to implement.

@Moth-Tolias
Copy link
Contributor

autochop designates the largest trees first now, so adding code to detect how many trees have been cut down in a year and abort early should be relatively straightforward

@myk002
Copy link
Member

myk002 commented Nov 23, 2022

It would need to persist some state so when the game is reloaded it can remember how many trees have been cut so far this year, which is doable.

Also autochop would have to become aware of trees chopped down outside of autochop's control, which is not so simple.

@ab9rf
Copy link
Member

ab9rf commented Nov 23, 2022

It would need to persist some state so when the game is reloaded it can remember how many trees have been cut so far this year, which is doable.

Also autochop would have to become aware of trees chopped down outside of autochop's control, which is not so simple.

isn't this already tracked in the diplomacy agreement?

edit hm, do we actually know where elven tree-cutting agreements are stored?

@myk002
Copy link
Member

myk002 commented Nov 23, 2022

That's a good point. Let DF do the tracking. But yeah we might need reverse engineering to find it.

@ab9rf
Copy link
Member

ab9rf commented Nov 23, 2022

someone on the unofficial df discord pointed me to some saves that have active tree cuttnig agreements, dffd links below

save 1 (agreement entered for a quota of 123 trees in year 246)
save 2 (year preceding, agreement may or may not be in place)
save 3 (year following, agreement may or may not be in place)

full list of saves for this fort

@myk002 myk002 removed the autochop label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Suggestions, etc.
Projects
None yet
Development

No branches or pull requests

5 participants