diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..081973f
Binary files /dev/null and b/icon.png differ
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..af52acd
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,7 @@
+{
+ "name": "Pulse",
+ "description": "Pulse is a clientside mod for Titanfall 2 letting you view killstats collected by the Tone API using the otherwise non-functional Stats tab.",
+ "version_number": "2.0.0",
+ "website_url": "https://github.com/ToneAPI/pulse",
+ "dependencies": []
+}
\ No newline at end of file
diff --git a/mods/ToneAPI.pulse/README.md b/mods/ToneAPI.pulse/README.md
new file mode 100644
index 0000000..28d57de
--- /dev/null
+++ b/mods/ToneAPI.pulse/README.md
@@ -0,0 +1,80 @@
+# 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.
+
+## Currently, features include:
+- mostly functional `Overview` tab,
+- functional `Time` tab,
+- Pilot weapon data displayed in `Pilot Weapons` tab,
+- Titan kills displayed in `Titans` tab,
+- functional `Maps` tab,
+- real-time updates.
+
+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)
+
+
+Features, more in-depth:
+
+### `Overview`
+- Most Kills - shows the weapon with most accumulated kills.
+- Nemesis Weapon - shows the weapon that has killed you the most.
+- Most Effective - shows weapon with the highest K/D ratio.
+- 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:
+
+ | Name | Description |
+ |--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+ | Pilots |Shows **ALL KILLS** accumulated by player as Pilot. Differentiating Pilot and Titan kills will come in a later Tone API update.|
+ | Titans |Non-functional, see line above.|
+ | 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 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:
+
+ | Name | Description |
+ |--------------------|------------------------------------------------------|
+ | 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.|
+ | Titan executions |Shows only executions accumulated by player as Titan.|
+ | Pilots meleed |Shows only melee kills accumulated by player as Titan.|
+ | Pilot roadkills |Shows only roadkills accumulated by player as Titan.|
+
+- Upper statbox values have been zeroed out, these don't yet work and are set to 0 to avoid confusion.
+
+### `Time`
+
+- Kills by Class shows kills by Pilot and Titan on a piechart.
+- Kills by Titan shows kills by all Titan classes on a piechart.
+- Kills by Gamemode shows kills on each gamemode played on a piechart.
+
+### `Pilot Weapons`
+
+- shows total accumulated kills per weapon under Total Kills.
+- shows deaths with given weapon equipped under Deaths with Weapon.
+
+### `Titans`
+
+- shows total accumulated kills per Titan under Total Kills.
+
+### `Maps`
+
+- Player Map Stats - shows general data for player on chosen map, visualised in the table below:
+
+ | Name | Description |
+ |-----------------------|------------------------------------------------------- |
+ | Kills on Map |Shows all kills accumulated by player on chosen map.|
+ | Deaths on Map |Shows all deaths accumulated by player on chosen map.|
+ | Total Shot Distance |Shows total distance of kills accumulated by player on chosen map.|
+ | Maximum Shot Distance |Shows highest distance kill by player on chosen map.|
+
+- Kills by Gamemode - piechart showing all kills (in percent) on chosen map by gamemode.
+
+
+## DISCLAIMER
+
+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.
diff --git a/mod.json b/mods/ToneAPI.pulse/mod.json
similarity index 100%
rename from mod.json
rename to mods/ToneAPI.pulse/mod.json
diff --git a/mod/resource/ui/menus/viewstats_maps.menu b/mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_maps.menu
similarity index 100%
rename from mod/resource/ui/menus/viewstats_maps.menu
rename to mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_maps.menu
diff --git a/mod/resource/ui/menus/viewstats_overview.menu b/mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_overview.menu
similarity index 100%
rename from mod/resource/ui/menus/viewstats_overview.menu
rename to mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_overview.menu
diff --git a/mod/resource/ui/menus/viewstats_weapons.menu b/mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_weapons.menu
similarity index 100%
rename from mod/resource/ui/menus/viewstats_weapons.menu
rename to mods/ToneAPI.pulse/mod/resource/ui/menus/viewstats_weapons.menu
diff --git a/mod/scripts/vscripts/pulse-common-func.gnut b/mods/ToneAPI.pulse/mod/scripts/vscripts/pulse-common-func.gnut
similarity index 92%
rename from mod/scripts/vscripts/pulse-common-func.gnut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/pulse-common-func.gnut
index 83d1bf0..8d9d81b 100644
--- a/mod/scripts/vscripts/pulse-common-func.gnut
+++ b/mods/ToneAPI.pulse/mod/scripts/vscripts/pulse-common-func.gnut
@@ -21,10 +21,8 @@ bool function pulseRequestData(string givenURL, table parameterTable, string tab
table DecodedJSON = DecodeJSON(response.body)
if ("map" in parameterTable)
{
- table map
- map[expect string(parameterTable["map"])] <- DecodedJSON
- pulsePrintt(tablepath)
- pulseData[tablepath] <- map
+ string mapName = expect string(parameterTable["map"])
+ pulseData[tablepath] <- {mapName = DecodedJSON}
} else {
pulseData[tablepath] <- DecodedJSON
}
diff --git a/mod/scripts/vscripts/pulse.gnut b/mods/ToneAPI.pulse/mod/scripts/vscripts/pulse.gnut
similarity index 96%
rename from mod/scripts/vscripts/pulse.gnut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/pulse.gnut
index 9a9d1d2..cd67e04 100644
--- a/mod/scripts/vscripts/pulse.gnut
+++ b/mods/ToneAPI.pulse/mod/scripts/vscripts/pulse.gnut
@@ -21,7 +21,7 @@ void function pulseGetData()
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)
+ foreach (string map in file.allMaps)
{
pulseRequestData(URL + URLpath[3], {["player"] = NSGetLocalPlayerUID(), ["map"] = map.slice(3)}, tablepath[3])
}
diff --git a/mod/scripts/vscripts/ui/menu_lobby.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_lobby.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_lobby.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_lobby.nut
diff --git a/mod/scripts/vscripts/ui/menu_stats_maps.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_maps.nut
similarity index 98%
rename from mod/scripts/vscripts/ui/menu_stats_maps.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_maps.nut
index 974d378..e6bef01 100644
--- a/mod/scripts/vscripts/ui/menu_stats_maps.nut
+++ b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_maps.nut
@@ -191,7 +191,7 @@ void function UpdateStatsForMap( string mapName )
for ( int modeId = 0; modeId < enumCount; modeId++ )
{
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
- if ( mapName in pulseData && modeName in pulseData[mapName] )
+ if (mapName in pulseData["gamemodesSeparated"])
{
float modePlayedTime = 0
modePlayedTime = float(pulseParse(mapName, "gamemodesSeparated", modeName, "kills"))
@@ -202,7 +202,7 @@ void function UpdateStatsForMap( string mapName )
}
foreach (string key, array value in customGamemodeList)
{
- if ( mapName in pulseData && key in pulseData[mapName])
+ if (mapName in pulseData["gamemodesSeparated"])
{
float modePlayedTime = 0
modePlayedTime = float(pulseParse(mapName, "gamemodesSeparated", key, "kills"))
diff --git a/mod/scripts/vscripts/ui/menu_stats_overview.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_overview.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_stats_overview.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_overview.nut
diff --git a/mod/scripts/vscripts/ui/menu_stats_time.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_time.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_stats_time.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_time.nut
diff --git a/mod/scripts/vscripts/ui/menu_stats_titans.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_titans.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_stats_titans.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_titans.nut
diff --git a/mod/scripts/vscripts/ui/menu_stats_utility.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_utility.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_stats_utility.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_utility.nut
diff --git a/mod/scripts/vscripts/ui/menu_stats_weapons.nut b/mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_weapons.nut
similarity index 100%
rename from mod/scripts/vscripts/ui/menu_stats_weapons.nut
rename to mods/ToneAPI.pulse/mod/scripts/vscripts/ui/menu_stats_weapons.nut