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

Improve autoaim behavior and make ranged targeting avoid actors in between #3716

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

SentientSupper
Copy link
Contributor

@SentientSupper SentientSupper commented Mar 20, 2024

(In case you're wondering why this is a new pr, I didn't know renaming a branch would close the pr. Original: #3687)

Don't avoid aiming at self with harmless spells. This is relevant for wand of roots.

When autofiring, don't attempt to hit immune targets. This is relevant for any spell that has immune monsters.

Also attempt to choose a target who isn't blocked by allies / plants / slimes you can't shoot through.

Should possibly put the code for the above inside the autofight lua somehow?

Closes #3232 #1966 #2447

Make most ranged attacks from you and monsters avoid hitting actors on the way to the target. This change is intended to make ranged attacks and spells much less annoying to use when you have firewood / allies / slimes blocking the path by making it choose a slightly different path with the same rules as permissive los.

Previously when this happened, you would either need to reposition or drag your targeting behind your target to get a good path that doesn't hit unwanted targets. This is very annoying as it interrupts tabbing with a prompt/message and forces you to aim manually.

Currently this may cause some odd behavior with piercing beams.

A side effect is that ranged monsters become more dangerous because they are blocked a lot less frequently by their friends now.

TODO: Don't leak invisible monster locations. #3017 would solve this in a more elegant fashion.

Before:
image
After:
image

Before:
image
After:
image

This change is intended to make ranged attacks and spells much less
annoying to use when you have firewood / allies / slimes blocking the
path by making it choose a slightly different path with the same rules
as permissive los.

Previously when this happened, you would either need to reposition or
drag your targeting behind your target to get a good path that doesn't
hit unwanted targets. This is very annoying as it interrupts tabbing
with a prompt/message and forces you to aim manually.

Currently this may cause some odd behavior with piercing beams.
Make autotargeting attempt to choose targets that don't have blocking
monsters like firewood / allies in the way.
Don't attempt to avoid monsters you can shoot through.
When attempting to target previous monster target
@SentientSupper SentientSupper changed the title Targeting improvements Improve autoaim behavior and make ranged targeting avoid actors in between Mar 20, 2024
Summoning and buff spells don't need it and it was printing the message
for blocked lof for those spells..
@DracoOmega
Copy link
Contributor

While I agree that the targeter automatically providing unobstructed paths that are nonetheless possible for the player to manually select could be good, I feel like some of these alternate paths you are showing up there are ones that are not currently possible to realistically attain manually at present, with spell range being as it is. Am I incorrect?

Also, I feel you've glossed over 'A side effect is that ranged monsters become more dangerous because they are blocked a lot less frequently by their friends now.' far too quickly. That is a significant mechanical change and not one that I personally think is a good idea. Regardless of the degree to which it makes specific individual enemies more dangerous, deliberately manipulating enemy lines of fire via player positioning is an interesting element of player agency at present, and making that significantly harder for the player to do feels like a direct gameplay loss. (I imagine it will also be a lot less clear to the player when an enemy is or isn't blocking another's shots, given how flexible your proposed paths are).

To some degree, the player being actively smarter than monsters with how they can aim things is probably also good gamefeel, regardless? Players like to feel they're outsmarting things.

@SentientSupper
Copy link
Contributor Author

The alternate paths I am showing use the same rules as permissive los so it just achieves them by treating actors as if they were walls.

The impact on balance is something I'm currently testing. The current feeling I get is that there's no noticeable change in difficulty. I think the loss in player agency is suitably compensated for by reducing gameplay friction.

I think it actually makes it more clear if a monster's shots would be blocked since before there's a lot of ambiguity with diagonals unless you check with your own tracer. After the change you can assume a monster can hit you by default unless it's blocked by more than one adjacent blockers.

I'm not sure about making the player better at aiming than monsters. That could lead to situations where you take cover behind plants to shoot an enemy who can't hit you (maybe good?) but also rat value.

@elliptic
Copy link
Member

This is a massive buff to ranged (for both player and monster). A fundamental change like this needs a much stronger argument than "less annoying to use when you have firewood / allies / slimes blocking the path".

@SentientSupper
Copy link
Contributor Author

I reckon the current balance of ranged isn't great enough to warrant rejecting major usability improvements that would affect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fast Roots aiming tries to avoid allies and yourself
3 participants