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

Actually throttle monster thinking #51460

Merged
merged 2 commits into from
Sep 9, 2021
Merged

Conversation

actual-nh
Copy link
Contributor

@actual-nh actual-nh commented Sep 8, 2021

Summary

Bugfixes "Actually throttle monster thinking"

Purpose of change

The code in monmove.cpp's plan() function was supposed to throttle monster thinking down if there hadn't been a target for a bit. It wasn't working because the output was supposed to be "between 0.0 and 1.0"... but the variable was an int.

Describe the solution

Change it to a float.

Describe alternatives you've considered

Doing other improvements on monster AI first so they don't get too dumb.

Testing

CI for a little bit; the rest will require playtesting by people more experienced with monsters than I am (and with more time than I have in which they can concentrate). (The worry is that the monsters will get too dumb.)

Additional context

Ping: @Venera3? @LyleSY (particularly for pets)? Thanks!

@actual-nh actual-nh added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. Monsters Monsters both friendly and unfriendly. labels Sep 8, 2021
@actual-nh actual-nh added the PUBLIC TEST Come and try this! label Sep 8, 2021
@I-am-Erk
Copy link
Member

I-am-Erk commented Sep 9, 2021

This seems safe for me to merge given that the real questions were in the original throttle pr.

@I-am-Erk I-am-Erk merged commit cdc6843 into CleverRaven:master Sep 9, 2021
@actual-nh actual-nh deleted the patch-1 branch September 9, 2021 18:59
@LyleSY
Copy link
Contributor

LyleSY commented Sep 9, 2021

Nice, I'll try and steal some time to test the newer dumber pets

@actual-nh
Copy link
Contributor Author

@LyleSY, @Venera3: I forgot about a couple of things in the code: Pets will not actually be dumber (it's only for friendly == 0). However, the reactions of other monsters to pets - and to other monsters in general - should be instructive (the processing skipped is to find enemy monsters). Sorry!

Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
* Actually throttle monster thinking

* Satisfy astyle (I hope)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. Monsters Monsters both friendly and unfriendly. PUBLIC TEST Come and try this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants