Strategy to improve character/player behavior?
There's a lot of work to do: -Path-finding (for example A*) -new activities in vehicles -Different behavior and place of occurrence for different pedestrians etc..
But before that, (I think that) ai folder needs to be rewritten. My idea is unite DefaultAIController.and PlayerController. Class controller would contains 3 data members:
- Strategies(no data members, but methods which call activities, for example : "go to", "attack character X")
- task(slot for actual task) //empty for player
- manager(traffic director for ai or direct input from player's keyboard and mouse) Pros: We can put ai inside player character and make a script to test missions. Separate activities from task. Remove duplicated code.
What do you think?
The "strategies" (I prefer goals as a more apt name) might need certain data members, the opcodes related to characters (listed below) outline roughly what behaviours are required to get scripts working.
- 01C9-01E2
- 0192-0196
- 020E-0211
- 022C-0230
- 0350
- 0364
- 0377
- 0411
Variants should be used to store the data for goals and activities, I'm not sure virtual inheritance is adding anything here.
I'm hoping that someone with more experience with GTA can outline how the animation/activity state machine would work best. Are the activities directly observing the animation state?
Beyond characters there are opcodes for vehicle navigation, these will need to be handled in some way too.
Character AI should take a different approach, using top-down objectives over the rather messy Activity system currently in use.
This is slightly more important after #683, the lack of response to melee attacks is quite obvious.