Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47e4cd949c | ||
|
|
ca2ef84d55 | ||
|
|
02ba70198f | ||
|
|
f959f7dd91 | ||
|
|
7aa6c9476f | ||
|
|
0f0d89c9c3 | ||
|
|
d56b2878a2 | ||
|
|
5a5591d7b4 | ||
|
|
48c415c9ba | ||
|
|
11ae2bac90 | ||
|
|
f7e4588f80 | ||
|
|
b8879c3560 | ||
|
|
1c5ab1514b | ||
|
|
c538dd44f3 | ||
|
|
df4ee8fb0c | ||
|
|
ba0c4d11c7 | ||
|
|
c1cd3a6fc7 | ||
|
|
a8bbd9ea39 | ||
|
|
ff06daefae | ||
|
|
e1d5801d9a | ||
|
|
d4efc94e7d | ||
|
|
81b1b4f928 | ||
|
|
1d6b09537f | ||
|
|
8501955cea | ||
|
|
aa979e6bb4 | ||
|
|
e81bd9c49d | ||
|
|
bd6c98a59a | ||
|
|
66eaaf472b | ||
|
|
e361f4c543 | ||
|
|
aff50542f9 | ||
|
|
58a31f6b67 | ||
|
|
16ef610d57 | ||
|
|
fa061048f4 | ||
|
|
52387afe33 | ||
|
|
283134f455 | ||
|
|
64f22ff648 | ||
|
|
f2b09667e7 | ||
|
|
ffe6fec939 | ||
|
|
d372ecaff1 | ||
|
|
96b7aaaa07 | ||
|
|
3485cc783a | ||
|
|
9b732b2f5e | ||
|
|
aee8c91670 | ||
|
|
a18c59931f | ||
|
|
40f1af931e | ||
|
|
b2cb958673 | ||
|
|
2a15573826 | ||
|
|
d74c57ec2b | ||
|
|
908a875f6d | ||
|
|
1109be0ece | ||
|
|
ddfb34a9f8 | ||
|
|
739b265fab | ||
|
|
a262c7ff45 | ||
|
|
da25a4dd29 | ||
|
|
84ab278d92 | ||
|
|
c41173ad13 | ||
|
|
2fdcf288d4 | ||
|
|
3985b3dd5c | ||
|
|
ae963b245f | ||
|
|
30be7f5bf5 | ||
|
|
1a0b074816 | ||
|
|
42f8c0d0f4 | ||
|
|
5735e67c2f | ||
|
|
2d2d456a85 | ||
|
|
a5844b6be4 | ||
|
|
6f4425872b | ||
|
|
748981160a | ||
|
|
90401c8567 | ||
|
|
1b914dc5cf | ||
|
|
413d9f6cf3 | ||
|
|
240a07d9fa | ||
|
|
550c899323 | ||
|
|
2466febd4e | ||
|
|
aedfc9afc0 | ||
|
|
cdd00dc2b7 | ||
|
|
4ce976cc88 | ||
|
|
687819e604 | ||
|
|
2395d3d99b | ||
|
|
d23d020e6a | ||
|
|
e51386252d | ||
|
|
54d26f568b | ||
|
|
53fb421662 | ||
|
|
e6aaebef5f | ||
|
|
9798a5ff76 |
@@ -1,6 +1,6 @@
|
|||||||
# Pulse
|
# pulse
|
||||||
|
|
||||||
Pulse is a clientside mod for [TF|2 + Northstar](https://github.com/R2Northstar/Northstar) letting you view killstats collected by [the Tone API](https://toneapi.github.io/ToneAPI_webclient/) using the otherwise non-functional `Stats` tab.
|
**pulse** is a clientside mod for [TF|2 + Northstar](https://github.com/R2Northstar/Northstar) letting you view killstats collected by [the Tone API](https://toneapi.github.io/ToneAPI_webclient/) using the otherwise non-functional `Stats` tab.
|
||||||
|
|
||||||
## Currently, features include:
|
## Currently, features include:
|
||||||
- mostly functional `Overview` tab,
|
- mostly functional `Overview` tab,
|
||||||
@@ -12,7 +12,7 @@ Pulse is a clientside mod for [TF|2 + Northstar](https://github.com/R2Northstar/
|
|||||||
|
|
||||||
Want to know what we have planned for future updates? See [here.](https://github.com/ToneAPI/pulse/projects?query=is%3Aopen)
|
Want to know what we have planned for future updates? See [here.](https://github.com/ToneAPI/pulse/projects?query=is%3Aopen)
|
||||||
|
|
||||||
Found a bug? Make an issue on Github [here.](https://github.com/ToneAPI/pulse/issues/new)
|
Found a bug? Make an issue on GitHub [here.](https://github.com/ToneAPI/pulse/issues/new)
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Features, more in-depth:</summary>
|
<summary>Features, more in-depth:</summary>
|
||||||
@@ -21,7 +21,7 @@ Found a bug? Make an issue on Github [here.](https://github.com/ToneAPI/pulse/is
|
|||||||
- Most Kills - shows the weapon with most accumulated kills.
|
- Most Kills - shows the weapon with most accumulated kills.
|
||||||
- Nemesis Weapon - shows the weapon that has killed you the most.
|
- Nemesis Weapon - shows the weapon that has killed you the most.
|
||||||
- Most Effective - shows weapon with the highest K/D ratio.
|
- Most Effective - shows weapon with the highest K/D ratio.
|
||||||
- Kill/Death Ratio - shows the overall K/D ratio of player. (the two line graphs "Lifetime Avg." and "Lifetime Avg. vs. Players" don't work.)
|
- Kill/Death Ratio - shows the overall K/D ratio of player compared to global K/D.
|
||||||
- Kills as Pilot - shows general kill data for player as Pilot, visualised in the table below:
|
- Kills as Pilot - shows general kill data for player as Pilot, visualised in the table below:
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
@@ -31,12 +31,12 @@ Found a bug? Make an issue on Github [here.](https://github.com/ToneAPI/pulse/is
|
|||||||
| AI kills |Non-functional, Tone API does not collect AI kill data.|
|
| AI kills |Non-functional, Tone API does not collect AI kill data.|
|
||||||
| Pilot melee kills |Shows only melee kills accumulated by player as Pilot.|
|
| Pilot melee kills |Shows only melee kills accumulated by player as Pilot.|
|
||||||
| Pilot executions |Shows only executions accumulated by player as Pilot.|
|
| Pilot executions |Shows only executions accumulated by player as Pilot.|
|
||||||
|
|
||||||
- Kills as Titan - shows general kill data for player as Titan, visualised in the table below:
|
- Kills as Titan - shows general kill data for player as Titan, visualised in the table below:
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
|--------------------|------------------------------------------------------|
|
|--------------------|------------------------------------------------------|
|
||||||
| Pilots |Shows **ALL KILLS** accumulated by player as Pilot. Differentiating Pilot and Titan kills will come in a later Tone API update.|
|
| Pilots |Shows **ALL KILLS** accumulated by player as Titan. Differentiating Pilot and Titan kills will come in a later Tone API update.|
|
||||||
| Titans |Non-functional, see line above.|
|
| Titans |Non-functional, see line above.|
|
||||||
| Titan executions |Shows only executions accumulated by player as Titan.|
|
| Titan executions |Shows only executions accumulated by player as Titan.|
|
||||||
| Pilots meleed |Shows only melee kills accumulated by player as Titan.|
|
| Pilots meleed |Shows only melee kills accumulated by player as Titan.|
|
||||||
@@ -73,8 +73,37 @@ Found a bug? Make an issue on Github [here.](https://github.com/ToneAPI/pulse/is
|
|||||||
- Kills by Gamemode - piechart showing all kills (in percent) on chosen map by gamemode.
|
- Kills by Gamemode - piechart showing all kills (in percent) on chosen map by gamemode.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## DISCLAIMER
|
## DISCLAIMERS
|
||||||
|
|
||||||
The Tone API is NOT used by every server, view a list of supported servers [here.](https://tone.sleepycat.date/v2/client/servers)
|
The Tone API is NOT used by every server, view a list of supported servers [here.](https://tone.sleepycat.date/v2/client/servers)
|
||||||
|
**pulse** is very much a W.I.P as of right now, features may be missing/nonfunctional.
|
||||||
|
|
||||||
Pulse is very much a W.I.P as of right now, features may be missing/nonfunctional.
|
As of v2.1.0, **pulse** requires [loeb](https://github.com/okvdai/loeb)
|
||||||
|
|
||||||
|
## CHANGELOG
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary> pulse v2.0.0 "Demeter" </summary>
|
||||||
|
|
||||||
|
- Switched to Thunderstore template on the GitHub site for easier development.
|
||||||
|
- General code rewrite - lots of improvements for easier development. Rewrite includes:
|
||||||
|
- common code file, for better code readability and ease of development,
|
||||||
|
- new parser, allowing for better expandability and faster data processing (and much simpler implementation, unlike the hellspawn that was the previous `getFromToneAPI` function),
|
||||||
|
- new request function, more compact and simple than previous iterations,
|
||||||
|
- other functions that simplify the code and make it easier to read / develop
|
||||||
|
- Localisation, currently available in:
|
||||||
|
- English,
|
||||||
|
- French,
|
||||||
|
- German,
|
||||||
|
- Italian,
|
||||||
|
- Polish. (Northstar isn't translated into Polish, but the game supports it.)
|
||||||
|
- Locking the Stats tab, avoiding situations where you could click too fast and see no stats. Also prevents the game from showing stats when the API is unreachable.
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary> pulse v2.1.0 </summary>
|
||||||
|
|
||||||
|
- Changed endpoint
|
||||||
|
- Lots of bug fixes
|
||||||
|
- Uses new experimental loeb library
|
||||||
|
</details>
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "Pulse",
|
||||||
|
"description": "Adds stats (collected by the Tone API) back to the Stats tab.",
|
||||||
|
"version_number": "2.1.1",
|
||||||
|
"website_url": "https://github.com/ToneAPI/pulse",
|
||||||
|
"dependencies": ["Okudai-loeb-1.0.1"]
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"Name": "ToneAPI.pulse",
|
|
||||||
"Description": "Displays Tone API kill data in the Stats tab.",
|
|
||||||
"Version": "1.2.0",
|
|
||||||
"LoadPriority": 1,
|
|
||||||
"ConVars": [
|
|
||||||
{
|
|
||||||
"Name": "ToneURL",
|
|
||||||
"DefaultValue": "https://tone.sleepycat.date/v2/client"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Scripts": [
|
|
||||||
{
|
|
||||||
"Path": "pulse.gnut",
|
|
||||||
"RunOn": "UI",
|
|
||||||
"UICallback": {
|
|
||||||
"After": "pulseInit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
global function pulseInit
|
|
||||||
global function GetWeaponStatsFromToneAPI
|
|
||||||
global function GetMapStatsFromToneAPI
|
|
||||||
global function GetGamemodeStatsFromToneAPI
|
|
||||||
global function getWeaponKillsFromToneAPI
|
|
||||||
global function getNemesisWeaponFromToneAPI
|
|
||||||
global function getDWEFromToneAPI
|
|
||||||
global function getMapKillFromToneAPI
|
|
||||||
global function getMapDeathFromToneAPI
|
|
||||||
global function getMapDistFromToneAPI
|
|
||||||
global function getMapMDistFromToneAPI
|
|
||||||
global function fetchGamemodeStatsFromToneAPI
|
|
||||||
|
|
||||||
global table globalToneAPIKillData = {}
|
|
||||||
global table globalToneAPIDeathData = {}
|
|
||||||
global table globalToneAPIDWEData = {}
|
|
||||||
global table globalToneAPIMapDeathData = {}
|
|
||||||
global table globalToneAPIMapDistData = {}
|
|
||||||
global table globalToneAPIMapKillData = {}
|
|
||||||
global table globalToneAPIMapMDistData = {}
|
|
||||||
global table globalToneAPIGamemodeData = {}
|
|
||||||
global table< table > globalToneAPIGamemodeMapData = {}
|
|
||||||
|
|
||||||
string prefix = "default"
|
|
||||||
string HTTPrequestURL = "default"
|
|
||||||
int weaponEntries = 0
|
|
||||||
int mapEntries = 0
|
|
||||||
int gamemodeEntries = 0
|
|
||||||
int mapGamemodeEntries = 0
|
|
||||||
|
|
||||||
void function pulseInit()
|
|
||||||
{
|
|
||||||
HTTPrequestURL = GetConVarString("ToneURL")
|
|
||||||
prefix = "\x1b[38;2;255;178;102m[PULSE]\x1b[0m "
|
|
||||||
print(prefix + "v1.2.0 has been loaded.")
|
|
||||||
}
|
|
||||||
|
|
||||||
void function GetWeaponStatsFromToneAPI()
|
|
||||||
{
|
|
||||||
print(prefix + "Getting kill data...")
|
|
||||||
weaponEntries = 0
|
|
||||||
HttpRequest getWeaponStats
|
|
||||||
getWeaponStats.method = HttpRequestMethod.GET
|
|
||||||
getWeaponStats.url = HTTPrequestURL + "/weapons"
|
|
||||||
getWeaponStats.queryParameters["player"] <- [NSGetLocalPlayerUID()]
|
|
||||||
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
|
|
||||||
{
|
|
||||||
print(prefix + "Kill data received, processing...")
|
|
||||||
table JSONForConversion = DecodeJSON(response.body)
|
|
||||||
foreach (var key, var value in JSONForConversion) {
|
|
||||||
table test = expect table(value)
|
|
||||||
globalToneAPIKillData[string(key)] <- test.kills
|
|
||||||
globalToneAPIDeathData[string(key)] <- test.deaths
|
|
||||||
globalToneAPIDWEData[string(key)] <- test.deaths_while_equipped
|
|
||||||
weaponEntries += 1
|
|
||||||
}
|
|
||||||
print(prefix + "Kill data has been processed with a total of " + string(weaponEntries) + " entries.")
|
|
||||||
}
|
|
||||||
|
|
||||||
void functionref(HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
|
||||||
{
|
|
||||||
print(prefix + "Encountered an error getting kill data...")
|
|
||||||
}
|
|
||||||
|
|
||||||
NSHttpRequest(getWeaponStats, onSuccess, onFailure)
|
|
||||||
}
|
|
||||||
|
|
||||||
void function GetMapStatsFromToneAPI()
|
|
||||||
{
|
|
||||||
print(prefix + "Getting map data...")
|
|
||||||
mapEntries = 0
|
|
||||||
HttpRequest getMapStats
|
|
||||||
getMapStats.method = HttpRequestMethod.GET
|
|
||||||
getMapStats.url = HTTPrequestURL + "/maps"
|
|
||||||
getMapStats.queryParameters["player"] <- [NSGetLocalPlayerUID()]
|
|
||||||
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
|
|
||||||
{
|
|
||||||
print(prefix + "Map data received, processing...")
|
|
||||||
table JSONForConversion = DecodeJSON(response.body)
|
|
||||||
foreach (var key, var value in JSONForConversion) {
|
|
||||||
table test = expect table(value)
|
|
||||||
globalToneAPIMapKillData[string(key)] <- test.kills
|
|
||||||
globalToneAPIMapDeathData[string(key)] <- test.deaths
|
|
||||||
globalToneAPIMapDistData[string(key)] <- test.total_distance
|
|
||||||
globalToneAPIMapMDistData[string(key)] <- test.max_distance
|
|
||||||
mapEntries += 1
|
|
||||||
}
|
|
||||||
print(prefix + "Map data has been processed with a total of " + string(mapEntries) + " entries.")
|
|
||||||
}
|
|
||||||
|
|
||||||
void functionref(HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
|
||||||
{
|
|
||||||
print(prefix + "Encountered an error getting map data...")
|
|
||||||
}
|
|
||||||
|
|
||||||
NSHttpRequest(getMapStats, onSuccess, onFailure)
|
|
||||||
}
|
|
||||||
|
|
||||||
void function GetGamemodeStatsFromToneAPI()
|
|
||||||
{
|
|
||||||
print(prefix + "Getting gamemode data...")
|
|
||||||
gamemodeEntries = 0
|
|
||||||
HttpRequest getGamemodeStats
|
|
||||||
getGamemodeStats.method = HttpRequestMethod.GET
|
|
||||||
getGamemodeStats.url = HTTPrequestURL + "/gamemodes"
|
|
||||||
getGamemodeStats.queryParameters["player"] <- [NSGetLocalPlayerUID()]
|
|
||||||
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
|
|
||||||
{
|
|
||||||
print(prefix + "Gamemode data received, processing...")
|
|
||||||
table JSONForConversion = DecodeJSON(response.body)
|
|
||||||
foreach (var key, var value in JSONForConversion) {
|
|
||||||
table test = expect table(value)
|
|
||||||
globalToneAPIGamemodeData[string(key)] <- test.kills
|
|
||||||
gamemodeEntries += 1
|
|
||||||
}
|
|
||||||
print(prefix + "Gamemode data has been processed with a total of " + string(gamemodeEntries) + " entries.")
|
|
||||||
}
|
|
||||||
|
|
||||||
void functionref(HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
|
||||||
{
|
|
||||||
print(prefix + "Encountered an error getting gamemode data...")
|
|
||||||
}
|
|
||||||
|
|
||||||
NSHttpRequest(getGamemodeStats, onSuccess, onFailure)
|
|
||||||
}
|
|
||||||
|
|
||||||
void function fetchGamemodeStatsFromToneAPI(string mapName)
|
|
||||||
{
|
|
||||||
mapGamemodeEntries = 0
|
|
||||||
string mapNameSliced = mapName.slice(3)
|
|
||||||
HttpRequest getMapGamemodeStats
|
|
||||||
getMapGamemodeStats.method = HttpRequestMethod.GET
|
|
||||||
getMapGamemodeStats.url = HTTPrequestURL + "/gamemodes"
|
|
||||||
getMapGamemodeStats.queryParameters["map"] <- [mapNameSliced]
|
|
||||||
getMapGamemodeStats.queryParameters["player"] <- [NSGetLocalPlayerUID()]
|
|
||||||
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response):(mapName)
|
|
||||||
{
|
|
||||||
table JSONForConversion = DecodeJSON(response.body)
|
|
||||||
table mapData = {}
|
|
||||||
foreach (var gamemode, var value in JSONForConversion) {
|
|
||||||
table test = expect table(value)
|
|
||||||
mapData[string(gamemode)] <- test.kills
|
|
||||||
mapGamemodeEntries += 1
|
|
||||||
}
|
|
||||||
|
|
||||||
globalToneAPIGamemodeMapData[mapName] <- mapData
|
|
||||||
|
|
||||||
print(prefix + "Map gamemode data has been processed with a total of " + string(mapGamemodeEntries) + " entries.")
|
|
||||||
}
|
|
||||||
|
|
||||||
void functionref(HttpRequestFailure) onFailure = void function(HttpRequestFailure failure)
|
|
||||||
{
|
|
||||||
print(prefix + "Encountered an error getting map gamemode data...")
|
|
||||||
}
|
|
||||||
|
|
||||||
NSHttpRequest(getMapGamemodeStats, onSuccess, onFailure)
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getWeaponKillsFromToneAPI(string weaponRef){
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIKillData){
|
|
||||||
return expect int(globalToneAPIKillData[weaponRef])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getNemesisWeaponFromToneAPI(string weaponRef){
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIDeathData){
|
|
||||||
return expect int(globalToneAPIDeathData[weaponRef])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getDWEFromToneAPI(string weaponRef){
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIDWEData){
|
|
||||||
return expect int(globalToneAPIDWEData[weaponRef])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getMapKillFromToneAPI(string mapName){
|
|
||||||
|
|
||||||
mapName = mapName.slice(3)
|
|
||||||
if(mapName in globalToneAPIMapKillData){
|
|
||||||
return expect int(globalToneAPIMapKillData[mapName])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getMapDeathFromToneAPI(string mapName){
|
|
||||||
|
|
||||||
mapName = mapName.slice(3)
|
|
||||||
if(mapName in globalToneAPIMapDeathData){
|
|
||||||
return expect int(globalToneAPIMapDeathData[mapName])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getMapMDistFromToneAPI(string mapName){
|
|
||||||
|
|
||||||
mapName = mapName.slice(3)
|
|
||||||
if(mapName in globalToneAPIMapMDistData){
|
|
||||||
return expect int(globalToneAPIMapMDistData[mapName])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
int function getMapDistFromToneAPI(string mapName){
|
|
||||||
|
|
||||||
mapName = mapName.slice(3)
|
|
||||||
if(mapName in globalToneAPIMapDistData){
|
|
||||||
return expect int(globalToneAPIMapDistData[mapName])
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
|
|
||||||
global function InitViewStatsMenu
|
|
||||||
|
|
||||||
struct{
|
|
||||||
array<string> allMaps
|
|
||||||
} file
|
|
||||||
|
|
||||||
void function InitViewStatsMenu()
|
|
||||||
{
|
|
||||||
var menu = GetMenu( "ViewStatsMenu" )
|
|
||||||
|
|
||||||
AddMenuEventHandler( menu, eUIEvent.MENU_OPEN, OnViewStats_Open )
|
|
||||||
|
|
||||||
var button = Hud_GetChild( menu, "BtnOverview" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_OVERVIEW" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Overview_Menu" ) ) )
|
|
||||||
|
|
||||||
button = Hud_GetChild( menu, "BtnTime" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_TIME" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Time_Menu" ) ) )
|
|
||||||
|
|
||||||
button = Hud_GetChild( menu, "BtnPilotWeapons" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_PILOT_WEAPONS" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Weapons_Menu" ) ) )
|
|
||||||
|
|
||||||
button = Hud_GetChild( menu, "BtnTitans" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_TITANS" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Titans_Menu" ) ) )
|
|
||||||
|
|
||||||
button = Hud_GetChild( menu, "BtnMaps" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_MAPS" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Maps_Menu" ) ) )
|
|
||||||
|
|
||||||
button = Hud_GetChild( menu, "BtnMisc" )
|
|
||||||
SetButtonRuiText( button, Localize( "#STATS_MISC" ) )
|
|
||||||
AddButtonEventHandler( button, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "ViewStats_Misc_Menu" ) ) )
|
|
||||||
|
|
||||||
AddMenuFooterOption( menu, BUTTON_A, "#A_BUTTON_SELECT" )
|
|
||||||
AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
|
|
||||||
}
|
|
||||||
|
|
||||||
void function OnViewStats_Open()
|
|
||||||
{
|
|
||||||
foreach(elemNum in file.allMaps){
|
|
||||||
string mapName = expect string(file.allMaps[ elemNum ])
|
|
||||||
fetchGamemodeStatsFromToneAPI(mapName)
|
|
||||||
}
|
|
||||||
GetWeaponStatsFromToneAPI()
|
|
||||||
GetMapStatsFromToneAPI()
|
|
||||||
GetGamemodeStatsFromToneAPI()
|
|
||||||
UI_SetPresentationType( ePresentationType.DEFAULT )
|
|
||||||
|
|
||||||
//UpdateViewStatsKillsMenu()
|
|
||||||
//UpdateViewStatsDistanceMenu()
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"Name": "ToneAPI.pulse",
|
||||||
|
"Description": "Displays Tone API kill data in the Stats tab.",
|
||||||
|
"Version": "2.1.1",
|
||||||
|
"LoadPriority": 1,
|
||||||
|
"ConVars": [
|
||||||
|
{
|
||||||
|
"Name": "ToneURL",
|
||||||
|
"DefaultValue": "https://toneapi.ovh/v2/client"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Scripts": [
|
||||||
|
{
|
||||||
|
"Path":"pulse-common-func.gnut",
|
||||||
|
"RunOn":"UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "pulse.gnut",
|
||||||
|
"RunOn": "UI",
|
||||||
|
"UICallback": {
|
||||||
|
"After": "pulseInit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Localisation": [
|
||||||
|
"resource/pulse_%language%.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -532,7 +532,7 @@ resource/ui/menus/viewstats_pve.menu
|
|||||||
visible 1
|
visible 1
|
||||||
font Default_23
|
font Default_23
|
||||||
labelText "--"
|
labelText "--"
|
||||||
allcaps 1
|
allcaps 0
|
||||||
textAlignment center
|
textAlignment center
|
||||||
fgcolor_override "255 255 255 255"
|
fgcolor_override "255 255 255 255"
|
||||||
//bgcolor_override "0 255 0 100"
|
//bgcolor_override "0 255 0 100"
|
||||||
+1
-1
@@ -323,7 +323,7 @@ resource/ui/menus/viewstats_overview.menu
|
|||||||
tall 45
|
tall 45
|
||||||
visible 1
|
visible 1
|
||||||
font Default_31
|
font Default_31
|
||||||
labelText "NEMESIS WEAPON"
|
labelText "#NEMESIS_WEAPON"
|
||||||
allcaps 1
|
allcaps 1
|
||||||
wrap 1
|
wrap 1
|
||||||
textAlignment west
|
textAlignment west
|
||||||
+1
-1
@@ -345,7 +345,7 @@ resource/ui/menus/viewstats_weapons.menu
|
|||||||
tall 36
|
tall 36
|
||||||
visible 1
|
visible 1
|
||||||
font Default_23
|
font Default_23
|
||||||
labelText "DEATHS WITH WEAPON"
|
labelText "#DEATHS_WHILE_EQUIPPED"
|
||||||
allcaps 1
|
allcaps 1
|
||||||
textAlignment west
|
textAlignment west
|
||||||
fgcolor_override "255 255 255 255"
|
fgcolor_override "255 255 255 255"
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
globalize_all_functions
|
||||||
|
|
||||||
|
global enum ePulseDataType
|
||||||
|
{
|
||||||
|
WEAPON,
|
||||||
|
MAP,
|
||||||
|
GAMEMODE,
|
||||||
|
}
|
||||||
|
|
||||||
|
global struct pulseDataStruct
|
||||||
|
{
|
||||||
|
ePulseDataType dataType,
|
||||||
|
string dataName,
|
||||||
|
bool global,
|
||||||
|
int kills,
|
||||||
|
int deaths,
|
||||||
|
int max_distance,
|
||||||
|
int total_distance,
|
||||||
|
int deaths_while_equipped
|
||||||
|
}
|
||||||
|
|
||||||
|
global string pulsePrefix
|
||||||
|
void function pulsePrefixSet() //Sets our prefix
|
||||||
|
{
|
||||||
|
pulsePrefix = format("\x1b[38;2;%i;%i;%im[PULSE]\x1b[0m", 255, 178, 102)
|
||||||
|
}
|
||||||
|
|
||||||
|
void function pulsePrintt(string content) //Prints whatever we want printed with given prefix (by standard [PULSE]).
|
||||||
|
{
|
||||||
|
printt(format("%s " + content, pulsePrefix))
|
||||||
|
}
|
||||||
|
|
||||||
|
bool function pulseRequestData(string givenURL, table parameterTable, string tablepath) //Gets data from API (see ToneURL within mod.json) and puts it into one table for processing.
|
||||||
|
{
|
||||||
|
table<string, array<string> > requestTable
|
||||||
|
ePulseDataType requestedDataType
|
||||||
|
|
||||||
|
if ("weapon" in parameterTable)
|
||||||
|
{
|
||||||
|
requestedDataType = ePulseDataType.WEAPON
|
||||||
|
}
|
||||||
|
else if ("map" in parameterTable)
|
||||||
|
{
|
||||||
|
requestedDataType = ePulseDataType.MAP
|
||||||
|
}
|
||||||
|
else if ("gamemode" in parameterTable)
|
||||||
|
{
|
||||||
|
requestedDataType = ePulseDataType.GAMEMODE
|
||||||
|
}
|
||||||
|
|
||||||
|
void functionref (HttpRequestResponse) onSuccess = void function(HttpRequestResponse response) : (givenURL, parameterTable, requestTable, tablepath, requestedDataType)
|
||||||
|
{
|
||||||
|
if (NSIsSuccessHttpCode(respone.StatusCode))
|
||||||
|
{
|
||||||
|
table DecodedJSON = DecodeJSON(response.body)
|
||||||
|
foreach (var key in DecodedJSON) {
|
||||||
|
table dData = DecodedJSON[key]
|
||||||
|
pulseDataStruct data = {
|
||||||
|
dataType = requestedDataType,
|
||||||
|
dataName = string(key),
|
||||||
|
global = tablepath.find("Global") != null ? true : false;
|
||||||
|
int kills = "kills" in dData ? dData["kills"] : 0
|
||||||
|
int deaths = "deaths" in dData ? dData["deaths"] : 0
|
||||||
|
int max_distance = "max_distance" in dData ? dData["max_distance"] : 0
|
||||||
|
int total_distance = "total_distance" in dData ? dData["total_distance"] : 0
|
||||||
|
int deaths_while_equipped = "deaths_while_equipped" in dData ? dData["deaths_while_equipped"] : 0
|
||||||
|
}
|
||||||
|
pulseData.append(data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pulsePrintt(format("%s, %s is unreachable.", response.statusCode, givenURL))
|
||||||
|
pulseLockStats()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void functionref (HttpRequestFailure) onFailure = void function(HttpRequestFailure failure) : (givenURL)
|
||||||
|
{
|
||||||
|
pulsePrintt(format("Something went wrong, %s is unreachable", givenURL))
|
||||||
|
pulseLockStats()
|
||||||
|
}
|
||||||
|
foreach (key, value in parameterTable)
|
||||||
|
{
|
||||||
|
requestTable[string(key)] <- [string(value)]
|
||||||
|
}
|
||||||
|
return NSHttpGet(givenURL, requestTable, onSuccess, onFailure)
|
||||||
|
}
|
||||||
|
|
||||||
|
void function pulseLockStats()
|
||||||
|
{
|
||||||
|
loebSetLockedButton(Localize("#MENU_TITLE_STATS"), true)
|
||||||
|
}
|
||||||
|
|
||||||
|
string function HammerToMeterString(float value)
|
||||||
|
{
|
||||||
|
return value > 0 && int((1.905 * value ))/100 > 0 ? string(int((1.905 * value ) )/100) + "m" : "0";
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
global function pulseInit
|
||||||
|
global function pulseGetData
|
||||||
|
|
||||||
|
global array<pulseDataStruct> pulseData = []
|
||||||
|
|
||||||
|
struct {
|
||||||
|
array<string> allMaps
|
||||||
|
} file
|
||||||
|
|
||||||
|
void function pulseInit()
|
||||||
|
{
|
||||||
|
pulsePrefixSet()
|
||||||
|
file.allMaps = GetPrivateMatchMaps()
|
||||||
|
pulsePrintt("Initialized.")
|
||||||
|
AddUICallback_OnLevelInit( pulseGetData )
|
||||||
|
}
|
||||||
|
|
||||||
|
void function pulseGetData()
|
||||||
|
{
|
||||||
|
print("data getter called")
|
||||||
|
string URL = GetConVarString("ToneURL")
|
||||||
|
array <string> URLpath = ["/weapons", "/weapons", "/gamemodes", "/gamemodes", "/maps"]
|
||||||
|
array <string> tablepath = ["weaponsLocal", "weaponsGlobal", "gamemodesAll", "gamemodesSeparated", "maps"]
|
||||||
|
pulseRequestData(URL + URLpath[0], {["player"] = NSGetLocalPlayerUID()}, tablepath[0])
|
||||||
|
pulseRequestData(URL + URLpath[1], {["player"] = "!" + NSGetLocalPlayerUID()}, tablepath[1])
|
||||||
|
pulseRequestData(URL + URLpath[2], {["player"] = NSGetLocalPlayerUID()}, tablepath[2])
|
||||||
|
foreach (map in file.allMaps)
|
||||||
|
{
|
||||||
|
pulseRequestData(URL + URLpath[3], {["player"] = NSGetLocalPlayerUID(), ["map"] = map.slice(3)}, tablepath[3])
|
||||||
|
}
|
||||||
|
pulseRequestData(URL + URLpath[4], {["player"] = NSGetLocalPlayerUID()}, tablepath[4])
|
||||||
|
}
|
||||||
+21
-18
@@ -140,8 +140,6 @@ void function UpdateStatsForMap( string mapName )
|
|||||||
|
|
||||||
Hud_SetText( Hud_GetChild( file.menu, "WeaponName" ), GetMapDisplayName( mapName ) )
|
Hud_SetText( Hud_GetChild( file.menu, "WeaponName" ), GetMapDisplayName( mapName ) )
|
||||||
|
|
||||||
fetchGamemodeStatsFromToneAPI(mapName)
|
|
||||||
|
|
||||||
// Image
|
// Image
|
||||||
var imageElem = Hud_GetRui( Hud_GetChild( file.menu, "WeaponImageLarge" ) )
|
var imageElem = Hud_GetRui( Hud_GetChild( file.menu, "WeaponImageLarge" ) )
|
||||||
RuiSetImage( imageElem, "basicImage", GetMapImageForMapName( mapName ) )
|
RuiSetImage( imageElem, "basicImage", GetMapImageForMapName( mapName ) )
|
||||||
@@ -154,20 +152,20 @@ void function UpdateStatsForMap( string mapName )
|
|||||||
//SetStatBoxDisplay( Hud_GetChild( file.menu, "Stat2" ), Localize( "#STATS_GAMES_PLAYED" ), gamesPlayed )
|
//SetStatBoxDisplay( Hud_GetChild( file.menu, "Stat2" ), Localize( "#STATS_GAMES_PLAYED" ), gamesPlayed )
|
||||||
//SetStatBoxDisplay( Hud_GetChild( file.menu, "Stat3" ), Localize( "#STATS_GAMES_PLAYED" ), gamesPlayed )
|
//SetStatBoxDisplay( Hud_GetChild( file.menu, "Stat3" ), Localize( "#STATS_GAMES_PLAYED" ), gamesPlayed )
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "KillsLabel0", "KILLS ON MAP" )
|
SetStatsLabelValue( file.menu, "KillsLabel0", Localize("#MAPS_KILLS") )
|
||||||
SetStatsLabelValue( file.menu, "KillsValue0", getMapKillFromToneAPI(mapName) )
|
SetStatsLabelValue( file.menu, "KillsValue0", pulseParse("maps", mapName.slice(3), "kills") )
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "KillsLabel1", "DEATHS ON MAP" )
|
SetStatsLabelValue( file.menu, "KillsLabel1", Localize("#MAPS_DEATHS") )
|
||||||
SetStatsLabelValue( file.menu, "KillsValue1", getMapDeathFromToneAPI(mapName) )
|
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse("maps", mapName.slice(3), "deaths") )
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "KillsLabel2", "TOTAL SHOT DISTANCE" )
|
SetStatsLabelValue( file.menu, "KillsLabel2", Localize("#MAPS_TSD") )
|
||||||
SetStatsLabelValue( file.menu, "KillsValue2", string(int((1.905 * float(getMapDistFromToneAPI(mapName) ) ) )/100) + "m" )
|
SetStatsLabelValue( file.menu, "KillsValue2", HammerToMeterString(float(pulseParse("maps", mapName.slice(3), "total_distance"))))
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "KillsLabel3", "MAXIMUM SHOT DISTANCE" )
|
SetStatsLabelValue( file.menu, "KillsLabel3", Localize("#MAPS_MSD") )
|
||||||
SetStatsLabelValue( file.menu, "KillsValue3", string(int((1.905 * float(getMapMDistFromToneAPI(mapName) ) ) )/100) + "m" )
|
SetStatsLabelValue( file.menu, "KillsValue3", HammerToMeterString(float(pulseParse("maps", mapName.slice(3), "max_distance"))))
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "KillsLabel4", "--" )
|
SetStatsLabelValue( file.menu, "KillsLabel4", Localize("#MAPS_ASD") )
|
||||||
SetStatsLabelValue( file.menu, "KillsValue4", "--" )
|
SetStatsLabelValue( file.menu, "KillsValue4", HammerToMeterString(float(pulseParse("maps", mapName.slice(3), "max_distance")) / float(pulseParse("maps", mapName.slice(3), "kills"))))
|
||||||
|
|
||||||
//var anchorElem = Hud_GetChild( file.menu, "WeaponStatsBackground" )
|
//var anchorElem = Hud_GetChild( file.menu, "WeaponStatsBackground" )
|
||||||
//printt( Hud_GetX( anchorElem ) )
|
//printt( Hud_GetX( anchorElem ) )
|
||||||
@@ -185,13 +183,18 @@ void function UpdateStatsForMap( string mapName )
|
|||||||
fw = [147, 204, 57, 255],
|
fw = [147, 204, 57, 255],
|
||||||
gg = [14, 87, 132, 255]
|
gg = [14, 87, 132, 255]
|
||||||
}
|
}
|
||||||
|
table< string, string > customGamemodeNames = {
|
||||||
|
sns = Localize("#GAMEMODE_sns")
|
||||||
|
fw = Localize("#GAMEMODE_fw")
|
||||||
|
gg = Localize("#GAMEMODE_gg")
|
||||||
|
}
|
||||||
for ( int modeId = 0; modeId < enumCount; modeId++ )
|
for ( int modeId = 0; modeId < enumCount; modeId++ )
|
||||||
{
|
{
|
||||||
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
|
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
|
||||||
if ( mapName in globalToneAPIGamemodeMapData && modeName in globalToneAPIGamemodeMapData[mapName] )
|
if (mapName.slice(3) in pulseData["gamemodesSeparated"])
|
||||||
{
|
{
|
||||||
float modePlayedTime = 0
|
float modePlayedTime = 0
|
||||||
modePlayedTime = float(globalToneAPIGamemodeMapData[mapName][modeName])
|
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName.slice(3), modeName, "kills"))
|
||||||
if ( modePlayedTime > 0 ) {
|
if ( modePlayedTime > 0 ) {
|
||||||
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
|
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
|
||||||
}
|
}
|
||||||
@@ -199,12 +202,12 @@ void function UpdateStatsForMap( string mapName )
|
|||||||
}
|
}
|
||||||
foreach (string key, array<int> value in customGamemodeList)
|
foreach (string key, array<int> value in customGamemodeList)
|
||||||
{
|
{
|
||||||
if ( mapName in globalToneAPIGamemodeMapData && key in globalToneAPIGamemodeMapData[mapName])
|
if (mapName.slice(3) in pulseData["gamemodesSeparated"])
|
||||||
{
|
{
|
||||||
float modePlayedTime = 0
|
float modePlayedTime = 0
|
||||||
modePlayedTime = float(globalToneAPIGamemodeMapData[mapName][key])
|
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName.slice(3), key, "kills"))
|
||||||
if ( modePlayedTime > 0 ) {
|
if ( modePlayedTime > 0 ) {
|
||||||
AddPieChartEntry( modes, key, modePlayedTime, value)
|
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,7 +231,7 @@ void function UpdateStatsForMap( string mapName )
|
|||||||
PieChartData modesPlayedData
|
PieChartData modesPlayedData
|
||||||
modesPlayedData.entries = modes
|
modesPlayedData.entries = modes
|
||||||
modesPlayedData.labelColor = [ 255, 255, 255, 255 ]
|
modesPlayedData.labelColor = [ 255, 255, 255, 255 ]
|
||||||
SetPieChartData( file.menu, "ModesPieChart", "KILLS BY GAMEMODE", modesPlayedData )
|
SetPieChartData( file.menu, "ModesPieChart", "#KILLS_GAMEMODE", modesPlayedData )
|
||||||
|
|
||||||
array<string> fdMaps = GetPlaylistMaps( "fd" )
|
array<string> fdMaps = GetPlaylistMaps( "fd" )
|
||||||
|
|
||||||
+57
-52
@@ -6,11 +6,13 @@ struct
|
|||||||
{
|
{
|
||||||
var menu
|
var menu
|
||||||
array<ItemDisplayData> allTitans
|
array<ItemDisplayData> allTitans
|
||||||
|
array<ItemDisplayData> allPilotWeapons
|
||||||
table<string, array<string> > titanStatLoadout
|
table<string, array<string> > titanStatLoadout
|
||||||
} file
|
} file
|
||||||
|
|
||||||
const MAX_DOTS_ON_GRAPH = 10
|
const MAX_DOTS_ON_GRAPH = 10
|
||||||
table <string, int> titanKillData = {}
|
table <string, int> titanKillData = {}
|
||||||
|
table <string, int> pilotKillData = {}
|
||||||
|
|
||||||
const IMAGE_TITAN_STRYDER = $"ui/menu/personal_stats/ps_titan_icon_stryder"
|
const IMAGE_TITAN_STRYDER = $"ui/menu/personal_stats/ps_titan_icon_stryder"
|
||||||
const IMAGE_TITAN_ATLAS = $"ui/menu/personal_stats/ps_titan_icon_atlas"
|
const IMAGE_TITAN_ATLAS = $"ui/menu/personal_stats/ps_titan_icon_atlas"
|
||||||
@@ -30,11 +32,11 @@ void function InitViewStatsOverviewMenu()
|
|||||||
AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
|
AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
|
||||||
}
|
}
|
||||||
|
|
||||||
void function GetTitanKills( string titanName )
|
void function GetTitanKills()
|
||||||
{
|
{
|
||||||
file.allTitans = GetVisibleItemsOfType( eItemTypes.TITAN )
|
file.allTitans = GetVisibleItemsOfType( eItemTypes.TITAN )
|
||||||
var dataTable = GetDataTable( $"datatable/titan_properties.rpak" )
|
var dataTable = GetDataTable( $"datatable/titan_properties.rpak" )
|
||||||
|
|
||||||
foreach ( titan in file.allTitans )
|
foreach ( titan in file.allTitans )
|
||||||
{
|
{
|
||||||
file.titanStatLoadout[ titan.ref ] <- []
|
file.titanStatLoadout[ titan.ref ] <- []
|
||||||
@@ -48,24 +50,28 @@ void function GetTitanKills( string titanName )
|
|||||||
file.titanStatLoadout[ titan.ref ].append( GetDataTableString( dataTable, row, GetDataTableColumnByName( dataTable, "melee" ) ) )
|
file.titanStatLoadout[ titan.ref ].append( GetDataTableString( dataTable, row, GetDataTableColumnByName( dataTable, "melee" ) ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( weaponRef in file.titanStatLoadout[ titanName ])
|
foreach ( titan in file.allTitans)
|
||||||
{
|
{
|
||||||
titanKillData[weaponRef] <- getWeaponKillsFromToneAPI(weaponRef)
|
foreach ( weaponRef in file.titanStatLoadout[ titan.ref ])
|
||||||
|
{
|
||||||
|
titanKillData[weaponRef] <- pulseParse("weaponsLocal", weaponRef, "kills")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void function GetAllPilotWeapons()
|
||||||
|
{
|
||||||
|
file.allPilotWeapons = GetVisibleItemsOfType( eItemTypes.PILOT_PRIMARY)
|
||||||
|
file.allPilotWeapons.extend(GetVisibleItemsOfType( eItemTypes.PILOT_SECONDARY) )
|
||||||
|
file.allPilotWeapons.extend(GetVisibleItemsOfType( eItemTypes.PILOT_ORDNANCE) )
|
||||||
|
file.allPilotWeapons.extend( GetVisibleItemsOfType( eItemTypes.PILOT_SPECIAL ) )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void function OnStatsOverview_Open()
|
void function OnStatsOverview_Open()
|
||||||
{
|
{
|
||||||
UI_SetPresentationType( ePresentationType.NO_MODELS )
|
UI_SetPresentationType( ePresentationType.NO_MODELS )
|
||||||
|
GetTitanKills()
|
||||||
GetTitanKills("ion")
|
|
||||||
GetTitanKills("scorch")
|
|
||||||
GetTitanKills("northstar")
|
|
||||||
GetTitanKills("ronin")
|
|
||||||
GetTitanKills("tone")
|
|
||||||
GetTitanKills("legion")
|
|
||||||
GetTitanKills("vanguard")
|
|
||||||
|
|
||||||
UpdateViewStatsOverviewMenu()
|
UpdateViewStatsOverviewMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +213,7 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
Hud_Show( weaponImageElem )
|
Hud_Show( weaponImageElem )
|
||||||
Hud_SetText( weaponNameElem, nemesisWeapon.printName )
|
Hud_SetText( weaponNameElem, nemesisWeapon.printName )
|
||||||
Hud_Show( weaponNameElem )
|
Hud_Show( weaponNameElem )
|
||||||
Hud_SetText( weaponDescElem, nemesisWeapon.val + " DEATHS BY WEAPON" )
|
Hud_SetText( weaponDescElem, Localize("#NEMESIS_WEAPON_VALUE"), nemesisWeapon.val)
|
||||||
Hud_Show( weaponDescElem )
|
Hud_Show( weaponDescElem )
|
||||||
Hud_Hide( noDataElem )
|
Hud_Hide( noDataElem )
|
||||||
}
|
}
|
||||||
@@ -232,7 +238,7 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
Hud_Show( weaponImageElem )
|
Hud_Show( weaponImageElem )
|
||||||
Hud_SetText( weaponNameElem, highestKPMData.printName )
|
Hud_SetText( weaponNameElem, highestKPMData.printName )
|
||||||
Hud_Show( weaponNameElem )
|
Hud_Show( weaponNameElem )
|
||||||
Hud_SetText( weaponDescElem, highestKPMData.val + " K/D")
|
Hud_SetText( weaponDescElem, "%s1 K/D", highestKPMData.val)
|
||||||
Hud_Show( weaponDescElem )
|
Hud_Show( weaponDescElem )
|
||||||
Hud_Hide( noDataElem )
|
Hud_Hide( noDataElem )
|
||||||
}
|
}
|
||||||
@@ -288,32 +294,34 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
//#########################
|
//#########################
|
||||||
|
|
||||||
// Lifetime
|
// Lifetime
|
||||||
|
table playerweaponData = expect table(pulseData["weaponsLocal"])
|
||||||
|
table globalweaponData = expect table(pulseData["weaponsGlobal"])
|
||||||
|
|
||||||
|
|
||||||
var totalPilotKills = 0
|
var totalPilotKills = 0
|
||||||
|
|
||||||
foreach (var key, var value in globalToneAPIKillData) {
|
|
||||||
totalPilotKills += value
|
|
||||||
}
|
|
||||||
|
|
||||||
var totalPilotDeaths = 0
|
var totalPilotDeaths = 0
|
||||||
|
foreach (var key, var value in playerweaponData) {
|
||||||
foreach (var key, var value in globalToneAPIDeathData) {
|
table values = expect table(value)
|
||||||
totalPilotDeaths += value
|
totalPilotKills += values["kills"]
|
||||||
|
totalPilotDeaths += values["deaths"]
|
||||||
}
|
}
|
||||||
|
|
||||||
var killsAsPilot = 0
|
var totalGlobalKills = 0
|
||||||
foreach (var key, var value in globalToneAPIKillData) {
|
var totalGlobalDeaths = 0
|
||||||
if (key in titanKillData) {
|
foreach (var key, var value in globalweaponData) {
|
||||||
continue
|
table values = expect table(value)
|
||||||
} else {
|
totalGlobalKills += values["kills"]
|
||||||
killsAsPilot += getWeaponKillsFromToneAPI(string(key))
|
totalGlobalDeaths += values["deaths"]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var killsAsTitan = 0
|
var killsAsTitan = 0
|
||||||
foreach (var key, var value in globalToneAPIKillData) {
|
var killsAsPilot = 0
|
||||||
|
foreach (var key, var value in playerweaponData) {
|
||||||
if (key in titanKillData) {
|
if (key in titanKillData) {
|
||||||
killsAsTitan += titanKillData[string(key)]
|
killsAsTitan += titanKillData[string(key)]
|
||||||
|
} else {
|
||||||
|
killsAsPilot += pulseParse("weaponsLocal", string(key), "kills")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,16 +329,13 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
float dval = float(totalPilotDeaths)
|
float dval = float(totalPilotDeaths)
|
||||||
float kdval = float(int((kval / dval)*100))/100
|
float kdval = float(int((kval / dval)*100))/100
|
||||||
|
|
||||||
|
float gkval = float(totalGlobalKills)
|
||||||
|
float gdval = float(totalGlobalDeaths)
|
||||||
|
float gkdval = float(int((gkval / gdval)*100))/100
|
||||||
|
|
||||||
SetStatsLabelValue( file.menu, "LifetimeAverageValue", [ "#STATS_KD_VALUE", kdval ] )
|
SetStatsLabelValue( file.menu, "LifetimeAverageValue", [ "#STATS_KD_VALUE", kdval ] )
|
||||||
|
|
||||||
// Lifetime (PVP)
|
SetStatsLabelValue( file.menu, "LifetimePVPAverageValue", [ "#STATS_KD_VALUE", gkdval ] )
|
||||||
local lifetimeAveragePVP = player.GetPersistentVar( "kdratio_lifetime_pvp" ).tofloat()
|
|
||||||
local formattedLifetimeAveragePVP
|
|
||||||
if ( lifetimeAveragePVP % 1 == 0 )
|
|
||||||
formattedLifetimeAveragePVP = format( "%.0f", lifetimeAveragePVP )
|
|
||||||
else
|
|
||||||
formattedLifetimeAveragePVP = format( "%.1f", lifetimeAveragePVP )
|
|
||||||
SetStatsLabelValue( file.menu, "LifetimePVPAverageValue", [ "#STATS_KD_VALUE", formattedLifetimeAveragePVP ] )
|
|
||||||
|
|
||||||
bool last10GamesStatsVisible = gamesPlayed >= NUM_GAMES_TRACK_KDRATIO ? true : false
|
bool last10GamesStatsVisible = gamesPlayed >= NUM_GAMES_TRACK_KDRATIO ? true : false
|
||||||
SetLast10GamesStatVisibility( file.menu, last10GamesStatsVisible )
|
SetLast10GamesStatVisibility( file.menu, last10GamesStatsVisible )
|
||||||
@@ -378,33 +383,33 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
else
|
else
|
||||||
kdratiopvp_match_average = format( "%.1f", kdratiopvp_match_average )
|
kdratiopvp_match_average = format( "%.1f", kdratiopvp_match_average )
|
||||||
SetStatsLabelValue( file.menu, "Last10GamesPVPValue", [ "#STATS_KD_VALUE", kdratiopvp_match_average ] )
|
SetStatsLabelValue( file.menu, "Last10GamesPVPValue", [ "#STATS_KD_VALUE", kdratiopvp_match_average ] )
|
||||||
PlotKDPointsOnGraph( file.menu, 1, kdratiopvp_match, lifetimeAveragePVP )
|
PlotKDPointsOnGraph( file.menu, 1, kdratiopvp_match, gkdval )
|
||||||
|
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue0" ), string( killsAsPilot ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue0" ), string( killsAsPilot ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsPilot" ) ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsPilot" ) ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue2" ), string( GetPlayerStatInt( player, "kills_stats", "totalNPC" ) ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue2" ), string( GetPlayerStatInt( player, "kills_stats", "totalNPC" ) ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue3" ), string( getWeaponKillsFromToneAPI("pilot_emptyhanded") ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue3" ), string( pulseParse("weaponsLocal", "pilot_emptyhanded", "kills") + pulseParse("weaponsLocal", "melee_pilot_kunai", "kills") ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue4" ), string( getWeaponKillsFromToneAPI("human_execution") ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue4" ), string( pulseParse("weaponsLocal", "human_execution", "kills") ) )
|
||||||
// Hud_SetText( GetElem( file.menu, "KillsAsPilotValue5" ), string( GetPlayerStatInt( player, "kills_stats", "titanFallKill" ) ) )
|
// Hud_SetText( GetElem( file.menu, "KillsAsPilotValue5" ), string( GetPlayerStatInt( player, "kills_stats", "titanFallKill" ) ) )
|
||||||
|
|
||||||
var titanMeleeKills = 0
|
var titanMeleeKills = 0
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_ion")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_ion", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_scorch")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_scorch", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_northstar")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_northstar", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_sword")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_sword", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_tone")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_tone", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_legion")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_legion", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_vanguard")
|
titanMeleeKills += pulseParse("weaponsLocal", "titan_punch_vanguard", "kills")
|
||||||
titanMeleeKills += getWeaponKillsFromToneAPI("auto_titan_melee")
|
titanMeleeKills += pulseParse("weaponsLocal", "auto_titan_melee", "kills")
|
||||||
|
|
||||||
var titanExecutions = getWeaponKillsFromToneAPI("titan_execution")
|
var titanExecutions = pulseParse("weaponsLocal", "titan_execution", "kills")
|
||||||
|
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue0" ), string( killsAsTitan ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue0" ), string( killsAsTitan ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsTitan" ) ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsTitan" ) ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue2" ), string( titanExecutions ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue2" ), string( titanExecutions ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue3" ), string( titanMeleeKills ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue3" ), string( titanMeleeKills ) )
|
||||||
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue4" ), string( getWeaponKillsFromToneAPI("damagedef_titan_step") ) )
|
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue4" ), string( pulseParse("weaponsLocal", "damagedef_titan_step", "kills") ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
function PlotKDPointsOnGraph( menu, graphIndex, values, dottedAverage )
|
function PlotKDPointsOnGraph( menu, graphIndex, values, dottedAverage )
|
||||||
+20
-13
@@ -49,7 +49,7 @@ float function GetTitanKills( string titanName)
|
|||||||
float weaponKills = 0
|
float weaponKills = 0
|
||||||
foreach ( weaponRef in file.titanStatLoadout[ titanName ])
|
foreach ( weaponRef in file.titanStatLoadout[ titanName ])
|
||||||
{
|
{
|
||||||
weaponKills += float(getWeaponKillsFromToneAPI(weaponRef))
|
weaponKills += float(pulseParse("weaponsLocal", weaponRef, "kills"))
|
||||||
}
|
}
|
||||||
return weaponKills
|
return weaponKills
|
||||||
}
|
}
|
||||||
@@ -79,11 +79,13 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
//#########################################
|
//#########################################
|
||||||
// Time By Class Pie Chart
|
// Time By Class Pie Chart
|
||||||
//#########################################
|
//#########################################
|
||||||
|
|
||||||
var totalPilotKills = 0
|
var totalPilotKills = 0
|
||||||
|
table playerweaponData = expect table(pulseData["weaponsLocal"])
|
||||||
foreach (var key, var value in globalToneAPIKillData) {
|
|
||||||
totalPilotKills += value
|
foreach (var key, var value in playerweaponData) {
|
||||||
|
table values = expect table(value)
|
||||||
|
totalPilotKills += values["kills"]
|
||||||
}
|
}
|
||||||
float hoursAsPilot = float(totalPilotKills)
|
float hoursAsPilot = float(totalPilotKills)
|
||||||
float hoursAsTitan = killsAsTitan
|
float hoursAsTitan = killsAsTitan
|
||||||
@@ -101,7 +103,7 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
PieChartData classTimeData
|
PieChartData classTimeData
|
||||||
classTimeData.entries = classes
|
classTimeData.entries = classes
|
||||||
classTimeData.labelColor = [ 255, 255, 255, 255 ]
|
classTimeData.labelColor = [ 255, 255, 255, 255 ]
|
||||||
SetPieChartData( file.menu, "ClassPieChart", "KILLS BY CLASS", classTimeData )
|
SetPieChartData( file.menu, "ClassPieChart", Localize("#TIME_KILLS_CLASS"), classTimeData )
|
||||||
|
|
||||||
//#########################################
|
//#########################################
|
||||||
// Time By Chassis Pie Chart
|
// Time By Chassis Pie Chart
|
||||||
@@ -135,7 +137,7 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
PieChartData chassisTimeData
|
PieChartData chassisTimeData
|
||||||
chassisTimeData.entries = titans
|
chassisTimeData.entries = titans
|
||||||
chassisTimeData.labelColor = [ 255, 255, 255, 255 ]
|
chassisTimeData.labelColor = [ 255, 255, 255, 255 ]
|
||||||
SetPieChartData( file.menu, "ChassisPieChart", "KILLS BY TITAN", chassisTimeData )
|
SetPieChartData( file.menu, "ChassisPieChart", Localize("#TIME_KILLS_TITAN"), chassisTimeData )
|
||||||
|
|
||||||
//#########################################
|
//#########################################
|
||||||
// Time By Mode Pie Chart
|
// Time By Mode Pie Chart
|
||||||
@@ -150,13 +152,18 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
fw = [147, 204, 57, 255],
|
fw = [147, 204, 57, 255],
|
||||||
gg = [14, 87, 132, 255]
|
gg = [14, 87, 132, 255]
|
||||||
}
|
}
|
||||||
|
table< string, string > customGamemodeNames = {
|
||||||
|
sns = Localize("#GAMEMODE_sns")
|
||||||
|
fw = Localize("#GAMEMODE_fw")
|
||||||
|
gg = Localize("#GAMEMODE_gg")
|
||||||
|
}
|
||||||
for ( int modeId = 0; modeId < enumCount; modeId++ )
|
for ( int modeId = 0; modeId < enumCount; modeId++ )
|
||||||
{
|
{
|
||||||
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
|
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
|
||||||
if ( modeName in globalToneAPIGamemodeData )
|
if ( pulseParse("gamemodesAll", modeName, "kills") != 0 )
|
||||||
{
|
{
|
||||||
float modePlayedTime = 0
|
float modePlayedTime = 0
|
||||||
modePlayedTime = float(globalToneAPIGamemodeData[modeName])
|
modePlayedTime = float(pulseParse("gamemodesAll", modeName, "kills"))
|
||||||
if ( modePlayedTime > 0 ) {
|
if ( modePlayedTime > 0 ) {
|
||||||
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
|
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
|
||||||
}
|
}
|
||||||
@@ -164,12 +171,12 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
}
|
}
|
||||||
foreach (string key, array<int> value in customGamemodeList)
|
foreach (string key, array<int> value in customGamemodeList)
|
||||||
{
|
{
|
||||||
if ( key in globalToneAPIGamemodeData)
|
if ( pulseParse("gamemodesAll", key, "kills") != 0 )
|
||||||
{
|
{
|
||||||
float modePlayedTime = 0
|
float modePlayedTime = 0
|
||||||
modePlayedTime = float(globalToneAPIGamemodeData[key])
|
modePlayedTime = float(pulseParse("gamemodesAll", key, "kills"))
|
||||||
if ( modePlayedTime > 0 ) {
|
if ( modePlayedTime > 0 ) {
|
||||||
AddPieChartEntry( modes, key, modePlayedTime, value)
|
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,7 +184,7 @@ void function UpdateViewStatsTimeMenu()
|
|||||||
PieChartData modesPlayedData
|
PieChartData modesPlayedData
|
||||||
modesPlayedData.entries = modes
|
modesPlayedData.entries = modes
|
||||||
modesPlayedData.labelColor = [ 255, 255, 255, 255 ]
|
modesPlayedData.labelColor = [ 255, 255, 255, 255 ]
|
||||||
SetPieChartData( file.menu, "ModesPieChart", "KILLS BY GAMEMODE", modesPlayedData )
|
SetPieChartData( file.menu, "ModesPieChart", Localize("#KILLS_GAMEMODE"), modesPlayedData )
|
||||||
|
|
||||||
//#########################################
|
//#########################################
|
||||||
// Time Stats
|
// Time Stats
|
||||||
+1
-1
@@ -175,7 +175,7 @@ void function UpdateStatsForTitan( string titanRef, int loadoutIndex )
|
|||||||
int aiKills
|
int aiKills
|
||||||
foreach ( weaponRef in file.titanStatLoadout[ titanRef ] )
|
foreach ( weaponRef in file.titanStatLoadout[ titanRef ] )
|
||||||
{
|
{
|
||||||
totalKills += getWeaponKillsFromToneAPI(weaponRef)
|
totalKills += pulseParse("weaponsLocal", weaponRef, "kills")
|
||||||
pilotKills += GetPlayerStatInt( player, "weapon_kill_stats", "pilots", weaponRef )
|
pilotKills += GetPlayerStatInt( player, "weapon_kill_stats", "pilots", weaponRef )
|
||||||
titanKills += GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef )
|
titanKills += GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef )
|
||||||
aiKills += GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef )
|
aiKills += GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef )
|
||||||
+5
-5
@@ -338,7 +338,7 @@ table<string, table> function GetOverviewWeaponData()
|
|||||||
if ( !PersistenceEnumValueIsValid( "loadoutWeaponsAndAbilities", weaponName ) )
|
if ( !PersistenceEnumValueIsValid( "loadoutWeaponsAndAbilities", weaponName ) )
|
||||||
continue
|
continue
|
||||||
|
|
||||||
int val = getWeaponKillsFromToneAPI(weaponName)
|
int val = pulseParse("weaponsLocal", weaponName, "kills")
|
||||||
if ( val > Table[ "most_kills" ].val )
|
if ( val > Table[ "most_kills" ].val )
|
||||||
{
|
{
|
||||||
Table[ "most_kills" ].ref = weaponName
|
Table[ "most_kills" ].ref = weaponName
|
||||||
@@ -346,7 +346,7 @@ table<string, table> function GetOverviewWeaponData()
|
|||||||
Table[ "most_kills" ].val = val
|
Table[ "most_kills" ].val = val
|
||||||
}
|
}
|
||||||
|
|
||||||
int nval = getNemesisWeaponFromToneAPI(weaponName)
|
int nval = pulseParse("weaponsLocal", weaponName, "deaths")
|
||||||
if ( nval > Table[ "nemesis_weapon" ].val )
|
if ( nval > Table[ "nemesis_weapon" ].val )
|
||||||
{
|
{
|
||||||
Table[ "nemesis_weapon" ].ref = weaponName
|
Table[ "nemesis_weapon" ].ref = weaponName
|
||||||
@@ -357,9 +357,9 @@ table<string, table> function GetOverviewWeaponData()
|
|||||||
float kdval = 0
|
float kdval = 0
|
||||||
float kval = 0
|
float kval = 0
|
||||||
float dval = 0
|
float dval = 0
|
||||||
if( getWeaponKillsFromToneAPI(weaponName) != 0 && getDWEFromToneAPI(weaponName) != 0){
|
if( pulseParse("weaponsLocal", weaponName, "kills") != 0 && pulseParse("weaponsLocal", weaponName, "deaths_while_equipped") != 0){
|
||||||
kval = float(getWeaponKillsFromToneAPI(weaponName))
|
kval = float(pulseParse("weaponsLocal", weaponName, "kills"))
|
||||||
dval = float(getDWEFromToneAPI(weaponName))
|
dval = float(pulseParse("weaponsLocal", weaponName, "deaths_while_equipped"))
|
||||||
if (kval / dval > kdval){
|
if (kval / dval > kdval){
|
||||||
kdval = kval / dval
|
kdval = kval / dval
|
||||||
}
|
}
|
||||||
+4
-4
@@ -180,8 +180,8 @@ void function UpdateStatsForWeapon( string weaponRef )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Total Kills Stats
|
// Total Kills Stats
|
||||||
SetStatsLabelValue( file.menu, "KillsValue0", getWeaponKillsFromToneAPI(weaponRef) )
|
SetStatsLabelValue( file.menu, "KillsValue0", pulseParse("weaponsLocal", weaponRef, "kills") ) //Total kills
|
||||||
SetStatsLabelValue( file.menu, "KillsValue1", getWeaponKillsFromToneAPI(weaponRef) )
|
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse("weaponsLocal", weaponRef, "kills") ) //Pilots
|
||||||
SetStatsLabelValue( file.menu, "KillsValue2", GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef ) )
|
SetStatsLabelValue( file.menu, "KillsValue2", GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef ) ) //Titans
|
||||||
SetStatsLabelValue( file.menu, "KillsValue3", getDWEFromToneAPI(weaponRef))
|
SetStatsLabelValue( file.menu, "KillsValue3", pulseParse("weaponsLocal", weaponRef, "deaths_while_equipped")) // Deaths with weapon
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user