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

adjust price of vermin swarms #3929

Merged
merged 3 commits into from
Oct 29, 2023
Merged

adjust price of vermin swarms #3929

merged 3 commits into from
Oct 29, 2023

Conversation

myk002
Copy link
Member

@myk002 myk002 commented Oct 28, 2023

divide by 10000

@myk002 myk002 requested a review from quietust October 28, 2023 05:24
@quietust
Copy link
Member

quietust commented Oct 28, 2023

I don't believe this is correct - DF's item value code doesn't have a special case for vermin colonies, just PETVALUE_DIVISOR which happens to be 1000 for honey bees.

Edit: looking at the disassembly, the only things missing from the original logic were:

  1. If mat_subtype is -1, fetch caste 0 instead of aborting
  2. If the divided value drops down to zero, round it up to 1

Copy link
Member

@quietust quietust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is incorrect - the actual game only checks petvalue_divisor and does not check the VERMIN_SOIL_COLONY flag at all.

@myk002
Copy link
Member Author

myk002 commented Oct 28, 2023

So the issue here is then that bees have a matgloss of -1, which cannot be used as a caste index. What should I do exactly in that case?

@myk002 myk002 requested a review from quietust October 28, 2023 17:26
@quietust
Copy link
Member

In that case, the game itself uses caste 0 instead, which it looks like we're now doing.

@myk002 myk002 merged commit 82491a6 into DFHack:develop Oct 29, 2023
12 checks passed
@myk002 myk002 deleted the myk_beeeees branch October 29, 2023 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants