[RELEASE] FiveM Crackdown game mode and mission generator/creation [BETA]

Updated to 2.9.6v:
mrp-missions-2.9.6v.zip (145.9 KB)

–Added FIRING_PATTERN_BURST_FIRE_HELI firing pattern to NPC peds added as passengers to vehicles via ExtraPeds or VehicleTurretSeatIds This means that turrets and other guns on vehicles behave properly now and there will be a constant rate of fire from 30 to 50 bullets, instead of in spurts. This makes vehicle turrets much more formidable. The exception is the valkyrie cannon, which I made more like a tank for balance. You can override this for death from above with NerfValkyrieHelicopterCannon = false Also the APC turret is the other exception and stays the same.
--VehicleTurretSeatIds is where you can add extra passengers per vehicle type for seatids. This can be configured per mission now.
–Added akula helicopter for default random missions as well as a new default ped NPC type

When I added FIRING_PATTERN_BURST_FIRE_HELI to the valkyrie cannon NPC, it was insane, 30-50 cannon shots in a row :rofl:

updated to 2.9.6w:
mrp-missions-2.9.6w.zip (146.0 KB)

–Ped in Vehicle kill bonus only applicable to driver ped now, not passengers.
Changes to default Missions.lua:
–Added new vehicles to the random mission generator.
–All default vehicles are now loaded up with angry smg-toting NPCs so will pose more challenge, and will have a hail of bullets coming from them. Change/add vehicles via VehicleTurretSeatIds
–Mission4, Mission9 are more intense now.

vehicles in general are a bit more like ‘boss’ entities now.

1 Like

Big update after some playtesting over the last few days.

Updated to 2.9.7:
mrp-missions-2.9.7.zip (152.5 KB)

–Players can now see other players on the map as white blips to help with co-op. To disable this, in client.lua look for: START SHOW OTHER PLAYER BLIPS

–Default primary game mode changed. Players no longer teleport/travel to safe houses on new missions. Players can request a safe house crate drop by pressing LB & RB on gamepad or Q & E together on the keyboard. It performs the same role as a safe house. Made default crackdown mode health to be 5000 instead of 2000 for much harder NPC vehicles. You can also set default player health w.o. using crackdown mode (w. super jump/speed/swim) with Config.DefaultPlayerMaxHealthAmount. New mission.lua settings UseSafeHouseCrateDrop & SafeHouseCostCrate which can be used with or without regular safe houses (All credit to Vechro whose crate drop script I used and adapted, see credits in main post)

– Players can now use /votecancel to create a poll to cancel the current mission. Players can then use /voteyes or /voteno to vote. voting is configurable at the bottom of server.lua. By default the resource will start a new mission 10 seconds after a canceled mission. (All credit to FAXES for his Vote-to-Kick voting system which I used and adapted, see credits in main post)

–Relatedly players will still get money for what they did in the mission, even if it was cancelled or failed, they just will get no rewards (free ammo/equipment/health/armor)

–Can also optionally ‘nerf’ APC and rhino/khanjali turrets to fire slower like for valkyrie (search mission.lua for ‘Nerf’)

–new default vehicles like the caracara. Also motorbikes NPCs will use, now that they can do drive bys. All default vehicles in random missions and regular missions will be loaded to the hilt with smg toting NPCs as well as any turrets.

–Many other bug fixes and many tweaks. Also many tweaks to helicopter and plane spawns. I tried TaskPlaneMission & TaskHeliMission but could not get them to work like I wanted. The new algorithm spawns helicopters slightly differently and planes spawn better (thanks also to some code I saw Vechro use)

–Updated the missions.lua config guide to reflect additions: https://ghostbin.com/paste/o3v7s

The voting system I decided to add, since IsRandomAnywhere=true mission spawns work around 99.99% of the time, though on very few occasions there may be one NPC spawn where it shouldn’t (inside a building) and is inaccessible. I have seen this one time as well with a capture point. I’m not 100% if it is the map data is the problem or more my algorithm (probably the latter). So the voting system was put there to allow players to bypass the mission if that is the case rather than waiting for it to timeout. The new scoring system as well will award players whatever $ they earned during the canceled or failed mission, but they will not get the rewards (free ammo/equipment/health/armor) that completion optionally gives.

