Skip to content

Conversation

@CamperNoob
Copy link
Contributor

  • Added PLAYER_POSSESS_SOLDIER event to determine player's team (extension of PLAYER_POSSESS, writes team data to player.teamName). Uses lookup\soldier-lookup.js to translate filenames into more consistent team names.
  • Added VEHICLE_DAMAGED event on a new squad log record type (from update that added destroyed vehicles counter in scoreboards) and extension VEHICLE_DESTROYED. Uses log-parser\lookup\vehicles-lookup.js to determine vehicle teams.
  • Added dblog_VehicleDestroys table in plugins\db-log.js which stores VEHICLE_DESTROYED events after teamkill calculation (done with plugins\lookup\factions-lookup.js to improve confidence of teamkill).
  • Updated plugins\socket-io-api.js to include all new event types: VEHICLE_DAMAGED, VEHICLE_DESTROYED, PLAYER_POSSESS_SOLDIER.

Known issues:

  • teamkill is not determined correctly 100% time - issue exists because of how the log record is structured - it includes attacker info and vehicle file name only. The only sensible way to determine teamkill - store teamName from player_possess_soldier, since all soldier model names include the faction name (e.g. BP_Soldier_PLA_Rifleman1.uasset), and compare it to vehicle teamName array (since some vehicles, for example RHIB, appear for multiple factions).
  • Vehicle destruction by ammo rack explosion is not written in db-log. Issue exists because the log record for this case doesn't have attacker info. Not the case for destruction from fire - record contains attacker info in this case
  • Some vehicles in log-parser\lookup\vehicles-lookup.js may have some incorrect faction assignments, since this information was manually determined according to squad wiki. Vehicle list itself is full (maybe includes a few entries not for vehicle, but it's turret) - according to files present in Squad Editor.
  • db-log will store teamkill = null when it fails to determine if destroyed vehicle was teamkilled or not (can happen if vehicle is not present in lookup, or player team name was empty for any reason).
  • player.teamName will be empty if SquadJS will be started/restarted mid-game (after players were already spawned) and will remain empty until the player exits the vehicle, or respawns.

P.S. Branch is open for commits in case locations of lookup files should be changed, or modifications to lookups themselves should be made.

Finished with logic, filling up the lookups
Add more, enclose in quotes for abc-123 cases
ADF, BAF, CAF, USA, USMC = BLUFOR
PLA, PLANMC, PLAAGF = PAC
RGF, RAF = RUS
MEA, TLF, INS, IMF, WPMC - left as is
Finished with the list
Added missed INS in rhib logi and transport
Added 'Side' lookup
Added all available in SDK vehicles (some may be just referring to turret).
Sorted alphabetically.
remove plugin used for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant