Grand Theft Auto V script to create a basic battle between two teams
ISC License
Grand Theft Auto V script to create a basic battle between two teams.
This script is inspired by Kerosini's Gang War script. The focus of my script is to provide a similar simple script to create instant battles, while providing new customizable settings.
SimpleGangWar.cs
& SimpleGangWar.ini
into Grand Theft Auto V/scripts
folderThe key B
("Hotkey") is used to navigate through all the steps of the script. In-game help popups will describe what to do, but these are the different stages you will find:
An additional hotkey N
("SpawnHotkey") is used to pause/resume the ped spawning in both teams. The map blips ("E" and "A") will blink whenever the spawning is paused.
Settings can be defined on the SimpleGangWar.ini
file, being the following:
All lists of items (models & weapons) are separated by comma (,
) or semi-colon (;
). Spaces and case ignored.
Models
: list of ped models (Reference | Reference with pics (use the names on the other link)) (Example: CartelGuards01GMM
)Weapons
: list of ped weapons (Reference) (Example: CarbineRifleMk2
)Health
: health for peds (should not be least than 100)Armor
: armor for peds (from 0)Accuracy
: accuracy for peds (from 0)CombatMovement
: how the peds will move through the battlefield. This can be used to make one team defend its spawnpoint, while the other team tries to attack it. If RunToSpawnpoint=true, this setting most probably will be ignored. One of following:
stationary
: not move at alldefensive
: stay near the spawnpoint and take coveroffensive
: focus on attacking the enemy teamsuicidal
: more aggresive attackdisabled
: do not alter this setting on pedsrandom
: randomize between defensive
and offensive
for each spawned ped. This does not always work as expected, since some peds can be stuck on the spawnpoint waiting for other peds to attack, but since they are defending their position, nobody would attackCombatRange
: how far or close the peds will fight against their enemies. This might not have a huge difference, depending on the scenario. One of following:
near
medium
far
disabled
: do not alter this setting on pedsrandom
: randomize between near
, medium
, far
for each spawned pedMaxPeds
: maximum alive peds on the team at the same time (if not specified, the MaxPedsPerTeam setting will be used).MaxSpawnPeds
: limit of peds that will spawn. When the limit is reached, no more peds on the team will spawn on the current battle. Can be disabled by removing the setting or setting it to -1.Hotkey
: the single hotkey used to iterate over the script stages (Reference)SpawnHotkey
: hotkey used to pause/resume ped spawn in both teams (Reference)MaxPedsPerTeam
: maximum alive peds on each team - teams with the setting MaxPeds will ignore this optionNoWantedLevel
: if true, disable wanted level during the battle (true/false)ShowBlipsOnPeds
: if true, each spawned ped will have a blip on the map (true/false)DropWeaponOnDead
: if false, dead peds won't drop their weapons - they will remain stick to their bodies (true/false)RemoveDeadPeds
: if true, mark dead peds as no longer needed, making the game handle their cleanup (true/false)RunToSpawnpoint
: if true, the peds task will be to run to their enemies' spawnpoint; if false, will be to fight hated targets on the area (true/false).ProcessOtherRelationshipGroups
: if true, get all relationship groups from other existing peds and match these groups with the groups of SimpleGangWar peds.NeutralPlayer
: if true, the player won't be considered an enemy of the enemy faction (it will virtually be ignored), which can be useful for freecam-like mods.SpawnpointFloodLimitPeds
: limit how many peds can be near its spawnpoint. If more than this quantity of peds are near the spawnpoint, no more peds on the team will spawn. Disable this feature by setting this variable to 0
.SpawnpointFloodLimitDistance
: in-game distance from a team spawnpoint to keep track of the SpawnpointFloodLimitPeds. Can be integer or decimal (if using decimals, use dot or comma depending on your system regional settings)IdleInterval
: delay between loop runs, when battle is not running, in msBattleInterval
: delay between loop runs, when battle is running, in ms