The old teleportation/travel system is good for competitive co-op where all the players are participating and start at a relatively equal place per mission. But I preferred the safe house crate drop approach since it is more neutral and gives players more freedom to participate or not and maneuver as well.

2 Likes

added a little bit more gravy to 2.9.7.

Updated to 2.9.7b:
mrp-missions-2.9.7b.zip (152.8 KB)

You can now also create a vote to cancel a mission to start a new one.
If you are on mission 12 and want to create a ballot for Mission9, you can type in chat:
/votecancel Mission9’ or just use ‘/votecancel’ to cancel the mission.

I also modified ‘/list’ to show all mission ids along with their mission names/titles to help with the above command.

2.9.7b I plan to be the last update, unless some bugs are found that need to be fixed, or should be fixed. If I work on this again properly it will be to revisit the random mission generator spawn code. It works great, but for the very rare cases where an NPC will spawn inside a building when it should not. It could well be holes in the map that raytracing will not solve. Was not sure how best to remove the NPC if that was the case, which the voting system is a workaround for, and also a good option to have anyway.

Anyways, hope you have fun with it. :slight_smile:

All the information is in the first post, and in the ghostbin.com link I provided in that post.

2 Likes

Updated to 2.9.7d:

Noticed some more bugs with playtesting.

–Fixes a bug where kill counts from player vehicles (via GetPedKiller) were not given to player, making them lose money. Had to work around the fact that the source goes to vehicle not the player.
–NPCs with ‘dead=true’ in regular missions and a 1/5th of friendly hostages in random missions will have their health set to 0 for prop effect right after they spawn. These were being counted as hostage kills via GetPedKiller and making the player lose a lot of money. Also would cause HostageRescue=true missions to fail instantly sometimes. This is fixed.

Also made it that by default respawning players will spawn/respawn in the safe house if it is enabled, but teleportation/travel to safe house at start of every mission is turned off.

EDIT:
Decided to also add an option to ‘nerf’ turrets so they shoot in bursts like before, rather than in continuous 30-50 rounds a time. In missions.lua: NerfTurrets = true/false (default is false)

2.9.7d:
mrp-missions-2.9.7d.zip (153.2 KB)

Big update: 2.9.8
mrp-missions-2.9.8.zip (170.9 KB)

-Loads of bug fixes: Safehouses spawn better, crate drop works better, AI fixes, and much more.
-Enhancements like notification messages to help game play, any NPC enemy vehicle used will spawn NPCs in every seat now (unless specified otherwise) and a lot more.
-Every vehicle that can use weapons in GTA V this resource will buff them up (weaponize them) and use them for NPC and safehouse vehicles (unless specified otherwise). Pretty much everything here and more: https://gta.fandom.com/wiki/Vehicle_Features/Mounted_Weapons Random Missions 12, 17 and 19 in particular will showcase all the new vehicles.
-‘Boss’ NPCs spawn occasionally, that give a $ bonus similar to vehicle drivers. They have different models and use a chaingun on full auto.
-RC Bandito is working as a remote bomb that can be used in Missions. Will share the code just for that on another thread:
Rcbandito how to get it to detonate?

Will update the main post with the changes and details. Some screenshots of the new content.

Screenshots

RC Bandito entry notification:


RC Bandito remote detonation just before the player rejoins their player pawn:

Stats notification at the end of each mission:


Intro notification at the start of the mission:

pounder2 upgraded and weaponized:

bruiser upgraded:

dominator upgraded:

default loadout at safehouses/crate drops and on mission completion now use more powerful ammo types to combat more powerful enemies. Safe houses/crate drops now cost more, $2000 each. Safehouse vehicles are free:

Default ‘Crackdown’ mode upgrade notification at a safe house.

1 Like

Tweak/fix update for 2.8.9 to 2.8.9b:
mrp-missions-2.8.9b.zip (62.9 KB)

I recommend renaming mission_random.lua to missions.lua in the resource to play with the random mission generator missions on their own, which has all the new vehicles auto-added if the old default regular missions are boring.

*Made fixes to typos (detonate instead of denote in the message text).
*RC Bandito has been polished some more.
Here is a video of it in action:

After effects (went into invlun mode here):

2 Likes

