What is the resource about?
Overview of what this resource is
A mission system with a default game mode, but everything is configurable, so it can be tailored to your own server, be it RP or any other. Create/edit your own missions as well. Missions can be standard (same everytime you play), random (different every time, like location and enemies), and hybrid/quasi-random, which is a mix of standard and random.
Default Game Mode Description
Basically, players cooperate and/or compete in missions to earn as much money as possible. $ penalties accrue for a player when a player uses a resource from the mission safehouse or dies (rejuvenation fee). Scoreboard shows total money for player and money per mission stats as well. There are 55 missions in total.
Safehouses exist for missions where players get weapons/ammo and super jump, fast run, fast swim and super health which regenerates (hence the name Crackdown), as well as vehicles. This is tailored for the enemies they will need to fight.
When a mission starts a help message in the upper LHS will give you a tutorial on controls etc… for the mission.
Mission types are basically:
Assassinate (kill all enemy targets)
Capture the Objective (self explanatory)
Secure the Objectives (multiple objectives)
Hostage Rescue (secure all hostages)
Defend (stop enemies reaching a zone)
Defend The Target (make sure enemies dont kill a ped target you are defending, they can be on foot or in a vehicle)
Escort the Target (Make sure the target in a vehicle makes it to the objective without being killed. The target may be driving/flying themselves, or a player will drive them)
Rescue the Target (Defend the target and rescue them like you would a hostage)
Race (Players race through checkpoints to the finish line, but enemies spawn at checkpoints and elsewhere on the map to stop players)
Note: hostages can show up in any mission type for extra $
Everytime you use a safehouse or a safehouse resource (see below), there is typically a 2 to 3 minute delay until you can use the safehouse or a safehouse resource again. Exceptions are safehouse vehicles, mission AI backups, Rejuvenation, Jump to Target Vehicle and Mission Resource Drops.
Safehouse Resources which can cost money:
Safehouse (get all the weapons ammo and upgrades)
Safehouse Vehicles (claim a vehicle which only you can drive, but other players can be passengers. The amount of vehicles you can claim is limited per mission)
Mission Resource Drops (MRDs) (Probably the most important resource, drop an MRD during a mission, so that when you die/get killed and respawn back at the safehouse, you can quickly spawn at the MRD location, on foot or in a vehicle, to quickly get back into the action)
Call Mission Backup. Call in an AI comrade to help fight aside you, like taking a turret etc… One backup per player, no need for safehouse to be open… Backup can be dismissed, and you can select different types of backups to chose from with different weapons, at different safehouse costs. BACKUPS ARE TURNED OFF BY DEFAULT, set Config.MissionDoBackup=true in Missions.lua to enable.
Call in Air Drop (Drops a crate where you get everything a safehoue gives)
RC Bandito Remote Detonate (Call in an RC Bandito rigged with a bomb, which you can drive to enemies, and explode multiple times for around 3-5 seconds. This will cost a safehouse vehicle claim)
Repair Vehicle (Fix a vehicle you are driving or a passenger of or are near, which can be helpful especially in escort missions)
Heal Target (Heal a ped target you are near when defending them)
Jump to Target Vehicle (When in range, the player can jump to the vehicle the ped target they are defending is in [as a driver or passenger]. If driver seat is empty, player will go to that seat, else it will be the first empty turret seat, else it will be another seat. There is no $ cost for this.)
Rejuvenation (The cost it takes to respawn at the safehouse)
Switch seats with Backup AI no cost for this. Controls allows for the player to swap seats with their AI Backup, for instance you may want the backup to swap to a turret seat you are in. Np need for safehouse to be open obviously.
The ‘Crackdown’ missions system recently had some major improvements in version 3, which includes:
- much better AI, especially for defend, escort and transport missions, including randomized missions of these types that are different for each play.
- more native feeling mission delivery and mission pass/fail events
- many more options to create your own missions with complexity with simply editing a lua config file. Including linking missions together into multi-stage campaigns/missions
- Very configurable to change it for servers of any type, RP, etc…, with simply editing a lua config file.
- Now comes with 44 fleshed out missions of all different types, including 12 from the beta mission pack that take place in DLC areas. These are tailored to be played with the default settings/game mode. Worth playing them that way first to get a feel of what you can do, if you want to create/edit them and the settings for your own server/style.
- ESX $ support as usual (Look for:
in client.lua and server.lua
and set it to true.)
Development has basically finished, for the scope of what I wanted to achieve, so wanted to share with others who would like to use or adapt it for a mission system on their own servers…or to just play the default game mode etc…
To download Grab the latest build from GitHub. The latest there will be stable.
Source is on github now: GitHub - ddraigcymraeg/mrp-missions: Crackdown Mission Resource for FiveM
Please read the README.md to get started. It also has advice on how to extend the resource in various ways that was out of scope for what I wanted.
experimental ONESYNC support version below. Download the code from github and copy this server.lua over the old server.lua if you are on onesync, let me know if you have any issues with onesync with this file…
server.lua (37.4 KB)
The orginal thread for the resource when it was in beta is here: https://forum.cfx.re/t/release-fivem-crackdown-game-mode-and-mission-generator-creation-beta/
The first post has a ton of information, photos and videos, and the thread has basically all the archived builds uploaded and a lot of other info. All pertinent info is on Github as well.
You are welcome to use this resource as a reference for your own resource, just give credit to me and also to the people I credit in the fivem forum link above. As usual, I do not ‘officially’ support this, and it comes ‘as is’, its been well tested for bugs, but if any more are found I would consider creating patches.
Here is a short video of some new features that were recently added:
EDIT: Updated Missions.lua in the zip and on github to have Config.MissionShareMoney = true which is advised if you are giving out money for all enemy deaths for missions (rather than just a few targets in the mission), which the resource does by default.
If you are seriously giving money via ESX with this mission system, or taking the game mode $ seriously, and not having mission players share money, only consider giving money rewards for hostage rescues, objectives and limited targets in assassinate missions for now. There is a bug which I am not 100% sure yet is fixable, where code running somewhere on the client (looks to be outside my resource) can cause mission peds to “die” and the cause can be attributed to the player whose machine spawned the ped. So a player can be penalized or rewarded, who spawned the ped. So turn off kill penalties too in missions.lua.
When you share money, all players participating in the mission will share whatever was made. Any penalties will be due to safe house equipment costs from losing weapons/upgrades on respawn and any penalty or death the player will get on the server.
EDIT3: 1/12/2020 12:05PM EST More bug fixes and and added a cool new feature for transport, escort and similar missions, also proper help text now.
Mission Reinforcement Drops how to use and what they are:
EDIT4: Added 2 new missions, Mission43 and Mission44 which are helicopter versions of Mission25 and Mission28, which have planes.
EDIT5: Safe house mission peds will have anims and will occasionally talk, all configurable and can be turned on/off.
EDIT6: A few more tweaks and bug fixes, also a new video showing one of the new helicopter missions, Mission43 and showing how to get into the mission vehicle as a turret gunner or regular passenger in escort/transport/defend/rescue missions.
EDIT7: You can now summon and dismiss AI teamates/allies for the mission, as well as select any number of AI types to spawn (default is 4), with various button/key combos (in-game help when a mission is active has the controls info).
Very configurable as well. AI will fight with player and follow them, including getting in vehicles, and picking most useful available seat based on vehicle (configurable). They will not earn money for players though. This is turned off by default. See EDIT11 below.
New checkpoint racing missions where players race against the clock and against themselves for $ while enemies try to stop them. Also much more improved random mission spawns, enemies down spawn under or over the map and end up mainly on roads anymore.
There can now be 1 to N randomly generated events for any mission, which will add to events already added to the mission.See ExtraRandomEventsType and GenerateExtraRandomEventsNum config vars in missions.lua
upgraded the rcbandito to make it actually worthwhile to use and pay for.
Instead of the one off vehicle explosion pressing LB or E key (default), Pressing and holding or repeatedly pressing the button/key will allow continuous explosions for 5 seconds while the player controls the rcbandito, until it blows up after 5 seconds. Cost to use is 3 times that of a regular vehicle by default, and counts as a safehouse vehicle. Cannot deploy while safehouse is closed as well.
Vehicle repairs are now possible when near a vehicle or inside it at a $ cost when the safehouse is open. This can be very helpful in escort missions whereby the target vehicle can be repaired on the fly, even if the player is not the driver.
Added support for creating your own missions like this
Scoreboard now sorts players by Money per mission or Total Money.
see top of scoreboard.lua
--1 = By Total Money, 2 = Money per Mission local sortType=2
Some things as well to point out.
The resource supports friendly AI backups (See EDIT 7 above) 1 per player. Unfortunately I was not able to find a good way through relational groups to stop enemy AI from occasionally accidently killing themselves when friendly AI backup is turned on globally or per mission for that mission (MissionDoBackup=true)
For the best experience its best to play with MissionDoBackup=false (which is now the default), so enemy A.I. are much more challenging and fun to play against. Saying that the friendly backup AI can be fun and great to player with, especially with lower player count.
Also MissionShareMoney = true by default, where players share the mission $ rewards . This was added because the peer that spawned a ped or vehicle will get a kill reward even when the peds kill themselves via crashing or whatever, not making it fair to other players. Causes of death provided by the natives will not cover all cases either, sometimes the ped seems to vanish, which is scored as a kill for the host. Setting this to false will bring up the old $ scoring, where players score for themselves.
For both, $ losses come from player deaths, or buying vehicles/weapons/upgrades or killing hostages/protect targets etc…
For IsDefendTarget missions players can now heal the ped they are defending when within 2m away. This costs $ and can only be done when the safehouse is open, and costs a safehouse turn, whereby they have to wait till it is open again before using this ability again. Similar to vehicle repair.
Feature for the backup AI. You can swap seats with them now using LB + RB or Q+E key (default). This is great for swapping back and forth with a turret seat, as well as letting the AI drive during combat.