Skip to content

Commit

Permalink
Merge pull request #3 from David-Lor/develop
Browse files Browse the repository at this point in the history
2.1.1
  • Loading branch information
David-Lor authored Aug 29, 2020
2 parents b229351 + 0b455ec commit 17ddbcb
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 63 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bin/
obj/
.vs/
*.csproj
*.config
*.sln
bin/
obj/
.vs/
*.csproj
*.config
*.sln
46 changes: 34 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ The focus of my script is to provide a similar simple script to create instant b

## Usage

The key `B` 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:
The 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:

1. The script will ask you to move to where the enemies will spawn
2. After pressing the hotkey, you must do the same to define where the allies will spawn
3. Right after defining both spawnpoints, peds from both teams will spawn on their respective spawnpoints, and fight each other
4. Press the hotkey once to enter the "exit mode" (it will ask for confirmation to stop the battle)
5. Pressing the hotkey again will inmediately stop the battle and remove all alive & dead peds from the map

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

Settings can be defined on the `SimpleGangWar.ini` file, being the following:
Expand All @@ -30,7 +32,7 @@ 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](https://github.com/crosire/scripthookvdotnet/blob/d1827497495567d810986aa752f8d903853088fd/source/scripting_v2/GTA.Native/PedHash.cs))
- `Models`: list of ped models ([Reference](https://github.com/crosire/scripthookvdotnet/blob/d1827497495567d810986aa752f8d903853088fd/source/scripting_v2/GTA.Native/PedHash.cs) | [Reference with pics (use the names on the other link)](https://docs.fivem.net/docs/game-references/ped-models))
- `Weapons`: list of ped weapons ([Reference](https://github.com/crosire/scripthookvdotnet/blob/d1827497495567d810986aa752f8d903853088fd/source/scripting_v2/GTA.Native/WeaponHash.cs))
- `Health`: health for peds (should not be least than 100)
- `Armor`: armor for peds (from 0)
Expand All @@ -41,11 +43,16 @@ _All lists of items (models & weapons) are separated by comma (`,`) or semi-colo
- `offensive`: focus on attacking the enemy team
- `suicidal`: more aggresive attack
- _stationary & suicidal seem to take no effect, so is better to stick to just **defensive** and **offensive**_
- `CombatRange`: 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`
- `MaxPeds`: maximum alive peds on the team (if not specified, the MaxPedsPerTeam setting will be used)

## SETTINGS

- `Hotkey`: the single hotkey used on the script ([Reference](https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.key?view=netcore-3.1#fields))
- `Hotkey`: the single hotkey used to iterate over the script stages ([Reference](https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.key?view=netcore-3.1#fields))
- `SpawnHotkey`: hotkey used to pause/resume ped spawn in both teams ([Reference](https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.key?view=netcore-3.1#fields))
- `MaxPedsPerTeam`: maximum alive peds on each team - teams with the setting MaxPeds will ignore this option
- `NoWantedLevel`: 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)
Expand All @@ -54,20 +61,39 @@ _All lists of items (models & weapons) are separated by comma (`,`) or semi-colo
- `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).
The task RunTo (true) seems to have lower negative effect on peds behaviour (avoid them from being idle stuck - but it can still happen if spawnpoints are too far away).
The task FightAgainstHatedTargets (false) can be interesting when spawnpoints are closer, as peds might have more freedom to flank the enemy?
- `ProcessOtherRelationshipGroups`: if true, get all relationship groups from other existing peds and match these groups with the groups of SimpleGangWar peds.
Set it to true if you experience the spawned peds fighting against other peds (like mission peds) when they should not be (for example, enemy peds of a mission fighting against enemy peds of SimpleGangWar).
- `IdleInterval`: delay between loop runs, when battle is not running, in ms
- `BattleInterval`: delay between loop runs, when battle is running, in ms

## Known bugs

- If spawnpoints are too far away from each other, peds can idle and do nothing
- When using [Watch Your Death](https://gta5-mods.com/scripts/watch-your-death), while player is dead, enemies can run to ally spawnpoint without fighting, or be idle

## TODO

- Allow to pause & resume ped spawning
- Avoid spawn-killing
- Add winning conditions
- Smooth transition from battle end to cleanup (extra step?)
- Add menu/more hotkeys to improve UX?
- Respawn on ally spawnpoint after player dies
- Respawn player on ally spawnpoint after dying
- Organize data, settings, variables - for each teams on the script structurally (struct?)

## Changelog

- 1.1.1 - Options to set ped limit per team
- 2.1.1
- Add CombatRange setting
- Add ProcessOtherRelationshipGroups setting
- Add IdleInterval & BattleInterval settings to .ini file (they were defined on the script but not documented on the .ini file)
- Add docstrings to the script functions
- 2.0.1
- Pause/resume ped spawning in both teams
- Fix usage of default hotkeys when not specified in .ini file
- Rearrange variables in script
- Refactor README
- 1.1.1
- Options to set ped limit per team
- 1.0.1
- Support settings through .ini file
- Change if-else to switch in OnKeyUp
Expand All @@ -78,9 +104,5 @@ _All lists of items (models & weapons) are separated by comma (`,`) or semi-colo
- Option to select ped task behaviour
- Option to select combat movement for each team
- Different script Tick intervals for idle or in-battle
- 0.0.1 - Initial release

## Known bugs

- If spawnpoints are too far away from each other, peds can idle and do nothing
- When using [Watch Your Death](https://gta5-mods.com/scripts/watch-your-death), while player is dead, enemies can run to ally spawnpoint without fighting, or be idle
- 0.0.1
- Initial release
Loading

0 comments on commit 17ddbcb

Please sign in to comment.