updated the ghostbin.com link to the missions.lua config guide: https://ghostbin.com/paste/3mq5f
,but its worth pointing these additions/changes:

All vehicles added to regular or random generated missions will have all their passenger seats filled up with enemy NPCs.
Also nearly all vehicles with weapons or can have weapons in GTAO will have whatever buffs added to them (if available) via function called doVehicleMods in client.lua. This applies vehicle mods such as more armor and weapons, also firing patterns for the driver and passengers (like turrets as well) can be changed there. It will also buff up certain iconic cars like the armored kuruma2 to be maxed out. I use this in Mission5 and Mission14 (to help the friendly target NPC you are supposed to rescue survive longer :stuck_out_tongue: )

for regular missions, both these can be overriden with 'noMods=true’, which stops vehicle mods (see Mission2) or 'noFill=true’ which stops the auto fill of passengers, where you can use ExtraPeds or Config.VehicleTurretSeatIds, which will both define passenger seatids to fill with NPC peds.
You can also use “isBoss=true” which will give the ped a full auto minigun and extra bonus $.

The ‘Nerf’ options have all been deprecated except for Config.NerfValkyrieHelicopterCannon which overrides doVehicleMods for the valkyrie cannon. This allows the turrets to not be nerfed as well, but they can be as well via doVehicleMods.

Finally Config.FastFiringPeds = false when turned to true will make all NPC peds not in vehicles shoot at full auto firing pattern if they are able to, which might make it much harder.

Decided to post some actual gameplay footage finally.

Capture the Objective mission from the random mission generator:

Elimination mission from the random mission generator, also shows hostage rescue:


(In both videos above I have the ‘SafeHouseCrackDownMode’ turned on for extra health and abilities)

RC Bandito remote detonation added as well in missions:

1 Like

I uploaded the wrong version in my last update, it was 2.8.9b not 2.9.8b.

Here is the latest version which has everything included and up to date.

mrp-missions-2.9.8c.zip (173.6 KB)

Did some more proper playtesting and did notice a lack of sync happening on my old laptop as non-host when running Mission19 which can spawn 55-80+ peds and vehicles. It happens at mission start, some entities do not exist on the non-host at these higher numbers. Its also around this level that fivem on my main desktop (the host) can sometimes crash. I put in some decorremove clean up code to be safe, but it looks like this is going to be a flexible limitation based on a variety of factors, since I have not seen a problem with smaller mission so far. When I ran as host on my laptop, it was worse, it would spawn 55 entities, but my desktop would only see around 25 or less. Played a little bit with putting in Wait()s to slow down the spawns on the host at mission start… but it seemed to make no difference.
I’m thinking that 2 decent client computers maybe many more together could run a Mission19 with a good connection, most likely.

Will release another update soon with some fixes and tweaks. I’m finding in crackdown mode, auto-firing peds balance it out more and make it more challenging.

I wanted to add some cool stuff like para-drops, but it does not sync well like I thought it would , and also the 300m or so collision radius around the player makes it challenging to cleanup, so can get floaty peds in the sky etc… Too much work with the current code base. But thought I would share what I had for the host before I scrapped it:

2 Likes

You are an absolute monster, man. You’ve created an absolutely amazing framework, I can’t tell you how great it is to see something so well thought out. Thanks for your work and for sharing it!

3 Likes

glad to hear people realize how much work he did… And how awesome it is.
Everything can be configure as well.
a 5 stars release… true.

1 Like

Thanks guys. I have put in a monster effort with this as well over the last 6 weeks, so glad people are enjoying it as well. :slight_smile:

Sort of have the default settings just as I like them for the next and final (or thereabouts) release. Its like a mixture of arma and halo, where you cant just casually run into combat or you will be slaughtered, but the regen will help with continuity of the combat, if you strategize. The full-auto firing peds are no longer pests, but true threats. A lot of the new buffed up and armed vehicles, like the bruiser can still be taken out with an rpg rather quickly, so their mounted weapons are full auto now too.
All can be turned off/on in missions.lua and doVehicleMods() in client.lua.

Will hopefully get a test this weekend as well with 2 decent machines to see if the sync issues show up for Mission19 when there are 60+ peds/vehicles.

2 Likes

Updated to 2.9.8d: mrp-missions-2.9.8d.zip (178.9 KB)

