Morganus Posted July 30, 2008 Posted July 30, 2008 Problem: In Western style RPG type games, if the Allied NPCs offensive Area of Effect powers can hit friendlies, the NPCs will hit the party members with their AoE's more often than is acceptable. (Western style here is defined as more strategic/total control like NWN/BGate/Etc, as opposed to eastern RPGs more action/movie style; with Final Fantasy, lost odyssey, etc) Solution: Reversing the targeting phase and the "casting delay" phase. In this case, the spell is cast fully, and THEN targeted and the effect is generated instantly. This way the AI can be programmed to minimize or nullify friendly fire and maximize desired effect for the power more easily. This will occasionally result in spells that aren't really useful anymore when they are finished casting, but this would have happened anyway in the original order, and in fact happen MORE often (targets moving out of the targeted area, etc). You could even add a slider or perhaps a
J.E. Sawyer Posted July 30, 2008 Posted July 30, 2008 Practically speaking, it is more computationally expensive for an AI to find an open location occupied by an acceptable ratio of friends/foes than it is for them to target different individuals and make similar sorts of checks. The difference is between an (effectively) infinite number of points in space and a limited number defined by perceived enemies. So really, it's always going to be more practical to target enemies than points in space, though they could prioritize based on finding a "perfect ratio" and it's possible that they could do it at the end of their casting phase. As for the GUI option, I think that's less important. If you're activating it through the GUI, the targeting is under human control. Humans can do a pretty good job of prediction and can abstract open space in a way that the game simply cannot. Players can occasionally hit friends or miss foes, but the spell usually goes off in the way they need it to. twitter tyme
Walsingham Posted July 31, 2008 Posted July 31, 2008 kudos for detailing a solution. However, as Col. Sawyer says, calculations like that can be baffling (to us humans) -ly complex and intensive to run. "It wasn't lies. It was just... bull****"." -Elwood Blues tarna's dead; processing... complete. Disappointed by Universe. RIP Hades/Sand/etc. Here's hoping your next alt has a harp.
Morganus Posted August 1, 2008 Author Posted August 1, 2008 First, much thanks for the replies, they were heavily appreciated! The important part of what I was trying to look at seems to still to be possible by Sawyer's wording, i.e. performing the AIs checks AFTER the casting phase, rather than before it, shaving off half a second or two of change between choosing the target and implementing the effect. The actual method of determining who it would hit "by accident" and/or any changes to its prioritizing of targets I'll leave up to the programmers, who know worlds more than I about how to cheat up shortcuts to make the AI appear to make much more complex decisions than they actually are. Even given a much more limited level of complexity, it would seem to me that this could potentially still allow for better AI behavior than the current order, regardless of whether the AI checks by space or opponent or some other method unknown to me. Even if it is only a quick check of how many allies you'd be hitting with an optimal attack used on the "first priority" target (as chosen by current standard AI), then measuring that against a pre-set 'acceptable casualties' rating and defaulting to a non-AoE power against the same enemy if it is exceeded would see some benefits I think. The hard part (as far as I can tell) of that check has to be done anyway by another part of the code in order to apply the effect to those characters being targeted once the spell is successfully cast. At it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now