Skip to content

Commit

Permalink
Merge pull request #13 from David-Lor/develop
Browse files Browse the repository at this point in the history
0.1.2
  • Loading branch information
David-Lor authored Oct 31, 2021
2 parents 386703e + 54c1c88 commit 168ba39
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 148 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ obj/
*.config
*.sln*
global.json
local/
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ The key `F9` ("Hotkey") is used to navigate through all the steps of the script.

An additional hotkey `F8` ("SpawnHotkey") is used to pause/resume the ped spawning in both teams.

### Battle functionality

- When the battle starts, peds from both teams will spawn on their respective spawnpoints, and start fighting their adversaries.
- As peds get killed¹, new peds are spawned on the respective team spawnpoint as replacements.
- The settings "MaxPeds"/"MaxPedsPerTeam" are used to determine how many peds can be fighting on each team at the same time, regulating the respawn rate of reinforcements.

¹ _In this GTA IV implementation, peds that are "Wounded In Action" are treated as killed - this means peds that are still alive, but hurt and bleeding on the floor, unable to keep fighting.
Notice that in GTAV and RDR2, wounded peds remain alive for a small time, while in GTA IV they can remain for longer (forever?)._

#### Ending a battle

- Different mechanisms are provided for making a battle end naturally. This is done by making one ped run out of peds, by disabling the respawning (on that team or both teams) and having all their members killed.
- The battle can be paused and resumed any time with the "SpawnHotkey" - the existing peds will keep fighting, but no more peds will spawn on any of the teams.
- The setting "MaxSpawnPeds" can be used for limiting the amount of replacements that will spawn for a team. Please notice that this will NOT spawn any more peds on the team that reaches this limit for the current battle, even if pausing/resuming it with the "SpawnHotkey".
- When the battle is definitively ended (using the main hotkey to navigate between the different stages of the script), all the peds (both alive and killed/downed) are instantly removed from the game.

## Settings

Settings can be defined on the `SimpleGangWar.ini` file, being the following:
Expand All @@ -32,8 +48,9 @@ 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. **If any item name does not exist, SimpleGangWar will crash!**_

- `Models`: list of ped models ([Reference](docs/PedModels.md))
- `Weapons`: list of ped weapons ([Reference](docs/Weapons.md))
- Ped models and weapons: each ped will spawn with a random Ped Model and Weapon, chosen from the configured Models and Weapons lists.
- `Models`: list of ped models ([Reference](docs/PedModels.md))
- `Weapons`: list of ped weapons ([Reference](docs/Weapons.md))
- `Health`: health for peds (should not be less than 100; if -1, not changed)
- `Armor`: armor for peds (greater/equal to 0; if -1, not changed)
- `Accuracy`: accuracy for peds (greater/equal to 0; if -1, not changed)
Expand All @@ -56,21 +73,23 @@ _All lists of items (models & weapons) are separated by comma (`,`) or semi-colo

## Known bugs

- First spawned peds may stand still and not fight. A possible workaround is to bump into them, or kill them.
- RunToSpawnpoint=true is not working fine; peds usually keep stuttering forever, or slow-walk into the enemies.
This is a list of known issues that are currently not being tracked, or are unfixable. Other bugs that may get fixed in the future are listed on [Issues](https://github.com/David-Lor/GTAIV-SimpleGangWar/issues).

- RunToSpawnpoint=true is not working fine; peds usually keep stuttering forever, or slow-walk into the enemies. For now it's recommended to keep this setting disabled, as peds seem to fight well with the defaul behaviour.
- Peds may not fight if spawnpoints are too far.
- Usage during missions may cause different problems:
- Allies may not follow the player
- Mission and SimpleGangWar enemies may fight each other (this may be fixed when implementing the ProcessOtherRelationshipGroups feature)

## TODO

- Support .ini config file
- Make spawnpoint blips blink (or change in any other way) when spawning is paused.
- Implement other missing configuration features...

## Changelog

- 0.1.2
- fix: wounded (no longer fighting) peds are now counted as killed (so reinforcements can respawn)
- fix: peds blips not being deleted on ped kill
- fix: script crash when processing spawned peds that no longer exist
- refactor: new Fighter class that holds info about each spawned ped (Ped object, Blip object, team); this allows fixing some of the bugs solved on this version
- style: refactor code style
- docs(README): describe how the battle works; describe difference between Known Bugs and Github Issues
- 0.1.1
- Support for .ini config file, and multiple configurations from SimpleGangWar integrated
- 0.0.1
Expand Down
Loading

0 comments on commit 168ba39

Please sign in to comment.