–’/votecancel’ command name changed to ‘/votefinish
Players can spawn/deploy rcbandito remote detonate vehicles on the fly using LB+DPAD-Right or A + D keys (see video below). It is just like a normal safe house vehicle, there can be a maximum per mission and there can be cost and its it claimed when you deploy it. You will have to wait till the safe house is open again before deploying again as well. (Can be turned off/on via Config.UseSafeHouseBanditoDrop)
–Added new ‘bosses’. Juggernauts can spawn as bosses now too, and will use railguns instead of miniguns
–Fixes a sync bug for first joining players
–Objective countdown is from 10 rather than 5, which makes it little harder to slip in quickly in a vehicle and claim the objective, it has to be ‘held’ longer.
–Many tweaks:
Config.FastFiringPeds is set to true by default, meaning Peds will use fire pattern full auto. Vehicles peds will do the same, expect where specified by DoVehicleMods() function in client.lua. Made safehouse vehicles worthy of paying for, like the insurgent3 etc… oppressor2 etc… Also made the default mission generator settings to spawn more vehicles 1to4 by default, and more peds (15 to 30) by default with a spawn radius of 50m. Mission19 remains the same, with larger values. A lot more too that I am probably forgetting.

Here is the rc bandito deploy example:

I did more playtesting with Mission19 on my old laptop and my main desktop, and did not see any desync like I did the other day with the same amount of peds (55->80 and 3->9 vehicles). I had my laptop connected via LAN cable this time instead of wifi, but I think the difference may have been, that my main desktop was the host, whereas, it may have been that my laptop could of been the host last time, maybe due to my desktop disconnecting and coming back. Just because the NPCs spawn on a client, does not make them the host if I understand it correctly? The host is already determined by the server and/or peer to peer?
If this is the case, it would be best to use ‘/mission missionname"’ as little as possible on a public server, and use “/votefinish missionname’” or wait for the server to spawn the next mission, since in both cases it will find the host.

1 Like

had a good playtesting session today over LAN, and did not see any de-sync at all even for Mission19 which repeatedly was around 60-80+ peds and around 4-8 vehicles per go.
Made sure to keep my desktop as host. Not sure what happened the other day, it could of been my laptop being host and/or the code changes I added but pulled back, but things seem to be back to ‘normal’ now.
had a cool dogfight as well.

minor update to 2.9.8e:
mrp-missions-2.9.8e.zip (178.8 KB)

for some reason the code that randomized headings for randomly spawning peds got lost. That is fixed now.

1 Like

the rcbandito had a glitch with the invuln flag. that is fixed now.
Updated to 2.9.8f:
mrp-missions-2.9.8f.zip (179.0 KB)

Updated to 2.9.8g:

mrp-missions-2.9.8g.zip (180.1 KB)

–‘Bosses’ have been made a little tougher, they have higher health, do not bleed out or take critical hits. The Juggernaut especially is very tough, it does not ragdoll until it is near death or at death. It will carry either a rail gun or a ray minigun on full auto. Other bosses are easier and more human-like.
–Mission7, Mission11 sasquatch and aliens are much tougher now too. Using those models in missions, same with zombie model, will apply the buffs (zombie has normal health though). Unless you use “notzed=true” attribute on sasquatch/alien/zombie.
–Can configure Boss Health via Config.BossHealth
–Safe Houses and Safe House drops only give 8 explosive rounds for the heavy sniper mk2 now. This was for balance. This can be changed in missions.lua via Config.SafeHouseSniperExplosiveRoundsGiven
–Vehicles should spawn much better (especially airplanes) with the random mission generator missions. Added some extra checks
–Other fixes.

Config guide updated here (updated in the top post as well):
https://ghostbin.com/paste/j6zrt

Credit to Loque who helped me find functions to buff up the Boss peds.

Juggernaut in action. I decided to not make them invisible, it was too hard for general missions:

Video I took of taking on an armored vehicle. Basically any enemy NPC vehicle, plane etc… comes near you, always find cover! :stuck_out_tongue::

1 Like

Updated to 2.9.8h. It has a minor aesthetic addition to the Juggernaut that I forgot to put in the last release…
mrp-missions-2.9.8h.zip (180.1 KB)