Let me go ahead and give you a solid update about where the project is at as of today.. Right now, most of the code that has been completed has focused around dispatching, conversations with peds and AI unit logic. With that said, beta is still a ways off. So lets go over some stuff as to be completely transparent about this project right now:
I have 2 of the 104 planned callout scenarios coded, but they are not complete.
There are 80 locations added into the mod throughout the map, all but 1 being "RoadShoulder" locations (for traffic stops). To be honest, the process of adding locations is very dull, so I am saving this for last.
There is a full conversation handler implemented and working, with a threaded Sub Title queue to prevent overlapping to text.
The conversation handler also supports condition statements, so dialog can be selected based on the current time, previous or current weather, the mood of the ped currently, or really any number of other variables that each callout can set.
Conversation handler also supports animations, so that animations can be played on a line by line basis, bringing Peds to life on the screen while the player is interacting with them.
All conversation text is stored in XML files, so there is no programming knowledge required to change, add or remove conversation lines.
The built in CAD shows the current call list, and allows the player to dispatch themselves to any call on that list, but that is about it at this time
The call generator is complete when it comes to crimes, but does not yet supports other calls just yet (like fires or ambulance needed).
The call generator does currently take the current time and weather into consideration correctly when generating calls.
The GameWorld class is pretty much complete, and provides an API to spawn random Peds (based on AgeGroup and Gender), Vehicles and Checkpoints.
Watches the time and weather, and provides event firing based on changes (basically, this mod and all other mods that use the API will be fully aware of the time and weather in game at all times).
A working dispatch script (we'll talk more about this below)
Persistent officers in game are no longer supported. Instead I am going for a hybrid method, where the AI is simulated in memory UNTIL they are needed in game to present to the player on screen. This was causing some serious performance issues, and made it impossible to do what I am about to talk about next:
Lets Talk Dispatching
When I first started this project, I had one class (a single instance) of a dispatch script handling all of the calls. This class was close to 1400 lines of code, and worked pretty well. Unfortunately, this limited the mod to only having 1 active agency at a time. Two days ago I decided that it would make way more sense to have a Dispatcher class handle just one Agency, and have each and every active agency* in the game have its own dispatcher. The reason being, I want this mod to be as realistic as possible by allowing backing agencies to respond to agencies that are poorly staffed, or have too many crimes going on at that moment of time. I also want to support EMS, Fire, Park Ranger, and Special Agent type callouts also (Yes, you will be able to play as a fire fighter or ambulance with this mod :D). So how did this change dispatching logic?
When the player selects a City police agency (Sandy shores for example):
Sandy shores location and crime data are loaded into memory, and Sandy Shores Police Department is given primary jurisdiction of just that zone
Sandy shores is located in Blaine county, so each zone that Blaine county has primary jurisdiction also gets loaded into memory, and the Blaine County agency script gets activated, creating AI units to patrol the county and handle calls in the county. Blaine county gets marked as a secondary agency for Sandy Shores, so if Sandy needs help with their call Queue, Blaine County Sheriff can help.
San Andreas Highway Patrol has statewide jurisdiction, so what about them you ask? Well, their agency also gets loaded, but only location data that is marked as "HIGHWAY" gets loaded and marked as a primary agency. SAHP at this time gets marked as a secondary agency for each zone that Blaine is the primary for, and a third agency for Sandy Shores, so that if Sandy shores explodes with calls, SAHP will step in and help also.
At this point, the Player now has 2 backing agencies to help them with calls and such.
When the player selects a County Sheriff agency (Blaine for example):
Blaine county's locations and crime data are loaded into memory, and Blaine county is given primary jurisdiction of all those zones
San Andreas Highway Patrol has statewide jurisdiction, so they also get activated. Location data that is marked as "HIGHWAY" gets loaded for them, and they are marked as the primary agency for highways only.
When the player selects San Andreas Highway Patrol, things get interesting...
Both Blaine county and Los Santos county departments are loaded into memory
San Andreas gets marked as the backing agency in both counties, and can take any callout they want from either county.
"Speak English please!" you say? Basically, instead of just YOUR department being played and simulated, now multiple other police agencies are also active and simulated at the SAME TIME as yours. When you call for backup, what happens if your department is loaded with calls and has no one available? Before, you were out of luck and had to handle the call on your own... Or even better, backup units would arrive (lets say from UltimateBackup), but these units were not assigned to any agency, so how does little ol’ sandy shores now have way more units than configured for? That doesn’t make sense...right? Now what will happen instead, is the next higher up agency (county or state) will come and help you out, because their departments are also taking calls and are being simulated in game. Using this idea, I can now apply this to other departments also, such as calls for EMS. Maybe a lot of people got injured today, and all the ambulances are busy? Now you will have to wait a little while before you can close the scene until the ambulance arrives. Even cooler than that, is maybe (as you are a city or county agency), shots are fired on a Highway Patrol officer... If you are close by, you will get dispatched to help that officer, even though you don’t have jurisdiction directly in the area.
The whole idea that I am aiming for in this mod, is to give a realistic feel to being a real officer, working for a real department. Currently, LSPDFR makes you feel like you are all alone or a "one man show".. There is only ever 1 callout active at any given time, and its always the player who gets it. My mod changes all of that... You are now a part of something much larger. There are other officers taking calls, and not just that, but you can SEE that happen in the CAD... You can attach yourself to any call that the AI took and meet them at the scene, and watch them do the callout! Things will happen on AI callouts, and they may request backup, which you may have to respond to 🙂
So Whats Next?
Currently I plan to finish the new dispatching logic (about 90% done already), then work on callout scenarios. I also plan to add the rest of the 450 road shoulder locations that Albo1125 already provided coordinates for, then work on adding Stores and Residences to all the location files. I plan to finish Sandy Shores first, and release a Beta where only Sandy Shores is playable. This may be anywhere from 3-6 months away from release.
Anyways, phew my fingers are tired from all that typing. Catch you guys later!